@wildix/xbees-connect 1.3.19-alpha.1 → 1.3.19-alpha.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.19-alpha.1",
3
+ "version": "1.3.19-alpha.2",
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": "",
@@ -78,11 +78,6 @@ class Client {
78
78
  console.warn('[xbees-connect] Application is not running inside xbees. URL:', window.location.href);
79
79
  return new Promise(() => { });
80
80
  }
81
- // [WMS-26987 DEBUG] TEMPORARY: every outbound iframe->host message. This is the only
82
- // place the producer's payload is observable before it leaves the SDK, so it proves
83
- // whether additionalPhones/additionalEmails/matchedValue survive toContact().
84
- // eslint-disable-next-line no-console
85
- console.log('[WMS-26987][sdk-ui][OUT]', data.type, { payload: data.payload });
86
81
  return this.worker.sendAsync({
87
82
  ...data,
88
83
  iframeId: this.iframeId,
@@ -115,11 +110,6 @@ class Client {
115
110
  return;
116
111
  }
117
112
  const { type, payload } = data;
118
- // [WMS-26987 DEBUG] TEMPORARY: every inbound host->iframe message. NOTE: the similar log in
119
- // MessageListener.onMessage can never fire - MessageListener.getInstance() has zero callers,
120
- // so that class is dead code and Client.onMessage is the only live inbound path.
121
- // eslint-disable-next-line no-console
122
- console.log('[WMS-26987][sdk-ui][IN]', type, { payload });
123
113
  this.listeners.forEach(({ eventName, callback }) => {
124
114
  if (eventName === type) {
125
115
  if (type === enums_1.EventType.ADD_CALL) {
@@ -46,10 +46,7 @@ class MessageListener {
46
46
  return;
47
47
  }
48
48
  const { type, payload } = data;
49
- // [WMS-26987 DEBUG] TEMPORARY: was `${payload}` which renders '[object Object]'.
50
- // Pass the object so the inbound payload is actually inspectable in devtools.
51
- // eslint-disable-next-line no-console
52
- console.debug('[WMS-26987][sdk-ui][IN]', type, { payload });
49
+ console.debug(`onMessage call - ${type} - ${payload}`);
53
50
  this.listeners.forEach(({ eventName, callback }) => {
54
51
  if (eventName === type) {
55
52
  if (type === enums_1.EventType.ADD_CALL) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.19-alpha.1",
3
+ "version": "1.3.19-alpha.2",
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": "",
@@ -72,11 +72,6 @@ export class Client {
72
72
  console.warn('[xbees-connect] Application is not running inside xbees. URL:', window.location.href);
73
73
  return new Promise(() => { });
74
74
  }
75
- // [WMS-26987 DEBUG] TEMPORARY: every outbound iframe->host message. This is the only
76
- // place the producer's payload is observable before it leaves the SDK, so it proves
77
- // whether additionalPhones/additionalEmails/matchedValue survive toContact().
78
- // eslint-disable-next-line no-console
79
- console.log('[WMS-26987][sdk-ui][OUT]', data.type, { payload: data.payload });
80
75
  return this.worker.sendAsync({
81
76
  ...data,
82
77
  iframeId: this.iframeId,
@@ -109,11 +104,6 @@ export class Client {
109
104
  return;
110
105
  }
111
106
  const { type, payload } = data;
112
- // [WMS-26987 DEBUG] TEMPORARY: every inbound host->iframe message. NOTE: the similar log in
113
- // MessageListener.onMessage can never fire - MessageListener.getInstance() has zero callers,
114
- // so that class is dead code and Client.onMessage is the only live inbound path.
115
- // eslint-disable-next-line no-console
116
- console.log('[WMS-26987][sdk-ui][IN]', type, { payload });
117
107
  this.listeners.forEach(({ eventName, callback }) => {
118
108
  if (eventName === type) {
119
109
  if (type === EventType.ADD_CALL) {
@@ -43,10 +43,7 @@ export class MessageListener {
43
43
  return;
44
44
  }
45
45
  const { type, payload } = data;
46
- // [WMS-26987 DEBUG] TEMPORARY: was `${payload}` which renders '[object Object]'.
47
- // Pass the object so the inbound payload is actually inspectable in devtools.
48
- // eslint-disable-next-line no-console
49
- console.debug('[WMS-26987][sdk-ui][IN]', type, { payload });
46
+ console.debug(`onMessage call - ${type} - ${payload}`);
50
47
  this.listeners.forEach(({ eventName, callback }) => {
51
48
  if (eventName === type) {
52
49
  if (type === EventType.ADD_CALL) {
@@ -1,4 +1,4 @@
1
- export interface ContactChannel {
1
+ export interface EmailPhoneEntry {
2
2
  value: string;
3
3
  label?: string;
4
4
  field?: string;
@@ -16,8 +16,8 @@ export interface ContactShape {
16
16
  homeMobileNumber?: string;
17
17
  extension?: string;
18
18
  organization?: string;
19
- additionalEmails?: ContactChannel[];
20
- additionalPhones?: ContactChannel[];
19
+ additionalEmails?: EmailPhoneEntry[];
20
+ additionalPhones?: EmailPhoneEntry[];
21
21
  matchedValue?: string;
22
22
  }
23
23
  export type Contact = (ContactShape & {
@@ -1,7 +1,7 @@
1
1
  export type { AvailableContactData } from './AvailableContactData';
2
2
  export type { Callback } from './Callback';
3
3
  export type { ConnectClient } from './Client';
4
- export type { Contact, ContactChannel, ContactQuery } from './Contact';
4
+ export type { Contact, ContactQuery, EmailPhoneEntry } from './Contact';
5
5
  export type { EventPayloadMap, RawMessageEvent } from './Event';
6
6
  export type { JSONArray, JSONObject } from './Json';
7
7
  export type { Listener, RemoveEventListener } from './Listener';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-connect",
3
- "version": "1.3.19-alpha.1",
3
+ "version": "1.3.19-alpha.2",
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": "",
@@ -9,17 +9,6 @@
9
9
  "main": "./dist-cjs/index.js",
10
10
  "types": "./dist-types/index.d.ts",
11
11
  "module": "./dist-es/index.js",
12
- "scripts": {
13
- "build": "pnpm run clean && pnpm run build:es && pnpm run build:cjs && pnpm run build:types",
14
- "build:es": "tsc -p tsconfig.es.json",
15
- "build:cjs": "tsc -p tsconfig.cjs.json",
16
- "build:types": "tsc -p tsconfig.types.json",
17
- "build:docs": "typedoc",
18
- "lint": "eslint . && tsc --noEmit",
19
- "lint:fix": "eslint . --fix",
20
- "clean": "rimraf --glob './dist-*' '*.tsbuildinfo'",
21
- "build:api-extractor": "api-extractor run --local"
22
- },
23
12
  "files": [
24
13
  "dist-*/**"
25
14
  ],
@@ -44,5 +33,16 @@
44
33
  },
45
34
  "engines": {
46
35
  "node": ">=16"
36
+ },
37
+ "scripts": {
38
+ "build": "pnpm run clean && pnpm run build:es && pnpm run build:cjs && pnpm run build:types",
39
+ "build:es": "tsc -p tsconfig.es.json",
40
+ "build:cjs": "tsc -p tsconfig.cjs.json",
41
+ "build:types": "tsc -p tsconfig.types.json",
42
+ "build:docs": "typedoc",
43
+ "lint": "eslint . && tsc --noEmit",
44
+ "lint:fix": "eslint . --fix",
45
+ "clean": "rimraf --glob './dist-*' '*.tsbuildinfo'",
46
+ "build:api-extractor": "api-extractor run --local"
47
47
  }
48
- }
48
+ }