@droz-js/sdk 0.12.2 → 0.12.3
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/drozbot.d.ts +3 -15
- package/src/sdks/drozbot.d.ts +51 -169
- package/src/sdks/drozbot.js +29 -136
package/package.json
CHANGED
package/src/drozbot.d.ts
CHANGED
|
@@ -6,24 +6,12 @@ declare const DrozBot_base: new (options?: import("./client/http").HttpClientOpt
|
|
|
6
6
|
withCustomHeaders(headers: () => Record<string, string>): /*elided*/ any;
|
|
7
7
|
withHttpRequestExecutor(httpRequestExecutor: import("./client/http").HttpRequestExecutor): /*elided*/ any;
|
|
8
8
|
} & {
|
|
9
|
-
listDrozbotAiActions(variables?: import("./sdks/drozbot").Exact<{
|
|
10
|
-
[key: string]: never;
|
|
11
|
-
}>, options?: unknown): Promise<import("./sdks/drozbot").ListDrozbotAiActionsQuery>;
|
|
12
|
-
getDrozbotAiAction(variables: import("./sdks/drozbot").Exact<{
|
|
13
|
-
id: import("./sdks/drozbot").Scalars["ID"]["input"];
|
|
14
|
-
}>, options?: unknown): Promise<import("./sdks/drozbot").GetDrozbotAiActionQuery>;
|
|
15
|
-
createDrozbotAiAction(variables: import("./sdks/drozbot").Exact<{
|
|
16
|
-
input: import("./sdks/drozbot").CreateAiActionInput;
|
|
17
|
-
}>, options?: unknown): Promise<import("./sdks/drozbot").CreateDrozbotAiActionMutation>;
|
|
18
|
-
updateDrozbotAiAction(variables: import("./sdks/drozbot").Exact<{
|
|
19
|
-
input: import("./sdks/drozbot").UpdateAiActionInput;
|
|
20
|
-
}>, options?: unknown): Promise<import("./sdks/drozbot").UpdateDrozbotAiActionMutation>;
|
|
21
|
-
removeDrozbotAiAction(variables: import("./sdks/drozbot").Exact<{
|
|
22
|
-
input: import("./sdks/drozbot").RemoveAiActionInput;
|
|
23
|
-
}>, options?: unknown): Promise<import("./sdks/drozbot").RemoveDrozbotAiActionMutation>;
|
|
24
9
|
runDrozbotAiAction(variables: import("./sdks/drozbot").Exact<{
|
|
25
10
|
input: import("./sdks/drozbot").RunAiActionInput;
|
|
26
11
|
}>, options?: unknown): Promise<import("./sdks/drozbot").RunDrozbotAiActionMutation>;
|
|
12
|
+
runDrozbotAiActionHumanizedAnswer(variables: import("./sdks/drozbot").Exact<{
|
|
13
|
+
input: import("./sdks/drozbot").RunAiActionHumanizedAnswerInput;
|
|
14
|
+
}>, options?: unknown): Promise<import("./sdks/drozbot").RunDrozbotAiActionHumanizedAnswerMutation>;
|
|
27
15
|
requestDrozBotAssess(variables: import("./sdks/drozbot").Exact<{
|
|
28
16
|
input: import("./sdks/drozbot").RequestDrozBotAssessInput;
|
|
29
17
|
}>, options?: unknown): Promise<import("./sdks/drozbot").RequestDrozBotAssessMutation>;
|
package/src/sdks/drozbot.d.ts
CHANGED
|
@@ -133,66 +133,21 @@ export type AgentInfo = {
|
|
|
133
133
|
name: Scalars['String']['output'];
|
|
134
134
|
picture?: Maybe<Scalars['String']['output']>;
|
|
135
135
|
};
|
|
136
|
-
export type AiAction = {
|
|
137
|
-
basePrompt?: Maybe<Scalars['String']['output']>;
|
|
138
|
-
botId: Scalars['ID']['output'];
|
|
139
|
-
connectorId: Scalars['String']['output'];
|
|
140
|
-
createdAt: Scalars['DateTime']['output'];
|
|
141
|
-
customPrompt?: Maybe<Scalars['String']['output']>;
|
|
142
|
-
description?: Maybe<Scalars['String']['output']>;
|
|
143
|
-
humanizedAnswer: Scalars['Boolean']['output'];
|
|
144
|
-
id: Scalars['ID']['output'];
|
|
145
|
-
name: Scalars['String']['output'];
|
|
146
|
-
requiredVariables: Array<AiActionVariable>;
|
|
147
|
-
updatedAt: Scalars['DateTime']['output'];
|
|
148
|
-
};
|
|
149
|
-
export type AiActionAskMissingVariables = {
|
|
150
|
-
action: Scalars['String']['output'];
|
|
151
|
-
message_to_user: Scalars['String']['output'];
|
|
152
|
-
variables: AiActionVariablesBlock;
|
|
153
|
-
};
|
|
154
|
-
export type AiActionConnectorError = {
|
|
155
|
-
action: Scalars['String']['output'];
|
|
156
|
-
error: Scalars['JSON']['output'];
|
|
157
|
-
};
|
|
158
|
-
export type AiActionContextChanged = {
|
|
159
|
-
action: Scalars['String']['output'];
|
|
160
|
-
context: Scalars['String']['output'];
|
|
161
|
-
};
|
|
162
|
-
export type AiActionExecuteConnector = {
|
|
163
|
-
action: Scalars['String']['output'];
|
|
164
|
-
variables: AiActionVariablesBlock;
|
|
165
|
-
};
|
|
166
|
-
export type AiActionReturnFinalAnswer = {
|
|
167
|
-
action: Scalars['String']['output'];
|
|
168
|
-
response: Scalars['JSON']['output'];
|
|
169
|
-
};
|
|
170
136
|
export type AiActionVariable = {
|
|
171
137
|
description: Scalars['String']['output'];
|
|
172
138
|
key: Scalars['String']['output'];
|
|
173
139
|
};
|
|
174
|
-
export type AiActionVariableFilled = {
|
|
175
|
-
description: Scalars['String']['output'];
|
|
176
|
-
key: Scalars['String']['output'];
|
|
177
|
-
value: Scalars['String']['output'];
|
|
178
|
-
};
|
|
179
|
-
export type AiActionVariableFound = {
|
|
180
|
-
description: Scalars['String']['output'];
|
|
181
|
-
key: Scalars['String']['output'];
|
|
182
|
-
value: Scalars['String']['output'];
|
|
183
|
-
};
|
|
184
140
|
export type AiActionVariableInput = {
|
|
185
141
|
description: Scalars['String']['input'];
|
|
186
142
|
key: Scalars['String']['input'];
|
|
187
143
|
};
|
|
188
|
-
export type
|
|
189
|
-
description: Scalars['String']['output'];
|
|
144
|
+
export type AiActionVariableValue = {
|
|
190
145
|
key: Scalars['String']['output'];
|
|
146
|
+
value: Scalars['String']['output'];
|
|
191
147
|
};
|
|
192
|
-
export type
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
missing: Array<AiActionVariableMissing>;
|
|
148
|
+
export type AiActionVariableValueInput = {
|
|
149
|
+
key: Scalars['String']['input'];
|
|
150
|
+
value: Scalars['String']['input'];
|
|
196
151
|
};
|
|
197
152
|
export declare enum AppInstanceStatus {
|
|
198
153
|
Active = "Active",
|
|
@@ -205,16 +160,6 @@ export declare enum Can {
|
|
|
205
160
|
Remove = "remove",
|
|
206
161
|
Write = "write"
|
|
207
162
|
}
|
|
208
|
-
export type CreateAiActionInput = {
|
|
209
|
-
basePrompt?: InputMaybe<Scalars['String']['input']>;
|
|
210
|
-
botId?: InputMaybe<Scalars['ID']['input']>;
|
|
211
|
-
connectorId: Scalars['String']['input'];
|
|
212
|
-
customPrompt?: InputMaybe<Scalars['String']['input']>;
|
|
213
|
-
description?: InputMaybe<Scalars['String']['input']>;
|
|
214
|
-
humanizedAnswer: Scalars['Boolean']['input'];
|
|
215
|
-
name: Scalars['String']['input'];
|
|
216
|
-
requiredVariables: Array<AiActionVariableInput>;
|
|
217
|
-
};
|
|
218
163
|
export type CreateDrozBotInstanceInput = {
|
|
219
164
|
credentialId: Scalars['ID']['input'];
|
|
220
165
|
integrationType: DrozBotIntegrationType;
|
|
@@ -334,6 +279,24 @@ export type DrozBotWhatsAppTemplateUser = {
|
|
|
334
279
|
phone: Scalars['String']['input'];
|
|
335
280
|
vars: Array<Scalars['String']['input']>;
|
|
336
281
|
};
|
|
282
|
+
export declare enum DrozbotAiAction {
|
|
283
|
+
AiActionAskMissingVariables = "AiActionAskMissingVariables",
|
|
284
|
+
AiActionContextChanged = "AiActionContextChanged",
|
|
285
|
+
AiActionExecuteConnector = "AiActionExecuteConnector",
|
|
286
|
+
AiActionReturnFinalAnswer = "AiActionReturnFinalAnswer",
|
|
287
|
+
AiActionSetVariables = "AiActionSetVariables"
|
|
288
|
+
}
|
|
289
|
+
export type DrozbotAiActionResult = {
|
|
290
|
+
actions: Array<DrozbotAiAction>;
|
|
291
|
+
context?: Maybe<Scalars['String']['output']>;
|
|
292
|
+
message_to_user?: Maybe<Scalars['String']['output']>;
|
|
293
|
+
missingVariables: Array<Scalars['String']['output']>;
|
|
294
|
+
setVariables: Array<AiActionVariableValue>;
|
|
295
|
+
};
|
|
296
|
+
export type DrozbotAiHumanizedAnswerResult = {
|
|
297
|
+
actions: Array<DrozbotAiAction>;
|
|
298
|
+
message_to_user: Scalars['String']['output'];
|
|
299
|
+
};
|
|
337
300
|
export type I18nText = {
|
|
338
301
|
lang: Scalars['Locale']['output'];
|
|
339
302
|
value: Scalars['String']['output'];
|
|
@@ -366,15 +329,13 @@ export type Mutation = {
|
|
|
366
329
|
createDrozBotTicket: DrozBotTicket;
|
|
367
330
|
createDrozBotTicketComment: DrozBotTicketComment;
|
|
368
331
|
createDrozBotTicketComments: Array<DrozBotTicketComment>;
|
|
369
|
-
createDrozbotAiAction?: Maybe<AiAction>;
|
|
370
332
|
predictIntent?: Maybe<Intent>;
|
|
371
333
|
registerRootCredential?: Maybe<Scalars['Void']['output']>;
|
|
372
334
|
removeDrozBotInstance: DrozBotInstance;
|
|
373
|
-
removeDrozbotAiAction?: Maybe<AiAction>;
|
|
374
335
|
requestDrozBotAssess: Scalars['Boolean']['output'];
|
|
375
|
-
runDrozbotAiAction:
|
|
336
|
+
runDrozbotAiAction: DrozbotAiActionResult;
|
|
337
|
+
runDrozbotAiActionHumanizedAnswer: DrozbotAiHumanizedAnswerResult;
|
|
376
338
|
updateDrozBotInstance: DrozBotInstance;
|
|
377
|
-
updateDrozbotAiAction?: Maybe<AiAction>;
|
|
378
339
|
upsertIntentDictionary?: Maybe<IntentDictionary>;
|
|
379
340
|
version?: Maybe<Scalars['String']['output']>;
|
|
380
341
|
};
|
|
@@ -393,9 +354,6 @@ export type MutationCreateDrozBotTicketCommentArgs = {
|
|
|
393
354
|
export type MutationCreateDrozBotTicketCommentsArgs = {
|
|
394
355
|
input: CreateDrozBotTicketCommentsInput;
|
|
395
356
|
};
|
|
396
|
-
export type MutationCreateDrozbotAiActionArgs = {
|
|
397
|
-
input: CreateAiActionInput;
|
|
398
|
-
};
|
|
399
357
|
export type MutationPredictIntentArgs = {
|
|
400
358
|
input: PredictIntentInput;
|
|
401
359
|
};
|
|
@@ -405,21 +363,18 @@ export type MutationRegisterRootCredentialArgs = {
|
|
|
405
363
|
export type MutationRemoveDrozBotInstanceArgs = {
|
|
406
364
|
input: RemoveDrozBotInstanceInput;
|
|
407
365
|
};
|
|
408
|
-
export type MutationRemoveDrozbotAiActionArgs = {
|
|
409
|
-
input: RemoveAiActionInput;
|
|
410
|
-
};
|
|
411
366
|
export type MutationRequestDrozBotAssessArgs = {
|
|
412
367
|
input?: InputMaybe<RequestDrozBotAssessInput>;
|
|
413
368
|
};
|
|
414
369
|
export type MutationRunDrozbotAiActionArgs = {
|
|
415
370
|
input: RunAiActionInput;
|
|
416
371
|
};
|
|
372
|
+
export type MutationRunDrozbotAiActionHumanizedAnswerArgs = {
|
|
373
|
+
input: RunAiActionHumanizedAnswerInput;
|
|
374
|
+
};
|
|
417
375
|
export type MutationUpdateDrozBotInstanceArgs = {
|
|
418
376
|
input: UpdateDrozBotInstanceInput;
|
|
419
377
|
};
|
|
420
|
-
export type MutationUpdateDrozbotAiActionArgs = {
|
|
421
|
-
input: UpdateAiActionInput;
|
|
422
|
-
};
|
|
423
378
|
export type MutationUpsertIntentDictionaryArgs = {
|
|
424
379
|
input: UpsertIntentDictionaryInput;
|
|
425
380
|
};
|
|
@@ -454,12 +409,10 @@ export type Query = {
|
|
|
454
409
|
app?: Maybe<Scalars['DRN']['output']>;
|
|
455
410
|
getCustomerByPhone?: Maybe<DrozBotCustomer>;
|
|
456
411
|
getDrozBotInstance?: Maybe<DrozBotInstance>;
|
|
457
|
-
getDrozbotAiAction?: Maybe<AiAction>;
|
|
458
412
|
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
459
413
|
getIntentDictionary?: Maybe<IntentDictionary>;
|
|
460
414
|
getWhatsAppBotDetails?: Maybe<DrozBotWhatsAppBot>;
|
|
461
415
|
listDrozBotInstances: Array<Maybe<DrozBotInstance>>;
|
|
462
|
-
listDrozbotAiActions: Array<AiAction>;
|
|
463
416
|
listIntentDictionary: Array<IntentDictionary>;
|
|
464
417
|
listWhatsAppBotTemplates: Array<DrozBotWhatsAppTemplate>;
|
|
465
418
|
listWhatsAppBots: Array<DrozBotWhatsAppBot>;
|
|
@@ -471,9 +424,6 @@ export type QueryGetCustomerByPhoneArgs = {
|
|
|
471
424
|
export type QueryGetDrozBotInstanceArgs = {
|
|
472
425
|
id: Scalars['ID']['input'];
|
|
473
426
|
};
|
|
474
|
-
export type QueryGetDrozbotAiActionArgs = {
|
|
475
|
-
id: Scalars['ID']['input'];
|
|
476
|
-
};
|
|
477
427
|
export type QueryGetIntentDictionaryArgs = {
|
|
478
428
|
id: Scalars['ID']['input'];
|
|
479
429
|
};
|
|
@@ -483,9 +433,6 @@ export type QueryGetWhatsAppBotDetailsArgs = {
|
|
|
483
433
|
export type QueryListWhatsAppBotTemplatesArgs = {
|
|
484
434
|
id: Scalars['ID']['input'];
|
|
485
435
|
};
|
|
486
|
-
export type RemoveAiActionInput = {
|
|
487
|
-
id: Scalars['ID']['input'];
|
|
488
|
-
};
|
|
489
436
|
export type RemoveDrozBotInstanceInput = {
|
|
490
437
|
id: Scalars['ID']['input'];
|
|
491
438
|
};
|
|
@@ -495,12 +442,18 @@ export type RequestDrozBotAssessInput = {
|
|
|
495
442
|
ratingMessage: Scalars['String']['input'];
|
|
496
443
|
sessionId: Scalars['ID']['input'];
|
|
497
444
|
};
|
|
445
|
+
export type RunAiActionHumanizedAnswerInput = {
|
|
446
|
+
actionPrompt: Scalars['String']['input'];
|
|
447
|
+
aiResponsePrompt: Scalars['String']['input'];
|
|
448
|
+
aiResponseVariables: Array<AiActionVariableInput>;
|
|
449
|
+
connectorResponse: Scalars['JSON']['input'];
|
|
450
|
+
userMessage: Scalars['String']['input'];
|
|
451
|
+
};
|
|
498
452
|
export type RunAiActionInput = {
|
|
499
|
-
|
|
500
|
-
|
|
453
|
+
actionPrompt: Scalars['String']['input'];
|
|
454
|
+
missingVariables: Array<AiActionVariableInput>;
|
|
501
455
|
userMessage: Scalars['String']['input'];
|
|
502
456
|
};
|
|
503
|
-
export type RunAiActionResult = AiActionAskMissingVariables | AiActionConnectorError | AiActionContextChanged | AiActionExecuteConnector | AiActionReturnFinalAnswer;
|
|
504
457
|
export type SearchResultsFacet = {
|
|
505
458
|
name: Scalars['String']['output'];
|
|
506
459
|
stats?: Maybe<SearchResultsFacetStats>;
|
|
@@ -559,17 +512,6 @@ export declare enum Typenames {
|
|
|
559
512
|
GraphqlSubscriptions = "GraphqlSubscriptions",
|
|
560
513
|
IntentDictionary = "IntentDictionary"
|
|
561
514
|
}
|
|
562
|
-
export type UpdateAiActionInput = {
|
|
563
|
-
basePrompt?: InputMaybe<Scalars['String']['input']>;
|
|
564
|
-
botId?: InputMaybe<Scalars['ID']['input']>;
|
|
565
|
-
connectorId?: InputMaybe<Scalars['String']['input']>;
|
|
566
|
-
customPrompt?: InputMaybe<Scalars['String']['input']>;
|
|
567
|
-
description?: InputMaybe<Scalars['String']['input']>;
|
|
568
|
-
humanizedAnswer?: InputMaybe<Scalars['Boolean']['input']>;
|
|
569
|
-
id: Scalars['ID']['input'];
|
|
570
|
-
name?: InputMaybe<Scalars['String']['input']>;
|
|
571
|
-
requiredVariables?: InputMaybe<Array<AiActionVariableInput>>;
|
|
572
|
-
};
|
|
573
515
|
export type UpdateDrozBotInstanceInput = {
|
|
574
516
|
credentialId?: InputMaybe<Scalars['ID']['input']>;
|
|
575
517
|
id: Scalars['ID']['input'];
|
|
@@ -581,67 +523,20 @@ export type UpsertIntentDictionaryInput = {
|
|
|
581
523
|
entities: Array<IntentDictionaryEntityInput>;
|
|
582
524
|
id: Scalars['ID']['input'];
|
|
583
525
|
};
|
|
584
|
-
export type
|
|
585
|
-
export type AiActionFragment = (Pick<AiAction, 'id' | 'name' | 'description' | 'basePrompt' | 'customPrompt' | 'botId' | 'connectorId' | 'humanizedAnswer' | 'createdAt' | 'updatedAt'> & {
|
|
586
|
-
requiredVariables: Array<AiActionVariableFragment>;
|
|
587
|
-
});
|
|
588
|
-
export type AiActionVariableFoundFragment = Pick<AiActionVariableFound, 'key' | 'value' | 'description'>;
|
|
589
|
-
export type AiActionVariableMissingFragment = Pick<AiActionVariableMissing, 'key' | 'description'>;
|
|
590
|
-
export type AiActionVariableFilledFragment = Pick<AiActionVariableFilled, 'key' | 'value' | 'description'>;
|
|
591
|
-
export type AiActionVariablesBlockFragment = {
|
|
592
|
-
found: Array<AiActionVariableFoundFragment>;
|
|
593
|
-
missing: Array<AiActionVariableMissingFragment>;
|
|
594
|
-
filled: Array<AiActionVariableFilledFragment>;
|
|
595
|
-
};
|
|
596
|
-
export type ListDrozbotAiActionsQueryVariables = Exact<{
|
|
597
|
-
[key: string]: never;
|
|
598
|
-
}>;
|
|
599
|
-
export type ListDrozbotAiActionsQuery = {
|
|
600
|
-
listDrozbotAiActions: Array<AiActionFragment>;
|
|
601
|
-
};
|
|
602
|
-
export type GetDrozbotAiActionQueryVariables = Exact<{
|
|
603
|
-
id: Scalars['ID']['input'];
|
|
604
|
-
}>;
|
|
605
|
-
export type GetDrozbotAiActionQuery = {
|
|
606
|
-
getDrozbotAiAction?: Maybe<AiActionFragment>;
|
|
607
|
-
};
|
|
608
|
-
export type CreateDrozbotAiActionMutationVariables = Exact<{
|
|
609
|
-
input: CreateAiActionInput;
|
|
610
|
-
}>;
|
|
611
|
-
export type CreateDrozbotAiActionMutation = {
|
|
612
|
-
createDrozbotAiAction?: Maybe<AiActionFragment>;
|
|
613
|
-
};
|
|
614
|
-
export type UpdateDrozbotAiActionMutationVariables = Exact<{
|
|
615
|
-
input: UpdateAiActionInput;
|
|
616
|
-
}>;
|
|
617
|
-
export type UpdateDrozbotAiActionMutation = {
|
|
618
|
-
updateDrozbotAiAction?: Maybe<AiActionFragment>;
|
|
619
|
-
};
|
|
620
|
-
export type RemoveDrozbotAiActionMutationVariables = Exact<{
|
|
621
|
-
input: RemoveAiActionInput;
|
|
622
|
-
}>;
|
|
623
|
-
export type RemoveDrozbotAiActionMutation = {
|
|
624
|
-
removeDrozbotAiAction?: Maybe<Pick<AiAction, 'id'>>;
|
|
625
|
-
};
|
|
526
|
+
export type AiActionVariableValueFragment = Pick<AiActionVariableValue, 'key' | 'value'>;
|
|
626
527
|
export type RunDrozbotAiActionMutationVariables = Exact<{
|
|
627
528
|
input: RunAiActionInput;
|
|
628
529
|
}>;
|
|
629
530
|
export type RunDrozbotAiActionMutation = {
|
|
630
|
-
runDrozbotAiAction: ({
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
__typename: 'AiActionExecuteConnector';
|
|
640
|
-
} & Pick<AiActionExecuteConnector, 'action'> & {
|
|
641
|
-
variables: AiActionVariablesBlockFragment;
|
|
642
|
-
}) | ({
|
|
643
|
-
__typename: 'AiActionReturnFinalAnswer';
|
|
644
|
-
} & Pick<AiActionReturnFinalAnswer, 'action' | 'response'>);
|
|
531
|
+
runDrozbotAiAction: (Pick<DrozbotAiActionResult, 'actions' | 'missingVariables' | 'message_to_user' | 'context'> & {
|
|
532
|
+
setVariables: Array<AiActionVariableValueFragment>;
|
|
533
|
+
});
|
|
534
|
+
};
|
|
535
|
+
export type RunDrozbotAiActionHumanizedAnswerMutationVariables = Exact<{
|
|
536
|
+
input: RunAiActionHumanizedAnswerInput;
|
|
537
|
+
}>;
|
|
538
|
+
export type RunDrozbotAiActionHumanizedAnswerMutation = {
|
|
539
|
+
runDrozbotAiActionHumanizedAnswer: Pick<DrozbotAiHumanizedAnswerResult, 'actions' | 'message_to_user'>;
|
|
645
540
|
};
|
|
646
541
|
export type RequestDrozBotAssessMutationVariables = Exact<{
|
|
647
542
|
input: RequestDrozBotAssessInput;
|
|
@@ -760,12 +655,7 @@ export type ActiveTriggerMutationVariables = Exact<{
|
|
|
760
655
|
input: ActiveTriggerInput;
|
|
761
656
|
}>;
|
|
762
657
|
export type ActiveTriggerMutation = Pick<Mutation, 'activeTrigger'>;
|
|
763
|
-
export declare const
|
|
764
|
-
export declare const AiActionFragmentDoc = "\n fragment aiAction on AiAction {\n id\n name\n description\n basePrompt\n customPrompt\n botId\n connectorId\n requiredVariables {\n ...aiActionVariable\n }\n humanizedAnswer\n createdAt\n updatedAt\n}\n ";
|
|
765
|
-
export declare const AiActionVariableFoundFragmentDoc = "\n fragment aiActionVariableFound on AiActionVariableFound {\n key\n value\n description\n}\n ";
|
|
766
|
-
export declare const AiActionVariableMissingFragmentDoc = "\n fragment aiActionVariableMissing on AiActionVariableMissing {\n key\n description\n}\n ";
|
|
767
|
-
export declare const AiActionVariableFilledFragmentDoc = "\n fragment aiActionVariableFilled on AiActionVariableFilled {\n key\n value\n description\n}\n ";
|
|
768
|
-
export declare const AiActionVariablesBlockFragmentDoc = "\n fragment aiActionVariablesBlock on AiActionVariablesBlock {\n found {\n ...aiActionVariableFound\n }\n missing {\n ...aiActionVariableMissing\n }\n filled {\n ...aiActionVariableFilled\n }\n}\n ";
|
|
658
|
+
export declare const AiActionVariableValueFragmentDoc = "\n fragment aiActionVariableValue on AiActionVariableValue {\n key\n value\n}\n ";
|
|
769
659
|
export declare const DrozbotFragmentDoc = "\n fragment drozbot on DrozBotInstance {\n id\n name\n drn\n credentialId\n isTest\n integrationType\n createdAt\n updatedAt\n}\n ";
|
|
770
660
|
export declare const DrozBotTicketCommentFragmentDoc = "\n fragment drozBotTicketComment on DrozBotTicketComment {\n id\n ticketId\n}\n ";
|
|
771
661
|
export declare const DrozBotCustomerFragmentDoc = "\n fragment drozBotCustomer on DrozBotCustomer {\n id\n name\n phones\n}\n ";
|
|
@@ -773,12 +663,8 @@ export declare const IntentDictionaryFragmentDoc = "\n fragment intentDiction
|
|
|
773
663
|
export declare const IntentFragmentDoc = "\n fragment intent on Intent {\n label\n score\n}\n ";
|
|
774
664
|
export declare const DrozBotWhatsAppBotFragmentDoc = "\n fragment drozBotWhatsAppBot on DrozBotWhatsAppBot {\n id\n name\n enabled\n deleted\n channel\n providerChannel\n language\n phone\n}\n ";
|
|
775
665
|
export declare const DrozBotWhatsAppTemplateFragmentDoc = "\n fragment drozBotWhatsAppTemplate on DrozBotWhatsAppTemplate {\n id\n templateName\n content\n contentButton\n language\n deleted\n approved\n type\n}\n ";
|
|
776
|
-
export declare const
|
|
777
|
-
export declare const
|
|
778
|
-
export declare const CreateDrozbotAiActionDocument = "\n mutation createDrozbotAiAction($input: CreateAiActionInput!) {\n createDrozbotAiAction(input: $input) {\n ...aiAction\n }\n}\n \n fragment aiAction on AiAction {\n id\n name\n description\n basePrompt\n customPrompt\n botId\n connectorId\n requiredVariables {\n ...aiActionVariable\n }\n humanizedAnswer\n createdAt\n updatedAt\n}\n \n\n fragment aiActionVariable on AiActionVariable {\n key\n description\n}\n ";
|
|
779
|
-
export declare const UpdateDrozbotAiActionDocument = "\n mutation updateDrozbotAiAction($input: UpdateAiActionInput!) {\n updateDrozbotAiAction(input: $input) {\n ...aiAction\n }\n}\n \n fragment aiAction on AiAction {\n id\n name\n description\n basePrompt\n customPrompt\n botId\n connectorId\n requiredVariables {\n ...aiActionVariable\n }\n humanizedAnswer\n createdAt\n updatedAt\n}\n \n\n fragment aiActionVariable on AiActionVariable {\n key\n description\n}\n ";
|
|
780
|
-
export declare const RemoveDrozbotAiActionDocument = "\n mutation removeDrozbotAiAction($input: RemoveAiActionInput!) {\n removeDrozbotAiAction(input: $input) {\n id\n }\n}\n ";
|
|
781
|
-
export declare const RunDrozbotAiActionDocument = "\n mutation runDrozbotAiAction($input: RunAiActionInput!) {\n runDrozbotAiAction(input: $input) {\n __typename\n ... on AiActionAskMissingVariables {\n action\n message_to_user\n variables {\n ...aiActionVariablesBlock\n }\n }\n ... on AiActionExecuteConnector {\n action\n variables {\n ...aiActionVariablesBlock\n }\n }\n ... on AiActionReturnFinalAnswer {\n action\n response\n }\n ... on AiActionContextChanged {\n action\n context\n }\n ... on AiActionConnectorError {\n action\n error\n }\n }\n}\n \n fragment aiActionVariablesBlock on AiActionVariablesBlock {\n found {\n ...aiActionVariableFound\n }\n missing {\n ...aiActionVariableMissing\n }\n filled {\n ...aiActionVariableFilled\n }\n}\n \n\n fragment aiActionVariableFound on AiActionVariableFound {\n key\n value\n description\n}\n \n\n fragment aiActionVariableMissing on AiActionVariableMissing {\n key\n description\n}\n \n\n fragment aiActionVariableFilled on AiActionVariableFilled {\n key\n value\n description\n}\n ";
|
|
666
|
+
export declare const RunDrozbotAiActionDocument = "\n mutation runDrozbotAiAction($input: RunAiActionInput!) {\n runDrozbotAiAction(input: $input) {\n actions\n setVariables {\n ...aiActionVariableValue\n }\n missingVariables\n message_to_user\n context\n }\n}\n \n fragment aiActionVariableValue on AiActionVariableValue {\n key\n value\n}\n ";
|
|
667
|
+
export declare const RunDrozbotAiActionHumanizedAnswerDocument = "\n mutation runDrozbotAiActionHumanizedAnswer($input: RunAiActionHumanizedAnswerInput!) {\n runDrozbotAiActionHumanizedAnswer(input: $input) {\n actions\n message_to_user\n }\n}\n ";
|
|
782
668
|
export declare const RequestDrozBotAssessDocument = "\n mutation requestDrozBotAssess($input: RequestDrozBotAssessInput!) {\n requestDrozBotAssess(input: $input)\n}\n ";
|
|
783
669
|
export declare const GetDrozBotInstanceDocument = "\n query getDrozBotInstance($id: ID!) {\n getDrozBotInstance(id: $id) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n drn\n credentialId\n isTest\n integrationType\n createdAt\n updatedAt\n}\n ";
|
|
784
670
|
export declare const ListDrozBotInstancesDocument = "\n query listDrozBotInstances {\n listDrozBotInstances {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n drn\n credentialId\n isTest\n integrationType\n createdAt\n updatedAt\n}\n ";
|
|
@@ -800,12 +686,8 @@ export declare const RegisterRootCredentialDocument = "\n mutation registerRo
|
|
|
800
686
|
export declare const ActiveTriggerDocument = "\n mutation activeTrigger($input: ActiveTriggerInput!) {\n activeTrigger(input: $input)\n}\n ";
|
|
801
687
|
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
802
688
|
export declare function getSdk<C>(requester: Requester<C>): {
|
|
803
|
-
listDrozbotAiActions(variables?: ListDrozbotAiActionsQueryVariables, options?: C): Promise<ListDrozbotAiActionsQuery>;
|
|
804
|
-
getDrozbotAiAction(variables: GetDrozbotAiActionQueryVariables, options?: C): Promise<GetDrozbotAiActionQuery>;
|
|
805
|
-
createDrozbotAiAction(variables: CreateDrozbotAiActionMutationVariables, options?: C): Promise<CreateDrozbotAiActionMutation>;
|
|
806
|
-
updateDrozbotAiAction(variables: UpdateDrozbotAiActionMutationVariables, options?: C): Promise<UpdateDrozbotAiActionMutation>;
|
|
807
|
-
removeDrozbotAiAction(variables: RemoveDrozbotAiActionMutationVariables, options?: C): Promise<RemoveDrozbotAiActionMutation>;
|
|
808
689
|
runDrozbotAiAction(variables: RunDrozbotAiActionMutationVariables, options?: C): Promise<RunDrozbotAiActionMutation>;
|
|
690
|
+
runDrozbotAiActionHumanizedAnswer(variables: RunDrozbotAiActionHumanizedAnswerMutationVariables, options?: C): Promise<RunDrozbotAiActionHumanizedAnswerMutation>;
|
|
809
691
|
requestDrozBotAssess(variables: RequestDrozBotAssessMutationVariables, options?: C): Promise<RequestDrozBotAssessMutation>;
|
|
810
692
|
getDrozBotInstance(variables: GetDrozBotInstanceQueryVariables, options?: C): Promise<GetDrozBotInstanceQuery>;
|
|
811
693
|
listDrozBotInstances(variables?: ListDrozBotInstancesQueryVariables, options?: C): Promise<ListDrozBotInstancesQuery>;
|
package/src/sdks/drozbot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.serviceName = exports.ActiveTriggerDocument = exports.RegisterRootCredentialDocument = exports.ListWhatsAppBotTemplatesDocument = exports.GetWhatsAppBotDetailsDocument = exports.ListWhatsAppBotsDocument = exports.PredictIntentDocument = exports.UpsertIntentDictionaryDocument = exports.ListIntentDictionaryDocument = exports.GetIntentDictionaryDocument = exports.CreateDrozBotTicketCommentDocument = exports.CreateDrozBotTicketCommentsDocument = exports.CreateDrozBotTicketDocument = exports.RemoveDrozBotInstanceDocument = exports.UpdateDrozBotInstanceDocument = exports.CreateDrozBotInstanceDocument = exports.GetCustomerByPhoneDocument = exports.ListDrozBotInstancesDocument = exports.GetDrozBotInstanceDocument = exports.RequestDrozBotAssessDocument = exports.
|
|
4
|
+
exports.serviceName = exports.ActiveTriggerDocument = exports.RegisterRootCredentialDocument = exports.ListWhatsAppBotTemplatesDocument = exports.GetWhatsAppBotDetailsDocument = exports.ListWhatsAppBotsDocument = exports.PredictIntentDocument = exports.UpsertIntentDictionaryDocument = exports.ListIntentDictionaryDocument = exports.GetIntentDictionaryDocument = exports.CreateDrozBotTicketCommentDocument = exports.CreateDrozBotTicketCommentsDocument = exports.CreateDrozBotTicketDocument = exports.RemoveDrozBotInstanceDocument = exports.UpdateDrozBotInstanceDocument = exports.CreateDrozBotInstanceDocument = exports.GetCustomerByPhoneDocument = exports.ListDrozBotInstancesDocument = exports.GetDrozBotInstanceDocument = exports.RequestDrozBotAssessDocument = exports.RunDrozbotAiActionHumanizedAnswerDocument = exports.RunDrozbotAiActionDocument = exports.DrozBotWhatsAppTemplateFragmentDoc = exports.DrozBotWhatsAppBotFragmentDoc = exports.IntentFragmentDoc = exports.IntentDictionaryFragmentDoc = exports.DrozBotCustomerFragmentDoc = exports.DrozBotTicketCommentFragmentDoc = exports.DrozbotFragmentDoc = exports.AiActionVariableValueFragmentDoc = exports.Typenames = exports.DrozbotAiAction = exports.DrozBotWhatsAppTemplateTypes = exports.DrozBotWhatsAppTemplateStates = exports.DrozBotWhatsAppBotProviders = exports.DrozBotTicketMessageSender = exports.DrozBotIntegrationType = exports.DrozBotAssessType = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
5
|
exports.getSdk = getSdk;
|
|
6
6
|
var AppInstanceStatus;
|
|
7
7
|
(function (AppInstanceStatus) {
|
|
@@ -48,6 +48,14 @@ var DrozBotWhatsAppTemplateTypes;
|
|
|
48
48
|
DrozBotWhatsAppTemplateTypes["Link"] = "LINK";
|
|
49
49
|
DrozBotWhatsAppTemplateTypes["Text"] = "TEXT";
|
|
50
50
|
})(DrozBotWhatsAppTemplateTypes || (exports.DrozBotWhatsAppTemplateTypes = DrozBotWhatsAppTemplateTypes = {}));
|
|
51
|
+
var DrozbotAiAction;
|
|
52
|
+
(function (DrozbotAiAction) {
|
|
53
|
+
DrozbotAiAction["AiActionAskMissingVariables"] = "AiActionAskMissingVariables";
|
|
54
|
+
DrozbotAiAction["AiActionContextChanged"] = "AiActionContextChanged";
|
|
55
|
+
DrozbotAiAction["AiActionExecuteConnector"] = "AiActionExecuteConnector";
|
|
56
|
+
DrozbotAiAction["AiActionReturnFinalAnswer"] = "AiActionReturnFinalAnswer";
|
|
57
|
+
DrozbotAiAction["AiActionSetVariables"] = "AiActionSetVariables";
|
|
58
|
+
})(DrozbotAiAction || (exports.DrozbotAiAction = DrozbotAiAction = {}));
|
|
51
59
|
var Typenames;
|
|
52
60
|
(function (Typenames) {
|
|
53
61
|
Typenames["Any"] = "Any";
|
|
@@ -60,60 +68,10 @@ var Typenames;
|
|
|
60
68
|
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
61
69
|
Typenames["IntentDictionary"] = "IntentDictionary";
|
|
62
70
|
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
63
|
-
exports.
|
|
64
|
-
fragment
|
|
65
|
-
key
|
|
66
|
-
description
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
69
|
-
exports.AiActionFragmentDoc = `
|
|
70
|
-
fragment aiAction on AiAction {
|
|
71
|
-
id
|
|
72
|
-
name
|
|
73
|
-
description
|
|
74
|
-
basePrompt
|
|
75
|
-
customPrompt
|
|
76
|
-
botId
|
|
77
|
-
connectorId
|
|
78
|
-
requiredVariables {
|
|
79
|
-
...aiActionVariable
|
|
80
|
-
}
|
|
81
|
-
humanizedAnswer
|
|
82
|
-
createdAt
|
|
83
|
-
updatedAt
|
|
84
|
-
}
|
|
85
|
-
`;
|
|
86
|
-
exports.AiActionVariableFoundFragmentDoc = `
|
|
87
|
-
fragment aiActionVariableFound on AiActionVariableFound {
|
|
88
|
-
key
|
|
89
|
-
value
|
|
90
|
-
description
|
|
91
|
-
}
|
|
92
|
-
`;
|
|
93
|
-
exports.AiActionVariableMissingFragmentDoc = `
|
|
94
|
-
fragment aiActionVariableMissing on AiActionVariableMissing {
|
|
95
|
-
key
|
|
96
|
-
description
|
|
97
|
-
}
|
|
98
|
-
`;
|
|
99
|
-
exports.AiActionVariableFilledFragmentDoc = `
|
|
100
|
-
fragment aiActionVariableFilled on AiActionVariableFilled {
|
|
71
|
+
exports.AiActionVariableValueFragmentDoc = `
|
|
72
|
+
fragment aiActionVariableValue on AiActionVariableValue {
|
|
101
73
|
key
|
|
102
74
|
value
|
|
103
|
-
description
|
|
104
|
-
}
|
|
105
|
-
`;
|
|
106
|
-
exports.AiActionVariablesBlockFragmentDoc = `
|
|
107
|
-
fragment aiActionVariablesBlock on AiActionVariablesBlock {
|
|
108
|
-
found {
|
|
109
|
-
...aiActionVariableFound
|
|
110
|
-
}
|
|
111
|
-
missing {
|
|
112
|
-
...aiActionVariableMissing
|
|
113
|
-
}
|
|
114
|
-
filled {
|
|
115
|
-
...aiActionVariableFilled
|
|
116
|
-
}
|
|
117
75
|
}
|
|
118
76
|
`;
|
|
119
77
|
exports.DrozbotFragmentDoc = `
|
|
@@ -182,80 +140,27 @@ exports.DrozBotWhatsAppTemplateFragmentDoc = `
|
|
|
182
140
|
type
|
|
183
141
|
}
|
|
184
142
|
`;
|
|
185
|
-
exports.ListDrozbotAiActionsDocument = `
|
|
186
|
-
query listDrozbotAiActions {
|
|
187
|
-
listDrozbotAiActions {
|
|
188
|
-
...aiAction
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
${exports.AiActionFragmentDoc}
|
|
192
|
-
${exports.AiActionVariableFragmentDoc}`;
|
|
193
|
-
exports.GetDrozbotAiActionDocument = `
|
|
194
|
-
query getDrozbotAiAction($id: ID!) {
|
|
195
|
-
getDrozbotAiAction(id: $id) {
|
|
196
|
-
...aiAction
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
${exports.AiActionFragmentDoc}
|
|
200
|
-
${exports.AiActionVariableFragmentDoc}`;
|
|
201
|
-
exports.CreateDrozbotAiActionDocument = `
|
|
202
|
-
mutation createDrozbotAiAction($input: CreateAiActionInput!) {
|
|
203
|
-
createDrozbotAiAction(input: $input) {
|
|
204
|
-
...aiAction
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
${exports.AiActionFragmentDoc}
|
|
208
|
-
${exports.AiActionVariableFragmentDoc}`;
|
|
209
|
-
exports.UpdateDrozbotAiActionDocument = `
|
|
210
|
-
mutation updateDrozbotAiAction($input: UpdateAiActionInput!) {
|
|
211
|
-
updateDrozbotAiAction(input: $input) {
|
|
212
|
-
...aiAction
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
${exports.AiActionFragmentDoc}
|
|
216
|
-
${exports.AiActionVariableFragmentDoc}`;
|
|
217
|
-
exports.RemoveDrozbotAiActionDocument = `
|
|
218
|
-
mutation removeDrozbotAiAction($input: RemoveAiActionInput!) {
|
|
219
|
-
removeDrozbotAiAction(input: $input) {
|
|
220
|
-
id
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
`;
|
|
224
143
|
exports.RunDrozbotAiActionDocument = `
|
|
225
144
|
mutation runDrozbotAiAction($input: RunAiActionInput!) {
|
|
226
145
|
runDrozbotAiAction(input: $input) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
message_to_user
|
|
231
|
-
variables {
|
|
232
|
-
...aiActionVariablesBlock
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
... on AiActionExecuteConnector {
|
|
236
|
-
action
|
|
237
|
-
variables {
|
|
238
|
-
...aiActionVariablesBlock
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
... on AiActionReturnFinalAnswer {
|
|
242
|
-
action
|
|
243
|
-
response
|
|
244
|
-
}
|
|
245
|
-
... on AiActionContextChanged {
|
|
246
|
-
action
|
|
247
|
-
context
|
|
248
|
-
}
|
|
249
|
-
... on AiActionConnectorError {
|
|
250
|
-
action
|
|
251
|
-
error
|
|
146
|
+
actions
|
|
147
|
+
setVariables {
|
|
148
|
+
...aiActionVariableValue
|
|
252
149
|
}
|
|
150
|
+
missingVariables
|
|
151
|
+
message_to_user
|
|
152
|
+
context
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
${exports.AiActionVariableValueFragmentDoc}`;
|
|
156
|
+
exports.RunDrozbotAiActionHumanizedAnswerDocument = `
|
|
157
|
+
mutation runDrozbotAiActionHumanizedAnswer($input: RunAiActionHumanizedAnswerInput!) {
|
|
158
|
+
runDrozbotAiActionHumanizedAnswer(input: $input) {
|
|
159
|
+
actions
|
|
160
|
+
message_to_user
|
|
253
161
|
}
|
|
254
162
|
}
|
|
255
|
-
|
|
256
|
-
${exports.AiActionVariableFoundFragmentDoc}
|
|
257
|
-
${exports.AiActionVariableMissingFragmentDoc}
|
|
258
|
-
${exports.AiActionVariableFilledFragmentDoc}`;
|
|
163
|
+
`;
|
|
259
164
|
exports.RequestDrozBotAssessDocument = `
|
|
260
165
|
mutation requestDrozBotAssess($input: RequestDrozBotAssessInput!) {
|
|
261
166
|
requestDrozBotAssess(input: $input)
|
|
@@ -387,24 +292,12 @@ exports.ActiveTriggerDocument = `
|
|
|
387
292
|
`;
|
|
388
293
|
function getSdk(requester) {
|
|
389
294
|
return {
|
|
390
|
-
listDrozbotAiActions(variables, options) {
|
|
391
|
-
return requester(exports.ListDrozbotAiActionsDocument, variables, options);
|
|
392
|
-
},
|
|
393
|
-
getDrozbotAiAction(variables, options) {
|
|
394
|
-
return requester(exports.GetDrozbotAiActionDocument, variables, options);
|
|
395
|
-
},
|
|
396
|
-
createDrozbotAiAction(variables, options) {
|
|
397
|
-
return requester(exports.CreateDrozbotAiActionDocument, variables, options);
|
|
398
|
-
},
|
|
399
|
-
updateDrozbotAiAction(variables, options) {
|
|
400
|
-
return requester(exports.UpdateDrozbotAiActionDocument, variables, options);
|
|
401
|
-
},
|
|
402
|
-
removeDrozbotAiAction(variables, options) {
|
|
403
|
-
return requester(exports.RemoveDrozbotAiActionDocument, variables, options);
|
|
404
|
-
},
|
|
405
295
|
runDrozbotAiAction(variables, options) {
|
|
406
296
|
return requester(exports.RunDrozbotAiActionDocument, variables, options);
|
|
407
297
|
},
|
|
298
|
+
runDrozbotAiActionHumanizedAnswer(variables, options) {
|
|
299
|
+
return requester(exports.RunDrozbotAiActionHumanizedAnswerDocument, variables, options);
|
|
300
|
+
},
|
|
408
301
|
requestDrozBotAssess(variables, options) {
|
|
409
302
|
return requester(exports.RequestDrozBotAssessDocument, variables, options);
|
|
410
303
|
},
|