@unblu/embedded-app-component 7.44.1 → 8.1.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.
- package/dist/lib/index.d.ts +8 -5
- package/dist/lib/index.js +5 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/shared/conversation.d.ts +1 -64
- package/dist/lib/shared/conversation.js +1 -76
- package/dist/lib/shared/conversation.js.map +1 -1
- package/dist/lib/shared/internal/module/base-general-module.d.ts +7 -3
- package/dist/lib/shared/internal/module/base-general-module.js +8 -0
- package/dist/lib/shared/internal/module/base-general-module.js.map +1 -1
- package/dist/lib/shared/internal/module/conversation-module.d.ts +0 -15
- package/dist/lib/shared/internal/module/conversation-module.js +0 -15
- package/dist/lib/shared/internal/module/conversation-module.js.map +1 -1
- package/dist/lib/shared/internal/{unblu-api-factory.d.ts → unblu-floating-api.d.ts} +7 -1
- package/dist/lib/shared/internal/unblu-floating-api.js +2 -0
- package/dist/lib/shared/internal/unblu-floating-api.js.map +1 -0
- package/dist/lib/shared/internal/unblu-util.d.ts +2 -2
- package/dist/lib/shared/internal/unblu-util.js +2 -2
- package/dist/lib/shared/internal/unblu-util.js.map +1 -1
- package/dist/lib/shared/model/conversation-info.d.ts +18 -14
- package/dist/lib/shared/model/conversation-participant.d.ts +15 -0
- package/dist/lib/shared/model/conversation-participant.js +2 -0
- package/dist/lib/shared/model/conversation-participant.js.map +1 -0
- package/dist/lib/shared/model/conversation-participation-type.d.ts +18 -0
- package/dist/lib/shared/model/conversation-participation-type.js +20 -0
- package/dist/lib/shared/model/conversation-participation-type.js.map +1 -0
- package/dist/lib/shared/model/conversation-recipient-type.d.ts +11 -3
- package/dist/lib/shared/model/conversation-recipient-type.js +10 -2
- package/dist/lib/shared/model/conversation-recipient-type.js.map +1 -1
- package/dist/lib/shared/model/conversation-recipient.d.ts +6 -2
- package/dist/lib/shared/model/new-conversation-interceptor-result.d.ts +2 -2
- package/dist/lib/shared/model/new-conversation-recipient-type.d.ts +10 -0
- package/dist/lib/shared/model/new-conversation-recipient-type.js +12 -0
- package/dist/lib/shared/model/new-conversation-recipient-type.js.map +1 -0
- package/dist/lib/shared/model/new-conversation-recipient.d.ts +14 -0
- package/dist/lib/shared/model/new-conversation-recipient.js +2 -0
- package/dist/lib/shared/model/new-conversation-recipient.js.map +1 -0
- package/dist/lib/shared/model/person-info.d.ts +1 -0
- package/dist/lib/shared/new-conversation-interceptor.d.ts +8 -8
- package/dist/lib/shared/unblu-api-error.d.ts +3 -3
- package/dist/lib/shared/unblu-api-error.js +3 -3
- package/dist/lib/unblu-embedded-api.d.ts +14 -2
- package/dist/lib/unblu-embedded-api.js +18 -0
- package/dist/lib/unblu-embedded-api.js.map +1 -1
- package/dist/lib/unblu-embedded-app-element.d.ts +1 -1
- package/dist/lib/unblu-embedded-app-element.js +1 -1
- package/dist/lib/web-types.json +1 -1
- package/package.json +2 -3
- package/dist/lib/shared/internal/unblu-api-factory.js +0 -2
- package/dist/lib/shared/internal/unblu-api-factory.js.map +0 -1
- package/dist/lib/shared/model/invitation-status.d.ts +0 -14
- package/dist/lib/shared/model/invitation-status.js +0 -16
- package/dist/lib/shared/model/invitation-status.js.map +0 -1
- package/dist/lib/shared/model/invitation.d.ts +0 -24
- package/dist/lib/shared/model/invitation.js +0 -2
- package/dist/lib/shared/model/invitation.js.map +0 -1
package/dist/lib/index.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { CallState } from "./shared/model/call-state";
|
|
|
3
3
|
import { ConnectionState } from './shared/model/connection-state';
|
|
4
4
|
import { ConversationType } from './shared/model/conversation-type';
|
|
5
5
|
import { ConversationRecipientType } from "./shared/model/conversation-recipient-type";
|
|
6
|
+
import { NewConversationRecipientType } from "./shared/model/new-conversation-recipient-type";
|
|
7
|
+
import { ConversationParticipationType } from "./shared/model/conversation-participation-type";
|
|
6
8
|
import { AgentAvailabilityState } from "./shared/model/agent-availability-state";
|
|
7
9
|
import { ViewMode } from "./view-mode";
|
|
8
|
-
import { InvitationStatus } from "./shared/model/invitation-status";
|
|
9
10
|
import { UnbluApiError, UnbluErrorType } from "./shared/unblu-api-error";
|
|
10
11
|
import { ConversationState } from "./shared/model/conversation-state";
|
|
11
12
|
import { ConversationEventType } from "./shared/internal/module/conversation-module";
|
|
12
|
-
import { CallStateListener, ConnectionStateListener, ConversationStateListener, CustomActionInvocationListener
|
|
13
|
+
import { CallStateListener, ConnectionStateListener, ConversationStateListener, CustomActionInvocationListener } from "./shared/conversation";
|
|
13
14
|
export { UnbluEmbeddedAppElement, StateChangeEvent, ReadyEvent, ErrorEvent, DeinitializationStartedEvent, DeinitializationFinishedEvent, ActiveConversationChangeEvent, FullscreenChangeEvent, ViewModeChangeEvent } from "./unblu-embedded-app-element";
|
|
14
15
|
export { UnbluEmbeddedApi, ActiveConversationChangeListener, AgentAvailabilityChangeListener, AgentAvailableChangeListener, ConversationsChangeListener, DeinitializationListener, NotificationCountChangeListener, PersonChangeListener, PersonActivityListener, FullscreenChangeListener, ViewModeChangeListener } from "./unblu-embedded-api";
|
|
15
16
|
export { PersonInfo } from "./shared/model/person-info";
|
|
@@ -18,9 +19,10 @@ export { ConversationInfo } from "./shared/model/conversation-info";
|
|
|
18
19
|
export { NewConversationInterceptor } from "./shared/new-conversation-interceptor";
|
|
19
20
|
export { NewConversationInterceptorResult } from "./shared/model/new-conversation-interceptor-result";
|
|
20
21
|
export { ConversationRecipient } from "./shared/model/conversation-recipient";
|
|
21
|
-
export {
|
|
22
|
+
export { NewConversationRecipient } from "./shared/model/new-conversation-recipient";
|
|
23
|
+
export { ConversationParticipant } from "./shared/model/conversation-participant";
|
|
22
24
|
export { CustomActionInvocation } from "./shared/model/customaction/custom-action-invocation";
|
|
23
|
-
export { ApiState, CallState, ConnectionState, ConversationType, ConversationState, ConversationEventType, ConversationRecipientType, AgentAvailabilityState, ViewMode,
|
|
25
|
+
export { ApiState, CallState, ConnectionState, ConversationType, ConversationState, ConversationEventType, ConversationRecipientType, NewConversationRecipientType, ConversationParticipationType, AgentAvailabilityState, ViewMode, UnbluErrorType, UnbluApiError, ConnectionStateListener, ConversationStateListener, CallStateListener, CustomActionInvocationListener, };
|
|
24
26
|
declare const _default: {
|
|
25
27
|
ApiState: typeof ApiState;
|
|
26
28
|
CallState: typeof CallState;
|
|
@@ -28,9 +30,10 @@ declare const _default: {
|
|
|
28
30
|
ConversationState: typeof ConversationState;
|
|
29
31
|
ConversationType: typeof ConversationType;
|
|
30
32
|
ConversationRecipientType: typeof ConversationRecipientType;
|
|
33
|
+
NewConversationRecipientType: typeof NewConversationRecipientType;
|
|
34
|
+
ConversationParticipationType: typeof ConversationParticipationType;
|
|
31
35
|
AgentAvailabilityState: typeof AgentAvailabilityState;
|
|
32
36
|
ViewMode: typeof ViewMode;
|
|
33
|
-
InvitationStatus: typeof InvitationStatus;
|
|
34
37
|
UnbluErrorType: typeof UnbluErrorType;
|
|
35
38
|
};
|
|
36
39
|
export default _default;
|
package/dist/lib/index.js
CHANGED
|
@@ -3,15 +3,16 @@ import { CallState } from "./shared/model/call-state";
|
|
|
3
3
|
import { ConnectionState } from './shared/model/connection-state';
|
|
4
4
|
import { ConversationType } from './shared/model/conversation-type';
|
|
5
5
|
import { ConversationRecipientType } from "./shared/model/conversation-recipient-type";
|
|
6
|
+
import { NewConversationRecipientType } from "./shared/model/new-conversation-recipient-type";
|
|
7
|
+
import { ConversationParticipationType } from "./shared/model/conversation-participation-type";
|
|
6
8
|
import { AgentAvailabilityState } from "./shared/model/agent-availability-state";
|
|
7
9
|
import { ViewMode } from "./view-mode";
|
|
8
|
-
import { InvitationStatus } from "./shared/model/invitation-status";
|
|
9
10
|
import { UnbluApiError, UnbluErrorType } from "./shared/unblu-api-error";
|
|
10
11
|
import { ConversationState } from "./shared/model/conversation-state";
|
|
11
12
|
export { UnbluEmbeddedAppElement } from "./unblu-embedded-app-element";
|
|
12
13
|
export { UnbluEmbeddedApi } from "./unblu-embedded-api";
|
|
13
14
|
export { Conversation } from "./shared/conversation";
|
|
14
|
-
export { ApiState, CallState, ConnectionState, ConversationType, ConversationState, ConversationRecipientType, AgentAvailabilityState, ViewMode,
|
|
15
|
+
export { ApiState, CallState, ConnectionState, ConversationType, ConversationState, ConversationRecipientType, NewConversationRecipientType, ConversationParticipationType, AgentAvailabilityState, ViewMode, UnbluErrorType, UnbluApiError, };
|
|
15
16
|
export default {
|
|
16
17
|
ApiState,
|
|
17
18
|
CallState,
|
|
@@ -19,9 +20,10 @@ export default {
|
|
|
19
20
|
ConversationState,
|
|
20
21
|
ConversationType,
|
|
21
22
|
ConversationRecipientType,
|
|
23
|
+
NewConversationRecipientType,
|
|
24
|
+
ConversationParticipationType,
|
|
22
25
|
AgentAvailabilityState,
|
|
23
26
|
ViewMode,
|
|
24
|
-
InvitationStatus,
|
|
25
27
|
UnbluErrorType
|
|
26
28
|
};
|
|
27
29
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAC,yBAAyB,EAAC,MAAM,4CAA4C,CAAA;AACpF,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAC,yBAAyB,EAAC,MAAM,4CAA4C,CAAA;AACpF,OAAO,EAAC,4BAA4B,EAAC,MAAM,gDAAgD,CAAA;AAC3F,OAAO,EAAC,6BAA6B,EAAC,MAAM,gDAAgD,CAAA;AAC5F,OAAO,EAAC,sBAAsB,EAAC,MAAM,yCAAyC,CAAA;AAC9E,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;AACpC,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAAC,iBAAiB,EAAC,MAAM,mCAAmC,CAAC;AASpE,OAAO,EACH,uBAAuB,EAS1B,MAAM,8BAA8B,CAAA;AAErC,OAAO,EACH,gBAAgB,EAWnB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAA;AAQlD,OAAO,EACH,QAAQ,EACR,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EAEjB,yBAAyB,EACzB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,aAAa,GAKhB,CAAA;AAED,eAAe;IACX,QAAQ;IACR,SAAS;IACT,eAAe;IACf,iBAAiB;IACjB,gBAAgB;IAChB,yBAAyB;IACzB,4BAA4B;IAC5B,6BAA6B;IAC7B,sBAAsB;IACtB,QAAQ;IACR,cAAc;CACjB,CAAA"}
|
|
@@ -3,12 +3,10 @@ import { ConversationEventType, ConversationModule } from './internal/module/con
|
|
|
3
3
|
import { Listener } from './internal/util/event-emitter';
|
|
4
4
|
import { ConversationState } from './model/conversation-state';
|
|
5
5
|
import { ConnectionState } from './model/connection-state';
|
|
6
|
-
import { Invitation } from "./model/invitation";
|
|
7
6
|
import { CustomActionInvocation } from './model/customaction/custom-action-invocation';
|
|
8
7
|
export type ConnectionStateListener = (connectionState: ConnectionState) => void;
|
|
9
8
|
export type ConversationStateListener = (conversationState: ConversationState) => void;
|
|
10
9
|
export type CallStateListener = (callState: CallState) => void;
|
|
11
|
-
export type InvitationsListener = (invitations: Invitation[]) => void;
|
|
12
10
|
/**
|
|
13
11
|
* Listener called whenever a custom action invocation triggers an API event for the client
|
|
14
12
|
* @param customActionInvocation The details of the custom action invocation
|
|
@@ -60,13 +58,6 @@ export declare class Conversation {
|
|
|
60
58
|
* @see {@link on} for listener registration
|
|
61
59
|
*/
|
|
62
60
|
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
61
|
/**
|
|
71
62
|
* 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
63
|
*
|
|
@@ -118,13 +109,6 @@ export declare class Conversation {
|
|
|
118
109
|
* @see {@link CLOSE}
|
|
119
110
|
*/
|
|
120
111
|
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
112
|
/**
|
|
129
113
|
* Registers an event listener for the given event.
|
|
130
114
|
* @param event The customActionInvocation event.
|
|
@@ -171,59 +155,12 @@ export declare class Conversation {
|
|
|
171
155
|
* or is rejected with a {@link UnbluApiError} if the call fails.
|
|
172
156
|
*/
|
|
173
157
|
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
158
|
/**
|
|
216
159
|
* Set custom visitor data on the conversation.
|
|
217
160
|
*
|
|
218
161
|
* @param visitorData Custom data for the visitor in any format.
|
|
219
162
|
*/
|
|
220
163
|
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
164
|
/**
|
|
228
165
|
* Starts a voice call in this conversation.
|
|
229
166
|
*
|
|
@@ -280,7 +217,7 @@ export declare class Conversation {
|
|
|
280
217
|
* The conversation can be joined again either via the UI or using {@link UnbluApi.openConversation}.
|
|
281
218
|
* @see {@link CLOSE} fired after this call.
|
|
282
219
|
* @see {@link endConversation} for details on ending a conversation.
|
|
283
|
-
* @see {@link
|
|
220
|
+
* @see {@link leaveConversation} for details on leaving a conversation.
|
|
284
221
|
* @see {@link destroy} for details on destroying a conversation.
|
|
285
222
|
* @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
|
|
286
223
|
*/
|
|
@@ -67,12 +67,6 @@ export class Conversation {
|
|
|
67
67
|
this.eventEmitter.emit(event.name, event.data.callState);
|
|
68
68
|
};
|
|
69
69
|
break;
|
|
70
|
-
case Conversation.INVITATIONS_CHANGE:
|
|
71
|
-
internalListener = (event) => {
|
|
72
|
-
if (event.data.conversationId == this.conversationId)
|
|
73
|
-
this.eventEmitter.emit(event.name, event.data.invitations);
|
|
74
|
-
};
|
|
75
|
-
break;
|
|
76
70
|
case Conversation.CUSTOM_ACTION_INVOCATION:
|
|
77
71
|
internalListener = (event) => {
|
|
78
72
|
if (event.data.conversation.id == this.conversationId)
|
|
@@ -139,59 +133,6 @@ export class Conversation {
|
|
|
139
133
|
this.checkNotDestroyed();
|
|
140
134
|
return this.conversationModule.getCallState(this.conversationId);
|
|
141
135
|
}
|
|
142
|
-
/**
|
|
143
|
-
* Creates a new PIN invitation for this conversation.
|
|
144
|
-
*
|
|
145
|
-
* - If the local person doesn't have the right to invite a visitor,
|
|
146
|
-
* the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
|
|
147
|
-
* @see {@link INVITATIONS_CHANGE} if you need to listen to changes for new invitations on this conversation.
|
|
148
|
-
* @return A promise that resolves to a new {@link Invitation} object with all relevant metadata.
|
|
149
|
-
* or is rejected with a {@link UnbluApiError} if the call fails.
|
|
150
|
-
*/
|
|
151
|
-
async createAnonymousPinInvitation() {
|
|
152
|
-
this.checkNotDestroyed();
|
|
153
|
-
return this.conversationModule.createAnonymousPinInvitation(this.conversationId);
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Creates a new EMail invitation for this conversation.
|
|
157
|
-
*
|
|
158
|
-
* - If the local person doesn't have the right to invite a visitor,
|
|
159
|
-
* the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
|
|
160
|
-
* - If a non valid email address is provided,
|
|
161
|
-
* the returned promise will be rejected with the unblu error type {@link UnbluErrorType.INVALID_FUNCTION_ARGUMENTS}.
|
|
162
|
-
* @param email The email which the invitation should be send. It must be a valid email address.
|
|
163
|
-
* @see {@link INVITATIONS_CHANGE} If you need to listen to changes for new invitations on this conversation.
|
|
164
|
-
* @return A promise that resolves to a new {@link Invitation} object with all relevant metadata.
|
|
165
|
-
* or is rejected with a {@link UnbluApiError} if the call fails.
|
|
166
|
-
*/
|
|
167
|
-
async createAnonymousEmailInvitation(email) {
|
|
168
|
-
this.checkNotDestroyed();
|
|
169
|
-
return this.conversationModule.createAnonymousEmailInvitation(this.conversationId, email);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Revoke an invitation.
|
|
173
|
-
*
|
|
174
|
-
* - If the local person doesn't have the right to invite a visitor,
|
|
175
|
-
* the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
|
|
176
|
-
* @param invitationId The invitation id.
|
|
177
|
-
* @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
|
|
178
|
-
*/
|
|
179
|
-
async revokeInvitation(invitationId) {
|
|
180
|
-
this.checkNotDestroyed();
|
|
181
|
-
return this.conversationModule.revokeInvitation(this.conversationId, invitationId);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Renews an invitation PIN if the invitation is expired.
|
|
185
|
-
*
|
|
186
|
-
* - If the local person doesn't have the right to invite a visitor,
|
|
187
|
-
* the returned promise will be rejected with the unblu error type {@link UnbluErrorType.ACTION_NOT_GRANTED}.
|
|
188
|
-
* @param invitationId The invitation id.
|
|
189
|
-
* @return A promise that resolves to a new {@link Invitation} object with all relevant metadata.
|
|
190
|
-
*/
|
|
191
|
-
async renewInvitationPin(invitationId) {
|
|
192
|
-
this.checkNotDestroyed();
|
|
193
|
-
return this.conversationModule.renewInvitationPin(this.conversationId, invitationId);
|
|
194
|
-
}
|
|
195
136
|
/**
|
|
196
137
|
* Set custom visitor data on the conversation.
|
|
197
138
|
*
|
|
@@ -201,15 +142,6 @@ export class Conversation {
|
|
|
201
142
|
this.checkNotDestroyed();
|
|
202
143
|
return this.conversationModule.setVisitorData(visitorData);
|
|
203
144
|
}
|
|
204
|
-
/**
|
|
205
|
-
* Get all visitor invitations created by the local person for this conversation.
|
|
206
|
-
* @return A promise that resolves to a new {@link Invitation} array with all relevant metadata.
|
|
207
|
-
* or is rejected with a {@link UnbluApiError} if the call fails.
|
|
208
|
-
*/
|
|
209
|
-
async getInvitations() {
|
|
210
|
-
this.checkNotDestroyed();
|
|
211
|
-
return this.conversationModule.getInvitations(this.conversationId);
|
|
212
|
-
}
|
|
213
145
|
/**
|
|
214
146
|
* Starts a voice call in this conversation.
|
|
215
147
|
*
|
|
@@ -278,7 +210,7 @@ export class Conversation {
|
|
|
278
210
|
* The conversation can be joined again either via the UI or using {@link UnbluApi.openConversation}.
|
|
279
211
|
* @see {@link CLOSE} fired after this call.
|
|
280
212
|
* @see {@link endConversation} for details on ending a conversation.
|
|
281
|
-
* @see {@link
|
|
213
|
+
* @see {@link leaveConversation} for details on leaving a conversation.
|
|
282
214
|
* @see {@link destroy} for details on destroying a conversation.
|
|
283
215
|
* @return A Promise that resolves to null or is rejected with a {@link UnbluApiError} if the call fails.
|
|
284
216
|
*/
|
|
@@ -366,13 +298,6 @@ Conversation.END = 'end';
|
|
|
366
298
|
* @see {@link on} for listener registration
|
|
367
299
|
*/
|
|
368
300
|
Conversation.CLOSE = 'close';
|
|
369
|
-
/**
|
|
370
|
-
* Event emitted when an {@link Invitation} is added to or removed from this conversation, or if an existing invitation changes.
|
|
371
|
-
* The event emits an array of all visitor invitations created by the local person, all other invitations will not be present.
|
|
372
|
-
* @event invitationsChange
|
|
373
|
-
* @see {@link on} for listener registration
|
|
374
|
-
*/
|
|
375
|
-
Conversation.INVITATIONS_CHANGE = 'invitationsChange';
|
|
376
301
|
/**
|
|
377
302
|
* 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
|
|
378
303
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../../src/shared/conversation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../../src/shared/conversation.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAC,YAAY,EAAW,MAAM,+BAA+B,CAAA;AA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B,IAAI,IAAI,CAAC,SAAS;YAAE,MAAM,IAAI,aAAa,CAAC,cAAc,CAAC,aAAa,EAAE,mEAAmE,CAAC,CAAA;IAClJ,CAAC;IAED;;;;;;;;OAQG;IACI,WAAW;QACd,OAAO,IAAI,CAAC,SAAS,CAAA;IACzB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACI,OAAO;QACV,IAAI,IAAI,CAAC,SAAS;YAAE,OAAM;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;QACrB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;QACzB,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACtC,IAAI,CAAC,WAAW,CAAC,KAA8B,CAAC,CAAA;SACnD;IACL,CAAC;;AA5WD;;;;GAIG;AACoB,oCAAuB,GAA4B,uBAAuB,AAAnD,CAAmD;AAEjG;;;;GAIG;AACoB,sCAAyB,GAA8B,yBAAyB,AAAvD,CAAuD;AAEvG;;;;GAIG;AACoB,8BAAiB,GAAsB,iBAAiB,AAAvC,CAAuC;AAE/E;;;;;GAKG;AACoB,gBAAG,GAAU,KAAK,AAAf,CAAe;AAEzC;;;;;;;GAOG;AACoB,kBAAK,GAAY,OAAO,AAAnB,CAAmB;AAE/C;;;;;;GAMG;AACoB,qCAAwB,GAA6B,wBAAwB,AAArD,CAAqD"}
|
|
@@ -4,7 +4,7 @@ import { NewConversationInterceptor } from "../../new-conversation-interceptor";
|
|
|
4
4
|
import { ConversationType } from "../../model/conversation-type";
|
|
5
5
|
import { PersonInfo } from "../../model/person-info";
|
|
6
6
|
import { ConversationInfo } from "../../model/conversation-info";
|
|
7
|
-
import {
|
|
7
|
+
import { NewConversationRecipient } from "../../model/new-conversation-recipient";
|
|
8
8
|
export type BaseGeneralEventType = 'activeConversationChange' | 'conversationsChange' | 'notificationCountChange' | 'personChange' | 'personActivity';
|
|
9
9
|
export declare enum BaseGeneralFunction {
|
|
10
10
|
startConversation = "startConversation",
|
|
@@ -15,11 +15,13 @@ export declare enum BaseGeneralFunction {
|
|
|
15
15
|
getConversations = "getConversations",
|
|
16
16
|
getNotificationCount = "getNotificationCount",
|
|
17
17
|
getPersonInfo = "getPersonInfo",
|
|
18
|
-
setPersonNickname = "setPersonNickname"
|
|
18
|
+
setPersonNickname = "setPersonNickname",
|
|
19
|
+
addPersonLabel = "addPersonLabel",
|
|
20
|
+
removePersonLabel = "removePersonLabel"
|
|
19
21
|
}
|
|
20
22
|
export declare class BaseGeneralModule<T extends string | BaseGeneralFunction, E extends BaseGeneralEventType | string> extends InternalModule<BaseGeneralFunction | T, E> {
|
|
21
23
|
constructor(bridge: ApiBridge);
|
|
22
|
-
startConversation(type: ConversationType, visitorName?: string, visitorData?: string, recipient?:
|
|
24
|
+
startConversation(type: ConversationType, visitorName?: string, visitorData?: string, recipient?: NewConversationRecipient): Promise<string>;
|
|
23
25
|
setNewConversationInterceptor(callback: NewConversationInterceptor): Promise<void>;
|
|
24
26
|
joinConversation(pin: string, visitorName?: string): Promise<string>;
|
|
25
27
|
openConversation(conversationId: string): Promise<void>;
|
|
@@ -28,4 +30,6 @@ export declare class BaseGeneralModule<T extends string | BaseGeneralFunction, E
|
|
|
28
30
|
getNotificationCount(): Promise<number>;
|
|
29
31
|
getPersonInfo(): Promise<PersonInfo>;
|
|
30
32
|
setPersonNickname(nickname: string): Promise<void>;
|
|
33
|
+
addPersonLabel(labelName: string): Promise<void>;
|
|
34
|
+
removePersonLabel(labelName: string): Promise<void>;
|
|
31
35
|
}
|
|
@@ -10,6 +10,8 @@ export var BaseGeneralFunction;
|
|
|
10
10
|
BaseGeneralFunction["getNotificationCount"] = "getNotificationCount";
|
|
11
11
|
BaseGeneralFunction["getPersonInfo"] = "getPersonInfo";
|
|
12
12
|
BaseGeneralFunction["setPersonNickname"] = "setPersonNickname";
|
|
13
|
+
BaseGeneralFunction["addPersonLabel"] = "addPersonLabel";
|
|
14
|
+
BaseGeneralFunction["removePersonLabel"] = "removePersonLabel";
|
|
13
15
|
})(BaseGeneralFunction || (BaseGeneralFunction = {}));
|
|
14
16
|
export class BaseGeneralModule extends InternalModule {
|
|
15
17
|
constructor(bridge) {
|
|
@@ -42,5 +44,11 @@ export class BaseGeneralModule extends InternalModule {
|
|
|
42
44
|
setPersonNickname(nickname) {
|
|
43
45
|
return this.callApiFunction(BaseGeneralFunction.setPersonNickname, [nickname]);
|
|
44
46
|
}
|
|
47
|
+
addPersonLabel(labelName) {
|
|
48
|
+
return this.callApiFunction(BaseGeneralFunction.addPersonLabel, [labelName]);
|
|
49
|
+
}
|
|
50
|
+
removePersonLabel(labelName) {
|
|
51
|
+
return this.callApiFunction(BaseGeneralFunction.removePersonLabel, [labelName]);
|
|
52
|
+
}
|
|
45
53
|
}
|
|
46
54
|
//# sourceMappingURL=base-general-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-general-module.js","sourceRoot":"","sources":["../../../../../src/shared/internal/module/base-general-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;AAcvC,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"base-general-module.js","sourceRoot":"","sources":["../../../../../src/shared/internal/module/base-general-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;AAcvC,MAAM,CAAN,IAAY,mBAYX;AAZD,WAAY,mBAAmB;IAC3B,8DAAuC,CAAA;IACvC,sFAA+D,CAAA;IAC/D,4DAAqC,CAAA;IACrC,4DAAqC,CAAA;IACrC,sEAA+C,CAAA;IAC/C,4DAAqC,CAAA;IACrC,oEAA6C,CAAA;IAC7C,sDAA+B,CAAA;IAC/B,8DAAuC,CAAA;IACvC,wDAAiC,CAAA;IACjC,8DAAuC,CAAA;AAC3C,CAAC,EAZW,mBAAmB,KAAnB,mBAAmB,QAY9B;AAED,MAAM,OAAO,iBAAmG,SAAQ,cAA0C;IAC9J,YAAY,MA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EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAClF,CAAC;IAEM,cAAc,CAAC,SAAiB;QACnC,OAAO,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAChF,CAAC;IAEM,iBAAiB,CAAC,SAAiB;QACtC,OAAO,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IACnF,CAAC;CACJ"}
|
|
@@ -3,7 +3,6 @@ import { ApiBridge } from '../api-bridge';
|
|
|
3
3
|
import { CallState } from '../../model/call-state';
|
|
4
4
|
import { ConversationState } from '../../model/conversation-state';
|
|
5
5
|
import { ConnectionState } from '../../model/connection-state';
|
|
6
|
-
import { Invitation } from "../../model/invitation";
|
|
7
6
|
export interface ConversationCallState {
|
|
8
7
|
conversationId: string;
|
|
9
8
|
callState: CallState;
|
|
@@ -16,10 +15,6 @@ export interface ConversationWithState {
|
|
|
16
15
|
conversationId: string;
|
|
17
16
|
conversationState: ConversationState;
|
|
18
17
|
}
|
|
19
|
-
export interface ConversationInvitations {
|
|
20
|
-
conversationId: string;
|
|
21
|
-
invitations: Invitation[];
|
|
22
|
-
}
|
|
23
18
|
export type ConversationEventType = 'connectionStateChange' | 'conversationStateChange' | 'end' | 'close' | 'personChange' | 'callStateChange' | 'invitationsChange' | 'customActionInvocation';
|
|
24
19
|
declare const enum ConversationFunction {
|
|
25
20
|
getConnectionState = "getConnectionState",
|
|
@@ -30,11 +25,6 @@ declare const enum ConversationFunction {
|
|
|
30
25
|
endConversation = "endConversation",
|
|
31
26
|
leaveConversation = "leaveConversation",
|
|
32
27
|
closeConversation = "closeConversation",
|
|
33
|
-
createAnonymousPinInvitation = "createAnonymousPinInvitation",
|
|
34
|
-
createAnonymousEmailInvitation = "createAnonymousEmailInvitation",
|
|
35
|
-
getInvitations = "getInvitations",
|
|
36
|
-
revokeInvitation = "revokeInvitation",
|
|
37
|
-
renewInvitationPin = "renewInvitationPin",
|
|
38
28
|
setVisitorData = "setVisitorData"
|
|
39
29
|
}
|
|
40
30
|
export declare class ConversationModule extends InternalModule<ConversationFunction, ConversationEventType> {
|
|
@@ -47,11 +37,6 @@ export declare class ConversationModule extends InternalModule<ConversationFunct
|
|
|
47
37
|
endConversation(conversationId: string): Promise<void>;
|
|
48
38
|
leaveConversation(conversationId: string): Promise<void>;
|
|
49
39
|
closeConversation(conversationId: string): Promise<void>;
|
|
50
|
-
createAnonymousPinInvitation(conversationId: string): Promise<Invitation>;
|
|
51
|
-
createAnonymousEmailInvitation(conversationId: string, email: String): Promise<Invitation>;
|
|
52
|
-
getInvitations(conversationId: string): Promise<Invitation[]>;
|
|
53
|
-
revokeInvitation(conversationId: string, invitationId: String): Promise<void>;
|
|
54
|
-
renewInvitationPin(conversationId: string, invitationId: String): Promise<Invitation>;
|
|
55
40
|
setVisitorData(visitorData: String): Promise<void>;
|
|
56
41
|
}
|
|
57
42
|
export {};
|
|
@@ -27,21 +27,6 @@ export class ConversationModule extends InternalModule {
|
|
|
27
27
|
closeConversation(conversationId) {
|
|
28
28
|
return this.callApiFunction("closeConversation" /* ConversationFunction.closeConversation */, [conversationId]);
|
|
29
29
|
}
|
|
30
|
-
createAnonymousPinInvitation(conversationId) {
|
|
31
|
-
return this.callApiFunction("createAnonymousPinInvitation" /* ConversationFunction.createAnonymousPinInvitation */, [conversationId]);
|
|
32
|
-
}
|
|
33
|
-
createAnonymousEmailInvitation(conversationId, email) {
|
|
34
|
-
return this.callApiFunction("createAnonymousEmailInvitation" /* ConversationFunction.createAnonymousEmailInvitation */, [conversationId, email]);
|
|
35
|
-
}
|
|
36
|
-
async getInvitations(conversationId) {
|
|
37
|
-
return this.callApiFunction("getInvitations" /* ConversationFunction.getInvitations */, [conversationId]);
|
|
38
|
-
}
|
|
39
|
-
async revokeInvitation(conversationId, invitationId) {
|
|
40
|
-
return this.callApiFunction("revokeInvitation" /* ConversationFunction.revokeInvitation */, [conversationId, invitationId]);
|
|
41
|
-
}
|
|
42
|
-
async renewInvitationPin(conversationId, invitationId) {
|
|
43
|
-
return this.callApiFunction("renewInvitationPin" /* ConversationFunction.renewInvitationPin */, [conversationId, invitationId]);
|
|
44
|
-
}
|
|
45
30
|
async setVisitorData(visitorData) {
|
|
46
31
|
return this.callApiFunction("setVisitorData" /* ConversationFunction.setVisitorData */, [visitorData]);
|
|
47
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-module.js","sourceRoot":"","sources":["../../../../../src/shared/internal/module/conversation-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"conversation-module.js","sourceRoot":"","sources":["../../../../../src/shared/internal/module/conversation-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;AA4CvC,MAAM,OAAO,kBAAmB,SAAQ,cAA2D;IAC/F,YAAY,MAAiB;QACzB,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACjC,CAAC;IAEM,kBAAkB,CAAC,cAAsB;QAC5C,OAAO,IAAI,CAAC,eAAe,qEAA0C,CAAC,cAAc,CAAC,CAAC,CAAA;IAC1F,CAAC;IAEM,oBAAoB,CAAC,cAAsB;QAC9C,OAAO,IAAI,CAAC,eAAe,yEAA4C,CAAC,cAAc,CAAC,CAAC,CAAA;IAC5F,CAAC;IAEM,YAAY,CAAC,cAAsB;QACtC,OAAO,IAAI,CAAC,eAAe,yDAAoC,CAAC,cAAc,CAAC,CAAC,CAAA;IACpF,CAAC;IAEM,cAAc,CAAC,cAAsB;QACxC,OAAO,IAAI,CAAC,eAAe,6DAAsC,CAAC,cAAc,CAAC,CAAC,CAAA;IACtF,CAAC;IAEM,cAAc,CAAC,cAAsB;QACxC,OAAO,IAAI,CAAC,eAAe,6DAAsC,CAAC,cAAc,CAAC,CAAC,CAAA;IACtF,CAAC;IAEM,eAAe,CAAC,cAAsB;QACzC,OAAO,IAAI,CAAC,eAAe,+DAAuC,CAAC,cAAc,CAAC,CAAC,CAAA;IACvF,CAAC;IAEM,iBAAiB,CAAC,cAAsB;QAC3C,OAAO,IAAI,CAAC,eAAe,mEAAyC,CAAC,cAAc,CAAC,CAAC,CAAA;IACzF,CAAC;IAEM,iBAAiB,CAAC,cAAsB;QAC3C,OAAO,IAAI,CAAC,eAAe,mEAAyC,CAAC,cAAc,CAAC,CAAC,CAAA;IACzF,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,WAAmB;QAC3C,OAAO,IAAI,CAAC,eAAe,6DAAsC,CAAC,WAAW,CAAC,CAAC,CAAC;IACpF,CAAC;CACJ"}
|
|
@@ -3,7 +3,13 @@ import { InitializedUnbluApi } from "./initialized-unblu-api";
|
|
|
3
3
|
/**
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
|
-
export declare interface
|
|
6
|
+
export declare interface UnbluFloatingApi {
|
|
7
|
+
api: UnbluFloatingApiFactory;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare interface UnbluFloatingApiFactory {
|
|
7
13
|
initialize(): Promise<InitializedUnbluApi>;
|
|
8
14
|
getApiState(): ApiState;
|
|
9
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unblu-floating-api.js","sourceRoot":"","sources":["../../../../src/shared/internal/unblu-floating-api.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UnbluApiFactory } from "./unblu-api-factory";
|
|
2
1
|
import { InitializedUnbluElement } from "./initialized-unblu-element";
|
|
3
2
|
import { Configuration } from "../model/configuration";
|
|
3
|
+
import { UnbluFloatingApi } from "./unblu-floating-api";
|
|
4
4
|
export declare enum IntegrationType {
|
|
5
5
|
embedded = "embedded",
|
|
6
6
|
floating = "floating"
|
|
@@ -14,7 +14,7 @@ declare enum EntryPoint {
|
|
|
14
14
|
* Internal type definition of the unblu object.
|
|
15
15
|
*/
|
|
16
16
|
export interface UnbluObject {
|
|
17
|
-
|
|
17
|
+
floating?: UnbluFloatingApi;
|
|
18
18
|
/**
|
|
19
19
|
* internal unblu field
|
|
20
20
|
* @hidden
|
|
@@ -192,10 +192,10 @@ export class UnbluUtil {
|
|
|
192
192
|
if (!UnbluUtil.isUnbluLoaded(IntegrationType.floating)) {
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
const apiState = UnbluUtil.getUnbluObject().api.getApiState();
|
|
195
|
+
const apiState = UnbluUtil.getUnbluObject().floating.api.getApiState();
|
|
196
196
|
let unbluApi;
|
|
197
197
|
if (apiState == ApiState.INITIALIZING || apiState == ApiState.INITIALIZED) {
|
|
198
|
-
unbluApi = await UnbluUtil.getUnbluObject().api.initialize();
|
|
198
|
+
unbluApi = await UnbluUtil.getUnbluObject().floating.api.initialize();
|
|
199
199
|
await unbluApi.deinitialize();
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unblu-util.js","sourceRoot":"","sources":["../../../../src/shared/internal/unblu-util.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB;;GAEG;AACH,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"unblu-util.js","sourceRoot":"","sources":["../../../../src/shared/internal/unblu-util.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB;;GAEG;AACH,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAA;AAGrC,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAIjE,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;AACzB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED,IAAK,UAIJ;AAJD,WAA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AAA;YACjE,IAAI,UAAU,KAAK,kBAAkB,EAAE;gBACnC,SAAQ;aACX;YACD,OAAO,CAAC,GAAG,CAAC,+CAA+C,EAAE,UAAU,CAAC,CAAA;YACxE,MAAM,UAAU,CAAC,YAAY,EAAE,CAAA;SAClC;IACL,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,KAAa;QAClC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE;YACzB,OAAO,IAAI,CAAA;SACd;QACD,OAAO,KAAK,CAAA;IAChB,CAAC;CACJ"}
|
|
@@ -1,20 +1,16 @@
|
|
|
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";
|
|
1
5
|
export interface ConversationInfo {
|
|
2
6
|
/**
|
|
3
|
-
* The
|
|
7
|
+
* The ID of the conversation.
|
|
4
8
|
*/
|
|
5
9
|
id: string;
|
|
6
10
|
/**
|
|
7
|
-
*
|
|
11
|
+
* Conversation state.
|
|
8
12
|
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The Id of the context person (typically the visitor).
|
|
12
|
-
*/
|
|
13
|
-
contextPersonId: string;
|
|
14
|
-
/**
|
|
15
|
-
* Conversation is ended.
|
|
16
|
-
*/
|
|
17
|
-
ended: boolean;
|
|
13
|
+
state: ConversationState;
|
|
18
14
|
/**
|
|
19
15
|
* Conversation creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
|
20
16
|
*/
|
|
@@ -24,11 +20,19 @@ export interface ConversationInfo {
|
|
|
24
20
|
*/
|
|
25
21
|
notificationCount: number;
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
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
|
|
28
32
|
*/
|
|
29
|
-
recipient:
|
|
33
|
+
recipient: ConversationRecipient;
|
|
30
34
|
/**
|
|
31
|
-
* Topic of
|
|
35
|
+
* Topic of this conversation; null if not set
|
|
32
36
|
*/
|
|
33
37
|
topic?: string;
|
|
34
38
|
}
|
|
@@ -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
|
+
}
|