@unblu/floating-js-api 8.19.1 → 8.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/lib/index.d.ts +98 -0
  2. package/dist/lib/internal/internal-api.d.ts +18 -0
  3. package/dist/lib/internal/module/general-lazy-module.d.ts +17 -0
  4. package/dist/lib/internal/module/general-module.d.ts +31 -0
  5. package/dist/lib/internal/module/meta-module.d.ts +18 -0
  6. package/dist/lib/model/individualui_component.d.ts +29 -0
  7. package/dist/lib/model/individualui_state.d.ts +14 -0
  8. package/dist/lib/shared/api-state.d.ts +8 -0
  9. package/dist/lib/shared/conversation.d.ts +313 -0
  10. package/dist/lib/shared/internal/api-bridge.d.ts +36 -0
  11. package/dist/lib/shared/internal/event.d.ts +6 -0
  12. package/dist/lib/shared/internal/initialized-unblu-api.d.ts +10 -0
  13. package/dist/lib/shared/internal/initialized-unblu-element.d.ts +10 -0
  14. package/dist/lib/shared/internal/java-error-codes.d.ts +5 -0
  15. package/dist/lib/shared/internal/model/destroy-mode.d.ts +4 -0
  16. package/dist/lib/shared/internal/model/destroy-options.d.ts +4 -0
  17. package/dist/lib/shared/internal/module/agent-availability-module.d.ts +14 -0
  18. package/dist/lib/shared/internal/module/base-general-module.d.ts +35 -0
  19. package/dist/lib/shared/internal/module/conversation-module.d.ts +64 -0
  20. package/dist/lib/shared/internal/module/module.d.ts +10 -0
  21. package/dist/lib/shared/internal/unblu-floating-api.d.ts +15 -0
  22. package/dist/lib/shared/internal/unblu-util.d.ts +76 -0
  23. package/dist/lib/shared/internal/util/event-emitter.d.ts +44 -0
  24. package/dist/lib/shared/model/agent-availability-state.d.ts +18 -0
  25. package/dist/lib/shared/model/branchclient/language.d.ts +14 -0
  26. package/dist/lib/shared/model/branchclient/named-area-agent-availability.d.ts +19 -0
  27. package/dist/lib/shared/model/call-connection-state.d.ts +18 -0
  28. package/dist/lib/shared/model/call-state.d.ts +30 -0
  29. package/dist/lib/shared/model/configuration.d.ts +53 -0
  30. package/dist/lib/shared/model/connection-state.d.ts +27 -0
  31. package/dist/lib/shared/model/conversation-info.d.ts +42 -0
  32. package/dist/lib/shared/model/conversation-message-info.d.ts +14 -0
  33. package/dist/lib/shared/model/conversation-participant.d.ts +15 -0
  34. package/dist/lib/shared/model/conversation-participation-type.d.ts +18 -0
  35. package/dist/lib/shared/model/conversation-recipient-type.d.ts +18 -0
  36. package/dist/lib/shared/model/conversation-recipient.d.ts +18 -0
  37. package/dist/lib/shared/model/conversation-state.d.ts +37 -0
  38. package/dist/lib/shared/model/conversation-type.d.ts +47 -0
  39. package/dist/lib/shared/model/customaction/custom-action-invocation.d.ts +27 -0
  40. package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.d.ts +6 -0
  41. package/dist/lib/shared/model/customaction/custom-message-action-invocation.d.ts +16 -0
  42. package/dist/lib/shared/model/customaction/custom-person-action-invocation.d.ts +11 -0
  43. package/dist/lib/shared/model/new-conversation-interceptor-result.d.ts +14 -0
  44. package/dist/lib/shared/model/new-conversation-recipient-type.d.ts +10 -0
  45. package/dist/lib/shared/model/new-conversation-recipient.d.ts +14 -0
  46. package/dist/lib/shared/model/person-info.d.ts +5 -0
  47. package/dist/lib/shared/new-conversation-interceptor.d.ts +24 -0
  48. package/dist/lib/shared/unblu-api-error.d.ts +117 -0
  49. package/dist/lib/unblu-api-ui.d.ts +137 -0
  50. package/dist/lib/unblu-api.d.ts +380 -0
  51. package/dist/lib/unblu-static-api.d.ts +237 -0
  52. package/package.json +1 -1
@@ -0,0 +1,35 @@
1
+ import { ApiBridge } from "../api-bridge";
2
+ import { InternalModule } from "./module";
3
+ import { NewConversationInterceptor } from "../../new-conversation-interceptor";
4
+ import { ConversationType } from "../../model/conversation-type";
5
+ import { PersonInfo } from "../../model/person-info";
6
+ import { ConversationInfo } from "../../model/conversation-info";
7
+ import { NewConversationRecipient } from "../../model/new-conversation-recipient";
8
+ export type BaseGeneralEventType = 'activeConversationChange' | 'conversationsChange' | 'notificationCountChange' | 'personChange' | 'personActivity';
9
+ export declare enum BaseGeneralFunction {
10
+ startConversation = "startConversation",
11
+ setNewConversationInterceptor = "setNewConversationInterceptor",
12
+ joinConversation = "joinConversation",
13
+ openConversation = "openConversation",
14
+ getActiveConversation = "getActiveConversation",
15
+ getConversations = "getConversations",
16
+ getNotificationCount = "getNotificationCount",
17
+ getPersonInfo = "getPersonInfo",
18
+ setPersonNickname = "setPersonNickname",
19
+ addPersonLabel = "addPersonLabel",
20
+ removePersonLabel = "removePersonLabel"
21
+ }
22
+ export declare class BaseGeneralModule<T extends string | BaseGeneralFunction, E extends BaseGeneralEventType | string> extends InternalModule<BaseGeneralFunction | T, E> {
23
+ constructor(bridge: ApiBridge);
24
+ startConversation(type: ConversationType, visitorName?: string, visitorData?: string, recipient?: NewConversationRecipient, languageTag?: string): Promise<string>;
25
+ setNewConversationInterceptor(callback: NewConversationInterceptor): Promise<void>;
26
+ joinConversation(pin: string, visitorName?: string): Promise<string>;
27
+ openConversation(conversationId: string): Promise<void>;
28
+ getActiveConversation(): Promise<string | null>;
29
+ getConversations(): Promise<ConversationInfo[]>;
30
+ getNotificationCount(): Promise<number>;
31
+ getPersonInfo(): Promise<PersonInfo>;
32
+ setPersonNickname(nickname: string): Promise<void>;
33
+ addPersonLabel(labelName: string): Promise<void>;
34
+ removePersonLabel(labelName: string): Promise<void>;
35
+ }
@@ -0,0 +1,64 @@
1
+ import { InternalModule } from './module';
2
+ import { ApiBridge } from '../api-bridge';
3
+ import { CallState } from '../../model/call-state';
4
+ import { ConversationState } from '../../model/conversation-state';
5
+ import { ConnectionState } from '../../model/connection-state';
6
+ import { CallConnectionState } from "../../model/call-connection-state";
7
+ export interface ConversationCallState {
8
+ conversationId: string;
9
+ callState: CallState;
10
+ }
11
+ export interface ConversationConnectionState {
12
+ conversationId: string;
13
+ connectionState: ConnectionState;
14
+ }
15
+ export interface ConversationWithState {
16
+ conversationId: string;
17
+ conversationState: ConversationState;
18
+ }
19
+ export interface ConversationQueueStatus {
20
+ conversationId: string;
21
+ /**
22
+ * Current position in the queue, can be null or left out if feature is disabled
23
+ */
24
+ position?: number | null;
25
+ /**
26
+ * Calculated waiting time in milliseconds, can be null or left out if feature is disabled
27
+ */
28
+ averageWaitingTime?: number | null;
29
+ }
30
+ export interface ConversationCallConnectionState {
31
+ conversationId: string;
32
+ callConnectionState: ConversationState;
33
+ }
34
+ export type ConversationEventType = 'connectionStateChange' | 'conversationStateChange' | 'end' | 'close' | 'personChange' | 'callStateChange' | 'invitationsChange' | 'customActionInvocation' | 'queueStatusChange' | 'callConnectionStateChange';
35
+ declare const enum ConversationFunction {
36
+ getConnectionState = "getConnectionState",
37
+ getConversationState = "getConversationState",
38
+ getCallState = "getCallState",
39
+ startAudioCall = "startAudioCall",
40
+ startVideoCall = "startVideoCall",
41
+ endConversation = "endConversation",
42
+ leaveConversation = "leaveConversation",
43
+ closeConversation = "closeConversation",
44
+ setVisitorData = "setVisitorData",
45
+ getVisitorData = "getVisitorData",
46
+ getQueueStatus = "getQueueStatus",
47
+ getCallConnectionState = "getCallConnectionState"
48
+ }
49
+ export declare class ConversationModule extends InternalModule<ConversationFunction, ConversationEventType> {
50
+ constructor(bridge: ApiBridge);
51
+ getConnectionState(conversationId: string): Promise<ConnectionState>;
52
+ getConversationState(conversationId: string): Promise<ConversationState>;
53
+ getCallState(conversationId: string): Promise<CallState>;
54
+ startAudioCall(conversationId: string): Promise<void>;
55
+ startVideoCall(conversationId: string): Promise<void>;
56
+ endConversation(conversationId: string): Promise<void>;
57
+ leaveConversation(conversationId: string): Promise<void>;
58
+ closeConversation(conversationId: string): Promise<void>;
59
+ setVisitorData(visitorData: String): Promise<void>;
60
+ getVisitorData(): Promise<String>;
61
+ getQueueStatus(conversationId: string): Promise<ConversationQueueStatus>;
62
+ getCallConnectionState(conversationId: string): Promise<CallConnectionState>;
63
+ }
64
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ApiBridge } from '../api-bridge';
2
+ import { EventCallback } from '../event';
3
+ export declare class InternalModule<T extends string, E extends string> {
4
+ private bridge;
5
+ moduleName: string;
6
+ constructor(bridge: ApiBridge, moduleName: string);
7
+ protected callApiFunction(functionName: T, args: any[]): Promise<any>;
8
+ on(eventName: E, listener: EventCallback): Promise<void>;
9
+ off(eventName: E, listener: EventCallback): Promise<void>;
10
+ }
@@ -0,0 +1,15 @@
1
+ import { ApiState } from "../api-state";
2
+ import { InitializedUnbluApi } from "./initialized-unblu-api";
3
+ /**
4
+ * @hidden
5
+ */
6
+ export declare interface UnbluFloatingApi {
7
+ api: UnbluFloatingApiFactory;
8
+ }
9
+ /**
10
+ * @hidden
11
+ */
12
+ export declare interface UnbluFloatingApiFactory {
13
+ initialize(): Promise<InitializedUnbluApi>;
14
+ getApiState(): ApiState;
15
+ }
@@ -0,0 +1,76 @@
1
+ import { InitializedUnbluElement } from "./initialized-unblu-element";
2
+ import { Configuration } from "../model/configuration";
3
+ import { UnbluFloatingApi } from "./unblu-floating-api";
4
+ export declare enum IntegrationType {
5
+ embedded = "embedded",
6
+ floating = "floating",
7
+ branchClient = "branch-client"
8
+ }
9
+ declare enum EntryPoint {
10
+ siteIntegrationGreedyMain = "SiteIntegrationGreedyMain",
11
+ siteIntegrationLazyMain = "SiteIntegrationLazyMain",
12
+ siteEmbeddedMain = "SiteEmbeddedMain",
13
+ branchClientMain = "BranchClientMain"
14
+ }
15
+ /**
16
+ * Internal type definition of the unblu object.
17
+ */
18
+ export interface UnbluObject {
19
+ floating?: UnbluFloatingApi;
20
+ /**
21
+ * internal unblu field
22
+ * @hidden
23
+ */
24
+ APIKEY?: string;
25
+ /**
26
+ * internal unblu field
27
+ * @hidden
28
+ */
29
+ BRANCHCLIENTTOKEN?: string;
30
+ /**
31
+ * internal unblu field
32
+ * @hidden
33
+ */
34
+ SERVER?: string;
35
+ /**
36
+ * internal unblu field
37
+ * @hidden
38
+ */
39
+ l?: string;
40
+ /**
41
+ * internal unblu field
42
+ * @hidden
43
+ */
44
+ entryPoint?: EntryPoint;
45
+ /**
46
+ * internal unblu field
47
+ * @hidden
48
+ */
49
+ globalPrefix?: string;
50
+ /**
51
+ * internal unblu field
52
+ * @hidden
53
+ */
54
+ 'embedded-internal-element'?: InitializedUnbluElement | null;
55
+ }
56
+ export declare class UnbluUtil {
57
+ static loadScript(uri: string, timeout: number): Promise<void>;
58
+ static getNamedArea(): string | undefined;
59
+ static setNamedArea(namedArea: string): void;
60
+ static removeNamedArea(): void;
61
+ static setLocale(locale: string): void;
62
+ static loginWithSecureToken(serverUrl: string, apiKey: string, entryPath: string, accessToken: string): Promise<void>;
63
+ static isAuthenticated(serverUrl: string, entryPath: string): Promise<boolean>;
64
+ static logout(serverUrl: string, entryPath: string): Promise<void>;
65
+ static isUnbluLoaded(integrationType: IntegrationType): boolean;
66
+ static generateConfigurationFromLoadedUnblu(): Configuration;
67
+ private static entryPointMatches;
68
+ static getUnbluObject(): UnbluObject;
69
+ static createUnbluObject(): UnbluObject;
70
+ static getOrCreateUnbluObject(): UnbluObject;
71
+ static deinitializeFloatingIfNeeded(): Promise<void>;
72
+ static deinitializeEmbeddedIfNeeded(excludedAppElement?: InitializedUnbluElement): Promise<void>;
73
+ static deinitializeBranchClientIfNeeded(excludedAppElement?: InitializedUnbluElement): Promise<void>;
74
+ static sanitizeParameter(param: string): string;
75
+ }
76
+ export {};
@@ -0,0 +1,44 @@
1
+ export type Listener = (data?: any) => void;
2
+ export declare class EventEmitter {
3
+ private listeners;
4
+ /**
5
+ * Resets the emitter by removing all registered listeners.
6
+ */
7
+ reset(): void;
8
+ /**
9
+ * Adds an event listeners
10
+ * @param event the event to listen to
11
+ * @param listener the listener to be called.
12
+ */
13
+ on(event: string, listener: Listener): void;
14
+ /**
15
+ * removes a previously registered listener
16
+ * @param event the event
17
+ * @param listener the listener that should be removed.
18
+ * @return `true` if the listener was removed, `false` otherwise.
19
+ */
20
+ off(event: string, listener: any): boolean;
21
+ /**
22
+ * removes all listeners for the given event.
23
+ * @param event the event for which all listeners will be removed.
24
+ */
25
+ offAll(event: string): void;
26
+ /**
27
+ * Checks weather at least one listener exists for a given event.
28
+ * @param event the event to check for
29
+ * @return weather or not any listeners for the given event are registered.
30
+ */
31
+ hasListeners(event: string): boolean;
32
+ /**
33
+ * Returns all events that have at least one listeners registered to them.
34
+ * @return An array containing all events that have at least one listener.
35
+ * If no listeners are registered at all, an empty array will be returned.
36
+ */
37
+ getEventsWithListeners(): string[];
38
+ /**
39
+ * Emits an event dispatching it to all listeners registered for it.
40
+ * @param event the event name.
41
+ * @param data the event data.
42
+ */
43
+ emit(event: string, data?: any): void;
44
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum AgentAvailabilityState {
2
+ /**
3
+ * There is at least one agent available for the specified named area and locale.
4
+ */
5
+ AVAILABLE = "AVAILABLE",
6
+ /**
7
+ * There is at least one agent watching the inbound queue for the specified named area and locale but the max capacity of parallel conversations is reached.
8
+ *
9
+ * It is very likely, that an agent will be available in a short time.
10
+ */
11
+ BUSY = "BUSY",
12
+ /**
13
+ * There is currently no agent handling any inbound queue items.
14
+ *
15
+ * It is very unlikely, that an agent will be available in a short time.
16
+ */
17
+ UNAVAILABLE = "UNAVAILABLE"
18
+ }
@@ -0,0 +1,14 @@
1
+ export interface Language {
2
+ /**
3
+ * BCP 47 language tag representation
4
+ */
5
+ languageTag: string;
6
+ /**
7
+ * Name of the language in the current locale
8
+ */
9
+ name: string;
10
+ /**
11
+ * Native name of the language localized with the language of this instance
12
+ */
13
+ nativeName: string;
14
+ }
@@ -0,0 +1,19 @@
1
+ import { AgentAvailabilityState } from "../agent-availability-state";
2
+ export interface NamedAreaAgentAvailability {
3
+ /**
4
+ * Display name of named area
5
+ */
6
+ displayName: string;
7
+ /**
8
+ * Description of named area
9
+ */
10
+ description: string;
11
+ /**
12
+ * Site ID of named area
13
+ */
14
+ namedAreaSiteId: string;
15
+ /**
16
+ * Agent availability state of named area
17
+ */
18
+ availability: AgentAvailabilityState;
19
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum CallConnectionState {
2
+ /**
3
+ * Call is connecting to call service
4
+ */
5
+ CONNECTING = "CONNECTING",
6
+ /**
7
+ * Call is connected to call service
8
+ */
9
+ CONNECTED = "CONNECTED",
10
+ /**
11
+ * Call is reconnecting to call service, possibly due to poor internet connectivity
12
+ */
13
+ RECONNECTING = "RECONNECTING",
14
+ /**
15
+ * Call is disconnected, either because there is no call in the conversation or it isn't joined
16
+ */
17
+ DISCONNECTED = "DISCONNECTED"
18
+ }
@@ -0,0 +1,30 @@
1
+ export declare enum CallState {
2
+ /**
3
+ * A some one is trying to call, the phone is ringing
4
+ */
5
+ INBOUND = "INBOUND",
6
+ /**
7
+ * You are trying to call someone
8
+ */
9
+ OUTBOUND = "OUTBOUND",
10
+ /**
11
+ * A call is active and the local tab is connected to the call, however there is currently no other participant in the call.
12
+ */
13
+ ACTIVE_JOINED_ALONE = "ACTIVE_JOINED_ALONE",
14
+ /**
15
+ * A call is active and the local tab is connected to the call and there is at least one other participant to which the connection is established.
16
+ */
17
+ ACTIVE_JOINED = "ACTIVE_JOINED",
18
+ /**
19
+ * A call is active but the local person has declined it.
20
+ */
21
+ ACTIVE_NOT_JOINED = "ACTIVE_NOT_JOINED",
22
+ /**
23
+ * A call is active and the local person has joined it on an other device.
24
+ */
25
+ ACTIVE_JOINED_ELSEWHERE = "ACTIVE_JOINED_ELSEWHERE",
26
+ /**
27
+ * No inbound, outgoing or active call.
28
+ */
29
+ NONE = "NONE"
30
+ }
@@ -0,0 +1,53 @@
1
+ export interface Configuration {
2
+ /**
3
+ * The API key to use.
4
+ * This is a mandatory configuration.
5
+ *
6
+ * You can retrieve API keys from the Account Configuration interface.
7
+ * This requires the `ADMIN` user role.
8
+ */
9
+ apiKey: string;
10
+ /**
11
+ * The BranchClient token to use.
12
+ * This is a mandatory configuration for the branch client. When branch clients are defined in the branch client
13
+ * configuration on the collaboration server, the token will be generated and can be retrieved from there.
14
+ *
15
+ */
16
+ branchClientToken?: string;
17
+ /**
18
+ * The URL of the Unblu server to connect to.
19
+ *
20
+ * @default If not set, the domain of the current page is used.
21
+ */
22
+ serverUrl?: string;
23
+ /**
24
+ * The public path used with {@link serverUrl} to connect to Unblu.
25
+ *
26
+ * @default If not set, '/unblu' is used.
27
+ */
28
+ entryPath?: string;
29
+ /**
30
+ * The locale to use for all Unblu translation texts.
31
+ *
32
+ * @default If not set, the browser's locale will be used.
33
+ */
34
+ locale?: string;
35
+ /**
36
+ * The named area to be used.
37
+ * The named area determines the queue that conversation requests go to, the agent availability, and the configuration.
38
+ *
39
+ * @default If not set, the named area specified in the HTML `meta` element named `unblu:named-area` is used.
40
+ * If no such element is present, the named area associated with the current domain is used.
41
+ */
42
+ namedArea?: string;
43
+ /**
44
+ * The timeout in milliseconds for the Unblu integration to load.
45
+ *
46
+ * @default 30'000 (30 seconds)
47
+ */
48
+ initTimeout?: number;
49
+ /**
50
+ * The access token used to log the user in before initializing Unblu.
51
+ */
52
+ accessToken?: string;
53
+ }
@@ -0,0 +1,27 @@
1
+ export declare enum ConnectionState {
2
+ /**
3
+ * Initial state before connection establishment has started
4
+ */
5
+ INITIAL = "INITIAL",
6
+ /**
7
+ * State during the first connection to the server
8
+ */
9
+ CONNECTING = "CONNECTING",
10
+ /**
11
+ * The connection has been successfully established.
12
+ */
13
+ CONNECTED = "CONNECTED",
14
+ /**
15
+ * The connection has been lost, reconnect is active.
16
+ */
17
+ RECONNECTING = "RECONNECTING",
18
+ /**
19
+ * The connection has been successfully closed.
20
+ *
21
+ */
22
+ CLOSED = "CLOSED",
23
+ /**
24
+ * A fatal error has occurred. The connection has been permanently lost. No reconnect will be be possible.
25
+ */
26
+ ERROR = "ERROR"
27
+ }
@@ -0,0 +1,42 @@
1
+ import { ConversationRecipient } from "./conversation-recipient";
2
+ import { ConversationParticipationType } from "./conversation-participation-type";
3
+ import { ConversationParticipant } from "./conversation-participant";
4
+ import { ConversationState } from "./conversation-state";
5
+ export interface ConversationInfo {
6
+ /**
7
+ * The ID of the conversation.
8
+ */
9
+ id: string;
10
+ /**
11
+ * Conversation state.
12
+ */
13
+ state: ConversationState;
14
+ /**
15
+ * Conversation creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
16
+ */
17
+ creationTimestamp: number;
18
+ /**
19
+ * Notification count of this conversation.
20
+ */
21
+ notificationCount: number;
22
+ /**
23
+ * Participation type of the current person in this conversation
24
+ */
25
+ myParticipationType: ConversationParticipationType;
26
+ /**
27
+ * All other participants of this conversation
28
+ */
29
+ otherParticipants: [ConversationParticipant];
30
+ /**
31
+ * The current recipient of this conversation
32
+ */
33
+ recipient: ConversationRecipient;
34
+ /**
35
+ * Topic of this conversation; null if not set
36
+ */
37
+ topic?: string;
38
+ /**
39
+ * The custom visitor data of the conversation. Null if not set.
40
+ */
41
+ visitorData?: string;
42
+ }
@@ -0,0 +1,14 @@
1
+ export interface ConversationMessageInfo {
2
+ /**
3
+ * ID of the conversation message
4
+ */
5
+ id: string;
6
+ /**
7
+ * Type of the conversation message
8
+ */
9
+ type: string;
10
+ /**
11
+ * Text content of the conversation message
12
+ */
13
+ text: string;
14
+ }
@@ -0,0 +1,15 @@
1
+ import { ConversationParticipationType } from "./conversation-participation-type";
2
+ export interface ConversationParticipant {
3
+ /**
4
+ * Person ID of the participant
5
+ */
6
+ personId: string;
7
+ /**
8
+ * Name of the participant
9
+ */
10
+ name: string;
11
+ /**
12
+ * Participation type of the participant
13
+ */
14
+ participationType: ConversationParticipationType;
15
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum ConversationParticipationType {
2
+ /**
3
+ * The main agent of the conversation. There can only be one per conversation at any given point in time.
4
+ */
5
+ ASSIGNED_AGENT = "ASSIGNED_AGENT",
6
+ /**
7
+ * The main visitor of the conversation. There can only be one per conversation at any given point in time.
8
+ */
9
+ CONTEXT_PERSON = "CONTEXT_PERSON",
10
+ /**
11
+ * A secondary agent. Multiple instances per conversation possible.
12
+ */
13
+ SECONDARY_AGENT = "SECONDARY_AGENT",
14
+ /**
15
+ * A secondary visitor. Multiple instances per conversation possible.
16
+ */
17
+ SECONDARY_VISITOR = "SECONDARY_VISITOR"
18
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum ConversationRecipientType {
2
+ /**
3
+ * The recipient type for a conversation is the account
4
+ */
5
+ ACCOUNT = "ACCOUNT",
6
+ /**
7
+ * The recipient type for a conversation is a named area
8
+ */
9
+ NAMED_AREA = "NAMED_AREA",
10
+ /**
11
+ * The recipient type for a conversation is a team
12
+ */
13
+ TEAM = "TEAM",
14
+ /**
15
+ * The recipient type for a conversation is an agent
16
+ */
17
+ AGENT = "AGENT"
18
+ }
@@ -0,0 +1,18 @@
1
+ import { ConversationRecipientType } from "./conversation-recipient-type";
2
+ /**
3
+ * The recipient of a conversation
4
+ */
5
+ export interface ConversationRecipient {
6
+ /**
7
+ * The ID of the recipient. Depending on the type, this either refers to an agent person ID or to a team ID
8
+ */
9
+ id: string;
10
+ /**
11
+ * The recipient type
12
+ */
13
+ recipientType: ConversationRecipientType;
14
+ /**
15
+ * The name of the recipient
16
+ */
17
+ name: string;
18
+ }
@@ -0,0 +1,37 @@
1
+ export declare enum ConversationState {
2
+ /**
3
+ * Initial state of a conversation
4
+ */
5
+ CREATED = "CREATED",
6
+ /**
7
+ * Depending of the engagement type of the conversation, the conversation stays in the onboarding state as long as the person in the center of the conversation
8
+ * is doing his onboarding
9
+ */
10
+ ONBOARDING = "ONBOARDING",
11
+ /**
12
+ * When a message is send to an unassigned conversation, the conversation first is put into the reboarding state as long as the person in the center of the
13
+ * conversation is doing the reboarding.
14
+ */
15
+ REBOARDING = "REBOARDING",
16
+ /**
17
+ * Depending of the engagement type of the conversation, the conversation is put in the queued state when it is inside the queue.
18
+ */
19
+ QUEUED = "QUEUED",
20
+ /**
21
+ * Conversation is active
22
+ */
23
+ ACTIVE = "ACTIVE",
24
+ /**
25
+ * After there is no assignee of a conversation anymore, the conversation goes to unassigned state until a message from a visitor is written to start reboarding
26
+ * again.
27
+ */
28
+ UNASSIGNED = "UNASSIGNED",
29
+ /**
30
+ * Conversation is being ended
31
+ */
32
+ OFFBOARDING = "OFFBOARDING",
33
+ /**
34
+ * Conversation is ended
35
+ */
36
+ ENDED = "ENDED"
37
+ }
@@ -0,0 +1,47 @@
1
+ export declare enum ConversationType {
2
+ /**
3
+ * (Visitor initiated, visitor centered) A visitor creates an incoming chat conversation.
4
+ */
5
+ CHAT_REQUEST = "CHAT_REQUEST",
6
+ /**
7
+ * (Visitor initiated, visitor centered) A visitor creates an incoming chat conversation while all agents are offline.
8
+ */
9
+ OFFLINE_CHAT_REQUEST = "OFFLINE_CHAT_REQUEST",
10
+ /**
11
+ * (Visitor initiated, visitor centered) A visitor creates an incoming video conversation.
12
+ */
13
+ VIDEO_REQUEST = "VIDEO_REQUEST",
14
+ /**
15
+ * (Visitor initiated, visitor centered) A visitor creates an incoming audio conversation.
16
+ */
17
+ AUDIO_REQUEST = "AUDIO_REQUEST",
18
+ /**
19
+ * (Visitor initiated, visitor centered) A visitor creates an incoming universal co-browsing conversation.
20
+ */
21
+ HEADLESS_BROWSER_REQUEST = "HEADLESS_BROWSER_REQUEST",
22
+ /**
23
+ * (Visitor initiated, visitor centered) A visitor creates an incoming embedded co-browsing conversation.
24
+ */
25
+ DOMCAP_BROWSER_REQUEST = "DOMCAP_BROWSER_REQUEST",
26
+ /**
27
+ * (Visitor initiated, visitor centered) A visitor creates an incoming mobile co-browsing conversation.
28
+ */
29
+ MOBILE_COBROWSING_REQUEST = "MOBILE_COBROWSING_REQUEST",
30
+ /**
31
+ * (Visitor initiated, visitor centered) A visitor creates an incoming whiteboard conversation.
32
+ */
33
+ WHITEBOARD_REQUEST = "WHITEBOARD_REQUEST",
34
+ /**
35
+ * (Visitor initiated, visitor centered) A visitor creates an incoming screen sharing conversation.
36
+ */
37
+ SCREEN_SHARING_REQUEST = "SCREEN_SHARING_REQUEST",
38
+ /**
39
+ * (Api initiated, visitor centered) A visitor creates a conversation via API which is not added to the queue and where he can invite other visitor to do
40
+ * embedded
41
+ */
42
+ VISITOR_COBROWSING = "VISITOR_COBROWSING",
43
+ /**
44
+ * (Visitor initiated, visitor centered) A visitor creates an incoming branch client conversation.
45
+ */
46
+ BRANCH_CLIENT_REQUEST = "BRANCH_CLIENT_REQUEST"
47
+ }