gcloudcx

package module
v0.8.13 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 21 Imported by: 0

README

go-gcloudcx

GoVersion GoDoc License Report

A Package to send requests to HTTP/REST services.

Genesys Cloud CX Client Library in GO

Have a look at the examples/ folder for complete examples on how to use this library.

Usage

You first start by creating a gcloudcx.Client that will allow to send requests to Genesys Cloud:

log    := logger.Create("gcloudcx")
client := gcloudcx.NewClient(&gcloudcx.ClientOptions{
	DeploymentID: "123abc0981234i0df8g0",
	Logger:       log,
})

You can choose the authorization grant right away as well:

log    := logger.Create("gcloudcx")
client := gcloudcx.NewClient(&gcloudcx.ClientOptions{
	DeploymentID: "123abc0981234i0df8g0",
	Logger:       log,
}).SetAuthorizationGrant(&gcloudcx.AuthorizationCodeGrant{
	ClientID:    "hlkjshdgpiuy123387",
	Secret:      "879e8ugspojdgj",
	RedirectURL: "http://my.acme.com/token",
})

Or,

log    := logger.Create("gcloudcx")
client := gcloudcx.NewClient(&gcloudcx.ClientOptions{
	DeploymentID: "123abc0981234i0df8g0",
	Logger:       log,
}).SetAuthorizationGrant(&gcloudcx.ClientCredentialsGrant{
	ClientID: "jklsdufg89u9j234",
	Secret:   "sdfgjlskdfjglksdfjg",
})

As of today, Authorization Code and Client Credentials grants are implemented.

In the case of the Authorization Code, the best is to run a Webserver in your code and to handle the authentication requests in the router. The library provides two helpers to manage the authentication:

  • AuthorizeHandler() that can be used to ensure a page has an authenticated client,
  • LoggedInHandler() that can be used in the RedirectURL to process the results of the authentication.

They can be used like this (using the gorilla/mux router, for example):

router := mux.NewRouter()
// This route is used as the RedirectURL of the client
router.Methods("GET").Path("/token").Handler(client.LoggedInHandler()(myhandler()))

authorizedRouter := router.PathPrefix("/").Subrouter()

authorizedRouter.Use(client.AuthorizeHandler())

// This is the main route of this application, we want a fully functional gcloudcx.Client
authorizedRouter.Methods("GET").Path("/").HandlerFunc(mainRouteHandler)

In you HttpHandler, the client will be available from the request's context:

func mainRouteHandler(w http.ResponseWriter, r *http.Request) {
	client, err := gcloudcx.ClientFromContext(r.Context())
	if err != nil {
		core.RespondWithError(w, http.StatusServiceUnavailable, err)
		return
	}

	// Let's get my organization here, as an example...
	organization, err := client.GetMyOrganization(r.Context())
	if err != nil {
		core.RespondWithError(w, http.StatusServiceUnavailable, err)
		return
	}
	core.RespondWithJSON(w, http.StatusOK, struct {
		OrgName  string `json:"organization"`
	}{
		OrgName:  organization.String(),
	})
}

When using the Client Credential grant, you can configure the grant to tell when the token gets updated, allowing you to store it and re-use it in the future:

var TokenUpdateChan = make(chan gcloudcx.UpdatedAccessToken)

func main() {
	// ...
	defer close(TokenUpdateChan)

	go func() {
		for {
			data, opened := <-TokenUpdateChan

			if !opened {
				return
			}

			log.Printf("Received Token: %s\n", data.Token)

			myID, ok := data.CustomData.(string)
			if (!ok) {
				log.Printf("Shoot....\n")
			} else {
				log.Printf("myID: %s\n", myID)
			}
		}
	}()

	client := gcloudcx.NewClient(&gcloudcx.ClientOptions{
		// ...
	}).SetAuthorizationGrant(&gcloudcx.ClientCredentialsGrant{
		ClientID: "1234",
		Secret:   "s3cr3t",
		TokenUpdated: TokenUpdateChan,
		CustomData:   "myspecialID",
		Token: savedToken,
	})

	// do stuff with the client, etc.
}

As you can see, you can even pass some custom data (interface{}, so anything really) to the grant and that data will be passed back to the func that handles the chan.

Using Go's contexts

All functions that will end up calling the Genesys Cloud API must use a context as their first argument.

This allow developers to, eventually, control timeouts, and other things.

A useful pattern is to add a logger to the context with various records, when the library function executes, it will send its logs to that logger, thus using all the records that were set:

log := logger.Create("MYAPP").Record("coolId", myID)

user := client.GetMyUser(log.ToContext(someContext))

In the logs, you will see the value of coolId in every line produced by client.GetMyUser.

If the context does not contain a logger, the client.Logger is used.

Fetch resources

The library provides a Fetch function that will fetch a resource from the Genesys Cloud API.

// Fetch a user by its ID
user, err := gcloudcx.Fetch[gcloud.User](context, client, userID) // userID is a uuid.UUID

You can use FetchBy to fetch a resource by a specific field:

integration, err := gcloudcx.FetchBy(context, client, func (integration gcloudcx.OpenMessagingIntegration) bool {
	return integration.Name == "My Integration"
})

Note: This method can be rather slow as it fetches all the resources of the type and then filters them.

You can also add query criteria to the FetchBy function:

recipient, err := gcloudcx.FetchBy(
	context,
	client,
	func (recipient gcloudcx.Recipient) bool {
		return recipient.Name == "My Recipient"
	},
	gcloudcx.Query{
		"messengerType": "open",
		"pageSize":      100,
	},
)

Finally, you can use FetchAll to fetch all the resources of a type:

integrations, err := gcloudcx.FetchAll[gcloudcx.OpenMessagingIntegration](context, client)

Again, some query criteria can be added:

integrations, err := gcloudcx.FetchAll[gcloudcx.OpenMessagingIntegration](context, client, gcloudcx.Query{
	"pageSize": 100,
})

Create Resource

You can also create a resource without fetching it:

user := gcloud.New[gcloud.User](context, client, id, log)

This will create a resource and set its ID, client, and log properly as needed.

Notifications

The Genesys Cloud Notification API is accessible via the NotificationChannel and NotificationTopic types.

Processing incoming Notification Topics is simply done in a loop by reading the TopicReceived Go chan.

Here is a quick example:

user, err := client.GetMyUser(context.Background())
if err != nil {
	log.Errorf("Failed to retrieve my User", err)
	panic(err)
}

notificationChannel, err := client.CreateNotificationChannel(context.Background())
if err != nil {
	log.Errorf("Failed to create a notification channel", err)
	panic(err)
}

topics, err := config.NotificationChannel.Subscribe(
	context.Background(),
	gcloudcx.UserPresenceTopic{}.With(user),
)
if err != nil {
	log.Errorf("Failed to subscribe to topics", err)
	panic(err)
}
log.Infof("Subscribed to topics: [%s]", strings.Join(topics, ","))

// Call the Genesys Cloud Notification Topic loop
go func() {
	for {
		select {
		case receivedTopic := notificationChannel.TopicReceived:
			if receivedTopic == nil {
				log.Infof("Terminating Topic message loop")
				return
			}
			switch topic := receivedTopic.(type) {
			case gcloudcx.UserPresenceTopic:
				log.Infof("User %s, Presence: %s", topic.User, topic.Presence)
			default:
				log.Warnf("Unknown topic: %s", topic)
			}
		case <-time.After(30 * time.Second):
			// This timer makes sure the for loop does not execute too quickly 
			//   when no topic is received for a while
			log.Debugf("Nothing in the last 30 seconds")
		}
	}
}()

Response Management (Canned Responses)

Responses canbe fetched, like any other resource, via the Fetch function:

response, err := gcloudcx.Fetch[gcloudcx.Response](context, client, responseID)

Or via the dedicated FetchByFilter function:

response, err = gcloudcx.ResponseManagementResponse{}.FetchByFilters(
	context,
	client,
	gcloudcx.ResponseManagementQueryFilter{
		Name: "name", Operator: "EQUALS", Values: []string{response.Name},
	},
)

This calls the query API of Genesys Cloud, which is more efficient than fetching all the responses and then filtering them (FetchBy method).

Responses can apply substitutions to provide the final text that can be sent to the user. Custom substitutions are provided as a map[string]string to the func and default substitutions are provided by the resource itself.

text, err := response.ApplySubstitutions(context, "text/plain", map[string]string{
	"firstName": "John",
	"lastName":  "Doe",
})

The second argument allows to specify the content type of the text to be returned, that content type has to be present in the resource, otherwise an error is returned. text/plain and text/html are supported by the Genesys Cloud API as of today.

ApplySubstitutions supports both the Genesys Cloud substitutions ({{substitutionId}}) and the Go Template system, which is far more powerful. See the Go Template documentation for more information. On top of the basic features, ApplySubstitutions also provides the functions from the Sprig library, which is a collection of useful functions for templates. See the Sprig documentation for more information.

For example the following response will return the text Hello John Doe:

response := gcloudcx.ResponseManagementResponse{ // This is a fake response, just to show the template
	Texts: []gcloudcx.ResponseManagementContent{
		{
			ContentType: "text/plain",
			Content: `Hello {{firstName}} {{lastName}}`, // Genesys Cloud substitutions
		}
	},
}
text, err := response.ApplySubstitutions(context, "text/plain", map[string]string{
	"firstName": "John",
	"lastName":  "Doe",
})
assert.Equal(t, "Hello John Doe", text)

To get the same result with Go Templates:

response := gcloudcx.ResponseManagementResponse{ // This is a fake response, just to show the template
	Texts: []gcloudcx.ResponseManagementContent{
		{
			ContentType: "text/plain",
			Content: `Hello {{.firstName}} {{.lastName}}`, // Go Template substitutions
		}
	},
}
text, err := response.ApplySubstitutions(context, "text/plain", map[string]string{
	"firstName": "John",
	"lastName":  "Doe",
})
assert.Equal(t, "Hello John Doe", text)

You can mix both approaches:

response := gcloudcx.ResponseManagementResponse{ // This is a fake response, just to show the template
	Texts: []gcloudcx.ResponseManagementContent{
		{
			ContentType: "text/plain",
			Content: `
Hello {{.firstName}} {{.lastName}}, you are on {{location}}!   # Genesys Cloud and Go substitutions
{{if eq .location "Earth"}}You are on the right place!{{end}}  # Go Template condition
And you are visiting {{ default "Atlantis" .country }}.        # Sprig function
`,
		}
	},
	Substitutions: []gcloudcx.ResponseManagementSubstitution{{
		ID: "location",
		Description: "The location of the person to greet",
		Default: "Earth",
	}},
}
text, err := response.ApplySubstitutions(context, "text/plain", map[string]string{
	"firstName": "John",
	"lastName":  "Doe",
})

Agent Chat API

Guest Chat API

OpenMessaging API

TODO

This library implements only a very small set of Genesys Cloud CX's API at the moment, but I keep adding stuff...

Documentation

Index

Constants

View Source
const APP string = "GCloudCX Client"

APP is the name of the application

View Source
const ClientContextKey key = iota + 54329

ClientContextKey is the key to store Client in context.Context

Variables

View Source
var (
	// AuthenticationRequestTimeoutError means the request timed out
	AuthenticationRequestTimeoutError = APIError{Status: 504, Code: "authentication.request.timeout", Message: "Authentication request timeout."}
	// BadRequestError means the request was badly formed
	BadRequestError = APIError{Status: 400, Code: "bad.request", Message: "The request could not be understood by the server due to malformed syntax."}
	// InternalServerError means the server experiences an internal error
	InternalServerError = APIError{Status: 500, Code: "internal.server.error", Message: "The server encountered an unexpected condition which prevented it from fulfilling the request."}
	// InvalidDateError means the given date was invalid
	InvalidDateError = APIError{Status: 400, Code: "invalid.date", Message: "Dates must be specified as ISO-8601 strings. For example: yyyy-MM-ddTHH:mm:ss.SSSZ"}
	// InvalidValueError means the value was invalid
	InvalidValueError = APIError{Status: 400, Code: "invalid.value", Message: "Value [%s] is not valid for field type [%s]. Allowable values are: %s"}
	// MissingAnyPermissionsError means the request was missing some permissions
	MissingAnyPermissionsError = APIError{Status: 403, Code: "missing.any.permissions", Message: "Unable to perform the requested action. You must have at least one of the following permissions assigned: %s"}
	// MissingPermissionsError means the request was missing some permissions
	MissingPermissionsError = APIError{Status: 403, Code: "missing.permissions", Message: "Unable to perform the requested action. You are missing the following permission(s): %s"}
	// NotAuthorizedError means the request was not authorized
	NotAuthorizedError = APIError{Status: 403, Code: "not.authorized", Message: "You are not authorized to perform the requested action."}
	// NotFoundError means the wanted resource was not found
	NotFoundError = APIError{Status: 404, Code: "not.found", Message: "The requested resource was not found."}
	// RequestTimeoutError means the request timed out
	RequestTimeoutError = APIError{Status: 504, Code: "request.timeout", Message: "The request timed out."}
	// ServiceUnavailableError means the service is not available
	ServiceUnavailableError = APIError{Status: 503, Code: "service.unavailable", Message: "Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance)."}
	// TooManyRequestsError means the client sent too many requests and should wait before sending more
	TooManyRequestsError = APIError{Status: 429, Code: "too.many.requests", Message: "Rate limit exceeded the maximum [%s] requests within [%s] seconds"}
	// UnsupportedMediaTypeError means the media type is not supported
	UnsupportedMediaTypeError = APIError{Status: 415, Code: "unsupported.media.type", Message: "Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header."}

	// AuthenticationRequiredError means the request should authenticate first
	AuthenticationRequiredError = APIError{Status: 401, Code: "authentication.required", Message: "No authentication bearer token specified in authorization header."}
	// BadCredentialsError means the credentials are invalid
	BadCredentialsError = APIError{Status: 401, Code: "bad.credentials", Message: "Invalid login credentials (%s)."}
	// CredentialsExpiredError means the credentials are expired
	CredentialsExpiredError = APIError{Status: 401, Code: "credentials.expired", Message: "The supplied credentials are expired and cannot be used."}

	// ChatConversationStateError  means the conversation does not permit the request
	ChatConversationStateError = APIError{Status: 400, Code: "chat.error.conversation.state", Message: "The conversation is in a state which does not permit this action."}
	// ChatMemberStateError means the chat member does not permit the request
	ChatMemberStateError = APIError{Status: 400, Code: "chat.error.member.state", Message: "The conversation member is in a state which does not permit this action."}
	// ChatDeploymentBadAuthError means the authentication failed
	ChatDeploymentBadAuthError = APIError{Status: 400, Code: "chat.deployment.bad.auth", Message: "The customer member authentication has failed."}
	// ChatDeploymentDisabledError means the deployment is disabled
	ChatDeploymentDisabledError = APIError{Status: 400, Code: "chat.deployment.disabled", Message: "The web chat deployment is currently disabled."}
	// ChatDeploymentRequireAuth means the deployment requires some authentication
	ChatDeploymentRequireAuth = APIError{Status: 400, Code: "chat.deployment.require.auth", Message: "The deployment requires the customer member to be authenticated."}
	// ChatInvalidQueueError means the queue is not valid
	ChatInvalidQueueError = APIError{Status: 400, Code: "chat.error.invalid.queue", Message: "The specified queue is not valid."}
	// ChatCreateConversationRequestRoutingTargetError means the routing target is not valid
	ChatCreateConversationRequestRoutingTargetError = APIError{Status: 400, Code: "chat.error.createconversationrequest.routingtarget", Message: "The routing target is not valid."}
	// MessageExpired means the message has expired
	MessageExpired = APIError{Status: 400, Code: "message.expired", Message: "%s"}
	// RateLimited means the request was rate limited
	RateLimited = APIError{Status: 429, Code: "rate.limited", Message: "%s"}
	// MessageNotAllowed means the message is not allowed
	MessageNotAllowed = APIError{Status: 400, Code: "message.not.allowed", Message: "%s"}
	// GeneralError means the request failed for a general reason
	GeneralError = APIError{Status: 400, Code: "general.error", Message: "%s"}
	// UnsupportedMessage means the message is not supported
	UnsupportedMessage = APIError{Status: 400, Code: "unsupported.message", Message: "%s"}
	// UnknownMessage means the message is unknown
	UnknownMessage = APIError{Status: 400, Code: "unknown.message", Message: "%s"}
	// InvalidMessageStructure means the message structure is invalid
	InvalidMessageStructure = APIError{Status: 400, Code: "invalid.message.structure", Message: "%s"}
	// InvalidDestination means the destination is invalid
	InvalidDestination = APIError{Status: 400, Code: "invalid.destination", Message: "%s"}
	// ServerError means the server failed
	ServerError = APIError{Status: 500, Code: "server.error", Message: "%s"}
	// MediaTypeNotAllowed means the media type is not allowed
	MediaTypeNotAllowed = APIError{Status: 415, Code: "media.type.not.allowed", Message: "%s"}
	// InvalidMediaContentLength means the media content length is invalid
	InvalidMediaContentLength = APIError{Status: 400, Code: "invalid.media.content.length", Message: "%s"}
	// RecipientOptedOut means the recipient opted out
	RecipientOptedOut = APIError{Status: 400, Code: "recipient.opted.out", Message: "%s"}
)
View Source
var VERSION = "0.8.13" + commit

VERSION is the version of this application

Functions

func Fetch added in v0.7.15

func Fetch[T Fetchable, PT interface {
	Initializable
	*T
}](context context.Context, client *Client, parameters ...any) (*T, error)

Fetch fetches a resource from the Genesys Cloud API

The object must implement the Fetchable interface

Resources can be fetched by their ID:

user, err := Fetch[gcloudcx.User](context, client, uuid.UUID)

user, err := Fetch[gcloudcx.User](context, client, gcloudcx.User{ID: uuid.UUID})

or by their URI:

user, err := Fetch[gcloudcx.User](context, client, gcloudcx.User{}.GetURI(uuid.UUID))

func FetchAll added in v0.7.15

func FetchAll[T Fetchable, PT interface {
	Initializable
	*T
}](context context.Context, client *Client, parameters ...interface{}) ([]*T, error)

FetchAll fetches all objects from the Genesys Cloud API

The objects must implement the Fetchable interface

users, err := FetchAll[gcloudcx.User](context, client)

A gcloudcx.Query can be added to narrow the request:

users, err := FetchAll[gcloudcx.User](context, client, gcloudcx.Query{Language: "en-US"})

func FetchBy added in v0.7.15

func FetchBy[T Fetchable, PT interface {
	Initializable
	*T
}](context context.Context, client *Client, match func(T) bool, parameters ...interface{}) (*T, error)

FetchBy fetches a resource from the Genesys Cloud API by a match function

The resource must implement the Fetchable interface

match := func(user gcloudcx.User) bool {
    return user.Name == "John Doe"
}
user, err := FetchBy(context, client, match)

A gcloudcx.Query can be added to narrow the request:

user, err := FetchBy(context, client, match, gcloudcx.Query{Language: "en-US"})

func New

func New[T core.Identifiable, PT interface {
	Initializable
	*T
}](context context.Context, client *Client, parameters ...any) *T

New create a resource from the Genesys Cloud API

The object must implement the Initializable interface

Resources can be fetched by their ID:

user, err := Fetch[gcloudcx.User](context, client, uuid.UUID)

user, err := Fetch[gcloudcx.User](context, client, gcloudcx.User{ID: uuid.UUID})

or by their URI:

user, err := Fetch[gcloudcx.User](context, client, gcloudcx.User{}.GetURI(uuid.UUID))

Types

type ACWSettings added in v0.1.0

type ACWSettings struct {
	WrapupPrompt string
	Timeout      time.Duration
}

ACWSettings defines the After Call Work settings of a Queue

func (ACWSettings) MarshalJSON added in v0.1.0

func (settings ACWSettings) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*ACWSettings) UnmarshalJSON added in v0.1.0

func (settings *ACWSettings) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type APIError added in v0.0.2

type APIError struct {
	Status            int               `json:"status,omitempty"`
	Code              string            `json:"code,omitempty"`
	Message           string            `json:"message,omitempty"`
	MessageParams     map[string]string `json:"messageParams,omitempty"`
	MessageWithParams string            `json:"messageWithParams,omitempty"`
	EntityID          string            `json:"entityId,omitempty"`
	EntityName        string            `json:"entityName,omitempty"`
	ContextID         string            `json:"contextId,omitempty"`
	CorrelationID     string            `json:"correlationId,omitempty"`
	Details           []APIErrorDetails `json:"details,omitempty"`
	Errors            []APIError        `json:"errors,omitempty"`
	Stack             errors.StackTrace `json:"-"`
}

APIError represents an error from the Gcloud API

func (APIError) As added in v0.7.15

func (e APIError) As(target interface{}) bool

As attempts to convert the given error into the given target

As returns true if the conversion was successful and the target is now populated.

Example:

target := errors.ArgumentInvalid.Clone()
if errors.As(err, &target) {
  // do something with target
}

func (APIError) Clone added in v0.7.15

func (e APIError) Clone() *APIError

Clone creates an exact copy of this Error

func (APIError) Error added in v0.0.2

func (e APIError) Error() string

Error returns a string representation of this error

func (APIError) Is added in v0.7.15

func (e APIError) Is(target error) bool

Is tells if this error matches the target.

implements errors.Is interface (package "errors").

To check if an error is an errors.Error, simply write:

if errors.Is(err, gcloudcx.APIError{}) {
  // do something with err
}

func (*APIError) UnmarshalJSON added in v0.0.2

func (e *APIError) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON decodes a JSON payload into an APIError

func (APIError) With added in v0.7.16

func (e APIError) With(what string, values ...interface{}) error

With creates a new Error from a given sentinel telling "what" is wrong and eventually their value.

With also records the stack trace at the point it was called.

func (APIError) WithStack added in v0.7.15

func (e APIError) WithStack() error

WithStack creates a new error from a given Error and records its stack.

type APIErrorDetails added in v0.0.2

type APIErrorDetails struct {
	ErrorCode  string `json:"errorCode,omitempty"`
	FieldName  string `json:"fieldName,omitempty"`
	EntityID   string `json:"entityId,omitempty"`
	EntityName string `json:"entityName,omitempty"`
}

APIErrorDetails contains the details of an APIError

type AccessToken added in v0.1.0

type AccessToken struct {
	Type      string    `json:"tokenType"`
	Token     string    `json:"token"`
	ExpiresOn time.Time `json:"tokenExpires"` // UTC!
}

AccessToken is used to consume the GCloud API

It must be obtained via an AuthorizationGrant

func (AccessToken) ExpiresIn added in v0.1.0

func (token AccessToken) ExpiresIn() time.Duration

ExpiresIn tells when the token should expire

func (AccessToken) IsExpired added in v0.1.0

func (token AccessToken) IsExpired() bool

IsExpired tells if this AccessToken is expired or not

func (AccessToken) IsValid added in v0.1.0

func (token AccessToken) IsValid() bool

IsValid tells if this AccessToken is valid

func (*AccessToken) LoadFromCookie added in v0.1.0

func (token *AccessToken) LoadFromCookie(r *http.Request, cookieName string) *AccessToken

LoadFromCookie loads this token from a cookie in the given HTTP Request

func (*AccessToken) Reset added in v0.1.0

func (token *AccessToken) Reset()

Reset resets the Token so it is expired and empty

func (AccessToken) SaveToCookie added in v0.1.0

func (token AccessToken) SaveToCookie(w http.ResponseWriter, cookieName string)

SaveToCookie saves this token to a cookie in the given HTTP ResponseWriter

func (AccessToken) String added in v0.1.0

func (token AccessToken) String() string

type Address added in v0.1.0

type Address struct {
	Name               string `json:"name"`
	NameRaw            string `json:"nameRaw"`
	AddressDisplayable string `json:"addressDisplayable"`
	AddressRaw         string `json:"addressRaw"`
	AddressNormalized  string `json:"addressNormalized"`
}

Address describes an Address (telno, etc)

type Addressable added in v0.1.0

type Addressable interface {
	// GetURI gets the URI
	//
	// if ids are provided, they are used to replace the {{uuid}} in the URI.
	//
	// if no ids are provided and the Addressable has a UUID, it is used to replace the {{uuid}} in the URI.
	//
	// else, the pattern for the URI is returned ("/api/v2/things/%s")
	GetURI(ids ...uuid.UUID) URI
}

Addressable describes things that carry a URI (typically /api/v2/things/{{uuid}})

type AddressableEntityRef added in v0.1.0

type AddressableEntityRef struct {
	ID      uuid.UUID `json:"id"`
	SelfURI URI       `json:"selfUri,omitempty"`
}

AddressableEntityRef describes an Entity that can be addressed

func (AddressableEntityRef) GetID added in v0.1.0

func (ref AddressableEntityRef) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (AddressableEntityRef) GetURI added in v0.1.0

func (ref AddressableEntityRef) GetURI() URI

GetURI gets the URI of this

implements Addressable

type AgentlessMessage added in v0.4.0

type AgentlessMessage struct {
	From          string             `json:"fromAddress"`
	To            string             `json:"toAddress"`
	MessengerType string             `json:"toAddressMessengerType"`
	Text          string             `json:"textBody"`
	Template      *MessagingTemplate `json:"messagingTemplate,omitempty"`
}

AgentlessMessage sends an agentless outbound text message to a Messenger address

See https://developer.genesys.cloud/api/rest/v2/conversations/#post-api-v2-conversations-messages-agentless

type AgentlessMessageResult added in v0.4.0

type AgentlessMessageResult struct {
	ID             uuid.UUID             `json:"id"`
	ConversationID uuid.UUID             `json:"conversationId"`
	From           string                `json:"fromAddress"`
	To             string                `json:"toAddress"`
	MessengerType  string                `json:"messengerType"`
	Text           string                `json:"textBody"`
	Template       *MessagingTemplate    `json:"messagingTemplate,omitempty"`
	JobUser        *AddressableEntityRef `json:"user,omitempty"`
	Timestamp      time.Time             `json:"timestamp"`
	SelfURI        URI                   `json:"selfUri"`
}

AgentlessMessageResult describes the results of the send action on an AgentlessMessage

func (AgentlessMessageResult) GetID added in v0.7.0

func (result AgentlessMessageResult) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (AgentlessMessageResult) GetURI added in v0.7.0

func (result AgentlessMessageResult) GetURI() URI

GetURI gets the URI of this

implements Addressable

type AnswerOption added in v0.1.0

type AnswerOption struct {
	ID    uuid.UUID `json:"id"`
	Text  string    `json:"text"`
	Value int       `json:"value"`
}

AnswerOption describes an Answer Option

type Attachment added in v0.1.0

type Attachment struct {
	AttachmentID  string `json:"attachmentId"`
	Name          string `json:"name"`
	ContentURI    string `json:"contentUri"`
	ContentType   string `json:"contentType"`
	ContentLength int64  `json:"contentLength"`
	InlineImage   bool   `json:"inlineImage"`
}

Attachment describes an Email Attachment

type Authorizable added in v0.7.10

type Authorizable interface {
	Authorize(context context.Context, client *Client) error // Authorize a client with Gcloud
	AccessToken() *AccessToken                               // Get the Access Token obtained by the Authorizer
	core.Identifiable                                        // Implements core.Identifiable
}

Authorizer describes what a grants should do

type Authorization

type Authorization struct {
	ClientID     string    `json:"clientId"`
	Secret       string    `json:"clientSecret"`
	RedirectURI  *url.URL  `json:"redirectUri"`
	TokenType    string    `json:"tokenType"`
	Token        string    `json:"token"`
	TokenExpires time.Time `json:"tokenExpires"`
}

Authorization contains the login options to connect the client to GCloud

type AuthorizationCodeGrant added in v0.1.0

type AuthorizationCodeGrant struct {
	ClientID     uuid.UUID
	Secret       string
	Code         string
	RedirectURL  *url.URL
	Token        AccessToken
	CustomData   interface{}
	TokenUpdated chan UpdatedAccessToken
}

AuthorizationCodeGrant implements Gcloud's Client Authorization Code Grants

See: https://developer.mypurecloud.com/api/rest/authorization/use-authorization-code.html

func (*AuthorizationCodeGrant) AccessToken added in v0.1.0

func (grant *AuthorizationCodeGrant) AccessToken() *AccessToken

AccessToken gives the access Token carried by this Grant

Implements Authorizable

func (*AuthorizationCodeGrant) Authorize added in v0.1.0

func (grant *AuthorizationCodeGrant) Authorize(context context.Context, client *Client) (err error)

Authorize this Grant with Gcloud

Implements Authorizable

func (*AuthorizationCodeGrant) GetID added in v0.4.0

func (grant *AuthorizationCodeGrant) GetID() uuid.UUID

GetID gets the client Identifier

Implements core.Identifiable

type AuthorizationDivision added in v0.4.0

type AuthorizationDivision struct {
	ID           uuid.UUID      `json:"-"`
	SelfUri      string         `json:"selfUri"`
	Name         string         `json:"name"`
	Description  string         `json:"description"` // required
	IsHome       bool           `json:"homeDivision"`
	ObjectCounts map[string]int `json:"objectCounts"`
}

func (AuthorizationDivision) GetID added in v0.4.0

func (division AuthorizationDivision) GetID() uuid.UUID

GetID gets the identifier

implements core.Identifiable

func (AuthorizationDivision) MarshalJSON added in v0.7.10

func (division AuthorizationDivision) MarshalJSON() ([]byte, error)

func (AuthorizationDivision) String added in v0.7.11

func (division AuthorizationDivision) String() string

String returns a string representation of the AuthorizationDivision

implements fmt.Stringer

func (*AuthorizationDivision) UnmarshalJSON added in v0.7.10

func (division *AuthorizationDivision) UnmarshalJSON(payload []byte) (err error)

type AuthorizationGrant added in v0.1.0

type AuthorizationGrant struct {
	SubjectID uuid.UUID              `json:"subjectId"`
	Division  AuthorizationDivision  `json:"division"`
	Role      AuthorizationGrantRole `json:"role"`
	CreatedAt string                 `json:"grantMadeAt"` // TODO: this is an ISO8601 date
}

func (AuthorizationGrant) CheckScope added in v0.7.10

CheckScope checks if the grant allows or denies the given scope

If allowed, the policy that allows the scope is returned

func (AuthorizationGrant) String added in v0.7.11

func (grant AuthorizationGrant) String() string

type AuthorizationGrantPolicy added in v0.4.0

type AuthorizationGrantPolicy struct {
	EntityName string   `json:"entityName"`
	Domain     string   `json:"domain"`
	Condition  string   `json:"condition"`
	Actions    []string `json:"actions"`
}

func (AuthorizationGrantPolicy) CheckScope added in v0.7.10

func (policy AuthorizationGrantPolicy) CheckScope(scope AuthorizationScope) bool

CheckScope checks if the grant allows or denies the given scope

func (AuthorizationGrantPolicy) String added in v0.7.23

func (policy AuthorizationGrantPolicy) String() string

String returns a string representation of the AuthorizationDivision

implements fmt.Stringer

type AuthorizationGrantRole added in v0.4.0

type AuthorizationGrantRole struct {
	ID          uuid.UUID                  `json:"id"`
	SelfUri     string                     `json:"selfUri"`
	Name        string                     `json:"name"`
	Description string                     `json:"description"`
	IsDefault   bool                       `json:"default"`
	Policies    []AuthorizationGrantPolicy `json:"policies"`
}

func (AuthorizationGrantRole) CheckScope added in v0.7.10

CheckScope checks if the grant role allows or denies the given scope

If allowed, the policy that allows the scope is returned

func (AuthorizationGrantRole) GetID added in v0.4.0

func (role AuthorizationGrantRole) GetID() uuid.UUID

GetID gets the identifier

implements core.Identifiable

func (AuthorizationGrantRole) String added in v0.7.11

func (role AuthorizationGrantRole) String() string

String returns a string representation of the AuthorizationDivision

implements fmt.Stringer

type AuthorizationScope added in v0.7.10

type AuthorizationScope struct {
	Domain string
	Entity string
	Action string
}

AuthorizationScope represents a scope for a client

See https://developer.genesys.cloud/authorization/platform-auth/scopes#scope-descriptions

func (AuthorizationScope) String added in v0.7.10

func (scope AuthorizationScope) String() string

func (AuthorizationScope) With added in v0.7.10

func (scope AuthorizationScope) With(subscopes ...string) AuthorizationScope

type AuthorizationSubject added in v0.4.0

type AuthorizationSubject struct {
	ID      uuid.UUID            `json:"id"`
	SelfUri string               `json:"selfUri"`
	Name    string               `json:"name"`
	Grants  []AuthorizationGrant `json:"grants"`
	Version int                  `json:"version"`
	// contains filtered or unexported fields
}

AuthorizationSubject describes the roles and permissions of a Subject

func (AuthorizationSubject) CheckScopes added in v0.7.10

func (subject AuthorizationSubject) CheckScopes(scopes ...string) (permitted []string, denied []string)

CheckScopes checks if the subject allows or denies the given scopes

See https://developer.genesys.cloud/authorization/platform-auth/scopes#scope-descriptions

func (AuthorizationSubject) GetID added in v0.4.0

func (subject AuthorizationSubject) GetID() uuid.UUID

GetID gets the identifier

implements core.Identifiable

func (AuthorizationSubject) GetURI added in v0.7.15

func (subject AuthorizationSubject) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*AuthorizationSubject) Initialize added in v0.7.15

func (subject *AuthorizationSubject) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (AuthorizationSubject) String added in v0.7.10

func (subject AuthorizationSubject) String() string

String returns a string representation of the AuthorizationSubject

implements fmt.Stringer

type Biography added in v0.1.0

type Biography struct {
	Biography string   `json:"biography"`
	Interests []string `json:"interests"`
	Hobbies   []string `json:"hobbies"`
	Spouse    string   `json:"spouse"`
}

Biography describes a User's biography

type Calibration added in v0.1.0

type Calibration struct {
	ID              uuid.UUID       `json:"id"`
	Name            string          `json:"name"`
	SelfURI         URI             `json:"selfUri"`
	Calibrator      *User           `json:"calibrator"`
	Agent           *User           `json:"agent"`
	Conversation    *Conversation   `json:"conversation"`
	EvaluationForm  *EvaluationForm `json:"evaluationForm"`
	ContextID       string          `json:"contextId"`
	AverageScore    int             `json:"averageScore"`
	HighScore       int             `json:"highScore"`
	LowScore        int             `json:"lowScore"`
	CreatedDate     time.Time       `json:"createdDate"`
	Evaluations     []*Evaluation   `json:"evaluations"`
	Evaluators      []*User         `json:"evaluators"`
	ScoringIndex    *Evaluation     `json:"scoringIndex"`
	ExpertEvaluator *User           `json:"expertEvaluator"`
}

Calibration describe a Calibration

type ChatMember added in v0.1.0

type ChatMember struct {
	ID            uuid.UUID         `json:"id,omitempty"`
	DisplayName   string            `json:"displayName,omitempty"`
	AvatarURL     *url.URL          `json:"-"`
	Role          string            `json:"role,omitempty"`
	State         string            `json:"state,omitempty"`
	JoinedAt      time.Time         `json:"joinDate,omitempty"`
	LeftAt        time.Time         `json:"leaveDate,omitempty"`
	Authenticated bool              `json:"authenticatedGuest,omitempty"`
	Custom        map[string]string `json:"customFields,omitempty"`
}

ChatMember describes a Chat Member

func (ChatMember) GetID added in v0.1.0

func (member ChatMember) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (ChatMember) MarshalJSON added in v0.1.0

func (member ChatMember) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (ChatMember) String added in v0.1.0

func (member ChatMember) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ChatMember) UnmarshalJSON added in v0.1.0

func (member *ChatMember) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type Client

type Client struct {
	Region         string         `json:"region"`
	DeploymentID   uuid.UUID      `json:"deploymentId"`
	Organization   *Organization  `json:"-"`
	API            *url.URL       `json:"apiUrl,omitempty"`
	LoginURL       *url.URL       `json:"loginUrl,omitempty"`
	Proxy          *url.URL       `json:"proxyUrl,omitempty"`
	Grant          Authorizable   `json:"-"`
	RequestTimeout time.Duration  `json:"requestTimout"`
	Logger         *logger.Logger `json:"-"`
}

Client is the primary object to use Gcloud

func ClientFromContext added in v0.1.0

func ClientFromContext(context context.Context) (*Client, error)

ClientFromContext retrieves a Client from a context

func NewClient added in v0.1.0

func NewClient(options *ClientOptions) *Client

NewClient creates a new Gcloud Client

func (*Client) AuthorizeHandler added in v0.1.0

func (client *Client) AuthorizeHandler() func(http.Handler) http.Handler

AuthorizeHandler validates an incoming Request and sends to Gcloud Authorize process if not

func (*Client) CheckScopes added in v0.7.10

func (client *Client) CheckScopes(context context.Context, scopes ...string) (permitted []string, denied []string, err error)

CheckScopes checks if the current client allows/denies the given scopes

See https://developer.genesys.cloud/authorization/platform-auth/scopes#scope-descriptions

func (*Client) CheckScopesWithID added in v0.7.10

func (client *Client) CheckScopesWithID(context context.Context, id core.Identifiable, scopes ...string) (permitted []string, denied []string, err error)

CheckScopesWithID checks if the given grant allows/denies the given scopes

See https://developer.genesys.cloud/authorization/platform-auth/scopes#scope-descriptions

func (*Client) CreateNotificationChannel added in v0.1.0

func (client *Client) CreateNotificationChannel(context context.Context) (*NotificationChannel, error)

CreateNotificationChannel creates a new channel for notifications

If the environment variable PURECLOUD_LOG_HEARTBEAT is set to true, the Heartbeat topic will be logged

func (*Client) CreateOpenMessagingIntegration added in v0.7.0

func (client *Client) CreateOpenMessagingIntegration(context context.Context, name string, webhookURL *url.URL, token string, headers map[string]string) (*OpenMessagingIntegration, error)

Create creates a new OpenMessaging Integration

func (*Client) Delete

func (client *Client) Delete(context context.Context, path URI, results interface{}) error

Delete sends a DELETE HTTP Request to GCloud and gets the results

func (*Client) DeleteCookie added in v0.1.0

func (client *Client) DeleteCookie(w http.ResponseWriter)

DeleteCookie deletes the GCloud Client cookie from the response writer

func (*Client) FetchEntities added in v0.7.15

func (client *Client) FetchEntities(context context.Context, uri URI) ([][]byte, error)

func (*Client) Get

func (client *Client) Get(context context.Context, path URI, results interface{}) error

Get sends a GET HTTP Request to GCloud and gets the results

func (*Client) GetAvailableNotificationTopics added in v0.8.0

func (client *Client) GetAvailableNotificationTopics(context context.Context, properties ...string) ([]NotificationTopicDefinition, error)

GetAvailableNotificationTopics retrieves available notification topics

properties is one of more properties that should be expanded
see https://developer.mypurecloud.com/api/rest/v2/notifications/#get-api-v2-notifications-availabletopics

func (Client) GetLogger added in v0.6.0

func (client Client) GetLogger(context context.Context) *logger.Logger

GetLogger gets the logger from the given Context

If the Context is nil or does not contain a logger, it returns the default logger

func (*Client) GetMyOrganization

func (client *Client) GetMyOrganization(context context.Context) (*Organization, error)

GetMyOrganization retrives the current Organization

func (*Client) GetMyUser added in v0.1.0

func (client *Client) GetMyUser(context context.Context, properties ...string) (*User, error)

GetMyUser retrieves the User that authenticated with the client

properties is one of more properties that should be expanded
see https://developer.mypurecloud.com/api/rest/v2/users/#get-api-v2-users-me

func (*Client) HttpHandler added in v0.1.0

func (client *Client) HttpHandler() func(http.Handler) http.Handler

HttpHandler wraps the client into an http Handler

func (*Client) IsAuthorized

func (client *Client) IsAuthorized() bool

IsAuthorized tells if the client has an Authorization Token It migt be expired and the app should login again as needed

func (*Client) LoggedInHandler added in v0.1.0

func (client *Client) LoggedInHandler() func(http.Handler) http.Handler

LoggedInHandler gets a valid Token from GCloud using an AuthorizationGrant

func (*Client) Login

func (client *Client) Login(context context.Context) error

Login logs in a Client to Gcloud

Uses the credentials stored in the Client

func (*Client) LoginWithAuthorizationGrant added in v0.1.0

func (client *Client) LoginWithAuthorizationGrant(context context.Context, grant Authorizable) (err error)

LoginWithAuthorizationGrant logs in a Client to Gcloud with given authorization Grant

func (*Client) Logout

func (client *Client) Logout(context context.Context)

Logout logs out a Client from GCloud

func (*Client) LogoutHandler added in v0.1.0

func (client *Client) LogoutHandler() func(http.Handler) http.Handler

LogoutHandler logs out the current user

func (*Client) Patch added in v0.1.0

func (client *Client) Patch(context context.Context, path URI, payload, results interface{}) error

Patch sends a PATCH HTTP Request to GCloud and gets the results

func (*Client) Post

func (client *Client) Post(context context.Context, path URI, payload, results interface{}) error

Post sends a POST HTTP Request to GCloud and gets the results

func (*Client) Put added in v0.1.0

func (client *Client) Put(context context.Context, path URI, payload, results interface{}) error

Put sends an UPDATE HTTP Request to GCloud and gets the results

func (*Client) SendRequest added in v0.1.0

func (client *Client) SendRequest(context context.Context, uri URI, options *request.Options, results interface{}) (err error)

SendRequest sends a REST request to GCloud

func (*Client) SetAuthorizationGrant added in v0.1.0

func (client *Client) SetAuthorizationGrant(grant Authorizable) *Client

SetAuthorizationGrant sets the Authorization Grant

func (*Client) SetLogger

func (client *Client) SetLogger(log *logger.Logger) *Client

SetLogger sets the logger

func (*Client) SetRegion

func (client *Client) SetRegion(region string) *Client

SetRegion sets the region and its main API

func (*Client) ToContext added in v0.1.0

func (client *Client) ToContext(parent context.Context) context.Context

ToContext stores this Client in the given context

type ClientCredentialsGrant added in v0.1.0

type ClientCredentialsGrant struct {
	ClientID     uuid.UUID
	Secret       string
	Token        AccessToken
	CustomData   interface{}
	TokenUpdated chan UpdatedAccessToken
}

ClientCredentialsGrant implements GCloud's Client Credentials Grants

When the Token is updated, the new token is sent to the TokenUpdated chan along with the CustomData

See: https://developer.mypurecloud.com/api/rest/authorization/use-client-credentials.html

func (*ClientCredentialsGrant) AccessToken added in v0.1.0

func (grant *ClientCredentialsGrant) AccessToken() *AccessToken

AccessToken gives the access Token carried by this Grant

Implements Authorizable

func (*ClientCredentialsGrant) Authorize added in v0.1.0

func (grant *ClientCredentialsGrant) Authorize(context context.Context, client *Client) (err error)

Authorize this Grant with GCloud CX

Implements Authorizable

func (*ClientCredentialsGrant) GetID added in v0.4.0

func (grant *ClientCredentialsGrant) GetID() uuid.UUID

GetID gets the client Identifier

Implements core.Identifiable

type ClientOptions

type ClientOptions struct {
	Region         string
	OrganizationID uuid.UUID
	DeploymentID   uuid.UUID
	Proxy          *url.URL
	Grant          Authorizable
	RequestTimeout time.Duration
	Logger         *logger.Logger
}

ClientOptions contains the options to create a new Client

type CobrowseSession added in v0.1.0

type CobrowseSession struct {
	ID    uuid.UUID `json:"id"`
	State string    `json:"state"` // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Self  Address   `json:"self"`
	Held  bool      `json:"held"`

	ProviderEventTime time.Time `json:"providerEventTime"`
	ConnectedTime     time.Time `json:"connectedTime"`
	DisconnectedTime  time.Time `json:"disconnectedTime"`
	StartAlertingTime time.Time `json:"startAlertingTime"`

	DisconnectType string `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable

	Segments          []Segment `json:"segments"`
	Provider          string    `json:"provider"`
	PeerID            string    `json:"peerId"`
	CobrowseSessionID string    `json:"cobrowseSessionId"`
	CobrowseRole      string    `json:"cobrowseRole"`
	Controlling       []string  `json:"controlling"`
	ViewerURL         *url.URL  `json:"viewerUrl"`
}

CobrowseSession describes a Cobrowse Session (like belonging to Participant)

func (CobrowseSession) GetID added in v0.1.0

func (session CobrowseSession) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (CobrowseSession) String added in v0.1.0

func (session CobrowseSession) String() string

String gets a string version

implements the fmt.Stringer interface

type Contact added in v0.1.0

type Contact struct {
	Type      string `json:"type"`      // PRIMARY, WORK, WORK2, WORK3, WORK4, HOME, MOBILE, MAIN
	MediaType string `json:"mediaType"` // PHONE, EMAIL, SMS
	Display   string `json:"display,omitempty"`
	Address   string `json:"address,omitempty"`   // If present, there is no Extension
	Extension string `json:"extension,omitempty"` // If present, there is no Address
}

Contact describes something that can be contacted

func (Contact) String added in v0.1.0

func (contact Contact) String() string

String gets a string version

implements the fmt.Stringer interface

type Conversation added in v0.1.0

type Conversation struct {
	ID              uuid.UUID      `json:"id"`
	SelfURI         URI            `json:"selfUri,omitempty"`
	Name            string         `json:"name"`
	ExternalTag     string         `json:"externalTag,omitempty"`
	StartTime       time.Time      `json:"startTime"`
	EndTime         time.Time      `json:"endTime"`
	Address         string         `json:"address"`
	Participants    []*Participant `json:"participants"`
	ConversationIDs []uuid.UUID    `json:"conversationIds"`
	MaxParticipants int            `json:"maxParticipants"`
	RecordingState  string         `json:"recordingState"`
	State           string         `json:"state"`
	Divisions       []struct {
		Division DomainEntityRef   `json:"division"`
		Entities []DomainEntityRef `json:"entities"`
	} `json:"divisions"`
	// contains filtered or unexported fields
}

Conversation contains the details of a live conversation

See: https://developer.mypurecloud.com/api/rest/v2/conversations

func (Conversation) Disconnect added in v0.7.12

func (conversation Conversation) Disconnect(context context.Context, identifiable Identifiable) error

Disconnect disconnect an Identifiable from this

implements Disconnecter

func (Conversation) GetID added in v0.1.0

func (conversation Conversation) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Conversation) GetURI added in v0.7.0

func (conversation Conversation) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*Conversation) Initialize added in v0.1.0

func (conversation *Conversation) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (Conversation) String added in v0.1.0

func (conversation Conversation) String() string

String gets a string version

implements the fmt.Stringer interface

func (Conversation) UpdateState added in v0.7.12

func (conversation Conversation) UpdateState(context context.Context, identifiable Identifiable, state string) error

UpdateState update the state of an identifiable in this

implements StateUpdater

type ConversationACDEndTopic added in v0.8.0

type ConversationACDEndTopic struct {
	ID             uuid.UUID
	Name           string
	Time           time.Time
	ConversationID uuid.UUID
	SessionID      uuid.UUID
	QueueID        uuid.UUID
	DivisionID     uuid.UUID
	CorrelationID  string
	DisconnectType string
	MediaType      string
	MessageType    string
	Provider       string
	Direction      string
	ANI            string
	DNIS           string
	AddressTo      string
	AddressFrom    string
	Subject        string
	ACDOutcome     string
	Participant    *Participant
	Targets        []Identifiable
}

ConversationACDEndTopic describes a Topic about a Conversation ACD End

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--acd-end

func (ConversationACDEndTopic) GetTargets added in v0.8.0

func (topic ConversationACDEndTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationACDEndTopic) GetType added in v0.8.0

func (topic ConversationACDEndTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationACDEndTopic) String added in v0.8.0

func (topic ConversationACDEndTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationACDEndTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationACDEndTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationACDEndTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationACDStartTopic added in v0.8.0

type ConversationACDStartTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	Participant    *Participant
	CorrelationID  string
	Targets        []Identifiable
}

ConversationACDStartTopic describes a Topic about a Conversation ACD Start

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--acd-start

func (ConversationACDStartTopic) GetTargets added in v0.8.0

func (topic ConversationACDStartTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationACDStartTopic) GetType added in v0.8.0

func (topic ConversationACDStartTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationACDStartTopic) String added in v0.8.0

func (topic ConversationACDStartTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationACDStartTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationACDStartTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationACDStartTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationACWTopic added in v0.8.0

type ConversationACWTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationACWTopic describes a Topic about a Conversation After Call Work

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--acw

func (ConversationACWTopic) GetTargets added in v0.8.0

func (topic ConversationACWTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationACWTopic) GetType added in v0.8.0

func (topic ConversationACWTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationACWTopic) String added in v0.8.0

func (topic ConversationACWTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationACWTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationACWTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationACWTopic) With added in v0.8.0

func (topic ConversationACWTopic) With(targets ...Identifiable) NotificationTopic

With creates a new NotificationTopic with the given targets

type ConversationAttributesTopic added in v0.8.0

type ConversationAttributesTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationAttributesTopic describes a Topic about a Conversation Attribute Update

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--attributes

func (ConversationAttributesTopic) GetTargets added in v0.8.0

func (topic ConversationAttributesTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationAttributesTopic) GetType added in v0.8.0

func (topic ConversationAttributesTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationAttributesTopic) String added in v0.8.0

func (topic ConversationAttributesTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationAttributesTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationAttributesTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationAttributesTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationCall added in v0.1.0

type ConversationCall struct {
	ID                uuid.UUID           `json:"id"`
	Self              *Address            `json:"self"`
	Direction         string              `json:"direction"` // inbound,outbound
	State             string              `json:"state"`     // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Muted             bool                `json:"muted"`
	Held              bool                `json:"held"`
	Confined          bool                `json:"confined"`
	Recording         bool                `json:"recording"`
	RecordingState    string              `json:"recodingState"` // none,active,paused
	RecordingID       string              `json:"recordingId"`
	Segments          []Segment           `json:"segments"`
	DocumentID        string              `json:"documentId"`
	Provider          string              `json:"provider"`
	ScriptID          string              `json:"scriptId"`
	PeerID            string              `json:"peerId"`
	UUIData           string              `json:"uuiData"`
	Other             *Address            `json:"other"`
	ConnectedTime     time.Time           `json:"connectedTime"`
	DisconnectedTime  time.Time           `json:"disconnectedTime"`
	StartAlertingTime time.Time           `json:"startAlertingTime"`
	StartHoldTime     time.Time           `json:"startHoldTime"`
	DisconnectType    string              `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
	DisconnectReasons []*DisconnectReason `json:"disconnectReasons"`
	FaxStatus         FaxStatus           `json:"faxStatus"`
	ErrorInfo         ErrorBody           `json:"errorInfo"`
}

ConversationCall describes a Call (like belonging to Participant)

type ConversationCallback added in v0.1.0

type ConversationCallback struct {
	ID        uuid.UUID `json:"id"`
	State     string    `json:"state"`     // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Direction string    `json:"direction"` // inbound,outbound
	Held      bool      `json:"held"`

	ConnectedTime     time.Time `json:"connectedTime"`
	DisconnectedTime  time.Time `json:"disconnectedTime"`
	StartAlertingTime time.Time `json:"startAlertingTime"`
	StartHoldTime     time.Time `json:"startHoldTime"`
	ScheduledTime     time.Time `json:"callbackScheduledTime"`

	DisconnectType string `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable

	Segments                  []Segment      `json:"segments"`
	Provider                  string         `json:"provider"`
	PeerID                    string         `json:"peerId"`
	DialerPreview             *DialerPreview `json:"dialerPreview"`
	Voicemail                 *Voicemail     `json:"voicemail"`
	CallbackNumbers           []string       `json:"callbackNumbers"`
	CallbackUserName          string         `json:"callbackUserName"`
	ScriptID                  string         `json:"scriptId"`
	AutomatedCallbackConfigID string         `json:"automatedCallbackConfigId"`
}

ConversationCallback describes a Callback (like belonging to Participant)

type ConversationChat added in v0.1.0

type ConversationChat struct {
	ID                uuid.UUID       `json:"id"`
	SelfURI           URI             `json:"selfUri,omitempty"`
	State             string          `json:"state"`          // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Direction         string          `json:"direction"`      // inbound,outbound
	DisconnectType    string          `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
	Held              bool            `json:"held"`
	ConnectedTime     time.Time       `json:"connectedTime"`
	DisconnectedTime  time.Time       `json:"disconnectedTime"`
	StartAlertingTime time.Time       `json:"startAlertingTime"`
	StartHoldTime     time.Time       `json:"startHoldTime"`
	Participants      []*Participant  `json:"participants"`
	Segments          []Segment       `json:"segments"`
	Provider          string          `json:"provider"`
	PeerID            string          `json:"peerId"`
	RoomID            string          `json:"roomId"`
	ScriptID          string          `json:"scriptId"`
	RecordingID       string          `json:"recordingId"`
	AvatarImageURL    *url.URL        `json:"-"`
	JourneyContext    *JourneyContext `json:"journeyContext"`
	// contains filtered or unexported fields
}

ConversationChat describes a Agent-side Chat

func (ConversationChat) Disconnect added in v0.1.0

func (conversation ConversationChat) Disconnect(context context.Context, identifiable Identifiable) error

Disconnect disconnect an Identifiable from this

implements Disconnecter

func (ConversationChat) GetID added in v0.1.0

func (conversation ConversationChat) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (ConversationChat) GetURI added in v0.7.0

func (conversation ConversationChat) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*ConversationChat) Initialize added in v0.1.0

func (conversation *ConversationChat) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (ConversationChat) Post added in v0.1.0

func (conversation ConversationChat) Post(context context.Context, member Identifiable, text string) error

Post sends a text message to a chat member

func (ConversationChat) SetTyping added in v0.1.0

func (conversation ConversationChat) SetTyping(context context.Context, member Identifiable) error

SetTyping send a typing indicator to the chat member

func (ConversationChat) String added in v0.1.0

func (conversation ConversationChat) String() string

String gets a string version

implements the fmt.Stringer interface

func (ConversationChat) Transfer added in v0.1.0

func (conversation ConversationChat) Transfer(context context.Context, identifiable Identifiable, queue Identifiable) error

Transfer transfers a participant of this Conversation to the given Queue

implement Transferrer

func (*ConversationChat) UnmarshalJSON added in v0.1.0

func (conversation *ConversationChat) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationChat) UpdateState added in v0.1.0

func (conversation ConversationChat) UpdateState(context context.Context, identifiable Identifiable, state string) error

UpdateState update the state of an identifiable in this

implements StateUpdater

func (ConversationChat) Wrapup added in v0.1.0

func (conversation ConversationChat) Wrapup(context context.Context, identifiable Identifiable, wrapup *Wrapup) error

Wrapup wraps up a Participant of this Conversation

type ConversationChatMemberTopic added in v0.8.0

type ConversationChatMemberTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	Member         *ChatMember
	Type           string // member-change
	TimeStamp      time.Time
	CorrelationID  string
	Targets        []Identifiable
}

ConversationGuestChatMemberTopic describes a Topic about User's Presence

func (ConversationChatMemberTopic) GetTargets added in v0.8.0

func (topic ConversationChatMemberTopic) GetTargets() []Identifiable

GetTargets returns the targets of this topic

func (ConversationChatMemberTopic) GetType added in v0.8.0

func (topic ConversationChatMemberTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationChatMemberTopic) String added in v0.8.0

func (topic ConversationChatMemberTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationChatMemberTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationChatMemberTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationChatMemberTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationChatMessageTopic added in v0.1.0

type ConversationChatMessageTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	Sender         *ChatMember
	Type           string // message, typing-indicator,
	Body           string
	BodyType       string // standard,
	TimeStamp      time.Time
	CorrelationID  string
	Targets        []Identifiable
}

ConversationChatMessageTopic describes a Topic about User's Presence

func (ConversationChatMessageTopic) GetTargets added in v0.8.0

func (topic ConversationChatMessageTopic) GetTargets() []Identifiable

GetTargets returns the targets of this topic

func (ConversationChatMessageTopic) GetType added in v0.8.0

func (topic ConversationChatMessageTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationChatMessageTopic) String added in v0.1.0

func (topic ConversationChatMessageTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (ConversationChatMessageTopic) TopicNameWith added in v0.8.0

func (topic ConversationChatMessageTopic) TopicNameWith(identifiables ...Identifiable) string

TopicNameWith builds the topicName for the given identifiables

func (*ConversationChatMessageTopic) UnmarshalJSON added in v0.1.0

func (topic *ConversationChatMessageTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationChatMessageTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationContactTopic added in v0.8.0

type ConversationContactTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationContactTopic describes a Topic about a Conversation Contact Update

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--contact

func (ConversationContactTopic) GetTargets added in v0.8.0

func (topic ConversationContactTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationContactTopic) GetType added in v0.8.0

func (topic ConversationContactTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationContactTopic) String added in v0.8.0

func (topic ConversationContactTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationContactTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationContactTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationContactTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationCustomerEndTopic added in v0.8.0

type ConversationCustomerEndTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationCustomerEndTopic describes a Topic about a Conversation Customer End

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--customer-end

func (ConversationCustomerEndTopic) GetTargets added in v0.8.0

func (topic ConversationCustomerEndTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationCustomerEndTopic) GetType added in v0.8.0

func (topic ConversationCustomerEndTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationCustomerEndTopic) String added in v0.8.0

func (topic ConversationCustomerEndTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationCustomerEndTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationCustomerEndTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationCustomerEndTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationCustomerStartTopic added in v0.8.0

type ConversationCustomerStartTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationCustomerStartTopic describes a Topic about a Conversation Customer Start

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--customer-start

func (ConversationCustomerStartTopic) GetTargets added in v0.8.0

func (topic ConversationCustomerStartTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationCustomerStartTopic) GetType added in v0.8.0

func (topic ConversationCustomerStartTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationCustomerStartTopic) String added in v0.8.0

func (topic ConversationCustomerStartTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationCustomerStartTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationCustomerStartTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationCustomerStartTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationEmail added in v0.1.0

type ConversationEmail struct {
	ID                uuid.UUID     `json:"id"`
	State             string        `json:"state"`     // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Direction         string        `json:"direction"` // inbound,outbound
	Held              bool          `json:"held"`
	ConnectedTime     time.Time     `json:"connectedTime"`
	DisconnectedTime  time.Time     `json:"disconnectedTime"`
	StartAlertingTime time.Time     `json:"startAlertingTime"`
	StartHoldTime     time.Time     `json:"startHoldTime"`
	Segments          []Segment     `json:"segments"`
	Provider          string        `json:"provider"`
	ScriptID          string        `json:"scriptId"`
	PeerID            string        `json:"peerId"`
	RecordingID       string        `json:"recordingId"`
	AutoGenerated     bool          `json:"autoGenerated"`
	Subject           string        `json:"subject"`
	MessagesSent      int           `json:"messagesSent"`
	MessageID         string        `json:"messageId"`
	Spam              bool          `json:"spam"`
	DraftAttachments  []*Attachment `json:"draftAttachments"`
	DisconnectType    string        `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
	ErrorInfo         ErrorBody     `json:"errorInfo"`
}

ConversationEmail describes an Email (like belonging to Participant)

type ConversationFlowEndTopic added in v0.8.0

type ConversationFlowEndTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationFlowEndTopic describes a Topic about a Conversation Flow End

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--flow-end

func (ConversationFlowEndTopic) GetTargets added in v0.8.0

func (topic ConversationFlowEndTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationFlowEndTopic) GetType added in v0.8.0

func (topic ConversationFlowEndTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationFlowEndTopic) String added in v0.8.0

func (topic ConversationFlowEndTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationFlowEndTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationFlowEndTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationFlowEndTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationFlowStartTopic added in v0.8.0

type ConversationFlowStartTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationFlowStartTopic describes a Topic about a Conversation Flow Start

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--flow-start

func (ConversationFlowStartTopic) GetTargets added in v0.8.0

func (topic ConversationFlowStartTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationFlowStartTopic) GetType added in v0.8.0

func (topic ConversationFlowStartTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationFlowStartTopic) String added in v0.8.0

func (topic ConversationFlowStartTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationFlowStartTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationFlowStartTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationFlowStartTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationGuestChat added in v0.1.0

type ConversationGuestChat struct {
	ID            uuid.UUID                 `json:"id"`
	SelfURI       URI                       `json:"selfUri,omitempty"`
	Target        *RoutingTarget            `json:"-"`
	Guest         *ChatMember               `json:"member,omitempty"`
	Members       map[uuid.UUID]*ChatMember `json:"-"`
	JWT           string                    `json:"jwt,omitempty"`
	EventStream   string                    `json:"eventStreamUri,omitempty"`
	Socket        *websocket.Conn           `json:"-"`
	TopicReceived chan NotificationTopic    `json:"-"`
	LogHeartbeat  bool                      `json:"logHeartbeat"`
	// contains filtered or unexported fields
}

ConversationGuestChat describes a Guest Chat

func (*ConversationGuestChat) Close added in v0.1.0

func (conversation *ConversationGuestChat) Close(context context.Context) (err error)

Close disconnects the websocket and the guest

func (*ConversationGuestChat) Connect added in v0.1.0

func (conversation *ConversationGuestChat) Connect(context context.Context) (err error)

Connect connects a Guest Chat to its websocket and starts its message loop

If the websocket was already connected, nothing happens
If the environment variable PURECLOUD_LOG_HEARTBEAT is set to true, the Heartbeat topic will be logged

func (ConversationGuestChat) GetID added in v0.1.0

func (conversation ConversationGuestChat) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (*ConversationGuestChat) GetMember added in v0.1.0

func (conversation *ConversationGuestChat) GetMember(context context.Context, identifiable Identifiable) (*ChatMember, error)

GetMember fetches the given member of this Conversation (caches the member)

func (ConversationGuestChat) GetURI added in v0.7.0

func (conversation ConversationGuestChat) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*ConversationGuestChat) Initialize added in v0.1.0

func (conversation *ConversationGuestChat) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (*ConversationGuestChat) SendMessage added in v0.1.0

func (conversation *ConversationGuestChat) SendMessage(context context.Context, text string) (err error)

SendMessage sends a message as the chat guest

func (*ConversationGuestChat) SendNotice added in v0.1.0

func (conversation *ConversationGuestChat) SendNotice(context context.Context, text string) (err error)

SendNotice sends a notice as the chat guest

func (*ConversationGuestChat) SendTyping added in v0.1.0

func (conversation *ConversationGuestChat) SendTyping(context context.Context) (err error)

SendTyping sends a typing indicator to Gcloud as the chat guest

func (*ConversationGuestChat) Start added in v0.7.15

func (conversation *ConversationGuestChat) Start(ctx context.Context, guest *ChatMember, target *RoutingTarget) error

Start starts a Conversation Guest Chat

func (ConversationGuestChat) String added in v0.1.0

func (conversation ConversationGuestChat) String() string

String gets a string version

implements the fmt.Stringer interface

type ConversationMessage added in v0.1.0

type ConversationMessage struct {
	ID        uuid.UUID `json:"id"`
	Type      string    `json:"type"`
	Direction string    `json:"direction"` // inbound,outbound
	State     string    `json:"state"`     // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Held      bool      `json:"held"`

	RecordingID string `json:"recordingId,omitempty"`

	Segments         []Segment `json:"segments"`
	Provider         string    `json:"provider"`
	ScriptID         string    `json:"scriptId,omitempty"`
	PeerID           uuid.UUID `json:"peerId"`
	RecipientCountry string    `json:"recipientCountry,omitempty"`
	ToAddress        Address   `json:"toAddress"`
	FromAddress      Address   `json:"fromAddress"`

	ConnectedTime     time.Time `json:"connectedTime"`
	DisconnectedTime  time.Time `json:"disconnectedTime"`
	StartAlertingTime time.Time `json:"startAlertingTime"`
	StartHoldTime     time.Time `json:"startHoldTime"`

	Messages []MessageDetails `json:"messages"`

	DisconnectType string    `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
	ErrorInfo      ErrorBody `json:"errorInfo"`
}

ConversationMessage describes a Message (like belonging to Participant)

type ConversationOutboundTopic added in v0.8.0

type ConversationOutboundTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationOutboundTopic describes a Topic about a Conversation Outbound Initialized

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--outbound

func (ConversationOutboundTopic) GetTargets added in v0.8.0

func (topic ConversationOutboundTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationOutboundTopic) GetType added in v0.8.0

func (topic ConversationOutboundTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationOutboundTopic) String added in v0.8.0

func (topic ConversationOutboundTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationOutboundTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationOutboundTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationOutboundTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationRoutingData added in v0.1.0

type ConversationRoutingData struct {
	Queue        AddressableEntityRef   `json:"queue"`
	Language     AddressableEntityRef   `json:"language"`
	Priority     int                    `json:"priority"`
	Skills       []AddressableEntityRef `json:"skills"`
	ScoredAgents []struct {
		Agent AddressableEntityRef `json:"agent"`
		Score int                  `json:"score"`
	} `json:"scoredAgents"`
}

ConversationRoutingData defines routing details of a Conversation

type ConversationUserEndTopic added in v0.8.0

type ConversationUserEndTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationUserEndTopic describes a Topic about a Conversation User End

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--user-end

func (ConversationUserEndTopic) GetTargets added in v0.8.0

func (topic ConversationUserEndTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationUserEndTopic) GetType added in v0.8.0

func (topic ConversationUserEndTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationUserEndTopic) String added in v0.8.0

func (topic ConversationUserEndTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationUserEndTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationUserEndTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationUserEndTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationUserStartTopic added in v0.8.0

type ConversationUserStartTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationUserStartTopic describes a Topic about a Conversation User Start

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--user-start

func (ConversationUserStartTopic) GetTargets added in v0.8.0

func (topic ConversationUserStartTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationUserStartTopic) GetType added in v0.8.0

func (topic ConversationUserStartTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationUserStartTopic) String added in v0.8.0

func (topic ConversationUserStartTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationUserStartTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationUserStartTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationUserStartTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationVideo added in v0.1.0

type ConversationVideo struct {
	ID    uuid.UUID `json:"id"`
	Self  Address   `json:"self"`
	State string    `json:"state"` // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none

	Segments      []Segment `json:"segments"`
	Provider      string    `json:"provider"`
	PeerID        string    `json:"peerId"`
	PeerCount     int       `json:"peerCount"`
	Context       string    `json:"context"`
	AudioMuted    bool      `json:"audioMuted"`
	VideoMuted    bool      `json:"videoMuted"`
	SharingScreen bool      `json:"sharingScreen"`
	MSIDs         []string  `json:"msids"`

	ConnectedTime     time.Time `json:"connectedTime"`
	DisconnectedTime  time.Time `json:"disconnectedTime"`
	StartAlertingTime time.Time `json:"startAlertingTime"`

	DisconnectType string `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
}

ConversationVideo describes a Video (like belonging to Participant)

type ConversationVoicemailEndTopic added in v0.8.0

type ConversationVoicemailEndTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationVoicemailEndTopic describes a Topic about a Conversation Voicemail End

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--voicemail-end

func (ConversationVoicemailEndTopic) GetTargets added in v0.8.0

func (topic ConversationVoicemailEndTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationVoicemailEndTopic) GetType added in v0.8.0

func (topic ConversationVoicemailEndTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationVoicemailEndTopic) String added in v0.8.0

func (topic ConversationVoicemailEndTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationVoicemailEndTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationVoicemailEndTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationVoicemailEndTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationVoicemailStartTopic added in v0.8.0

type ConversationVoicemailStartTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationVoicemailStartTopic describes a Topic about a Conversation Voicemail Start

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--voicemail-start

func (ConversationVoicemailStartTopic) GetTargets added in v0.8.0

func (topic ConversationVoicemailStartTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationVoicemailStartTopic) GetType added in v0.8.0

func (topic ConversationVoicemailStartTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationVoicemailStartTopic) String added in v0.8.0

func (topic ConversationVoicemailStartTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationVoicemailStartTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationVoicemailStartTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationVoicemailStartTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type ConversationWrapupTopic added in v0.8.0

type ConversationWrapupTopic struct {
	ID             uuid.UUID
	Name           string
	ConversationID uuid.UUID
	CorrelationID  string
	Targets        []Identifiable
}

ConversationWrapupTopic describes a Topic about a Conversation Wrapup

See: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--wrapup

func (ConversationWrapupTopic) GetTargets added in v0.8.0

func (topic ConversationWrapupTopic) GetTargets() []Identifiable

GetTargets returns the targets

func (ConversationWrapupTopic) GetType added in v0.8.0

func (topic ConversationWrapupTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (ConversationWrapupTopic) String added in v0.8.0

func (topic ConversationWrapupTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ConversationWrapupTopic) UnmarshalJSON added in v0.8.0

func (topic *ConversationWrapupTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (ConversationWrapupTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type DataTable added in v0.8.0

type DataTable struct {
	ID          uuid.UUID        `json:"id"`
	Name        string           `json:"name"`
	Description string           `json:"description,omitempty"`
	Division    *Division        `json:"division,omitempty"`
	Schema      *DataTableSchema `json:"schema,omitempty"`
	// contains filtered or unexported fields
}

DataTable describes Data tables used by Architect

See: https://developer.genesys.cloud/routing/architect/flows

func (DataTable) AddRow added in v0.8.0

func (table DataTable) AddRow(context context.Context, key string, row DataTableRow) (err error)

AddRow adds a row to this table

func (DataTable) DeleteRow added in v0.8.0

func (table DataTable) DeleteRow(context context.Context, key string) error

DeleteRow deletes a row from this table

func (DataTable) GetID added in v0.8.0

func (table DataTable) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (DataTable) GetRow added in v0.8.0

func (table DataTable) GetRow(context context.Context, key string) (row DataTableRow, err error)

GetRow gets a row from this table

func (DataTable) GetRows added in v0.8.0

func (table DataTable) GetRows(context context.Context) (rows []DataTableRow, err error)

GetRows gets the rows of this table

func (DataTable) GetURI added in v0.8.0

func (table DataTable) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*DataTable) Initialize added in v0.8.0

func (table *DataTable) Initialize(parameters ...interface{})

Initialize initializes the object

implements Initializable

func (DataTable) MarshalJSON added in v0.8.0

func (table DataTable) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

implements json.Marshaler

func (DataTable) String added in v0.8.0

func (table DataTable) String() string

String gets a string representation of this

implements fmt.Stringer

func (DataTable) UpdateRow added in v0.8.0

func (table DataTable) UpdateRow(context context.Context, key string, row DataTableRow) (err error)

UpdateRow updates a row to this table

type DataTableRow added in v0.8.0

type DataTableRow map[string]interface{}

DataTableRow describes a row in a Data Table

type DataTableSchema added in v0.8.0

type DataTableSchema struct {
	Schema               string                             `json:"$schema"`
	Type                 string                             `json:"type"`
	Title                string                             `json:"title"`
	Description          string                             `json:"description,omitempty"`
	DataTableID          uuid.UUID                          `json:"datatableId"`
	Required             []string                           `json:"required"`
	Properties           map[string]DataTableSchemaProperty `json:"properties"`
	AdditionalProperties interface{}                        `json:"additionalProperties"`
}

type DataTableSchemaProperty added in v0.8.0

type DataTableSchemaProperty struct {
	Type      string `json:"type"`
	Title     string `json:"title"`
	ID        string `json:"$id"`
	Order     string `json:"displayOrder"`
	MinLength int    `json:"minLength"`
	MaxLength int    `json:"maxLength"`
}

type DialerPreview added in v0.1.0

type DialerPreview struct {
	ID                 uuid.UUID `json:"id"`
	ContactID          uuid.UUID `json:"contactId"`
	ContactListID      uuid.UUID `json:"contactListId"`
	CampaignID         uuid.UUID `json:"campaignId"`
	PhoneNumberColumns []struct {
		Type       string `json:"type"`
		ColumnName string `json:"columnName"`
	} `json:"phoneNumberColumns"`
}

DialerPreview describes a Diapler Preview

type DisconnectReason added in v0.1.0

type DisconnectReason struct {
	Type   string `json:"type"`
	Code   string `json:"code"`
	Phrase string `json:"phrase"`
}

DisconnectReason describes the reason of a disconnect

type Disconnecter added in v0.1.0

type Disconnecter interface {
	Disconnect(context context.Context, identifiable Identifiable) error
}

Disconnecter describes objects that can disconnect an Identifiable from themselves

type Division added in v0.1.0

type Division struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	SelfURI URI       `json:"selfUri"`
}

Division describes an Authorization Division

func (Division) GetID added in v0.1.0

func (division Division) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Division) GetURI added in v0.7.0

func (division Division) GetURI() URI

GetURI gets the URI of this

implements Addressable

func (Division) String added in v0.1.0

func (division Division) String() string

String gets a string version

implements the fmt.Stringer interface

type DomainEntityListingEvaluationForm added in v0.1.0

type DomainEntityListingEvaluationForm struct {
	Entities    []*EvaluationForm `json:"entities"`
	Total       int               `json:"total"`
	PageSize    int               `json:"pageSize"`
	PageNumber  int               `json:"pageNumber"`
	PageCount   int               `json:"pageCount"`
	FirstUri    string            `json:"firstUri"`
	SelfUri     string            `json:"selfUri"`
	PreviousUri string            `json:"previousUri"`
	NextUri     string            `json:"nextUri"`
	LastUri     string            `json:"lastUri"`
}

DomainEntityListingEvaluationForm describes ...

type DomainEntityRef added in v0.1.0

type DomainEntityRef struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name,omitempty"`
	SelfURI URI       `json:"selfUri,omitempty"`
}

DomainEntityRef describes a DomainEntity Reference

func (DomainEntityRef) GetID added in v0.1.0

func (ref DomainEntityRef) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (DomainEntityRef) GetURI added in v0.1.0

func (ref DomainEntityRef) GetURI() URI

GetURI gets the URI of this

implements Addressable

type DomainRole added in v0.1.0

type DomainRole struct {
	// TODO: Find out what should be here!
	ID      uuid.UUID `json:"id"`
	SelfURI URI       `json:"selfUri,omitempty"`
}

DomainRole describes a Role in a Domain

func (DomainRole) GetID added in v0.7.0

func (role DomainRole) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (DomainRole) GetURI added in v0.7.0

func (role DomainRole) GetURI() URI

GetURI gets the URI of this

implements Addressable

type EmployerInfo added in v0.1.0

type EmployerInfo struct {
	OfficialName string `json:"officialName"`
	EmployeeID   string `json:"employeeId"`
	EmployeeType string `json:"employeeType"`
	HiredSince   string `json:"dateHire"`
}

EmployerInfo describes Employer Information

func (EmployerInfo) String added in v0.1.0

func (info EmployerInfo) String() string

String gets a string version

implements the fmt.Stringer interface

type Entities added in v0.7.15

type Entities struct {
	Entities   [][]byte `json:"-"`
	PageSize   int64    `json:"pageSize"`
	PageNumber int64    `json:"pageNumber"`
	PageCount  uint64   `json:"pageCount"`
	PageTotal  uint64   `json:"total"`
	FirstURI   string   `json:"firstUri"`
	SelfURI    string   `json:"selfUri"`
	LastURI    string   `json:"lastUri"`
}

func (*Entities) UnmarshalJSON added in v0.7.15

func (entities *Entities) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type EntityRef added in v0.1.0

type EntityRef struct {
	ID uuid.UUID `json:"id"`
}

EntityRef describes an Entity that has an ID

func (EntityRef) GetID added in v0.1.0

func (ref EntityRef) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

type ErrorBody added in v0.1.0

type ErrorBody struct {
	Status            int               `json:"status"`
	Code              string            `json:"code"`
	EntityID          string            `json:"entityId"`
	EntityName        string            `json:"entityName"`
	Message           string            `json:"message"`
	MessageWithParams string            `json:"messageWithParams"`
	MessageParams     map[string]string `json:"messageParams"`
	ContextID         string            `json:"contextId"`
	Details           []ErrorDetail     `json:"details"`
	Errors            []*ErrorBody      `json:"errors"`
}

ErrorBody describes errors in PureCloud objects

func (ErrorBody) Error added in v0.1.0

func (err ErrorBody) Error() string

Error returns a string representation of this error

type ErrorDetail added in v0.1.0

type ErrorDetail struct {
	ErrorCode  string `json:"errorCode"`
	Fieldname  string `json:"fieldName"`
	EntityID   string `json:"entityId"`
	EntityName string `json:"entityName"`
}

ErrorDetail describes the details of an error

type Evaluation added in v0.1.0

type Evaluation struct {
	ID             uuid.UUID             `json:"id"`
	Name           string                `json:"name"`
	Status         string                `json:"status"`
	Queue          *Queue                `json:"queue"`
	Conversation   *Conversation         `json:"conversation"`
	EvaluationForm *EvaluationForm       `json:"evaluationForm"`
	Evaluator      *User                 `json:"evaluator"`
	Agent          *User                 `json:"agent"`
	Calibration    *Calibration          `json:"calibration"`
	Answers        *EvaluationScoringSet `json:"answers"`
	AgentHasRead   bool                  `json:"agentHasRead"`
	ReleaseDate    time.Time             `json:"releaseDate"`
	AssignedDate   time.Time             `json:"assignedDate"`
	ChangedDate    time.Time             `json:"changedDate"`
}

Evaluation describes an Evaluation (like belonging to Participant)

func (Evaluation) GetID added in v0.1.0

func (evaluation Evaluation) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Evaluation) String added in v0.1.0

func (evaluation Evaluation) String() string

String gets a string version

implements the fmt.Stringer interface

type EvaluationForm added in v0.1.0

type EvaluationForm struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	SelfURI URI       `json:"selfUri"`

	ModifiedDate time.Time `json:"modifiedDate"`
	Published    bool      `json:"published"`
	ContextID    string    `json:"contextId"`

	QuestionGroups    []EvaluationQuestionGroup         `json:"questionGroups"`
	PublishedVersions DomainEntityListingEvaluationForm `json:"publishedVersions"`
}

EvaluationForm describes an Evaluation Form

func (EvaluationForm) GetID added in v0.7.0

func (form EvaluationForm) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (EvaluationForm) GetURI added in v0.7.0

func (form EvaluationForm) GetURI() URI

GetURI gets the URI of this

implements Addressable

func (EvaluationForm) String added in v0.7.0

func (form EvaluationForm) String() string

String gets a string version

implements the fmt.Stringer interface

type EvaluationQuestion added in v0.1.0

type EvaluationQuestion struct {
	ID                  uuid.UUID            `json:"id"`
	Type                string               `json:"type"`
	Text                string               `json:"text"`
	HelpText            string               `json:"helpText"`
	NAEnabled           bool                 `json:"naEnabled"`
	CommentsRequired    bool                 `json:"commentsRequired"`
	IsKill              bool                 `json:"isKill"`
	IsCritical          bool                 `json:"isCritical"`
	VisibilityCondition *VisibilityCondition `json:"visibilityCondition"`
	AnswerOptions       []*AnswerOption      `json:"answerOptions"`
}

EvaluationQuestion describe an Evaluation Question

func (EvaluationQuestion) GetID added in v0.7.0

func (question EvaluationQuestion) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (EvaluationQuestion) String added in v0.7.0

func (question EvaluationQuestion) String() string

String gets a string version

implements the fmt.Stringer interface

type EvaluationQuestionGroup added in v0.1.0

type EvaluationQuestionGroup struct {
	ID                      uuid.UUID             `json:"id"`
	Name                    string                `json:"name"`
	Type                    string                `json:"type"`
	DefaultAnswersToHighest bool                  `json:"defaultAnswersToHighest"`
	DefaultAnswersToNA      bool                  `json:"defaultAnswersToNA"`
	NAEnabled               bool                  `json:"naEnabled"`
	Weight                  float64               `json:"weight"`
	ManualWeight            bool                  `json:"manualWeight"`
	Questions               []*EvaluationQuestion `json:"questions"`
	VisibilityCondition     *VisibilityCondition  `json:"visibilityCondition"`
}

EvaluationQuestionGroup describes a Group of Evaluation Questions

func (EvaluationQuestionGroup) GetID added in v0.7.0

func (group EvaluationQuestionGroup) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (EvaluationQuestionGroup) String added in v0.7.0

func (group EvaluationQuestionGroup) String() string

String gets a string version

implements the fmt.Stringer interface

type EvaluationScoringSet added in v0.1.0

type EvaluationScoringSet struct {
	TotalScore         float64 `json:"totalScore"`
	TotalCriticalScore float64 `json:"totalCriticalScore"`
}

EvaluationScoringSet describes an Evaluation Scoring Set

type FaxStatus added in v0.1.0

type FaxStatus struct {
	Direction        string `json:"direction"` // inbound,outbound
	ActivePage       int    `json:"activePage"`
	ExpectedPages    int    `json:"expectedPages"`
	LinesTransmitted int    `json:"linesTransmitted"`
	BytesTransmitted int    `json:"bytesTransmitted"`
	BaudRate         int    `json:"baudRate"`
	PageErrors       int    `json:"pageErrors"`
	LineErrors       int    `json:"lineErrors"`
}

FaxStatus describes a FAX status

type Fetchable added in v0.7.0

type Fetchable interface {
	Identifiable
	Addressable
}

Fetchable describes things that can be fetched from the Genesys Cloud API

type Flow added in v0.7.15

type Flow struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description,omitempty"`
	Division    *Division `json:"division,omitempty"`
	IsActive    bool      `json:"active"`
	IsSystem    bool      `json:"system"`
	IsDeleted   bool      `json:"deleted"`
}

func (Flow) GetID added in v0.7.15

func (flow Flow) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Flow) GetURI added in v0.7.15

func (flow Flow) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*Flow) Initialize added in v0.7.15

func (flow *Flow) Initialize(parameters ...interface{})

Initialize initializes the object

implements Initializable

func (Flow) MarshalJSON added in v0.7.15

func (flow Flow) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

implements json.Marshaler

func (Flow) String added in v0.7.15

func (flow Flow) String() string

String gets a string representation of this

implements fmt.Stringer

type GeoLocation added in v0.1.0

type GeoLocation struct {
	ID        string                `json:"id"`
	SelfURI   URI                   `json:"selfUri"`
	Name      string                `json:"name"`
	Locations []*LocationDefinition `json:"locations"`
}

GeoLocation describes a location with coordinates

type Group added in v0.1.0

type Group struct {
	ID           uuid.UUID    `json:"id"`
	SelfURI      URI          `json:"selfUri"`
	Name         string       `json:"name"`
	Type         string       `json:"type"`
	Description  string       `json:"description"`
	State        string       `json:"state"`
	MemberCount  int          `json:"memberCount"`
	Owners       []*User      `json:"owners"`
	Images       []*UserImage `json:"images"`
	Addresses    []*Contact   `json:"addresses"`
	RulesVisible bool         `json:"rulesVisible"`
	Visibility   string       `json:"visibility"`
	DateModified time.Time    `json:"dateModified"`
	Version      int          `json:"version"`
	// contains filtered or unexported fields
}

Group describe a Group of users

func (Group) GetID added in v0.1.0

func (group Group) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Group) GetURI added in v0.7.0

func (group Group) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*Group) Initialize added in v0.1.0

func (group *Group) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (Group) String added in v0.1.0

func (group Group) String() string

String gets a string version

implements the fmt.Stringer interface

type Identifiable added in v0.1.0

type Identifiable interface {
	core.Identifiable
}

Identifiable describes that can get their Identifier as a UUID

type Initializable added in v0.1.0

type Initializable interface {
	Initialize(parameters ...interface{})
}

Initializable describes things that can be initialized

type Jabber added in v0.4.0

type Jabber struct {
	ID string `json:"jabberId"`
}

Jabber describe a Jabber ID for chats

type JourneyContext added in v0.1.0

type JourneyContext struct {
	Customer struct {
		ID     uuid.UUID `json:"id"`
		IDType string    `json:"idType"`
	} `json:"customer"`
	CustomerSession struct {
		ID   uuid.UUID `json:"id"`
		Type string    `json:"type"`
	} `json:"customerSession"`
	TriggeringAction struct {
		ID        uuid.UUID `json:"id"`
		ActionMap struct {
			ID      uuid.UUID `json:"id"`
			Version int       `json:"version"`
		} `json:"actionMap"`
	} `json:"triggeringAction"`
}

JourneyContext describes a Journey Context

type Location added in v0.1.0

type Location struct {
	ID                 string              `json:"id"`
	FloorplanID        string              `json:"floorplanId"`
	Coordinates        map[string]float64  `json:"coordinates"`
	Notes              string              `json:"notes"`
	LocationDefinition *LocationDefinition `json:"locationDefinition"`
}

Location describes a location in a building

type LocationAddress added in v0.1.0

type LocationAddress struct {
	Country     string `json:"country"`
	CountryName string `json:"countryName"`
	State       string `json:"State"`
	City        string `json:"City"`
	ZipCode     string `json:"zipcode"`
	Street1     string `json:"street1"`
	Street2     string `json:"street2"`
}

LocationAddress describes the address of a Location

type LocationDefinition added in v0.1.0

type LocationDefinition struct {
	ID              string                   `json:"id"`
	SelfURI         URI                      `json:"selfUri"`
	Name            string                   `json:"name"`
	ContactUser     *AddressableEntityRef    `json:"contactUser"`
	EmergencyNumber *LocationEmergencyNumber `json:"emergencyNumber"`
	Address         *LocationAddress         `json:"address"`
	AddressVerified bool                     `json:"addressVerified"`
	State           string                   `json:"state"`
	Notes           string                   `json:"notes"`
	Path            []string                 `json:"path"`
	ProfileImage    []*LocationImage         `json:"profileImage"`
	FloorplanImage  []*LocationImage         `json:"flooreImage"`
	Version         int                      `json:"version"`
}

LocationDefinition describes a location (office, etc)

func (LocationDefinition) GetID added in v0.1.0

func (location LocationDefinition) GetID() string

GetID gets the identifier of this

implements Identifiable

func (LocationDefinition) GetURI added in v0.7.0

func (location LocationDefinition) GetURI() URI

GetURI gets the URI of this

implements Addressable

func (LocationDefinition) String added in v0.1.0

func (location LocationDefinition) String() string

String gets a string version

implements the fmt.Stringer interface

type LocationEmergencyNumber added in v0.1.0

type LocationEmergencyNumber struct {
	Type   string `json:"type"` // default, elin
	Number string `json:"number"`
	E164   string `json:"e164"`
}

LocationEmergencyNumber describes a Location's Emergency Number

type LocationImage added in v0.1.0

type LocationImage struct {
	ImageURL   *url.URL `json:"-"`
	Resolution string   `json:"resolution"`
}

LocationImage describes the image of a Location

func (LocationImage) MarshalJSON added in v0.1.0

func (locationImage LocationImage) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*LocationImage) UnmarshalJSON added in v0.1.0

func (locationImage *LocationImage) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type MediaParticipantRequest added in v0.1.0

type MediaParticipantRequest struct {
	Wrapup        *Wrapup `json:"wrapup,omitempty"`
	State         string  `json:"state,omitempty"` // alerting, dialing, contacting, offering, connected, disconnected, terminated, converting, uploading, transmitting, none
	Recording     bool    `json:"recording,omitempty"`
	Muted         bool    `json:"muted,omitempty"`
	Confined      bool    `json:"confined,omitempty"`
	Held          bool    `json:"held,omitempty"`
	WrapupSkipped bool    `json:"wrapupSkipped,omitempty"`
}

MediaParticipantRequest describes a request Media Participant

type MediaSetting added in v0.1.0

type MediaSetting struct {
	AlertingTimeout time.Duration
	ServiceLevel    ServiceLevel
}

MediaSetting defines a media setting in a Queue

func (MediaSetting) MarshalJSON added in v0.1.0

func (setting MediaSetting) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*MediaSetting) UnmarshalJSON added in v0.1.0

func (setting *MediaSetting) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type MediaSettings added in v0.1.0

type MediaSettings map[string]MediaSetting

MediaSettings is a map of media names and settings

type MediaSummary added in v0.1.0

type MediaSummary struct {
	ContactCenter MediaSummaryDetail `json:"contactCenter"`
	Enterprise    MediaSummaryDetail `json:"enterprise"`
}

MediaSummary describes a Media summary

type MediaSummaryDetail added in v0.1.0

type MediaSummaryDetail struct {
	Active int `json:"active"`
	ACW    int `json:"acw"`
}

MediaSummaryDetail describes the details about a MediaSummary

type MessageDetails added in v0.7.12

type MessageDetails struct {
	ID           string           `json:"messageId"`
	Status       string           `json:"messageStatus"`
	SegmentCount int              `json:"messageSegmentCount"`
	Time         time.Time        `json:"messageTime"`
	Media        []MessageMedia   `json:"media"`
	Stickers     []MessageSticker `json:"stickers"`
}

MessageDetails describes details of a Message in a Message Conversation

type MessageMedia added in v0.1.0

type MessageMedia struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	URL           string `json:"url"`
	MediaType     string `json:"mediaType"`
	ContentLength int64  `json:"contentLengthBytes"`
}

MessageMedia describes the Media of a Message

type MessageSticker added in v0.1.0

type MessageSticker struct {
	ID  string `json:"id"`
	URL string `json:"url"`
}

MessageSticker describes a Message Sticker

type MessagingTemplate added in v0.4.0

type MessagingTemplate struct {
	ResponseID string              `json:"responseId"`
	Parameters []TemplateParameter `json:"parameters"`
}

MessagingTemplate describes the Template to use (WhatsApp Template, for example)

type MetadataTopic added in v0.1.0

type MetadataTopic struct {
	Name    string
	Message string
}

MetadataTopic describes a Topic about the channel itself

func (MetadataTopic) GetTargets added in v0.8.0

func (topic MetadataTopic) GetTargets() []Identifiable

GetTargets returns the targets of this topic

func (MetadataTopic) GetType added in v0.8.0

func (topic MetadataTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (MetadataTopic) String added in v0.8.0

func (topic MetadataTopic) String() string

String gets a string version

implements fmt.Stringer

func (*MetadataTopic) UnmarshalJSON added in v0.1.0

func (topic *MetadataTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (MetadataTopic) With added in v0.8.0

func (topic MetadataTopic) With(targets ...Identifiable) NotificationTopic

With creates a new NotificationTopic with the given targets

type NotificationChannel added in v0.1.0

type NotificationChannel struct {
	ID            uuid.UUID              `json:"id"`
	ConnectURL    *url.URL               `json:"-"`
	ExpiresOn     time.Time              `json:"expires"`
	LogHeartbeat  bool                   `json:"logHeartbeat"`
	Logger        *logger.Logger         `json:"-"`
	Client        *Client                `json:"-"`
	Socket        *websocket.Conn        `json:"-"`
	TopicReceived chan NotificationTopic `json:"-"`
}

NotificationChannel defines a Notification Channel

See: https://developer.mypurecloud.com/api/rest/v2/notifications/notification_service.html

func (*NotificationChannel) Close added in v0.1.0

func (channel *NotificationChannel) Close(context context.Context) (err error)

Close unsubscribes from all subscriptions and closes the websocket

func (NotificationChannel) GetID added in v0.1.0

func (channel NotificationChannel) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (*NotificationChannel) GetTopicStates added in v0.8.0

func (channel *NotificationChannel) GetTopicStates(context context.Context) ([]NotificationChannelTopicState, error)

GetTopicStates gets all subscription topics set on this

func (*NotificationChannel) IsSubscribed added in v0.1.0

func (channel *NotificationChannel) IsSubscribed(context context.Context, topic NotificationTopic) bool

IsSubscribed tells if the channel is subscribed to the given topic

func (NotificationChannel) MarshalJSON added in v0.1.0

func (channel NotificationChannel) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*NotificationChannel) SetTopics added in v0.1.0

func (channel *NotificationChannel) SetTopics(context context.Context, topics ...NotificationTopic) ([]NotificationChannelTopicState, error)

SetTopics sets the subscriptions. It overrides any previous subscriptions

func (NotificationChannel) String added in v0.1.0

func (channel NotificationChannel) String() string

String gets a string version

implements the fmt.Stringer interface

func (*NotificationChannel) Subscribe added in v0.1.0

func (channel *NotificationChannel) Subscribe(context context.Context, topics ...NotificationTopic) ([]NotificationChannelTopicState, error)

Subscribe subscribes to a list of topics in the NotificationChannel

func (*NotificationChannel) UnmarshalJSON added in v0.1.0

func (channel *NotificationChannel) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (*NotificationChannel) Unsubscribe added in v0.1.0

func (channel *NotificationChannel) Unsubscribe(context context.Context, topics ...NotificationTopic) error

Unsubscribe unsubscribes from some topics,

If there is no argument, unsubscribe from all topics

type NotificationChannelTopicState added in v0.8.0

type NotificationChannelTopicState struct {
	Topic        NotificationTopic `json:"-"`
	State        string            `json:"state,omitempty"`
	RejectReason string            `json:"rejectReason,omitempty"`
	SelfURI      URI               `json:"selfUri,omitempty"`
}

NotificationChannelTopicState describes a Topic subscription channel

See https://developer.genesys.cloud/api/rest/v2/notifications/notification_service#topic-subscriptions

func (NotificationChannelTopicState) Contains added in v0.8.0

Contains tells if this contains the given topic

func (NotificationChannelTopicState) GetURI added in v0.8.0

func (state NotificationChannelTopicState) GetURI() URI

GetURI gets the URI of this

implements Addressable

func (NotificationChannelTopicState) MarshalJSON added in v0.8.0

func (state NotificationChannelTopicState) MarshalJSON() ([]byte, error)

MarshalJSON marshals into JSON

implements json.Marshaler

func (*NotificationChannelTopicState) UnmarshalJSON added in v0.8.0

func (state *NotificationChannelTopicState) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals from JSON

implements json.Unmarshaler

type NotificationTopic added in v0.1.0

type NotificationTopic interface {
	core.TypeCarrier
	fmt.Stringer

	// With creates a new NotificationTopic with the given targets
	With(targets ...Identifiable) NotificationTopic

	// GetTargets gets the targets of this topic
	GetTargets() []Identifiable
}

NotificationTopic describes a Notification Topic received on a WebSocket

func NotificationTopicFrom added in v0.8.0

func NotificationTopicFrom(topicName string) (NotificationTopic, error)

NotificationTopicFrom builds a NotificationTopic from the given topicName

func UnmarshalNotificationTopic added in v0.8.0

func UnmarshalNotificationTopic(payload []byte) (NotificationTopic, error)

UnmarshalNotificationTopic Unmarshal JSON into a NotificationTopic

The result is a NotificationTopic that can be casted into the appropriate type

type NotificationTopicDefinition added in v0.1.0

type NotificationTopicDefinition struct {
	ID          string                 `json:"id"`
	Description string                 `json:"description"`
	Permissions []string               `json:"requiresPermissions"`
	Schema      map[string]interface{} `json:"schema"`
}

NotificationTopicDefinition defines a Notification Topic that can subscribed to

type OpenMessage added in v0.4.0

type OpenMessage interface {
	GetID() string
	core.TypeCarrier
}

func UnmarshalOpenMessage added in v0.7.0

func UnmarshalOpenMessage(payload []byte) (OpenMessage, error)

type OpenMessageAttachment added in v0.4.0

type OpenMessageAttachment struct {
	ID       string   `json:"id,omitempty"`
	Type     string   `json:"mediaType"`
	URL      *url.URL `json:"-"`
	Mime     string   `json:"mime,omitempty"`
	Filename string   `json:"filename,omitempty"`
	Length   uint64   `json:"contentSizeBytes,omitempty"`
	Text     string   `json:"text,omitempty"`
	Hash     string   `json:"sha256,omitempty"`
}

func (OpenMessageAttachment) MarshalJSON added in v0.4.0

func (attachment OpenMessageAttachment) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*OpenMessageAttachment) UnmarshalJSON added in v0.4.0

func (attachment *OpenMessageAttachment) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (OpenMessageAttachment) WithContent added in v0.7.12

func (attachment OpenMessageAttachment) WithContent(content *request.Content) *OpenMessageAttachment

type OpenMessageChannel added in v0.4.0

type OpenMessageChannel struct {
	ID        uuid.UUID                   `json:"id,omitempty"`
	Platform  string                      `json:"platform"` // Open
	Type      string                      `json:"type"`     // Private, Public
	MessageID string                      `json:"messageId,omitempty"`
	Time      time.Time                   `json:"-"`
	To        *OpenMessageTo              `json:"to,omitempty"`
	From      *OpenMessageFrom            `json:"from"`
	Metadata  *OpenMessageChannelMetadata `json:"metadata,omitempty"`
}

func NewOpenMessageChannel added in v0.4.0

func NewOpenMessageChannel(messageID string, to *OpenMessageTo, from *OpenMessageFrom) *OpenMessageChannel

func (OpenMessageChannel) MarshalJSON added in v0.4.0

func (channel OpenMessageChannel) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (OpenMessageChannel) Redact added in v0.5.0

func (channel OpenMessageChannel) Redact() interface{}

Redact redacts sensitive data

implements logger.Redactable

func (*OpenMessageChannel) UnmarshalJSON added in v0.4.0

func (channel *OpenMessageChannel) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (OpenMessageChannel) WithAttributes added in v0.7.9

func (channel OpenMessageChannel) WithAttributes(attributes map[string]string) *OpenMessageChannel

type OpenMessageChannelMetadata added in v0.7.0

type OpenMessageChannelMetadata struct {
	Attributes map[string]string `json:"customAttributes,omitempty"`
}

type OpenMessageContent added in v0.4.0

type OpenMessageContent struct {
	Type       string                 `json:"contentType"` // Attachment, Location, QuickReply, ButtonResponse, Notification, GenericTemplate, ListTemplate, Postback, Reactions, Mention
	Template   *OpenMessageTemplate   `json:"template,omitempty"`
	Attachment *OpenMessageAttachment `json:"attachment,omitempty"`
}

func (*OpenMessageContent) UnmarshalJSON added in v0.4.0

func (content *OpenMessageContent) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type OpenMessageData added in v0.7.3

type OpenMessageData struct {
	ID                string       `json:"id,omitempty"` // Can be anything
	Name              string       `json:"name,omitempty"`
	ProviderMessageID string       `json:"providerMessageId,omitempty"`
	Timestamp         time.Time    `json:"-"`
	From              string       `json:"fromAddress,omitempty"`
	To                string       `json:"toAddress,omitempty"`
	Direction         string       `json:"direction"`     // inbound or outbound
	MessengerType     string       `json:"messengerType"` // sms, facebook, twitter, etc
	Text              string       `json:"textBody"`
	NormalizedMessage OpenMessage  `json:"-"`
	Status            string       `json:"status"`    // sent, received, delivered, undelivered, etc
	CreatedBy         *User        `json:"createdBy"` // nil unless NormalizedMessage.OriginatingEntity is "Human"
	Conversation      Conversation `json:"-"`
	SelfURI           URI          `json:"selfUri"`
}

func (OpenMessageData) MarshalJSON added in v0.7.3

func (messageData OpenMessageData) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*OpenMessageData) UnmarshalJSON added in v0.7.3

func (messageData *OpenMessageData) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type OpenMessageEvent added in v0.8.8

type OpenMessageEvent interface {
	core.TypeCarrier
}

func UnmarshalOpenMessageEvent added in v0.8.8

func UnmarshalOpenMessageEvent(payload []byte) (OpenMessageEvent, error)

type OpenMessageEvents added in v0.8.8

type OpenMessageEvents struct {
	ID        string              `json:"id,omitempty"` // Can be anything
	Channel   *OpenMessageChannel `json:"channel"`
	Direction string              `json:"direction,omitempty"` // Can be "Inbound" or "Outbound"
	Events    []OpenMessageEvent  `json:"events"`
	Metadata  map[string]string   `json:"metadata,omitempty"`
}

OpenMessageText is a text message sent or received by the Open Messaging API

See https://developer.genesys.cloud/commdigital/digital/openmessaging/inboundEventMessages

func (OpenMessageEvents) GetID added in v0.8.8

func (message OpenMessageEvents) GetID() string

GetID gets the identifier of this

implements OpenMessage

func (OpenMessageEvents) GetType added in v0.8.8

func (message OpenMessageEvents) GetType() string

GetType returns the type of this event

implements core.TypeCarrier

func (OpenMessageEvents) MarshalJSON added in v0.8.8

func (message OpenMessageEvents) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

implements json.Marshaler

func (*OpenMessageEvents) UnmarshalJSON added in v0.8.8

func (message *OpenMessageEvents) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

implements json.Unmarshaler

type OpenMessageFrom added in v0.4.0

type OpenMessageFrom struct {
	ID        string `json:"id"`
	Type      string `json:"idType,omitempty"`
	Firstname string `json:"firstName,omitempty"`
	Lastname  string `json:"lastName,omitempty"`
	Nickname  string `json:"nickname,omitempty"`
}

func (OpenMessageFrom) Redact added in v0.5.0

func (from OpenMessageFrom) Redact() interface{}

Redact redacts sensitive data

implements logger.Redactable

type OpenMessageReceipt added in v0.7.0

type OpenMessageReceipt struct {
	ID           string              `json:"id,omitempty"` // Can be anything, message ID this receipt relates to
	Channel      *OpenMessageChannel `json:"channel"`
	Direction    string              `json:"direction"`         // Can be "Inbound" or "Outbound"
	Status       string              `json:"status"`            // Can be "Published" (Inbound), "Delivered" (Outbound), "Sent", "Read", "Failed", "Removed"
	Reasons      []StatusReason      `json:"reasons,omitempty"` // Contains the reason for the failure
	FinalReceipt bool                `json:"isFinalReceipt"`    // True if this is the last receipt about this message ID
	Metadata     map[string]string   `json:"metadata,omitempty"`
}

OpenMessageReceipt is the message receipt returned by the Open Message Integration API.

See: https://developer.genesys.cloud/api/digital/openmessaging/receipts

func (OpenMessageReceipt) AsError added in v0.8.6

func (message OpenMessageReceipt) AsError() error

AsError converts this to an error

func (OpenMessageReceipt) GetID added in v0.7.1

func (message OpenMessageReceipt) GetID() string

GetID gets the identifier of this

implements OpenMessage

func (OpenMessageReceipt) GetType added in v0.7.0

func (message OpenMessageReceipt) GetType() string

GetType tells the type of this OpenMessage

implements core.TypeCarrier

func (OpenMessageReceipt) IsFailed added in v0.7.0

func (message OpenMessageReceipt) IsFailed() bool

IsFailed tells if the receipt is failed

func (OpenMessageReceipt) MarshalJSON added in v0.7.0

func (message OpenMessageReceipt) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (OpenMessageReceipt) Redact added in v0.7.0

func (message OpenMessageReceipt) Redact() interface{}

Redact redacts sensitive data

implements logger.Redactable

func (*OpenMessageReceipt) UnmarshalJSON added in v0.7.0

func (message *OpenMessageReceipt) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type OpenMessageStructured added in v0.8.4

type OpenMessageStructured struct {
	ID                string                `json:"id,omitempty"` // Can be anything
	Channel           *OpenMessageChannel   `json:"channel"`
	Direction         string                `json:"direction"` // inbound or outbound
	Text              string                `json:"text"`
	Content           []*OpenMessageContent `json:"content,omitempty"`
	OriginatingEntity string                `json:"originatingEntity,omitempty"` // Bot or Human
	Metadata          map[string]string     `json:"metadata,omitempty"`
}

OpenMessageStructed describes a structured message

See: https://developer.genesys.cloud/api/rest/v2/conversations/#post-api-v2-conversations-messages-inbound-open

func (OpenMessageStructured) GetID added in v0.8.4

func (message OpenMessageStructured) GetID() string

GetID gets the identifier of this

implements OpenMessage

func (OpenMessageStructured) GetType added in v0.8.4

func (message OpenMessageStructured) GetType() string

GetType tells the type of this OpenMessage

implements core.TypeCarrier

func (OpenMessageStructured) MarshalJSON added in v0.8.4

func (message OpenMessageStructured) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (OpenMessageStructured) Redact added in v0.8.4

func (message OpenMessageStructured) Redact() interface{}

Redact redacts sensitive data

implements logger.Redactable

func (*OpenMessageStructured) UnmarshalJSON added in v0.8.4

func (message *OpenMessageStructured) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type OpenMessageTemplate added in v0.8.4

type OpenMessageTemplate struct {
	Text       string            `json:"text"`
	Parameters map[string]string `json:"parameters"`
}

OpenMessageTemplate describes a template for an OpenMessage

func (OpenMessageTemplate) MarshalJSON added in v0.8.4

func (template OpenMessageTemplate) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*OpenMessageTemplate) UnmarshalJSON added in v0.8.4

func (template *OpenMessageTemplate) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type OpenMessageText added in v0.7.0

type OpenMessageText struct {
	ID                string                `json:"id,omitempty"` // Can be anything
	Channel           *OpenMessageChannel   `json:"channel"`
	Direction         string                `json:"direction"` // inbound or outbound
	Text              string                `json:"text"`
	Content           []*OpenMessageContent `json:"content,omitempty"`
	OriginatingEntity string                `json:"originatingEntity,omitempty"` // Bot or Human
	Metadata          map[string]string     `json:"metadata,omitempty"`
}

OpenMessageText is a text message sent or received by the Open Messaging API

See: https://developer.genesys.cloud/api/rest/v2/conversations/#post-api-v2-conversations-messages-inbound-open

func (OpenMessageText) GetID added in v0.7.1

func (message OpenMessageText) GetID() string

GetID gets the identifier of this

implements OpenMessage

func (OpenMessageText) GetType added in v0.7.0

func (message OpenMessageText) GetType() string

GetType tells the type of this OpenMessage

implements core.TypeCarrier

func (OpenMessageText) MarshalJSON added in v0.7.0

func (message OpenMessageText) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (OpenMessageText) Redact added in v0.7.0

func (message OpenMessageText) Redact() interface{}

Redact redacts sensitive data

implements logger.Redactable

func (*OpenMessageText) UnmarshalJSON added in v0.7.0

func (message *OpenMessageText) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type OpenMessageTo added in v0.4.0

type OpenMessageTo struct {
	ID   string `json:"id"`
	Type string `json:"idType,omitempty"`
}

type OpenMessageTypingEvent added in v0.8.8

type OpenMessageTypingEvent struct {
	IsTyping bool          `json:"-"`
	Duration time.Duration `json:"-"`
}

OpenMessageTypingEvent is a typing event sent or received by the Open Messaging API

func (OpenMessageTypingEvent) GetType added in v0.8.8

func (event OpenMessageTypingEvent) GetType() string

GetType returns the type of this event

implements core.TypeCarrier

func (OpenMessageTypingEvent) MarshalJSON added in v0.8.8

func (event OpenMessageTypingEvent) MarshalJSON() (data []byte, err error)

MarshalJSON marshals this into JSON

implements json.Marshaler

func (*OpenMessageTypingEvent) UnmarshalJSON added in v0.8.8

func (event *OpenMessageTypingEvent) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

implements json.Unmarshaler

type OpenMessagingIntegration added in v0.4.0

type OpenMessagingIntegration struct {
	ID               uuid.UUID             `json:"id"`
	Name             string                `json:"name"`
	WebhookURL       *url.URL              `json:"-"`
	WebhookToken     string                `json:"outboundNotificationWebhookSignatureSecretToken"`
	WebhookHeaders   map[string]string     `json:"webhookHeaders,omitempty"`
	Recipient        *DomainEntityRef      `json:"recipient,omitempty"`
	SupportedContent *AddressableEntityRef `json:"supportedContent,omitempty"`
	DateCreated      time.Time             `json:"dateCreated,omitempty"`
	CreatedBy        *DomainEntityRef      `json:"createdBy,omitempty"`
	DateModified     time.Time             `json:"dateModified,omitempty"`
	ModifiedBy       *DomainEntityRef      `json:"modifiedBy,omitempty"`
	CreateStatus     string                `json:"createStatus,omitempty"` // Initiated, Completed, Error
	CreateError      *ErrorBody            `json:"createError,omitempty"`
	Status           string                `json:"status,omitempty"` // Active, Inactive
	// contains filtered or unexported fields
}

OpenMessagingIntegration describes an GCloud OpenMessaging Integration

See https://developer.genesys.cloud/api/digital/openmessaging

func (*OpenMessagingIntegration) Delete added in v0.4.0

func (integration *OpenMessagingIntegration) Delete(context context.Context) error

Delete deletes an OpenMessaging Integration

If the integration was not created, nothing is done

func (OpenMessagingIntegration) GetID added in v0.4.0

func (integration OpenMessagingIntegration) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (*OpenMessagingIntegration) GetMessageData added in v0.7.3

func (integration *OpenMessagingIntegration) GetMessageData(context context.Context, message OpenMessage) (*OpenMessageData, error)

GetMessageData gets the details ofa message

func (*OpenMessagingIntegration) GetRoutingMessageRecipient added in v0.7.15

func (integration *OpenMessagingIntegration) GetRoutingMessageRecipient(context context.Context) (*RoutingMessageRecipient, error)

GetRoutingMessageRecipient fetches the RoutingMessageRecipient for this OpenMessagingIntegration

func (OpenMessagingIntegration) GetURI added in v0.7.0

func (integration OpenMessagingIntegration) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*OpenMessagingIntegration) Initialize added in v0.4.0

func (integration *OpenMessagingIntegration) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (OpenMessagingIntegration) IsCreated added in v0.7.0

func (integration OpenMessagingIntegration) IsCreated() bool

IsCreated tells if this OpenMessagingIntegration has been created successfully

func (OpenMessagingIntegration) IsError added in v0.7.0

func (integration OpenMessagingIntegration) IsError() bool

IsCreated tells if this OpenMessagingIntegration has not been created successfully

func (OpenMessagingIntegration) MarshalJSON added in v0.4.0

func (integration OpenMessagingIntegration) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*OpenMessagingIntegration) Refresh added in v0.7.0

func (integration *OpenMessagingIntegration) Refresh(ctx context.Context) error

func (*OpenMessagingIntegration) SendInboundEvents added in v0.8.8

func (integration *OpenMessagingIntegration) SendInboundEvents(context context.Context, from *OpenMessageFrom, attributes map[string]string, metadata map[string]string, events ...OpenMessageEvent) (id string, err error)

SendInboundEvent sends an event from the middleware to GENESYS Cloud

See https://developer.genesys.cloud/commdigital/digital/openmessaging/inboundEventMessages

func (*OpenMessagingIntegration) SendInboundMessage added in v0.5.0

func (integration *OpenMessagingIntegration) SendInboundMessage(context context.Context, from *OpenMessageFrom, messageID, text string, attributes map[string]string, metadata map[string]string) (id string, err error)

SendInboundMessage sends a text message from the middleware to GENESYS Cloud

See https://developer.genesys.cloud/api/digital/openmessaging/inboundMessages#send-an-inbound-open-message

func (*OpenMessagingIntegration) SendInboundMessageWithAttachment added in v0.5.0

func (integration *OpenMessagingIntegration) SendInboundMessageWithAttachment(context context.Context, from *OpenMessageFrom, messageID, text string, attachment *OpenMessageAttachment, attributes map[string]string, metadata map[string]string) (id string, err error)

SendInboundMessageWithAttachment sends a text message with an attachemnt from the middleware to GENESYS Cloud

See https://developer.genesys.cloud/api/digital/openmessaging/inboundMessages#inbound-message-with-attached-photo See https://developer.genesys.cloud/api/rest/v2/conversations/#post-api-v2-conversations-messages-inbound-open

func (*OpenMessagingIntegration) SendInboundReceipt added in v0.7.2

func (integration *OpenMessagingIntegration) SendInboundReceipt(context context.Context, to *OpenMessageTo, messageID string, finalReceipt bool, status string, reasons []StatusReason, attributes map[string]string, metadata map[string]string) (id string, err error)

SendInboundReceipt sends a receipt from the middleware to GENESYS Cloud

Valid status values are: Delivered, Failed.

Genesys Cloud will return a receipt from this request. If the returned receipt has a Failed status, the return error contains the reason(s) for the failure.

See https://developer.genesys.cloud/commdigital/digital/openmessaging/inboundReceiptMessages

func (*OpenMessagingIntegration) SendOutboundMessage added in v0.4.0

func (integration *OpenMessagingIntegration) SendOutboundMessage(context context.Context, destination, text string) (*AgentlessMessageResult, error)

SendOutboundMessage sends a message from GENESYS Cloud to the middleware

The message can be only text as it is sent bia the AgentLess Message API.

This is mainly for debugging purposes

See https://developer.genesys.cloud/api/digital/openmessaging/outboundMessages#send-an-agentless-outbound-text-message

func (OpenMessagingIntegration) String added in v0.4.0

func (integration OpenMessagingIntegration) String() string

String gets a string version

implements the fmt.Stringer interface

func (*OpenMessagingIntegration) UnmarshalJSON added in v0.4.0

func (integration *OpenMessagingIntegration) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (*OpenMessagingIntegration) Update added in v0.4.0

func (integration *OpenMessagingIntegration) Update(context context.Context, name string, webhookURL *url.URL, token string) error

Update updates an OpenMessaging Integration

If the integration was not created, an error is return without reaching GENESYS Cloud

type Organization

type Organization struct {
	ID                         uuid.UUID       `json:"id"`
	Name                       string          `json:"name"`
	DefaultLanguage            string          `json:"defaultLanguage"`
	ThirdPartyOrganizationName string          `json:"thirdPartyOrgName"`
	ThirdPartyURI              string          `json:"thirdPartyURI"`
	Domain                     string          `json:"domain"`
	State                      string          `json:"state"`
	DefaultSiteID              string          `json:"defaultSiteId"`
	SupportURI                 string          `json:"supportURI"`
	VoicemailEnabled           bool            `json:"voicemailEnabled"`
	SelfURI                    URI             `json:"selfURI"`
	Features                   map[string]bool `json:"features"`
	Version                    uint32          `json:"version"`
	// contains filtered or unexported fields
}

Organization describes a GCloud Organization

func (Organization) GetID added in v0.1.0

func (organization Organization) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Organization) GetURI added in v0.7.0

func (organization Organization) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*Organization) Initialize added in v0.1.0

func (organization *Organization) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (Organization) String added in v0.1.0

func (organization Organization) String() string

String gets a string version

implements the fmt.Stringer interface

type OutOfOffice added in v0.1.0

type OutOfOffice struct {
	ID           string    `json:"id"`
	Name         string    `json:"name"`
	SelfURI      URI       `json:"selfUri"`
	User         *User     `json:"user"`
	Active       bool      `json:"active"`
	Indefinite   bool      `json:"indefinite"`
	StartDate    time.Time `json:"startDate"`
	EndDate      time.Time `json:"endDate"`
	ModifiedDate time.Time `json:"modifiedDate"`
}

OutOfOffice describes the Out Of Office status

type Participant added in v0.1.0

type Participant struct {
	ID              uuid.UUID `json:"id"`
	SelfURI         URI       `json:"selfUri"`
	Type            string    `json:"type"`
	Provider        string    `json:"provider"`
	Name            string    `json:"name"`
	ParticipantType string    `json:"participantType,omitempty"`
	State           string    `json:"state,omitempty"`
	Held            bool      `json:"held,omitempty"`
	Direction       string    `json:"direction,omitempty"`
	StartTime       time.Time `json:"startTime,omitempty"`
	ConnectedTime   time.Time `json:"connectedTime,omitempty"`
	EndTime         time.Time `json:"endTime,omitempty"`
	StartHoldTime   time.Time `json:"startHoldTime,omitempty"`
	Purpose         string    `json:"purpose"`
	DisconnectType  string    `json:"disconnectType,omitempty"`

	User                   *User            `json:"user,omitempty"`
	ExternalContact        *DomainEntityRef `json:"externalContact,omitempty"`
	ExternalContactID      string           `json:"externalContactId,omitempty"`
	ExternalOrganization   *DomainEntityRef `json:"externalOrganization,omitempty"`
	ExternalOrganizationID string           `json:"externalOrganizationId,omitempty"`

	Queue                  *Queue           `json:"queue,omitempty"`
	QueueID                string           `json:"queueId,omitempty"`
	GroupID                string           `json:"groupId,omitempty"`
	TeamID                 string           `json:"teamId,omitempty"`
	QueueName              string           `json:"queueName,omitempty"`
	ConsultParticipantID   string           `json:"consultParticipantId,omitempty"`
	MonitoredParticipantID string           `json:"monitoredParticipantId,omitempty"`
	Script                 *DomainEntityRef `json:"script,omitempty"`

	Address string  `json:"address,omitempty"`
	ANI     string  `json:"ani,omitempty"`
	ANIName string  `json:"aniName,omitempty"`
	DNIS    string  `json:"dnis,omitempty"`
	Locale  string  `json:"locale,omitempty"`
	From    Address `json:"fromAddress,omitempty"`
	To      Address `json:"toAddress,omitempty"`

	Attributes        map[string]string       `json:"attributes,omitempty"`
	Calls             []*ConversationCall     `json:"calls,omitempty"`
	Callbacks         []*ConversationCallback `json:"callbacks,omitempty"`
	Chats             []*ConversationChat     `json:"chats,omitempty"`
	CobrowseSessions  []*CobrowseSession      `json:"cobrowseSession,omitempty"`
	Emails            []*ConversationEmail    `json:"emails,omitempty"`
	Messages          []*ConversationMessage  `json:"messages,omitempty"`
	ScreenShares      []*ScreenShare          `json:"screenShares,omitempty"`
	SocialExpressions []*SocialExpression     `json:"socialExpressions,omitempty"`
	Videos            []*ConversationVideo    `json:"videos,omitempty"`
	Evaluations       []*Evaluation           `json:"evaluations,omitempty"`

	WrapupRequired bool          `json:"wrapupRequired"`
	WrapupPrompt   string        `json:"wrapupPrompt,omitempty"`
	WrapupTimeout  time.Duration `json:"-"`
	WrapupSkipped  bool          `json:"wrapupSkipped,omitempty"`
	Wrapup         *Wrapup       `json:"wrapup,omitempty"`

	AlertingTimeout      time.Duration           `json:"-"`
	ScreenRecordingState string                  `json:"screenRecordingState,omitempty"`
	FlaggedReason        string                  `json:"flaggedReason,omitempty"`
	Peer                 string                  `json:"peer,omitempty"`
	RoutingData          ConversationRoutingData `json:"conversationRoutingData,omitempty"`
	JourneyContext       *JourneyContext         `json:"journeyContext,omitempty"`
	ErrorInfo            *ErrorBody              `json:"errorInfo,omitempty"`
}

Participant describes a Chat Participant

func (*Participant) Disconnect added in v0.7.12

func (participant *Participant) Disconnect(context context.Context, target Disconnecter) error

Disconnect disconnects the Participant from the target

func (Participant) GetID added in v0.1.0

func (participant Participant) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Participant) GetURI added in v0.7.0

func (participant Participant) GetURI() URI

GetURI gets the URI of this

implements Addressable

func (Participant) IsMember added in v0.1.0

func (participant Participant) IsMember(mediaType string, identifiable Identifiable) bool

IsMember tells if the Participant is a memmber of the Conversation (Identifiable)

func (Participant) MarshalJSON added in v0.1.0

func (participant Participant) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (Participant) String added in v0.1.0

func (participant Participant) String() string

String gets a string version

implements the fmt.Stringer interface

func (*Participant) UnmarshalJSON added in v0.1.0

func (participant *Participant) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (*Participant) UpdateState added in v0.1.0

func (participant *Participant) UpdateState(context context.Context, target StateUpdater, state string) error

UpdateState updates the state of the Participant in target

type PresenceDefinition added in v0.1.0

type PresenceDefinition struct {
	ID             uuid.UUID `json:"id"`
	SystemPresence string    `json:"systemPresence"`
	SelfURI        URI       `json:"selfUri"`
}

PresenceDefinition defines Presence

func (PresenceDefinition) GetID added in v0.1.0

func (definition PresenceDefinition) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (PresenceDefinition) GetURI added in v0.7.0

func (definition PresenceDefinition) GetURI() URI

GetURI gets the URI of this

implements Addressable

func (PresenceDefinition) String added in v0.1.0

func (definition PresenceDefinition) String() string

String gets a string version

implements the fmt.Stringer interface

type ProcessAutomationCriteria added in v0.8.0

type ProcessAutomationCriteria struct {
	JSONPath string   `json:"jsonPath"`
	Operator string   `json:"operator"` // GreaterThanOrEqual, LessThanOrEqual, Equal, NotEqual, LessThan, GreaterThan, NotIn, In, Contains, All, Exists, Size
	Value    string   `json:"value,omitempty"`
	Values   []string `json:"values,omitempty"`
}

ProcessAutomationCriteria is a Process Automation Criteria

type ProcessAutomationTarget added in v0.8.0

type ProcessAutomationTarget struct {
	ID         uuid.UUID `json:"id"`
	Type       string    `json:"type"` // Workflow
	DataFormat string    `json:"-"`    // Json, TopLevelPrimitives
}

ProcessAutomationTarget is a Process Automation Target

func (ProcessAutomationTarget) MarshalJSON added in v0.8.0

func (target ProcessAutomationTarget) MarshalJSON() ([]byte, error)

MarshalJSON marshals the object into JSON

func (*ProcessAutomationTarget) UnmarshalJSON added in v0.8.0

func (target *ProcessAutomationTarget) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the object from JSON

type ProcessAutomationTrigger added in v0.8.0

type ProcessAutomationTrigger struct {
	ID              uuid.UUID                   `json:"id"`
	Name            string                      `json:"name"`
	Description     string                      `json:"description,omitempty"`
	Topic           NotificationTopic           `json:"-"`
	MatchCriteria   []ProcessAutomationCriteria `json:"matchCriteria"`
	Target          ProcessAutomationTarget     `json:"target"`
	Enabled         bool                        `json:"enabled"`
	EventTTLSeconds int                         `json:"eventTTLSeconds,omitempty"`
	DelayBySeconds  int                         `json:"delayBySeconds,omitempty"`
	Version         int                         `json:"version,omitempty"`
	// contains filtered or unexported fields
}

ProcessAutomationTrigger is a Process Automation Trigger

See: https://developer.genesys.cloud/commdigital/taskmanagement/task-management-maestro

See: https://developer.genesys.cloud/platform/process-automation/trigger-apis

func (ProcessAutomationTrigger) Create added in v0.8.0

func (trigger ProcessAutomationTrigger) Create(context context.Context, client *Client) (*ProcessAutomationTrigger, error)

Create creates a new ProcessAutomationTrigger

See: https://developer.genesys.cloud/platform/process-automation/trigger-apis#post-api-v2-processautomation-triggers

func (ProcessAutomationTrigger) Delete added in v0.8.0

func (trigger ProcessAutomationTrigger) Delete(context context.Context) error

Delete deletes this ProcessAutomationTrigger

func (ProcessAutomationTrigger) GetID added in v0.8.0

func (trigger ProcessAutomationTrigger) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (ProcessAutomationTrigger) GetURI added in v0.8.0

func (trigger ProcessAutomationTrigger) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*ProcessAutomationTrigger) Initialize added in v0.8.0

func (trigger *ProcessAutomationTrigger) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (ProcessAutomationTrigger) MarshalJSON added in v0.8.0

func (trigger ProcessAutomationTrigger) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

implements json.Marshaler

func (ProcessAutomationTrigger) String added in v0.8.0

func (trigger ProcessAutomationTrigger) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ProcessAutomationTrigger) UnmarshalJSON added in v0.8.0

func (trigger *ProcessAutomationTrigger) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

implements json.Unmarshaler

type Query added in v0.7.15

type Query map[string]interface{}

Query represents a query string for URIs

func (Query) Encode added in v0.7.15

func (query Query) Encode() string

Encode returns the query as a "URL encoded" string

type Queue added in v0.1.0

type Queue struct {
	ID                    uuid.UUID     `json:"id"`
	Name                  string        `json:"name"`
	CreatedBy             *User         `json:"-"`
	ModifiedBy            string        `json:"modifiedBy"`
	DateCreated           time.Time     `json:"dateCreated"`
	Division              *Division     `json:"division"`
	MemberCount           int           `json:"memberCount"`
	MediaSettings         MediaSettings `json:"mediaSettings"`
	ACWSettings           ACWSettings   `json:"acwSettings"`
	SkillEvaluationMethod string        `json:"skillEvaluationMethod"`
	AutoAnswerOnly        bool          `json:"true"`
	DefaultScripts        interface{}   `json:"defaultScripts"`
	SelfURI               URI           `json:"selfUri"`
	// contains filtered or unexported fields
}

Queue defines a GCloud Queue

func (Queue) GetID added in v0.1.0

func (queue Queue) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (Queue) GetURI added in v0.7.0

func (queue Queue) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*Queue) Initialize added in v0.7.15

func (queue *Queue) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (Queue) String added in v0.1.0

func (queue Queue) String() string

func (*Queue) UnmarshalJSON added in v0.1.0

func (queue *Queue) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type ResourcePermissionPolicy added in v0.1.0

type ResourcePermissionPolicy struct {
	// TODO: Find out what should be here!
	ID      string `json:"id"`
	SelfURI string `json:"selfUri,omitempty"`
}

ResourcePermissionPolicy describes...

type ResponseManagementContent added in v0.7.0

type ResponseManagementContent struct {
	ContentType string `json:"contentType"`
	Content     string `json:"content"`
}

ResponseManagementContent represent a Response Management Content

See https://developer.genesys.cloud/api/rest/v2/responsemanagement

type ResponseManagementLibrary added in v0.7.0

type ResponseManagementLibrary struct {
	ID          uuid.UUID        `json:"id"`
	Name        string           `json:"name"`
	DateCreated time.Time        `json:"dateCreated,omitempty"`
	CreatedBy   *DomainEntityRef `json:"createdBy,omitempty"`
	Version     int              `json:"version"`
	SelfURI     URI              `json:"selfUri,omitempty"`
}

ResponseManagementLibrary is the interface for the Response Management Library

See https://developer.genesys.cloud/api/rest/v2/responsemanagement

func (ResponseManagementLibrary) GetID added in v0.7.0

func (library ResponseManagementLibrary) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (*ResponseManagementLibrary) GetType added in v0.7.0

func (library *ResponseManagementLibrary) GetType() string

GetType gets the identifier of this

implements Identifiable

func (ResponseManagementLibrary) GetURI added in v0.7.15

func (library ResponseManagementLibrary) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*ResponseManagementLibrary) Initialize added in v0.7.15

func (library *ResponseManagementLibrary) Initialize(parameters ...interface{})

Initialize initializes the object

implements Initializable

func (ResponseManagementLibrary) String added in v0.7.0

func (library ResponseManagementLibrary) String() string

String gets a string version

implements the fmt.Stringer interface

type ResponseManagementQuery added in v0.7.0

type ResponseManagementQuery struct {
	Query    string                          `json:"queryPhrase,omitempty"`
	PageSize int                             `json:"pageSize,omitempty"`
	Filters  []ResponseManagementQueryFilter `json:"filters,omitempty"`
}

type ResponseManagementQueryFilter added in v0.7.0

type ResponseManagementQueryFilter struct {
	Name     string   `json:"name"`
	Operator string   `json:"operator"`
	Values   []string `json:"values"`
}

type ResponseManagementResponse added in v0.7.0

type ResponseManagementResponse struct {
	ID                uuid.UUID                        `json:"id"`
	Name              string                           `json:"name"`
	Type              string                           `json:"ResponseType"`
	DateCreated       time.Time                        `json:"dateCreated,omitempty"`
	CreatedBy         *DomainEntityRef                 `json:"createdBy,omitempty"`
	Libraries         []DomainEntityRef                `json:"libraries,omitempty"`
	Texts             []ResponseManagementContent      `json:"texts,omitempty"`
	Substitutions     []ResponseManagementSubstitution `json:"substitutions,omitempty"`
	TemplateType      string                           `json:"-"`
	TemplateName      string                           `json:"-"`
	TemplateNamespace string                           `json:"-"`
	TemplateLanguage  string                           `json:"-"`
	Version           int                              `json:"version"`
	SelfURI           URI                              `json:"selfUri,omitempty"`
}

ResponseManagementResponse is the interface for the Response Management Response

See https://developer.genesys.cloud/api/rest/v2/responsemanagement

func (ResponseManagementResponse) ApplySubstitutions added in v0.7.19

func (response ResponseManagementResponse) ApplySubstitutions(context context.Context, contentType string, substitutions map[string]string) (string, error)

ApplySubstitutions applies the substitutions to the response text that matches the given content type

func (ResponseManagementResponse) FetchByFilters added in v0.7.15

func (response ResponseManagementResponse) FetchByFilters(context context.Context, client *Client, filters ...ResponseManagementQueryFilter) (*ResponseManagementResponse, error)

func (ResponseManagementResponse) GetID added in v0.7.0

func (response ResponseManagementResponse) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (ResponseManagementResponse) GetType added in v0.8.2

func (response ResponseManagementResponse) GetType() string

GetType gets the type of this

implements core.TypeCarrier

func (ResponseManagementResponse) GetURI added in v0.7.15

func (response ResponseManagementResponse) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*ResponseManagementResponse) Initialize added in v0.7.15

func (response *ResponseManagementResponse) Initialize(parameters ...interface{})

Initialize initializes the object

implements Initializable

func (ResponseManagementResponse) MarshalJSON added in v0.8.2

func (response ResponseManagementResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals into JSON

implements json.Marshaler

func (ResponseManagementResponse) String added in v0.7.0

func (response ResponseManagementResponse) String() string

String gets a string version

implements the fmt.Stringer interface

func (*ResponseManagementResponse) UnmarshalJSON added in v0.8.2

func (response *ResponseManagementResponse) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON

implements json.Unmarshaler

type ResponseManagementSubstitution added in v0.7.0

type ResponseManagementSubstitution struct {
	ID          string `json:"id"`
	Description string `json:"description"`
	Default     string `json:"defaultValue"`
}

ResponseManagementSubstitution is the interface for the Response Management Substitution

See https://developer.genesys.cloud/api/rest/v2/responsemanagement

type RoutingMessageRecipient added in v0.7.15

type RoutingMessageRecipient struct {
	ID            uuid.UUID `json:"id"`
	Name          string    `json:"name"`
	MessengerType string    `json:"messengerType"`
	Flow          *Flow     `json:"flow"`
	DateCreated   time.Time `json:"dateCreated,omitempty"`
	CreatedBy     *User     `json:"createdBy,omitempty"`
	DateModified  time.Time `json:"dateModified,omitempty"`
	ModifiedBy    *User     `json:"modifiedBy,omitempty"`
	// contains filtered or unexported fields
}

func (*RoutingMessageRecipient) DeleteFlow added in v0.7.15

func (recipient *RoutingMessageRecipient) DeleteFlow(context context.Context) error

DeleteFlow removes the flow of this recipient

func (RoutingMessageRecipient) GetID added in v0.7.15

func (recipient RoutingMessageRecipient) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (RoutingMessageRecipient) GetURI added in v0.7.15

func (recipient RoutingMessageRecipient) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*RoutingMessageRecipient) Initialize added in v0.7.15

func (recipient *RoutingMessageRecipient) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (RoutingMessageRecipient) MarshalJSON added in v0.7.15

func (recipient RoutingMessageRecipient) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

implements json.Marshaler

func (*RoutingMessageRecipient) UpdateFlow added in v0.7.15

func (recipient *RoutingMessageRecipient) UpdateFlow(context context.Context, flow *Flow) error

UpdateFlow updates the flow of this recipient

type RoutingStatus added in v0.1.0

type RoutingStatus struct {
	UserID    string    `json:"userId"`
	Status    string    `json:"status"` // OFF_QUEUE, IDLE, INTERACTING, NOT_RESPONDING, COMMUNICATING
	StartTime time.Time `json:"startTime"`
}

RoutingStatus describes a Routing Status

type RoutingTarget added in v0.1.0

type RoutingTarget struct {
	Type    string `json:"targetType,omitempty"`
	Address string `json:"targetAddress,omitempty"`
}

RoutingTarget describes a routing target

type ScreenShare added in v0.1.0

type ScreenShare struct {
	ID                uuid.UUID `json:"id"`
	State             string    `json:"state"` // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Sharing           bool      `json:"sharing"`
	Segments          []Segment `json:"segments"`
	PeerCount         int       `json:"peerCount"`
	Provider          string    `json:"provider"`
	PeerID            uuid.UUID `json:"peerId"`
	ConnectedTime     time.Time `json:"connectedTime"`
	DisconnectedTime  time.Time `json:"disconnectedTime"`
	StartAlertingTime time.Time `json:"startAlertingTime"`
	DisconnectType    string    `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
}

ScreenShare describes a Screen Share (like belonging to Participant)

func (ScreenShare) GetID added in v0.1.0

func (screenShare ScreenShare) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (ScreenShare) String added in v0.1.0

func (screenShare ScreenShare) String() string

String gets a string version

implements the fmt.Stringer interface

type Segment added in v0.1.0

type Segment struct {
	Type           string    `json:"type"`
	DisconnectType string    `json:"disconnectType"`
	StartTime      time.Time `json:"startTime"`
	EndTime        time.Time `json:"endTime"`
	HowEnded       string    `json:"howEnded"`
}

Segment describes a fragment of a Conversation

type ServiceLevel added in v0.1.0

type ServiceLevel struct {
	Percentage float64
	Duration   time.Duration
}

ServiceLevel defines a Service Level

func (ServiceLevel) MarshalJSON added in v0.1.0

func (serviceLevel ServiceLevel) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*ServiceLevel) UnmarshalJSON added in v0.1.0

func (serviceLevel *ServiceLevel) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type SocialExpression added in v0.1.0

type SocialExpression struct {
	ID                uuid.UUID `json:"id"`
	Direction         string    `json:"direction"` // inbound,outbound
	State             string    `json:"state"`     // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
	Held              bool      `json:"held"`
	RecordingID       string    `json:"recordingId"`
	Segments          []Segment `json:"segments"`
	Provider          string    `json:"provider"`
	ScriptID          string    `json:"scriptId"`
	PeerID            string    `json:"peerId"`
	SocialMediaID     string    `json:"socialMediaId"`
	SocialMediaHub    string    `json:"socialMediaHub"`
	SocialMediaName   string    `json:"socialMediaName"`
	PreviewText       string    `json:"previewText"`
	ConnectedTime     time.Time `json:"connectedTime"`
	DisconnectedTime  time.Time `json:"disconnectedTime"`
	StartAlertingTime time.Time `json:"startAlertingTime"`
	StartHoldTime     time.Time `json:"startHoldTime"`
	DisconnectType    string    `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
}

SocialExpression describes a SocialExpression (like belonging to Participant)

func (SocialExpression) GetID added in v0.1.0

func (socialExpression SocialExpression) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (SocialExpression) String added in v0.1.0

func (socialExpression SocialExpression) String() string

String gets a string version

implements the fmt.Stringer interface

type StateUpdater added in v0.1.0

type StateUpdater interface {
	UpdateState(context context.Context, identifiable Identifiable, state string) error
}

StateUpdater describes objects than can update the state of an Identifiable

type StatusReason added in v0.4.0

type StatusReason struct {
	Code    string `json:"code,omitempty"` // MessageExpired, RateLimited, MessageNotAllowed, GeneralError, UnsupportedMessage, UnknownMessage, InvalidMessageStructure, InvalidDestination, ServerError, MediaTypeNotAllowed, InvalidMediaContentLength, RecipientOptedOut
	Message string `json:"message"`
}

func (StatusReason) AsError added in v0.8.6

func (reason StatusReason) AsError() error

AsError converts this to an error

type TemplateParameter added in v0.4.0

type TemplateParameter struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

TemplateParameter describes a template parameter

type Transferrer added in v0.4.0

type Transferrer interface {
	Transfer(context context.Context, identifiable Identifiable, target Identifiable) error
}

Transferrer describes objects that can transfer an Identifiable somewhere else

type URI added in v0.4.0

type URI string

URI represents the Path of a URL (used in SelfURI or in requests, for example)

func NewURI added in v0.4.0

func NewURI(path string, args ...interface{}) URI

NewURI creates a new URI with eventually some parameters

path should be a formatter string

func (URI) HasPrefix added in v0.4.0

func (uri URI) HasPrefix(prefix string) bool

HasPrefix tells if the URI starts with the given prefix

func (URI) HasProtocol added in v0.4.0

func (uri URI) HasProtocol() bool

HasProtocol tells if the URI starts with a protocol/scheme

func (URI) HasQuery added in v0.7.15

func (uri URI) HasQuery() bool

HasQuery tells if the URI has a query string

func (URI) Join added in v0.4.0

func (uri URI) Join(uris ...URI) URI

Join joins the given paths to the URI

Caveat: does not work if the original URI has a query string

func (URI) String added in v0.4.0

func (uri URI) String() string

String returns the URI as a string

implements the fmt.Stringer interface

func (URI) URL added in v0.4.0

func (uri URI) URL() (*url.URL, error)

URL returns the URI as a URL

func (URI) WithQuery added in v0.7.15

func (uri URI) WithQuery(query Query) URI

WithQuery returns a new URI with the given query

type UpdatedAccessToken added in v0.4.0

type UpdatedAccessToken struct {
	AccessToken
	CustomData interface{}
}

UpdatedAccessToken describes an updated Access Token

This object is sent by the AuthorizationGrant.Authorize() when the token is updated

type User added in v0.1.0

type User struct {
	ID                  uuid.UUID                `json:"id"`
	Name                string                   `json:"name,omitempty"`
	UserName            string                   `json:"username,omitempty"`
	Department          string                   `json:"department,omitempty"`
	Title               string                   `json:"title,omitempty"`
	Division            *Division                `json:"division,omitempty"`
	Mail                string                   `json:"email,omitempty"`
	Images              []*UserImage             `json:"images,omitempty"`
	PrimaryContact      []*Contact               `json:"primaryContactInfo,omitempty"`
	Addresses           []*Contact               `json:"addresses,omitempty"`
	State               string                   `json:"state,omitempty"`
	Presence            *UserPresence            `json:"presence,omitempty"`
	OutOfOffice         *OutOfOffice             `json:"outOfOffice,omitempty"`
	AcdAutoAnswer       bool                     `json:"acdAutoAnswer,omitempty"`
	RoutingStatus       *RoutingStatus           `json:"routingStatus,omitempty"`
	ProfileSkills       []string                 `json:"profileSkills,omitempty"`
	Skills              []*UserRoutingSkill      `json:"skills,omitempty"`
	Languages           []*UserRoutingLanguage   `json:"languages,omitempty"`
	LanguagePreference  string                   `json:"languagePreference,omitempty"`
	Groups              []*Group                 `json:"groups,omitempty"`
	Station             *UserStations            `json:"station,omitempty"`
	Authorization       *UserAuthorization       `json:"authorization,omitempty"`
	Employer            *EmployerInfo            `json:"employerInfo,omitempty"`
	Manager             *User                    `json:"manager,omitempty"`
	Certifications      []string                 `json:"certifications,omitempty"`
	Biography           *Biography               `json:"biography,omitempty"`
	ConversationSummary *UserConversationSummary `json:"conversationSummary,omitempty"`
	Locations           []*Location              `json:"locations,omitempty"`
	GeoLocation         *GeoLocation             `json:"geolocation,omitempty"`
	Chat                *Jabber                  `json:"chat,omitempty"`
	Version             int                      `json:"version,omitempty"`
	// contains filtered or unexported fields
}

User describes a GCloud User

func (User) GetID added in v0.1.0

func (user User) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (User) GetURI added in v0.7.0

func (user User) GetURI(ids ...uuid.UUID) URI

GetURI gets the URI of this

implements Addressable

func (*User) Initialize added in v0.1.0

func (user *User) Initialize(parameters ...interface{})

Initialize initializes the object

accepted parameters: *gcloudcx.Client, *logger.Logger

implements Initializable

func (User) MarshalJSON added in v0.7.15

func (user User) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

implements json.Marshaler

func (User) String added in v0.1.0

func (user User) String() string

String gets a string version

implements the fmt.Stringer interface

type UserActivityTopic added in v0.1.0

type UserActivityTopic struct {
	Name          string
	User          *User
	Presence      *UserPresence
	RoutingStatus *RoutingStatus
	CorrelationID string
	ActiveQueues  []*Queue
	Targets       []Identifiable
}

UserActivityTopic describes a Topic about User's Activity

func (UserActivityTopic) GetTargets added in v0.8.0

func (topic UserActivityTopic) GetTargets() []Identifiable

GetTargets returns the targets of this topic

func (UserActivityTopic) GetType added in v0.8.0

func (topic UserActivityTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (UserActivityTopic) String added in v0.1.0

func (topic UserActivityTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*UserActivityTopic) UnmarshalJSON added in v0.1.0

func (topic *UserActivityTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (UserActivityTopic) With added in v0.8.0

func (topic UserActivityTopic) With(targets ...Identifiable) NotificationTopic

With creates a new NotificationTopic with the given targets

type UserAuthorization added in v0.1.0

type UserAuthorization struct {
	Roles              []*DomainRole               `json:"roles"`
	UnusedRoles        []*DomainRole               `json:"unusedRoles"`
	Permissions        []string                    `json:"permissions"`
	PermissionPolicies []*ResourcePermissionPolicy `json:"permissionPolicies"`
}

UserAuthorization desribes authorizations for a User

type UserConversationChatTopic added in v0.1.0

type UserConversationChatTopic struct {
	Name           string
	User           *User
	ConversationID uuid.UUID
	Participants   []*Participant
	CorrelationID  string
	Targets        []Identifiable
}

UserConversationChatTopic describes a Topic about User's Presence

func (UserConversationChatTopic) GetTargets added in v0.8.0

func (topic UserConversationChatTopic) GetTargets() []Identifiable

GetTargets returns the targets of this topic

func (UserConversationChatTopic) GetType added in v0.8.0

func (topic UserConversationChatTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (UserConversationChatTopic) String added in v0.1.0

func (topic UserConversationChatTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*UserConversationChatTopic) UnmarshalJSON added in v0.1.0

func (topic *UserConversationChatTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (UserConversationChatTopic) With added in v0.8.0

With creates a new NotificationTopic with the given targets

type UserConversationSummary added in v0.1.0

type UserConversationSummary struct {
	UserID           string       `json:"userId"`
	Call             MediaSummary `json:"call"`
	Callback         MediaSummary `json:"callback"`
	Email            MediaSummary `json:"email"`
	Message          MediaSummary `json:"message"`
	Chat             MediaSummary `json:"chat"`
	SocialExpression MediaSummary `json:"socialExpression"`
	Video            MediaSummary `json:"video"`
}

UserConversationSummary describes the summary of a User's conversations

type UserImage added in v0.1.0

type UserImage struct {
	ImageURL   *url.URL `json:"-"`
	Resolution string   `json:"resolution"`
}

UserImage represents a User's Avatar image

func (UserImage) MarshalJSON added in v0.1.0

func (userImage UserImage) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*UserImage) UnmarshalJSON added in v0.1.0

func (userImage *UserImage) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type UserPresence added in v0.1.0

type UserPresence struct {
	ID           uuid.UUID           `json:"id"`
	Name         string              `json:"name"`
	Source       string              `json:"source"`
	Primary      bool                `json:"primary"`
	Definition   *PresenceDefinition `json:"presenceDefinition"`
	Message      string              `json:"message"`
	ModifiedDate time.Time           `json:"modifiedDate"`
	SelfURI      URI                 `json:"selfUri"`
}

UserPresence describes the Presence of a User

func (UserPresence) GetID added in v0.1.0

func (presence UserPresence) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (UserPresence) GetURI added in v0.7.0

func (presence UserPresence) GetURI() URI

GetURI gets the URI of this

implements Addressable

func (UserPresence) String added in v0.1.0

func (presence UserPresence) String() string

String gets a string version

implements the fmt.Stringer interface

func (*UserPresence) UnmarshalJSON added in v0.1.0

func (presence *UserPresence) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

type UserPresenceTopic added in v0.1.0

type UserPresenceTopic struct {
	Name          string
	User          *User
	Presence      UserPresence
	CorrelationID string
	Targets       []Identifiable
}

UserPresenceTopic describes a Topic about User's Presence

func (UserPresenceTopic) GetTargets added in v0.8.0

func (topic UserPresenceTopic) GetTargets() []Identifiable

GetTargets returns the targets of this topic

func (UserPresenceTopic) GetType added in v0.8.0

func (topic UserPresenceTopic) GetType() string

GetType returns the type of this topic

implements core.TypeCarrier

func (UserPresenceTopic) String added in v0.1.0

func (topic UserPresenceTopic) String() string

String gets a string version

implements the fmt.Stringer interface

func (*UserPresenceTopic) UnmarshalJSON added in v0.1.0

func (topic *UserPresenceTopic) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

func (UserPresenceTopic) With added in v0.8.0

func (topic UserPresenceTopic) With(targets ...Identifiable) NotificationTopic

With creates a new NotificationTopic with the given targets

type UserRoutingLanguage added in v0.1.0

type UserRoutingLanguage struct {
	ID          uuid.UUID `json:"id"`
	SelfURI     URI       `json:"selfUri"`
	Name        string    `json:"name"`
	LanguageURI string    `json:"languageUri"`
	State       string    `json:"state"`
	Proficiency float64   `json:"proficiency"`
}

UserRoutingLanguage describe a Routing Language for a User

func (UserRoutingLanguage) GetID added in v0.7.0

func (userRoutingLanguage UserRoutingLanguage) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (UserRoutingLanguage) GetURI added in v0.7.0

func (userRoutingLanguage UserRoutingLanguage) GetURI() URI

GetURI gets the URI of this

implements Addressable

type UserRoutingSkill added in v0.1.0

type UserRoutingSkill struct {
	ID          uuid.UUID `json:"id"`
	SelfURI     URI       `json:"selfUri"`
	Name        string    `json:"name"`
	SkillURI    string    `json:"skillUri"`
	State       string    `json:"state"`
	Proficiency float64   `json:"proficiency"`
}

UserRoutingSkill describe a Routing Skill for a User

func (UserRoutingSkill) GetID added in v0.7.0

func (userRoutingSkill UserRoutingSkill) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (UserRoutingSkill) GetURI added in v0.7.0

func (userRoutingSkill UserRoutingSkill) GetURI() URI

GetURI gets the URI of this

implements Addressable

type UserStation added in v0.1.0

type UserStation struct {
	// TODO: Find out what should be here!
	ID             uuid.UUID         `json:"id"`
	SelfURI        URI               `json:"selfUri,omitempty"`
	Name           string            `json:"name"`
	Type           string            `json:"type"`
	AssociatedUser *User             `json:"associatedUser"`
	AssociatedDate time.Time         `json:"associatedDate"`
	DefaultUser    *User             `json:"defaultUser"`
	ProviderInfo   map[string]string `json:"providerInfo"`
}

UserStation describes a User Station

func (UserStation) GetID added in v0.7.0

func (station UserStation) GetID() uuid.UUID

GetID gets the identifier of this

implements Identifiable

func (UserStation) GetURI added in v0.7.0

func (station UserStation) GetURI() URI

GetURI gets the URI of this

implements Addressable

type UserStations added in v0.1.0

type UserStations struct {
	AssociatedStation     *UserStation `json:"associatedStation"`
	LastAssociatedStation *UserStation `json:"lastAssociatedStation"`
	DefaultStation        *UserStation `json:"defaultStation"`
	EffectiveStation      *UserStation `json:"effectiveStation"`
}

UserStations describes the stations of a user

type VisibilityCondition added in v0.1.0

type VisibilityCondition struct {
	CombiningOperation string        `json:"combiningOperation"`
	Predicates         []interface{} `json:"predicates"`
}

VisibilityCondition describes visibility conditions

type Voicemail added in v0.1.0

type Voicemail struct {
	ID           string `json:"id"`
	UploadStatus string `json:"uploadStatus"`
}

Voicemail describes a voicemail

type Wrapup added in v0.1.0

type Wrapup struct {
	Name        string        `json:"name"`
	Code        string        `json:"code"`
	Notes       string        `json:"notes"`
	Tags        []string      `json:"tags"`
	Duration    time.Duration `json:"-"`
	EndTime     time.Time     `json:"endTime"`
	Provisional bool          `json:"provisional"`
}

Wrapup describes a Wrapup

func (Wrapup) MarshalJSON added in v0.1.0

func (wrapup Wrapup) MarshalJSON() ([]byte, error)

MarshalJSON marshals this into JSON

func (*Wrapup) UnmarshalJSON added in v0.1.0

func (wrapup *Wrapup) UnmarshalJSON(payload []byte) (err error)

UnmarshalJSON unmarshals JSON into this

Source Files

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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