@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.
- package/LICENSE.md +184 -0
- package/README.md +26 -0
- package/dist/lib/index.d.ts +93 -0
- package/dist/lib/index.js +49 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/internal/internal-api.d.ts +18 -0
- package/dist/lib/internal/internal-api.js +20 -0
- package/dist/lib/internal/internal-api.js.map +1 -0
- package/dist/lib/internal/module/general-lazy-module.d.ts +17 -0
- package/dist/lib/internal/module/general-lazy-module.js +16 -0
- package/dist/lib/internal/module/general-lazy-module.js.map +1 -0
- package/dist/lib/internal/module/general-module.d.ts +31 -0
- package/dist/lib/internal/module/general-module.js +37 -0
- package/dist/lib/internal/module/general-module.js.map +1 -0
- package/dist/lib/internal/module/meta-module.d.ts +17 -0
- package/dist/lib/internal/module/meta-module.js +19 -0
- package/dist/lib/internal/module/meta-module.js.map +1 -0
- package/dist/lib/model/individualui_component.d.ts +29 -0
- package/dist/lib/model/individualui_component.js +2 -0
- package/dist/lib/model/individualui_component.js.map +1 -0
- package/dist/lib/model/individualui_state.d.ts +14 -0
- package/dist/lib/model/individualui_state.js +2 -0
- package/dist/lib/model/individualui_state.js.map +1 -0
- package/dist/lib/shared/api-state.d.ts +8 -0
- package/dist/lib/shared/api-state.js +10 -0
- package/dist/lib/shared/api-state.js.map +1 -0
- package/dist/lib/shared/conversation.d.ts +320 -0
- package/dist/lib/shared/conversation.js +384 -0
- package/dist/lib/shared/conversation.js.map +1 -0
- package/dist/lib/shared/internal/api-bridge.d.ts +36 -0
- package/dist/lib/shared/internal/api-bridge.js +97 -0
- package/dist/lib/shared/internal/api-bridge.js.map +1 -0
- package/dist/lib/shared/internal/event.d.ts +6 -0
- package/dist/lib/shared/internal/event.js +2 -0
- package/dist/lib/shared/internal/event.js.map +1 -0
- package/dist/lib/shared/internal/initialized-unblu-api.d.ts +6 -0
- package/dist/lib/shared/internal/initialized-unblu-api.js +2 -0
- package/dist/lib/shared/internal/initialized-unblu-api.js.map +1 -0
- package/dist/lib/shared/internal/initialized-unblu-element.d.ts +6 -0
- package/dist/lib/shared/internal/initialized-unblu-element.js +2 -0
- package/dist/lib/shared/internal/initialized-unblu-element.js.map +1 -0
- package/dist/lib/shared/internal/java-error-codes.d.ts +5 -0
- package/dist/lib/shared/internal/java-error-codes.js +6 -0
- package/dist/lib/shared/internal/java-error-codes.js.map +1 -0
- package/dist/lib/shared/internal/module/agent-availability-module.d.ts +14 -0
- package/dist/lib/shared/internal/module/agent-availability-module.js +13 -0
- package/dist/lib/shared/internal/module/agent-availability-module.js.map +1 -0
- package/dist/lib/shared/internal/module/base-general-module.d.ts +31 -0
- package/dist/lib/shared/internal/module/base-general-module.js +46 -0
- package/dist/lib/shared/internal/module/base-general-module.js.map +1 -0
- package/dist/lib/shared/internal/module/conversation-module.d.ts +57 -0
- package/dist/lib/shared/internal/module/conversation-module.js +49 -0
- package/dist/lib/shared/internal/module/conversation-module.js.map +1 -0
- package/dist/lib/shared/internal/module/module.d.ts +10 -0
- package/dist/lib/shared/internal/module/module.js +16 -0
- package/dist/lib/shared/internal/module/module.js.map +1 -0
- package/dist/lib/shared/internal/unblu-api-factory.d.ts +9 -0
- package/dist/lib/shared/internal/unblu-api-factory.js +2 -0
- package/dist/lib/shared/internal/unblu-api-factory.js.map +1 -0
- package/dist/lib/shared/internal/unblu-util.d.ts +63 -0
- package/dist/lib/shared/internal/unblu-util.js +220 -0
- package/dist/lib/shared/internal/unblu-util.js.map +1 -0
- package/dist/lib/shared/internal/util/event-emitter.d.ts +44 -0
- package/dist/lib/shared/internal/util/event-emitter.js +85 -0
- package/dist/lib/shared/internal/util/event-emitter.js.map +1 -0
- package/dist/lib/shared/model/agent-availability-state.d.ts +18 -0
- package/dist/lib/shared/model/agent-availability-state.js +20 -0
- package/dist/lib/shared/model/agent-availability-state.js.map +1 -0
- package/dist/lib/shared/model/call-state.d.ts +26 -0
- package/dist/lib/shared/model/call-state.js +28 -0
- package/dist/lib/shared/model/call-state.js.map +1 -0
- package/dist/lib/shared/model/configuration.d.ts +46 -0
- package/dist/lib/shared/model/configuration.js +2 -0
- package/dist/lib/shared/model/configuration.js.map +1 -0
- package/dist/lib/shared/model/connection-state.d.ts +27 -0
- package/dist/lib/shared/model/connection-state.js +29 -0
- package/dist/lib/shared/model/connection-state.js.map +1 -0
- package/dist/lib/shared/model/conversation-info.d.ts +34 -0
- package/dist/lib/shared/model/conversation-info.js +2 -0
- package/dist/lib/shared/model/conversation-info.js.map +1 -0
- package/dist/lib/shared/model/conversation-message-info.d.ts +14 -0
- package/dist/lib/shared/model/conversation-message-info.js +2 -0
- package/dist/lib/shared/model/conversation-message-info.js.map +1 -0
- package/dist/lib/shared/model/conversation-recipient-type.d.ts +10 -0
- package/dist/lib/shared/model/conversation-recipient-type.js +12 -0
- package/dist/lib/shared/model/conversation-recipient-type.js.map +1 -0
- package/dist/lib/shared/model/conversation-recipient.d.ts +14 -0
- package/dist/lib/shared/model/conversation-recipient.js +2 -0
- package/dist/lib/shared/model/conversation-recipient.js.map +1 -0
- package/dist/lib/shared/model/conversation-state.d.ts +37 -0
- package/dist/lib/shared/model/conversation-state.js +39 -0
- package/dist/lib/shared/model/conversation-state.js.map +1 -0
- package/dist/lib/shared/model/conversation-type.d.ts +43 -0
- package/dist/lib/shared/model/conversation-type.js +45 -0
- package/dist/lib/shared/model/conversation-type.js.map +1 -0
- package/dist/lib/shared/model/customaction/custom-action-invocation.d.ts +27 -0
- package/dist/lib/shared/model/customaction/custom-action-invocation.js +2 -0
- package/dist/lib/shared/model/customaction/custom-action-invocation.js.map +1 -0
- package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.d.ts +6 -0
- package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.js +2 -0
- package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.js.map +1 -0
- package/dist/lib/shared/model/customaction/custom-message-action-invocation.d.ts +16 -0
- package/dist/lib/shared/model/customaction/custom-message-action-invocation.js +2 -0
- package/dist/lib/shared/model/customaction/custom-message-action-invocation.js.map +1 -0
- package/dist/lib/shared/model/customaction/custom-person-action-invocation.d.ts +11 -0
- package/dist/lib/shared/model/customaction/custom-person-action-invocation.js +2 -0
- package/dist/lib/shared/model/customaction/custom-person-action-invocation.js.map +1 -0
- package/dist/lib/shared/model/invitation-status.d.ts +14 -0
- package/dist/lib/shared/model/invitation-status.js +16 -0
- package/dist/lib/shared/model/invitation-status.js.map +1 -0
- package/dist/lib/shared/model/invitation.d.ts +24 -0
- package/dist/lib/shared/model/invitation.js +2 -0
- package/dist/lib/shared/model/invitation.js.map +1 -0
- package/dist/lib/shared/model/new-conversation-interceptor-result.d.ts +14 -0
- package/dist/lib/shared/model/new-conversation-interceptor-result.js +2 -0
- package/dist/lib/shared/model/new-conversation-interceptor-result.js.map +1 -0
- package/dist/lib/shared/model/person-info.d.ts +4 -0
- package/dist/lib/shared/model/person-info.js +2 -0
- package/dist/lib/shared/model/person-info.js.map +1 -0
- package/dist/lib/shared/new-conversation-interceptor.d.ts +24 -0
- package/dist/lib/shared/new-conversation-interceptor.js +2 -0
- package/dist/lib/shared/new-conversation-interceptor.js.map +1 -0
- package/dist/lib/shared/unblu-api-error.d.ts +117 -0
- package/dist/lib/shared/unblu-api-error.js +122 -0
- package/dist/lib/shared/unblu-api-error.js.map +1 -0
- package/dist/lib/unblu-api-ui.d.ts +137 -0
- package/dist/lib/unblu-api-ui.js +199 -0
- package/dist/lib/unblu-api-ui.js.map +1 -0
- package/dist/lib/unblu-api.d.ts +363 -0
- package/dist/lib/unblu-api.js +433 -0
- package/dist/lib/unblu-api.js.map +1 -0
- package/dist/lib/unblu-static-api.d.ts +237 -0
- package/dist/lib/unblu-static-api.js +318 -0
- package/dist/lib/unblu-static-api.js.map +1 -0
- package/package.json +23 -0
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { Conversation } from './shared/conversation';
|
|
2
|
+
import { EventEmitter } from './shared/internal/util/event-emitter';
|
|
3
|
+
import { UnbluApiError, UnbluErrorType } from './shared/unblu-api-error';
|
|
4
|
+
import { UnbluUiApi } from './unblu-api-ui';
|
|
5
|
+
import { UnbluUtil } from "./shared/internal/unblu-util";
|
|
6
|
+
/**
|
|
7
|
+
* #### This class represents the initialized Unblu Visitor JS API.
|
|
8
|
+
*
|
|
9
|
+
* There is only ever one instance of this api which can be retrieved via `unblu.api.initialize()`.
|
|
10
|
+
* See {@link UnbluStaticApi} for more details on configuring and initializing the UnbluApi.
|
|
11
|
+
*
|
|
12
|
+
* The API connects to the integrated version of Unblu. All actions performed via the UnbluApi are executed in
|
|
13
|
+
* the name of and with the rights of current visitor and may have direct effect on the displayed Unblu UI.
|
|
14
|
+
*
|
|
15
|
+
* For example if a conversation is started from the UnbluApi, the Unblu UI will navigate to it.
|
|
16
|
+
* If a conversation is closed via the API, it will also be closed on the Unblu UI of the visitor.
|
|
17
|
+
* For more information on UI side effects please check the documentation for each method call.
|
|
18
|
+
*
|
|
19
|
+
* For programmatic administrator access and configuration of Unblu please use the Unblu WebAPI.
|
|
20
|
+
*/
|
|
21
|
+
export class UnbluApi {
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
constructor(internalApi) {
|
|
26
|
+
this.internalApi = internalApi;
|
|
27
|
+
this.internalListeners = {};
|
|
28
|
+
this.eventEmitter = new EventEmitter();
|
|
29
|
+
internalApi.meta.on('upgraded', () => this.onUpgraded());
|
|
30
|
+
// All UI functionality is provided with the ui namespace
|
|
31
|
+
this.ui = new UnbluUiApi(internalApi);
|
|
32
|
+
}
|
|
33
|
+
on(event, listener) {
|
|
34
|
+
this.assertNotDeinitialized();
|
|
35
|
+
const needsInternalSubscription = !this.eventEmitter.hasListeners(event);
|
|
36
|
+
this.eventEmitter.on(event, listener);
|
|
37
|
+
if (needsInternalSubscription)
|
|
38
|
+
this.onInternal(event).catch(e => console.warn('Error registering internal listener for event:', event, 'error:' + e, e));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Removes a previously registered listener
|
|
42
|
+
* @param event The event to unregister from.
|
|
43
|
+
* @param listener The listener to remove.
|
|
44
|
+
*/
|
|
45
|
+
off(event, listener) {
|
|
46
|
+
this.assertNotDeinitialized();
|
|
47
|
+
const removed = this.eventEmitter.off(event, listener);
|
|
48
|
+
if (!this.eventEmitter.hasListeners(event))
|
|
49
|
+
this.offInternal(event).catch(e => console.warn('Error removing internal listener for event:', event, 'error:' + e, e));
|
|
50
|
+
return removed;
|
|
51
|
+
}
|
|
52
|
+
async onInternal(eventName) {
|
|
53
|
+
let internalListener;
|
|
54
|
+
let internalModule;
|
|
55
|
+
let needsUpgrade;
|
|
56
|
+
switch (eventName) {
|
|
57
|
+
case UnbluApi.AGENT_AVAILABLE_CHANGE:
|
|
58
|
+
internalListener = (event) => {
|
|
59
|
+
this.eventEmitter.emit(event.name, event.data);
|
|
60
|
+
};
|
|
61
|
+
internalModule = this.internalApi.agentAvailability;
|
|
62
|
+
needsUpgrade = false;
|
|
63
|
+
break;
|
|
64
|
+
case UnbluApi.AGENT_AVAILABILITY_CHANGE:
|
|
65
|
+
internalListener = (event) => {
|
|
66
|
+
this.eventEmitter.emit(event.name, event.data);
|
|
67
|
+
};
|
|
68
|
+
internalModule = this.internalApi.agentAvailability;
|
|
69
|
+
needsUpgrade = false;
|
|
70
|
+
break;
|
|
71
|
+
case UnbluApi.ACTIVE_CONVERSATION_CHANGE:
|
|
72
|
+
internalListener = (event) => {
|
|
73
|
+
this.eventEmitter.emit(event.name, event.data ? new Conversation(this.internalApi.conversation, event.data) : null);
|
|
74
|
+
};
|
|
75
|
+
internalModule = this.internalApi.general;
|
|
76
|
+
needsUpgrade = true;
|
|
77
|
+
break;
|
|
78
|
+
case UnbluApi.CONVERSATIONS_CHANGE:
|
|
79
|
+
internalListener = (event) => {
|
|
80
|
+
this.eventEmitter.emit(event.name, event.data);
|
|
81
|
+
};
|
|
82
|
+
internalModule = this.internalApi.general;
|
|
83
|
+
needsUpgrade = true;
|
|
84
|
+
break;
|
|
85
|
+
case UnbluApi.NOTIFICATION_COUNT_CHANGE:
|
|
86
|
+
case UnbluApi.PERSON_CHANGE:
|
|
87
|
+
case UnbluApi.PERSON_ACTIVITY:
|
|
88
|
+
internalListener = (event) => {
|
|
89
|
+
this.eventEmitter.emit(event.name, event.data);
|
|
90
|
+
};
|
|
91
|
+
internalModule = this.internalApi.general;
|
|
92
|
+
needsUpgrade = true;
|
|
93
|
+
break;
|
|
94
|
+
case UnbluApi.DEINITIALIZING:
|
|
95
|
+
case UnbluApi.DEINITIALIZED:
|
|
96
|
+
internalListener = (event) => {
|
|
97
|
+
this.eventEmitter.emit(event.name, event.data);
|
|
98
|
+
};
|
|
99
|
+
internalModule = this.internalApi.meta;
|
|
100
|
+
needsUpgrade = false;
|
|
101
|
+
break;
|
|
102
|
+
default:
|
|
103
|
+
throw new UnbluApiError(UnbluErrorType.INVALID_FUNCTION_ARGUMENTS, 'Registration to unknown event:' + eventName);
|
|
104
|
+
}
|
|
105
|
+
if (!needsUpgrade || await this.internalApi.meta.isUpgraded()) {
|
|
106
|
+
this.internalListeners[eventName] = internalListener;
|
|
107
|
+
try {
|
|
108
|
+
await internalModule.on(eventName, internalListener);
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
delete this.internalListeners[eventName];
|
|
112
|
+
throw e;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async offInternal(eventName) {
|
|
117
|
+
const listener = this.internalListeners[eventName];
|
|
118
|
+
if (listener == null) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
delete this.internalListeners[eventName];
|
|
122
|
+
let internalModule;
|
|
123
|
+
switch (eventName) {
|
|
124
|
+
case UnbluApi.AGENT_AVAILABILITY_CHANGE:
|
|
125
|
+
internalModule = this.internalApi.agentAvailability;
|
|
126
|
+
break;
|
|
127
|
+
case UnbluApi.DEINITIALIZING:
|
|
128
|
+
case UnbluApi.DEINITIALIZED:
|
|
129
|
+
internalModule = this.internalApi.meta;
|
|
130
|
+
break;
|
|
131
|
+
default:
|
|
132
|
+
internalModule = this.internalApi.general;
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
await internalModule.off(eventName, listener);
|
|
136
|
+
}
|
|
137
|
+
// General
|
|
138
|
+
/**
|
|
139
|
+
* Returns information about the visitor.
|
|
140
|
+
* @return A promise that resolves to the current visitors person info.
|
|
141
|
+
*/
|
|
142
|
+
async getPersonInfo() {
|
|
143
|
+
this.assertNotDeinitialized();
|
|
144
|
+
await this.requireUpgrade();
|
|
145
|
+
return this.internalApi.general.getPersonInfo();
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Sets the current visitor's nickname.
|
|
149
|
+
* This could be set before or during a conversation.
|
|
150
|
+
* @return A promise that resolves empty when the operation is done
|
|
151
|
+
*/
|
|
152
|
+
async setPersonNickname(nickname) {
|
|
153
|
+
this.assertNotDeinitialized();
|
|
154
|
+
await this.requireUpgrade();
|
|
155
|
+
return this.internalApi.general.setPersonNickname(nickname);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Logs the current visitor in using the `authenticator/loginWithSecureToken` web API endpoint.
|
|
159
|
+
* Depending on the configuration, existing conversation may will be transferred to the authenticated user.
|
|
160
|
+
* @param accessToken The access token (JWT) to authenticate the visitor with
|
|
161
|
+
* @return A promise that resolves empty if the login succeeds or is rejected if it fails
|
|
162
|
+
*/
|
|
163
|
+
async login(accessToken) {
|
|
164
|
+
this.assertNotDeinitialized();
|
|
165
|
+
return UnbluUtil.loginWithSecureToken(this.internalApi.configuration.serverUrl || '', this.internalApi.configuration.apiKey, this.internalApi.configuration.entryPath || '/unblu', accessToken);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Checks if the current visitor is authenticated.
|
|
169
|
+
* @return A promise that resolves to a boolean if the visitor is authenticated
|
|
170
|
+
*/
|
|
171
|
+
async isAuthenticated() {
|
|
172
|
+
this.assertNotDeinitialized();
|
|
173
|
+
return UnbluUtil.isAuthenticated(this.internalApi.configuration.serverUrl || '', this.internalApi.configuration.entryPath || '/unblu');
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Logs the visitor out.
|
|
177
|
+
* The user will not have access to conversations from the authenticated visitor he was before anymore. He needs to be authenticated again for that.
|
|
178
|
+
* @return A promise that resolves empty when the logout succeeds or is rejected if it fails
|
|
179
|
+
*/
|
|
180
|
+
async logout() {
|
|
181
|
+
this.assertNotDeinitialized();
|
|
182
|
+
return UnbluUtil.logout(this.internalApi.configuration.serverUrl || '', this.internalApi.configuration.entryPath || '/unblu');
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Returns the number of unread messages.
|
|
186
|
+
* @return A promise that resolves to the current number of unread messages.
|
|
187
|
+
*/
|
|
188
|
+
async getNotificationCount() {
|
|
189
|
+
this.assertNotDeinitialized();
|
|
190
|
+
if (await this.internalApi.meta.isUpgraded()) {
|
|
191
|
+
return this.internalApi.general.getNotificationCount();
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
return this.internalApi.generalLazy.getNotificationCount();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// Conversation
|
|
198
|
+
/**
|
|
199
|
+
* Starts a new Conversation and places it into the inbound conversation queue.
|
|
200
|
+
*
|
|
201
|
+
* Starting a new conversation involves an agent availability check.
|
|
202
|
+
* For {@link ConversationType.OFFLINE_CHAT_REQUEST} conversations, the check proceeds as follows:
|
|
203
|
+
* * If an agent is available, the conversation type will be changed to {@link ConversationType.CHAT_REQUEST}.
|
|
204
|
+
* * If no agents are available, it will start an offline conversation provided offline chat requests are enabled in the Unblu server's configuration.
|
|
205
|
+
* * if offline chat requests aren't enabled, the request will be rejected.
|
|
206
|
+
*
|
|
207
|
+
* For all `online` conversation types, the check works as follows:
|
|
208
|
+
* * If an agent is available, the conversation will be started.
|
|
209
|
+
* * If no agents are available, the request will be rejected.
|
|
210
|
+
*
|
|
211
|
+
* You should therefore always check agent availability before starting a new conversation.
|
|
212
|
+
* If no agents are available, only start conversations of the type {@link ConversationType.OFFLINE_CHAT_REQUEST}.
|
|
213
|
+
*
|
|
214
|
+
* **NOTE:** calling this method will NOT automatically open the Unblu UI if it is collapsed. Use [ui.openIndividualUi()]{@link UnbluUiApi.openIndividualUi} if this is needed.
|
|
215
|
+
*
|
|
216
|
+
* @param type The conversation type that shall be started.
|
|
217
|
+
* @param visitorName The name the local visitor should have. This is only taken into account if the visitor is not already authenticated.
|
|
218
|
+
* @param visitorData Custom data for the visitor in any format. **NOTE:** The data which is passed here could be used in [NewConversationCallback]{@link NewConversationInterceptor}
|
|
219
|
+
* @param recipient The team or agent recipient of the conversation. This will overwrite any named area that might be set for this web page. **NOTE:** The data which is passed here could be used in [NewConversationCallback]{@link NewConversationInterceptor}
|
|
220
|
+
* @return A promise that resolves to the conversation object giving API access to the started conversation.
|
|
221
|
+
*/
|
|
222
|
+
async startConversation(type, visitorName, visitorData, recipient) {
|
|
223
|
+
this.assertNotDeinitialized();
|
|
224
|
+
await this.requireUpgrade();
|
|
225
|
+
const conversationId = await this.internalApi.general.startConversation(type, visitorName, visitorData, recipient);
|
|
226
|
+
return new Conversation(this.internalApi.conversation, conversationId);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Set a custom interceptor which will be triggered when a new conversation is started (initiated from UI or JavaScript).
|
|
230
|
+
* @param callback The interceptor which is called before a new conversation is started. The Callback is of type [NewConversationCallback]{@link NewConversationInterceptor}
|
|
231
|
+
* @return A promise that resolves when the interceptor is successfully applied and active.
|
|
232
|
+
*/
|
|
233
|
+
async setNewConversationInterceptor(callback) {
|
|
234
|
+
this.assertNotDeinitialized();
|
|
235
|
+
if (!await this.internalApi.meta.isUpgraded()) {
|
|
236
|
+
return await this.internalApi.generalLazy.setNewConversationInterceptor(callback);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
return await this.internalApi.general.setNewConversationInterceptor(callback);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Joins an existing conversation with a given PIN.
|
|
244
|
+
*
|
|
245
|
+
* **NOTE:** calling this method will NOT automatically open the Unblu UI if it is collapsed. Use [ui.openIndividualUi()]{@link UnbluUiApi.openIndividualUi} if this is needed.
|
|
246
|
+
*
|
|
247
|
+
* @param pin The PIN retrieved from the Unblu Agent Desk.
|
|
248
|
+
* @param visitorName The name the local visitor should have. This is only taken into account if the visitor is not already authenticated.
|
|
249
|
+
* @return A promise that resolves to the conversation object giving API access to the joined conversation.
|
|
250
|
+
*/
|
|
251
|
+
async joinConversation(pin, visitorName) {
|
|
252
|
+
this.assertNotDeinitialized();
|
|
253
|
+
await this.requireUpgrade();
|
|
254
|
+
const conversationId = await this.internalApi.general.joinConversation(pin, visitorName);
|
|
255
|
+
return new Conversation(this.internalApi.conversation, conversationId);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Opens the existing conversation with the given conversation ID.
|
|
259
|
+
*
|
|
260
|
+
* **NOTE:** calling this method will NOT automatically open the Unblu UI if it is collapsed. Use [ui.openIndividualUi()]{@link UnbluUiApi.openIndividualUi} if this is needed.
|
|
261
|
+
*
|
|
262
|
+
* @param conversationId The id of the conversation to be opened.
|
|
263
|
+
* @return A promise that resolves to the conversation object giving API access to the opened conversation.
|
|
264
|
+
*/
|
|
265
|
+
async openConversation(conversationId) {
|
|
266
|
+
this.assertNotDeinitialized();
|
|
267
|
+
await this.requireUpgrade();
|
|
268
|
+
await this.internalApi.general.openConversation(conversationId);
|
|
269
|
+
return new Conversation(this.internalApi.conversation, conversationId);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Returns the currently active conversation or `null` if no conversation is active.
|
|
273
|
+
*
|
|
274
|
+
* **NOTE:** calling this method twice while the same conversation is active, will result in two individual conversation API instances being returned.
|
|
275
|
+
* destroying one of them will not cause the other one to also be destroyed. If however the active conversation is closed, all returned Conversation instances will be destroyed.
|
|
276
|
+
*
|
|
277
|
+
* @return A promise that either resolves to the currently active conversation or `null` if no conversation is open.
|
|
278
|
+
* @see {@link ACTIVE_CONVERSATION_CHANGE}
|
|
279
|
+
*/
|
|
280
|
+
async getActiveConversation() {
|
|
281
|
+
this.assertNotDeinitialized();
|
|
282
|
+
if (await this.internalApi.meta.isUpgraded()) {
|
|
283
|
+
const conversationId = await this.internalApi.general.getActiveConversation();
|
|
284
|
+
return conversationId != null ? new Conversation(this.internalApi.conversation, conversationId) : null;
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Returns all conversations of the current visitor. If no conversation is present, an empty array is returned.
|
|
292
|
+
*
|
|
293
|
+
* @return A promise that resolves to an array of [ConversationInfo]{@link ConversationInfo}.
|
|
294
|
+
*/
|
|
295
|
+
async getConversations() {
|
|
296
|
+
this.assertNotDeinitialized();
|
|
297
|
+
await this.requireUpgrade();
|
|
298
|
+
return await this.internalApi.general.getConversations();
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Checks if an agent is available for the current named area and language.
|
|
302
|
+
*
|
|
303
|
+
* @return Promise that resolves to `true` if the availability state is [AVAILABLE]{@link AgentAvailabilityState.AVAILABLE} or [BUSY]{@link AgentAvailabilityState.BUSY}, `false` otherwise.
|
|
304
|
+
* @see {@link getAgentAvailabilityState} for a more detailed check.
|
|
305
|
+
*/
|
|
306
|
+
async isAgentAvailable() {
|
|
307
|
+
this.assertNotDeinitialized();
|
|
308
|
+
return this.internalApi.agentAvailability.isAgentAvailable();
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Returns the current availability state for the current named area and language.
|
|
312
|
+
* @return Promise that resolves to the current availability state.
|
|
313
|
+
* @see {@link isAgentAvailable} for a simpler check.
|
|
314
|
+
*/
|
|
315
|
+
async getAgentAvailabilityState() {
|
|
316
|
+
this.assertNotDeinitialized();
|
|
317
|
+
return this.internalApi.agentAvailability.getAgentAvailabilityState();
|
|
318
|
+
}
|
|
319
|
+
async requireUpgrade() {
|
|
320
|
+
await this.internalApi.meta.upgrade(false);
|
|
321
|
+
}
|
|
322
|
+
onUpgraded() {
|
|
323
|
+
for (let event of this.eventEmitter.getEventsWithListeners()) {
|
|
324
|
+
// register internal listeners for all events that need upgrade.
|
|
325
|
+
if (!this.internalListeners[event])
|
|
326
|
+
this.onInternal(event);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
assertNotDeinitialized() {
|
|
330
|
+
if (this.isDeinitialized()) {
|
|
331
|
+
throw new UnbluApiError(UnbluErrorType.ILLEGAL_STATE, 'Error: trying to execute method on deinitialized UnbluApi instance.');
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
isDeinitialized() {
|
|
335
|
+
return this.internalApi == null;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* De-initializes the API. It will destroy the UI, all connections and will release all resources (as far as it is technically possible).
|
|
339
|
+
*
|
|
340
|
+
* Afterwards the API can be initialized again via [window.unblu.api.initialize()]{@link UnbluStaticApi.initialize}
|
|
341
|
+
*/
|
|
342
|
+
async deinitialize() {
|
|
343
|
+
if (this.isDeinitialized()) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
await this.internalApi.meta.deinitialize();
|
|
347
|
+
this.internalApi = null;
|
|
348
|
+
this.ui = null;
|
|
349
|
+
this.internalListeners = null;
|
|
350
|
+
this.eventEmitter = null;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Event emitted every time the active conversation changes.
|
|
355
|
+
*
|
|
356
|
+
* This may happen due to a UI-navigation or an API-call.
|
|
357
|
+
*
|
|
358
|
+
* @event activeConversationChange
|
|
359
|
+
* @see {@link on} for listener registration
|
|
360
|
+
* @see {@link ConversationChangeListener}
|
|
361
|
+
*/
|
|
362
|
+
UnbluApi.ACTIVE_CONVERSATION_CHANGE = 'activeConversationChange';
|
|
363
|
+
/**
|
|
364
|
+
* Event emitted every time one of the conversations accessible to the current user changes or one is added or removed.
|
|
365
|
+
*
|
|
366
|
+
* @event conversationsChanged
|
|
367
|
+
* @see {@link on} for listener registration
|
|
368
|
+
* @see {@link ConversationsChangeListener}
|
|
369
|
+
*/
|
|
370
|
+
UnbluApi.CONVERSATIONS_CHANGE = 'conversationsChange';
|
|
371
|
+
/**
|
|
372
|
+
* Event emitted every time the notification count (unread messages) changes.
|
|
373
|
+
*
|
|
374
|
+
* @event notificationCountChange
|
|
375
|
+
* @see {@link on} for listener registration
|
|
376
|
+
* @see {@link NotificationCountChangeListener}
|
|
377
|
+
*/
|
|
378
|
+
UnbluApi.NOTIFICATION_COUNT_CHANGE = 'notificationCountChange';
|
|
379
|
+
/**
|
|
380
|
+
* Event emitted every time the local person changes. This may be i.e. due to the person setting its name.
|
|
381
|
+
*
|
|
382
|
+
* @event personChange
|
|
383
|
+
* @see {@link on} for listener registration
|
|
384
|
+
* @see {@link PersonChangeListener}
|
|
385
|
+
*/
|
|
386
|
+
UnbluApi.PERSON_CHANGE = 'personChange';
|
|
387
|
+
/**
|
|
388
|
+
* Event emitted every time the local person has some activity inside Unblu.
|
|
389
|
+
* This may be i.e. an interaction with the chat, a call, opening a conversation or interacting
|
|
390
|
+
* with a co-browsing layer.
|
|
391
|
+
*
|
|
392
|
+
* The event can be used to reset the logout timer inside an authenticated area, for example.
|
|
393
|
+
*
|
|
394
|
+
* The configuration property com.unblu.conversation.activity.activityCategoriesToTrack specifies which categories of activity trigger the event.
|
|
395
|
+
*
|
|
396
|
+
* @event personActivity
|
|
397
|
+
* @see {@link on} for listener registration
|
|
398
|
+
* @see {@link PersonActivityListener}
|
|
399
|
+
*/
|
|
400
|
+
UnbluApi.PERSON_ACTIVITY = 'personActivity';
|
|
401
|
+
/**
|
|
402
|
+
* Event emitted every time the agent availability changes for the current named area and locale.
|
|
403
|
+
*
|
|
404
|
+
* @event availableChange
|
|
405
|
+
* @see {@link on} for listener registration
|
|
406
|
+
* @see {@link AgentAvailableChangeListener}
|
|
407
|
+
*/
|
|
408
|
+
UnbluApi.AGENT_AVAILABLE_CHANGE = 'availableChange';
|
|
409
|
+
/**
|
|
410
|
+
* Event emitted every time the agent availability state changes for the current named area and locale.
|
|
411
|
+
*
|
|
412
|
+
* @event availabilityChange
|
|
413
|
+
* @see {@link on} for listener registration
|
|
414
|
+
* @see {@link AgentAvailabilityChangeListener}
|
|
415
|
+
*/
|
|
416
|
+
UnbluApi.AGENT_AVAILABILITY_CHANGE = 'availabilityChange';
|
|
417
|
+
/**
|
|
418
|
+
* Event emitted when this instance gets de-initialized and is not usable at the time until it fully got de-initialized.
|
|
419
|
+
*
|
|
420
|
+
* @event deinitializing
|
|
421
|
+
* @see {@link on} for listener registration
|
|
422
|
+
* @see {@link DeinitializationListener}
|
|
423
|
+
*/
|
|
424
|
+
UnbluApi.DEINITIALIZING = 'deinitializing';
|
|
425
|
+
/**
|
|
426
|
+
* Event emitted when this instance got de-initialized and has to be initialized again.
|
|
427
|
+
*
|
|
428
|
+
* @event deinitialized
|
|
429
|
+
* @see {@link on} for listener registration
|
|
430
|
+
* @see {@link DeinitializationListener}
|
|
431
|
+
*/
|
|
432
|
+
UnbluApi.DEINITIALIZED = 'deinitialized';
|
|
433
|
+
//# sourceMappingURL=unblu-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unblu-api.js","sourceRoot":"","sources":["../../src/unblu-api.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAA;AAGlD,OAAO,EAAC,YAAY,EAAW,MAAM,sCAAsC,CAAA;AAK3E,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAOzC,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AA8CvD;;;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