@droz-js/sdk 0.2.12 → 0.2.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@droz-js/sdk",
3
3
  "description": "Droz SDK",
4
- "version": "0.2.12",
4
+ "version": "0.2.13",
5
5
  "private": false,
6
6
  "exports": {
7
7
  ".": "./src/index.js",
@@ -66,7 +66,10 @@ class DrozSdk {
66
66
  async function promise() {
67
67
  // fetch instances from discovery service
68
68
  const data = await fetch(`${helpers_1.serviceDiscoveryEndpoint}/discover/${tenant}`);
69
- const json = await data.json();
69
+ const json = await data.json().catch(error => {
70
+ console.error(error);
71
+ return {};
72
+ });
70
73
  const instances = json.instances ?? [];
71
74
  // validate it's a valid tenant
72
75
  if (instances.length === 0) {
@@ -69,6 +69,10 @@ export type Scalars = {
69
69
  input: any;
70
70
  output: any;
71
71
  };
72
+ PhoneNumber: {
73
+ input: string;
74
+ output: string;
75
+ };
72
76
  Set: {
73
77
  input: Set<any>;
74
78
  output: any[];
@@ -89,6 +93,7 @@ export type ChatWidget = {
89
93
  export type ChatWidgetMessage = {
90
94
  id: Scalars['ID']['output'];
91
95
  payload: Array<ChatWidgetMessagePayload>;
96
+ sessionClosed: Scalars['Boolean']['output'];
92
97
  };
93
98
  export type ChatWidgetMessagePayload = {
94
99
  content: Scalars['String']['output'];
@@ -69,6 +69,10 @@ export type Scalars = {
69
69
  input: any;
70
70
  output: any;
71
71
  };
72
+ PhoneNumber: {
73
+ input: string;
74
+ output: string;
75
+ };
72
76
  Set: {
73
77
  input: Set<any>;
74
78
  output: any[];
@@ -102,7 +106,7 @@ export type CreateDrozBotTicketProfileInput = {
102
106
  email?: InputMaybe<Scalars['String']['input']>;
103
107
  identifier?: InputMaybe<Scalars['ID']['input']>;
104
108
  name?: InputMaybe<Scalars['String']['input']>;
105
- phone?: InputMaybe<Scalars['String']['input']>;
109
+ phone?: InputMaybe<Scalars['PhoneNumber']['input']>;
106
110
  };
107
111
  export type DrozBotInstance = {
108
112
  credentialsId: Scalars['ID']['output'];
@@ -70,8 +70,8 @@ export type Scalars = {
70
70
  output: any;
71
71
  };
72
72
  PhoneNumber: {
73
- input: any;
74
- output: any;
73
+ input: string;
74
+ output: string;
75
75
  };
76
76
  Set: {
77
77
  input: Set<any>;
@@ -69,6 +69,10 @@ export type Scalars = {
69
69
  input: any;
70
70
  output: any;
71
71
  };
72
+ PhoneNumber: {
73
+ input: string;
74
+ output: string;
75
+ };
72
76
  Set: {
73
77
  input: Set<any>;
74
78
  output: any[];
@@ -69,6 +69,10 @@ export type Scalars = {
69
69
  input: any;
70
70
  output: any;
71
71
  };
72
+ PhoneNumber: {
73
+ input: string;
74
+ output: string;
75
+ };
72
76
  Set: {
73
77
  input: Set<any>;
74
78
  output: any[];
@@ -70,8 +70,8 @@ export type Scalars = {
70
70
  output: any;
71
71
  };
72
72
  PhoneNumber: {
73
- input: any;
74
- output: any;
73
+ input: string;
74
+ output: string;
75
75
  };
76
76
  Set: {
77
77
  input: Set<any>;
@@ -69,6 +69,10 @@ export type Scalars = {
69
69
  input: any;
70
70
  output: any;
71
71
  };
72
+ PhoneNumber: {
73
+ input: string;
74
+ output: string;
75
+ };
72
76
  Set: {
73
77
  input: Set<any>;
74
78
  output: any[];
@@ -84,7 +88,6 @@ export type Scalars = {
84
88
  };
85
89
  export type CreateReclameAquiInstanceInput = {
86
90
  credentialId?: InputMaybe<Scalars['ID']['input']>;
87
- id: Scalars['ID']['input'];
88
91
  name: Scalars['String']['input'];
89
92
  };
90
93
  export type Mutation = {
@@ -69,6 +69,10 @@ export type Scalars = {
69
69
  input: any;
70
70
  output: any;
71
71
  };
72
+ PhoneNumber: {
73
+ input: string;
74
+ output: string;
75
+ };
72
76
  Set: {
73
77
  input: Set<any>;
74
78
  output: any[];