@wildix/xbees-connect 1.2.34 → 1.2.36
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-cjs/package.json +1 -1
- package/dist-cjs/src/Client.js +7 -0
- package/dist-cjs/src/enums/index.js +1 -0
- package/dist-es/package.json +1 -1
- package/dist-es/src/Client.js +7 -0
- package/dist-es/src/enums/index.js +1 -0
- package/dist-types/src/Client.d.ts +2 -0
- package/dist-types/src/enums/index.d.ts +1 -0
- package/dist-types/types/Client.d.ts +4 -0
- package/dist-types/types/Event.d.ts +2 -2
- package/dist-types/types/Payload.d.ts +3 -0
- package/package.json +2 -2
package/dist-cjs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.35",
|
|
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
|
@@ -442,6 +442,13 @@ class Client {
|
|
|
442
442
|
payload: { key },
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
|
+
/** should be removed, sendCustomEvent is enough **/
|
|
446
|
+
sendDropdownVisibilityEvent(dropdownVisibilityStatus) {
|
|
447
|
+
void this.sendAsync({
|
|
448
|
+
type: enums_1.ClientEventType.DROPDOWN_VISIBILITY,
|
|
449
|
+
payload: { dropdownVisibilityStatus },
|
|
450
|
+
});
|
|
451
|
+
}
|
|
445
452
|
sendCustomEvent({ type, payload }) {
|
|
446
453
|
void this.sendAsync({
|
|
447
454
|
type: enums_1.ClientEventType.CUSTOM_EVENT,
|
|
@@ -48,6 +48,7 @@ var ClientEventType;
|
|
|
48
48
|
ClientEventType["GET_FROM_STORAGE"] = "xBeesRequestFromStorage";
|
|
49
49
|
ClientEventType["REMOVE_FROM_STORAGE"] = "xBeesRemoveFromStorage";
|
|
50
50
|
ClientEventType["AVAILABLE_CONTACT_DATA"] = "xBeesAvailableContactData";
|
|
51
|
+
ClientEventType["DROPDOWN_VISIBILITY"] = "xBeesDropdownVisibility";
|
|
51
52
|
ClientEventType["CUSTOM_EVENT"] = "xBeesCustomEvent";
|
|
52
53
|
ClientEventType["CREATE_CONTACT_IS_SUPPORTED"] = "xBeesCreateContactIsSupported";
|
|
53
54
|
ClientEventType["CREATE_CONTACT_HAS_NO_PERMISSION"] = "xBeesCreateContactHasNoPermission";
|
package/dist-es/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.35",
|
|
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
|
@@ -436,6 +436,13 @@ export class Client {
|
|
|
436
436
|
payload: { key },
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
+
/** should be removed, sendCustomEvent is enough **/
|
|
440
|
+
sendDropdownVisibilityEvent(dropdownVisibilityStatus) {
|
|
441
|
+
void this.sendAsync({
|
|
442
|
+
type: ClientEventType.DROPDOWN_VISIBILITY,
|
|
443
|
+
payload: { dropdownVisibilityStatus },
|
|
444
|
+
});
|
|
445
|
+
}
|
|
439
446
|
sendCustomEvent({ type, payload }) {
|
|
440
447
|
void this.sendAsync({
|
|
441
448
|
type: ClientEventType.CUSTOM_EVENT,
|
|
@@ -45,6 +45,7 @@ export var ClientEventType;
|
|
|
45
45
|
ClientEventType["GET_FROM_STORAGE"] = "xBeesRequestFromStorage";
|
|
46
46
|
ClientEventType["REMOVE_FROM_STORAGE"] = "xBeesRemoveFromStorage";
|
|
47
47
|
ClientEventType["AVAILABLE_CONTACT_DATA"] = "xBeesAvailableContactData";
|
|
48
|
+
ClientEventType["DROPDOWN_VISIBILITY"] = "xBeesDropdownVisibility";
|
|
48
49
|
ClientEventType["CUSTOM_EVENT"] = "xBeesCustomEvent";
|
|
49
50
|
ClientEventType["CREATE_CONTACT_IS_SUPPORTED"] = "xBeesCreateContactIsSupported";
|
|
50
51
|
ClientEventType["CREATE_CONTACT_HAS_NO_PERMISSION"] = "xBeesCreateContactHasNoPermission";
|
|
@@ -94,6 +94,8 @@ export declare class Client implements ConnectClient {
|
|
|
94
94
|
saveInXbeesStorage<SavingType>(key: string, value: SavingType): void;
|
|
95
95
|
getFromXbeesStorage(key: string): Promise<ResponseMessage<ClientEventType.GET_FROM_STORAGE>>;
|
|
96
96
|
removeFromXbeesStorage(key: string): void;
|
|
97
|
+
/** should be removed, sendCustomEvent is enough **/
|
|
98
|
+
sendDropdownVisibilityEvent(dropdownVisibilityStatus: boolean): void;
|
|
97
99
|
sendCustomEvent({ type, payload }: {
|
|
98
100
|
type: string;
|
|
99
101
|
payload?: JSONValue;
|
|
@@ -43,6 +43,7 @@ export declare enum ClientEventType {
|
|
|
43
43
|
GET_FROM_STORAGE = "xBeesRequestFromStorage",
|
|
44
44
|
REMOVE_FROM_STORAGE = "xBeesRemoveFromStorage",
|
|
45
45
|
AVAILABLE_CONTACT_DATA = "xBeesAvailableContactData",
|
|
46
|
+
DROPDOWN_VISIBILITY = "xBeesDropdownVisibility",
|
|
46
47
|
CUSTOM_EVENT = "xBeesCustomEvent",
|
|
47
48
|
CREATE_CONTACT_IS_SUPPORTED = "xBeesCreateContactIsSupported",
|
|
48
49
|
CREATE_CONTACT_HAS_NO_PERMISSION = "xBeesCreateContactHasNoPermission"
|
|
@@ -193,6 +193,10 @@ export interface ConnectClient {
|
|
|
193
193
|
/**
|
|
194
194
|
* Remove data from x-bees storage */
|
|
195
195
|
removeFromXbeesStorage: (key: string) => void;
|
|
196
|
+
/**
|
|
197
|
+
* Send to xbees dropdown status when it is actioned for change Webview nestedScrollEnabled (Android)
|
|
198
|
+
*/
|
|
199
|
+
sendDropdownVisibilityEvent: (dropdownVisibilityStatus: boolean) => void;
|
|
196
200
|
/**
|
|
197
201
|
* Send to xbees custom event with eventType and payload
|
|
198
202
|
*/
|
|
@@ -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 { IPayloadAutoSuggestResult, IPayloadBatchContactsMatchResult, IPayloadBatchContactsMatchResultError, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContextResult, IPayloadConversationResult, IPayloadCustomEvent, IPayloadGetFromStorage, IPayloadSaveToStorage, IPayloadSendAnalytics, IPayloadTechSupport, IPayloadThemeChange, IPayloadToast, IPayloadVersion, IPayloadViewPort } from './Payload';
|
|
5
|
+
import { IPayloadAutoSuggestResult, IPayloadBatchContactsMatchResult, IPayloadBatchContactsMatchResultError, IPayloadCallStart, IPayloadCallStartedInfo, IPayloadContactMatchResult, IPayloadContactMatchResultNotFound, IPayloadContactResult, IPayloadContextResult, IPayloadConversationResult, IPayloadCustomEvent, IPayloadDropdownVisibility, IPayloadGetFromStorage, IPayloadSaveToStorage, IPayloadSendAnalytics, 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.CUSTOM_EVENT ? IPayloadCustomEvent : 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 : never;
|
|
9
9
|
export type EventPayloadMap = {
|
|
10
10
|
[EventType.GET_CONTACTS_AUTO_SUGGEST]: string;
|
|
11
11
|
[EventType.GET_LOOK_UP_AND_MATCH]: ContactQuery;
|
|
@@ -77,6 +77,9 @@ export interface IPayloadTechSupport {
|
|
|
77
77
|
message: string;
|
|
78
78
|
data?: JSONObject | JSONArray;
|
|
79
79
|
}
|
|
80
|
+
export interface IPayloadDropdownVisibility {
|
|
81
|
+
dropdownVisibilityStatus: boolean;
|
|
82
|
+
}
|
|
80
83
|
export interface IPayloadCustomEvent {
|
|
81
84
|
type: string;
|
|
82
85
|
payload?: JSONValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-connect",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.36",
|
|
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": "",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=16"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "3707f291c4badc6c7f1824a565b43beb0166339a"
|
|
49
49
|
}
|