@wildix/xbees-connect 1.3.12 → 1.3.13

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 CHANGED
@@ -494,18 +494,6 @@ Notifies x-bees when a dropdown inside the integration opens or closes, which al
494
494
 
495
495
  ---
496
496
 
497
- ### Chat connections
498
-
499
- #### `setChatToOpen(chatId: string): void`
500
-
501
- 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.
502
-
503
- ```ts
504
- client.setChatToOpen('chat_id');
505
- ```
506
-
507
- ---
508
-
509
497
  ### Technical support
510
498
 
511
499
  #### `getTechnicalSupport(): TechnicalSupport`
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
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": "",
@@ -536,16 +536,6 @@ 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
- }
549
539
  onContactWeightUpdate(callback) {
550
540
  return this.addEventListener(enums_1.EventType.CONTACT_WEIGHT_UPDATE, callback);
551
541
  }
@@ -55,7 +55,6 @@ var ClientEventType;
55
55
  ClientEventType["AVAILABLE_CONTACT_DATA"] = "xBeesAvailableContactData";
56
56
  ClientEventType["DROPDOWN_VISIBILITY"] = "xBeesDropdownVisibility";
57
57
  ClientEventType["CUSTOM_EVENT"] = "xBeesCustomEvent";
58
- ClientEventType["SET_CHAT_TO_OPEN"] = "xBeesSetChatToOpen";
59
58
  ClientEventType["CREATE_CONTACT_IS_SUPPORTED"] = "xBeesCreateContactIsSupported";
60
59
  ClientEventType["CREATE_CONTACT_HAS_NO_PERMISSION"] = "xBeesCreateContactHasNoPermission";
61
60
  ClientEventType["INTEGRATION_PROXY_RESPONSE"] = "xBeesIntegrationProxyResponse";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
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": "",
@@ -530,16 +530,6 @@ 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
- }
543
533
  onContactWeightUpdate(callback) {
544
534
  return this.addEventListener(EventType.CONTACT_WEIGHT_UPDATE, callback);
545
535
  }
@@ -52,7 +52,6 @@ export var ClientEventType;
52
52
  ClientEventType["AVAILABLE_CONTACT_DATA"] = "xBeesAvailableContactData";
53
53
  ClientEventType["DROPDOWN_VISIBILITY"] = "xBeesDropdownVisibility";
54
54
  ClientEventType["CUSTOM_EVENT"] = "xBeesCustomEvent";
55
- ClientEventType["SET_CHAT_TO_OPEN"] = "xBeesSetChatToOpen";
56
55
  ClientEventType["CREATE_CONTACT_IS_SUPPORTED"] = "xBeesCreateContactIsSupported";
57
56
  ClientEventType["CREATE_CONTACT_HAS_NO_PERMISSION"] = "xBeesCreateContactHasNoPermission";
58
57
  ClientEventType["INTEGRATION_PROXY_RESPONSE"] = "xBeesIntegrationProxyResponse";
@@ -115,11 +115,6 @@ 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;
123
118
  onContactWeightUpdate(callback: Callback<EventType.CONTACT_WEIGHT_UPDATE>): RemoveEventListener;
124
119
  onContactRefresh(callback: Callback<EventType.CONTACT_REFRESH>): RemoveEventListener;
125
120
  onStartRedirectToEntityPage(callback: Callback<EventType.START_REDIRECT_TO_ENTITY_PAGE>): RemoveEventListener;
@@ -50,7 +50,6 @@ export declare enum ClientEventType {
50
50
  AVAILABLE_CONTACT_DATA = "xBeesAvailableContactData",
51
51
  DROPDOWN_VISIBILITY = "xBeesDropdownVisibility",
52
52
  CUSTOM_EVENT = "xBeesCustomEvent",
53
- SET_CHAT_TO_OPEN = "xBeesSetChatToOpen",
54
53
  CREATE_CONTACT_IS_SUPPORTED = "xBeesCreateContactIsSupported",
55
54
  CREATE_CONTACT_HAS_NO_PERMISSION = "xBeesCreateContactHasNoPermission",
56
55
  INTEGRATION_PROXY_RESPONSE = "xBeesIntegrationProxyResponse",
@@ -220,14 +220,6 @@ export interface ConnectClient {
220
220
  type: string;
221
221
  payload?: JSONValue;
222
222
  }) => void;
223
- /**
224
- * Asks x-bees to open (focus) the chat or conversation identified by `chatId`.
225
- * Fire-and-forget: sends `ClientEventType.SET_CHAT_TO_OPEN` to the parent; no response is surfaced to the integration.
226
- * When the app is not embedded in x-bees, this is a no-op (same as other outbound client messages).
227
- *
228
- * @param chatId - Conversation or chat identifier in x-bees.
229
- */
230
- setChatToOpen: (chatId: string) => void;
231
223
  /**
232
224
  * Starts listen for the events of contact weight update and handle with the provided callback
233
225
  */
@@ -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, IPayloadSetChatToOpen, 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, 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 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 : 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 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 : never;
9
9
  export type EventPayloadMap = {
10
10
  [EventType.GET_CONTACTS_AUTO_SUGGEST]: string;
11
11
  [EventType.GET_LOOK_UP_AND_MATCH]: ContactQuery;
@@ -87,10 +87,6 @@ export interface IPayloadCustomEvent {
87
87
  type: string;
88
88
  payload?: JSONValue;
89
89
  }
90
- /** Payload for the integration → x-bees message that requests opening a chat by id (`ClientEventType.SET_CHAT_TO_OPEN`). */
91
- export interface IPayloadSetChatToOpen {
92
- chatId: string;
93
- }
94
90
  export interface IPayloadContactWeightUpdate {
95
91
  id: string;
96
92
  query: ContactQuery;
@@ -131,6 +127,7 @@ export interface IntegrationProxyResponse {
131
127
  meta: {
132
128
  validated: boolean;
133
129
  validationWarnings?: string[];
130
+ instanceUrl?: string;
134
131
  };
135
132
  }
136
133
  export {};
@@ -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, IPayloadSendAnalytics, IPayloadSetChatToOpen, IPayloadStartRedirectToEntityPage, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort, } from './Payload';
10
+ export type { IntegrationProxyErrorCode, IntegrationProxyRequest, IntegrationProxyResponse, IPayloadAutoSuggestResult, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadCancelRedirectToEntityPage, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContextResult, IPayloadConversationResult, IPayloadSendAnalytics, 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.12",
3
+ "version": "1.3.13",
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": "",