@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 +1 -1
- package/src/client/config.js +4 -1
- package/src/sdks/chatwidget.d.ts +5 -0
- package/src/sdks/drozbot.d.ts +5 -1
- package/src/sdks/drozchat.d.ts +2 -2
- package/src/sdks/droznexo.d.ts +4 -0
- package/src/sdks/mercadolivre.d.ts +4 -0
- package/src/sdks/nucleus.d.ts +2 -2
- package/src/sdks/reclameaqui.d.ts +4 -1
- package/src/sdks/zendesk.d.ts +4 -0
package/package.json
CHANGED
package/src/client/config.js
CHANGED
|
@@ -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) {
|
package/src/sdks/chatwidget.d.ts
CHANGED
|
@@ -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'];
|
package/src/sdks/drozbot.d.ts
CHANGED
|
@@ -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['
|
|
109
|
+
phone?: InputMaybe<Scalars['PhoneNumber']['input']>;
|
|
106
110
|
};
|
|
107
111
|
export type DrozBotInstance = {
|
|
108
112
|
credentialsId: Scalars['ID']['output'];
|
package/src/sdks/drozchat.d.ts
CHANGED
package/src/sdks/droznexo.d.ts
CHANGED
package/src/sdks/nucleus.d.ts
CHANGED
|
@@ -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 = {
|