@wildix/xbees-connect 1.3.14-alpha.1 → 1.3.15
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/README.md +16 -0
- package/dist-cjs/package.json +1 -1
- package/dist-cjs/src/Client.js +16 -0
- package/dist-cjs/src/enums/index.js +1 -0
- package/dist-es/package.json +1 -1
- package/dist-es/src/Client.js +16 -0
- package/dist-es/src/enums/index.js +1 -0
- package/dist-types/src/Client.d.ts +11 -0
- package/dist-types/src/enums/index.d.ts +1 -0
- package/dist-types/types/Client.d.ts +10 -0
- package/dist-types/types/Event.d.ts +4 -2
- package/dist-types/types/Payload.d.ts +4 -0
- package/dist-types/types/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -350,10 +350,14 @@ Starts listening for redirect query events. Fires when the user opens the app vi
|
|
|
350
350
|
|
|
351
351
|
#### `onStartRedirectToEntityPage(callback: Callback<EventType.START_REDIRECT_TO_ENTITY_PAGE>): RemoveEventListener`
|
|
352
352
|
|
|
353
|
+
Deprecated. Use `addEventListener(EventType.START_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
354
|
+
|
|
353
355
|
Starts listening for the event that signals x-bees is navigating to an entity page (e.g. conversation). The payload contains `{ conversationId, pageName }`. Returns an unsubscribe function.
|
|
354
356
|
|
|
355
357
|
#### `onCancelRedirectToEntityPage(callback: Callback<EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE>): RemoveEventListener`
|
|
356
358
|
|
|
359
|
+
Deprecated. Use `addEventListener(EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
360
|
+
|
|
357
361
|
Starts listening for the event that signals a pending redirect to an entity page was cancelled. The payload contains `{ conversationId }`. Returns an unsubscribe function.
|
|
358
362
|
|
|
359
363
|
---
|
|
@@ -502,6 +506,18 @@ Notifies x-bees when a dropdown inside the integration opens or closes, which al
|
|
|
502
506
|
|
|
503
507
|
---
|
|
504
508
|
|
|
509
|
+
### Chat connections
|
|
510
|
+
|
|
511
|
+
#### `setChatToOpen(chatId: string): void`
|
|
512
|
+
|
|
513
|
+
Tells x-bees which chat or conversation should be opened (brought into focus). The integration sends `ClientEventType.SET_CHAT_TO_OPEN` (`xBeesSetChatToOpen`) with payload `{ chatId }`. The call returns immediately; x-bees applies the navigation when it handles the message.
|
|
514
|
+
|
|
515
|
+
```ts
|
|
516
|
+
client.setChatToOpen('chat_id');
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
505
521
|
### Technical support
|
|
506
522
|
|
|
507
523
|
#### `getTechnicalSupport(): TechnicalSupport`
|
package/dist-cjs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"description": "This library provides easy communication between x-bees and integrated web applications",
|
|
5
5
|
"author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
|
|
6
6
|
"homepage": "",
|
package/dist-cjs/src/Client.js
CHANGED
|
@@ -536,15 +536,31 @@ class Client {
|
|
|
536
536
|
payload: { type, payload },
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* Asks x-bees to open (focus) the chat or conversation identified by `chatId`.
|
|
541
|
+
* @param chatId - Conversation or chat identifier in x-bees.
|
|
542
|
+
*/
|
|
543
|
+
setChatToOpen(chatId) {
|
|
544
|
+
void this.sendAsync({
|
|
545
|
+
type: enums_1.ClientEventType.SET_CHAT_TO_OPEN,
|
|
546
|
+
payload: { chatId },
|
|
547
|
+
});
|
|
548
|
+
}
|
|
539
549
|
onContactWeightUpdate(callback) {
|
|
540
550
|
return this.addEventListener(enums_1.EventType.CONTACT_WEIGHT_UPDATE, callback);
|
|
541
551
|
}
|
|
542
552
|
onContactRefresh(callback) {
|
|
543
553
|
return this.addEventListener(enums_1.EventType.CONTACT_REFRESH, callback);
|
|
544
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* @deprecated Use `addEventListener(EventType.START_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
557
|
+
*/
|
|
545
558
|
onStartRedirectToEntityPage(callback) {
|
|
546
559
|
return this.addEventListener(enums_1.EventType.START_REDIRECT_TO_ENTITY_PAGE, callback);
|
|
547
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* @deprecated Use `addEventListener(EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
563
|
+
*/
|
|
548
564
|
onCancelRedirectToEntityPage(callback) {
|
|
549
565
|
return this.addEventListener(enums_1.EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE, callback);
|
|
550
566
|
}
|
|
@@ -57,6 +57,7 @@ var ClientEventType;
|
|
|
57
57
|
ClientEventType["AVAILABLE_CONTACT_DATA"] = "xBeesAvailableContactData";
|
|
58
58
|
ClientEventType["DROPDOWN_VISIBILITY"] = "xBeesDropdownVisibility";
|
|
59
59
|
ClientEventType["CUSTOM_EVENT"] = "xBeesCustomEvent";
|
|
60
|
+
ClientEventType["SET_CHAT_TO_OPEN"] = "xBeesSetChatToOpen";
|
|
60
61
|
ClientEventType["CREATE_CONTACT_IS_SUPPORTED"] = "xBeesCreateContactIsSupported";
|
|
61
62
|
ClientEventType["CREATE_CONTACT_HAS_NO_PERMISSION"] = "xBeesCreateContactHasNoPermission";
|
|
62
63
|
ClientEventType["INTEGRATION_PROXY_RESPONSE"] = "xBeesIntegrationProxyResponse";
|
package/dist-es/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"description": "This library provides easy communication between x-bees and integrated web applications",
|
|
5
5
|
"author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
|
|
6
6
|
"homepage": "",
|
package/dist-es/src/Client.js
CHANGED
|
@@ -530,15 +530,31 @@ export class Client {
|
|
|
530
530
|
payload: { type, payload },
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Asks x-bees to open (focus) the chat or conversation identified by `chatId`.
|
|
535
|
+
* @param chatId - Conversation or chat identifier in x-bees.
|
|
536
|
+
*/
|
|
537
|
+
setChatToOpen(chatId) {
|
|
538
|
+
void this.sendAsync({
|
|
539
|
+
type: ClientEventType.SET_CHAT_TO_OPEN,
|
|
540
|
+
payload: { chatId },
|
|
541
|
+
});
|
|
542
|
+
}
|
|
533
543
|
onContactWeightUpdate(callback) {
|
|
534
544
|
return this.addEventListener(EventType.CONTACT_WEIGHT_UPDATE, callback);
|
|
535
545
|
}
|
|
536
546
|
onContactRefresh(callback) {
|
|
537
547
|
return this.addEventListener(EventType.CONTACT_REFRESH, callback);
|
|
538
548
|
}
|
|
549
|
+
/**
|
|
550
|
+
* @deprecated Use `addEventListener(EventType.START_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
551
|
+
*/
|
|
539
552
|
onStartRedirectToEntityPage(callback) {
|
|
540
553
|
return this.addEventListener(EventType.START_REDIRECT_TO_ENTITY_PAGE, callback);
|
|
541
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* @deprecated Use `addEventListener(EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
557
|
+
*/
|
|
542
558
|
onCancelRedirectToEntityPage(callback) {
|
|
543
559
|
return this.addEventListener(EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE, callback);
|
|
544
560
|
}
|
|
@@ -54,6 +54,7 @@ export var ClientEventType;
|
|
|
54
54
|
ClientEventType["AVAILABLE_CONTACT_DATA"] = "xBeesAvailableContactData";
|
|
55
55
|
ClientEventType["DROPDOWN_VISIBILITY"] = "xBeesDropdownVisibility";
|
|
56
56
|
ClientEventType["CUSTOM_EVENT"] = "xBeesCustomEvent";
|
|
57
|
+
ClientEventType["SET_CHAT_TO_OPEN"] = "xBeesSetChatToOpen";
|
|
57
58
|
ClientEventType["CREATE_CONTACT_IS_SUPPORTED"] = "xBeesCreateContactIsSupported";
|
|
58
59
|
ClientEventType["CREATE_CONTACT_HAS_NO_PERMISSION"] = "xBeesCreateContactHasNoPermission";
|
|
59
60
|
ClientEventType["INTEGRATION_PROXY_RESPONSE"] = "xBeesIntegrationProxyResponse";
|
|
@@ -115,9 +115,20 @@ export declare class Client implements ConnectClient {
|
|
|
115
115
|
type: string;
|
|
116
116
|
payload?: JSONValue;
|
|
117
117
|
}): void;
|
|
118
|
+
/**
|
|
119
|
+
* Asks x-bees to open (focus) the chat or conversation identified by `chatId`.
|
|
120
|
+
* @param chatId - Conversation or chat identifier in x-bees.
|
|
121
|
+
*/
|
|
122
|
+
setChatToOpen(chatId: string): void;
|
|
118
123
|
onContactWeightUpdate(callback: Callback<EventType.CONTACT_WEIGHT_UPDATE>): RemoveEventListener;
|
|
119
124
|
onContactRefresh(callback: Callback<EventType.CONTACT_REFRESH>): RemoveEventListener;
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated Use `addEventListener(EventType.START_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
127
|
+
*/
|
|
120
128
|
onStartRedirectToEntityPage(callback: Callback<EventType.START_REDIRECT_TO_ENTITY_PAGE>): RemoveEventListener;
|
|
129
|
+
/**
|
|
130
|
+
* @deprecated Use `addEventListener(EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
131
|
+
*/
|
|
121
132
|
onCancelRedirectToEntityPage(callback: Callback<EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE>): RemoveEventListener;
|
|
122
133
|
onDaemonCallStarted(callback: Callback<EventType.DAEMON_CALL_SESSION_STARTED>): RemoveEventListener;
|
|
123
134
|
onDaemonCallFinished(callback: Callback<EventType.DAEMON_CALL_SESSION_FINISHED>): RemoveEventListener;
|
|
@@ -52,6 +52,7 @@ export declare enum ClientEventType {
|
|
|
52
52
|
AVAILABLE_CONTACT_DATA = "xBeesAvailableContactData",
|
|
53
53
|
DROPDOWN_VISIBILITY = "xBeesDropdownVisibility",
|
|
54
54
|
CUSTOM_EVENT = "xBeesCustomEvent",
|
|
55
|
+
SET_CHAT_TO_OPEN = "xBeesSetChatToOpen",
|
|
55
56
|
CREATE_CONTACT_IS_SUPPORTED = "xBeesCreateContactIsSupported",
|
|
56
57
|
CREATE_CONTACT_HAS_NO_PERMISSION = "xBeesCreateContactHasNoPermission",
|
|
57
58
|
INTEGRATION_PROXY_RESPONSE = "xBeesIntegrationProxyResponse",
|
|
@@ -226,6 +226,14 @@ export interface ConnectClient {
|
|
|
226
226
|
type: string;
|
|
227
227
|
payload?: JSONValue;
|
|
228
228
|
}) => void;
|
|
229
|
+
/**
|
|
230
|
+
* Asks x-bees to open (focus) the chat or conversation identified by `chatId`.
|
|
231
|
+
* Fire-and-forget: sends `ClientEventType.SET_CHAT_TO_OPEN` to the parent; no response is surfaced to the integration.
|
|
232
|
+
* When the app is not embedded in x-bees, this is a no-op (same as other outbound client messages).
|
|
233
|
+
*
|
|
234
|
+
* @param chatId - Conversation or chat identifier in x-bees.
|
|
235
|
+
*/
|
|
236
|
+
setChatToOpen: (chatId: string) => void;
|
|
229
237
|
/**
|
|
230
238
|
* Starts listen for the events of contact weight update and handle with the provided callback
|
|
231
239
|
*/
|
|
@@ -236,10 +244,12 @@ export interface ConnectClient {
|
|
|
236
244
|
onContactRefresh: (callback: Callback<EventType.CONTACT_REFRESH>) => RemoveEventListener;
|
|
237
245
|
/**
|
|
238
246
|
* Saves data about redirect to entity page to integration storage
|
|
247
|
+
* @deprecated Use `addEventListener(EventType.START_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
239
248
|
*/
|
|
240
249
|
onStartRedirectToEntityPage: (callback: Callback<EventType.START_REDIRECT_TO_ENTITY_PAGE>) => RemoveEventListener;
|
|
241
250
|
/**
|
|
242
251
|
* Removes data about redirect to entity page from integration storage
|
|
252
|
+
* @deprecated Use `addEventListener(EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE, callback)` instead.
|
|
243
253
|
*/
|
|
244
254
|
onCancelRedirectToEntityPage: (callback: Callback<EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE>) => RemoveEventListener;
|
|
245
255
|
}
|
|
@@ -2,10 +2,10 @@ import { ClientEventType, EventType } from '../src/enums';
|
|
|
2
2
|
import { AvailableContactData } from './AvailableContactData';
|
|
3
3
|
import { ContactQuery } from './Contact';
|
|
4
4
|
import { Message, MessageType } from './Message';
|
|
5
|
-
import { IntegrationProxyRequest, IntegrationProxyResponse, IPayloadAutoSuggestResult, IPayloadBatchContactsMatchResult, IPayloadBatchContactsMatchResultError, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadCancelRedirectToEntityPage, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContactWeightUpdate, IPayloadContextResult, IPayloadConversationResult, IPayloadCustomEvent, IPayloadDaemonCallFinished, IPayloadDaemonCallStarted, IPayloadDropdownVisibility, IPayloadGetFromStorage, IPayloadSaveToStorage, IPayloadSendAnalytics, IPayloadStartRedirectToEntityPage, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort } from './Payload';
|
|
5
|
+
import { IntegrationProxyRequest, IntegrationProxyResponse, IPayloadAutoSuggestResult, IPayloadBatchContactsMatchResult, IPayloadBatchContactsMatchResultError, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadCancelRedirectToEntityPage, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContactWeightUpdate, IPayloadContextResult, IPayloadConversationResult, IPayloadCustomEvent, IPayloadSetChatToOpen, IPayloadDaemonCallFinished, IPayloadDaemonCallStarted, IPayloadDropdownVisibility, IPayloadGetFromStorage, IPayloadSaveToStorage, IPayloadSendAnalytics, IPayloadStartRedirectToEntityPage, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort } from './Payload';
|
|
6
6
|
import { SupportedPlatformVariant } from './Platform';
|
|
7
7
|
import { XBeesUser } from './XBeesUser';
|
|
8
|
-
export type EventPayload<T extends MessageType> = T extends EventType.GET_CONTACTS_AUTO_SUGGEST ? string : T extends ClientEventType.CONTACTS_AUTO_SUGGEST ? IPayloadAutoSuggestResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH | ClientEventType.CONTACT_CREATE_OR_UPDATE | ClientEventType.CONTACT_MATCH_UPDATE ? IPayloadContactMatchResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH_NOT_FOUND ? IPayloadContactMatchResultNotFound : T extends ClientEventType.LOOKUP_AND_MATCH_BATCH_ERROR ? IPayloadBatchContactsMatchResultError : T extends ClientEventType.CONTEXT ? IPayloadContextResult : T extends ClientEventType.CURRENT_CONTACT ? IPayloadContactResult : T extends ClientEventType.CURRENT_CONVERSATION ? IPayloadConversationResult : T extends EventType.ADD_CALL ? IPayloadCallStartedInfo : T extends ClientEventType.START_CALL ? IPayloadCallStart : T extends ClientEventType.READY ? IPayloadVersion : T extends ClientEventType.VIEW_PORT ? IPayloadViewPort : T extends ClientEventType.THEME ? IPayloadThemeChange : T extends EventType.USE_THEME ? IPayloadThemeChange : T extends ClientEventType.TOAST ? IPayloadToast : T extends ClientEventType.SEND_ANALYTICS ? IPayloadSendAnalytics : T extends ClientEventType.SEND_TECHNICAL_SUPPORT_INFORMATION ? IPayloadTechSupport : T extends EventType.PBX_TOKEN ? string : T extends ClientEventType.TOKEN ? string : T extends ClientEventType.TO_CLIPBOARD ? string : T extends EventType.GET_LOOK_UP_AND_MATCH ? ContactQuery : T extends EventType.GET_LOOK_UP_AND_MATCH_BATCH ? ContactQuery[] : T extends EventType.VISIBILITY ? boolean : T extends ClientEventType.USER ? XBeesUser : T extends ClientEventType.SAVE_TO_STORAGE ? IPayloadSaveToStorage : T extends ClientEventType.GET_FROM_STORAGE ? IPayloadGetFromStorage : T extends ClientEventType.REMOVE_FROM_STORAGE ? IPayloadGetFromStorage : T extends ClientEventType.AVAILABLE_CONTACT_DATA ? AvailableContactData | null : T extends ClientEventType.LOOK_UP_AND_MATCH_BATCH_CONTACTS ? IPayloadBatchContactsMatchResult : T extends ClientEventType.DROPDOWN_VISIBILITY ? IPayloadDropdownVisibility : T extends ClientEventType.CUSTOM_EVENT ? IPayloadCustomEvent : T extends EventType.START_REDIRECT_TO_ENTITY_PAGE ? IPayloadStartRedirectToEntityPage : T extends EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE ? IPayloadCancelRedirectToEntityPage : T extends EventType.GET_INTEGRATION_PROXY_REQUEST ? IntegrationProxyRequest : T extends ClientEventType.INTEGRATION_PROXY_RESPONSE ? IntegrationProxyResponse : T extends ClientEventType.INTEGRATION_PROXY_REQUEST_IS_SUPPORTED ? undefined : T extends EventType.DAEMON_CALL_SESSION_STARTED ? IPayloadDaemonCallStarted : T extends EventType.DAEMON_CALL_SESSION_FINISHED ? IPayloadDaemonCallFinished : never;
|
|
8
|
+
export type EventPayload<T extends MessageType> = T extends EventType.GET_CONTACTS_AUTO_SUGGEST ? string : T extends ClientEventType.CONTACTS_AUTO_SUGGEST ? IPayloadAutoSuggestResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH | ClientEventType.CONTACT_CREATE_OR_UPDATE | ClientEventType.CONTACT_MATCH_UPDATE ? IPayloadContactMatchResult : T extends ClientEventType.CONTACT_LOOKUP_AND_MATCH_NOT_FOUND ? IPayloadContactMatchResultNotFound : T extends ClientEventType.LOOKUP_AND_MATCH_BATCH_ERROR ? IPayloadBatchContactsMatchResultError : T extends ClientEventType.CONTEXT ? IPayloadContextResult : T extends ClientEventType.CURRENT_CONTACT ? IPayloadContactResult : T extends ClientEventType.CURRENT_CONVERSATION ? IPayloadConversationResult : T extends EventType.ADD_CALL ? IPayloadCallStartedInfo : T extends ClientEventType.START_CALL ? IPayloadCallStart : T extends ClientEventType.READY ? IPayloadVersion : T extends ClientEventType.VIEW_PORT ? IPayloadViewPort : T extends ClientEventType.THEME ? IPayloadThemeChange : T extends EventType.USE_THEME ? IPayloadThemeChange : T extends ClientEventType.TOAST ? IPayloadToast : T extends ClientEventType.SEND_ANALYTICS ? IPayloadSendAnalytics : T extends ClientEventType.SEND_TECHNICAL_SUPPORT_INFORMATION ? IPayloadTechSupport : T extends EventType.PBX_TOKEN ? string : T extends ClientEventType.TOKEN ? string : T extends ClientEventType.TO_CLIPBOARD ? string : T extends EventType.GET_LOOK_UP_AND_MATCH ? ContactQuery : T extends EventType.GET_LOOK_UP_AND_MATCH_BATCH ? ContactQuery[] : T extends EventType.VISIBILITY ? boolean : T extends ClientEventType.USER ? XBeesUser : T extends ClientEventType.SAVE_TO_STORAGE ? IPayloadSaveToStorage : T extends ClientEventType.GET_FROM_STORAGE ? IPayloadGetFromStorage : T extends ClientEventType.REMOVE_FROM_STORAGE ? IPayloadGetFromStorage : T extends ClientEventType.AVAILABLE_CONTACT_DATA ? AvailableContactData | null : T extends ClientEventType.LOOK_UP_AND_MATCH_BATCH_CONTACTS ? IPayloadBatchContactsMatchResult : T extends ClientEventType.DROPDOWN_VISIBILITY ? IPayloadDropdownVisibility : T extends ClientEventType.CUSTOM_EVENT ? IPayloadCustomEvent : T extends ClientEventType.SET_CHAT_TO_OPEN ? IPayloadSetChatToOpen : T extends EventType.START_REDIRECT_TO_ENTITY_PAGE ? IPayloadStartRedirectToEntityPage : T extends EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE ? IPayloadCancelRedirectToEntityPage : T extends EventType.GET_INTEGRATION_PROXY_REQUEST ? IntegrationProxyRequest : T extends ClientEventType.INTEGRATION_PROXY_RESPONSE ? IntegrationProxyResponse : T extends ClientEventType.INTEGRATION_PROXY_REQUEST_IS_SUPPORTED ? undefined : T extends EventType.DAEMON_CALL_SESSION_STARTED ? IPayloadDaemonCallStarted : T extends EventType.DAEMON_CALL_SESSION_FINISHED ? IPayloadDaemonCallFinished : never;
|
|
9
9
|
export type EventPayloadMap = {
|
|
10
10
|
[EventType.GET_CONTACTS_AUTO_SUGGEST]: string;
|
|
11
11
|
[EventType.GET_LOOK_UP_AND_MATCH]: ContactQuery;
|
|
@@ -38,6 +38,8 @@ export type EventCallbackMap = {
|
|
|
38
38
|
[EventType.CONTACT_REFRESH]: (id: EventPayloadMap[EventType.CONTACT_REFRESH]) => void;
|
|
39
39
|
[EventType.START_REDIRECT_TO_ENTITY_PAGE]: (params: EventPayloadMap[EventType.START_REDIRECT_TO_ENTITY_PAGE]) => void;
|
|
40
40
|
[EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE]: (params: EventPayloadMap[EventType.CANCEL_REDIRECT_TO_ENTITY_PAGE]) => void;
|
|
41
|
+
[EventType.DAEMON_CALL_SESSION_STARTED]: (callStartedInfo: EventPayloadMap[EventType.DAEMON_CALL_SESSION_STARTED]) => void;
|
|
42
|
+
[EventType.DAEMON_CALL_SESSION_FINISHED]: (callFinishedInfo: EventPayloadMap[EventType.DAEMON_CALL_SESSION_FINISHED]) => void;
|
|
41
43
|
[EventType.GET_INTEGRATION_PROXY_REQUEST]: (request: EventPayloadMap[EventType.GET_INTEGRATION_PROXY_REQUEST]) => void;
|
|
42
44
|
};
|
|
43
45
|
export type RawMessageEvent = MessageEvent<string | Message>;
|
|
@@ -97,6 +97,10 @@ export interface IPayloadCustomEvent {
|
|
|
97
97
|
type: string;
|
|
98
98
|
payload?: JSONValue;
|
|
99
99
|
}
|
|
100
|
+
/** Payload for the integration → x-bees message that requests opening a chat by id (`ClientEventType.SET_CHAT_TO_OPEN`). */
|
|
101
|
+
export interface IPayloadSetChatToOpen {
|
|
102
|
+
chatId: string;
|
|
103
|
+
}
|
|
100
104
|
export interface IPayloadContactWeightUpdate {
|
|
101
105
|
id: string;
|
|
102
106
|
query: ContactQuery;
|
|
@@ -7,7 +7,7 @@ export type { JSONArray, JSONObject } from './Json';
|
|
|
7
7
|
export type { Listener, RemoveEventListener } from './Listener';
|
|
8
8
|
export type { Message, MessageIFrameResponse, MessageType, ResponseMessage } from './Message';
|
|
9
9
|
export type { MessageSender } from './MessageSender';
|
|
10
|
-
export type { IntegrationProxyErrorCode, IntegrationProxyRequest, IntegrationProxyResponse, IPayloadAutoSuggestResult, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadCancelRedirectToEntityPage, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContextResult, IPayloadConversationResult, IPayloadDaemonCallFinished, IPayloadDaemonCallStarted, IPayloadSendAnalytics, IPayloadStartRedirectToEntityPage, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort, } from './Payload';
|
|
10
|
+
export type { IntegrationProxyErrorCode, IntegrationProxyRequest, IntegrationProxyResponse, IPayloadAutoSuggestResult, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadCancelRedirectToEntityPage, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContextResult, IPayloadConversationResult, IPayloadDaemonCallFinished, IPayloadDaemonCallStarted, IPayloadSendAnalytics, IPayloadSetChatToOpen, IPayloadStartRedirectToEntityPage, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort, } from './Payload';
|
|
11
11
|
export { SupportedPlatformVariant } from './Platform';
|
|
12
12
|
export type { IntegrationProxyRequestResolver, LookupAndMatchBatchContactsResolver, LookupAndMatchContactsResolver, Reject, SuggestContactsResolver, } from './Resolver';
|
|
13
13
|
export type { StorageEventCallback } from './Storage';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"description": "This library provides easy communication between x-bees and integrated web applications",
|
|
5
5
|
"author": "dimitri.chernykh <dimitri.chernykh@wildix.com>",
|
|
6
6
|
"homepage": "",
|