engagevoiceutil

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EngageVoiceBaseURI     string = "https://portal.vacd.biz"
	EngageVoiceLoginURI    string = "https://portal.vacd.biz/api/v1/auth/login"
	EngageVoiceTokenURI    string = "https://portal.vacd.biz/api/v1/admin/token"
	EngageVoiceTokenHeader string = "x-auth-token"
)

Variables

This section is empty.

Functions

func ExchangeAPIToken

func ExchangeAPIToken(authToken string) (string, error)

func ListTokens

func ListTokens(authOrApiToken string) ([]string, error)

func NewHTTPClient

func NewHTTPClient(token string) *http.Client

func RequestAuthToken

func RequestAuthToken(username, password string) (*LoginSuccess, *LoginError, *http.Response, error)

Types

type Account

type Account struct {
	MainAccountID               string `json:"mainAccountId"`
	AccountID                   string `json:"accountId"`
	AccountName                 string `json:"accountName"`
	EnableMultiUser             bool   `json:"enableMultiUser"`
	EnableSoftphones            bool   `json:"enableSoftphones"`
	TcpaSafeMode                bool   `json:"tcpaSafeMode"`
	EnableVoiceBroadcast        bool   `json:"enableVoiceBroadcast"`
	OutboundPrepay              bool   `json:"outboundPrepay"`
	Enable247Dialing            bool   `json:"enable247Dialing"`
	EnableFifo                  bool   `json:"enableFifo"`
	EnableChat                  bool   `json:"enableChat"`
	EnableInbound               bool   `json:"enableInbound"`
	EnableOutbound              bool   `json:"enableOutbound"`
	EnableVisualIvr             bool   `json:"enableVisualIvr"`
	EnableTracking              bool   `json:"enableTracking"`
	EnableCloudRouting          bool   `json:"enableCloudRouting"`
	UsePowerBy                  bool   `json:"usePowerBy"`
	EnableAgentRankRouting      bool   `json:"enableAgentRankRouting"`
	EnableHciDialer             bool   `json:"enableHciDialer"`
	EnableTcpaSafeMachineDetect bool   `json:"enableTcpaSafeMachineDetect"`
	EmailFromAddress            string `json:"emailFromAddress"`
	DatabaseShardID             string `json:"databaseShardId"`
	DefaultOutdialServerGroupID int64  `json:"defaultOutdialServerGroupId"`
	DefaultIntellidialServerID  int64  `json:"defaultIntellidialServerId"`
	RcAccountAccess             string `json:"rcAccountAccess"`
	EnableGoodData              bool   `json:"enableGoodData"`
	MainAccountName             string `json:"mainAccountName"`
}

type ClientAPIs

type ClientAPIs struct {
	APIClient *engagevoice.APIClient
	Config    *engagevoice.Configuration
}

func NewClientAPIs

func NewClientAPIs(apiToken string) ClientAPIs

func NewClientAPIsHTTPClient

func NewClientAPIsHTTPClient(httpClient *http.Client) ClientAPIs

type LoginError

type LoginError struct {
	GeneralMessage string `json:"generalMessage"`
	Details        string `json:"details"`
	RequestURI     string `json:"requestUri"`
	Timestamp      int64  `json:"timestamp"`
}

type LoginSuccess

type LoginSuccess struct {
	AuthToken    string    `json:"authToken"`
	PlatformHost string    `json:"platformHost"`
	Accounts     []Account `json:"accounts"`
}

func GenerateAPIToken

func GenerateAPIToken(username, password string) (string, *LoginSuccess, error)

type Role

type Role struct {
	RoleType    string `json:"roleType"`
	Description string `json:"description"`
}

type User

type User struct {
	UserID       int64     `json:"userId"`
	UserName     string    `json:"userName"`
	FirstName    string    `json:"firstName"`
	LastName     string    `json:"lastName"`
	FullName     string    `json:"fullName"`
	CreationDate time.Time `json:"creationDate"`
	Enabled      bool      `json:"enabled"`
	ParentPath   string    `json:"parentPath"`
	RcUserID     string    `json:"rcUserId"`
	Roles        []Role    `json:"roles"`
	RootUser     bool      `json:"rootUser"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL