@scout9/app 1.0.0-alpha.0.2.0 → 1.0.0-alpha.0.2.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.
- package/dist/{index-7460cfee.cjs → index-332067ab.cjs} +5 -6
- package/dist/index.cjs +1 -1
- package/dist/{multipart-parser-d080fdee.cjs → multipart-parser-50a82502.cjs} +1 -1
- package/package.json +2 -2
- package/src/cli.js +0 -1
- package/src/core/templates/app.js +83 -1
- package/src/platform.js +0 -2
- package/src/public.d.ts +128 -2930
- package/types/index.d.ts +633 -3436
- package/types/index.d.ts.map +25 -20
package/types/index.d.ts
CHANGED
|
@@ -1,3415 +1,612 @@
|
|
|
1
1
|
declare module '@scout9/app' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
UPDATE?: boolean | undefined;
|
|
603
|
-
QUERY?: boolean | undefined;
|
|
604
|
-
PUT?: boolean | undefined;
|
|
605
|
-
PATCH?: boolean | undefined;
|
|
606
|
-
DELETE?: boolean | undefined;
|
|
607
|
-
} | null;
|
|
608
|
-
}[];
|
|
609
|
-
|
|
610
|
-
export type EntityApiConfiguration = {
|
|
611
|
-
GET?: boolean | undefined;
|
|
612
|
-
UPDATE?: boolean | undefined;
|
|
613
|
-
QUERY?: boolean | undefined;
|
|
614
|
-
PUT?: boolean | undefined;
|
|
615
|
-
PATCH?: boolean | undefined;
|
|
616
|
-
DELETE?: boolean | undefined;
|
|
617
|
-
} | null;
|
|
618
|
-
|
|
619
|
-
export type EntityConfiguration = {
|
|
620
|
-
/** If not provided, the id will default to the route (folder) name */
|
|
621
|
-
id?: string | undefined;
|
|
622
|
-
definitions?: {
|
|
623
|
-
/** What entity utterance this represents, if not provided, it will default to the entity id */
|
|
624
|
-
utterance?: string | undefined;
|
|
625
|
-
/** The value of this entity variance */
|
|
626
|
-
value: string;
|
|
627
|
-
/** Text representing the entity variance */
|
|
628
|
-
text: string[];
|
|
629
|
-
}[] | undefined;
|
|
630
|
-
training?: {
|
|
631
|
-
/** The assigned intent id of the given text, e.g. "I love %pizza%" could have an intent id "feedback" and "Can I purchase a %pizza%?" could have an intent id "purchase" */
|
|
632
|
-
intent: string;
|
|
633
|
-
/** Text to train the intent field and entities in or entity variances in example sentences or phrase. Ex: "I love %pizza%" and "Can I purchase a %pizza%?" */
|
|
634
|
-
text: string;
|
|
635
|
-
}[] | undefined;
|
|
636
|
-
tests?: {
|
|
637
|
-
/** Text to test the entity detection */
|
|
638
|
-
text: string;
|
|
639
|
-
expected: {
|
|
640
|
-
/** The expected intent id */
|
|
641
|
-
intent: string;
|
|
642
|
-
context?: any;
|
|
643
|
-
};
|
|
644
|
-
}[] | undefined;
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
export type EntityRootProjectConfiguration = {
|
|
648
|
-
/** If not provided, the id will default to the route (folder) name */
|
|
649
|
-
id?: string | undefined;
|
|
650
|
-
definitions?: {
|
|
651
|
-
/** What entity utterance this represents, if not provided, it will default to the entity id */
|
|
652
|
-
utterance?: string | undefined;
|
|
653
|
-
/** The value of this entity variance */
|
|
654
|
-
value: string;
|
|
655
|
-
/** Text representing the entity variance */
|
|
656
|
-
text: string[];
|
|
657
|
-
}[] | undefined;
|
|
658
|
-
training?: {
|
|
659
|
-
/** The assigned intent id of the given text, e.g. "I love %pizza%" could have an intent id "feedback" and "Can I purchase a %pizza%?" could have an intent id "purchase" */
|
|
660
|
-
intent: string;
|
|
661
|
-
/** Text to train the intent field and entities in or entity variances in example sentences or phrase. Ex: "I love %pizza%" and "Can I purchase a %pizza%?" */
|
|
662
|
-
text: string;
|
|
663
|
-
}[] | undefined;
|
|
664
|
-
tests?: {
|
|
665
|
-
/** Text to test the entity detection */
|
|
666
|
-
text: string;
|
|
667
|
-
expected: {
|
|
668
|
-
/** The expected intent id */
|
|
669
|
-
intent: string;
|
|
670
|
-
context?: any;
|
|
671
|
-
};
|
|
672
|
-
}[] | undefined;
|
|
673
|
-
/** Entity id association, used to handle route params */
|
|
674
|
-
entities: string[];
|
|
675
|
-
entity: string;
|
|
676
|
-
api: {
|
|
677
|
-
GET?: boolean | undefined;
|
|
678
|
-
UPDATE?: boolean | undefined;
|
|
679
|
-
QUERY?: boolean | undefined;
|
|
680
|
-
PUT?: boolean | undefined;
|
|
681
|
-
PATCH?: boolean | undefined;
|
|
682
|
-
DELETE?: boolean | undefined;
|
|
683
|
-
} | null;
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
export type FollowupBase = {
|
|
687
|
-
scheduled: number;
|
|
688
|
-
cancelIf?: {
|
|
689
|
-
[x: string]: any;
|
|
690
|
-
} | undefined;
|
|
691
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
692
|
-
overrideLock?: boolean | undefined;
|
|
693
|
-
};
|
|
694
|
-
|
|
695
|
-
export type Followup = {
|
|
696
|
-
scheduled: number;
|
|
697
|
-
cancelIf?: {
|
|
698
|
-
[x: string]: any;
|
|
699
|
-
} | undefined;
|
|
700
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
701
|
-
overrideLock?: boolean | undefined;
|
|
702
|
-
/** Manual message sent to client */
|
|
703
|
-
message: string;
|
|
704
|
-
} | {
|
|
705
|
-
scheduled: number;
|
|
706
|
-
cancelIf?: {
|
|
707
|
-
[x: string]: any;
|
|
708
|
-
} | undefined;
|
|
709
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
710
|
-
overrideLock?: boolean | undefined;
|
|
711
|
-
instructions: string | {
|
|
712
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
713
|
-
id?: string | undefined;
|
|
714
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
715
|
-
persist?: boolean | undefined;
|
|
716
|
-
content: string;
|
|
717
|
-
} | string[] | {
|
|
718
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
719
|
-
id?: string | undefined;
|
|
720
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
721
|
-
persist?: boolean | undefined;
|
|
722
|
-
content: string;
|
|
723
|
-
}[];
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
export type Forward = boolean | string | {
|
|
727
|
-
to?: string | undefined;
|
|
728
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
729
|
-
/** Note to provide to the agent */
|
|
730
|
-
note?: string | undefined;
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
export type InstructionObject = {
|
|
734
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
735
|
-
id?: string | undefined;
|
|
736
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
737
|
-
persist?: boolean | undefined;
|
|
738
|
-
content: string;
|
|
739
|
-
};
|
|
740
|
-
|
|
741
|
-
export type Instruction = string | {
|
|
742
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
743
|
-
id?: string | undefined;
|
|
744
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
745
|
-
persist?: boolean | undefined;
|
|
746
|
-
content: string;
|
|
747
|
-
} | string[] | {
|
|
748
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
749
|
-
id?: string | undefined;
|
|
750
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
751
|
-
persist?: boolean | undefined;
|
|
752
|
-
content: string;
|
|
753
|
-
}[];
|
|
754
|
-
|
|
755
|
-
export type IntentWorkflowEvent = {
|
|
756
|
-
current: string | null;
|
|
757
|
-
flow: string[];
|
|
758
|
-
initial: string | null;
|
|
759
|
-
};
|
|
760
|
-
|
|
761
|
-
export type Message = {
|
|
762
|
-
/** Unique ID for the message */
|
|
763
|
-
id: string;
|
|
764
|
-
role: "agent" | "customer" | "system";
|
|
765
|
-
content: string;
|
|
766
|
-
/** Datetime ISO 8601 timestamp */
|
|
767
|
-
time: string;
|
|
768
|
-
name?: string | undefined;
|
|
769
|
-
/** Datetime ISO 8601 timestamp */
|
|
770
|
-
scheduled?: string | undefined;
|
|
771
|
-
/** The context generated from the message */
|
|
772
|
-
context?: any | undefined;
|
|
773
|
-
/** Detected intent */
|
|
774
|
-
intent?: (string | undefined) | null;
|
|
775
|
-
/** Confidence score of the assigned intent */
|
|
776
|
-
intentScore?: (number | null) | undefined;
|
|
777
|
-
/** How long to delay the message manually in seconds */
|
|
778
|
-
delayInSeconds?: (number | null) | undefined;
|
|
779
|
-
};
|
|
780
|
-
|
|
781
|
-
export type PersonaConfiguration = {
|
|
782
|
-
deployed?: {
|
|
783
|
-
/** Web URL for agent */
|
|
784
|
-
web?: string | undefined;
|
|
785
|
-
/** Phone number for agent */
|
|
786
|
-
phone?: string | undefined;
|
|
787
|
-
/** Email address for agent */
|
|
788
|
-
email?: string | undefined;
|
|
789
|
-
} | undefined;
|
|
790
|
-
img?: (string | null) | undefined;
|
|
791
|
-
/** Agent first name */
|
|
792
|
-
firstName?: string | undefined;
|
|
793
|
-
/** Agent last name */
|
|
794
|
-
lastName?: string | undefined;
|
|
795
|
-
/** Agent is inactive */
|
|
796
|
-
inactive?: boolean | undefined;
|
|
797
|
-
/** Programmable phone number */
|
|
798
|
-
programmablePhoneNumber?: string | undefined;
|
|
799
|
-
/** Programmable phone number SID */
|
|
800
|
-
programmablePhoneNumberSid?: string | undefined;
|
|
801
|
-
/** Email address from Scout9 gmail subdomain */
|
|
802
|
-
programmableEmail?: string | undefined;
|
|
803
|
-
/** Email address to forward to */
|
|
804
|
-
forwardEmail?: string | undefined;
|
|
805
|
-
/** Phone number to forward to */
|
|
806
|
-
forwardPhone?: string | undefined;
|
|
807
|
-
/** Agent title */
|
|
808
|
-
title?: string;
|
|
809
|
-
/** Context of the agent */
|
|
810
|
-
context?: string;
|
|
811
|
-
includedLocations?: string[] | undefined;
|
|
812
|
-
excludedLocations?: string[] | undefined;
|
|
813
|
-
model?: ("Scout9" | "bard" | "openai");
|
|
814
|
-
transcripts?: {
|
|
815
|
-
/** Unique ID for the message */
|
|
816
|
-
id: string;
|
|
817
|
-
role: "agent" | "customer" | "system";
|
|
818
|
-
content: string;
|
|
819
|
-
/** Datetime ISO 8601 timestamp */
|
|
820
|
-
time: string;
|
|
821
|
-
name?: string | undefined;
|
|
822
|
-
/** Datetime ISO 8601 timestamp */
|
|
823
|
-
scheduled?: string | undefined;
|
|
824
|
-
/** The context generated from the message */
|
|
825
|
-
context?: any | undefined;
|
|
826
|
-
/** Detected intent */
|
|
827
|
-
intent?: (string | undefined) | null;
|
|
828
|
-
/** Confidence score of the assigned intent */
|
|
829
|
-
intentScore?: (number | null) | undefined;
|
|
830
|
-
/** How long to delay the message manually in seconds */
|
|
831
|
-
delayInSeconds?: (number | null) | undefined;
|
|
832
|
-
}[][] | undefined;
|
|
833
|
-
audios?: any[] | undefined;
|
|
834
|
-
/** Unique ID for agent */
|
|
835
|
-
id: string;
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
export type Persona = {
|
|
839
|
-
deployed?: {
|
|
840
|
-
/** Web URL for agent */
|
|
841
|
-
web?: string | undefined;
|
|
842
|
-
/** Phone number for agent */
|
|
843
|
-
phone?: string | undefined;
|
|
844
|
-
/** Email address for agent */
|
|
845
|
-
email?: string | undefined;
|
|
846
|
-
} | undefined;
|
|
847
|
-
img?: (string | null) | undefined;
|
|
848
|
-
/** Agent first name */
|
|
849
|
-
firstName?: string | undefined;
|
|
850
|
-
/** Agent last name */
|
|
851
|
-
lastName?: string | undefined;
|
|
852
|
-
/** Agent is inactive */
|
|
853
|
-
inactive?: boolean | undefined;
|
|
854
|
-
/** Programmable phone number */
|
|
855
|
-
programmablePhoneNumber?: string | undefined;
|
|
856
|
-
/** Programmable phone number SID */
|
|
857
|
-
programmablePhoneNumberSid?: string | undefined;
|
|
858
|
-
/** Email address from Scout9 gmail subdomain */
|
|
859
|
-
programmableEmail?: string | undefined;
|
|
860
|
-
/** Email address to forward to */
|
|
861
|
-
forwardEmail?: string | undefined;
|
|
862
|
-
/** Phone number to forward to */
|
|
863
|
-
forwardPhone?: string | undefined;
|
|
864
|
-
/** Agent title */
|
|
865
|
-
title?: string;
|
|
866
|
-
/** Context of the agent */
|
|
867
|
-
context?: string;
|
|
868
|
-
includedLocations?: string[] | undefined;
|
|
869
|
-
excludedLocations?: string[] | undefined;
|
|
870
|
-
model?: ("Scout9" | "bard" | "openai");
|
|
871
|
-
transcripts?: {
|
|
872
|
-
/** Unique ID for the message */
|
|
873
|
-
id: string;
|
|
874
|
-
role: "agent" | "customer" | "system";
|
|
875
|
-
content: string;
|
|
876
|
-
/** Datetime ISO 8601 timestamp */
|
|
877
|
-
time: string;
|
|
878
|
-
name?: string | undefined;
|
|
879
|
-
/** Datetime ISO 8601 timestamp */
|
|
880
|
-
scheduled?: string | undefined;
|
|
881
|
-
/** The context generated from the message */
|
|
882
|
-
context?: any | undefined;
|
|
883
|
-
/** Detected intent */
|
|
884
|
-
intent?: (string | undefined) | null;
|
|
885
|
-
/** Confidence score of the assigned intent */
|
|
886
|
-
intentScore?: (number | null) | undefined;
|
|
887
|
-
/** How long to delay the message manually in seconds */
|
|
888
|
-
delayInSeconds?: (number | null) | undefined;
|
|
889
|
-
}[][] | undefined;
|
|
890
|
-
audios?: any[] | undefined;
|
|
891
|
-
};
|
|
892
|
-
|
|
893
|
-
export type PersonasConfiguration = {
|
|
894
|
-
deployed?: {
|
|
895
|
-
/** Web URL for agent */
|
|
896
|
-
web?: string | undefined;
|
|
897
|
-
/** Phone number for agent */
|
|
898
|
-
phone?: string | undefined;
|
|
899
|
-
/** Email address for agent */
|
|
900
|
-
email?: string | undefined;
|
|
901
|
-
} | undefined;
|
|
902
|
-
img?: (string | null) | undefined;
|
|
903
|
-
/** Agent first name */
|
|
904
|
-
firstName?: string | undefined;
|
|
905
|
-
/** Agent last name */
|
|
906
|
-
lastName?: string | undefined;
|
|
907
|
-
/** Agent is inactive */
|
|
908
|
-
inactive?: boolean | undefined;
|
|
909
|
-
/** Programmable phone number */
|
|
910
|
-
programmablePhoneNumber?: string | undefined;
|
|
911
|
-
/** Programmable phone number SID */
|
|
912
|
-
programmablePhoneNumberSid?: string | undefined;
|
|
913
|
-
/** Email address from Scout9 gmail subdomain */
|
|
914
|
-
programmableEmail?: string | undefined;
|
|
915
|
-
/** Email address to forward to */
|
|
916
|
-
forwardEmail?: string | undefined;
|
|
917
|
-
/** Phone number to forward to */
|
|
918
|
-
forwardPhone?: string | undefined;
|
|
919
|
-
/** Agent title */
|
|
920
|
-
title?: string;
|
|
921
|
-
/** Context of the agent */
|
|
922
|
-
context?: string;
|
|
923
|
-
includedLocations?: string[] | undefined;
|
|
924
|
-
excludedLocations?: string[] | undefined;
|
|
925
|
-
model?: ("Scout9" | "bard" | "openai");
|
|
926
|
-
transcripts?: {
|
|
927
|
-
/** Unique ID for the message */
|
|
928
|
-
id: string;
|
|
929
|
-
role: "agent" | "customer" | "system";
|
|
930
|
-
content: string;
|
|
931
|
-
/** Datetime ISO 8601 timestamp */
|
|
932
|
-
time: string;
|
|
933
|
-
name?: string | undefined;
|
|
934
|
-
/** Datetime ISO 8601 timestamp */
|
|
935
|
-
scheduled?: string | undefined;
|
|
936
|
-
/** The context generated from the message */
|
|
937
|
-
context?: any | undefined;
|
|
938
|
-
/** Detected intent */
|
|
939
|
-
intent?: (string | undefined) | null;
|
|
940
|
-
/** Confidence score of the assigned intent */
|
|
941
|
-
intentScore?: (number | null) | undefined;
|
|
942
|
-
/** How long to delay the message manually in seconds */
|
|
943
|
-
delayInSeconds?: (number | null) | undefined;
|
|
944
|
-
}[][] | undefined;
|
|
945
|
-
audios?: any[] | undefined;
|
|
946
|
-
/** Unique ID for agent */
|
|
947
|
-
id: string;
|
|
948
|
-
}[];
|
|
949
|
-
|
|
950
|
-
export type Personas = {
|
|
951
|
-
deployed?: {
|
|
952
|
-
/** Web URL for agent */
|
|
953
|
-
web?: string | undefined;
|
|
954
|
-
/** Phone number for agent */
|
|
955
|
-
phone?: string | undefined;
|
|
956
|
-
/** Email address for agent */
|
|
957
|
-
email?: string | undefined;
|
|
958
|
-
} | undefined;
|
|
959
|
-
img?: (string | null) | undefined;
|
|
960
|
-
/** Agent first name */
|
|
961
|
-
firstName?: string | undefined;
|
|
962
|
-
/** Agent last name */
|
|
963
|
-
lastName?: string | undefined;
|
|
964
|
-
/** Agent is inactive */
|
|
965
|
-
inactive?: boolean | undefined;
|
|
966
|
-
/** Programmable phone number */
|
|
967
|
-
programmablePhoneNumber?: string | undefined;
|
|
968
|
-
/** Programmable phone number SID */
|
|
969
|
-
programmablePhoneNumberSid?: string | undefined;
|
|
970
|
-
/** Email address from Scout9 gmail subdomain */
|
|
971
|
-
programmableEmail?: string | undefined;
|
|
972
|
-
/** Email address to forward to */
|
|
973
|
-
forwardEmail?: string | undefined;
|
|
974
|
-
/** Phone number to forward to */
|
|
975
|
-
forwardPhone?: string | undefined;
|
|
976
|
-
/** Agent title */
|
|
977
|
-
title?: string;
|
|
978
|
-
/** Context of the agent */
|
|
979
|
-
context?: string;
|
|
980
|
-
includedLocations?: string[] | undefined;
|
|
981
|
-
excludedLocations?: string[] | undefined;
|
|
982
|
-
model?: ("Scout9" | "bard" | "openai");
|
|
983
|
-
transcripts?: {
|
|
984
|
-
/** Unique ID for the message */
|
|
985
|
-
id: string;
|
|
986
|
-
role: "agent" | "customer" | "system";
|
|
987
|
-
content: string;
|
|
988
|
-
/** Datetime ISO 8601 timestamp */
|
|
989
|
-
time: string;
|
|
990
|
-
name?: string | undefined;
|
|
991
|
-
/** Datetime ISO 8601 timestamp */
|
|
992
|
-
scheduled?: string | undefined;
|
|
993
|
-
/** The context generated from the message */
|
|
994
|
-
context?: any | undefined;
|
|
995
|
-
/** Detected intent */
|
|
996
|
-
intent?: (string | undefined) | null;
|
|
997
|
-
/** Confidence score of the assigned intent */
|
|
998
|
-
intentScore?: (number | null) | undefined;
|
|
999
|
-
/** How long to delay the message manually in seconds */
|
|
1000
|
-
delayInSeconds?: (number | null) | undefined;
|
|
1001
|
-
}[][] | undefined;
|
|
1002
|
-
audios?: any[] | undefined;
|
|
1003
|
-
}[];
|
|
1004
|
-
|
|
1005
|
-
export type Scout9ProjectBuildConfig = {
|
|
1006
|
-
tag?: string | undefined;
|
|
1007
|
-
llm: {
|
|
1008
|
-
engine: "openai";
|
|
1009
|
-
model: "gpt-4-1106-preview" | "gpt-4-vision-preview" | "gpt-4" | "gpt-4-0314" | "gpt-4-0613" | "gpt-4-32k" | "gpt-4-32k-0314" | "gpt-4-32k-0613" | "gpt-3.5-turbo" | "gpt-3.5-turbo-16k" | "gpt-3.5-turbo-0301" | "gpt-3.5-turbo-0613" | "gpt-3.5-turbo-16k-0613" | string;
|
|
1010
|
-
} | {
|
|
1011
|
-
engine: "llama";
|
|
1012
|
-
model: string;
|
|
1013
|
-
} | {
|
|
1014
|
-
engine: "bard";
|
|
1015
|
-
model: string;
|
|
1016
|
-
};
|
|
1017
|
-
/** Configure personal model transformer (PMT) settings to align auto replies the agent's tone */
|
|
1018
|
-
pmt: {
|
|
1019
|
-
engine: "scout9";
|
|
1020
|
-
model: string;
|
|
1021
|
-
};
|
|
1022
|
-
/** Determines the max auto replies without further conversation progression (defined by new context data gathered), before the conversation is locked and requires manual intervention */
|
|
1023
|
-
maxLockAttempts?: number | undefined;
|
|
1024
|
-
/** Configure the initial contexts for every conversation */
|
|
1025
|
-
initialContext: string[];
|
|
1026
|
-
organization?: {
|
|
1027
|
-
name: string;
|
|
1028
|
-
description: string;
|
|
1029
|
-
dashboard?: string | undefined;
|
|
1030
|
-
logo?: string | undefined;
|
|
1031
|
-
icon?: string | undefined;
|
|
1032
|
-
logos?: string | undefined;
|
|
1033
|
-
website?: string | undefined;
|
|
1034
|
-
email?: string | undefined;
|
|
1035
|
-
phone?: string | undefined;
|
|
1036
|
-
} | undefined;
|
|
1037
|
-
agents: {
|
|
1038
|
-
deployed?: {
|
|
1039
|
-
/** Web URL for agent */
|
|
1040
|
-
web?: string | undefined;
|
|
1041
|
-
/** Phone number for agent */
|
|
1042
|
-
phone?: string | undefined;
|
|
1043
|
-
/** Email address for agent */
|
|
1044
|
-
email?: string | undefined;
|
|
1045
|
-
} | undefined;
|
|
1046
|
-
img?: (string | null) | undefined;
|
|
1047
|
-
/** Agent first name */
|
|
1048
|
-
firstName?: string | undefined;
|
|
1049
|
-
/** Agent last name */
|
|
1050
|
-
lastName?: string | undefined;
|
|
1051
|
-
/** Agent is inactive */
|
|
1052
|
-
inactive?: boolean | undefined;
|
|
1053
|
-
/** Programmable phone number */
|
|
1054
|
-
programmablePhoneNumber?: string | undefined;
|
|
1055
|
-
/** Programmable phone number SID */
|
|
1056
|
-
programmablePhoneNumberSid?: string | undefined;
|
|
1057
|
-
/** Email address from Scout9 gmail subdomain */
|
|
1058
|
-
programmableEmail?: string | undefined;
|
|
1059
|
-
/** Email address to forward to */
|
|
1060
|
-
forwardEmail?: string | undefined;
|
|
1061
|
-
/** Phone number to forward to */
|
|
1062
|
-
forwardPhone?: string | undefined;
|
|
1063
|
-
/** Agent title */
|
|
1064
|
-
title?: string;
|
|
1065
|
-
/** Context of the agent */
|
|
1066
|
-
context?: string;
|
|
1067
|
-
includedLocations?: string[] | undefined;
|
|
1068
|
-
excludedLocations?: string[] | undefined;
|
|
1069
|
-
model?: ("Scout9" | "bard" | "openai");
|
|
1070
|
-
transcripts?: {
|
|
1071
|
-
/** Unique ID for the message */
|
|
1072
|
-
id: string;
|
|
1073
|
-
role: "agent" | "customer" | "system";
|
|
1074
|
-
content: string;
|
|
1075
|
-
/** Datetime ISO 8601 timestamp */
|
|
1076
|
-
time: string;
|
|
1077
|
-
name?: string | undefined;
|
|
1078
|
-
/** Datetime ISO 8601 timestamp */
|
|
1079
|
-
scheduled?: string | undefined;
|
|
1080
|
-
/** The context generated from the message */
|
|
1081
|
-
context?: any | undefined;
|
|
1082
|
-
/** Detected intent */
|
|
1083
|
-
intent?: (string | undefined) | null;
|
|
1084
|
-
/** Confidence score of the assigned intent */
|
|
1085
|
-
intentScore?: (number | null) | undefined;
|
|
1086
|
-
/** How long to delay the message manually in seconds */
|
|
1087
|
-
delayInSeconds?: (number | null) | undefined;
|
|
1088
|
-
}[][] | undefined;
|
|
1089
|
-
audios?: any[] | undefined;
|
|
1090
|
-
}[];
|
|
1091
|
-
entities: {
|
|
1092
|
-
/** If not provided, the id will default to the route (folder) name */
|
|
1093
|
-
id?: string | undefined;
|
|
1094
|
-
definitions?: {
|
|
1095
|
-
/** What entity utterance this represents, if not provided, it will default to the entity id */
|
|
1096
|
-
utterance?: string | undefined;
|
|
1097
|
-
/** The value of this entity variance */
|
|
1098
|
-
value: string;
|
|
1099
|
-
/** Text representing the entity variance */
|
|
1100
|
-
text: string[];
|
|
1101
|
-
}[] | undefined;
|
|
1102
|
-
training?: {
|
|
1103
|
-
/** The assigned intent id of the given text, e.g. "I love %pizza%" could have an intent id "feedback" and "Can I purchase a %pizza%?" could have an intent id "purchase" */
|
|
1104
|
-
intent: string;
|
|
1105
|
-
/** Text to train the intent field and entities in or entity variances in example sentences or phrase. Ex: "I love %pizza%" and "Can I purchase a %pizza%?" */
|
|
1106
|
-
text: string;
|
|
1107
|
-
}[] | undefined;
|
|
1108
|
-
tests?: {
|
|
1109
|
-
/** Text to test the entity detection */
|
|
1110
|
-
text: string;
|
|
1111
|
-
expected: {
|
|
1112
|
-
/** The expected intent id */
|
|
1113
|
-
intent: string;
|
|
1114
|
-
context?: any;
|
|
1115
|
-
};
|
|
1116
|
-
}[] | undefined;
|
|
1117
|
-
/** Entity id association, used to handle route params */
|
|
1118
|
-
entities: string[];
|
|
1119
|
-
entity: string;
|
|
1120
|
-
api: {
|
|
1121
|
-
GET?: boolean | undefined;
|
|
1122
|
-
UPDATE?: boolean | undefined;
|
|
1123
|
-
QUERY?: boolean | undefined;
|
|
1124
|
-
PUT?: boolean | undefined;
|
|
1125
|
-
PATCH?: boolean | undefined;
|
|
1126
|
-
DELETE?: boolean | undefined;
|
|
1127
|
-
} | null;
|
|
1128
|
-
}[];
|
|
1129
|
-
workflows: {
|
|
1130
|
-
/** Workflow id association, used to handle route params */
|
|
1131
|
-
entities: string[];
|
|
1132
|
-
entity: string;
|
|
1133
|
-
}[];
|
|
1134
|
-
};
|
|
1135
|
-
|
|
1136
|
-
export type Scout9ProjectConfig = {
|
|
1137
|
-
tag?: string | undefined;
|
|
1138
|
-
llm: {
|
|
1139
|
-
engine: "openai";
|
|
1140
|
-
model: "gpt-4-1106-preview" | "gpt-4-vision-preview" | "gpt-4" | "gpt-4-0314" | "gpt-4-0613" | "gpt-4-32k" | "gpt-4-32k-0314" | "gpt-4-32k-0613" | "gpt-3.5-turbo" | "gpt-3.5-turbo-16k" | "gpt-3.5-turbo-0301" | "gpt-3.5-turbo-0613" | "gpt-3.5-turbo-16k-0613" | string;
|
|
1141
|
-
} | {
|
|
1142
|
-
engine: "llama";
|
|
1143
|
-
model: string;
|
|
1144
|
-
} | {
|
|
1145
|
-
engine: "bard";
|
|
1146
|
-
model: string;
|
|
1147
|
-
};
|
|
1148
|
-
/** Configure personal model transformer (PMT) settings to align auto replies the agent's tone */
|
|
1149
|
-
pmt: {
|
|
1150
|
-
engine: "scout9";
|
|
1151
|
-
model: string;
|
|
1152
|
-
};
|
|
1153
|
-
/** Determines the max auto replies without further conversation progression (defined by new context data gathered), before the conversation is locked and requires manual intervention */
|
|
1154
|
-
maxLockAttempts?: number | undefined;
|
|
1155
|
-
/** Configure the initial contexts for every conversation */
|
|
1156
|
-
initialContext: string[];
|
|
1157
|
-
organization?: {
|
|
1158
|
-
name: string;
|
|
1159
|
-
description: string;
|
|
1160
|
-
dashboard?: string | undefined;
|
|
1161
|
-
logo?: string | undefined;
|
|
1162
|
-
icon?: string | undefined;
|
|
1163
|
-
logos?: string | undefined;
|
|
1164
|
-
website?: string | undefined;
|
|
1165
|
-
email?: string | undefined;
|
|
1166
|
-
phone?: string | undefined;
|
|
1167
|
-
} | undefined;
|
|
1168
|
-
};
|
|
1169
|
-
|
|
1170
|
-
export type Test = {
|
|
1171
|
-
baz: {
|
|
1172
|
-
boo: {
|
|
1173
|
-
one: number;
|
|
1174
|
-
two?: number | undefined;
|
|
1175
|
-
};
|
|
1176
|
-
};
|
|
1177
|
-
bus: {
|
|
1178
|
-
foo: string;
|
|
1179
|
-
bar?: boolean | undefined;
|
|
1180
|
-
};
|
|
1181
|
-
};
|
|
1182
|
-
|
|
1183
|
-
export type WorkflowConfiguration = {
|
|
1184
|
-
/** Workflow id association, used to handle route params */
|
|
1185
|
-
entities: string[];
|
|
1186
|
-
entity: string;
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
|
-
export type WorkflowEvent = {
|
|
1190
|
-
messages: {
|
|
1191
|
-
/** Unique ID for the message */
|
|
1192
|
-
id: string;
|
|
1193
|
-
role: "agent" | "customer" | "system";
|
|
1194
|
-
content: string;
|
|
1195
|
-
/** Datetime ISO 8601 timestamp */
|
|
1196
|
-
time: string;
|
|
1197
|
-
name?: string | undefined;
|
|
1198
|
-
/** Datetime ISO 8601 timestamp */
|
|
1199
|
-
scheduled?: string | undefined;
|
|
1200
|
-
/** The context generated from the message */
|
|
1201
|
-
context?: any | undefined;
|
|
1202
|
-
/** Detected intent */
|
|
1203
|
-
intent?: (string | undefined) | null;
|
|
1204
|
-
/** Confidence score of the assigned intent */
|
|
1205
|
-
intentScore?: (number | null) | undefined;
|
|
1206
|
-
/** How long to delay the message manually in seconds */
|
|
1207
|
-
delayInSeconds?: (number | null) | undefined;
|
|
1208
|
-
}[];
|
|
1209
|
-
conversation: {
|
|
1210
|
-
/** Default agent assigned to the conversation(s) */
|
|
1211
|
-
$agent: string;
|
|
1212
|
-
/** Customer this conversation is with */
|
|
1213
|
-
$customer: string;
|
|
1214
|
-
/** Initial contexts to load when starting the conversation */
|
|
1215
|
-
initialContexts?: string[] | undefined;
|
|
1216
|
-
environment: "phone" | "email" | "web";
|
|
1217
|
-
environmentProps?: {
|
|
1218
|
-
/** HTML Subject of the conversation */
|
|
1219
|
-
subject?: string | undefined;
|
|
1220
|
-
/** Used to sync email messages with the conversation */
|
|
1221
|
-
platformEmailThreadId?: string | undefined;
|
|
1222
|
-
} | undefined;
|
|
1223
|
-
/** Whether the conversation is locked or not */
|
|
1224
|
-
locked?: (boolean | undefined) | null;
|
|
1225
|
-
/** Why this conversation was locked */
|
|
1226
|
-
lockedReason?: (string | undefined) | null;
|
|
1227
|
-
/** Number attempts made until conversation is locked */
|
|
1228
|
-
lockAttempts?: (number | undefined) | null;
|
|
1229
|
-
/** What personaId/phone/email was forwarded */
|
|
1230
|
-
forwardedTo?: (string | undefined) | null;
|
|
1231
|
-
/** Datetime ISO 8601 timestamp when persona was forwarded */
|
|
1232
|
-
forwarded?: (string | undefined) | null;
|
|
1233
|
-
forwardNote?: (string | undefined) | null;
|
|
1234
|
-
/** Detected intent of conversation */
|
|
1235
|
-
intent?: (string | undefined) | null;
|
|
1236
|
-
/** Confidence score of the assigned intent */
|
|
1237
|
-
intentScore?: (number | undefined) | null;
|
|
1238
|
-
anticipate?: {
|
|
1239
|
-
/** Determines the runtime to address the next response */
|
|
1240
|
-
type: "did" | "literal" | "context";
|
|
1241
|
-
slots: {
|
|
1242
|
-
[x: string]: any[];
|
|
1243
|
-
};
|
|
1244
|
-
/** For type 'did' */
|
|
1245
|
-
did?: string | undefined;
|
|
1246
|
-
/** For literal keywords, this map helps point which slot the keyword matches to */
|
|
1247
|
-
map?: {
|
|
1248
|
-
slot: string;
|
|
1249
|
-
keywords: string[];
|
|
1250
|
-
}[] | undefined;
|
|
1251
|
-
} | undefined;
|
|
1252
|
-
};
|
|
1253
|
-
context?: any;
|
|
1254
|
-
message: {
|
|
1255
|
-
/** Unique ID for the message */
|
|
1256
|
-
id: string;
|
|
1257
|
-
role: "agent" | "customer" | "system";
|
|
1258
|
-
content: string;
|
|
1259
|
-
/** Datetime ISO 8601 timestamp */
|
|
1260
|
-
time: string;
|
|
1261
|
-
name?: string | undefined;
|
|
1262
|
-
/** Datetime ISO 8601 timestamp */
|
|
1263
|
-
scheduled?: string | undefined;
|
|
1264
|
-
/** The context generated from the message */
|
|
1265
|
-
context?: any | undefined;
|
|
1266
|
-
/** Detected intent */
|
|
1267
|
-
intent?: (string | undefined) | null;
|
|
1268
|
-
/** Confidence score of the assigned intent */
|
|
1269
|
-
intentScore?: (number | null) | undefined;
|
|
1270
|
-
/** How long to delay the message manually in seconds */
|
|
1271
|
-
delayInSeconds?: (number | null) | undefined;
|
|
1272
|
-
};
|
|
1273
|
-
agent: {
|
|
1274
|
-
deployed?: {
|
|
1275
|
-
/** Web URL for agent */
|
|
1276
|
-
web?: string | undefined;
|
|
1277
|
-
/** Phone number for agent */
|
|
1278
|
-
phone?: string | undefined;
|
|
1279
|
-
/** Email address for agent */
|
|
1280
|
-
email?: string | undefined;
|
|
1281
|
-
} | undefined;
|
|
1282
|
-
img?: (string | null) | undefined;
|
|
1283
|
-
/** Agent first name */
|
|
1284
|
-
firstName?: string | undefined;
|
|
1285
|
-
/** Agent last name */
|
|
1286
|
-
lastName?: string | undefined;
|
|
1287
|
-
/** Agent is inactive */
|
|
1288
|
-
inactive?: boolean | undefined;
|
|
1289
|
-
/** Programmable phone number */
|
|
1290
|
-
programmablePhoneNumber?: string | undefined;
|
|
1291
|
-
/** Programmable phone number SID */
|
|
1292
|
-
programmablePhoneNumberSid?: string | undefined;
|
|
1293
|
-
/** Email address from Scout9 gmail subdomain */
|
|
1294
|
-
programmableEmail?: string | undefined;
|
|
1295
|
-
/** Email address to forward to */
|
|
1296
|
-
forwardEmail?: string | undefined;
|
|
1297
|
-
/** Phone number to forward to */
|
|
1298
|
-
forwardPhone?: string | undefined;
|
|
1299
|
-
/** Agent title */
|
|
1300
|
-
title?: string;
|
|
1301
|
-
/** Unique ID for agent */
|
|
1302
|
-
id: string;
|
|
1303
|
-
};
|
|
1304
|
-
customer: {
|
|
1305
|
-
firstName?: string | undefined;
|
|
1306
|
-
lastName?: string | undefined;
|
|
1307
|
-
name: string;
|
|
1308
|
-
email?: (string | null) | undefined;
|
|
1309
|
-
phone?: (string | null) | undefined;
|
|
1310
|
-
img?: (string | null) | undefined;
|
|
1311
|
-
neighborhood?: (string | null) | undefined;
|
|
1312
|
-
city?: (string | null) | undefined;
|
|
1313
|
-
country?: (string | null) | undefined;
|
|
1314
|
-
line1?: (string | null) | undefined;
|
|
1315
|
-
line2?: (string | null) | undefined;
|
|
1316
|
-
postal_code?: (string | null) | undefined;
|
|
1317
|
-
state?: (string | null) | undefined;
|
|
1318
|
-
town?: (string | null) | undefined;
|
|
1319
|
-
joined?: (string | null) | undefined;
|
|
1320
|
-
stripe?: (string | null) | undefined;
|
|
1321
|
-
stripeDev?: (string | null) | undefined;
|
|
1322
|
-
};
|
|
1323
|
-
intent: {
|
|
1324
|
-
current: string | null;
|
|
1325
|
-
flow: string[];
|
|
1326
|
-
initial: string | null;
|
|
1327
|
-
};
|
|
1328
|
-
stagnationCount: number;
|
|
1329
|
-
/** Any developer notes to provide */
|
|
1330
|
-
note?: string | undefined;
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
export type WorkflowFunction = (args_0: {
|
|
1334
|
-
messages: {
|
|
1335
|
-
/** Unique ID for the message */
|
|
1336
|
-
id: string;
|
|
1337
|
-
role: "agent" | "customer" | "system";
|
|
1338
|
-
content: string;
|
|
1339
|
-
/** Datetime ISO 8601 timestamp */
|
|
1340
|
-
time: string;
|
|
1341
|
-
name?: string | undefined;
|
|
1342
|
-
/** Datetime ISO 8601 timestamp */
|
|
1343
|
-
scheduled?: string | undefined;
|
|
1344
|
-
/** The context generated from the message */
|
|
1345
|
-
context?: any | undefined;
|
|
1346
|
-
/** Detected intent */
|
|
1347
|
-
intent?: (string | undefined) | null;
|
|
1348
|
-
/** Confidence score of the assigned intent */
|
|
1349
|
-
intentScore?: (number | null) | undefined;
|
|
1350
|
-
/** How long to delay the message manually in seconds */
|
|
1351
|
-
delayInSeconds?: (number | null) | undefined;
|
|
1352
|
-
}[];
|
|
1353
|
-
conversation: {
|
|
1354
|
-
/** Default agent assigned to the conversation(s) */
|
|
1355
|
-
$agent: string;
|
|
1356
|
-
/** Customer this conversation is with */
|
|
1357
|
-
$customer: string;
|
|
1358
|
-
/** Initial contexts to load when starting the conversation */
|
|
1359
|
-
initialContexts?: string[] | undefined;
|
|
1360
|
-
environment: "phone" | "email" | "web";
|
|
1361
|
-
environmentProps?: {
|
|
1362
|
-
/** HTML Subject of the conversation */
|
|
1363
|
-
subject?: string | undefined;
|
|
1364
|
-
/** Used to sync email messages with the conversation */
|
|
1365
|
-
platformEmailThreadId?: string | undefined;
|
|
1366
|
-
} | undefined;
|
|
1367
|
-
/** Whether the conversation is locked or not */
|
|
1368
|
-
locked?: (boolean | undefined) | null;
|
|
1369
|
-
/** Why this conversation was locked */
|
|
1370
|
-
lockedReason?: (string | undefined) | null;
|
|
1371
|
-
/** Number attempts made until conversation is locked */
|
|
1372
|
-
lockAttempts?: (number | undefined) | null;
|
|
1373
|
-
/** What personaId/phone/email was forwarded */
|
|
1374
|
-
forwardedTo?: (string | undefined) | null;
|
|
1375
|
-
/** Datetime ISO 8601 timestamp when persona was forwarded */
|
|
1376
|
-
forwarded?: (string | undefined) | null;
|
|
1377
|
-
forwardNote?: (string | undefined) | null;
|
|
1378
|
-
/** Detected intent of conversation */
|
|
1379
|
-
intent?: (string | undefined) | null;
|
|
1380
|
-
/** Confidence score of the assigned intent */
|
|
1381
|
-
intentScore?: (number | undefined) | null;
|
|
1382
|
-
anticipate?: {
|
|
1383
|
-
/** Determines the runtime to address the next response */
|
|
1384
|
-
type: "did" | "literal" | "context";
|
|
1385
|
-
slots: {
|
|
1386
|
-
[x: string]: any[];
|
|
1387
|
-
};
|
|
1388
|
-
/** For type 'did' */
|
|
1389
|
-
did?: string | undefined;
|
|
1390
|
-
/** For literal keywords, this map helps point which slot the keyword matches to */
|
|
1391
|
-
map?: {
|
|
1392
|
-
slot: string;
|
|
1393
|
-
keywords: string[];
|
|
1394
|
-
}[] | undefined;
|
|
1395
|
-
} | undefined;
|
|
1396
|
-
};
|
|
1397
|
-
context?: any;
|
|
1398
|
-
message: {
|
|
1399
|
-
/** Unique ID for the message */
|
|
1400
|
-
id: string;
|
|
1401
|
-
role: "agent" | "customer" | "system";
|
|
1402
|
-
content: string;
|
|
1403
|
-
/** Datetime ISO 8601 timestamp */
|
|
1404
|
-
time: string;
|
|
1405
|
-
name?: string | undefined;
|
|
1406
|
-
/** Datetime ISO 8601 timestamp */
|
|
1407
|
-
scheduled?: string | undefined;
|
|
1408
|
-
/** The context generated from the message */
|
|
1409
|
-
context?: any | undefined;
|
|
1410
|
-
/** Detected intent */
|
|
1411
|
-
intent?: (string | undefined) | null;
|
|
1412
|
-
/** Confidence score of the assigned intent */
|
|
1413
|
-
intentScore?: (number | null) | undefined;
|
|
1414
|
-
/** How long to delay the message manually in seconds */
|
|
1415
|
-
delayInSeconds?: (number | null) | undefined;
|
|
1416
|
-
};
|
|
1417
|
-
agent: {
|
|
1418
|
-
deployed?: {
|
|
1419
|
-
/** Web URL for agent */
|
|
1420
|
-
web?: string | undefined;
|
|
1421
|
-
/** Phone number for agent */
|
|
1422
|
-
phone?: string | undefined;
|
|
1423
|
-
/** Email address for agent */
|
|
1424
|
-
email?: string | undefined;
|
|
1425
|
-
} | undefined;
|
|
1426
|
-
img?: (string | null) | undefined;
|
|
1427
|
-
/** Agent first name */
|
|
1428
|
-
firstName?: string | undefined;
|
|
1429
|
-
/** Agent last name */
|
|
1430
|
-
lastName?: string | undefined;
|
|
1431
|
-
/** Agent is inactive */
|
|
1432
|
-
inactive?: boolean | undefined;
|
|
1433
|
-
/** Programmable phone number */
|
|
1434
|
-
programmablePhoneNumber?: string | undefined;
|
|
1435
|
-
/** Programmable phone number SID */
|
|
1436
|
-
programmablePhoneNumberSid?: string | undefined;
|
|
1437
|
-
/** Email address from Scout9 gmail subdomain */
|
|
1438
|
-
programmableEmail?: string | undefined;
|
|
1439
|
-
/** Email address to forward to */
|
|
1440
|
-
forwardEmail?: string | undefined;
|
|
1441
|
-
/** Phone number to forward to */
|
|
1442
|
-
forwardPhone?: string | undefined;
|
|
1443
|
-
/** Agent title */
|
|
1444
|
-
title?: string;
|
|
1445
|
-
/** Unique ID for agent */
|
|
1446
|
-
id: string;
|
|
1447
|
-
};
|
|
1448
|
-
customer: {
|
|
1449
|
-
firstName?: string | undefined;
|
|
1450
|
-
lastName?: string | undefined;
|
|
1451
|
-
name: string;
|
|
1452
|
-
email?: (string | null) | undefined;
|
|
1453
|
-
phone?: (string | null) | undefined;
|
|
1454
|
-
img?: (string | null) | undefined;
|
|
1455
|
-
neighborhood?: (string | null) | undefined;
|
|
1456
|
-
city?: (string | null) | undefined;
|
|
1457
|
-
country?: (string | null) | undefined;
|
|
1458
|
-
line1?: (string | null) | undefined;
|
|
1459
|
-
line2?: (string | null) | undefined;
|
|
1460
|
-
postal_code?: (string | null) | undefined;
|
|
1461
|
-
state?: (string | null) | undefined;
|
|
1462
|
-
town?: (string | null) | undefined;
|
|
1463
|
-
joined?: (string | null) | undefined;
|
|
1464
|
-
stripe?: (string | null) | undefined;
|
|
1465
|
-
stripeDev?: (string | null) | undefined;
|
|
1466
|
-
};
|
|
1467
|
-
intent: {
|
|
1468
|
-
current: string | null;
|
|
1469
|
-
flow: string[];
|
|
1470
|
-
initial: string | null;
|
|
1471
|
-
};
|
|
1472
|
-
stagnationCount: number;
|
|
1473
|
-
/** Any developer notes to provide */
|
|
1474
|
-
note?: string | undefined;
|
|
1475
|
-
}, ...args_1: unknown[]) => Promise<{
|
|
1476
|
-
/** Forward input information of a conversation */
|
|
1477
|
-
forward?: (boolean | string | {
|
|
1478
|
-
to?: string | undefined;
|
|
1479
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1480
|
-
/** Note to provide to the agent */
|
|
1481
|
-
note?: string | undefined;
|
|
1482
|
-
}) | undefined;
|
|
1483
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1484
|
-
forwardNote?: string | undefined;
|
|
1485
|
-
instructions?: (string | {
|
|
1486
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1487
|
-
id?: string | undefined;
|
|
1488
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1489
|
-
persist?: boolean | undefined;
|
|
1490
|
-
content: string;
|
|
1491
|
-
} | string[] | {
|
|
1492
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1493
|
-
id?: string | undefined;
|
|
1494
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1495
|
-
persist?: boolean | undefined;
|
|
1496
|
-
content: string;
|
|
1497
|
-
}[]) | undefined;
|
|
1498
|
-
removeInstructions?: string[] | undefined;
|
|
1499
|
-
message?: string | undefined;
|
|
1500
|
-
secondsDelay?: number | undefined;
|
|
1501
|
-
scheduled?: number | undefined;
|
|
1502
|
-
contextUpsert?: {
|
|
1503
|
-
[x: string]: any;
|
|
1504
|
-
} | undefined;
|
|
1505
|
-
resetIntent?: boolean | undefined;
|
|
1506
|
-
followup?: ({
|
|
1507
|
-
scheduled: number;
|
|
1508
|
-
cancelIf?: {
|
|
1509
|
-
[x: string]: any;
|
|
1510
|
-
} | undefined;
|
|
1511
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1512
|
-
overrideLock?: boolean | undefined;
|
|
1513
|
-
/** Manual message sent to client */
|
|
1514
|
-
message: string;
|
|
1515
|
-
} | {
|
|
1516
|
-
scheduled: number;
|
|
1517
|
-
cancelIf?: {
|
|
1518
|
-
[x: string]: any;
|
|
1519
|
-
} | undefined;
|
|
1520
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1521
|
-
overrideLock?: boolean | undefined;
|
|
1522
|
-
instructions: string | {
|
|
1523
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1524
|
-
id?: string | undefined;
|
|
1525
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1526
|
-
persist?: boolean | undefined;
|
|
1527
|
-
content: string;
|
|
1528
|
-
} | string[] | {
|
|
1529
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1530
|
-
id?: string | undefined;
|
|
1531
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1532
|
-
persist?: boolean | undefined;
|
|
1533
|
-
content: string;
|
|
1534
|
-
}[];
|
|
1535
|
-
}) | undefined;
|
|
1536
|
-
anticipate?: ({
|
|
1537
|
-
did: string;
|
|
1538
|
-
yes: {
|
|
1539
|
-
/** Forward input information of a conversation */
|
|
1540
|
-
forward?: (boolean | string | {
|
|
1541
|
-
to?: string | undefined;
|
|
1542
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1543
|
-
/** Note to provide to the agent */
|
|
1544
|
-
note?: string | undefined;
|
|
1545
|
-
}) | undefined;
|
|
1546
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1547
|
-
forwardNote?: string | undefined;
|
|
1548
|
-
instructions?: (string | {
|
|
1549
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1550
|
-
id?: string | undefined;
|
|
1551
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1552
|
-
persist?: boolean | undefined;
|
|
1553
|
-
content: string;
|
|
1554
|
-
} | string[] | {
|
|
1555
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1556
|
-
id?: string | undefined;
|
|
1557
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1558
|
-
persist?: boolean | undefined;
|
|
1559
|
-
content: string;
|
|
1560
|
-
}[]) | undefined;
|
|
1561
|
-
removeInstructions?: string[] | undefined;
|
|
1562
|
-
message?: string | undefined;
|
|
1563
|
-
secondsDelay?: number | undefined;
|
|
1564
|
-
scheduled?: number | undefined;
|
|
1565
|
-
contextUpsert?: {
|
|
1566
|
-
[x: string]: any;
|
|
1567
|
-
} | undefined;
|
|
1568
|
-
resetIntent?: boolean | undefined;
|
|
1569
|
-
followup?: ({
|
|
1570
|
-
scheduled: number;
|
|
1571
|
-
cancelIf?: {
|
|
1572
|
-
[x: string]: any;
|
|
1573
|
-
} | undefined;
|
|
1574
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1575
|
-
overrideLock?: boolean | undefined;
|
|
1576
|
-
/** Manual message sent to client */
|
|
1577
|
-
message: string;
|
|
1578
|
-
} | {
|
|
1579
|
-
scheduled: number;
|
|
1580
|
-
cancelIf?: {
|
|
1581
|
-
[x: string]: any;
|
|
1582
|
-
} | undefined;
|
|
1583
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1584
|
-
overrideLock?: boolean | undefined;
|
|
1585
|
-
instructions: string | {
|
|
1586
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1587
|
-
id?: string | undefined;
|
|
1588
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1589
|
-
persist?: boolean | undefined;
|
|
1590
|
-
content: string;
|
|
1591
|
-
} | string[] | {
|
|
1592
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1593
|
-
id?: string | undefined;
|
|
1594
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1595
|
-
persist?: boolean | undefined;
|
|
1596
|
-
content: string;
|
|
1597
|
-
}[];
|
|
1598
|
-
}) | undefined;
|
|
1599
|
-
};
|
|
1600
|
-
no: {
|
|
1601
|
-
/** Forward input information of a conversation */
|
|
1602
|
-
forward?: (boolean | string | {
|
|
1603
|
-
to?: string | undefined;
|
|
1604
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1605
|
-
/** Note to provide to the agent */
|
|
1606
|
-
note?: string | undefined;
|
|
1607
|
-
}) | undefined;
|
|
1608
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1609
|
-
forwardNote?: string | undefined;
|
|
1610
|
-
instructions?: (string | {
|
|
1611
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1612
|
-
id?: string | undefined;
|
|
1613
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1614
|
-
persist?: boolean | undefined;
|
|
1615
|
-
content: string;
|
|
1616
|
-
} | string[] | {
|
|
1617
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1618
|
-
id?: string | undefined;
|
|
1619
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1620
|
-
persist?: boolean | undefined;
|
|
1621
|
-
content: string;
|
|
1622
|
-
}[]) | undefined;
|
|
1623
|
-
removeInstructions?: string[] | undefined;
|
|
1624
|
-
message?: string | undefined;
|
|
1625
|
-
secondsDelay?: number | undefined;
|
|
1626
|
-
scheduled?: number | undefined;
|
|
1627
|
-
contextUpsert?: {
|
|
1628
|
-
[x: string]: any;
|
|
1629
|
-
} | undefined;
|
|
1630
|
-
resetIntent?: boolean | undefined;
|
|
1631
|
-
followup?: ({
|
|
1632
|
-
scheduled: number;
|
|
1633
|
-
cancelIf?: {
|
|
1634
|
-
[x: string]: any;
|
|
1635
|
-
} | undefined;
|
|
1636
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1637
|
-
overrideLock?: boolean | undefined;
|
|
1638
|
-
/** Manual message sent to client */
|
|
1639
|
-
message: string;
|
|
1640
|
-
} | {
|
|
1641
|
-
scheduled: number;
|
|
1642
|
-
cancelIf?: {
|
|
1643
|
-
[x: string]: any;
|
|
1644
|
-
} | undefined;
|
|
1645
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1646
|
-
overrideLock?: boolean | undefined;
|
|
1647
|
-
instructions: string | {
|
|
1648
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1649
|
-
id?: string | undefined;
|
|
1650
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1651
|
-
persist?: boolean | undefined;
|
|
1652
|
-
content: string;
|
|
1653
|
-
} | string[] | {
|
|
1654
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1655
|
-
id?: string | undefined;
|
|
1656
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1657
|
-
persist?: boolean | undefined;
|
|
1658
|
-
content: string;
|
|
1659
|
-
}[];
|
|
1660
|
-
}) | undefined;
|
|
1661
|
-
};
|
|
1662
|
-
} | {
|
|
1663
|
-
/** Forward input information of a conversation */
|
|
1664
|
-
forward?: (boolean | string | {
|
|
1665
|
-
to?: string | undefined;
|
|
1666
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1667
|
-
/** Note to provide to the agent */
|
|
1668
|
-
note?: string | undefined;
|
|
1669
|
-
}) | undefined;
|
|
1670
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1671
|
-
forwardNote?: string | undefined;
|
|
1672
|
-
instructions?: (string | {
|
|
1673
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1674
|
-
id?: string | undefined;
|
|
1675
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1676
|
-
persist?: boolean | undefined;
|
|
1677
|
-
content: string;
|
|
1678
|
-
} | string[] | {
|
|
1679
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1680
|
-
id?: string | undefined;
|
|
1681
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1682
|
-
persist?: boolean | undefined;
|
|
1683
|
-
content: string;
|
|
1684
|
-
}[]) | undefined;
|
|
1685
|
-
removeInstructions?: string[] | undefined;
|
|
1686
|
-
message?: string | undefined;
|
|
1687
|
-
secondsDelay?: number | undefined;
|
|
1688
|
-
scheduled?: number | undefined;
|
|
1689
|
-
contextUpsert?: {
|
|
1690
|
-
[x: string]: any;
|
|
1691
|
-
} | undefined;
|
|
1692
|
-
resetIntent?: boolean | undefined;
|
|
1693
|
-
followup?: ({
|
|
1694
|
-
scheduled: number;
|
|
1695
|
-
cancelIf?: {
|
|
1696
|
-
[x: string]: any;
|
|
1697
|
-
} | undefined;
|
|
1698
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1699
|
-
overrideLock?: boolean | undefined;
|
|
1700
|
-
/** Manual message sent to client */
|
|
1701
|
-
message: string;
|
|
1702
|
-
} | {
|
|
1703
|
-
scheduled: number;
|
|
1704
|
-
cancelIf?: {
|
|
1705
|
-
[x: string]: any;
|
|
1706
|
-
} | undefined;
|
|
1707
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1708
|
-
overrideLock?: boolean | undefined;
|
|
1709
|
-
instructions: string | {
|
|
1710
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1711
|
-
id?: string | undefined;
|
|
1712
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1713
|
-
persist?: boolean | undefined;
|
|
1714
|
-
content: string;
|
|
1715
|
-
} | string[] | {
|
|
1716
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1717
|
-
id?: string | undefined;
|
|
1718
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1719
|
-
persist?: boolean | undefined;
|
|
1720
|
-
content: string;
|
|
1721
|
-
}[];
|
|
1722
|
-
}) | undefined;
|
|
1723
|
-
keywords: string[];
|
|
1724
|
-
}[]) | undefined;
|
|
1725
|
-
} | {
|
|
1726
|
-
/** Forward input information of a conversation */
|
|
1727
|
-
forward?: (boolean | string | {
|
|
1728
|
-
to?: string | undefined;
|
|
1729
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1730
|
-
/** Note to provide to the agent */
|
|
1731
|
-
note?: string | undefined;
|
|
1732
|
-
}) | undefined;
|
|
1733
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1734
|
-
forwardNote?: string | undefined;
|
|
1735
|
-
instructions?: (string | {
|
|
1736
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1737
|
-
id?: string | undefined;
|
|
1738
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1739
|
-
persist?: boolean | undefined;
|
|
1740
|
-
content: string;
|
|
1741
|
-
} | string[] | {
|
|
1742
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1743
|
-
id?: string | undefined;
|
|
1744
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1745
|
-
persist?: boolean | undefined;
|
|
1746
|
-
content: string;
|
|
1747
|
-
}[]) | undefined;
|
|
1748
|
-
removeInstructions?: string[] | undefined;
|
|
1749
|
-
message?: string | undefined;
|
|
1750
|
-
secondsDelay?: number | undefined;
|
|
1751
|
-
scheduled?: number | undefined;
|
|
1752
|
-
contextUpsert?: {
|
|
1753
|
-
[x: string]: any;
|
|
1754
|
-
} | undefined;
|
|
1755
|
-
resetIntent?: boolean | undefined;
|
|
1756
|
-
followup?: ({
|
|
1757
|
-
scheduled: number;
|
|
1758
|
-
cancelIf?: {
|
|
1759
|
-
[x: string]: any;
|
|
1760
|
-
} | undefined;
|
|
1761
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1762
|
-
overrideLock?: boolean | undefined;
|
|
1763
|
-
/** Manual message sent to client */
|
|
1764
|
-
message: string;
|
|
1765
|
-
} | {
|
|
1766
|
-
scheduled: number;
|
|
1767
|
-
cancelIf?: {
|
|
1768
|
-
[x: string]: any;
|
|
1769
|
-
} | undefined;
|
|
1770
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1771
|
-
overrideLock?: boolean | undefined;
|
|
1772
|
-
instructions: string | {
|
|
1773
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1774
|
-
id?: string | undefined;
|
|
1775
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1776
|
-
persist?: boolean | undefined;
|
|
1777
|
-
content: string;
|
|
1778
|
-
} | string[] | {
|
|
1779
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1780
|
-
id?: string | undefined;
|
|
1781
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1782
|
-
persist?: boolean | undefined;
|
|
1783
|
-
content: string;
|
|
1784
|
-
}[];
|
|
1785
|
-
}) | undefined;
|
|
1786
|
-
anticipate?: ({
|
|
1787
|
-
did: string;
|
|
1788
|
-
yes: {
|
|
1789
|
-
/** Forward input information of a conversation */
|
|
1790
|
-
forward?: (boolean | string | {
|
|
1791
|
-
to?: string | undefined;
|
|
1792
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1793
|
-
/** Note to provide to the agent */
|
|
1794
|
-
note?: string | undefined;
|
|
1795
|
-
}) | undefined;
|
|
1796
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1797
|
-
forwardNote?: string | undefined;
|
|
1798
|
-
instructions?: (string | {
|
|
1799
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1800
|
-
id?: string | undefined;
|
|
1801
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1802
|
-
persist?: boolean | undefined;
|
|
1803
|
-
content: string;
|
|
1804
|
-
} | string[] | {
|
|
1805
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1806
|
-
id?: string | undefined;
|
|
1807
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1808
|
-
persist?: boolean | undefined;
|
|
1809
|
-
content: string;
|
|
1810
|
-
}[]) | undefined;
|
|
1811
|
-
removeInstructions?: string[] | undefined;
|
|
1812
|
-
message?: string | undefined;
|
|
1813
|
-
secondsDelay?: number | undefined;
|
|
1814
|
-
scheduled?: number | undefined;
|
|
1815
|
-
contextUpsert?: {
|
|
1816
|
-
[x: string]: any;
|
|
1817
|
-
} | undefined;
|
|
1818
|
-
resetIntent?: boolean | undefined;
|
|
1819
|
-
followup?: ({
|
|
1820
|
-
scheduled: number;
|
|
1821
|
-
cancelIf?: {
|
|
1822
|
-
[x: string]: any;
|
|
1823
|
-
} | undefined;
|
|
1824
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1825
|
-
overrideLock?: boolean | undefined;
|
|
1826
|
-
/** Manual message sent to client */
|
|
1827
|
-
message: string;
|
|
1828
|
-
} | {
|
|
1829
|
-
scheduled: number;
|
|
1830
|
-
cancelIf?: {
|
|
1831
|
-
[x: string]: any;
|
|
1832
|
-
} | undefined;
|
|
1833
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1834
|
-
overrideLock?: boolean | undefined;
|
|
1835
|
-
instructions: string | {
|
|
1836
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1837
|
-
id?: string | undefined;
|
|
1838
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1839
|
-
persist?: boolean | undefined;
|
|
1840
|
-
content: string;
|
|
1841
|
-
} | string[] | {
|
|
1842
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1843
|
-
id?: string | undefined;
|
|
1844
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1845
|
-
persist?: boolean | undefined;
|
|
1846
|
-
content: string;
|
|
1847
|
-
}[];
|
|
1848
|
-
}) | undefined;
|
|
1849
|
-
};
|
|
1850
|
-
no: {
|
|
1851
|
-
/** Forward input information of a conversation */
|
|
1852
|
-
forward?: (boolean | string | {
|
|
1853
|
-
to?: string | undefined;
|
|
1854
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1855
|
-
/** Note to provide to the agent */
|
|
1856
|
-
note?: string | undefined;
|
|
1857
|
-
}) | undefined;
|
|
1858
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1859
|
-
forwardNote?: string | undefined;
|
|
1860
|
-
instructions?: (string | {
|
|
1861
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1862
|
-
id?: string | undefined;
|
|
1863
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1864
|
-
persist?: boolean | undefined;
|
|
1865
|
-
content: string;
|
|
1866
|
-
} | string[] | {
|
|
1867
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1868
|
-
id?: string | undefined;
|
|
1869
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1870
|
-
persist?: boolean | undefined;
|
|
1871
|
-
content: string;
|
|
1872
|
-
}[]) | undefined;
|
|
1873
|
-
removeInstructions?: string[] | undefined;
|
|
1874
|
-
message?: string | undefined;
|
|
1875
|
-
secondsDelay?: number | undefined;
|
|
1876
|
-
scheduled?: number | undefined;
|
|
1877
|
-
contextUpsert?: {
|
|
1878
|
-
[x: string]: any;
|
|
1879
|
-
} | undefined;
|
|
1880
|
-
resetIntent?: boolean | undefined;
|
|
1881
|
-
followup?: ({
|
|
1882
|
-
scheduled: number;
|
|
1883
|
-
cancelIf?: {
|
|
1884
|
-
[x: string]: any;
|
|
1885
|
-
} | undefined;
|
|
1886
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1887
|
-
overrideLock?: boolean | undefined;
|
|
1888
|
-
/** Manual message sent to client */
|
|
1889
|
-
message: string;
|
|
1890
|
-
} | {
|
|
1891
|
-
scheduled: number;
|
|
1892
|
-
cancelIf?: {
|
|
1893
|
-
[x: string]: any;
|
|
1894
|
-
} | undefined;
|
|
1895
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1896
|
-
overrideLock?: boolean | undefined;
|
|
1897
|
-
instructions: string | {
|
|
1898
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1899
|
-
id?: string | undefined;
|
|
1900
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1901
|
-
persist?: boolean | undefined;
|
|
1902
|
-
content: string;
|
|
1903
|
-
} | string[] | {
|
|
1904
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1905
|
-
id?: string | undefined;
|
|
1906
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1907
|
-
persist?: boolean | undefined;
|
|
1908
|
-
content: string;
|
|
1909
|
-
}[];
|
|
1910
|
-
}) | undefined;
|
|
1911
|
-
};
|
|
1912
|
-
} | {
|
|
1913
|
-
/** Forward input information of a conversation */
|
|
1914
|
-
forward?: (boolean | string | {
|
|
1915
|
-
to?: string | undefined;
|
|
1916
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1917
|
-
/** Note to provide to the agent */
|
|
1918
|
-
note?: string | undefined;
|
|
1919
|
-
}) | undefined;
|
|
1920
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1921
|
-
forwardNote?: string | undefined;
|
|
1922
|
-
instructions?: (string | {
|
|
1923
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1924
|
-
id?: string | undefined;
|
|
1925
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1926
|
-
persist?: boolean | undefined;
|
|
1927
|
-
content: string;
|
|
1928
|
-
} | string[] | {
|
|
1929
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1930
|
-
id?: string | undefined;
|
|
1931
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1932
|
-
persist?: boolean | undefined;
|
|
1933
|
-
content: string;
|
|
1934
|
-
}[]) | undefined;
|
|
1935
|
-
removeInstructions?: string[] | undefined;
|
|
1936
|
-
message?: string | undefined;
|
|
1937
|
-
secondsDelay?: number | undefined;
|
|
1938
|
-
scheduled?: number | undefined;
|
|
1939
|
-
contextUpsert?: {
|
|
1940
|
-
[x: string]: any;
|
|
1941
|
-
} | undefined;
|
|
1942
|
-
resetIntent?: boolean | undefined;
|
|
1943
|
-
followup?: ({
|
|
1944
|
-
scheduled: number;
|
|
1945
|
-
cancelIf?: {
|
|
1946
|
-
[x: string]: any;
|
|
1947
|
-
} | undefined;
|
|
1948
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1949
|
-
overrideLock?: boolean | undefined;
|
|
1950
|
-
/** Manual message sent to client */
|
|
1951
|
-
message: string;
|
|
1952
|
-
} | {
|
|
1953
|
-
scheduled: number;
|
|
1954
|
-
cancelIf?: {
|
|
1955
|
-
[x: string]: any;
|
|
1956
|
-
} | undefined;
|
|
1957
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
1958
|
-
overrideLock?: boolean | undefined;
|
|
1959
|
-
instructions: string | {
|
|
1960
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1961
|
-
id?: string | undefined;
|
|
1962
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1963
|
-
persist?: boolean | undefined;
|
|
1964
|
-
content: string;
|
|
1965
|
-
} | string[] | {
|
|
1966
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1967
|
-
id?: string | undefined;
|
|
1968
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1969
|
-
persist?: boolean | undefined;
|
|
1970
|
-
content: string;
|
|
1971
|
-
}[];
|
|
1972
|
-
}) | undefined;
|
|
1973
|
-
keywords: string[];
|
|
1974
|
-
}[]) | undefined;
|
|
1975
|
-
}[]> | ({
|
|
1976
|
-
/** Forward input information of a conversation */
|
|
1977
|
-
forward?: (boolean | string | {
|
|
1978
|
-
to?: string | undefined;
|
|
1979
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
1980
|
-
/** Note to provide to the agent */
|
|
1981
|
-
note?: string | undefined;
|
|
1982
|
-
}) | undefined;
|
|
1983
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
1984
|
-
forwardNote?: string | undefined;
|
|
1985
|
-
instructions?: (string | {
|
|
1986
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1987
|
-
id?: string | undefined;
|
|
1988
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1989
|
-
persist?: boolean | undefined;
|
|
1990
|
-
content: string;
|
|
1991
|
-
} | string[] | {
|
|
1992
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
1993
|
-
id?: string | undefined;
|
|
1994
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
1995
|
-
persist?: boolean | undefined;
|
|
1996
|
-
content: string;
|
|
1997
|
-
}[]) | undefined;
|
|
1998
|
-
removeInstructions?: string[] | undefined;
|
|
1999
|
-
message?: string | undefined;
|
|
2000
|
-
secondsDelay?: number | undefined;
|
|
2001
|
-
scheduled?: number | undefined;
|
|
2002
|
-
contextUpsert?: {
|
|
2003
|
-
[x: string]: any;
|
|
2004
|
-
} | undefined;
|
|
2005
|
-
resetIntent?: boolean | undefined;
|
|
2006
|
-
followup?: ({
|
|
2007
|
-
scheduled: number;
|
|
2008
|
-
cancelIf?: {
|
|
2009
|
-
[x: string]: any;
|
|
2010
|
-
} | undefined;
|
|
2011
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2012
|
-
overrideLock?: boolean | undefined;
|
|
2013
|
-
/** Manual message sent to client */
|
|
2014
|
-
message: string;
|
|
2015
|
-
} | {
|
|
2016
|
-
scheduled: number;
|
|
2017
|
-
cancelIf?: {
|
|
2018
|
-
[x: string]: any;
|
|
2019
|
-
} | undefined;
|
|
2020
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2021
|
-
overrideLock?: boolean | undefined;
|
|
2022
|
-
instructions: string | {
|
|
2023
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2024
|
-
id?: string | undefined;
|
|
2025
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2026
|
-
persist?: boolean | undefined;
|
|
2027
|
-
content: string;
|
|
2028
|
-
} | string[] | {
|
|
2029
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2030
|
-
id?: string | undefined;
|
|
2031
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2032
|
-
persist?: boolean | undefined;
|
|
2033
|
-
content: string;
|
|
2034
|
-
}[];
|
|
2035
|
-
}) | undefined;
|
|
2036
|
-
anticipate?: ({
|
|
2037
|
-
did: string;
|
|
2038
|
-
yes: {
|
|
2039
|
-
/** Forward input information of a conversation */
|
|
2040
|
-
forward?: (boolean | string | {
|
|
2041
|
-
to?: string | undefined;
|
|
2042
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2043
|
-
/** Note to provide to the agent */
|
|
2044
|
-
note?: string | undefined;
|
|
2045
|
-
}) | undefined;
|
|
2046
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2047
|
-
forwardNote?: string | undefined;
|
|
2048
|
-
instructions?: (string | {
|
|
2049
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2050
|
-
id?: string | undefined;
|
|
2051
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2052
|
-
persist?: boolean | undefined;
|
|
2053
|
-
content: string;
|
|
2054
|
-
} | string[] | {
|
|
2055
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2056
|
-
id?: string | undefined;
|
|
2057
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2058
|
-
persist?: boolean | undefined;
|
|
2059
|
-
content: string;
|
|
2060
|
-
}[]) | undefined;
|
|
2061
|
-
removeInstructions?: string[] | undefined;
|
|
2062
|
-
message?: string | undefined;
|
|
2063
|
-
secondsDelay?: number | undefined;
|
|
2064
|
-
scheduled?: number | undefined;
|
|
2065
|
-
contextUpsert?: {
|
|
2066
|
-
[x: string]: any;
|
|
2067
|
-
} | undefined;
|
|
2068
|
-
resetIntent?: boolean | undefined;
|
|
2069
|
-
followup?: ({
|
|
2070
|
-
scheduled: number;
|
|
2071
|
-
cancelIf?: {
|
|
2072
|
-
[x: string]: any;
|
|
2073
|
-
} | undefined;
|
|
2074
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2075
|
-
overrideLock?: boolean | undefined;
|
|
2076
|
-
/** Manual message sent to client */
|
|
2077
|
-
message: string;
|
|
2078
|
-
} | {
|
|
2079
|
-
scheduled: number;
|
|
2080
|
-
cancelIf?: {
|
|
2081
|
-
[x: string]: any;
|
|
2082
|
-
} | undefined;
|
|
2083
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2084
|
-
overrideLock?: boolean | undefined;
|
|
2085
|
-
instructions: string | {
|
|
2086
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2087
|
-
id?: string | undefined;
|
|
2088
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2089
|
-
persist?: boolean | undefined;
|
|
2090
|
-
content: string;
|
|
2091
|
-
} | string[] | {
|
|
2092
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2093
|
-
id?: string | undefined;
|
|
2094
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2095
|
-
persist?: boolean | undefined;
|
|
2096
|
-
content: string;
|
|
2097
|
-
}[];
|
|
2098
|
-
}) | undefined;
|
|
2099
|
-
};
|
|
2100
|
-
no: {
|
|
2101
|
-
/** Forward input information of a conversation */
|
|
2102
|
-
forward?: (boolean | string | {
|
|
2103
|
-
to?: string | undefined;
|
|
2104
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2105
|
-
/** Note to provide to the agent */
|
|
2106
|
-
note?: string | undefined;
|
|
2107
|
-
}) | undefined;
|
|
2108
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2109
|
-
forwardNote?: string | undefined;
|
|
2110
|
-
instructions?: (string | {
|
|
2111
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2112
|
-
id?: string | undefined;
|
|
2113
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2114
|
-
persist?: boolean | undefined;
|
|
2115
|
-
content: string;
|
|
2116
|
-
} | string[] | {
|
|
2117
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2118
|
-
id?: string | undefined;
|
|
2119
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2120
|
-
persist?: boolean | undefined;
|
|
2121
|
-
content: string;
|
|
2122
|
-
}[]) | undefined;
|
|
2123
|
-
removeInstructions?: string[] | undefined;
|
|
2124
|
-
message?: string | undefined;
|
|
2125
|
-
secondsDelay?: number | undefined;
|
|
2126
|
-
scheduled?: number | undefined;
|
|
2127
|
-
contextUpsert?: {
|
|
2128
|
-
[x: string]: any;
|
|
2129
|
-
} | undefined;
|
|
2130
|
-
resetIntent?: boolean | undefined;
|
|
2131
|
-
followup?: ({
|
|
2132
|
-
scheduled: number;
|
|
2133
|
-
cancelIf?: {
|
|
2134
|
-
[x: string]: any;
|
|
2135
|
-
} | undefined;
|
|
2136
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2137
|
-
overrideLock?: boolean | undefined;
|
|
2138
|
-
/** Manual message sent to client */
|
|
2139
|
-
message: string;
|
|
2140
|
-
} | {
|
|
2141
|
-
scheduled: number;
|
|
2142
|
-
cancelIf?: {
|
|
2143
|
-
[x: string]: any;
|
|
2144
|
-
} | undefined;
|
|
2145
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2146
|
-
overrideLock?: boolean | undefined;
|
|
2147
|
-
instructions: string | {
|
|
2148
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2149
|
-
id?: string | undefined;
|
|
2150
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2151
|
-
persist?: boolean | undefined;
|
|
2152
|
-
content: string;
|
|
2153
|
-
} | string[] | {
|
|
2154
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2155
|
-
id?: string | undefined;
|
|
2156
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2157
|
-
persist?: boolean | undefined;
|
|
2158
|
-
content: string;
|
|
2159
|
-
}[];
|
|
2160
|
-
}) | undefined;
|
|
2161
|
-
};
|
|
2162
|
-
} | {
|
|
2163
|
-
/** Forward input information of a conversation */
|
|
2164
|
-
forward?: (boolean | string | {
|
|
2165
|
-
to?: string | undefined;
|
|
2166
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2167
|
-
/** Note to provide to the agent */
|
|
2168
|
-
note?: string | undefined;
|
|
2169
|
-
}) | undefined;
|
|
2170
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2171
|
-
forwardNote?: string | undefined;
|
|
2172
|
-
instructions?: (string | {
|
|
2173
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2174
|
-
id?: string | undefined;
|
|
2175
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2176
|
-
persist?: boolean | undefined;
|
|
2177
|
-
content: string;
|
|
2178
|
-
} | string[] | {
|
|
2179
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2180
|
-
id?: string | undefined;
|
|
2181
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2182
|
-
persist?: boolean | undefined;
|
|
2183
|
-
content: string;
|
|
2184
|
-
}[]) | undefined;
|
|
2185
|
-
removeInstructions?: string[] | undefined;
|
|
2186
|
-
message?: string | undefined;
|
|
2187
|
-
secondsDelay?: number | undefined;
|
|
2188
|
-
scheduled?: number | undefined;
|
|
2189
|
-
contextUpsert?: {
|
|
2190
|
-
[x: string]: any;
|
|
2191
|
-
} | undefined;
|
|
2192
|
-
resetIntent?: boolean | undefined;
|
|
2193
|
-
followup?: ({
|
|
2194
|
-
scheduled: number;
|
|
2195
|
-
cancelIf?: {
|
|
2196
|
-
[x: string]: any;
|
|
2197
|
-
} | undefined;
|
|
2198
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2199
|
-
overrideLock?: boolean | undefined;
|
|
2200
|
-
/** Manual message sent to client */
|
|
2201
|
-
message: string;
|
|
2202
|
-
} | {
|
|
2203
|
-
scheduled: number;
|
|
2204
|
-
cancelIf?: {
|
|
2205
|
-
[x: string]: any;
|
|
2206
|
-
} | undefined;
|
|
2207
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2208
|
-
overrideLock?: boolean | undefined;
|
|
2209
|
-
instructions: string | {
|
|
2210
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2211
|
-
id?: string | undefined;
|
|
2212
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2213
|
-
persist?: boolean | undefined;
|
|
2214
|
-
content: string;
|
|
2215
|
-
} | string[] | {
|
|
2216
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2217
|
-
id?: string | undefined;
|
|
2218
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2219
|
-
persist?: boolean | undefined;
|
|
2220
|
-
content: string;
|
|
2221
|
-
}[];
|
|
2222
|
-
}) | undefined;
|
|
2223
|
-
keywords: string[];
|
|
2224
|
-
}[]) | undefined;
|
|
2225
|
-
} | {
|
|
2226
|
-
/** Forward input information of a conversation */
|
|
2227
|
-
forward?: (boolean | string | {
|
|
2228
|
-
to?: string | undefined;
|
|
2229
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2230
|
-
/** Note to provide to the agent */
|
|
2231
|
-
note?: string | undefined;
|
|
2232
|
-
}) | undefined;
|
|
2233
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2234
|
-
forwardNote?: string | undefined;
|
|
2235
|
-
instructions?: (string | {
|
|
2236
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2237
|
-
id?: string | undefined;
|
|
2238
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2239
|
-
persist?: boolean | undefined;
|
|
2240
|
-
content: string;
|
|
2241
|
-
} | string[] | {
|
|
2242
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2243
|
-
id?: string | undefined;
|
|
2244
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2245
|
-
persist?: boolean | undefined;
|
|
2246
|
-
content: string;
|
|
2247
|
-
}[]) | undefined;
|
|
2248
|
-
removeInstructions?: string[] | undefined;
|
|
2249
|
-
message?: string | undefined;
|
|
2250
|
-
secondsDelay?: number | undefined;
|
|
2251
|
-
scheduled?: number | undefined;
|
|
2252
|
-
contextUpsert?: {
|
|
2253
|
-
[x: string]: any;
|
|
2254
|
-
} | undefined;
|
|
2255
|
-
resetIntent?: boolean | undefined;
|
|
2256
|
-
followup?: ({
|
|
2257
|
-
scheduled: number;
|
|
2258
|
-
cancelIf?: {
|
|
2259
|
-
[x: string]: any;
|
|
2260
|
-
} | undefined;
|
|
2261
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2262
|
-
overrideLock?: boolean | undefined;
|
|
2263
|
-
/** Manual message sent to client */
|
|
2264
|
-
message: string;
|
|
2265
|
-
} | {
|
|
2266
|
-
scheduled: number;
|
|
2267
|
-
cancelIf?: {
|
|
2268
|
-
[x: string]: any;
|
|
2269
|
-
} | undefined;
|
|
2270
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2271
|
-
overrideLock?: boolean | undefined;
|
|
2272
|
-
instructions: string | {
|
|
2273
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2274
|
-
id?: string | undefined;
|
|
2275
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2276
|
-
persist?: boolean | undefined;
|
|
2277
|
-
content: string;
|
|
2278
|
-
} | string[] | {
|
|
2279
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2280
|
-
id?: string | undefined;
|
|
2281
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2282
|
-
persist?: boolean | undefined;
|
|
2283
|
-
content: string;
|
|
2284
|
-
}[];
|
|
2285
|
-
}) | undefined;
|
|
2286
|
-
anticipate?: ({
|
|
2287
|
-
did: string;
|
|
2288
|
-
yes: {
|
|
2289
|
-
/** Forward input information of a conversation */
|
|
2290
|
-
forward?: (boolean | string | {
|
|
2291
|
-
to?: string | undefined;
|
|
2292
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2293
|
-
/** Note to provide to the agent */
|
|
2294
|
-
note?: string | undefined;
|
|
2295
|
-
}) | undefined;
|
|
2296
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2297
|
-
forwardNote?: string | undefined;
|
|
2298
|
-
instructions?: (string | {
|
|
2299
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2300
|
-
id?: string | undefined;
|
|
2301
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2302
|
-
persist?: boolean | undefined;
|
|
2303
|
-
content: string;
|
|
2304
|
-
} | string[] | {
|
|
2305
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2306
|
-
id?: string | undefined;
|
|
2307
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2308
|
-
persist?: boolean | undefined;
|
|
2309
|
-
content: string;
|
|
2310
|
-
}[]) | undefined;
|
|
2311
|
-
removeInstructions?: string[] | undefined;
|
|
2312
|
-
message?: string | undefined;
|
|
2313
|
-
secondsDelay?: number | undefined;
|
|
2314
|
-
scheduled?: number | undefined;
|
|
2315
|
-
contextUpsert?: {
|
|
2316
|
-
[x: string]: any;
|
|
2317
|
-
} | undefined;
|
|
2318
|
-
resetIntent?: boolean | undefined;
|
|
2319
|
-
followup?: ({
|
|
2320
|
-
scheduled: number;
|
|
2321
|
-
cancelIf?: {
|
|
2322
|
-
[x: string]: any;
|
|
2323
|
-
} | undefined;
|
|
2324
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2325
|
-
overrideLock?: boolean | undefined;
|
|
2326
|
-
/** Manual message sent to client */
|
|
2327
|
-
message: string;
|
|
2328
|
-
} | {
|
|
2329
|
-
scheduled: number;
|
|
2330
|
-
cancelIf?: {
|
|
2331
|
-
[x: string]: any;
|
|
2332
|
-
} | undefined;
|
|
2333
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2334
|
-
overrideLock?: boolean | undefined;
|
|
2335
|
-
instructions: string | {
|
|
2336
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2337
|
-
id?: string | undefined;
|
|
2338
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2339
|
-
persist?: boolean | undefined;
|
|
2340
|
-
content: string;
|
|
2341
|
-
} | string[] | {
|
|
2342
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2343
|
-
id?: string | undefined;
|
|
2344
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2345
|
-
persist?: boolean | undefined;
|
|
2346
|
-
content: string;
|
|
2347
|
-
}[];
|
|
2348
|
-
}) | undefined;
|
|
2349
|
-
};
|
|
2350
|
-
no: {
|
|
2351
|
-
/** Forward input information of a conversation */
|
|
2352
|
-
forward?: (boolean | string | {
|
|
2353
|
-
to?: string | undefined;
|
|
2354
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2355
|
-
/** Note to provide to the agent */
|
|
2356
|
-
note?: string | undefined;
|
|
2357
|
-
}) | undefined;
|
|
2358
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2359
|
-
forwardNote?: string | undefined;
|
|
2360
|
-
instructions?: (string | {
|
|
2361
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2362
|
-
id?: string | undefined;
|
|
2363
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2364
|
-
persist?: boolean | undefined;
|
|
2365
|
-
content: string;
|
|
2366
|
-
} | string[] | {
|
|
2367
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2368
|
-
id?: string | undefined;
|
|
2369
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2370
|
-
persist?: boolean | undefined;
|
|
2371
|
-
content: string;
|
|
2372
|
-
}[]) | undefined;
|
|
2373
|
-
removeInstructions?: string[] | undefined;
|
|
2374
|
-
message?: string | undefined;
|
|
2375
|
-
secondsDelay?: number | undefined;
|
|
2376
|
-
scheduled?: number | undefined;
|
|
2377
|
-
contextUpsert?: {
|
|
2378
|
-
[x: string]: any;
|
|
2379
|
-
} | undefined;
|
|
2380
|
-
resetIntent?: boolean | undefined;
|
|
2381
|
-
followup?: ({
|
|
2382
|
-
scheduled: number;
|
|
2383
|
-
cancelIf?: {
|
|
2384
|
-
[x: string]: any;
|
|
2385
|
-
} | undefined;
|
|
2386
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2387
|
-
overrideLock?: boolean | undefined;
|
|
2388
|
-
/** Manual message sent to client */
|
|
2389
|
-
message: string;
|
|
2390
|
-
} | {
|
|
2391
|
-
scheduled: number;
|
|
2392
|
-
cancelIf?: {
|
|
2393
|
-
[x: string]: any;
|
|
2394
|
-
} | undefined;
|
|
2395
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2396
|
-
overrideLock?: boolean | undefined;
|
|
2397
|
-
instructions: string | {
|
|
2398
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2399
|
-
id?: string | undefined;
|
|
2400
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2401
|
-
persist?: boolean | undefined;
|
|
2402
|
-
content: string;
|
|
2403
|
-
} | string[] | {
|
|
2404
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2405
|
-
id?: string | undefined;
|
|
2406
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2407
|
-
persist?: boolean | undefined;
|
|
2408
|
-
content: string;
|
|
2409
|
-
}[];
|
|
2410
|
-
}) | undefined;
|
|
2411
|
-
};
|
|
2412
|
-
} | {
|
|
2413
|
-
/** Forward input information of a conversation */
|
|
2414
|
-
forward?: (boolean | string | {
|
|
2415
|
-
to?: string | undefined;
|
|
2416
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2417
|
-
/** Note to provide to the agent */
|
|
2418
|
-
note?: string | undefined;
|
|
2419
|
-
}) | undefined;
|
|
2420
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2421
|
-
forwardNote?: string | undefined;
|
|
2422
|
-
instructions?: (string | {
|
|
2423
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2424
|
-
id?: string | undefined;
|
|
2425
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2426
|
-
persist?: boolean | undefined;
|
|
2427
|
-
content: string;
|
|
2428
|
-
} | string[] | {
|
|
2429
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2430
|
-
id?: string | undefined;
|
|
2431
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2432
|
-
persist?: boolean | undefined;
|
|
2433
|
-
content: string;
|
|
2434
|
-
}[]) | undefined;
|
|
2435
|
-
removeInstructions?: string[] | undefined;
|
|
2436
|
-
message?: string | undefined;
|
|
2437
|
-
secondsDelay?: number | undefined;
|
|
2438
|
-
scheduled?: number | undefined;
|
|
2439
|
-
contextUpsert?: {
|
|
2440
|
-
[x: string]: any;
|
|
2441
|
-
} | undefined;
|
|
2442
|
-
resetIntent?: boolean | undefined;
|
|
2443
|
-
followup?: ({
|
|
2444
|
-
scheduled: number;
|
|
2445
|
-
cancelIf?: {
|
|
2446
|
-
[x: string]: any;
|
|
2447
|
-
} | undefined;
|
|
2448
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2449
|
-
overrideLock?: boolean | undefined;
|
|
2450
|
-
/** Manual message sent to client */
|
|
2451
|
-
message: string;
|
|
2452
|
-
} | {
|
|
2453
|
-
scheduled: number;
|
|
2454
|
-
cancelIf?: {
|
|
2455
|
-
[x: string]: any;
|
|
2456
|
-
} | undefined;
|
|
2457
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2458
|
-
overrideLock?: boolean | undefined;
|
|
2459
|
-
instructions: string | {
|
|
2460
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2461
|
-
id?: string | undefined;
|
|
2462
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2463
|
-
persist?: boolean | undefined;
|
|
2464
|
-
content: string;
|
|
2465
|
-
} | string[] | {
|
|
2466
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2467
|
-
id?: string | undefined;
|
|
2468
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2469
|
-
persist?: boolean | undefined;
|
|
2470
|
-
content: string;
|
|
2471
|
-
}[];
|
|
2472
|
-
}) | undefined;
|
|
2473
|
-
keywords: string[];
|
|
2474
|
-
}[]) | undefined;
|
|
2475
|
-
}[]);
|
|
2476
|
-
|
|
2477
|
-
export type WorkflowResponseMessage = string | {
|
|
2478
|
-
uri: string;
|
|
2479
|
-
data?: any | undefined;
|
|
2480
|
-
headers?: {
|
|
2481
|
-
[x: string]: string;
|
|
2482
|
-
} | undefined;
|
|
2483
|
-
method?: ("GET" | "POST" | "PUT") | undefined;
|
|
2484
|
-
};
|
|
2485
|
-
|
|
2486
|
-
export type WorkflowResponseMessageApiRequest = {
|
|
2487
|
-
uri: string;
|
|
2488
|
-
data?: any | undefined;
|
|
2489
|
-
headers?: {
|
|
2490
|
-
[x: string]: string;
|
|
2491
|
-
} | undefined;
|
|
2492
|
-
method?: ("GET" | "POST" | "PUT") | undefined;
|
|
2493
|
-
};
|
|
2494
|
-
|
|
2495
|
-
export type WorkflowResponseMessageApiResponse = string | {
|
|
2496
|
-
message: string;
|
|
2497
|
-
} | {
|
|
2498
|
-
text: string;
|
|
2499
|
-
} | {
|
|
2500
|
-
data: {
|
|
2501
|
-
message: string;
|
|
2502
|
-
};
|
|
2503
|
-
} | {
|
|
2504
|
-
data: {
|
|
2505
|
-
text: string;
|
|
2506
|
-
};
|
|
2507
|
-
};
|
|
2508
|
-
|
|
2509
|
-
export type WorkflowResponse = {
|
|
2510
|
-
/** Forward input information of a conversation */
|
|
2511
|
-
forward?: (boolean | string | {
|
|
2512
|
-
to?: string | undefined;
|
|
2513
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2514
|
-
/** Note to provide to the agent */
|
|
2515
|
-
note?: string | undefined;
|
|
2516
|
-
}) | undefined;
|
|
2517
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2518
|
-
forwardNote?: string | undefined;
|
|
2519
|
-
instructions?: (string | {
|
|
2520
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2521
|
-
id?: string | undefined;
|
|
2522
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2523
|
-
persist?: boolean | undefined;
|
|
2524
|
-
content: string;
|
|
2525
|
-
} | string[] | {
|
|
2526
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2527
|
-
id?: string | undefined;
|
|
2528
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2529
|
-
persist?: boolean | undefined;
|
|
2530
|
-
content: string;
|
|
2531
|
-
}[]) | undefined;
|
|
2532
|
-
removeInstructions?: string[] | undefined;
|
|
2533
|
-
message?: string | undefined;
|
|
2534
|
-
secondsDelay?: number | undefined;
|
|
2535
|
-
scheduled?: number | undefined;
|
|
2536
|
-
contextUpsert?: {
|
|
2537
|
-
[x: string]: any;
|
|
2538
|
-
} | undefined;
|
|
2539
|
-
resetIntent?: boolean | undefined;
|
|
2540
|
-
followup?: ({
|
|
2541
|
-
scheduled: number;
|
|
2542
|
-
cancelIf?: {
|
|
2543
|
-
[x: string]: any;
|
|
2544
|
-
} | undefined;
|
|
2545
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2546
|
-
overrideLock?: boolean | undefined;
|
|
2547
|
-
/** Manual message sent to client */
|
|
2548
|
-
message: string;
|
|
2549
|
-
} | {
|
|
2550
|
-
scheduled: number;
|
|
2551
|
-
cancelIf?: {
|
|
2552
|
-
[x: string]: any;
|
|
2553
|
-
} | undefined;
|
|
2554
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2555
|
-
overrideLock?: boolean | undefined;
|
|
2556
|
-
instructions: string | {
|
|
2557
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2558
|
-
id?: string | undefined;
|
|
2559
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2560
|
-
persist?: boolean | undefined;
|
|
2561
|
-
content: string;
|
|
2562
|
-
} | string[] | {
|
|
2563
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2564
|
-
id?: string | undefined;
|
|
2565
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2566
|
-
persist?: boolean | undefined;
|
|
2567
|
-
content: string;
|
|
2568
|
-
}[];
|
|
2569
|
-
}) | undefined;
|
|
2570
|
-
anticipate?: ({
|
|
2571
|
-
did: string;
|
|
2572
|
-
yes: {
|
|
2573
|
-
/** Forward input information of a conversation */
|
|
2574
|
-
forward?: (boolean | string | {
|
|
2575
|
-
to?: string | undefined;
|
|
2576
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2577
|
-
/** Note to provide to the agent */
|
|
2578
|
-
note?: string | undefined;
|
|
2579
|
-
}) | undefined;
|
|
2580
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2581
|
-
forwardNote?: string | undefined;
|
|
2582
|
-
instructions?: (string | {
|
|
2583
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2584
|
-
id?: string | undefined;
|
|
2585
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2586
|
-
persist?: boolean | undefined;
|
|
2587
|
-
content: string;
|
|
2588
|
-
} | string[] | {
|
|
2589
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2590
|
-
id?: string | undefined;
|
|
2591
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2592
|
-
persist?: boolean | undefined;
|
|
2593
|
-
content: string;
|
|
2594
|
-
}[]) | undefined;
|
|
2595
|
-
removeInstructions?: string[] | undefined;
|
|
2596
|
-
message?: string | undefined;
|
|
2597
|
-
secondsDelay?: number | undefined;
|
|
2598
|
-
scheduled?: number | undefined;
|
|
2599
|
-
contextUpsert?: {
|
|
2600
|
-
[x: string]: any;
|
|
2601
|
-
} | undefined;
|
|
2602
|
-
resetIntent?: boolean | undefined;
|
|
2603
|
-
followup?: ({
|
|
2604
|
-
scheduled: number;
|
|
2605
|
-
cancelIf?: {
|
|
2606
|
-
[x: string]: any;
|
|
2607
|
-
} | undefined;
|
|
2608
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2609
|
-
overrideLock?: boolean | undefined;
|
|
2610
|
-
/** Manual message sent to client */
|
|
2611
|
-
message: string;
|
|
2612
|
-
} | {
|
|
2613
|
-
scheduled: number;
|
|
2614
|
-
cancelIf?: {
|
|
2615
|
-
[x: string]: any;
|
|
2616
|
-
} | undefined;
|
|
2617
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2618
|
-
overrideLock?: boolean | undefined;
|
|
2619
|
-
instructions: string | {
|
|
2620
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2621
|
-
id?: string | undefined;
|
|
2622
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2623
|
-
persist?: boolean | undefined;
|
|
2624
|
-
content: string;
|
|
2625
|
-
} | string[] | {
|
|
2626
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2627
|
-
id?: string | undefined;
|
|
2628
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2629
|
-
persist?: boolean | undefined;
|
|
2630
|
-
content: string;
|
|
2631
|
-
}[];
|
|
2632
|
-
}) | undefined;
|
|
2633
|
-
};
|
|
2634
|
-
no: {
|
|
2635
|
-
/** Forward input information of a conversation */
|
|
2636
|
-
forward?: (boolean | string | {
|
|
2637
|
-
to?: string | undefined;
|
|
2638
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2639
|
-
/** Note to provide to the agent */
|
|
2640
|
-
note?: string | undefined;
|
|
2641
|
-
}) | undefined;
|
|
2642
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2643
|
-
forwardNote?: string | undefined;
|
|
2644
|
-
instructions?: (string | {
|
|
2645
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2646
|
-
id?: string | undefined;
|
|
2647
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2648
|
-
persist?: boolean | undefined;
|
|
2649
|
-
content: string;
|
|
2650
|
-
} | string[] | {
|
|
2651
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2652
|
-
id?: string | undefined;
|
|
2653
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2654
|
-
persist?: boolean | undefined;
|
|
2655
|
-
content: string;
|
|
2656
|
-
}[]) | undefined;
|
|
2657
|
-
removeInstructions?: string[] | undefined;
|
|
2658
|
-
message?: string | undefined;
|
|
2659
|
-
secondsDelay?: number | undefined;
|
|
2660
|
-
scheduled?: number | undefined;
|
|
2661
|
-
contextUpsert?: {
|
|
2662
|
-
[x: string]: any;
|
|
2663
|
-
} | undefined;
|
|
2664
|
-
resetIntent?: boolean | undefined;
|
|
2665
|
-
followup?: ({
|
|
2666
|
-
scheduled: number;
|
|
2667
|
-
cancelIf?: {
|
|
2668
|
-
[x: string]: any;
|
|
2669
|
-
} | undefined;
|
|
2670
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2671
|
-
overrideLock?: boolean | undefined;
|
|
2672
|
-
/** Manual message sent to client */
|
|
2673
|
-
message: string;
|
|
2674
|
-
} | {
|
|
2675
|
-
scheduled: number;
|
|
2676
|
-
cancelIf?: {
|
|
2677
|
-
[x: string]: any;
|
|
2678
|
-
} | undefined;
|
|
2679
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2680
|
-
overrideLock?: boolean | undefined;
|
|
2681
|
-
instructions: string | {
|
|
2682
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2683
|
-
id?: string | undefined;
|
|
2684
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2685
|
-
persist?: boolean | undefined;
|
|
2686
|
-
content: string;
|
|
2687
|
-
} | string[] | {
|
|
2688
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2689
|
-
id?: string | undefined;
|
|
2690
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2691
|
-
persist?: boolean | undefined;
|
|
2692
|
-
content: string;
|
|
2693
|
-
}[];
|
|
2694
|
-
}) | undefined;
|
|
2695
|
-
};
|
|
2696
|
-
} | {
|
|
2697
|
-
/** Forward input information of a conversation */
|
|
2698
|
-
forward?: (boolean | string | {
|
|
2699
|
-
to?: string | undefined;
|
|
2700
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2701
|
-
/** Note to provide to the agent */
|
|
2702
|
-
note?: string | undefined;
|
|
2703
|
-
}) | undefined;
|
|
2704
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2705
|
-
forwardNote?: string | undefined;
|
|
2706
|
-
instructions?: (string | {
|
|
2707
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2708
|
-
id?: string | undefined;
|
|
2709
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2710
|
-
persist?: boolean | undefined;
|
|
2711
|
-
content: string;
|
|
2712
|
-
} | string[] | {
|
|
2713
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2714
|
-
id?: string | undefined;
|
|
2715
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2716
|
-
persist?: boolean | undefined;
|
|
2717
|
-
content: string;
|
|
2718
|
-
}[]) | undefined;
|
|
2719
|
-
removeInstructions?: string[] | undefined;
|
|
2720
|
-
message?: string | undefined;
|
|
2721
|
-
secondsDelay?: number | undefined;
|
|
2722
|
-
scheduled?: number | undefined;
|
|
2723
|
-
contextUpsert?: {
|
|
2724
|
-
[x: string]: any;
|
|
2725
|
-
} | undefined;
|
|
2726
|
-
resetIntent?: boolean | undefined;
|
|
2727
|
-
followup?: ({
|
|
2728
|
-
scheduled: number;
|
|
2729
|
-
cancelIf?: {
|
|
2730
|
-
[x: string]: any;
|
|
2731
|
-
} | undefined;
|
|
2732
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2733
|
-
overrideLock?: boolean | undefined;
|
|
2734
|
-
/** Manual message sent to client */
|
|
2735
|
-
message: string;
|
|
2736
|
-
} | {
|
|
2737
|
-
scheduled: number;
|
|
2738
|
-
cancelIf?: {
|
|
2739
|
-
[x: string]: any;
|
|
2740
|
-
} | undefined;
|
|
2741
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2742
|
-
overrideLock?: boolean | undefined;
|
|
2743
|
-
instructions: string | {
|
|
2744
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2745
|
-
id?: string | undefined;
|
|
2746
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2747
|
-
persist?: boolean | undefined;
|
|
2748
|
-
content: string;
|
|
2749
|
-
} | string[] | {
|
|
2750
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2751
|
-
id?: string | undefined;
|
|
2752
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2753
|
-
persist?: boolean | undefined;
|
|
2754
|
-
content: string;
|
|
2755
|
-
}[];
|
|
2756
|
-
}) | undefined;
|
|
2757
|
-
keywords: string[];
|
|
2758
|
-
}[]) | undefined;
|
|
2759
|
-
} | {
|
|
2760
|
-
/** Forward input information of a conversation */
|
|
2761
|
-
forward?: (boolean | string | {
|
|
2762
|
-
to?: string | undefined;
|
|
2763
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2764
|
-
/** Note to provide to the agent */
|
|
2765
|
-
note?: string | undefined;
|
|
2766
|
-
}) | undefined;
|
|
2767
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2768
|
-
forwardNote?: string | undefined;
|
|
2769
|
-
instructions?: (string | {
|
|
2770
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2771
|
-
id?: string | undefined;
|
|
2772
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2773
|
-
persist?: boolean | undefined;
|
|
2774
|
-
content: string;
|
|
2775
|
-
} | string[] | {
|
|
2776
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2777
|
-
id?: string | undefined;
|
|
2778
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2779
|
-
persist?: boolean | undefined;
|
|
2780
|
-
content: string;
|
|
2781
|
-
}[]) | undefined;
|
|
2782
|
-
removeInstructions?: string[] | undefined;
|
|
2783
|
-
message?: string | undefined;
|
|
2784
|
-
secondsDelay?: number | undefined;
|
|
2785
|
-
scheduled?: number | undefined;
|
|
2786
|
-
contextUpsert?: {
|
|
2787
|
-
[x: string]: any;
|
|
2788
|
-
} | undefined;
|
|
2789
|
-
resetIntent?: boolean | undefined;
|
|
2790
|
-
followup?: ({
|
|
2791
|
-
scheduled: number;
|
|
2792
|
-
cancelIf?: {
|
|
2793
|
-
[x: string]: any;
|
|
2794
|
-
} | undefined;
|
|
2795
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2796
|
-
overrideLock?: boolean | undefined;
|
|
2797
|
-
/** Manual message sent to client */
|
|
2798
|
-
message: string;
|
|
2799
|
-
} | {
|
|
2800
|
-
scheduled: number;
|
|
2801
|
-
cancelIf?: {
|
|
2802
|
-
[x: string]: any;
|
|
2803
|
-
} | undefined;
|
|
2804
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2805
|
-
overrideLock?: boolean | undefined;
|
|
2806
|
-
instructions: string | {
|
|
2807
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2808
|
-
id?: string | undefined;
|
|
2809
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2810
|
-
persist?: boolean | undefined;
|
|
2811
|
-
content: string;
|
|
2812
|
-
} | string[] | {
|
|
2813
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2814
|
-
id?: string | undefined;
|
|
2815
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2816
|
-
persist?: boolean | undefined;
|
|
2817
|
-
content: string;
|
|
2818
|
-
}[];
|
|
2819
|
-
}) | undefined;
|
|
2820
|
-
anticipate?: ({
|
|
2821
|
-
did: string;
|
|
2822
|
-
yes: {
|
|
2823
|
-
/** Forward input information of a conversation */
|
|
2824
|
-
forward?: (boolean | string | {
|
|
2825
|
-
to?: string | undefined;
|
|
2826
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2827
|
-
/** Note to provide to the agent */
|
|
2828
|
-
note?: string | undefined;
|
|
2829
|
-
}) | undefined;
|
|
2830
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2831
|
-
forwardNote?: string | undefined;
|
|
2832
|
-
instructions?: (string | {
|
|
2833
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2834
|
-
id?: string | undefined;
|
|
2835
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2836
|
-
persist?: boolean | undefined;
|
|
2837
|
-
content: string;
|
|
2838
|
-
} | string[] | {
|
|
2839
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2840
|
-
id?: string | undefined;
|
|
2841
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2842
|
-
persist?: boolean | undefined;
|
|
2843
|
-
content: string;
|
|
2844
|
-
}[]) | undefined;
|
|
2845
|
-
removeInstructions?: string[] | undefined;
|
|
2846
|
-
message?: string | undefined;
|
|
2847
|
-
secondsDelay?: number | undefined;
|
|
2848
|
-
scheduled?: number | undefined;
|
|
2849
|
-
contextUpsert?: {
|
|
2850
|
-
[x: string]: any;
|
|
2851
|
-
} | undefined;
|
|
2852
|
-
resetIntent?: boolean | undefined;
|
|
2853
|
-
followup?: ({
|
|
2854
|
-
scheduled: number;
|
|
2855
|
-
cancelIf?: {
|
|
2856
|
-
[x: string]: any;
|
|
2857
|
-
} | undefined;
|
|
2858
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2859
|
-
overrideLock?: boolean | undefined;
|
|
2860
|
-
/** Manual message sent to client */
|
|
2861
|
-
message: string;
|
|
2862
|
-
} | {
|
|
2863
|
-
scheduled: number;
|
|
2864
|
-
cancelIf?: {
|
|
2865
|
-
[x: string]: any;
|
|
2866
|
-
} | undefined;
|
|
2867
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2868
|
-
overrideLock?: boolean | undefined;
|
|
2869
|
-
instructions: string | {
|
|
2870
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2871
|
-
id?: string | undefined;
|
|
2872
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2873
|
-
persist?: boolean | undefined;
|
|
2874
|
-
content: string;
|
|
2875
|
-
} | string[] | {
|
|
2876
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2877
|
-
id?: string | undefined;
|
|
2878
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2879
|
-
persist?: boolean | undefined;
|
|
2880
|
-
content: string;
|
|
2881
|
-
}[];
|
|
2882
|
-
}) | undefined;
|
|
2883
|
-
};
|
|
2884
|
-
no: {
|
|
2885
|
-
/** Forward input information of a conversation */
|
|
2886
|
-
forward?: (boolean | string | {
|
|
2887
|
-
to?: string | undefined;
|
|
2888
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2889
|
-
/** Note to provide to the agent */
|
|
2890
|
-
note?: string | undefined;
|
|
2891
|
-
}) | undefined;
|
|
2892
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2893
|
-
forwardNote?: string | undefined;
|
|
2894
|
-
instructions?: (string | {
|
|
2895
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2896
|
-
id?: string | undefined;
|
|
2897
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2898
|
-
persist?: boolean | undefined;
|
|
2899
|
-
content: string;
|
|
2900
|
-
} | string[] | {
|
|
2901
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2902
|
-
id?: string | undefined;
|
|
2903
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2904
|
-
persist?: boolean | undefined;
|
|
2905
|
-
content: string;
|
|
2906
|
-
}[]) | undefined;
|
|
2907
|
-
removeInstructions?: string[] | undefined;
|
|
2908
|
-
message?: string | undefined;
|
|
2909
|
-
secondsDelay?: number | undefined;
|
|
2910
|
-
scheduled?: number | undefined;
|
|
2911
|
-
contextUpsert?: {
|
|
2912
|
-
[x: string]: any;
|
|
2913
|
-
} | undefined;
|
|
2914
|
-
resetIntent?: boolean | undefined;
|
|
2915
|
-
followup?: ({
|
|
2916
|
-
scheduled: number;
|
|
2917
|
-
cancelIf?: {
|
|
2918
|
-
[x: string]: any;
|
|
2919
|
-
} | undefined;
|
|
2920
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2921
|
-
overrideLock?: boolean | undefined;
|
|
2922
|
-
/** Manual message sent to client */
|
|
2923
|
-
message: string;
|
|
2924
|
-
} | {
|
|
2925
|
-
scheduled: number;
|
|
2926
|
-
cancelIf?: {
|
|
2927
|
-
[x: string]: any;
|
|
2928
|
-
} | undefined;
|
|
2929
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2930
|
-
overrideLock?: boolean | undefined;
|
|
2931
|
-
instructions: string | {
|
|
2932
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2933
|
-
id?: string | undefined;
|
|
2934
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2935
|
-
persist?: boolean | undefined;
|
|
2936
|
-
content: string;
|
|
2937
|
-
} | string[] | {
|
|
2938
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2939
|
-
id?: string | undefined;
|
|
2940
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2941
|
-
persist?: boolean | undefined;
|
|
2942
|
-
content: string;
|
|
2943
|
-
}[];
|
|
2944
|
-
}) | undefined;
|
|
2945
|
-
};
|
|
2946
|
-
} | {
|
|
2947
|
-
/** Forward input information of a conversation */
|
|
2948
|
-
forward?: (boolean | string | {
|
|
2949
|
-
to?: string | undefined;
|
|
2950
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
2951
|
-
/** Note to provide to the agent */
|
|
2952
|
-
note?: string | undefined;
|
|
2953
|
-
}) | undefined;
|
|
2954
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
2955
|
-
forwardNote?: string | undefined;
|
|
2956
|
-
instructions?: (string | {
|
|
2957
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2958
|
-
id?: string | undefined;
|
|
2959
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2960
|
-
persist?: boolean | undefined;
|
|
2961
|
-
content: string;
|
|
2962
|
-
} | string[] | {
|
|
2963
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2964
|
-
id?: string | undefined;
|
|
2965
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2966
|
-
persist?: boolean | undefined;
|
|
2967
|
-
content: string;
|
|
2968
|
-
}[]) | undefined;
|
|
2969
|
-
removeInstructions?: string[] | undefined;
|
|
2970
|
-
message?: string | undefined;
|
|
2971
|
-
secondsDelay?: number | undefined;
|
|
2972
|
-
scheduled?: number | undefined;
|
|
2973
|
-
contextUpsert?: {
|
|
2974
|
-
[x: string]: any;
|
|
2975
|
-
} | undefined;
|
|
2976
|
-
resetIntent?: boolean | undefined;
|
|
2977
|
-
followup?: ({
|
|
2978
|
-
scheduled: number;
|
|
2979
|
-
cancelIf?: {
|
|
2980
|
-
[x: string]: any;
|
|
2981
|
-
} | undefined;
|
|
2982
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2983
|
-
overrideLock?: boolean | undefined;
|
|
2984
|
-
/** Manual message sent to client */
|
|
2985
|
-
message: string;
|
|
2986
|
-
} | {
|
|
2987
|
-
scheduled: number;
|
|
2988
|
-
cancelIf?: {
|
|
2989
|
-
[x: string]: any;
|
|
2990
|
-
} | undefined;
|
|
2991
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
2992
|
-
overrideLock?: boolean | undefined;
|
|
2993
|
-
instructions: string | {
|
|
2994
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
2995
|
-
id?: string | undefined;
|
|
2996
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
2997
|
-
persist?: boolean | undefined;
|
|
2998
|
-
content: string;
|
|
2999
|
-
} | string[] | {
|
|
3000
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3001
|
-
id?: string | undefined;
|
|
3002
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3003
|
-
persist?: boolean | undefined;
|
|
3004
|
-
content: string;
|
|
3005
|
-
}[];
|
|
3006
|
-
}) | undefined;
|
|
3007
|
-
keywords: string[];
|
|
3008
|
-
}[]) | undefined;
|
|
3009
|
-
}[];
|
|
3010
|
-
|
|
3011
|
-
export type WorkflowResponseSlotBase = {
|
|
3012
|
-
/** Forward input information of a conversation */
|
|
3013
|
-
forward?: (boolean | string | {
|
|
3014
|
-
to?: string | undefined;
|
|
3015
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
3016
|
-
/** Note to provide to the agent */
|
|
3017
|
-
note?: string | undefined;
|
|
3018
|
-
}) | undefined;
|
|
3019
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
3020
|
-
forwardNote?: string | undefined;
|
|
3021
|
-
instructions?: (string | {
|
|
3022
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3023
|
-
id?: string | undefined;
|
|
3024
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3025
|
-
persist?: boolean | undefined;
|
|
3026
|
-
content: string;
|
|
3027
|
-
} | string[] | {
|
|
3028
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3029
|
-
id?: string | undefined;
|
|
3030
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3031
|
-
persist?: boolean | undefined;
|
|
3032
|
-
content: string;
|
|
3033
|
-
}[]) | undefined;
|
|
3034
|
-
removeInstructions?: string[] | undefined;
|
|
3035
|
-
message?: string | undefined;
|
|
3036
|
-
secondsDelay?: number | undefined;
|
|
3037
|
-
scheduled?: number | undefined;
|
|
3038
|
-
contextUpsert?: {
|
|
3039
|
-
[x: string]: any;
|
|
3040
|
-
} | undefined;
|
|
3041
|
-
resetIntent?: boolean | undefined;
|
|
3042
|
-
followup?: ({
|
|
3043
|
-
scheduled: number;
|
|
3044
|
-
cancelIf?: {
|
|
3045
|
-
[x: string]: any;
|
|
3046
|
-
} | undefined;
|
|
3047
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3048
|
-
overrideLock?: boolean | undefined;
|
|
3049
|
-
/** Manual message sent to client */
|
|
3050
|
-
message: string;
|
|
3051
|
-
} | {
|
|
3052
|
-
scheduled: number;
|
|
3053
|
-
cancelIf?: {
|
|
3054
|
-
[x: string]: any;
|
|
3055
|
-
} | undefined;
|
|
3056
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3057
|
-
overrideLock?: boolean | undefined;
|
|
3058
|
-
instructions: string | {
|
|
3059
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3060
|
-
id?: string | undefined;
|
|
3061
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3062
|
-
persist?: boolean | undefined;
|
|
3063
|
-
content: string;
|
|
3064
|
-
} | string[] | {
|
|
3065
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3066
|
-
id?: string | undefined;
|
|
3067
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3068
|
-
persist?: boolean | undefined;
|
|
3069
|
-
content: string;
|
|
3070
|
-
}[];
|
|
3071
|
-
}) | undefined;
|
|
3072
|
-
};
|
|
3073
|
-
|
|
3074
|
-
export type WorkflowResponseSlot = {
|
|
3075
|
-
/** Forward input information of a conversation */
|
|
3076
|
-
forward?: (boolean | string | {
|
|
3077
|
-
to?: string | undefined;
|
|
3078
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
3079
|
-
/** Note to provide to the agent */
|
|
3080
|
-
note?: string | undefined;
|
|
3081
|
-
}) | undefined;
|
|
3082
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
3083
|
-
forwardNote?: string | undefined;
|
|
3084
|
-
instructions?: (string | {
|
|
3085
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3086
|
-
id?: string | undefined;
|
|
3087
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3088
|
-
persist?: boolean | undefined;
|
|
3089
|
-
content: string;
|
|
3090
|
-
} | string[] | {
|
|
3091
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3092
|
-
id?: string | undefined;
|
|
3093
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3094
|
-
persist?: boolean | undefined;
|
|
3095
|
-
content: string;
|
|
3096
|
-
}[]) | undefined;
|
|
3097
|
-
removeInstructions?: string[] | undefined;
|
|
3098
|
-
message?: string | undefined;
|
|
3099
|
-
secondsDelay?: number | undefined;
|
|
3100
|
-
scheduled?: number | undefined;
|
|
3101
|
-
contextUpsert?: {
|
|
3102
|
-
[x: string]: any;
|
|
3103
|
-
} | undefined;
|
|
3104
|
-
resetIntent?: boolean | undefined;
|
|
3105
|
-
followup?: ({
|
|
3106
|
-
scheduled: number;
|
|
3107
|
-
cancelIf?: {
|
|
3108
|
-
[x: string]: any;
|
|
3109
|
-
} | undefined;
|
|
3110
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3111
|
-
overrideLock?: boolean | undefined;
|
|
3112
|
-
/** Manual message sent to client */
|
|
3113
|
-
message: string;
|
|
3114
|
-
} | {
|
|
3115
|
-
scheduled: number;
|
|
3116
|
-
cancelIf?: {
|
|
3117
|
-
[x: string]: any;
|
|
3118
|
-
} | undefined;
|
|
3119
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3120
|
-
overrideLock?: boolean | undefined;
|
|
3121
|
-
instructions: string | {
|
|
3122
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3123
|
-
id?: string | undefined;
|
|
3124
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3125
|
-
persist?: boolean | undefined;
|
|
3126
|
-
content: string;
|
|
3127
|
-
} | string[] | {
|
|
3128
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3129
|
-
id?: string | undefined;
|
|
3130
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3131
|
-
persist?: boolean | undefined;
|
|
3132
|
-
content: string;
|
|
3133
|
-
}[];
|
|
3134
|
-
}) | undefined;
|
|
3135
|
-
anticipate?: ({
|
|
3136
|
-
did: string;
|
|
3137
|
-
yes: {
|
|
3138
|
-
/** Forward input information of a conversation */
|
|
3139
|
-
forward?: (boolean | string | {
|
|
3140
|
-
to?: string | undefined;
|
|
3141
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
3142
|
-
/** Note to provide to the agent */
|
|
3143
|
-
note?: string | undefined;
|
|
3144
|
-
}) | undefined;
|
|
3145
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
3146
|
-
forwardNote?: string | undefined;
|
|
3147
|
-
instructions?: (string | {
|
|
3148
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3149
|
-
id?: string | undefined;
|
|
3150
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3151
|
-
persist?: boolean | undefined;
|
|
3152
|
-
content: string;
|
|
3153
|
-
} | string[] | {
|
|
3154
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3155
|
-
id?: string | undefined;
|
|
3156
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3157
|
-
persist?: boolean | undefined;
|
|
3158
|
-
content: string;
|
|
3159
|
-
}[]) | undefined;
|
|
3160
|
-
removeInstructions?: string[] | undefined;
|
|
3161
|
-
message?: string | undefined;
|
|
3162
|
-
secondsDelay?: number | undefined;
|
|
3163
|
-
scheduled?: number | undefined;
|
|
3164
|
-
contextUpsert?: {
|
|
3165
|
-
[x: string]: any;
|
|
3166
|
-
} | undefined;
|
|
3167
|
-
resetIntent?: boolean | undefined;
|
|
3168
|
-
followup?: ({
|
|
3169
|
-
scheduled: number;
|
|
3170
|
-
cancelIf?: {
|
|
3171
|
-
[x: string]: any;
|
|
3172
|
-
} | undefined;
|
|
3173
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3174
|
-
overrideLock?: boolean | undefined;
|
|
3175
|
-
/** Manual message sent to client */
|
|
3176
|
-
message: string;
|
|
3177
|
-
} | {
|
|
3178
|
-
scheduled: number;
|
|
3179
|
-
cancelIf?: {
|
|
3180
|
-
[x: string]: any;
|
|
3181
|
-
} | undefined;
|
|
3182
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3183
|
-
overrideLock?: boolean | undefined;
|
|
3184
|
-
instructions: string | {
|
|
3185
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3186
|
-
id?: string | undefined;
|
|
3187
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3188
|
-
persist?: boolean | undefined;
|
|
3189
|
-
content: string;
|
|
3190
|
-
} | string[] | {
|
|
3191
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3192
|
-
id?: string | undefined;
|
|
3193
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3194
|
-
persist?: boolean | undefined;
|
|
3195
|
-
content: string;
|
|
3196
|
-
}[];
|
|
3197
|
-
}) | undefined;
|
|
3198
|
-
};
|
|
3199
|
-
no: {
|
|
3200
|
-
/** Forward input information of a conversation */
|
|
3201
|
-
forward?: (boolean | string | {
|
|
3202
|
-
to?: string | undefined;
|
|
3203
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
3204
|
-
/** Note to provide to the agent */
|
|
3205
|
-
note?: string | undefined;
|
|
3206
|
-
}) | undefined;
|
|
3207
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
3208
|
-
forwardNote?: string | undefined;
|
|
3209
|
-
instructions?: (string | {
|
|
3210
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3211
|
-
id?: string | undefined;
|
|
3212
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3213
|
-
persist?: boolean | undefined;
|
|
3214
|
-
content: string;
|
|
3215
|
-
} | string[] | {
|
|
3216
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3217
|
-
id?: string | undefined;
|
|
3218
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3219
|
-
persist?: boolean | undefined;
|
|
3220
|
-
content: string;
|
|
3221
|
-
}[]) | undefined;
|
|
3222
|
-
removeInstructions?: string[] | undefined;
|
|
3223
|
-
message?: string | undefined;
|
|
3224
|
-
secondsDelay?: number | undefined;
|
|
3225
|
-
scheduled?: number | undefined;
|
|
3226
|
-
contextUpsert?: {
|
|
3227
|
-
[x: string]: any;
|
|
3228
|
-
} | undefined;
|
|
3229
|
-
resetIntent?: boolean | undefined;
|
|
3230
|
-
followup?: ({
|
|
3231
|
-
scheduled: number;
|
|
3232
|
-
cancelIf?: {
|
|
3233
|
-
[x: string]: any;
|
|
3234
|
-
} | undefined;
|
|
3235
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3236
|
-
overrideLock?: boolean | undefined;
|
|
3237
|
-
/** Manual message sent to client */
|
|
3238
|
-
message: string;
|
|
3239
|
-
} | {
|
|
3240
|
-
scheduled: number;
|
|
3241
|
-
cancelIf?: {
|
|
3242
|
-
[x: string]: any;
|
|
3243
|
-
} | undefined;
|
|
3244
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3245
|
-
overrideLock?: boolean | undefined;
|
|
3246
|
-
instructions: string | {
|
|
3247
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3248
|
-
id?: string | undefined;
|
|
3249
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3250
|
-
persist?: boolean | undefined;
|
|
3251
|
-
content: string;
|
|
3252
|
-
} | string[] | {
|
|
3253
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3254
|
-
id?: string | undefined;
|
|
3255
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3256
|
-
persist?: boolean | undefined;
|
|
3257
|
-
content: string;
|
|
3258
|
-
}[];
|
|
3259
|
-
}) | undefined;
|
|
3260
|
-
};
|
|
3261
|
-
} | {
|
|
3262
|
-
/** Forward input information of a conversation */
|
|
3263
|
-
forward?: (boolean | string | {
|
|
3264
|
-
to?: string | undefined;
|
|
3265
|
-
mode?: ("after-reply" | "immediately") | undefined;
|
|
3266
|
-
/** Note to provide to the agent */
|
|
3267
|
-
note?: string | undefined;
|
|
3268
|
-
}) | undefined;
|
|
3269
|
-
/** Note to provide to the agent, recommend using forward object api instead */
|
|
3270
|
-
forwardNote?: string | undefined;
|
|
3271
|
-
instructions?: (string | {
|
|
3272
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3273
|
-
id?: string | undefined;
|
|
3274
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3275
|
-
persist?: boolean | undefined;
|
|
3276
|
-
content: string;
|
|
3277
|
-
} | string[] | {
|
|
3278
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3279
|
-
id?: string | undefined;
|
|
3280
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3281
|
-
persist?: boolean | undefined;
|
|
3282
|
-
content: string;
|
|
3283
|
-
}[]) | undefined;
|
|
3284
|
-
removeInstructions?: string[] | undefined;
|
|
3285
|
-
message?: string | undefined;
|
|
3286
|
-
secondsDelay?: number | undefined;
|
|
3287
|
-
scheduled?: number | undefined;
|
|
3288
|
-
contextUpsert?: {
|
|
3289
|
-
[x: string]: any;
|
|
3290
|
-
} | undefined;
|
|
3291
|
-
resetIntent?: boolean | undefined;
|
|
3292
|
-
followup?: ({
|
|
3293
|
-
scheduled: number;
|
|
3294
|
-
cancelIf?: {
|
|
3295
|
-
[x: string]: any;
|
|
3296
|
-
} | undefined;
|
|
3297
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3298
|
-
overrideLock?: boolean | undefined;
|
|
3299
|
-
/** Manual message sent to client */
|
|
3300
|
-
message: string;
|
|
3301
|
-
} | {
|
|
3302
|
-
scheduled: number;
|
|
3303
|
-
cancelIf?: {
|
|
3304
|
-
[x: string]: any;
|
|
3305
|
-
} | undefined;
|
|
3306
|
-
/** This will still run even if the conversation is locked, defaults to false */
|
|
3307
|
-
overrideLock?: boolean | undefined;
|
|
3308
|
-
instructions: string | {
|
|
3309
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3310
|
-
id?: string | undefined;
|
|
3311
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3312
|
-
persist?: boolean | undefined;
|
|
3313
|
-
content: string;
|
|
3314
|
-
} | string[] | {
|
|
3315
|
-
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
3316
|
-
id?: string | undefined;
|
|
3317
|
-
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
3318
|
-
persist?: boolean | undefined;
|
|
3319
|
-
content: string;
|
|
3320
|
-
}[];
|
|
3321
|
-
}) | undefined;
|
|
3322
|
-
keywords: string[];
|
|
3323
|
-
}[]) | undefined;
|
|
3324
|
-
};
|
|
3325
|
-
|
|
3326
|
-
export type WorkflowsConfiguration = {
|
|
3327
|
-
/** Workflow id association, used to handle route params */
|
|
3328
|
-
entities: string[];
|
|
3329
|
-
entity: string;
|
|
3330
|
-
}[];
|
|
3331
|
-
|
|
3332
|
-
export type apiFunction = (args_0: {
|
|
3333
|
-
searchParams: {
|
|
3334
|
-
[x: string]: string | string[];
|
|
3335
|
-
};
|
|
3336
|
-
params: {
|
|
3337
|
-
[x: string]: string;
|
|
3338
|
-
};
|
|
3339
|
-
}, ...args_1: unknown[]) => Promise<{
|
|
3340
|
-
body?: any;
|
|
3341
|
-
init?: {
|
|
3342
|
-
status?: number | undefined;
|
|
3343
|
-
statusText?: string | undefined;
|
|
3344
|
-
headers?: any | undefined;
|
|
3345
|
-
} | undefined;
|
|
3346
|
-
}>;
|
|
3347
|
-
|
|
3348
|
-
export type deleteApiFunction = (args_0: {
|
|
3349
|
-
searchParams: {
|
|
3350
|
-
[x: string]: string | string[];
|
|
3351
|
-
};
|
|
3352
|
-
params: {
|
|
3353
|
-
[x: string]: string;
|
|
3354
|
-
};
|
|
3355
|
-
}, ...args_1: unknown[]) => Promise<{
|
|
3356
|
-
body?: any;
|
|
3357
|
-
init?: {
|
|
3358
|
-
status?: number | undefined;
|
|
3359
|
-
statusText?: string | undefined;
|
|
3360
|
-
headers?: any | undefined;
|
|
3361
|
-
} | undefined;
|
|
3362
|
-
}>;
|
|
3363
|
-
|
|
3364
|
-
export type eventResponse = {
|
|
3365
|
-
body?: any;
|
|
3366
|
-
init?: {
|
|
3367
|
-
status?: number | undefined;
|
|
3368
|
-
statusText?: string | undefined;
|
|
3369
|
-
headers?: any | undefined;
|
|
3370
|
-
} | undefined;
|
|
3371
|
-
};
|
|
3372
|
-
|
|
3373
|
-
export type getApiFunction = (args_0: {
|
|
3374
|
-
searchParams: {
|
|
3375
|
-
[x: string]: string | string[];
|
|
3376
|
-
};
|
|
3377
|
-
params: {
|
|
3378
|
-
[x: string]: string;
|
|
3379
|
-
};
|
|
3380
|
-
}, ...args_1: unknown[]) => Promise<{
|
|
3381
|
-
body?: any;
|
|
3382
|
-
init?: {
|
|
3383
|
-
status?: number | undefined;
|
|
3384
|
-
statusText?: string | undefined;
|
|
3385
|
-
headers?: any | undefined;
|
|
3386
|
-
} | undefined;
|
|
3387
|
-
}>;
|
|
3388
|
-
|
|
3389
|
-
export type queryApiFunction = (args_0: {
|
|
3390
|
-
searchParams: {
|
|
3391
|
-
[x: string]: string | string[];
|
|
3392
|
-
};
|
|
3393
|
-
params: {
|
|
3394
|
-
[x: string]: string;
|
|
3395
|
-
};
|
|
3396
|
-
}, ...args_1: unknown[]) => Promise<{
|
|
3397
|
-
body?: any;
|
|
3398
|
-
init?: {
|
|
3399
|
-
status?: number | undefined;
|
|
3400
|
-
statusText?: string | undefined;
|
|
3401
|
-
headers?: any | undefined;
|
|
3402
|
-
} | undefined;
|
|
3403
|
-
}>;
|
|
2
|
+
/**
|
|
3
|
+
* Scout9 App
|
|
4
|
+
* Application platform for managing auto reply workflows from personal communication methods
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param event - every workflow receives an event object
|
|
9
|
+
* */
|
|
10
|
+
export function run(event: WorkflowEvent, options: {
|
|
11
|
+
cwd?: string;
|
|
12
|
+
mode?: string;
|
|
13
|
+
src?: string;
|
|
14
|
+
eventSource: string;
|
|
15
|
+
}): WorkflowResponse;
|
|
16
|
+
|
|
17
|
+
export function json<T>(data: T, init?: ResponseInit | undefined): EventResponse<T>;
|
|
18
|
+
/**
|
|
19
|
+
* @param event - every workflow receives an event object
|
|
20
|
+
* */
|
|
21
|
+
export function sendEvent(event: WorkflowEvent, options: {
|
|
22
|
+
cwd?: string;
|
|
23
|
+
mode?: string;
|
|
24
|
+
src?: string;
|
|
25
|
+
eventSource: string;
|
|
26
|
+
}): WorkflowResponse;
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Utility runtime class used to guide event output
|
|
31
|
+
* */
|
|
32
|
+
export class EventResponse<T> {
|
|
33
|
+
/**
|
|
34
|
+
* Create a new EventResponse instance with a JSON body.
|
|
35
|
+
* @param body - The body of the response.
|
|
36
|
+
* @param options - Additional options for the response.
|
|
37
|
+
* @returns A new EventResponse instance.
|
|
38
|
+
*/
|
|
39
|
+
static json<T_1>(body: T_1, options?: ResponseInit): EventResponse<T_1>;
|
|
40
|
+
/**
|
|
41
|
+
* Create an EventResponse.
|
|
42
|
+
* @param body - The body of the response.
|
|
43
|
+
* @param init - Additional options for the response.
|
|
44
|
+
* @throws {Error} If the body is not a valid object.
|
|
45
|
+
*/
|
|
46
|
+
constructor(body: T, init?: ResponseInit);
|
|
47
|
+
|
|
48
|
+
private body;
|
|
49
|
+
|
|
50
|
+
private init;
|
|
51
|
+
/**
|
|
52
|
+
* Get the response object.
|
|
53
|
+
* @returns The response object.
|
|
54
|
+
*/
|
|
55
|
+
get response(): Response;
|
|
56
|
+
/**
|
|
57
|
+
* Get the data of the response.
|
|
58
|
+
* @returns The body of the response.
|
|
59
|
+
*/
|
|
60
|
+
get data(): T;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Return instructions to guide next auto reply response
|
|
66
|
+
* @param instruction - the instruction to send to the
|
|
67
|
+
* @example instruct("Ask user if they are looking to order a pizza");
|
|
68
|
+
*
|
|
69
|
+
* */
|
|
70
|
+
export const instruct: (message: string, options?: OptionsInstruct) => EventMacros;
|
|
71
|
+
/**
|
|
72
|
+
* Forwards conversation back to you or owner of workflow.
|
|
73
|
+
*
|
|
74
|
+
* Typically used when the conversation is over or user is stuck in the workflow and needs manual intervention.
|
|
75
|
+
*
|
|
76
|
+
* The provided message input gets sent to you in a sms text with some information why conversation was forwarded.
|
|
77
|
+
*
|
|
78
|
+
* Calling this method will lock the conversation and prevent auto replies from being sent to the user.
|
|
79
|
+
*
|
|
80
|
+
* @example - end of workflow
|
|
81
|
+
* forward("User wants 1 cheese pizza ready for pick");
|
|
82
|
+
*
|
|
83
|
+
* @example - broken step in workflow
|
|
84
|
+
* forward("Cannot determine what the user wants");
|
|
85
|
+
*
|
|
86
|
+
* @example - forward if user sends a message
|
|
87
|
+
* reply("Let me know if you're looking for a gutter cleaning").forward("User responded to gutter cleaning request", {mode: 'after-reply'});
|
|
88
|
+
*
|
|
89
|
+
* */
|
|
90
|
+
export const forward: (message: string, options?: OptionsForward) => EventMacros;
|
|
91
|
+
/**
|
|
92
|
+
* Manual message to send to the customer from the workflow.
|
|
93
|
+
*
|
|
94
|
+
* Typically used to return specific information to the user
|
|
95
|
+
*
|
|
96
|
+
* @example - confirming invoice
|
|
97
|
+
* reply(`So I got...\n${invoiceItems.map((item) => `${}`)}`)
|
|
98
|
+
* const msg = [
|
|
99
|
+
* 'So I got...',
|
|
100
|
+
* invoice.items.map((item) => `${item.quantity} ${item.name}`),
|
|
101
|
+
* `Total: ${invoice.totalStr}`,
|
|
102
|
+
* `\nThis look right?`
|
|
103
|
+
* ].join('\n');
|
|
104
|
+
* return reply(msg).instruct("If user confirms ask if they prefer to pay cash or credit");
|
|
105
|
+
*
|
|
106
|
+
* */
|
|
107
|
+
export const reply: (message: string, options?: OptionsReply) => EventMacros;
|
|
108
|
+
/**
|
|
109
|
+
* followup macro options
|
|
110
|
+
*/
|
|
111
|
+
export type OptionsFollowup = {
|
|
112
|
+
scheduled: Date | string;
|
|
113
|
+
cancelIf?: Record<string, any>;
|
|
114
|
+
literal?: boolean;
|
|
115
|
+
overrideLock?: boolean;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* instruct macro options
|
|
119
|
+
*/
|
|
120
|
+
export type OptionsInstruct = {
|
|
121
|
+
/**
|
|
122
|
+
* - Unique ID for the instruction, this is used to remove the instruction later
|
|
123
|
+
*/
|
|
124
|
+
id?: string;
|
|
125
|
+
/**
|
|
126
|
+
* - if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply
|
|
127
|
+
*/
|
|
128
|
+
persist?: boolean;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* reply macro options
|
|
132
|
+
*/
|
|
133
|
+
export type OptionsReply = {
|
|
134
|
+
scheduled?: Date | string;
|
|
135
|
+
delay?: number;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* forward macro options
|
|
139
|
+
*/
|
|
140
|
+
export type OptionsForward = {
|
|
141
|
+
/**
|
|
142
|
+
* - sets forward mode, defaults to "immediately". If "after-reply", the forward will be on hold until the customer responds. We recommend using "immediately" for most cases.
|
|
143
|
+
*/
|
|
144
|
+
mode?: 'after-reply' | 'immediately';
|
|
145
|
+
/**
|
|
146
|
+
* - another phone or email to forward to instead of owner
|
|
147
|
+
*/
|
|
148
|
+
to?: string;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* - Extends `WorkflowResponseSlotBase` to include keywords.
|
|
152
|
+
*/
|
|
153
|
+
export type WorkflowResponseSlotBaseWithKeywords = WorkflowResponseSlotBase & {
|
|
154
|
+
keywords: string[];
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* - Defines the overloads for the `anticipate` function.
|
|
158
|
+
*/
|
|
159
|
+
export type AnticipateFunction = (instruction: string, yes: WorkflowResponseSlotBase, no: WorkflowResponseSlotBase) => EventMacros | ((instruction: WorkflowResponseSlotBaseWithKeywords[]) => EventMacros);
|
|
160
|
+
/**
|
|
161
|
+
* Event macros to be used inside your scout9 auto reply workflows
|
|
162
|
+
*/
|
|
163
|
+
export type EventMacros = {
|
|
164
|
+
upsert: (arg0: Record<string, any>) => EventMacros;
|
|
165
|
+
followup: (arg0: string, arg1: (Date | string | OptionsFollowup)) => EventMacros;
|
|
166
|
+
anticipate: AnticipateFunction;
|
|
167
|
+
instruct: (arg0: string, arg1: OptionsInstruct | null) => EventMacros;
|
|
168
|
+
reply: (arg0: string, arg1: OptionsReply | null) => EventMacros;
|
|
169
|
+
forward: (arg0: string | null, arg1: OptionsForward | null) => EventMacros;
|
|
170
|
+
toJSON: (arg0: boolean | null) => Array<WorkflowResponseSlot>;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The `did` macro takes a given prompt and infers a binary `true` or `false` result in relation to the prompt's subject actor and the prompt's inquiry.
|
|
176
|
+
* */
|
|
177
|
+
export function did(prompt: string): Promise<boolean>;
|
|
178
|
+
|
|
179
|
+
export type ContextExampleWithTrainingData = {
|
|
180
|
+
input: string;
|
|
181
|
+
output: Record<string, any>[];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
export type ConversationContext = Record<string, any>;
|
|
186
|
+
|
|
187
|
+
export type ContextExamples = (ContextExampleWithTrainingData | ConversationContext)[];
|
|
188
|
+
export type ContextOutput = Record<string, any>;
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The `context` macro, similar to the `did` macro, takes a natural statement and checks the entire conversation state and extracts or infers a metadata composition result.
|
|
193
|
+
*
|
|
194
|
+
* @example - inferring what a user requested
|
|
195
|
+
* const response = await context(`What pizzas did the user want to order?`);
|
|
196
|
+
* {
|
|
197
|
+
* "order": {
|
|
198
|
+
* "pizzas": [
|
|
199
|
+
* {"size": "small", "toppings": ["cheese"], quantity: 1}
|
|
200
|
+
* ]
|
|
201
|
+
* }
|
|
202
|
+
* }
|
|
203
|
+
*
|
|
204
|
+
* @param prompt - Prompt to infer a context data set to use in your workflow code.
|
|
205
|
+
* @param examples - Examples to the macro to ensure a consistent data structure.
|
|
206
|
+
* */
|
|
207
|
+
export function context(prompt: string, examples?: ContextExamples): Promise<ContextOutput>;
|
|
208
|
+
|
|
209
|
+
export type Agent = {
|
|
210
|
+
deployed?: {
|
|
211
|
+
/** Web URL for agent */
|
|
212
|
+
web?: string | undefined;
|
|
213
|
+
/** Phone number for agent */
|
|
214
|
+
phone?: string | undefined;
|
|
215
|
+
/** Email address for agent */
|
|
216
|
+
email?: string | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
img?: (string | null) | undefined;
|
|
219
|
+
/** Agent first name */
|
|
220
|
+
firstName?: string | undefined;
|
|
221
|
+
/** Agent last name */
|
|
222
|
+
lastName?: string | undefined;
|
|
223
|
+
/** Agent is inactive */
|
|
224
|
+
inactive?: boolean | undefined;
|
|
225
|
+
/** Programmable phone number */
|
|
226
|
+
programmablePhoneNumber?: string | undefined;
|
|
227
|
+
/** Programmable phone number SID */
|
|
228
|
+
programmablePhoneNumberSid?: string | undefined;
|
|
229
|
+
/** Email address from Scout9 gmail subdomain */
|
|
230
|
+
programmableEmail?: string | undefined;
|
|
231
|
+
/** Email address to forward to */
|
|
232
|
+
forwardEmail?: string | undefined;
|
|
233
|
+
/** Phone number to forward to */
|
|
234
|
+
forwardPhone?: string | undefined;
|
|
235
|
+
/** Agent title */
|
|
236
|
+
title?: string;
|
|
237
|
+
/** Context of the agent */
|
|
238
|
+
context?: string;
|
|
239
|
+
includedLocations?: string[] | undefined;
|
|
240
|
+
excludedLocations?: string[] | undefined;
|
|
241
|
+
model?: ("Scout9" | "bard" | "openai");
|
|
242
|
+
transcripts?: Message[][] | undefined;
|
|
243
|
+
audios?: any[] | undefined;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export type AgentConfiguration = Agent & {id: string};
|
|
247
|
+
|
|
248
|
+
export type AgentsConfiguration = AgentConfiguration[];
|
|
249
|
+
|
|
250
|
+
export type Agents = Agent[];
|
|
251
|
+
|
|
252
|
+
export type ContextExample = ContextExampleWithTrainingData[] | ConversationContext[];
|
|
253
|
+
|
|
254
|
+
export type ConversationAnticipate = {
|
|
255
|
+
/** Determines the runtime to address the next response */
|
|
256
|
+
type: "did" | "literal" | "context";
|
|
257
|
+
slots: {
|
|
258
|
+
[x: string]: any[];
|
|
259
|
+
};
|
|
260
|
+
/** For type 'did' */
|
|
261
|
+
did?: string | undefined;
|
|
262
|
+
/** For literal keywords, this map helps point which slot the keyword matches to */
|
|
263
|
+
map?: {
|
|
264
|
+
slot: string;
|
|
265
|
+
keywords: string[];
|
|
266
|
+
}[] | undefined;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
export type Conversation = {
|
|
271
|
+
/** Default agent assigned to the conversation(s) */
|
|
272
|
+
$agent: string;
|
|
273
|
+
/** Customer this conversation is with */
|
|
274
|
+
$customer: string;
|
|
275
|
+
/** Initial contexts to load when starting the conversation */
|
|
276
|
+
initialContexts?: string[] | undefined;
|
|
277
|
+
environment: "phone" | "email" | "web";
|
|
278
|
+
environmentProps?: {
|
|
279
|
+
/** HTML Subject of the conversation */
|
|
280
|
+
subject?: string | undefined;
|
|
281
|
+
/** Used to sync email messages with the conversation */
|
|
282
|
+
platformEmailThreadId?: string | undefined;
|
|
283
|
+
} | undefined;
|
|
284
|
+
/** Whether the conversation is locked or not */
|
|
285
|
+
locked?: (boolean | undefined) | null;
|
|
286
|
+
/** Why this conversation was locked */
|
|
287
|
+
lockedReason?: (string | undefined) | null;
|
|
288
|
+
/** Number attempts made until conversation is locked */
|
|
289
|
+
lockAttempts?: (number | undefined) | null;
|
|
290
|
+
/** What personaId/phone/email was forwarded */
|
|
291
|
+
forwardedTo?: (string | undefined) | null;
|
|
292
|
+
/** Datetime ISO 8601 timestamp when persona was forwarded */
|
|
293
|
+
forwarded?: (string | undefined) | null;
|
|
294
|
+
forwardNote?: (string | undefined) | null;
|
|
295
|
+
/** Detected intent of conversation */
|
|
296
|
+
intent?: (string | undefined) | null;
|
|
297
|
+
/** Confidence score of the assigned intent */
|
|
298
|
+
intentScore?: (number | undefined) | null;
|
|
299
|
+
/** Used to handle anticipating outcome */
|
|
300
|
+
anticipate?: ConversationAnticipate | undefined;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export type CustomerValue = boolean | number | string;
|
|
304
|
+
|
|
305
|
+
export type Customer = {
|
|
306
|
+
firstName?: string | undefined;
|
|
307
|
+
lastName?: string | undefined;
|
|
308
|
+
name: string;
|
|
309
|
+
email?: (string | null) | undefined;
|
|
310
|
+
phone?: (string | null) | undefined;
|
|
311
|
+
img?: (string | null) | undefined;
|
|
312
|
+
neighborhood?: (string | null) | undefined;
|
|
313
|
+
city?: (string | null) | undefined;
|
|
314
|
+
country?: (string | null) | undefined;
|
|
315
|
+
line1?: (string | null) | undefined;
|
|
316
|
+
line2?: (string | null) | undefined;
|
|
317
|
+
postal_code?: (string | null) | undefined;
|
|
318
|
+
state?: (string | null) | undefined;
|
|
319
|
+
town?: (string | null) | undefined;
|
|
320
|
+
joined?: (string | null) | undefined;
|
|
321
|
+
stripe?: (string | null) | undefined;
|
|
322
|
+
stripeDev?: (string | null) | undefined;
|
|
323
|
+
} & {[key: string]: CustomerValue};
|
|
324
|
+
|
|
325
|
+
export type EntityDefinition = {
|
|
326
|
+
/** What entity utterance this represents, if not provided, it will default to the entity id */
|
|
327
|
+
utterance?: string | undefined;
|
|
328
|
+
/** The value of this entity variance */
|
|
329
|
+
value: string;
|
|
330
|
+
/** Text representing the entity variance */
|
|
331
|
+
text: string[];
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
export type EntityTrainingDocument = {
|
|
335
|
+
/** The assigned intent id of the given text, e.g. "I love %pizza%" could have an intent id "feedback" and "Can I purchase a %pizza%?" could have an intent id "purchase" */
|
|
336
|
+
intent: string;
|
|
337
|
+
/** Text to train the intent field and entities in or entity variances in example sentences or phrase. Ex: "I love %pizza%" and "Can I purchase a %pizza%?" */
|
|
338
|
+
text: string;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export type EntityTest = {
|
|
342
|
+
/** Text to test the entity detection */
|
|
343
|
+
text: string;
|
|
344
|
+
expected: {
|
|
345
|
+
/** The expected intent id */
|
|
346
|
+
intent: string;
|
|
347
|
+
context?: any;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
export type EntityConfiguration = {
|
|
352
|
+
/** If not provided, the id will default to the route (folder) name */
|
|
353
|
+
id?: string | undefined;
|
|
354
|
+
definitions?: EntityDefinition[] | undefined;
|
|
355
|
+
training?: EntityTrainingDocument[] | undefined;
|
|
356
|
+
tests?: EntityTest[] | undefined;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
export type EntityApiConfiguration = {
|
|
360
|
+
GET?: boolean | undefined;
|
|
361
|
+
UPDATE?: boolean | undefined;
|
|
362
|
+
QUERY?: boolean | undefined;
|
|
363
|
+
PUT?: boolean | undefined;
|
|
364
|
+
PATCH?: boolean | undefined;
|
|
365
|
+
DELETE?: boolean | undefined;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
export type EntityRootProjectConfiguration = EntityConfiguration & {
|
|
369
|
+
/** Entity id association, used to handle route params */
|
|
370
|
+
entities: string[];
|
|
371
|
+
entity: string;
|
|
372
|
+
api: EntityApiConfiguration | null;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export type EntitiesRootConfiguration = EntityConfiguration[];
|
|
376
|
+
|
|
377
|
+
export type EntitiesRootProjectConfiguration = EntityRootProjectConfiguration[];
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
export type InstructionObject = {
|
|
381
|
+
/** Unique ID for the instruction, this is used to remove the instruction later */
|
|
382
|
+
id?: string | undefined;
|
|
383
|
+
/** if true, the instruction persists the conversation, if false the instruction will only last for 1 auto reply */
|
|
384
|
+
persist?: boolean | undefined;
|
|
385
|
+
content: string;
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
export type Instruction = string | InstructionObject;
|
|
389
|
+
|
|
390
|
+
export type FollowupBase = {
|
|
391
|
+
scheduled: number;
|
|
392
|
+
cancelIf?: {
|
|
393
|
+
[x: string]: any;
|
|
394
|
+
} | undefined;
|
|
395
|
+
/** This will still run even if the conversation is locked, defaults to false */
|
|
396
|
+
overrideLock?: boolean | undefined;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export type FollowupWithMessage = FollowupBase & {
|
|
400
|
+
/** Manual message sent to client */
|
|
401
|
+
message: string;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
export type FollowupWithInstructions = FollowupBase & { instructions: Instruction[]; };
|
|
405
|
+
|
|
406
|
+
export type Followup = FollowupWithMessage | FollowupWithInstructions;
|
|
407
|
+
|
|
408
|
+
export type Forward = boolean | string | {
|
|
409
|
+
to?: string | undefined;
|
|
410
|
+
mode?: ("after-reply" | "immediately") | undefined;
|
|
411
|
+
/** Note to provide to the agent */
|
|
412
|
+
note?: string | undefined;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
export type IntentWorkflowEvent = {
|
|
416
|
+
current: string | null;
|
|
417
|
+
flow: string[];
|
|
418
|
+
initial: string | null;
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
export type Message = {
|
|
422
|
+
/** Unique ID for the message */
|
|
423
|
+
id: string;
|
|
424
|
+
role: "agent" | "customer" | "system";
|
|
425
|
+
content: string;
|
|
426
|
+
/** Datetime ISO 8601 timestamp */
|
|
427
|
+
time: string;
|
|
428
|
+
name?: string | undefined;
|
|
429
|
+
/** Datetime ISO 8601 timestamp */
|
|
430
|
+
scheduled?: string | undefined;
|
|
431
|
+
/** The context generated from the message */
|
|
432
|
+
context?: any | undefined;
|
|
433
|
+
/** Detected intent */
|
|
434
|
+
intent?: (string | undefined) | null;
|
|
435
|
+
/** Confidence score of the assigned intent */
|
|
436
|
+
intentScore?: (number | null) | undefined;
|
|
437
|
+
/** How long to delay the message manually in seconds */
|
|
438
|
+
delayInSeconds?: (number | null) | undefined;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
export type PersonaConfiguration = AgentConfiguration;
|
|
442
|
+
|
|
443
|
+
export type Persona = Agent;
|
|
444
|
+
|
|
445
|
+
export type PersonasConfiguration = PersonaConfiguration[];
|
|
446
|
+
|
|
447
|
+
export type Personas = Persona[];
|
|
448
|
+
|
|
449
|
+
export type WorkflowConfiguration = {
|
|
450
|
+
/** Workflow id association, used to handle route params */
|
|
451
|
+
entities: string[];
|
|
452
|
+
entity: string;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
export type Scout9ProjectConfig = {
|
|
457
|
+
tag?: string | undefined;
|
|
458
|
+
llm: {
|
|
459
|
+
engine: "openai";
|
|
460
|
+
model: "gpt-4-1106-preview" | "gpt-4-vision-preview" | "gpt-4" | "gpt-4-0314" | "gpt-4-0613" | "gpt-4-32k" | "gpt-4-32k-0314" | "gpt-4-32k-0613" | "gpt-3.5-turbo" | "gpt-3.5-turbo-16k" | "gpt-3.5-turbo-0301" | "gpt-3.5-turbo-0613" | "gpt-3.5-turbo-16k-0613" | string;
|
|
461
|
+
} | {
|
|
462
|
+
engine: "llama";
|
|
463
|
+
model: string;
|
|
464
|
+
} | {
|
|
465
|
+
engine: "bard";
|
|
466
|
+
model: string;
|
|
467
|
+
};
|
|
468
|
+
/** Configure personal model transformer (PMT) settings to align auto replies the agent's tone */
|
|
469
|
+
pmt: {
|
|
470
|
+
engine: "scout9";
|
|
471
|
+
model: string;
|
|
472
|
+
};
|
|
473
|
+
/** Determines the max auto replies without further conversation progression (defined by new context data gathered), before the conversation is locked and requires manual intervention */
|
|
474
|
+
maxLockAttempts?: number | undefined;
|
|
475
|
+
/** Configure the initial contexts for every conversation */
|
|
476
|
+
initialContext: string[];
|
|
477
|
+
organization?: {
|
|
478
|
+
name: string;
|
|
479
|
+
description: string;
|
|
480
|
+
dashboard?: string | undefined;
|
|
481
|
+
logo?: string | undefined;
|
|
482
|
+
icon?: string | undefined;
|
|
483
|
+
logos?: string | undefined;
|
|
484
|
+
website?: string | undefined;
|
|
485
|
+
email?: string | undefined;
|
|
486
|
+
phone?: string | undefined;
|
|
487
|
+
} | undefined;
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
export type Scout9ProjectBuildConfig = Scout9ProjectConfig & {
|
|
491
|
+
agents: Agent[];
|
|
492
|
+
entities: EntityRootProjectConfiguration[];
|
|
493
|
+
workflows: WorkflowConfiguration[];
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
export type WorkflowEvent = {
|
|
497
|
+
messages: Message[];
|
|
498
|
+
conversation: Conversation;
|
|
499
|
+
context?: any;
|
|
500
|
+
message: Message;
|
|
501
|
+
agent: Omit<AgentConfiguration, 'transcripts' | 'audios' | 'includedLocations' | 'excludedLocations' | 'model' | 'context'>;
|
|
502
|
+
customer: Customer;
|
|
503
|
+
intent: IntentWorkflowEvent;
|
|
504
|
+
stagnationCount: number;
|
|
505
|
+
/** Any developer notes to provide */
|
|
506
|
+
note?: string | undefined;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
export type AnticipateDid = {
|
|
510
|
+
did: string;
|
|
511
|
+
yes: WorkflowResponseSlotBase;
|
|
512
|
+
no: WorkflowResponseSlotBase;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
export type AnticipateKeywords = WorkflowResponseSlotBase & {
|
|
516
|
+
keywords: string[];
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export type Anticipate = AnticipateDid | AnticipateKeywords[];
|
|
520
|
+
|
|
521
|
+
export type WorkflowResponseSlotBase = {
|
|
522
|
+
/** Forward input information of a conversation */
|
|
523
|
+
forward?: Forward | undefined;
|
|
524
|
+
/** Note to provide to the agent, recommend using forward object api instead */
|
|
525
|
+
forwardNote?: string | undefined;
|
|
526
|
+
instructions?: Instruction[] | undefined;
|
|
527
|
+
removeInstructions?: string[] | undefined;
|
|
528
|
+
message?: string | undefined;
|
|
529
|
+
secondsDelay?: number | undefined;
|
|
530
|
+
scheduled?: number | undefined;
|
|
531
|
+
contextUpsert?: {
|
|
532
|
+
[x: string]: any;
|
|
533
|
+
} | undefined;
|
|
534
|
+
resetIntent?: boolean | undefined;
|
|
535
|
+
followup?: Followup | undefined;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
export type WorkflowResponseSlot = WorkflowResponseSlotBase & {
|
|
539
|
+
anticipate?: Anticipate | undefined;
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
export type WorkflowResponse = WorkflowResponseSlot | WorkflowResponseSlot[];
|
|
543
|
+
|
|
544
|
+
export type WorkflowFunction = (event: WorkflowEvent) => WorkflowResponse | Promise<WorkflowResponse>;
|
|
545
|
+
|
|
546
|
+
export type WorkflowResponseMessageApiRequest = {
|
|
547
|
+
uri: string;
|
|
548
|
+
data?: any | undefined;
|
|
549
|
+
headers?: Record<string, string> | undefined;
|
|
550
|
+
method?: ("GET" | "POST" | "PUT") | undefined;
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
export type WorkflowResponseMessage = string | WorkflowResponseMessageApiRequest;
|
|
554
|
+
|
|
555
|
+
export type WorkflowResponseMessageApiResponse = string | {
|
|
556
|
+
message: string;
|
|
557
|
+
} | {
|
|
558
|
+
text: string;
|
|
559
|
+
} | {
|
|
560
|
+
data: {
|
|
561
|
+
message: string;
|
|
562
|
+
};
|
|
563
|
+
} | {
|
|
564
|
+
data: {
|
|
565
|
+
text: string;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
export type WorkflowsConfiguration = {
|
|
571
|
+
/** Workflow id association, used to handle route params */
|
|
572
|
+
entities: string[];
|
|
573
|
+
entity: string;
|
|
574
|
+
}[];
|
|
575
|
+
|
|
576
|
+
export type apiFunction = (args: {
|
|
577
|
+
searchParams: Record<string, string | string[]>;
|
|
578
|
+
params: Record<string, string>;
|
|
579
|
+
}) => Promise<{
|
|
580
|
+
body?: any;
|
|
581
|
+
init?: {
|
|
582
|
+
status?: number | undefined;
|
|
583
|
+
statusText?: string | undefined;
|
|
584
|
+
headers?: any | undefined;
|
|
585
|
+
} | undefined;
|
|
586
|
+
}>;
|
|
587
|
+
|
|
588
|
+
export type deleteApiFunction = apiFunction;
|
|
589
|
+
|
|
590
|
+
export type eventResponse = {
|
|
591
|
+
body?: any;
|
|
592
|
+
init?: {
|
|
593
|
+
status?: number | undefined;
|
|
594
|
+
statusText?: string | undefined;
|
|
595
|
+
headers?: any | undefined;
|
|
596
|
+
} | undefined;
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
export type getApiFunction = apiFunction;
|
|
600
|
+
|
|
601
|
+
export type queryApiFunction = apiFunction;
|
|
3404
602
|
}
|
|
3405
603
|
|
|
3406
604
|
declare module '@scout9/app/testing-tools' {
|
|
3407
|
-
export function createMockAgent(firstName?: string, lastName?: string):
|
|
3408
|
-
export function createMockCustomer(firstName?: string, lastName?: string):
|
|
3409
|
-
export function createMockMessage(content: any, role?: string, time?: string):
|
|
3410
|
-
export function createMockConversation(environment?: string, $agent?: string, $customer?: string):
|
|
3411
|
-
export function createMockWorkflowEvent(message: string, intent?: string |
|
|
3412
|
-
/// <reference types="types/index.js" />
|
|
605
|
+
export function createMockAgent(firstName?: string, lastName?: string): any;
|
|
606
|
+
export function createMockCustomer(firstName?: string, lastName?: string): any;
|
|
607
|
+
export function createMockMessage(content: any, role?: string, time?: string): any;
|
|
608
|
+
export function createMockConversation(environment?: string, $agent?: string, $customer?: string): any;
|
|
609
|
+
export function createMockWorkflowEvent(message: string, intent?: string | any['intent'] | null): any;
|
|
3413
610
|
/**
|
|
3414
611
|
* Testing tool kit, used to handle Scout9 operations such as parsing, workflow, and generating responses
|
|
3415
612
|
*/
|
|
@@ -3430,19 +627,19 @@ declare module '@scout9/app/testing-tools' {
|
|
|
3430
627
|
persona: any;
|
|
3431
628
|
customer: any;
|
|
3432
629
|
context: any;
|
|
3433
|
-
conversation?:
|
|
630
|
+
conversation?: any;
|
|
3434
631
|
api: any;
|
|
3435
632
|
app: any;
|
|
3436
633
|
project: any;
|
|
3437
634
|
});
|
|
3438
635
|
|
|
3439
|
-
customer:
|
|
636
|
+
customer: any;
|
|
3440
637
|
|
|
3441
|
-
persona:
|
|
638
|
+
persona: any;
|
|
3442
639
|
|
|
3443
|
-
conversation:
|
|
640
|
+
conversation: any;
|
|
3444
641
|
|
|
3445
|
-
messages:
|
|
642
|
+
messages: any[];
|
|
3446
643
|
|
|
3447
644
|
context: any;
|
|
3448
645
|
|
|
@@ -3475,7 +672,7 @@ declare module '@scout9/app/testing-tools' {
|
|
|
3475
672
|
* @param message - message to send
|
|
3476
673
|
* @param progress - progress callback, if true, will log progress, can override with your own callback. If not provided, no logs will be added.
|
|
3477
674
|
* */
|
|
3478
|
-
send(message: string, progress?:
|
|
675
|
+
send(message: string, progress?: any | boolean): Promise<any>;
|
|
3479
676
|
/**
|
|
3480
677
|
* Parse user message
|
|
3481
678
|
* @param message - message string to parse
|
|
@@ -3487,7 +684,7 @@ declare module '@scout9/app/testing-tools' {
|
|
|
3487
684
|
* @param message - the message to run through the workflow
|
|
3488
685
|
* @param event - additional event data
|
|
3489
686
|
* */
|
|
3490
|
-
workflow(message: string, event?: Omit<Partial<
|
|
687
|
+
workflow(message: string, event?: Omit<Partial<any>, 'message'> | undefined): Promise<any>;
|
|
3491
688
|
/**
|
|
3492
689
|
* Generate a response to the user from the given or registered persona's voice in relation to the current conversation's context.
|
|
3493
690
|
* @param {Object} input - Generation input, defaults to test registered data such as existing messages, context, and persona information.
|
|
@@ -3495,7 +692,7 @@ declare module '@scout9/app/testing-tools' {
|
|
|
3495
692
|
generate({ personaId, conversation, messages, context }?: {
|
|
3496
693
|
personaId?: string | undefined;
|
|
3497
694
|
conversation?: Partial<import("@scout9/admin").ConversationCreateRequest> | undefined;
|
|
3498
|
-
messages?:
|
|
695
|
+
messages?: any[] | undefined;
|
|
3499
696
|
context?: any;
|
|
3500
697
|
} | undefined): Promise<import('@scout9/admin').GenerateResponse>;
|
|
3501
698
|
|
|
@@ -3527,38 +724,38 @@ declare module '@scout9/app/spirits' {
|
|
|
3527
724
|
/**
|
|
3528
725
|
* - used to define generation and extract persona metadata
|
|
3529
726
|
*/
|
|
3530
|
-
config:
|
|
3531
|
-
conversation:
|
|
3532
|
-
messages: Array<
|
|
727
|
+
config: any;
|
|
728
|
+
conversation: any;
|
|
729
|
+
messages: Array<any>;
|
|
3533
730
|
/**
|
|
3534
731
|
* - the message sent by the customer (should exist in messages)
|
|
3535
732
|
*/
|
|
3536
|
-
message:
|
|
3537
|
-
customer:
|
|
733
|
+
message: any;
|
|
734
|
+
customer: any;
|
|
3538
735
|
context: any;
|
|
3539
736
|
};
|
|
3540
737
|
export type ParseOutput = {
|
|
3541
|
-
messages: Array<
|
|
3542
|
-
conversation:
|
|
3543
|
-
message:
|
|
738
|
+
messages: Array<any>;
|
|
739
|
+
conversation: any;
|
|
740
|
+
message: any;
|
|
3544
741
|
context: any;
|
|
3545
742
|
};
|
|
3546
743
|
export type WorkflowOutput = {
|
|
3547
|
-
slots: Array<
|
|
3548
|
-
messages: Array<
|
|
3549
|
-
conversation:
|
|
744
|
+
slots: Array<any>;
|
|
745
|
+
messages: Array<any>;
|
|
746
|
+
conversation: any;
|
|
3550
747
|
context: any;
|
|
3551
748
|
};
|
|
3552
749
|
export type GenerateOutput = {
|
|
3553
750
|
generate: import('@scout9/admin').GenerateResponse | undefined;
|
|
3554
|
-
messages: Array<
|
|
3555
|
-
conversation:
|
|
751
|
+
messages: Array<any>;
|
|
752
|
+
conversation: any;
|
|
3556
753
|
context: any;
|
|
3557
754
|
};
|
|
3558
755
|
export type ParseFun = (message: string, language: string | undefined) => Promise<import('@scout9/admin').ParseResponse>;
|
|
3559
|
-
export type WorkflowFun = (event:
|
|
756
|
+
export type WorkflowFun = (event: any) => Promise<any>;
|
|
3560
757
|
export type GenerateFun = (data: import('@scout9/admin').GenerateRequestOneOf) => Promise<import('@scout9/admin').GenerateResponse>;
|
|
3561
|
-
export type IdGeneratorFun = (prefix:
|
|
758
|
+
export type IdGeneratorFun = (prefix: any) => string;
|
|
3562
759
|
export type StatusCallback = (message: string, level?: 'info' | 'warn' | 'error' | 'success' | undefined, type?: string | undefined, payload?: any | undefined) => void;
|
|
3563
760
|
export type CustomerSpiritCallbacks = {
|
|
3564
761
|
parser: ParseFun;
|
|
@@ -3568,14 +765,14 @@ declare module '@scout9/app/spirits' {
|
|
|
3568
765
|
progress?: StatusCallback | undefined;
|
|
3569
766
|
};
|
|
3570
767
|
export type ConversationEvent = {
|
|
3571
|
-
conversation: Change<
|
|
768
|
+
conversation: Change<any> & {
|
|
3572
769
|
forwardNote?: string;
|
|
3573
|
-
forward?:
|
|
770
|
+
forward?: any['forward'];
|
|
3574
771
|
};
|
|
3575
|
-
messages: Change<Array<
|
|
772
|
+
messages: Change<Array<any>>;
|
|
3576
773
|
context: Change<any>;
|
|
3577
|
-
message: Change<
|
|
3578
|
-
followup: Array<
|
|
774
|
+
message: Change<any>;
|
|
775
|
+
followup: Array<any>;
|
|
3579
776
|
};
|
|
3580
777
|
}
|
|
3581
778
|
|