@wildix/xbees-connect 1.0.6-alpha.6 → 1.0.6-alpha.8

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-es/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  import { Client } from './src/Client';
2
+ export * from './src/enums';
2
3
  export default Client;
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.0.6-alpha.5",
3
+ "version": "1.0.6-alpha.7",
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": "",
7
7
  "sideEffects": false,
8
8
  "license": "MIT",
9
9
  "main": "./dist-cjs/index.js",
10
- "types": "./dist-types/types/index.d.ts",
10
+ "types": "./dist-types/index.d.ts",
11
11
  "module": "./dist-es/index.js",
12
12
  "type": "module",
13
13
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  import packageJson from '../package.json';
2
- import { ClientEventType, EventType, UrlParams, } from '../types';
2
+ import { ClientEventType, EventType, UrlParams } from './enums';
3
3
  import PostMessageControllerNative from './helpers/PostMessageControllerNative';
4
4
  import PostMessageControllerWeb from './helpers/PostMessageControllerWeb';
5
5
  /**
@@ -0,0 +1,34 @@
1
+ export var EventType;
2
+ (function (EventType) {
3
+ EventType["GET_CONTACTS_AUTO_SUGGEST"] = "xBeesGetContactsAutoSuggest";
4
+ EventType["GET_LOOK_UP_AND_MATCH"] = "xBeesGetLookUpAndMatch";
5
+ EventType["ADD_CALL"] = "xBeesAddCall";
6
+ EventType["TERMINATE_CALL"] = "xBeesTerminateCall";
7
+ EventType["USE_THEME"] = "xBeesUseTheme";
8
+ EventType["PBX_TOKEN"] = "xBeesPbxToken";
9
+ })(EventType || (EventType = {}));
10
+ export var ClientEventType;
11
+ (function (ClientEventType) {
12
+ ClientEventType["READY"] = "xBeesReady";
13
+ ClientEventType["CONTEXT"] = "xBeesContext";
14
+ ClientEventType["CURRENT_CONTACT"] = "xBeesCurrentContact";
15
+ ClientEventType["THEME_MODE"] = "xBeesThemeMode";
16
+ ClientEventType["THEME"] = "xBeesTheme";
17
+ ClientEventType["START_CALL"] = "xBeesStartCall";
18
+ ClientEventType["VIEW_PORT"] = "xBeesViewPort";
19
+ ClientEventType["REBOOT"] = "xBeesReboot";
20
+ ClientEventType["TO_CLIPBOARD"] = "xBeesToClipboard";
21
+ ClientEventType["NOT_AUTHORIZED"] = "xBeesNotAuthorized";
22
+ ClientEventType["AUTHORIZED"] = "xBeesAuthorized";
23
+ ClientEventType["CONTACTS_AUTO_SUGGEST"] = "xBeesContactsAutoSuggest";
24
+ ClientEventType["CONTACT_LOOKUP_AND_MATCH"] = "xBeesContactLookupAndMatch";
25
+ })(ClientEventType || (ClientEventType = {}));
26
+ export var UrlParams;
27
+ (function (UrlParams) {
28
+ UrlParams["TOKEN"] = "t";
29
+ UrlParams["ID"] = "i";
30
+ UrlParams["VARIANT"] = "v";
31
+ UrlParams["USER"] = "u";
32
+ UrlParams["REFERRER"] = "r";
33
+ UrlParams["AUTHORIZE"] = "a";
34
+ })(UrlParams || (UrlParams = {}));
@@ -1,34 +1 @@
1
- export var EventType;
2
- (function (EventType) {
3
- EventType["GET_CONTACTS_AUTO_SUGGEST"] = "xBeesGetContactsAutoSuggest";
4
- EventType["GET_LOOK_UP_AND_MATCH"] = "xBeesGetLookUpAndMatch";
5
- EventType["ADD_CALL"] = "xBeesAddCall";
6
- EventType["TERMINATE_CALL"] = "xBeesTerminateCall";
7
- EventType["USE_THEME"] = "xBeesUseTheme";
8
- EventType["PBX_TOKEN"] = "xBeesPbxToken";
9
- })(EventType || (EventType = {}));
10
- export var ClientEventType;
11
- (function (ClientEventType) {
12
- ClientEventType["READY"] = "xBeesReady";
13
- ClientEventType["CONTEXT"] = "xBeesContext";
14
- ClientEventType["CURRENT_CONTACT"] = "xBeesCurrentContact";
15
- ClientEventType["THEME_MODE"] = "xBeesThemeMode";
16
- ClientEventType["THEME"] = "xBeesTheme";
17
- ClientEventType["START_CALL"] = "xBeesStartCall";
18
- ClientEventType["VIEW_PORT"] = "xBeesViewPort";
19
- ClientEventType["REBOOT"] = "xBeesReboot";
20
- ClientEventType["TO_CLIPBOARD"] = "xBeesToClipboard";
21
- ClientEventType["NOT_AUTHORIZED"] = "xBeesNotAuthorized";
22
- ClientEventType["AUTHORIZED"] = "xBeesAuthorized";
23
- ClientEventType["CONTACTS_AUTO_SUGGEST"] = "xBeesContactsAutoSuggest";
24
- ClientEventType["CONTACT_LOOKUP_AND_MATCH"] = "xBeesContactLookupAndMatch";
25
- })(ClientEventType || (ClientEventType = {}));
26
- export var UrlParams;
27
- (function (UrlParams) {
28
- UrlParams["TOKEN"] = "t";
29
- UrlParams["ID"] = "i";
30
- UrlParams["VARIANT"] = "v";
31
- UrlParams["USER"] = "u";
32
- UrlParams["REFERRER"] = "r";
33
- UrlParams["AUTHORIZE"] = "a";
34
- })(UrlParams || (UrlParams = {}));
1
+ import { EventType } from '../src/enums';
@@ -1,2 +1,3 @@
1
1
  import { Client } from './src/Client';
2
+ export * from './src/enums';
2
3
  export default Client;
@@ -1,4 +1,5 @@
1
- import { Callback, ClientEventType, ConnectClient, ContactQuery, EventType, IPayloadAutoSuggestResult, IPayloadContactMatchResult, IPayloadViewPort, LookupAndMatchContactsResolver, Message, Reject, RemoveEventListener, ResponseMessage, SuggestContactsResolver } from '../types';
1
+ import { Callback, ConnectClient, ContactQuery, IPayloadAutoSuggestResult, IPayloadContactMatchResult, IPayloadViewPort, LookupAndMatchContactsResolver, Message, Reject, RemoveEventListener, ResponseMessage, SuggestContactsResolver } from '../types';
2
+ import { ClientEventType, EventType } from './enums';
2
3
  /**
3
4
  * Client provides functionality of communication between xBees and integrated web applications via iFrame or ReactNative WebView
4
5
  * integration creates na instance with new Client()
@@ -0,0 +1,31 @@
1
+ export declare enum EventType {
2
+ GET_CONTACTS_AUTO_SUGGEST = "xBeesGetContactsAutoSuggest",
3
+ GET_LOOK_UP_AND_MATCH = "xBeesGetLookUpAndMatch",
4
+ ADD_CALL = "xBeesAddCall",
5
+ TERMINATE_CALL = "xBeesTerminateCall",
6
+ USE_THEME = "xBeesUseTheme",
7
+ PBX_TOKEN = "xBeesPbxToken"
8
+ }
9
+ export declare enum ClientEventType {
10
+ READY = "xBeesReady",
11
+ CONTEXT = "xBeesContext",
12
+ CURRENT_CONTACT = "xBeesCurrentContact",
13
+ THEME_MODE = "xBeesThemeMode",
14
+ THEME = "xBeesTheme",
15
+ START_CALL = "xBeesStartCall",
16
+ VIEW_PORT = "xBeesViewPort",
17
+ REBOOT = "xBeesReboot",
18
+ TO_CLIPBOARD = "xBeesToClipboard",
19
+ NOT_AUTHORIZED = "xBeesNotAuthorized",
20
+ AUTHORIZED = "xBeesAuthorized",
21
+ CONTACTS_AUTO_SUGGEST = "xBeesContactsAutoSuggest",
22
+ CONTACT_LOOKUP_AND_MATCH = "xBeesContactLookupAndMatch"
23
+ }
24
+ export declare enum UrlParams {
25
+ TOKEN = "t",
26
+ ID = "i",
27
+ VARIANT = "v",
28
+ USER = "u",
29
+ REFERRER = "r",
30
+ AUTHORIZE = "a"
31
+ }
@@ -1,26 +1,4 @@
1
- export declare enum EventType {
2
- GET_CONTACTS_AUTO_SUGGEST = "xBeesGetContactsAutoSuggest",
3
- GET_LOOK_UP_AND_MATCH = "xBeesGetLookUpAndMatch",
4
- ADD_CALL = "xBeesAddCall",
5
- TERMINATE_CALL = "xBeesTerminateCall",
6
- USE_THEME = "xBeesUseTheme",
7
- PBX_TOKEN = "xBeesPbxToken"
8
- }
9
- export declare enum ClientEventType {
10
- READY = "xBeesReady",
11
- CONTEXT = "xBeesContext",
12
- CURRENT_CONTACT = "xBeesCurrentContact",
13
- THEME_MODE = "xBeesThemeMode",
14
- THEME = "xBeesTheme",
15
- START_CALL = "xBeesStartCall",
16
- VIEW_PORT = "xBeesViewPort",
17
- REBOOT = "xBeesReboot",
18
- TO_CLIPBOARD = "xBeesToClipboard",
19
- NOT_AUTHORIZED = "xBeesNotAuthorized",
20
- AUTHORIZED = "xBeesAuthorized",
21
- CONTACTS_AUTO_SUGGEST = "xBeesContactsAutoSuggest",
22
- CONTACT_LOOKUP_AND_MATCH = "xBeesContactLookupAndMatch"
23
- }
1
+ import { ClientEventType, EventType } from '../src/enums';
24
2
  export type MessageType = ClientEventType | EventType;
25
3
  interface ContactShape {
26
4
  id: string;
@@ -120,14 +98,6 @@ export interface Listener<T extends EventType = EventType> {
120
98
  eventName: T;
121
99
  callback: Callback<T>;
122
100
  }
123
- export declare enum UrlParams {
124
- TOKEN = "t",
125
- ID = "i",
126
- VARIANT = "v",
127
- USER = "u",
128
- REFERRER = "r",
129
- AUTHORIZE = "a"
130
- }
131
101
  export type WorkVariants = 'ui' | 'no-ui' | 'd';
132
102
  export interface PostMessageController {
133
103
  sendAsync<T extends MessageType>(data: MessageIFrameResponse<T>): Promise<ResponseMessage<T>>;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.0.6-alpha.6",
3
+ "version": "1.0.6-alpha.8",
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": "",
7
7
  "sideEffects": false,
8
8
  "license": "MIT",
9
9
  "main": "./dist-cjs/index.js",
10
- "types": "./dist-types/types/index.d.ts",
10
+ "types": "./dist-types/index.d.ts",
11
11
  "module": "./dist-es/index.js",
12
12
  "type": "module",
13
13
  "scripts": {
@@ -41,5 +41,5 @@
41
41
  "engines": {
42
42
  "node": ">=16"
43
43
  },
44
- "gitHead": "0db2f6939286ae3a1d41576190db7355854910e1"
44
+ "gitHead": "b56328e5ffb11f3ae10d23155294c28e7d62074f"
45
45
  }