@droz-js/sdk 0.20.2 → 0.20.4
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/apiconnectors.d.ts +29 -0
- package/src/apiconnectors.js +23 -0
- package/src/drozadmin.d.ts +9 -0
- package/src/drozai.d.ts +7 -0
- package/src/salesforce.d.ts +10 -0
- package/src/sdks/ai.d.ts +78 -11
- package/src/sdks/ai.js +77 -29
- package/src/sdks/apiconnectors.d.ts +422 -0
- package/src/sdks/apiconnectors.js +134 -0
- package/src/sdks/drozchat.d.ts +7 -5
- package/src/sdks/drozchat.js +7 -0
- package/src/sdks/drozcommons.d.ts +73 -0
- package/src/sdks/drozcommons.js +65 -2
- package/src/sdks/outsource.d.ts +2 -0
- package/src/sdks/salesforce.d.ts +43 -7
- package/src/sdks/salesforce.js +40 -1
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
export type Maybe<T> = T;
|
|
2
|
+
export type InputMaybe<T> = T;
|
|
3
|
+
export type Exact<T extends {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}> = {
|
|
6
|
+
[K in keyof T]: T[K];
|
|
7
|
+
};
|
|
8
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
+
};
|
|
11
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
+
};
|
|
14
|
+
export type MakeEmpty<T extends {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}, K extends keyof T> = {
|
|
17
|
+
[_ in K]?: never;
|
|
18
|
+
};
|
|
19
|
+
export type Incremental<T> = T | {
|
|
20
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
+
};
|
|
22
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
|
+
export type Scalars = {
|
|
24
|
+
ID: {
|
|
25
|
+
input: string;
|
|
26
|
+
output: string;
|
|
27
|
+
};
|
|
28
|
+
String: {
|
|
29
|
+
input: string;
|
|
30
|
+
output: string;
|
|
31
|
+
};
|
|
32
|
+
Boolean: {
|
|
33
|
+
input: boolean;
|
|
34
|
+
output: boolean;
|
|
35
|
+
};
|
|
36
|
+
Int: {
|
|
37
|
+
input: number;
|
|
38
|
+
output: number;
|
|
39
|
+
};
|
|
40
|
+
Float: {
|
|
41
|
+
input: number;
|
|
42
|
+
output: number;
|
|
43
|
+
};
|
|
44
|
+
Base64: {
|
|
45
|
+
input: object;
|
|
46
|
+
output: string;
|
|
47
|
+
};
|
|
48
|
+
CountryCode: {
|
|
49
|
+
input: string;
|
|
50
|
+
output: string;
|
|
51
|
+
};
|
|
52
|
+
Currency: {
|
|
53
|
+
input: string;
|
|
54
|
+
output: string;
|
|
55
|
+
};
|
|
56
|
+
DRN: {
|
|
57
|
+
input: string;
|
|
58
|
+
output: string;
|
|
59
|
+
};
|
|
60
|
+
Date: {
|
|
61
|
+
input: Date;
|
|
62
|
+
output: Date;
|
|
63
|
+
};
|
|
64
|
+
DateTime: {
|
|
65
|
+
input: Date;
|
|
66
|
+
output: Date;
|
|
67
|
+
};
|
|
68
|
+
EmailAddress: {
|
|
69
|
+
input: string;
|
|
70
|
+
output: string;
|
|
71
|
+
};
|
|
72
|
+
IPAddress: {
|
|
73
|
+
input: string;
|
|
74
|
+
output: string;
|
|
75
|
+
};
|
|
76
|
+
JSON: {
|
|
77
|
+
input: any;
|
|
78
|
+
output: any;
|
|
79
|
+
};
|
|
80
|
+
JSONObject: {
|
|
81
|
+
input: any;
|
|
82
|
+
output: any;
|
|
83
|
+
};
|
|
84
|
+
Locale: {
|
|
85
|
+
input: string;
|
|
86
|
+
output: string;
|
|
87
|
+
};
|
|
88
|
+
Number: {
|
|
89
|
+
input: string | number;
|
|
90
|
+
output: number;
|
|
91
|
+
};
|
|
92
|
+
PhoneNumber: {
|
|
93
|
+
input: string;
|
|
94
|
+
output: string;
|
|
95
|
+
};
|
|
96
|
+
Set: {
|
|
97
|
+
input: any;
|
|
98
|
+
output: any[];
|
|
99
|
+
};
|
|
100
|
+
Tag: {
|
|
101
|
+
input: string;
|
|
102
|
+
output: string;
|
|
103
|
+
};
|
|
104
|
+
TenantId: {
|
|
105
|
+
input: string;
|
|
106
|
+
output: string;
|
|
107
|
+
};
|
|
108
|
+
Timezone: {
|
|
109
|
+
input: string;
|
|
110
|
+
output: string;
|
|
111
|
+
};
|
|
112
|
+
URL: {
|
|
113
|
+
input: string;
|
|
114
|
+
output: string;
|
|
115
|
+
};
|
|
116
|
+
VariableName: {
|
|
117
|
+
input: string;
|
|
118
|
+
output: string;
|
|
119
|
+
};
|
|
120
|
+
Void: {
|
|
121
|
+
input: void;
|
|
122
|
+
output: void;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export type AgentInfo = {
|
|
126
|
+
id: Scalars['ID']['output'];
|
|
127
|
+
name: Scalars['String']['output'];
|
|
128
|
+
picture?: Maybe<Scalars['String']['output']>;
|
|
129
|
+
};
|
|
130
|
+
export declare enum AppInstanceStatus {
|
|
131
|
+
Active = "Active",
|
|
132
|
+
Failing = "Failing",
|
|
133
|
+
Inactive = "Inactive"
|
|
134
|
+
}
|
|
135
|
+
export declare enum Can {
|
|
136
|
+
Manage = "manage",
|
|
137
|
+
Read = "read",
|
|
138
|
+
Remove = "remove",
|
|
139
|
+
Write = "write"
|
|
140
|
+
}
|
|
141
|
+
export type Connector = {
|
|
142
|
+
createdAt: Scalars['DateTime']['output'];
|
|
143
|
+
credentialId?: Maybe<Scalars['ID']['output']>;
|
|
144
|
+
credentialsHeader?: Maybe<Scalars['String']['output']>;
|
|
145
|
+
drn: Scalars['DRN']['output'];
|
|
146
|
+
failingReason?: Maybe<Scalars['String']['output']>;
|
|
147
|
+
failingSince?: Maybe<Scalars['DateTime']['output']>;
|
|
148
|
+
headers: Array<ConnectorHeader>;
|
|
149
|
+
id: Scalars['ID']['output'];
|
|
150
|
+
method: ConnectorMethod;
|
|
151
|
+
name: Scalars['String']['output'];
|
|
152
|
+
/** Template do corpo (JSON ou form-urlencoded) com variáveis substituíveis. */
|
|
153
|
+
requestBodyTemplate?: Maybe<Scalars['String']['output']>;
|
|
154
|
+
/** Aceita compatibilidade com versões/cifras de TLS mais antigas no destino. */
|
|
155
|
+
requiresLegacyTls: Scalars['Boolean']['output'];
|
|
156
|
+
responseIsArray: Scalars['Boolean']['output'];
|
|
157
|
+
responseIsFile: Scalars['Boolean']['output'];
|
|
158
|
+
/** Template de mapeamento aplicado ao corpo bruto da resposta. */
|
|
159
|
+
responseMappingTemplate?: Maybe<Scalars['String']['output']>;
|
|
160
|
+
/** Nome sob o qual a resposta (mapeada) fica disponível para quem chamou o conector. */
|
|
161
|
+
responseVariableName?: Maybe<Scalars['String']['output']>;
|
|
162
|
+
secretHeaders: Array<ConnectorSecretHeader>;
|
|
163
|
+
status?: Maybe<AppInstanceStatus>;
|
|
164
|
+
stripArrayElementsWithUndefinedVariables: Scalars['Boolean']['output'];
|
|
165
|
+
stripUndefinedBodyVariables: Scalars['Boolean']['output'];
|
|
166
|
+
tags: Array<Scalars['Tag']['output']>;
|
|
167
|
+
timeoutMs: Scalars['Int']['output'];
|
|
168
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
169
|
+
/** Variáveis substituíveis usam Handlebars: {{nomeDaVariavel}}, com chave dupla. */
|
|
170
|
+
url: Scalars['String']['output'];
|
|
171
|
+
useFormUrlEncoded: Scalars['Boolean']['output'];
|
|
172
|
+
};
|
|
173
|
+
export type ConnectorExecutionResult = {
|
|
174
|
+
data?: Maybe<Scalars['JSON']['output']>;
|
|
175
|
+
status: Scalars['Int']['output'];
|
|
176
|
+
};
|
|
177
|
+
export type ConnectorHeader = {
|
|
178
|
+
key: Scalars['String']['output'];
|
|
179
|
+
value: Scalars['String']['output'];
|
|
180
|
+
};
|
|
181
|
+
export type ConnectorHeaderInput = {
|
|
182
|
+
key: Scalars['String']['input'];
|
|
183
|
+
value: Scalars['String']['input'];
|
|
184
|
+
};
|
|
185
|
+
export declare enum ConnectorMethod {
|
|
186
|
+
Delete = "DELETE",
|
|
187
|
+
Get = "GET",
|
|
188
|
+
Patch = "PATCH",
|
|
189
|
+
Post = "POST",
|
|
190
|
+
Put = "PUT"
|
|
191
|
+
}
|
|
192
|
+
export type ConnectorSecretHeader = {
|
|
193
|
+
credentialId: Scalars['ID']['output'];
|
|
194
|
+
key: Scalars['String']['output'];
|
|
195
|
+
};
|
|
196
|
+
export type ConnectorSecretHeaderInput = {
|
|
197
|
+
credentialId: Scalars['ID']['input'];
|
|
198
|
+
key: Scalars['String']['input'];
|
|
199
|
+
};
|
|
200
|
+
export type CreateConnectorInput = {
|
|
201
|
+
credentialId?: InputMaybe<Scalars['ID']['input']>;
|
|
202
|
+
credentialsHeader?: InputMaybe<Scalars['String']['input']>;
|
|
203
|
+
headers?: InputMaybe<Array<ConnectorHeaderInput>>;
|
|
204
|
+
method: ConnectorMethod;
|
|
205
|
+
name: Scalars['String']['input'];
|
|
206
|
+
requestBodyTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
207
|
+
requiresLegacyTls?: InputMaybe<Scalars['Boolean']['input']>;
|
|
208
|
+
responseIsArray?: InputMaybe<Scalars['Boolean']['input']>;
|
|
209
|
+
responseIsFile?: InputMaybe<Scalars['Boolean']['input']>;
|
|
210
|
+
responseMappingTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
211
|
+
responseVariableName?: InputMaybe<Scalars['String']['input']>;
|
|
212
|
+
secretHeaders?: InputMaybe<Array<ConnectorSecretHeaderInput>>;
|
|
213
|
+
stripArrayElementsWithUndefinedVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
214
|
+
stripUndefinedBodyVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
215
|
+
tags?: InputMaybe<Array<Scalars['Tag']['input']>>;
|
|
216
|
+
timeoutMs?: InputMaybe<Scalars['Int']['input']>;
|
|
217
|
+
/** Variáveis substituíveis usam Handlebars: {{nomeDaVariavel}}, com chave dupla. */
|
|
218
|
+
url: Scalars['String']['input'];
|
|
219
|
+
useFormUrlEncoded?: InputMaybe<Scalars['Boolean']['input']>;
|
|
220
|
+
};
|
|
221
|
+
export type ExecuteConnectorInput = {
|
|
222
|
+
/** Variaveis disponiveis para o template da URL/headers/corpo do Connector. Nada alem disso entra no contexto. */
|
|
223
|
+
args?: InputMaybe<Scalars['JSON']['input']>;
|
|
224
|
+
id: Scalars['ID']['input'];
|
|
225
|
+
};
|
|
226
|
+
export type I18nText = {
|
|
227
|
+
lang: Scalars['Locale']['output'];
|
|
228
|
+
value: Scalars['String']['output'];
|
|
229
|
+
};
|
|
230
|
+
export type I18nTextInput = {
|
|
231
|
+
lang: Scalars['Locale']['input'];
|
|
232
|
+
value: Scalars['String']['input'];
|
|
233
|
+
};
|
|
234
|
+
export type Mutation = {
|
|
235
|
+
createConnector: Connector;
|
|
236
|
+
/** Dispara um Connector fora do passo de fluxo e devolve a resposta imediatamente. */
|
|
237
|
+
executeConnector: ConnectorExecutionResult;
|
|
238
|
+
removeConnector?: Maybe<Connector>;
|
|
239
|
+
updateConnector: Connector;
|
|
240
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
241
|
+
};
|
|
242
|
+
export type MutationCreateConnectorArgs = {
|
|
243
|
+
input: CreateConnectorInput;
|
|
244
|
+
};
|
|
245
|
+
export type MutationExecuteConnectorArgs = {
|
|
246
|
+
input: ExecuteConnectorInput;
|
|
247
|
+
};
|
|
248
|
+
export type MutationRemoveConnectorArgs = {
|
|
249
|
+
input: RemoveConnectorInput;
|
|
250
|
+
};
|
|
251
|
+
export type MutationUpdateConnectorArgs = {
|
|
252
|
+
input: UpdateConnectorInput;
|
|
253
|
+
};
|
|
254
|
+
export type NumberMatcher = {
|
|
255
|
+
btw?: Maybe<Array<Scalars['Number']['output']>>;
|
|
256
|
+
eq?: Maybe<Scalars['Number']['output']>;
|
|
257
|
+
gt?: Maybe<Scalars['Number']['output']>;
|
|
258
|
+
gte?: Maybe<Scalars['Number']['output']>;
|
|
259
|
+
lt?: Maybe<Scalars['Number']['output']>;
|
|
260
|
+
lte?: Maybe<Scalars['Number']['output']>;
|
|
261
|
+
ne?: Maybe<Scalars['Number']['output']>;
|
|
262
|
+
};
|
|
263
|
+
export type NumberMatcherInput = {
|
|
264
|
+
btw?: InputMaybe<Array<Scalars['Number']['input']>>;
|
|
265
|
+
eq?: InputMaybe<Scalars['Number']['input']>;
|
|
266
|
+
gt?: InputMaybe<Scalars['Number']['input']>;
|
|
267
|
+
gte?: InputMaybe<Scalars['Number']['input']>;
|
|
268
|
+
lt?: InputMaybe<Scalars['Number']['input']>;
|
|
269
|
+
lte?: InputMaybe<Scalars['Number']['input']>;
|
|
270
|
+
ne?: InputMaybe<Scalars['Number']['input']>;
|
|
271
|
+
};
|
|
272
|
+
export type PageInfo = {
|
|
273
|
+
hasNext: Scalars['Boolean']['output'];
|
|
274
|
+
next?: Maybe<Scalars['Base64']['output']>;
|
|
275
|
+
};
|
|
276
|
+
export type Query = {
|
|
277
|
+
app?: Maybe<Scalars['DRN']['output']>;
|
|
278
|
+
getConnector?: Maybe<Connector>;
|
|
279
|
+
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
280
|
+
listConnectors: Array<Connector>;
|
|
281
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
282
|
+
};
|
|
283
|
+
export type QueryGetConnectorArgs = {
|
|
284
|
+
id: Scalars['ID']['input'];
|
|
285
|
+
};
|
|
286
|
+
export type RemoveConnectorInput = {
|
|
287
|
+
id: Scalars['ID']['input'];
|
|
288
|
+
};
|
|
289
|
+
export type SearchResultsFacet = {
|
|
290
|
+
name: Scalars['String']['output'];
|
|
291
|
+
stats?: Maybe<SearchResultsFacetStats>;
|
|
292
|
+
values?: Maybe<Array<SearchResultsFacetValue>>;
|
|
293
|
+
};
|
|
294
|
+
export type SearchResultsFacetStats = {
|
|
295
|
+
max?: Maybe<Scalars['Float']['output']>;
|
|
296
|
+
min?: Maybe<Scalars['Float']['output']>;
|
|
297
|
+
};
|
|
298
|
+
export type SearchResultsFacetValue = {
|
|
299
|
+
count: Scalars['Float']['output'];
|
|
300
|
+
value: Scalars['String']['output'];
|
|
301
|
+
};
|
|
302
|
+
export type SearchResultsStats = {
|
|
303
|
+
found: Scalars['Float']['output'];
|
|
304
|
+
outOf: Scalars['Float']['output'];
|
|
305
|
+
page: Scalars['Float']['output'];
|
|
306
|
+
perPage: Scalars['Float']['output'];
|
|
307
|
+
searchTime: Scalars['Float']['output'];
|
|
308
|
+
totalPages: Scalars['Float']['output'];
|
|
309
|
+
};
|
|
310
|
+
export type StringMatcher = {
|
|
311
|
+
btw?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
312
|
+
ct?: Maybe<Scalars['String']['output']>;
|
|
313
|
+
cti?: Maybe<Scalars['String']['output']>;
|
|
314
|
+
eq?: Maybe<Scalars['String']['output']>;
|
|
315
|
+
eqi?: Maybe<Scalars['String']['output']>;
|
|
316
|
+
gt?: Maybe<Scalars['String']['output']>;
|
|
317
|
+
gte?: Maybe<Scalars['String']['output']>;
|
|
318
|
+
in?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
319
|
+
lt?: Maybe<Scalars['String']['output']>;
|
|
320
|
+
lte?: Maybe<Scalars['String']['output']>;
|
|
321
|
+
ne?: Maybe<Scalars['String']['output']>;
|
|
322
|
+
};
|
|
323
|
+
export type StringMatcherInput = {
|
|
324
|
+
btw?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
325
|
+
ct?: InputMaybe<Scalars['String']['input']>;
|
|
326
|
+
cti?: InputMaybe<Scalars['String']['input']>;
|
|
327
|
+
eq?: InputMaybe<Scalars['String']['input']>;
|
|
328
|
+
eqi?: InputMaybe<Scalars['String']['input']>;
|
|
329
|
+
gt?: InputMaybe<Scalars['String']['input']>;
|
|
330
|
+
gte?: InputMaybe<Scalars['String']['input']>;
|
|
331
|
+
in?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
332
|
+
lt?: InputMaybe<Scalars['String']['input']>;
|
|
333
|
+
lte?: InputMaybe<Scalars['String']['input']>;
|
|
334
|
+
ne?: InputMaybe<Scalars['String']['input']>;
|
|
335
|
+
};
|
|
336
|
+
export declare enum Typenames {
|
|
337
|
+
Any = "Any",
|
|
338
|
+
Connector = "Connector",
|
|
339
|
+
GraphqlConnections = "GraphqlConnections",
|
|
340
|
+
GraphqlSubscriptions = "GraphqlSubscriptions"
|
|
341
|
+
}
|
|
342
|
+
export type UpdateConnectorInput = {
|
|
343
|
+
credentialId?: InputMaybe<Scalars['ID']['input']>;
|
|
344
|
+
credentialsHeader?: InputMaybe<Scalars['String']['input']>;
|
|
345
|
+
headers?: InputMaybe<Array<ConnectorHeaderInput>>;
|
|
346
|
+
id: Scalars['ID']['input'];
|
|
347
|
+
method?: InputMaybe<ConnectorMethod>;
|
|
348
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
349
|
+
requestBodyTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
350
|
+
requiresLegacyTls?: InputMaybe<Scalars['Boolean']['input']>;
|
|
351
|
+
responseIsArray?: InputMaybe<Scalars['Boolean']['input']>;
|
|
352
|
+
responseIsFile?: InputMaybe<Scalars['Boolean']['input']>;
|
|
353
|
+
responseMappingTemplate?: InputMaybe<Scalars['String']['input']>;
|
|
354
|
+
responseVariableName?: InputMaybe<Scalars['String']['input']>;
|
|
355
|
+
secretHeaders?: InputMaybe<Array<ConnectorSecretHeaderInput>>;
|
|
356
|
+
status?: InputMaybe<AppInstanceStatus>;
|
|
357
|
+
stripArrayElementsWithUndefinedVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
358
|
+
stripUndefinedBodyVariables?: InputMaybe<Scalars['Boolean']['input']>;
|
|
359
|
+
tags?: InputMaybe<Array<Scalars['Tag']['input']>>;
|
|
360
|
+
timeoutMs?: InputMaybe<Scalars['Int']['input']>;
|
|
361
|
+
/** Variáveis substituíveis usam Handlebars: {{nomeDaVariavel}}, com chave dupla. */
|
|
362
|
+
url?: InputMaybe<Scalars['String']['input']>;
|
|
363
|
+
useFormUrlEncoded?: InputMaybe<Scalars['Boolean']['input']>;
|
|
364
|
+
};
|
|
365
|
+
export type ConnectorFragment = (Pick<Connector, 'id' | 'name' | 'drn' | 'method' | 'url' | 'requiresLegacyTls' | 'credentialId' | 'credentialsHeader' | 'requestBodyTemplate' | 'stripUndefinedBodyVariables' | 'stripArrayElementsWithUndefinedVariables' | 'useFormUrlEncoded' | 'responseVariableName' | 'responseMappingTemplate' | 'responseIsArray' | 'responseIsFile' | 'timeoutMs' | 'status' | 'failingReason' | 'failingSince' | 'tags' | 'createdAt' | 'updatedAt'> & {
|
|
366
|
+
headers: Array<Pick<ConnectorHeader, 'key' | 'value'>>;
|
|
367
|
+
secretHeaders: Array<Pick<ConnectorSecretHeader, 'key' | 'credentialId'>>;
|
|
368
|
+
});
|
|
369
|
+
export type GetConnectorQueryVariables = Exact<{
|
|
370
|
+
id: Scalars['ID']['input'];
|
|
371
|
+
}>;
|
|
372
|
+
export type GetConnectorQuery = {
|
|
373
|
+
getConnector?: Maybe<ConnectorFragment>;
|
|
374
|
+
};
|
|
375
|
+
export type ListConnectorsQueryVariables = Exact<{
|
|
376
|
+
[key: string]: never;
|
|
377
|
+
}>;
|
|
378
|
+
export type ListConnectorsQuery = {
|
|
379
|
+
listConnectors: Array<ConnectorFragment>;
|
|
380
|
+
};
|
|
381
|
+
export type CreateConnectorMutationVariables = Exact<{
|
|
382
|
+
input: CreateConnectorInput;
|
|
383
|
+
}>;
|
|
384
|
+
export type CreateConnectorMutation = {
|
|
385
|
+
createConnector: ConnectorFragment;
|
|
386
|
+
};
|
|
387
|
+
export type UpdateConnectorMutationVariables = Exact<{
|
|
388
|
+
input: UpdateConnectorInput;
|
|
389
|
+
}>;
|
|
390
|
+
export type UpdateConnectorMutation = {
|
|
391
|
+
updateConnector: ConnectorFragment;
|
|
392
|
+
};
|
|
393
|
+
export type RemoveConnectorMutationVariables = Exact<{
|
|
394
|
+
input: RemoveConnectorInput;
|
|
395
|
+
}>;
|
|
396
|
+
export type RemoveConnectorMutation = {
|
|
397
|
+
removeConnector?: Maybe<ConnectorFragment>;
|
|
398
|
+
};
|
|
399
|
+
export type ExecuteConnectorMutationVariables = Exact<{
|
|
400
|
+
input: ExecuteConnectorInput;
|
|
401
|
+
}>;
|
|
402
|
+
export type ExecuteConnectorMutation = {
|
|
403
|
+
executeConnector: Pick<ConnectorExecutionResult, 'status' | 'data'>;
|
|
404
|
+
};
|
|
405
|
+
export declare const ConnectorFragmentDoc = "\n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
406
|
+
export declare const GetConnectorDocument = "\n query getConnector($id: ID!) {\n getConnector(id: $id) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
407
|
+
export declare const ListConnectorsDocument = "\n query listConnectors {\n listConnectors {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
408
|
+
export declare const CreateConnectorDocument = "\n mutation createConnector($input: CreateConnectorInput!) {\n createConnector(input: $input) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
409
|
+
export declare const UpdateConnectorDocument = "\n mutation updateConnector($input: UpdateConnectorInput!) {\n updateConnector(input: $input) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
410
|
+
export declare const RemoveConnectorDocument = "\n mutation removeConnector($input: RemoveConnectorInput!) {\n removeConnector(input: $input) {\n ...connector\n }\n}\n \n fragment connector on Connector {\n id\n name\n drn\n method\n url\n requiresLegacyTls\n headers {\n key\n value\n }\n secretHeaders {\n key\n credentialId\n }\n credentialId\n credentialsHeader\n requestBodyTemplate\n stripUndefinedBodyVariables\n stripArrayElementsWithUndefinedVariables\n useFormUrlEncoded\n responseVariableName\n responseMappingTemplate\n responseIsArray\n responseIsFile\n timeoutMs\n status\n failingReason\n failingSince\n tags\n createdAt\n updatedAt\n}\n ";
|
|
411
|
+
export declare const ExecuteConnectorDocument = "\n mutation executeConnector($input: ExecuteConnectorInput!) {\n executeConnector(input: $input) {\n status\n data\n }\n}\n ";
|
|
412
|
+
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
413
|
+
export declare function getSdk<C>(requester: Requester<C>): {
|
|
414
|
+
getConnector(variables: GetConnectorQueryVariables, options?: C): Promise<GetConnectorQuery>;
|
|
415
|
+
listConnectors(variables?: ListConnectorsQueryVariables, options?: C): Promise<ListConnectorsQuery>;
|
|
416
|
+
createConnector(variables: CreateConnectorMutationVariables, options?: C): Promise<CreateConnectorMutation>;
|
|
417
|
+
updateConnector(variables: UpdateConnectorMutationVariables, options?: C): Promise<UpdateConnectorMutation>;
|
|
418
|
+
removeConnector(variables: RemoveConnectorMutationVariables, options?: C): Promise<RemoveConnectorMutation>;
|
|
419
|
+
executeConnector(variables: ExecuteConnectorMutationVariables, options?: C): Promise<ExecuteConnectorMutation>;
|
|
420
|
+
};
|
|
421
|
+
export type Sdk = ReturnType<typeof getSdk>;
|
|
422
|
+
export declare const serviceName = "@droz/apiconnectors";
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.serviceName = exports.ExecuteConnectorDocument = exports.RemoveConnectorDocument = exports.UpdateConnectorDocument = exports.CreateConnectorDocument = exports.ListConnectorsDocument = exports.GetConnectorDocument = exports.ConnectorFragmentDoc = exports.Typenames = exports.ConnectorMethod = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
|
+
exports.getSdk = getSdk;
|
|
6
|
+
var AppInstanceStatus;
|
|
7
|
+
(function (AppInstanceStatus) {
|
|
8
|
+
AppInstanceStatus["Active"] = "Active";
|
|
9
|
+
AppInstanceStatus["Failing"] = "Failing";
|
|
10
|
+
AppInstanceStatus["Inactive"] = "Inactive";
|
|
11
|
+
})(AppInstanceStatus || (exports.AppInstanceStatus = AppInstanceStatus = {}));
|
|
12
|
+
var Can;
|
|
13
|
+
(function (Can) {
|
|
14
|
+
Can["Manage"] = "manage";
|
|
15
|
+
Can["Read"] = "read";
|
|
16
|
+
Can["Remove"] = "remove";
|
|
17
|
+
Can["Write"] = "write";
|
|
18
|
+
})(Can || (exports.Can = Can = {}));
|
|
19
|
+
var ConnectorMethod;
|
|
20
|
+
(function (ConnectorMethod) {
|
|
21
|
+
ConnectorMethod["Delete"] = "DELETE";
|
|
22
|
+
ConnectorMethod["Get"] = "GET";
|
|
23
|
+
ConnectorMethod["Patch"] = "PATCH";
|
|
24
|
+
ConnectorMethod["Post"] = "POST";
|
|
25
|
+
ConnectorMethod["Put"] = "PUT";
|
|
26
|
+
})(ConnectorMethod || (exports.ConnectorMethod = ConnectorMethod = {}));
|
|
27
|
+
var Typenames;
|
|
28
|
+
(function (Typenames) {
|
|
29
|
+
Typenames["Any"] = "Any";
|
|
30
|
+
Typenames["Connector"] = "Connector";
|
|
31
|
+
Typenames["GraphqlConnections"] = "GraphqlConnections";
|
|
32
|
+
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
33
|
+
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
34
|
+
exports.ConnectorFragmentDoc = `
|
|
35
|
+
fragment connector on Connector {
|
|
36
|
+
id
|
|
37
|
+
name
|
|
38
|
+
drn
|
|
39
|
+
method
|
|
40
|
+
url
|
|
41
|
+
requiresLegacyTls
|
|
42
|
+
headers {
|
|
43
|
+
key
|
|
44
|
+
value
|
|
45
|
+
}
|
|
46
|
+
secretHeaders {
|
|
47
|
+
key
|
|
48
|
+
credentialId
|
|
49
|
+
}
|
|
50
|
+
credentialId
|
|
51
|
+
credentialsHeader
|
|
52
|
+
requestBodyTemplate
|
|
53
|
+
stripUndefinedBodyVariables
|
|
54
|
+
stripArrayElementsWithUndefinedVariables
|
|
55
|
+
useFormUrlEncoded
|
|
56
|
+
responseVariableName
|
|
57
|
+
responseMappingTemplate
|
|
58
|
+
responseIsArray
|
|
59
|
+
responseIsFile
|
|
60
|
+
timeoutMs
|
|
61
|
+
status
|
|
62
|
+
failingReason
|
|
63
|
+
failingSince
|
|
64
|
+
tags
|
|
65
|
+
createdAt
|
|
66
|
+
updatedAt
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
exports.GetConnectorDocument = `
|
|
70
|
+
query getConnector($id: ID!) {
|
|
71
|
+
getConnector(id: $id) {
|
|
72
|
+
...connector
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
${exports.ConnectorFragmentDoc}`;
|
|
76
|
+
exports.ListConnectorsDocument = `
|
|
77
|
+
query listConnectors {
|
|
78
|
+
listConnectors {
|
|
79
|
+
...connector
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
${exports.ConnectorFragmentDoc}`;
|
|
83
|
+
exports.CreateConnectorDocument = `
|
|
84
|
+
mutation createConnector($input: CreateConnectorInput!) {
|
|
85
|
+
createConnector(input: $input) {
|
|
86
|
+
...connector
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
${exports.ConnectorFragmentDoc}`;
|
|
90
|
+
exports.UpdateConnectorDocument = `
|
|
91
|
+
mutation updateConnector($input: UpdateConnectorInput!) {
|
|
92
|
+
updateConnector(input: $input) {
|
|
93
|
+
...connector
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
${exports.ConnectorFragmentDoc}`;
|
|
97
|
+
exports.RemoveConnectorDocument = `
|
|
98
|
+
mutation removeConnector($input: RemoveConnectorInput!) {
|
|
99
|
+
removeConnector(input: $input) {
|
|
100
|
+
...connector
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
${exports.ConnectorFragmentDoc}`;
|
|
104
|
+
exports.ExecuteConnectorDocument = `
|
|
105
|
+
mutation executeConnector($input: ExecuteConnectorInput!) {
|
|
106
|
+
executeConnector(input: $input) {
|
|
107
|
+
status
|
|
108
|
+
data
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
function getSdk(requester) {
|
|
113
|
+
return {
|
|
114
|
+
getConnector(variables, options) {
|
|
115
|
+
return requester(exports.GetConnectorDocument, variables, options);
|
|
116
|
+
},
|
|
117
|
+
listConnectors(variables, options) {
|
|
118
|
+
return requester(exports.ListConnectorsDocument, variables, options);
|
|
119
|
+
},
|
|
120
|
+
createConnector(variables, options) {
|
|
121
|
+
return requester(exports.CreateConnectorDocument, variables, options);
|
|
122
|
+
},
|
|
123
|
+
updateConnector(variables, options) {
|
|
124
|
+
return requester(exports.UpdateConnectorDocument, variables, options);
|
|
125
|
+
},
|
|
126
|
+
removeConnector(variables, options) {
|
|
127
|
+
return requester(exports.RemoveConnectorDocument, variables, options);
|
|
128
|
+
},
|
|
129
|
+
executeConnector(variables, options) {
|
|
130
|
+
return requester(exports.ExecuteConnectorDocument, variables, options);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
exports.serviceName = '@droz/apiconnectors';
|
package/src/sdks/drozchat.d.ts
CHANGED
|
@@ -1818,7 +1818,9 @@ export type LiveSummaryQueryVariables = Exact<{
|
|
|
1818
1818
|
export type LiveSummaryQuery = {
|
|
1819
1819
|
liveSummary: LiveSummaryFragment;
|
|
1820
1820
|
};
|
|
1821
|
-
export type SurveyFragment = Pick<Survey, 'channels' | 'evaluationMessage' | 'commentMessage' | 'enabled' | 'type' | 'createdAt' | 'updatedAt'
|
|
1821
|
+
export type SurveyFragment = (Pick<Survey, 'channels' | 'evaluationMessage' | 'commentMessage' | 'enabled' | 'type' | 'createdAt' | 'updatedAt'> & {
|
|
1822
|
+
channelSettings: Array<Pick<ChannelSetting, 'channel' | 'enabled' | 'ttlMinutes' | 'evaluationMessage' | 'commentMessage'>>;
|
|
1823
|
+
});
|
|
1822
1824
|
export type GetSurveyQueryVariables = Exact<{
|
|
1823
1825
|
[key: string]: never;
|
|
1824
1826
|
}>;
|
|
@@ -2340,7 +2342,7 @@ export declare const DrozChatChannelFragmentDoc = "\n fragment drozChatChanne
|
|
|
2340
2342
|
export declare const LiveQueueSummaryFragmentDoc = "\n fragment liveQueueSummary on LiveQueueSummary {\n channelId\n channel {\n ...drozChatChannel\n }\n waiting\n oldestWaitingSince\n oldestWaitingMs\n unassigned\n avgWaitingMs\n closedToday\n onlineAgents\n}\n ";
|
|
2341
2343
|
export declare const LiveAgentLoadFragmentDoc = "\n fragment liveAgentLoad on LiveAgentLoad {\n agentId\n agent {\n ...drozChatAgent\n }\n status\n statusSince\n presence\n presenceSince\n inProgress\n capacity\n closedToday\n satisfaction {\n type\n average\n count\n }\n firstResponseAvgMs\n attendanceAvgMs\n queues {\n id\n name\n capacity\n }\n}\n ";
|
|
2342
2344
|
export declare const LiveSummaryFragmentDoc = "\n fragment liveSummary on LiveSummary {\n generatedAt\n queues {\n ...liveQueueSummary\n }\n agents {\n ...liveAgentLoad\n }\n surveyType\n surveyConfigured\n agentsOnline\n agentsAway\n agentsOffline\n ticketsInProgressTotal\n overallSatisfaction {\n type\n average\n count\n }\n queuesCount\n ticketsWaitingTotal\n unassignedTotal\n avgWaitingMs\n closedTodayTotal\n}\n ";
|
|
2343
|
-
export declare const SurveyFragmentDoc = "\n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n createdAt\n updatedAt\n}\n ";
|
|
2345
|
+
export declare const SurveyFragmentDoc = "\n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n channelSettings {\n channel\n enabled\n ttlMinutes\n evaluationMessage\n commentMessage\n }\n createdAt\n updatedAt\n}\n ";
|
|
2344
2346
|
export declare const TicketPresenceFragmentDoc = "\n fragment ticketPresence on TicketPresence {\n ticketId\n agents {\n agentId\n agentName\n }\n}\n ";
|
|
2345
2347
|
export declare const QuickAnswerFragmentDoc = "\n fragment quickAnswer on QuickAnswer {\n id\n name\n message\n createdBy {\n ...drozChatAgent\n }\n createdAt\n updatedAt\n}\n ";
|
|
2346
2348
|
export declare const QuickAnswerFacetsFragmentDoc = "\n fragment quickAnswerFacets on SearchResultsFacet {\n name\n values {\n value\n count\n }\n stats {\n min\n max\n }\n}\n ";
|
|
@@ -2397,9 +2399,9 @@ export declare const EnableDrozChatAgentGroupDocument = "\n mutation enableDr
|
|
|
2397
2399
|
export declare const AddDrozChatAgentGroupDocument = "\n mutation addDrozChatAgentGroup($input: AddDrozChatAgentGroupInput!) {\n addDrozChatAgentGroup(input: $input) {\n ...drozChatAgentGroup\n }\n}\n \n fragment drozChatAgentGroup on DrozChatAgentGroup {\n id\n name\n description\n agentIds\n drn\n createdAt\n updatedAt\n deletedAt\n}\n ";
|
|
2398
2400
|
export declare const RemoveDrozChatAgentGroupDocument = "\n mutation removeDrozChatAgentGroup($input: RemoveDrozChatAgentGroupInput!) {\n removeDrozChatAgentGroup(input: $input) {\n ...drozChatAgentGroup\n }\n}\n \n fragment drozChatAgentGroup on DrozChatAgentGroup {\n id\n name\n description\n agentIds\n drn\n createdAt\n updatedAt\n deletedAt\n}\n ";
|
|
2399
2401
|
export declare const LiveSummaryDocument = "\n query liveSummary {\n liveSummary {\n ...liveSummary\n }\n}\n \n fragment liveSummary on LiveSummary {\n generatedAt\n queues {\n ...liveQueueSummary\n }\n agents {\n ...liveAgentLoad\n }\n surveyType\n surveyConfigured\n agentsOnline\n agentsAway\n agentsOffline\n ticketsInProgressTotal\n overallSatisfaction {\n type\n average\n count\n }\n queuesCount\n ticketsWaitingTotal\n unassignedTotal\n avgWaitingMs\n closedTodayTotal\n}\n \n\n fragment liveQueueSummary on LiveQueueSummary {\n channelId\n channel {\n ...drozChatChannel\n }\n waiting\n oldestWaitingSince\n oldestWaitingMs\n unassigned\n avgWaitingMs\n closedToday\n onlineAgents\n}\n \n\n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n groupIds\n ticketAutoAssigner\n ticketAutoAssignerType\n maxSimultaneousAttendances\n createdAt\n updatedAt\n deletedAt\n}\n \n\n fragment liveAgentLoad on LiveAgentLoad {\n agentId\n agent {\n ...drozChatAgent\n }\n status\n statusSince\n presence\n presenceSince\n inProgress\n capacity\n closedToday\n satisfaction {\n type\n average\n count\n }\n firstResponseAvgMs\n attendanceAvgMs\n queues {\n id\n name\n capacity\n }\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n ";
|
|
2400
|
-
export declare const GetSurveyDocument = "\n query getSurvey {\n getSurvey {\n ...survey\n }\n}\n \n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n createdAt\n updatedAt\n}\n ";
|
|
2401
|
-
export declare const UpsertSurveyDocument = "\n mutation upsertSurvey($input: UpsertSurveyInput!) {\n upsertSurvey(input: $input) {\n ...survey\n }\n}\n \n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n createdAt\n updatedAt\n}\n ";
|
|
2402
|
-
export declare const DisableSurveyDocument = "\n mutation disableSurvey {\n disableSurvey {\n ...survey\n }\n}\n \n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n createdAt\n updatedAt\n}\n ";
|
|
2402
|
+
export declare const GetSurveyDocument = "\n query getSurvey {\n getSurvey {\n ...survey\n }\n}\n \n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n channelSettings {\n channel\n enabled\n ttlMinutes\n evaluationMessage\n commentMessage\n }\n createdAt\n updatedAt\n}\n ";
|
|
2403
|
+
export declare const UpsertSurveyDocument = "\n mutation upsertSurvey($input: UpsertSurveyInput!) {\n upsertSurvey(input: $input) {\n ...survey\n }\n}\n \n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n channelSettings {\n channel\n enabled\n ttlMinutes\n evaluationMessage\n commentMessage\n }\n createdAt\n updatedAt\n}\n ";
|
|
2404
|
+
export declare const DisableSurveyDocument = "\n mutation disableSurvey {\n disableSurvey {\n ...survey\n }\n}\n \n fragment survey on Survey {\n channels\n evaluationMessage\n commentMessage\n enabled\n type\n channelSettings {\n channel\n enabled\n ttlMinutes\n evaluationMessage\n commentMessage\n }\n createdAt\n updatedAt\n}\n ";
|
|
2403
2405
|
export declare const TicketPresenceDocument = "\n query ticketPresence($ticketId: ID!) {\n ticketPresence(ticketId: $ticketId) {\n ...ticketPresence\n }\n}\n \n fragment ticketPresence on TicketPresence {\n ticketId\n agents {\n agentId\n agentName\n }\n}\n ";
|
|
2404
2406
|
export declare const EnterTicketPresenceDocument = "\n mutation enterTicketPresence($input: TicketPresenceInput!) {\n enterTicketPresence(input: $input) {\n ...ticketPresence\n }\n}\n \n fragment ticketPresence on TicketPresence {\n ticketId\n agents {\n agentId\n agentName\n }\n}\n ";
|
|
2405
2407
|
export declare const LeaveTicketPresenceDocument = "\n mutation leaveTicketPresence($input: TicketPresenceInput!) {\n leaveTicketPresence(input: $input) {\n ...ticketPresence\n }\n}\n \n fragment ticketPresence on TicketPresence {\n ticketId\n agents {\n agentId\n agentName\n }\n}\n ";
|
package/src/sdks/drozchat.js
CHANGED