ClientApp
Provides bi-directional communication and integration between this instance of a Genesys Cloud Client Application and the Genesys Cloud host application
Hierarchy
- ClientApp
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
\+ new ClientApp(cfg
: object): ClientApp
Constructs an instance of a Genesys Cloud Client Application to communicate with Genesys Cloud
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
Parameters:
▪Default value
cfg: object= {}
Runtime config of the client
Name | Type | Description |
| undefined | string | The GC host origin (e.g. https://apps.mypurecloud.com, https://apps.mypurecloud.au). Must be a valid origin and used with gcTargetEnv. |
| undefined | string | Name of a query param to auto parse into the gcHostOrigin. Must be valid and used with gcTargetEnvQueryParam. Best Practice. |
| undefined | string | The GC env target (e.g. prod, prod-euw2). Must be a valid environment name and used with gcHostOrigin. |
| undefined | string | Name of a query param to auto parse into the gcTargetEnv. Must be valid and used with gcHostOriginQueryParam. Best Practice. |
| undefined | string | The PC top-level domain (e.g. mypurecloud.com, mypurecloud.au); Must be a valid PC Env tld; Preferred over pcOrigin. |
| undefined | string | Name of a query param to auto parse into the pcEnvironment; Must be valid and a single param. |
| undefined | string | The full origin (protocol, host, port) of the Genesys Cloud host environment (e.g. https://apps.mypurecloud.com). Prefer using pcEnvironment[QueryParam] over this property. |
Returns: ClientApp
Properties
alerting
• alerting: AlertingApi
The AlertingApi instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.alerting.someMethod(...);
conversations
• conversations: ConversationsApi
The ConversationsApi instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.conversations.someMethod(...);
coreUi
• coreUi: CoreUiApi
The CoreUIApi instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.coreUi.someMethod(...);
directory
• directory: DirectoryApi
The DirectoryApi instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.directory.someMethod(...);
since
2.3.0
externalContacts
• externalContacts: ExternalContactsApi
The External Contacts instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.externalContacts.someMethod(...);
since
1.4.0
lifecycle
• lifecycle: LifecycleApi
The LifecycleApi instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.lifecycle.someMethod(...);
myConversations
• myConversations: MyConversationsApi
The MyConversationsApi instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.myConversations.someMethod(...);
since
1.3.0
users
• users: UsersApi
The UsersApi instance.
let clientApp = new ClientApp({
gcHostOriginQueryParam: 'gcHostOrigin',
gcTargetEnvQueryParam: 'gcTargetEnv'
});
clientApp.users.someMethod(...);
deprecated
Use directory property instead. (Since 2.3.0)
Accessors
gcEnvironment
• get gcEnvironment(): null | string
Returns the gcEnvironment (e.g. mypurecloud.com, mypurecloud.jp) if known; null otherwise. This value will be available if a valid Genesys Cloud Environment is provided, inferred, or defaulted from the config passed to this instance.
since
2.6.3
Returns: null | string
the valid Genesys Cloud environment; null if unknown.
pcEnvironment
• get pcEnvironment(): null | string
Returns the pcEnvironment (e.g. mypurecloud.com, mypurecloud.jp) if known; null otherwise. This value will be available if a valid Genesys Cloud Environment is provided, inferred, or defaulted from the config passed to this instance.
since
1.0.0
Returns: null | string
the valid Genesys Cloud environment; null if unknown.
Static
version
• get version(): string
Displays the version of the PureClound Client App SDK.
ClientApp.version
since
1.0.0
Returns: string
The version of the Genesys Cloud Client App SDK
Methods
Static
about
▸ about(): string
Displays information about this version of the PureClound Client App SDK.
ClientApp.about(); // SDK details returned as a string
since
1.0.0
Returns: string
A string of information describing this library