@unblu/floating-js-api 7.37.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 (135) hide show
  1. package/LICENSE.md +184 -0
  2. package/README.md +26 -0
  3. package/dist/lib/index.d.ts +93 -0
  4. package/dist/lib/index.js +49 -0
  5. package/dist/lib/index.js.map +1 -0
  6. package/dist/lib/internal/internal-api.d.ts +18 -0
  7. package/dist/lib/internal/internal-api.js +20 -0
  8. package/dist/lib/internal/internal-api.js.map +1 -0
  9. package/dist/lib/internal/module/general-lazy-module.d.ts +17 -0
  10. package/dist/lib/internal/module/general-lazy-module.js +16 -0
  11. package/dist/lib/internal/module/general-lazy-module.js.map +1 -0
  12. package/dist/lib/internal/module/general-module.d.ts +31 -0
  13. package/dist/lib/internal/module/general-module.js +37 -0
  14. package/dist/lib/internal/module/general-module.js.map +1 -0
  15. package/dist/lib/internal/module/meta-module.d.ts +17 -0
  16. package/dist/lib/internal/module/meta-module.js +19 -0
  17. package/dist/lib/internal/module/meta-module.js.map +1 -0
  18. package/dist/lib/model/individualui_component.d.ts +29 -0
  19. package/dist/lib/model/individualui_component.js +2 -0
  20. package/dist/lib/model/individualui_component.js.map +1 -0
  21. package/dist/lib/model/individualui_state.d.ts +14 -0
  22. package/dist/lib/model/individualui_state.js +2 -0
  23. package/dist/lib/model/individualui_state.js.map +1 -0
  24. package/dist/lib/shared/api-state.d.ts +8 -0
  25. package/dist/lib/shared/api-state.js +10 -0
  26. package/dist/lib/shared/api-state.js.map +1 -0
  27. package/dist/lib/shared/conversation.d.ts +320 -0
  28. package/dist/lib/shared/conversation.js +384 -0
  29. package/dist/lib/shared/conversation.js.map +1 -0
  30. package/dist/lib/shared/internal/api-bridge.d.ts +36 -0
  31. package/dist/lib/shared/internal/api-bridge.js +97 -0
  32. package/dist/lib/shared/internal/api-bridge.js.map +1 -0
  33. package/dist/lib/shared/internal/event.d.ts +6 -0
  34. package/dist/lib/shared/internal/event.js +2 -0
  35. package/dist/lib/shared/internal/event.js.map +1 -0
  36. package/dist/lib/shared/internal/initialized-unblu-api.d.ts +6 -0
  37. package/dist/lib/shared/internal/initialized-unblu-api.js +2 -0
  38. package/dist/lib/shared/internal/initialized-unblu-api.js.map +1 -0
  39. package/dist/lib/shared/internal/initialized-unblu-element.d.ts +6 -0
  40. package/dist/lib/shared/internal/initialized-unblu-element.js +2 -0
  41. package/dist/lib/shared/internal/initialized-unblu-element.js.map +1 -0
  42. package/dist/lib/shared/internal/java-error-codes.d.ts +5 -0
  43. package/dist/lib/shared/internal/java-error-codes.js +6 -0
  44. package/dist/lib/shared/internal/java-error-codes.js.map +1 -0
  45. package/dist/lib/shared/internal/module/agent-availability-module.d.ts +14 -0
  46. package/dist/lib/shared/internal/module/agent-availability-module.js +13 -0
  47. package/dist/lib/shared/internal/module/agent-availability-module.js.map +1 -0
  48. package/dist/lib/shared/internal/module/base-general-module.d.ts +31 -0
  49. package/dist/lib/shared/internal/module/base-general-module.js +46 -0
  50. package/dist/lib/shared/internal/module/base-general-module.js.map +1 -0
  51. package/dist/lib/shared/internal/module/conversation-module.d.ts +57 -0
  52. package/dist/lib/shared/internal/module/conversation-module.js +49 -0
  53. package/dist/lib/shared/internal/module/conversation-module.js.map +1 -0
  54. package/dist/lib/shared/internal/module/module.d.ts +10 -0
  55. package/dist/lib/shared/internal/module/module.js +16 -0
  56. package/dist/lib/shared/internal/module/module.js.map +1 -0
  57. package/dist/lib/shared/internal/unblu-api-factory.d.ts +9 -0
  58. package/dist/lib/shared/internal/unblu-api-factory.js +2 -0
  59. package/dist/lib/shared/internal/unblu-api-factory.js.map +1 -0
  60. package/dist/lib/shared/internal/unblu-util.d.ts +63 -0
  61. package/dist/lib/shared/internal/unblu-util.js +220 -0
  62. package/dist/lib/shared/internal/unblu-util.js.map +1 -0
  63. package/dist/lib/shared/internal/util/event-emitter.d.ts +44 -0
  64. package/dist/lib/shared/internal/util/event-emitter.js +85 -0
  65. package/dist/lib/shared/internal/util/event-emitter.js.map +1 -0
  66. package/dist/lib/shared/model/agent-availability-state.d.ts +18 -0
  67. package/dist/lib/shared/model/agent-availability-state.js +20 -0
  68. package/dist/lib/shared/model/agent-availability-state.js.map +1 -0
  69. package/dist/lib/shared/model/call-state.d.ts +26 -0
  70. package/dist/lib/shared/model/call-state.js +28 -0
  71. package/dist/lib/shared/model/call-state.js.map +1 -0
  72. package/dist/lib/shared/model/configuration.d.ts +46 -0
  73. package/dist/lib/shared/model/configuration.js +2 -0
  74. package/dist/lib/shared/model/configuration.js.map +1 -0
  75. package/dist/lib/shared/model/connection-state.d.ts +27 -0
  76. package/dist/lib/shared/model/connection-state.js +29 -0
  77. package/dist/lib/shared/model/connection-state.js.map +1 -0
  78. package/dist/lib/shared/model/conversation-info.d.ts +34 -0
  79. package/dist/lib/shared/model/conversation-info.js +2 -0
  80. package/dist/lib/shared/model/conversation-info.js.map +1 -0
  81. package/dist/lib/shared/model/conversation-message-info.d.ts +14 -0
  82. package/dist/lib/shared/model/conversation-message-info.js +2 -0
  83. package/dist/lib/shared/model/conversation-message-info.js.map +1 -0
  84. package/dist/lib/shared/model/conversation-recipient-type.d.ts +10 -0
  85. package/dist/lib/shared/model/conversation-recipient-type.js +12 -0
  86. package/dist/lib/shared/model/conversation-recipient-type.js.map +1 -0
  87. package/dist/lib/shared/model/conversation-recipient.d.ts +14 -0
  88. package/dist/lib/shared/model/conversation-recipient.js +2 -0
  89. package/dist/lib/shared/model/conversation-recipient.js.map +1 -0
  90. package/dist/lib/shared/model/conversation-state.d.ts +37 -0
  91. package/dist/lib/shared/model/conversation-state.js +39 -0
  92. package/dist/lib/shared/model/conversation-state.js.map +1 -0
  93. package/dist/lib/shared/model/conversation-type.d.ts +43 -0
  94. package/dist/lib/shared/model/conversation-type.js +45 -0
  95. package/dist/lib/shared/model/conversation-type.js.map +1 -0
  96. package/dist/lib/shared/model/customaction/custom-action-invocation.d.ts +27 -0
  97. package/dist/lib/shared/model/customaction/custom-action-invocation.js +2 -0
  98. package/dist/lib/shared/model/customaction/custom-action-invocation.js.map +1 -0
  99. package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.d.ts +6 -0
  100. package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.js +2 -0
  101. package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.js.map +1 -0
  102. package/dist/lib/shared/model/customaction/custom-message-action-invocation.d.ts +16 -0
  103. package/dist/lib/shared/model/customaction/custom-message-action-invocation.js +2 -0
  104. package/dist/lib/shared/model/customaction/custom-message-action-invocation.js.map +1 -0
  105. package/dist/lib/shared/model/customaction/custom-person-action-invocation.d.ts +11 -0
  106. package/dist/lib/shared/model/customaction/custom-person-action-invocation.js +2 -0
  107. package/dist/lib/shared/model/customaction/custom-person-action-invocation.js.map +1 -0
  108. package/dist/lib/shared/model/invitation-status.d.ts +14 -0
  109. package/dist/lib/shared/model/invitation-status.js +16 -0
  110. package/dist/lib/shared/model/invitation-status.js.map +1 -0
  111. package/dist/lib/shared/model/invitation.d.ts +24 -0
  112. package/dist/lib/shared/model/invitation.js +2 -0
  113. package/dist/lib/shared/model/invitation.js.map +1 -0
  114. package/dist/lib/shared/model/new-conversation-interceptor-result.d.ts +14 -0
  115. package/dist/lib/shared/model/new-conversation-interceptor-result.js +2 -0
  116. package/dist/lib/shared/model/new-conversation-interceptor-result.js.map +1 -0
  117. package/dist/lib/shared/model/person-info.d.ts +4 -0
  118. package/dist/lib/shared/model/person-info.js +2 -0
  119. package/dist/lib/shared/model/person-info.js.map +1 -0
  120. package/dist/lib/shared/new-conversation-interceptor.d.ts +24 -0
  121. package/dist/lib/shared/new-conversation-interceptor.js +2 -0
  122. package/dist/lib/shared/new-conversation-interceptor.js.map +1 -0
  123. package/dist/lib/shared/unblu-api-error.d.ts +117 -0
  124. package/dist/lib/shared/unblu-api-error.js +122 -0
  125. package/dist/lib/shared/unblu-api-error.js.map +1 -0
  126. package/dist/lib/unblu-api-ui.d.ts +137 -0
  127. package/dist/lib/unblu-api-ui.js +199 -0
  128. package/dist/lib/unblu-api-ui.js.map +1 -0
  129. package/dist/lib/unblu-api.d.ts +363 -0
  130. package/dist/lib/unblu-api.js +433 -0
  131. package/dist/lib/unblu-api.js.map +1 -0
  132. package/dist/lib/unblu-static-api.d.ts +237 -0
  133. package/dist/lib/unblu-static-api.js +318 -0
  134. package/dist/lib/unblu-static-api.js.map +1 -0
  135. package/package.json +23 -0
@@ -0,0 +1,85 @@
1
+ export class EventEmitter {
2
+ constructor() {
3
+ this.listeners = {};
4
+ }
5
+ /**
6
+ * Resets the emitter by removing all registered listeners.
7
+ */
8
+ reset() {
9
+ this.listeners = {};
10
+ }
11
+ /**
12
+ * Adds an event listeners
13
+ * @param event the event to listen to
14
+ * @param listener the listener to be called.
15
+ */
16
+ on(event, listener) {
17
+ this.listeners[event] = this.listeners[event] || [];
18
+ if (this.listeners[event].indexOf(listener) === -1)
19
+ this.listeners[event].push(listener);
20
+ }
21
+ /**
22
+ * removes a previously registered listener
23
+ * @param event the event
24
+ * @param listener the listener that should be removed.
25
+ * @return `true` if the listener was removed, `false` otherwise.
26
+ */
27
+ off(event, listener) {
28
+ const listeners = this.listeners[event] || [];
29
+ const index = listeners.indexOf(listener);
30
+ if (index > -1) {
31
+ listeners.splice(index, 1);
32
+ return true;
33
+ }
34
+ return false;
35
+ }
36
+ /**
37
+ * removes all listeners for the given event.
38
+ * @param event the event for which all listeners will be removed.
39
+ */
40
+ offAll(event) {
41
+ delete this.listeners[event];
42
+ }
43
+ /**
44
+ * Checks weather at least one listener exists for a given event.
45
+ * @param event the event to check for
46
+ * @return weather or not any listeners for the given event are registered.
47
+ */
48
+ hasListeners(event) {
49
+ return this.listeners[event] != null && this.listeners[event].length > 0;
50
+ }
51
+ /**
52
+ * Returns all events that have at least one listeners registered to them.
53
+ * @return An array containing all events that have at least one listener.
54
+ * If no listeners are registered at all, an empty array will be returned.
55
+ */
56
+ getEventsWithListeners() {
57
+ const events = [];
58
+ for (let event in this.listeners) {
59
+ if (this.listeners[event].length)
60
+ events.push(event);
61
+ }
62
+ return events;
63
+ }
64
+ /**
65
+ * Emits an event dispatching it to all listeners registered for it.
66
+ * @param event the event name.
67
+ * @param data the event data.
68
+ */
69
+ emit(event, data) {
70
+ const listeners = this.listeners[event];
71
+ if (listeners) {
72
+ //iterate over a copy of the array as otherwise if listeners unregister themself,
73
+ //it will change the array and iteration will skip them
74
+ [...listeners].forEach(l => {
75
+ try {
76
+ l(data);
77
+ }
78
+ catch (e) {
79
+ console.warn('Error dispatching event:', event, 'in listener:', l, e);
80
+ }
81
+ });
82
+ }
83
+ }
84
+ }
85
+ //# sourceMappingURL=event-emitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-emitter.js","sourceRoot":"","sources":["../../../../../src/shared/internal/util/event-emitter.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,YAAY;IAAzB;QACY,cAAS,GAAuC,EAAE,CAAC;IAuF/D,CAAC;IArFG;;OAEG;IACI,KAAK;QACR,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,EAAE,CAAC,KAAa,EAAE,QAAkB;QACvC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACpD,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC9C,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,KAAa,EAAE,QAAa;QAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1C,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;YACZ,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,KAAa;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED;;;;OAIG;IACH,sBAAsB;QAClB,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE;YAC9B,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM;gBAC5B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1B;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,KAAa,EAAE,IAAU;QAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,SAAS,EAAE;YACX,iFAAiF;YACjF,uDAAuD;YACvD,CAAC,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBACvB,IAAI;oBACA,CAAC,CAAC,IAAI,CAAC,CAAC;iBACX;gBAAC,OAAO,CAAC,EAAE;oBACR,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;iBACzE;YACL,CAAC,CAAC,CAAC;SACN;IACL,CAAC;CAEJ"}
@@ -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,20 @@
1
+ export var AgentAvailabilityState;
2
+ (function (AgentAvailabilityState) {
3
+ /**
4
+ * There is at least one agent available for the specified named area and locale.
5
+ */
6
+ AgentAvailabilityState["AVAILABLE"] = "AVAILABLE";
7
+ /**
8
+ * 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.
9
+ *
10
+ * It is very likely, that an agent will be available in a short time.
11
+ */
12
+ AgentAvailabilityState["BUSY"] = "BUSY";
13
+ /**
14
+ * There is currently no agent handling any inbound queue items.
15
+ *
16
+ * It is very unlikely, that an agent will be available in a short time.
17
+ */
18
+ AgentAvailabilityState["UNAVAILABLE"] = "UNAVAILABLE";
19
+ })(AgentAvailabilityState || (AgentAvailabilityState = {}));
20
+ //# sourceMappingURL=agent-availability-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-availability-state.js","sourceRoot":"","sources":["../../../../src/shared/model/agent-availability-state.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAiBX;AAjBD,WAAY,sBAAsB;IAC9B;;OAEA;IACA,iDAAuB,CAAA;IAC1B;;;;OAIG;IACA,uCAAa,CAAA;IACb;;;;OAIA;IACA,qDAA2B,CAAA;AAC/B,CAAC,EAjBW,sBAAsB,KAAtB,sBAAsB,QAiBjC"}
@@ -0,0 +1,26 @@
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.
12
+ */
13
+ ACTIVE_JOINED = "ACTIVE_JOINED",
14
+ /**
15
+ * A call is active but the local person has declined it.
16
+ */
17
+ ACTIVE_NOT_JOINED = "ACTIVE_NOT_JOINED",
18
+ /**
19
+ * A call is active and the local person has joined it on an other device.
20
+ */
21
+ ACTIVE_JOINED_ELSEWHERE = "ACTIVE_JOINED_ELSEWHERE",
22
+ /**
23
+ * No inbound, outgoing or active call.
24
+ */
25
+ NONE = "NONE"
26
+ }
@@ -0,0 +1,28 @@
1
+ export var CallState;
2
+ (function (CallState) {
3
+ /**
4
+ * A some one is trying to call, the phone is ringing
5
+ */
6
+ CallState["INBOUND"] = "INBOUND";
7
+ /**
8
+ * You are trying to call someone
9
+ */
10
+ CallState["OUTBOUND"] = "OUTBOUND";
11
+ /**
12
+ * A call is active and the local tab is connected to the call.
13
+ */
14
+ CallState["ACTIVE_JOINED"] = "ACTIVE_JOINED";
15
+ /**
16
+ * A call is active but the local person has declined it.
17
+ */
18
+ CallState["ACTIVE_NOT_JOINED"] = "ACTIVE_NOT_JOINED";
19
+ /**
20
+ * A call is active and the local person has joined it on an other device.
21
+ */
22
+ CallState["ACTIVE_JOINED_ELSEWHERE"] = "ACTIVE_JOINED_ELSEWHERE";
23
+ /**
24
+ * No inbound, outgoing or active call.
25
+ */
26
+ CallState["NONE"] = "NONE";
27
+ })(CallState || (CallState = {}));
28
+ //# sourceMappingURL=call-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-state.js","sourceRoot":"","sources":["../../../../src/shared/model/call-state.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAyBX;AAzBD,WAAY,SAAS;IACjB;;OAEG;IACH,gCAAmB,CAAA;IACnB;;OAEG;IACH,kCAAqB,CAAA;IACrB;;OAEG;IACH,4CAA+B,CAAA;IAC/B;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,gEAAmD,CAAA;IACnD;;OAEG;IACH,0BAAa,CAAA;AACjB,CAAC,EAzBW,SAAS,KAAT,SAAS,QAyBpB"}
@@ -0,0 +1,46 @@
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 URL of the Unblu server to connect to.
12
+ *
13
+ * @default If not set, the domain of the current page is used.
14
+ */
15
+ serverUrl?: string;
16
+ /**
17
+ * The public path used with {@link serverUrl} to connect to Unblu.
18
+ *
19
+ * @default If not set, '/unblu' is used.
20
+ */
21
+ entryPath?: string;
22
+ /**
23
+ * The locale to use for all Unblu translation texts.
24
+ *
25
+ * @default If not set, the browser's locale will be used.
26
+ */
27
+ locale?: string;
28
+ /**
29
+ * The named area to be used.
30
+ * The named area determines the queue that conversation requests go to, the agent availability, and the configuration.
31
+ *
32
+ * @default If not set, the named area specified in the HTML `meta` element named `unblu:named-area` is used.
33
+ * If no such element is present, the named area associated with the current domain is used.
34
+ */
35
+ namedArea?: string;
36
+ /**
37
+ * The timeout in milliseconds for the Unblu integration to load.
38
+ *
39
+ * @default 30'000 (30 seconds)
40
+ */
41
+ initTimeout?: number;
42
+ /**
43
+ * The access token used to log the user in before initializing Unblu.
44
+ */
45
+ accessToken?: string;
46
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../src/shared/model/configuration.ts"],"names":[],"mappings":""}
@@ -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,29 @@
1
+ export var ConnectionState;
2
+ (function (ConnectionState) {
3
+ /**
4
+ * Initial state before connection establishment has started
5
+ */
6
+ ConnectionState["INITIAL"] = "INITIAL";
7
+ /**
8
+ * State during the first connection to the server
9
+ */
10
+ ConnectionState["CONNECTING"] = "CONNECTING";
11
+ /**
12
+ * The connection has been successfully established.
13
+ */
14
+ ConnectionState["CONNECTED"] = "CONNECTED";
15
+ /**
16
+ * The connection has been lost, reconnect is active.
17
+ */
18
+ ConnectionState["RECONNECTING"] = "RECONNECTING";
19
+ /**
20
+ * The connection has been successfully closed.
21
+ *
22
+ */
23
+ ConnectionState["CLOSED"] = "CLOSED";
24
+ /**
25
+ * A fatal error has occurred. The connection has been permanently lost. No reconnect will be be possible.
26
+ */
27
+ ConnectionState["ERROR"] = "ERROR";
28
+ })(ConnectionState || (ConnectionState = {}));
29
+ //# sourceMappingURL=connection-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-state.js","sourceRoot":"","sources":["../../../../src/shared/model/connection-state.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eA+BX;AA/BD,WAAY,eAAe;IACvB;;OAEG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,4CAAyB,CAAA;IAEzB;;OAEG;IACH,0CAAuB,CAAA;IAEvB;;OAEG;IACH,gDAA6B,CAAA;IAE7B;;;OAGG;IACH,oCAAiB,CAAA;IAEjB;;OAEG;IACH,kCAAe,CAAA;AACnB,CAAC,EA/BW,eAAe,KAAf,eAAe,QA+B1B"}
@@ -0,0 +1,34 @@
1
+ export interface ConversationInfo {
2
+ /**
3
+ * The Id of the conversation.
4
+ */
5
+ id: string;
6
+ /**
7
+ * The Id of the assignee person (typically an agent). May be null if no agent is part of the conversation yet.
8
+ */
9
+ assigneeId?: string;
10
+ /**
11
+ * The Id of the context person (typically the visitor).
12
+ */
13
+ contextPersonId: string;
14
+ /**
15
+ * Conversation is ended.
16
+ */
17
+ ended: boolean;
18
+ /**
19
+ * Conversation creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
20
+ */
21
+ creationTimestamp: number;
22
+ /**
23
+ * Notification count of this conversation.
24
+ */
25
+ notificationCount: number;
26
+ /**
27
+ * The name of the current recipient of the conversation.
28
+ */
29
+ recipient: string;
30
+ /**
31
+ * Topic of the conversation, may be null if not set.
32
+ */
33
+ topic?: string;
34
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=conversation-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-info.js","sourceRoot":"","sources":["../../../../src/shared/model/conversation-info.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=conversation-message-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-message-info.js","sourceRoot":"","sources":["../../../../src/shared/model/conversation-message-info.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export declare enum ConversationRecipientType {
2
+ /**
3
+ * The recipient type for a conversation is an agent
4
+ */
5
+ AGENT = "AGENT",
6
+ /**
7
+ * The recipient type for a conversation is a team
8
+ */
9
+ TEAM = "TEAM"
10
+ }
@@ -0,0 +1,12 @@
1
+ export var ConversationRecipientType;
2
+ (function (ConversationRecipientType) {
3
+ /**
4
+ * The recipient type for a conversation is an agent
5
+ */
6
+ ConversationRecipientType["AGENT"] = "AGENT";
7
+ /**
8
+ * The recipient type for a conversation is a team
9
+ */
10
+ ConversationRecipientType["TEAM"] = "TEAM";
11
+ })(ConversationRecipientType || (ConversationRecipientType = {}));
12
+ //# sourceMappingURL=conversation-recipient-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-recipient-type.js","sourceRoot":"","sources":["../../../../src/shared/model/conversation-recipient-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,yBASX;AATD,WAAY,yBAAyB;IACjC;;OAEG;IACH,4CAAe,CAAA;IACf;;OAEG;IACH,0CAAa,CAAA;AACjB,CAAC,EATW,yBAAyB,KAAzB,yBAAyB,QASpC"}
@@ -0,0 +1,14 @@
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 type of the recipient
12
+ */
13
+ type: ConversationRecipientType;
14
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=conversation-recipient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-recipient.js","sourceRoot":"","sources":["../../../../src/shared/model/conversation-recipient.ts"],"names":[],"mappings":""}
@@ -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,39 @@
1
+ export var ConversationState;
2
+ (function (ConversationState) {
3
+ /**
4
+ * Initial state of a conversation
5
+ */
6
+ ConversationState["CREATED"] = "CREATED";
7
+ /**
8
+ * 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
9
+ * is doing his onboarding
10
+ */
11
+ ConversationState["ONBOARDING"] = "ONBOARDING";
12
+ /**
13
+ * 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
14
+ * conversation is doing the reboarding.
15
+ */
16
+ ConversationState["REBOARDING"] = "REBOARDING";
17
+ /**
18
+ * Depending of the engagement type of the conversation, the conversation is put in the queued state when it is inside the queue.
19
+ */
20
+ ConversationState["QUEUED"] = "QUEUED";
21
+ /**
22
+ * Conversation is active
23
+ */
24
+ ConversationState["ACTIVE"] = "ACTIVE";
25
+ /**
26
+ * 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
27
+ * again.
28
+ */
29
+ ConversationState["UNASSIGNED"] = "UNASSIGNED";
30
+ /**
31
+ * Conversation is being ended
32
+ */
33
+ ConversationState["OFFBOARDING"] = "OFFBOARDING";
34
+ /**
35
+ * Conversation is ended
36
+ */
37
+ ConversationState["ENDED"] = "ENDED";
38
+ })(ConversationState || (ConversationState = {}));
39
+ //# sourceMappingURL=conversation-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-state.js","sourceRoot":"","sources":["../../../../src/shared/model/conversation-state.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBA2CX;AA3CD,WAAY,iBAAiB;IACzB;;OAEG;IACH,wCAAmB,CAAA;IAEnB;;;OAGG;IACH,8CAAyB,CAAA;IAEzB;;;OAGG;IACH,8CAAyB,CAAA;IAEzB;;OAEG;IACH,sCAAiB,CAAA;IAEjB;;OAEG;IACH,sCAAiB,CAAA;IAEjB;;;OAGG;IACH,8CAAyB,CAAA;IAEzB;;OAEG;IACH,gDAA2B,CAAA;IAE3B;;OAEG;IACH,oCAAe,CAAA;AACnB,CAAC,EA3CW,iBAAiB,KAAjB,iBAAiB,QA2C5B"}
@@ -0,0 +1,43 @@
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
+ }
@@ -0,0 +1,45 @@
1
+ export var ConversationType;
2
+ (function (ConversationType) {
3
+ /**
4
+ * (Visitor initiated, visitor centered) A visitor creates an incoming chat conversation.
5
+ */
6
+ ConversationType["CHAT_REQUEST"] = "CHAT_REQUEST";
7
+ /**
8
+ * (Visitor initiated, visitor centered) A visitor creates an incoming chat conversation while all agents are offline.
9
+ */
10
+ ConversationType["OFFLINE_CHAT_REQUEST"] = "OFFLINE_CHAT_REQUEST";
11
+ /**
12
+ * (Visitor initiated, visitor centered) A visitor creates an incoming video conversation.
13
+ */
14
+ ConversationType["VIDEO_REQUEST"] = "VIDEO_REQUEST";
15
+ /**
16
+ * (Visitor initiated, visitor centered) A visitor creates an incoming audio conversation.
17
+ */
18
+ ConversationType["AUDIO_REQUEST"] = "AUDIO_REQUEST";
19
+ /**
20
+ * (Visitor initiated, visitor centered) A visitor creates an incoming universal co-browsing conversation.
21
+ */
22
+ ConversationType["HEADLESS_BROWSER_REQUEST"] = "HEADLESS_BROWSER_REQUEST";
23
+ /**
24
+ * (Visitor initiated, visitor centered) A visitor creates an incoming embedded co-browsing conversation.
25
+ */
26
+ ConversationType["DOMCAP_BROWSER_REQUEST"] = "DOMCAP_BROWSER_REQUEST";
27
+ /**
28
+ * (Visitor initiated, visitor centered) A visitor creates an incoming mobile co-browsing conversation.
29
+ */
30
+ ConversationType["MOBILE_COBROWSING_REQUEST"] = "MOBILE_COBROWSING_REQUEST";
31
+ /**
32
+ * (Visitor initiated, visitor centered) A visitor creates an incoming whiteboard conversation.
33
+ */
34
+ ConversationType["WHITEBOARD_REQUEST"] = "WHITEBOARD_REQUEST";
35
+ /**
36
+ * (Visitor initiated, visitor centered) A visitor creates an incoming screen sharing conversation.
37
+ */
38
+ ConversationType["SCREEN_SHARING_REQUEST"] = "SCREEN_SHARING_REQUEST";
39
+ /**
40
+ * (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
41
+ * embedded
42
+ */
43
+ ConversationType["VISITOR_COBROWSING"] = "VISITOR_COBROWSING";
44
+ })(ConversationType || (ConversationType = {}));
45
+ //# sourceMappingURL=conversation-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-type.js","sourceRoot":"","sources":["../../../../src/shared/model/conversation-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBA0CX;AA1CD,WAAY,gBAAgB;IACxB;;OAEG;IACH,iDAA6B,CAAA;IAC7B;;OAEG;IACH,iEAA6C,CAAA;IAC7C;;OAEG;IACH,mDAA+B,CAAA;IAC/B;;OAEG;IACH,mDAA+B,CAAA;IAC/B;;OAEG;IACH,yEAAqD,CAAA;IACrD;;OAEG;IACH,qEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAuD,CAAA;IACvD;;OAEG;IACH,6DAAyC,CAAA;IACzC;;OAEG;IACH,qEAAiD,CAAA;IACjD;;;OAGG;IACH,6DAAyC,CAAA;AAC7C,CAAC,EA1CW,gBAAgB,KAAhB,gBAAgB,QA0C3B"}
@@ -0,0 +1,27 @@
1
+ import { PersonInfo } from "../person-info";
2
+ import { ConversationInfo } from "../conversation-info";
3
+ /**
4
+ * CustomActionInvocation represents an event containing information about the invoked custom action
5
+ */
6
+ export interface CustomActionInvocation {
7
+ /**
8
+ * The invocation ID
9
+ */
10
+ invocationId: string;
11
+ /**
12
+ * The unique key of the invoked custom action
13
+ */
14
+ key: string;
15
+ /**
16
+ * UTC timestamp, in milliseconds, of the custom action invocation
17
+ */
18
+ invocationTimestamp: number;
19
+ /**
20
+ * The person who invoked the custom action
21
+ */
22
+ invokingPerson: PersonInfo;
23
+ /**
24
+ * The conversation the custom action was invoked in
25
+ */
26
+ conversation: ConversationInfo;
27
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=custom-action-invocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-action-invocation.js","sourceRoot":"","sources":["../../../../../src/shared/model/customaction/custom-action-invocation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { CustomActionInvocation } from "./custom-action-invocation";
2
+ /**
3
+ * Custom conversation action invocation
4
+ */
5
+ export interface CustomConversationActionInvocation extends CustomActionInvocation {
6
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=custom-conversation-action-invocation.js.map