@unblu/embedded-app-component 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 (126) hide show
  1. package/LICENSE.md +184 -0
  2. package/README.md +21 -0
  3. package/dist/lib/index.d.ts +36 -0
  4. package/dist/lib/index.js +27 -0
  5. package/dist/lib/index.js.map +1 -0
  6. package/dist/lib/internal/internal-embedded-api.d.ts +16 -0
  7. package/dist/lib/internal/internal-embedded-api.js +18 -0
  8. package/dist/lib/internal/internal-embedded-api.js.map +1 -0
  9. package/dist/lib/internal/module/embedded-meta-module.d.ts +16 -0
  10. package/dist/lib/internal/module/embedded-meta-module.js +16 -0
  11. package/dist/lib/internal/module/embedded-meta-module.js.map +1 -0
  12. package/dist/lib/internal/module/general-module.d.ts +16 -0
  13. package/dist/lib/internal/module/general-module.js +16 -0
  14. package/dist/lib/internal/module/general-module.js.map +1 -0
  15. package/dist/lib/shared/api-state.d.ts +8 -0
  16. package/dist/lib/shared/api-state.js +10 -0
  17. package/dist/lib/shared/api-state.js.map +1 -0
  18. package/dist/lib/shared/conversation.d.ts +320 -0
  19. package/dist/lib/shared/conversation.js +384 -0
  20. package/dist/lib/shared/conversation.js.map +1 -0
  21. package/dist/lib/shared/internal/api-bridge.d.ts +36 -0
  22. package/dist/lib/shared/internal/api-bridge.js +97 -0
  23. package/dist/lib/shared/internal/api-bridge.js.map +1 -0
  24. package/dist/lib/shared/internal/event.d.ts +6 -0
  25. package/dist/lib/shared/internal/event.js +2 -0
  26. package/dist/lib/shared/internal/event.js.map +1 -0
  27. package/dist/lib/shared/internal/initialized-unblu-api.d.ts +6 -0
  28. package/dist/lib/shared/internal/initialized-unblu-api.js +2 -0
  29. package/dist/lib/shared/internal/initialized-unblu-api.js.map +1 -0
  30. package/dist/lib/shared/internal/initialized-unblu-element.d.ts +6 -0
  31. package/dist/lib/shared/internal/initialized-unblu-element.js +2 -0
  32. package/dist/lib/shared/internal/initialized-unblu-element.js.map +1 -0
  33. package/dist/lib/shared/internal/java-error-codes.d.ts +5 -0
  34. package/dist/lib/shared/internal/java-error-codes.js +6 -0
  35. package/dist/lib/shared/internal/java-error-codes.js.map +1 -0
  36. package/dist/lib/shared/internal/module/agent-availability-module.d.ts +14 -0
  37. package/dist/lib/shared/internal/module/agent-availability-module.js +13 -0
  38. package/dist/lib/shared/internal/module/agent-availability-module.js.map +1 -0
  39. package/dist/lib/shared/internal/module/base-general-module.d.ts +31 -0
  40. package/dist/lib/shared/internal/module/base-general-module.js +46 -0
  41. package/dist/lib/shared/internal/module/base-general-module.js.map +1 -0
  42. package/dist/lib/shared/internal/module/conversation-module.d.ts +57 -0
  43. package/dist/lib/shared/internal/module/conversation-module.js +49 -0
  44. package/dist/lib/shared/internal/module/conversation-module.js.map +1 -0
  45. package/dist/lib/shared/internal/module/module.d.ts +10 -0
  46. package/dist/lib/shared/internal/module/module.js +16 -0
  47. package/dist/lib/shared/internal/module/module.js.map +1 -0
  48. package/dist/lib/shared/internal/unblu-api-factory.d.ts +9 -0
  49. package/dist/lib/shared/internal/unblu-api-factory.js +2 -0
  50. package/dist/lib/shared/internal/unblu-api-factory.js.map +1 -0
  51. package/dist/lib/shared/internal/unblu-util.d.ts +63 -0
  52. package/dist/lib/shared/internal/unblu-util.js +220 -0
  53. package/dist/lib/shared/internal/unblu-util.js.map +1 -0
  54. package/dist/lib/shared/internal/util/event-emitter.d.ts +44 -0
  55. package/dist/lib/shared/internal/util/event-emitter.js +85 -0
  56. package/dist/lib/shared/internal/util/event-emitter.js.map +1 -0
  57. package/dist/lib/shared/model/agent-availability-state.d.ts +18 -0
  58. package/dist/lib/shared/model/agent-availability-state.js +20 -0
  59. package/dist/lib/shared/model/agent-availability-state.js.map +1 -0
  60. package/dist/lib/shared/model/call-state.d.ts +26 -0
  61. package/dist/lib/shared/model/call-state.js +28 -0
  62. package/dist/lib/shared/model/call-state.js.map +1 -0
  63. package/dist/lib/shared/model/configuration.d.ts +46 -0
  64. package/dist/lib/shared/model/configuration.js +2 -0
  65. package/dist/lib/shared/model/configuration.js.map +1 -0
  66. package/dist/lib/shared/model/connection-state.d.ts +27 -0
  67. package/dist/lib/shared/model/connection-state.js +29 -0
  68. package/dist/lib/shared/model/connection-state.js.map +1 -0
  69. package/dist/lib/shared/model/conversation-info.d.ts +34 -0
  70. package/dist/lib/shared/model/conversation-info.js +2 -0
  71. package/dist/lib/shared/model/conversation-info.js.map +1 -0
  72. package/dist/lib/shared/model/conversation-message-info.d.ts +14 -0
  73. package/dist/lib/shared/model/conversation-message-info.js +2 -0
  74. package/dist/lib/shared/model/conversation-message-info.js.map +1 -0
  75. package/dist/lib/shared/model/conversation-recipient-type.d.ts +10 -0
  76. package/dist/lib/shared/model/conversation-recipient-type.js +12 -0
  77. package/dist/lib/shared/model/conversation-recipient-type.js.map +1 -0
  78. package/dist/lib/shared/model/conversation-recipient.d.ts +14 -0
  79. package/dist/lib/shared/model/conversation-recipient.js +2 -0
  80. package/dist/lib/shared/model/conversation-recipient.js.map +1 -0
  81. package/dist/lib/shared/model/conversation-state.d.ts +37 -0
  82. package/dist/lib/shared/model/conversation-state.js +39 -0
  83. package/dist/lib/shared/model/conversation-state.js.map +1 -0
  84. package/dist/lib/shared/model/conversation-type.d.ts +43 -0
  85. package/dist/lib/shared/model/conversation-type.js +45 -0
  86. package/dist/lib/shared/model/conversation-type.js.map +1 -0
  87. package/dist/lib/shared/model/customaction/custom-action-invocation.d.ts +27 -0
  88. package/dist/lib/shared/model/customaction/custom-action-invocation.js +2 -0
  89. package/dist/lib/shared/model/customaction/custom-action-invocation.js.map +1 -0
  90. package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.d.ts +6 -0
  91. package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.js +2 -0
  92. package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.js.map +1 -0
  93. package/dist/lib/shared/model/customaction/custom-message-action-invocation.d.ts +16 -0
  94. package/dist/lib/shared/model/customaction/custom-message-action-invocation.js +2 -0
  95. package/dist/lib/shared/model/customaction/custom-message-action-invocation.js.map +1 -0
  96. package/dist/lib/shared/model/customaction/custom-person-action-invocation.d.ts +11 -0
  97. package/dist/lib/shared/model/customaction/custom-person-action-invocation.js +2 -0
  98. package/dist/lib/shared/model/customaction/custom-person-action-invocation.js.map +1 -0
  99. package/dist/lib/shared/model/invitation-status.d.ts +14 -0
  100. package/dist/lib/shared/model/invitation-status.js +16 -0
  101. package/dist/lib/shared/model/invitation-status.js.map +1 -0
  102. package/dist/lib/shared/model/invitation.d.ts +24 -0
  103. package/dist/lib/shared/model/invitation.js +2 -0
  104. package/dist/lib/shared/model/invitation.js.map +1 -0
  105. package/dist/lib/shared/model/new-conversation-interceptor-result.d.ts +14 -0
  106. package/dist/lib/shared/model/new-conversation-interceptor-result.js +2 -0
  107. package/dist/lib/shared/model/new-conversation-interceptor-result.js.map +1 -0
  108. package/dist/lib/shared/model/person-info.d.ts +4 -0
  109. package/dist/lib/shared/model/person-info.js +2 -0
  110. package/dist/lib/shared/model/person-info.js.map +1 -0
  111. package/dist/lib/shared/new-conversation-interceptor.d.ts +24 -0
  112. package/dist/lib/shared/new-conversation-interceptor.js +2 -0
  113. package/dist/lib/shared/new-conversation-interceptor.js.map +1 -0
  114. package/dist/lib/shared/unblu-api-error.d.ts +117 -0
  115. package/dist/lib/shared/unblu-api-error.js +122 -0
  116. package/dist/lib/shared/unblu-api-error.js.map +1 -0
  117. package/dist/lib/unblu-embedded-api.d.ts +537 -0
  118. package/dist/lib/unblu-embedded-api.js +473 -0
  119. package/dist/lib/unblu-embedded-api.js.map +1 -0
  120. package/dist/lib/unblu-embedded-app-element.d.ts +703 -0
  121. package/dist/lib/unblu-embedded-app-element.js +844 -0
  122. package/dist/lib/unblu-embedded-app-element.js.map +1 -0
  123. package/dist/lib/view-mode.d.ts +5 -0
  124. package/dist/lib/view-mode.js +7 -0
  125. package/dist/lib/view-mode.js.map +1 -0
  126. package/package.json +23 -0
@@ -0,0 +1,320 @@
1
+ import { CallState } from './model/call-state';
2
+ import { ConversationEventType, ConversationModule } from './internal/module/conversation-module';
3
+ import { Listener } from './internal/util/event-emitter';
4
+ import { ConversationState } from './model/conversation-state';
5
+ import { ConnectionState } from './model/connection-state';
6
+ import { Invitation } from "./model/invitation";
7
+ import { CustomActionInvocation } from './model/customaction/custom-action-invocation';
8
+ export type ConnectionStateListener = (connectionState: ConnectionState) => void;
9
+ export type ConversationStateListener = (conversationState: ConversationState) => void;
10
+ export type CallStateListener = (callState: CallState) => void;
11
+ export type InvitationsListener = (invitations: Invitation[]) => void;
12
+ /**
13
+ * Listener called whenever a custom action invocation triggers an API event for the client
14
+ * @param customActionInvocation The details of the custom action invocation
15
+ */
16
+ export type CustomActionInvocationListener = (customActionInvocation: CustomActionInvocation) => void;
17
+ /**
18
+ * #### This class gives API access to the currently active conversation.
19
+ *
20
+ * As long as a conversation is active one can register and receive the events provided by this class and call the methods.
21
+ * Once the conversation is closed this API object will be destroyed and no more event callbacks will be called.
22
+ * Any subsequent calls will fail.
23
+ *
24
+ * Use the {@link CLOSE} event to de-init any code connected to this conversation.
25
+ */
26
+ export declare class Conversation {
27
+ private conversationModule;
28
+ private conversationId;
29
+ /**
30
+ * Event emitted when the {@link ConnectionState} of this conversation changes.
31
+ * @event connectionStateChange
32
+ * @see {@link on} for listener registration
33
+ */
34
+ static readonly CONNECTION_STATE_CHANGE: 'connectionStateChange';
35
+ /**
36
+ * Event emitted when the {@link ConversationState} of this conversation changes.
37
+ * @event conversationStateChange
38
+ * @see {@link on} for listener registration
39
+ */
40
+ static readonly CONVERSATION_STATE_CHANGE: 'conversationStateChange';
41
+ /**
42
+ * Event emitted when the {@link CallState} of this conversation changes.
43
+ * @event callStateChange
44
+ * @see {@link on} for listener registration
45
+ */
46
+ static readonly CALL_STATE_CHANGE: 'callStateChange';
47
+ /**
48
+ * Event emitted when the conversation ends.
49
+ * @deprecated The end event is not always available, depending on the configuration. Use the {@link CONVERSATION_STATE_CHANGE} event instead.
50
+ * @event end
51
+ * @see {@link on} for listener registration
52
+ */
53
+ static readonly END: 'end';
54
+ /**
55
+ * Event emitted when the conversation is closed.
56
+ *
57
+ * This may happen due to a UI-navigation or an API-call.
58
+ *
59
+ * @event close
60
+ * @see {@link on} for listener registration
61
+ */
62
+ static readonly CLOSE: 'close';
63
+ /**
64
+ * Event emitted when an {@link Invitation} is added to or removed from this conversation, or if an existing invitation changes.
65
+ * The event emits an array of all visitor invitations created by the local person, all other invitations will not be present.
66
+ * @event invitationsChange
67
+ * @see {@link on} for listener registration
68
+ */
69
+ static readonly INVITATIONS_CHANGE: 'invitationsChange';
70
+ /**
71
+ * Event emitted every time a custom action is configured to trigger a JS API event for the current client when a custom action is invoked
72
+ *
73
+ * @event customActionInvocation
74
+ * @see {@link CustomActionInvocationListener}
75
+ * @see {@link on} for listener registration
76
+ */
77
+ static readonly CUSTOM_ACTION_INVOCATION: 'customActionInvocation';
78
+ private eventEmitter;
79
+ private internalListeners;
80
+ private destroyed;
81
+ /**
82
+ * @hidden
83
+ */
84
+ constructor(conversationModule: ConversationModule, conversationId: string);
85
+ /**
86
+ * Registers an event listener for the given event.
87
+ * @param event The call state change event.
88
+ * @param listener The listener to be called.
89
+ * @see {@link CONNECTION_STATE_CHANGE}
90
+ */
91
+ on(event: typeof Conversation.CONNECTION_STATE_CHANGE, listener: ConnectionStateListener): void;
92
+ /**
93
+ * Registers an event listener for the given event.
94
+ * @param event The conversation state change event.
95
+ * @param listener The listener to be called.
96
+ * @see {@link CONVERSATION_STATE_CHANGE}
97
+ */
98
+ on(event: typeof Conversation.CONVERSATION_STATE_CHANGE, listener: ConversationStateListener): void;
99
+ /**
100
+ * Registers an event listener for the given event.
101
+ * @param event The call state change event.
102
+ * @param listener The listener to be called.
103
+ * @see {@link CALL_STATE_CHANGE}
104
+ */
105
+ on(event: typeof Conversation.CALL_STATE_CHANGE, listener: CallStateListener): void;
106
+ /**
107
+ * Registers an event listener for the given event.
108
+ * @deprecated The end event is not always available, depending on the configuration. Use instead {@link CONVERSATION_STATE_CHANGE} event.
109
+ * @param event The end event.
110
+ * @param listener The listener to be called.
111
+ * @see {@link END}
112
+ */
113
+ on(event: typeof Conversation.END, listener: () => void): void;
114
+ /**
115
+ * Registers an event listener for the given event.
116
+ * @param event The close event.
117
+ * @param listener The listener to be called.
118
+ * @see {@link CLOSE}
119
+ */
120
+ on(event: typeof Conversation.CLOSE, listener: () => void): void;
121
+ /**
122
+ * Registers an event listener for the given event.
123
+ * @param event The invitations change event.
124
+ * @param listener The listener to be called.
125
+ * @see {@link INVITATIONS_CHANGE}
126
+ */
127
+ on(event: typeof Conversation.INVITATIONS_CHANGE, listener: InvitationsListener): void;
128
+ /**
129
+ * Registers an event listener for the given event.
130
+ * @param event The customActionInvocation event.
131
+ * @param listener The listener to be called.
132
+ * @see {@link CUSTOM_ACTION_INVOCATION}
133
+ */
134
+ on(event: typeof Conversation.CUSTOM_ACTION_INVOCATION, listener: CustomActionInvocationListener): void;
135
+ /**
136
+ * Removes a previously registered listener.
137
+ * @param event The event to unregister from.
138
+ * @param listener The listener to remove.
139
+ */
140
+ off(event: ConversationEventType, listener: Listener): boolean;
141
+ private onInternal;
142
+ private offInternal;
143
+ /**
144
+ * Returns the ID of this conversation.
145
+ */
146
+ getConversationId(): string;
147
+ /**
148
+ * Returns the current connection state the conversation is in.
149
+ *
150
+ * If the connection is lost, the conversation will automatically try to reconnect using an exponential back-off strategy.
151
+ * If a fatal error is detected, the state will change to {@link ConnectionState.ERROR}.
152
+ *
153
+ * If this happens, the conversation is in it's terminal state. A dialog or other UI will be displayed to the user with details on the failure.
154
+ * The conversation is not automatically closed in this case.
155
+ * It may either be closed through a manual action by the visitor (confirming the error) or via the API.
156
+ *
157
+ * @see {@link CONNECTION_STATE_CHANGE} if you need to listen to changes.
158
+ * @return A promise that resolves to the current connection state of the conversation
159
+ * or is rejected with a {@link UnbluApiError} if the call fails.
160
+ */
161
+ getConnectionState(): Promise<ConnectionState>;
162
+ /**
163
+ * Returns the current state the conversation is in.
164
+ * @return A promise that resolves to the current state of the conversation
165
+ * or is rejected with a {@link UnbluApiError} if the call fails.
166
+ */
167
+ getConversationState(): Promise<ConversationState>;
168
+ /**
169
+ * @see {@link CALL_STATE_CHANGE} if you need to listen to changes.
170
+ * @return A promise that resolves to the current call state of the local user
171
+ * or is rejected with a {@link UnbluApiError} if the call fails.
172
+ */
173
+ getCallState(): Promise<CallState>;
174
+ /**
175
+ * Creates a new PIN invitation for this conversation.
176
+ *
177
+ * - If the local person doesn't have the right to invite a visitor,
178
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
179
+ * @see {@link INVITATIONS_CHANGE} if you need to listen to changes for new invitations on this conversation.
180
+ * @return A promise that resolves to a new {@link Invitation} object with all relevant metadata.
181
+ * or is rejected with a {@link UnbluApiError} if the call fails.
182
+ */
183
+ createAnonymousPinInvitation(): Promise<Invitation>;
184
+ /**
185
+ * Creates a new EMail invitation for this conversation.
186
+ *
187
+ * - If the local person doesn't have the right to invite a visitor,
188
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
189
+ * - If a non valid email address is provided,
190
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.INVALID_FUNCTION_ARGUMENTS}.
191
+ * @param email The email which the invitation should be send. It must be a valid email address.
192
+ * @see {@link INVITATIONS_CHANGE} If you need to listen to changes for new invitations on this conversation.
193
+ * @return A promise that resolves to a new {@link Invitation} object with all relevant metadata.
194
+ * or is rejected with a {@link UnbluApiError} if the call fails.
195
+ */
196
+ createAnonymousEmailInvitation(email: String): Promise<Invitation>;
197
+ /**
198
+ * Revoke an invitation.
199
+ *
200
+ * - If the local person doesn't have the right to invite a visitor,
201
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
202
+ * @param invitationId The invitation id.
203
+ * @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
204
+ */
205
+ revokeInvitation(invitationId: String): Promise<void>;
206
+ /**
207
+ * Renews an invitation PIN if the invitation is expired.
208
+ *
209
+ * - If the local person doesn't have the right to invite a visitor,
210
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
211
+ * @param invitationId The invitation id.
212
+ * @return A promise that resolves to a new {@link Invitation} object with all relevant metadata.
213
+ */
214
+ renewInvitationPin(invitationId: String): Promise<Invitation>;
215
+ /**
216
+ * Set custom visitor data on the conversation.
217
+ *
218
+ * @param visitorData Custom data for the visitor in any format.
219
+ */
220
+ setVisitorData(visitorData: String): Promise<void>;
221
+ /**
222
+ * Get all visitor invitations created by the local person for this conversation.
223
+ * @return A promise that resolves to a new {@link Invitation} array with all relevant metadata.
224
+ * or is rejected with a {@link UnbluApiError} if the call fails.
225
+ */
226
+ getInvitations(): Promise<Invitation[]>;
227
+ /**
228
+ * Starts a voice call in this conversation.
229
+ *
230
+ * - If a call is already active, this call will be ignored.
231
+ * - If the local person doesn't have the right to start a voice call,
232
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
233
+ * @see {@link CALL_STATE_CHANGE} If you need to listen to changes.
234
+ * @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
235
+ */
236
+ startAudioCall(): Promise<void>;
237
+ /**
238
+ * Starts a video call in this conversation.
239
+ *
240
+ * - If a call is already active, this call will be ignored.
241
+ * - If the local person doesn't have the right to start a video call,
242
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
243
+ * @see {@link CALL_STATE_CHANGE} If you need to listen to changes.
244
+ * @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
245
+ */
246
+ startVideoCall(): Promise<void>;
247
+ /**
248
+ * Ends and closes this conversation.
249
+ *
250
+ * If the local person doesn't have the right to end the conversation,
251
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
252
+ * @see {@link END} fired after this call.
253
+ * @see {@link closeConversation} for details on closing a conversation.
254
+ * @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
255
+ */
256
+ endConversation(): Promise<void>;
257
+ /**
258
+ * Leaves and closes this conversation.
259
+ *
260
+ * By leaving, the visitor is removed from the active participant list of the conversation.
261
+ * Once a conversation is left, the visitor can not re-open it. It will not be visible in the conversation history either.
262
+ *
263
+ * If the local person doesn't have the right to leave the conversation,
264
+ * the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
265
+ * @see {@link CLOSE} fired after this call.
266
+ * @see {@link closeConversation} for details on closing a conversation without leaving.
267
+ * @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
268
+ */
269
+ leaveConversation(): Promise<void>;
270
+ /**
271
+ * Closes this conversation locally.
272
+ *
273
+ * When called, the connection to this conversation is closed and the overview is displayed.
274
+ *
275
+ * **Note that:**
276
+ * - Closing does NOT end the conversation.
277
+ * - The person does NOT leave the conversation.
278
+ * - All Conversation api instances for this conversation will be destroyed.
279
+ *
280
+ * The conversation can be joined again either via the UI or using {@link UnbluApi.openConversation}.
281
+ * @see {@link CLOSE} fired after this call.
282
+ * @see {@link endConversation} for details on ending a conversation.
283
+ * @see {@link leavingConversation} for details on leaving a conversation.
284
+ * @see {@link destroy} for details on destroying a conversation.
285
+ * @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
286
+ */
287
+ closeConversation(): Promise<void>;
288
+ private checkNotDestroyed;
289
+ /**
290
+ * Returns weather this conversation is destroyed or not.
291
+ *
292
+ * Conversations are destroyed if {@link destroy} is called or the conversation is closed.
293
+ * This usually happens when the user navigates back to an overview or into an other conversation.
294
+ * @see {@link destroy}
295
+ * @see {@link CLOSE}
296
+ * @return Weather this conversation is destroyed or not.
297
+ */
298
+ isDestroyed(): boolean;
299
+ /**
300
+ * Destroys this conversation API instance.
301
+ *
302
+ * Calling destroy will unregister all event listeners and prohibit any further calls to this object.
303
+ * Once the conversation is destroyed, any subsequent calls will reject the returned promise with {@link UnbluErrorType.ILLEGAL_STATE} as the reason.
304
+ *
305
+ * **Note that:**
306
+ * - Destroying does NOT close the conversation .
307
+ * - Destroying does NOT end the conversation.
308
+ * - Destroying does NOT leave the conversation.
309
+ * - Other instances of the same Conversation will NOT be destroyed.
310
+ *
311
+ * This call simply destroys this local API instance to the conversation.
312
+ *
313
+ * A destroyed but still open conversation can be accessed again using {@link UnbluApi.getActiveConversation}.
314
+ *
315
+ * @see {@link isDestroyed}
316
+ * @see {@link closeConversation} for details on how to close a conversation
317
+ * @see {@link endConversation} for details on how to end a conversation
318
+ */
319
+ destroy(): void;
320
+ }