@scout9/app 1.0.0-alpha.0.1.84 → 1.0.0-alpha.0.1.85
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/{exports-5ad64876.cjs → exports-dc75cb8b.cjs} +39 -5
- package/dist/index.cjs +1 -1
- package/dist/{multipart-parser-141ee5a8.cjs → multipart-parser-f133fa41.cjs} +1 -1
- package/dist/testing-tools.cjs +1 -1
- package/package.json +1 -1
- package/src/runtime/client/workflow.js +47 -1
- package/types/index.d.ts +564 -0
- package/types/index.d.ts.map +6 -3
|
@@ -41174,7 +41174,7 @@ class Body {
|
|
|
41174
41174
|
}
|
|
41175
41175
|
const {
|
|
41176
41176
|
toFormData
|
|
41177
|
-
} = await Promise.resolve().then(function () { return require("./multipart-parser-
|
|
41177
|
+
} = await Promise.resolve().then(function () { return require("./multipart-parser-f133fa41.cjs"); });
|
|
41178
41178
|
return toFormData(this.body, ct);
|
|
41179
41179
|
}
|
|
41180
41180
|
|
|
@@ -81230,7 +81230,7 @@ function _loadUserPackageJson$1() {
|
|
|
81230
81230
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
81231
81231
|
_context2.t0 = JSON;
|
|
81232
81232
|
_context2.next = 10;
|
|
81233
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-
|
|
81233
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-dc75cb8b.js', document.baseURI).href))), 'utf-8');
|
|
81234
81234
|
case 10:
|
|
81235
81235
|
_context2.t1 = _context2.sent;
|
|
81236
81236
|
pkg = _context2.t0.parse.call(_context2.t0, _context2.t1);
|
|
@@ -82075,7 +82075,7 @@ function _loadUserPackageJson() {
|
|
|
82075
82075
|
targetPkgUrl = isTest ? packageTestJsonUrl : packageJsonUrl;
|
|
82076
82076
|
_context.t0 = JSON;
|
|
82077
82077
|
_context.next = 10;
|
|
82078
|
-
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-
|
|
82078
|
+
return fs__default["default"].readFile(new URL(targetPkgUrl, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-dc75cb8b.js', document.baseURI).href))), 'utf-8');
|
|
82079
82079
|
case 10:
|
|
82080
82080
|
_context.t1 = _context.sent;
|
|
82081
82081
|
pkg = _context.t0.parse.call(_context.t0, _context.t1);
|
|
@@ -87067,11 +87067,45 @@ var InstructionSchema = z.object({
|
|
|
87067
87067
|
id: zId('Instruction ID').describe('Unique ID for the instruction, this is used to remove the instruction later'),
|
|
87068
87068
|
content: z.string()
|
|
87069
87069
|
});
|
|
87070
|
+
|
|
87071
|
+
/**
|
|
87072
|
+
* If its a string, it will be sent as a static string.
|
|
87073
|
+
* If it's a object or WorkflowResponseMessageAPI - it will use
|
|
87074
|
+
*/
|
|
87075
|
+
z.union(z.string(),
|
|
87076
|
+
/**
|
|
87077
|
+
* An api call that should be called later, must return a string or {message: string}
|
|
87078
|
+
*/
|
|
87079
|
+
WorkflowResponseMessageApiRequest);
|
|
87080
|
+
var WorkflowResponseMessageApiRequest = z.object({
|
|
87081
|
+
uri: z.string(),
|
|
87082
|
+
data: z.any().optional(),
|
|
87083
|
+
headers: z.object(spirits._defineProperty({}, z.string(), z.string())).optional(),
|
|
87084
|
+
method: z["enum"](["GET", "POST", "PUT"]).optional()
|
|
87085
|
+
});
|
|
87086
|
+
|
|
87087
|
+
/**
|
|
87088
|
+
* The intended response provided by the WorkflowResponseMessageApiRequest
|
|
87089
|
+
*/
|
|
87090
|
+
z.union([z.string(), z.object({
|
|
87091
|
+
message: z.string()
|
|
87092
|
+
}), z.object({
|
|
87093
|
+
text: z.string()
|
|
87094
|
+
}), z.object({
|
|
87095
|
+
data: z.object({
|
|
87096
|
+
message: z.string()
|
|
87097
|
+
})
|
|
87098
|
+
}), z.object({
|
|
87099
|
+
data: z.object({
|
|
87100
|
+
text: z.string()
|
|
87101
|
+
})
|
|
87102
|
+
})]);
|
|
87070
87103
|
var WorkflowResponseSlotSchema = z.object({
|
|
87071
87104
|
forward: ForwardSchema.optional(),
|
|
87072
87105
|
instructions: z.union([z.string(), InstructionSchema, z.array(z.string()), z.array(InstructionSchema)]).optional(),
|
|
87073
87106
|
removeInstructions: z.array(z.string()).optional(),
|
|
87074
87107
|
message: z.string().optional(),
|
|
87108
|
+
// message: WorkflowResponseMessage.optional(),
|
|
87075
87109
|
secondsDelay: z.number().optional(),
|
|
87076
87110
|
scheduled: z.number().optional(),
|
|
87077
87111
|
contextUpsert: ConversationContext.optional(),
|
|
@@ -88316,7 +88350,7 @@ function report(config, logger) {
|
|
|
88316
88350
|
logger.primary("Run ".concat(cyan('scout9 dev'), " to test your project locally"));
|
|
88317
88351
|
}
|
|
88318
88352
|
|
|
88319
|
-
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-
|
|
88353
|
+
var __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-dc75cb8b.js', document.baseURI).href)));
|
|
88320
88354
|
var __dirname$1 = path__default["default"].dirname(__filename$1);
|
|
88321
88355
|
|
|
88322
88356
|
/**
|
|
@@ -88559,7 +88593,7 @@ function _buildApp() {
|
|
|
88559
88593
|
case 11:
|
|
88560
88594
|
_context4.t0 = JSON;
|
|
88561
88595
|
_context4.next = 14;
|
|
88562
|
-
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-
|
|
88596
|
+
return fs__default["default"].readFile(new URL(templatePackagePath, (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('exports-dc75cb8b.js', document.baseURI).href))), 'utf-8');
|
|
88563
88597
|
case 14:
|
|
88564
88598
|
_context4.t1 = _context4.sent;
|
|
88565
88599
|
packageTemplate = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var exports$1 = require("./exports-
|
|
5
|
+
var exports$1 = require("./exports-dc75cb8b.cjs");
|
|
6
6
|
var spirits = require("./spirits-643c422a.cjs");
|
|
7
7
|
require('node:readline');
|
|
8
8
|
require('fs');
|
package/dist/testing-tools.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var exports$1 = require("./exports-
|
|
5
|
+
var exports$1 = require("./exports-dc75cb8b.cjs");
|
|
6
6
|
var spirits = require("./spirits-643c422a.cjs");
|
|
7
7
|
require('node:readline');
|
|
8
8
|
require('fs');
|
package/package.json
CHANGED
|
@@ -70,18 +70,64 @@ export const InstructionSchema = z.object({
|
|
|
70
70
|
id: zId('Instruction ID').describe('Unique ID for the instruction, this is used to remove the instruction later'),
|
|
71
71
|
content: z.string(),
|
|
72
72
|
});
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* If its a string, it will be sent as a static string.
|
|
76
|
+
* If it's a object or WorkflowResponseMessageAPI - it will use
|
|
77
|
+
*/
|
|
78
|
+
export const WorkflowResponseMessage = z.union(
|
|
79
|
+
z.string(),
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* An api call that should be called later, must return a string or {message: string}
|
|
83
|
+
*/
|
|
84
|
+
WorkflowResponseMessageApiRequest
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
export const WorkflowResponseMessageApiRequest = z.object({
|
|
88
|
+
uri: z.string(),
|
|
89
|
+
data: z.any().optional(),
|
|
90
|
+
headers: z.object({
|
|
91
|
+
[z.string()]: z.string(),
|
|
92
|
+
}).optional(),
|
|
93
|
+
method: z.enum(["GET", "POST", "PUT"]).optional()
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The intended response provided by the WorkflowResponseMessageApiRequest
|
|
98
|
+
*/
|
|
99
|
+
export const WorkflowResponseMessageApiResponse = z.union([
|
|
100
|
+
z.string(),
|
|
101
|
+
z.object({
|
|
102
|
+
message: z.string()
|
|
103
|
+
}),
|
|
104
|
+
z.object({
|
|
105
|
+
text: z.string()
|
|
106
|
+
}),
|
|
107
|
+
z.object({
|
|
108
|
+
data: z.object({
|
|
109
|
+
message: z.string()
|
|
110
|
+
})
|
|
111
|
+
}),
|
|
112
|
+
z.object({
|
|
113
|
+
data: z.object({
|
|
114
|
+
text: z.string()
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
]);
|
|
118
|
+
|
|
73
119
|
export const WorkflowResponseSlotSchema = z.object({
|
|
74
120
|
forward: ForwardSchema.optional(),
|
|
75
121
|
instructions: z.union([z.string(), InstructionSchema, z.array(z.string()), z.array(InstructionSchema)]).optional(),
|
|
76
122
|
removeInstructions: z.array(z.string()).optional(),
|
|
77
123
|
message: z.string().optional(),
|
|
124
|
+
// message: WorkflowResponseMessage.optional(),
|
|
78
125
|
secondsDelay: z.number().optional(),
|
|
79
126
|
scheduled: z.number().optional(),
|
|
80
127
|
contextUpsert: ConversationContext.optional(),
|
|
81
128
|
resetIntent: z.boolean().optional(),
|
|
82
129
|
});
|
|
83
130
|
|
|
84
|
-
|
|
85
131
|
export const WorkflowResponseSchema = z.union([
|
|
86
132
|
WorkflowResponseSlotSchema,
|
|
87
133
|
z.array(WorkflowResponseSlotSchema)
|
package/types/index.d.ts
CHANGED
|
@@ -537,6 +537,570 @@ declare module '@scout9/app/testing-tools' {
|
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
539
|
|
|
540
|
+
declare module '@scout9/app/types' {
|
|
541
|
+
import type { z } from 'zod';
|
|
542
|
+
export const Scout9ProjectBuildConfigSchema: z.ZodObject<{
|
|
543
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
544
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
545
|
+
deployed: z.ZodOptional<z.ZodObject<{
|
|
546
|
+
web: z.ZodOptional<z.ZodString>;
|
|
547
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
548
|
+
email: z.ZodOptional<z.ZodString>;
|
|
549
|
+
}, "strip", z.ZodTypeAny, {
|
|
550
|
+
web?: string | undefined;
|
|
551
|
+
phone?: string | undefined;
|
|
552
|
+
email?: string | undefined;
|
|
553
|
+
}, {
|
|
554
|
+
web?: string | undefined;
|
|
555
|
+
phone?: string | undefined;
|
|
556
|
+
email?: string | undefined;
|
|
557
|
+
}>>;
|
|
558
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
559
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
560
|
+
inactive: z.ZodOptional<z.ZodBoolean>;
|
|
561
|
+
programmablePhoneNumber: z.ZodOptional<z.ZodString>;
|
|
562
|
+
programmablePhoneNumberSid: z.ZodOptional<z.ZodString>;
|
|
563
|
+
programmableEmail: z.ZodOptional<z.ZodString>;
|
|
564
|
+
forwardEmail: z.ZodOptional<z.ZodString>;
|
|
565
|
+
forwardPhone: z.ZodOptional<z.ZodString>;
|
|
566
|
+
title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
567
|
+
context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
568
|
+
includedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
569
|
+
excludedLocations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
570
|
+
model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Scout9", "bard", "openai"]>>>;
|
|
571
|
+
transcripts: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
572
|
+
content: z.ZodString;
|
|
573
|
+
role: z.ZodEnum<["agent", "customer", "system"]>;
|
|
574
|
+
time: z.ZodString;
|
|
575
|
+
name: z.ZodOptional<z.ZodString>;
|
|
576
|
+
}, "strip", z.ZodTypeAny, {
|
|
577
|
+
time: string;
|
|
578
|
+
content: string;
|
|
579
|
+
role: "agent" | "customer" | "system";
|
|
580
|
+
name?: string | undefined;
|
|
581
|
+
}, {
|
|
582
|
+
time: string;
|
|
583
|
+
content: string;
|
|
584
|
+
role: "agent" | "customer" | "system";
|
|
585
|
+
name?: string | undefined;
|
|
586
|
+
}>, "many">, "many">>;
|
|
587
|
+
audios: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
588
|
+
}, "strip", z.ZodTypeAny, {
|
|
589
|
+
title: string;
|
|
590
|
+
context: string;
|
|
591
|
+
model: "openai" | "bard" | "Scout9";
|
|
592
|
+
deployed?: {
|
|
593
|
+
web?: string | undefined;
|
|
594
|
+
phone?: string | undefined;
|
|
595
|
+
email?: string | undefined;
|
|
596
|
+
} | undefined;
|
|
597
|
+
firstName?: string | undefined;
|
|
598
|
+
lastName?: string | undefined;
|
|
599
|
+
inactive?: boolean | undefined;
|
|
600
|
+
programmablePhoneNumber?: string | undefined;
|
|
601
|
+
programmablePhoneNumberSid?: string | undefined;
|
|
602
|
+
programmableEmail?: string | undefined;
|
|
603
|
+
forwardEmail?: string | undefined;
|
|
604
|
+
forwardPhone?: string | undefined;
|
|
605
|
+
includedLocations?: string[] | undefined;
|
|
606
|
+
excludedLocations?: string[] | undefined;
|
|
607
|
+
transcripts?: {
|
|
608
|
+
time: string;
|
|
609
|
+
content: string;
|
|
610
|
+
role: "agent" | "customer" | "system";
|
|
611
|
+
name?: string | undefined;
|
|
612
|
+
}[][] | undefined;
|
|
613
|
+
audios?: any[] | undefined;
|
|
614
|
+
}, {
|
|
615
|
+
deployed?: {
|
|
616
|
+
web?: string | undefined;
|
|
617
|
+
phone?: string | undefined;
|
|
618
|
+
email?: string | undefined;
|
|
619
|
+
} | undefined;
|
|
620
|
+
firstName?: string | undefined;
|
|
621
|
+
lastName?: string | undefined;
|
|
622
|
+
inactive?: boolean | undefined;
|
|
623
|
+
programmablePhoneNumber?: string | undefined;
|
|
624
|
+
programmablePhoneNumberSid?: string | undefined;
|
|
625
|
+
programmableEmail?: string | undefined;
|
|
626
|
+
forwardEmail?: string | undefined;
|
|
627
|
+
forwardPhone?: string | undefined;
|
|
628
|
+
title?: string | undefined;
|
|
629
|
+
context?: string | undefined;
|
|
630
|
+
includedLocations?: string[] | undefined;
|
|
631
|
+
excludedLocations?: string[] | undefined;
|
|
632
|
+
model?: "openai" | "bard" | "Scout9" | undefined;
|
|
633
|
+
transcripts?: {
|
|
634
|
+
time: string;
|
|
635
|
+
content: string;
|
|
636
|
+
role: "agent" | "customer" | "system";
|
|
637
|
+
name?: string | undefined;
|
|
638
|
+
}[][] | undefined;
|
|
639
|
+
audios?: any[] | undefined;
|
|
640
|
+
}>, "many">;
|
|
641
|
+
entities: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
642
|
+
id: any;
|
|
643
|
+
training: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
644
|
+
intent: ZodString;
|
|
645
|
+
text: z.ZodString;
|
|
646
|
+
}, "strip", z.ZodTypeAny, {
|
|
647
|
+
text: string;
|
|
648
|
+
intent?: any;
|
|
649
|
+
}, {
|
|
650
|
+
text: string;
|
|
651
|
+
intent?: any;
|
|
652
|
+
}>, "many">>;
|
|
653
|
+
tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
654
|
+
text: z.ZodString;
|
|
655
|
+
expected: z.ZodObject<{
|
|
656
|
+
intent: ZodString;
|
|
657
|
+
context: z.ZodAny;
|
|
658
|
+
}, "strip", z.ZodTypeAny, {
|
|
659
|
+
intent?: any;
|
|
660
|
+
context?: any;
|
|
661
|
+
}, {
|
|
662
|
+
intent?: any;
|
|
663
|
+
context?: any;
|
|
664
|
+
}>;
|
|
665
|
+
}, "strip", z.ZodTypeAny, {
|
|
666
|
+
text: string;
|
|
667
|
+
expected: {
|
|
668
|
+
intent?: any;
|
|
669
|
+
context?: any;
|
|
670
|
+
};
|
|
671
|
+
}, {
|
|
672
|
+
text: string;
|
|
673
|
+
expected: {
|
|
674
|
+
intent?: any;
|
|
675
|
+
context?: any;
|
|
676
|
+
};
|
|
677
|
+
}>, "many">>;
|
|
678
|
+
definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
679
|
+
utterance: any;
|
|
680
|
+
value: z.ZodString;
|
|
681
|
+
text: z.ZodArray<z.ZodString, "many">;
|
|
682
|
+
}, "strip", z.ZodTypeAny, {
|
|
683
|
+
[x: string]: any;
|
|
684
|
+
utterance?: any;
|
|
685
|
+
value?: string | undefined;
|
|
686
|
+
text?: string[] | undefined;
|
|
687
|
+
}, {
|
|
688
|
+
[x: string]: any;
|
|
689
|
+
utterance?: any;
|
|
690
|
+
value?: string | undefined;
|
|
691
|
+
text?: string[] | undefined;
|
|
692
|
+
}>, "many">>;
|
|
693
|
+
entities: z.ZodArray<ZodString, "many">;
|
|
694
|
+
entity: ZodString;
|
|
695
|
+
api: z.ZodNullable<z.ZodObject<{
|
|
696
|
+
GET: z.ZodOptional<z.ZodBoolean>;
|
|
697
|
+
UPDATE: z.ZodOptional<z.ZodBoolean>;
|
|
698
|
+
QUERY: z.ZodOptional<z.ZodBoolean>;
|
|
699
|
+
PUT: z.ZodOptional<z.ZodBoolean>;
|
|
700
|
+
PATCH: z.ZodOptional<z.ZodBoolean>;
|
|
701
|
+
DELETE: z.ZodOptional<z.ZodBoolean>;
|
|
702
|
+
}, "strip", z.ZodTypeAny, {
|
|
703
|
+
GET?: boolean | undefined;
|
|
704
|
+
UPDATE?: boolean | undefined;
|
|
705
|
+
QUERY?: boolean | undefined;
|
|
706
|
+
PUT?: boolean | undefined;
|
|
707
|
+
PATCH?: boolean | undefined;
|
|
708
|
+
DELETE?: boolean | undefined;
|
|
709
|
+
}, {
|
|
710
|
+
GET?: boolean | undefined;
|
|
711
|
+
UPDATE?: boolean | undefined;
|
|
712
|
+
QUERY?: boolean | undefined;
|
|
713
|
+
PUT?: boolean | undefined;
|
|
714
|
+
PATCH?: boolean | undefined;
|
|
715
|
+
DELETE?: boolean | undefined;
|
|
716
|
+
}>>;
|
|
717
|
+
}, "strict", z.ZodTypeAny, {
|
|
718
|
+
[x: string]: any;
|
|
719
|
+
id?: any;
|
|
720
|
+
training?: {
|
|
721
|
+
text: string;
|
|
722
|
+
intent?: any;
|
|
723
|
+
}[] | undefined;
|
|
724
|
+
tests?: {
|
|
725
|
+
text: string;
|
|
726
|
+
expected: {
|
|
727
|
+
intent?: any;
|
|
728
|
+
context?: any;
|
|
729
|
+
};
|
|
730
|
+
}[] | undefined;
|
|
731
|
+
definitions?: {
|
|
732
|
+
[x: string]: any;
|
|
733
|
+
utterance?: any;
|
|
734
|
+
value?: string | undefined;
|
|
735
|
+
text?: string[] | undefined;
|
|
736
|
+
}[] | undefined;
|
|
737
|
+
entities?: ZodString[] | undefined;
|
|
738
|
+
entity?: any;
|
|
739
|
+
api?: {
|
|
740
|
+
GET?: boolean | undefined;
|
|
741
|
+
UPDATE?: boolean | undefined;
|
|
742
|
+
QUERY?: boolean | undefined;
|
|
743
|
+
PUT?: boolean | undefined;
|
|
744
|
+
PATCH?: boolean | undefined;
|
|
745
|
+
DELETE?: boolean | undefined;
|
|
746
|
+
} | null | undefined;
|
|
747
|
+
}, {
|
|
748
|
+
[x: string]: any;
|
|
749
|
+
id?: any;
|
|
750
|
+
training?: {
|
|
751
|
+
text: string;
|
|
752
|
+
intent?: any;
|
|
753
|
+
}[] | undefined;
|
|
754
|
+
tests?: {
|
|
755
|
+
text: string;
|
|
756
|
+
expected: {
|
|
757
|
+
intent?: any;
|
|
758
|
+
context?: any;
|
|
759
|
+
};
|
|
760
|
+
}[] | undefined;
|
|
761
|
+
definitions?: {
|
|
762
|
+
[x: string]: any;
|
|
763
|
+
utterance?: any;
|
|
764
|
+
value?: string | undefined;
|
|
765
|
+
text?: string[] | undefined;
|
|
766
|
+
}[] | undefined;
|
|
767
|
+
entities?: ZodString[] | undefined;
|
|
768
|
+
entity?: any;
|
|
769
|
+
api?: {
|
|
770
|
+
GET?: boolean | undefined;
|
|
771
|
+
UPDATE?: boolean | undefined;
|
|
772
|
+
QUERY?: boolean | undefined;
|
|
773
|
+
PUT?: boolean | undefined;
|
|
774
|
+
PATCH?: boolean | undefined;
|
|
775
|
+
DELETE?: boolean | undefined;
|
|
776
|
+
} | null | undefined;
|
|
777
|
+
}>, {
|
|
778
|
+
[x: string]: any;
|
|
779
|
+
id?: any;
|
|
780
|
+
training?: {
|
|
781
|
+
text: string;
|
|
782
|
+
intent?: any;
|
|
783
|
+
}[] | undefined;
|
|
784
|
+
tests?: {
|
|
785
|
+
text: string;
|
|
786
|
+
expected: {
|
|
787
|
+
intent?: any;
|
|
788
|
+
context?: any;
|
|
789
|
+
};
|
|
790
|
+
}[] | undefined;
|
|
791
|
+
definitions?: {
|
|
792
|
+
[x: string]: any;
|
|
793
|
+
utterance?: any;
|
|
794
|
+
value?: string | undefined;
|
|
795
|
+
text?: string[] | undefined;
|
|
796
|
+
}[] | undefined;
|
|
797
|
+
entities?: ZodString[] | undefined;
|
|
798
|
+
entity?: any;
|
|
799
|
+
api?: {
|
|
800
|
+
GET?: boolean | undefined;
|
|
801
|
+
UPDATE?: boolean | undefined;
|
|
802
|
+
QUERY?: boolean | undefined;
|
|
803
|
+
PUT?: boolean | undefined;
|
|
804
|
+
PATCH?: boolean | undefined;
|
|
805
|
+
DELETE?: boolean | undefined;
|
|
806
|
+
} | null | undefined;
|
|
807
|
+
}, {
|
|
808
|
+
[x: string]: any;
|
|
809
|
+
id?: any;
|
|
810
|
+
training?: {
|
|
811
|
+
text: string;
|
|
812
|
+
intent?: any;
|
|
813
|
+
}[] | undefined;
|
|
814
|
+
tests?: {
|
|
815
|
+
text: string;
|
|
816
|
+
expected: {
|
|
817
|
+
intent?: any;
|
|
818
|
+
context?: any;
|
|
819
|
+
};
|
|
820
|
+
}[] | undefined;
|
|
821
|
+
definitions?: {
|
|
822
|
+
[x: string]: any;
|
|
823
|
+
utterance?: any;
|
|
824
|
+
value?: string | undefined;
|
|
825
|
+
text?: string[] | undefined;
|
|
826
|
+
}[] | undefined;
|
|
827
|
+
entities?: ZodString[] | undefined;
|
|
828
|
+
entity?: any;
|
|
829
|
+
api?: {
|
|
830
|
+
GET?: boolean | undefined;
|
|
831
|
+
UPDATE?: boolean | undefined;
|
|
832
|
+
QUERY?: boolean | undefined;
|
|
833
|
+
PUT?: boolean | undefined;
|
|
834
|
+
PATCH?: boolean | undefined;
|
|
835
|
+
DELETE?: boolean | undefined;
|
|
836
|
+
} | null | undefined;
|
|
837
|
+
}>, "many">;
|
|
838
|
+
workflows: z.ZodArray<z.ZodObject<{
|
|
839
|
+
entities: z.ZodArray<ZodString, "many">;
|
|
840
|
+
entity: ZodString;
|
|
841
|
+
}, "strip", z.ZodTypeAny, {
|
|
842
|
+
entities: ZodString[];
|
|
843
|
+
entity?: any;
|
|
844
|
+
}, {
|
|
845
|
+
entities: ZodString[];
|
|
846
|
+
entity?: any;
|
|
847
|
+
}>, "many">;
|
|
848
|
+
llm: z.ZodUnion<[z.ZodObject<{
|
|
849
|
+
engine: z.ZodLiteral<"openai">;
|
|
850
|
+
model: z.ZodUnion<[z.ZodLiteral<"gpt-4-1106-preview">, z.ZodLiteral<"gpt-4-vision-preview">, z.ZodLiteral<"gpt-4">, z.ZodLiteral<"gpt-4-0314">, z.ZodLiteral<"gpt-4-0613">, z.ZodLiteral<"gpt-4-32k">, z.ZodLiteral<"gpt-4-32k-0314">, z.ZodLiteral<"gpt-4-32k-0613">, z.ZodLiteral<"gpt-3.5-turbo">, z.ZodLiteral<"gpt-3.5-turbo-16k">, z.ZodLiteral<"gpt-3.5-turbo-0301">, z.ZodLiteral<"gpt-3.5-turbo-0613">, z.ZodLiteral<"gpt-3.5-turbo-16k-0613">, z.ZodString]>;
|
|
851
|
+
}, "strip", z.ZodTypeAny, {
|
|
852
|
+
model: string;
|
|
853
|
+
engine: "openai";
|
|
854
|
+
}, {
|
|
855
|
+
model: string;
|
|
856
|
+
engine: "openai";
|
|
857
|
+
}>, z.ZodObject<{
|
|
858
|
+
engine: z.ZodLiteral<"llama">;
|
|
859
|
+
model: z.ZodString;
|
|
860
|
+
}, "strip", z.ZodTypeAny, {
|
|
861
|
+
model: string;
|
|
862
|
+
engine: "llama";
|
|
863
|
+
}, {
|
|
864
|
+
model: string;
|
|
865
|
+
engine: "llama";
|
|
866
|
+
}>, z.ZodObject<{
|
|
867
|
+
engine: z.ZodLiteral<"bard">;
|
|
868
|
+
model: z.ZodString;
|
|
869
|
+
}, "strip", z.ZodTypeAny, {
|
|
870
|
+
model: string;
|
|
871
|
+
engine: "bard";
|
|
872
|
+
}, {
|
|
873
|
+
model: string;
|
|
874
|
+
engine: "bard";
|
|
875
|
+
}>]>;
|
|
876
|
+
pmt: z.ZodObject<{
|
|
877
|
+
engine: z.ZodLiteral<"scout9">;
|
|
878
|
+
model: z.ZodString;
|
|
879
|
+
}, "strip", z.ZodTypeAny, {
|
|
880
|
+
model: string;
|
|
881
|
+
engine: "scout9";
|
|
882
|
+
}, {
|
|
883
|
+
model: string;
|
|
884
|
+
engine: "scout9";
|
|
885
|
+
}>;
|
|
886
|
+
initialContext: z.ZodArray<z.ZodString, "many">;
|
|
887
|
+
maxLockAttempts: z.ZodOptional<z.ZodNumber>;
|
|
888
|
+
organization: z.ZodOptional<z.ZodObject<{
|
|
889
|
+
name: z.ZodString;
|
|
890
|
+
description: z.ZodString;
|
|
891
|
+
dashboard: z.ZodOptional<z.ZodString>;
|
|
892
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
893
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
894
|
+
logos: z.ZodOptional<z.ZodString>;
|
|
895
|
+
website: z.ZodOptional<z.ZodString>;
|
|
896
|
+
email: z.ZodOptional<z.ZodString>;
|
|
897
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
898
|
+
}, "strip", z.ZodTypeAny, {
|
|
899
|
+
name: string;
|
|
900
|
+
description: string;
|
|
901
|
+
dashboard?: string | undefined;
|
|
902
|
+
logo?: string | undefined;
|
|
903
|
+
icon?: string | undefined;
|
|
904
|
+
logos?: string | undefined;
|
|
905
|
+
website?: string | undefined;
|
|
906
|
+
email?: string | undefined;
|
|
907
|
+
phone?: string | undefined;
|
|
908
|
+
}, {
|
|
909
|
+
name: string;
|
|
910
|
+
description: string;
|
|
911
|
+
dashboard?: string | undefined;
|
|
912
|
+
logo?: string | undefined;
|
|
913
|
+
icon?: string | undefined;
|
|
914
|
+
logos?: string | undefined;
|
|
915
|
+
website?: string | undefined;
|
|
916
|
+
email?: string | undefined;
|
|
917
|
+
phone?: string | undefined;
|
|
918
|
+
}>>;
|
|
919
|
+
}, "strip", z.ZodTypeAny, {
|
|
920
|
+
agents: {
|
|
921
|
+
title: string;
|
|
922
|
+
context: string;
|
|
923
|
+
model: "openai" | "bard" | "Scout9";
|
|
924
|
+
deployed?: {
|
|
925
|
+
web?: string | undefined;
|
|
926
|
+
phone?: string | undefined;
|
|
927
|
+
email?: string | undefined;
|
|
928
|
+
} | undefined;
|
|
929
|
+
firstName?: string | undefined;
|
|
930
|
+
lastName?: string | undefined;
|
|
931
|
+
inactive?: boolean | undefined;
|
|
932
|
+
programmablePhoneNumber?: string | undefined;
|
|
933
|
+
programmablePhoneNumberSid?: string | undefined;
|
|
934
|
+
programmableEmail?: string | undefined;
|
|
935
|
+
forwardEmail?: string | undefined;
|
|
936
|
+
forwardPhone?: string | undefined;
|
|
937
|
+
includedLocations?: string[] | undefined;
|
|
938
|
+
excludedLocations?: string[] | undefined;
|
|
939
|
+
transcripts?: {
|
|
940
|
+
time: string;
|
|
941
|
+
content: string;
|
|
942
|
+
role: "agent" | "customer" | "system";
|
|
943
|
+
name?: string | undefined;
|
|
944
|
+
}[][] | undefined;
|
|
945
|
+
audios?: any[] | undefined;
|
|
946
|
+
}[];
|
|
947
|
+
entities: {
|
|
948
|
+
[x: string]: any;
|
|
949
|
+
id?: any;
|
|
950
|
+
training?: {
|
|
951
|
+
text: string;
|
|
952
|
+
intent?: any;
|
|
953
|
+
}[] | undefined;
|
|
954
|
+
tests?: {
|
|
955
|
+
text: string;
|
|
956
|
+
expected: {
|
|
957
|
+
intent?: any;
|
|
958
|
+
context?: any;
|
|
959
|
+
};
|
|
960
|
+
}[] | undefined;
|
|
961
|
+
definitions?: {
|
|
962
|
+
[x: string]: any;
|
|
963
|
+
utterance?: any;
|
|
964
|
+
value?: string | undefined;
|
|
965
|
+
text?: string[] | undefined;
|
|
966
|
+
}[] | undefined;
|
|
967
|
+
entities?: ZodString[] | undefined;
|
|
968
|
+
entity?: any;
|
|
969
|
+
api?: {
|
|
970
|
+
GET?: boolean | undefined;
|
|
971
|
+
UPDATE?: boolean | undefined;
|
|
972
|
+
QUERY?: boolean | undefined;
|
|
973
|
+
PUT?: boolean | undefined;
|
|
974
|
+
PATCH?: boolean | undefined;
|
|
975
|
+
DELETE?: boolean | undefined;
|
|
976
|
+
} | null | undefined;
|
|
977
|
+
}[];
|
|
978
|
+
initialContext: string[];
|
|
979
|
+
workflows: {
|
|
980
|
+
entities: ZodString[];
|
|
981
|
+
entity?: any;
|
|
982
|
+
}[];
|
|
983
|
+
llm: {
|
|
984
|
+
model: string;
|
|
985
|
+
engine: "openai";
|
|
986
|
+
} | {
|
|
987
|
+
model: string;
|
|
988
|
+
engine: "llama";
|
|
989
|
+
} | {
|
|
990
|
+
model: string;
|
|
991
|
+
engine: "bard";
|
|
992
|
+
};
|
|
993
|
+
pmt: {
|
|
994
|
+
model: string;
|
|
995
|
+
engine: "scout9";
|
|
996
|
+
};
|
|
997
|
+
tag?: string | undefined;
|
|
998
|
+
maxLockAttempts?: number | undefined;
|
|
999
|
+
organization?: {
|
|
1000
|
+
name: string;
|
|
1001
|
+
description: string;
|
|
1002
|
+
dashboard?: string | undefined;
|
|
1003
|
+
logo?: string | undefined;
|
|
1004
|
+
icon?: string | undefined;
|
|
1005
|
+
logos?: string | undefined;
|
|
1006
|
+
website?: string | undefined;
|
|
1007
|
+
email?: string | undefined;
|
|
1008
|
+
phone?: string | undefined;
|
|
1009
|
+
} | undefined;
|
|
1010
|
+
}, {
|
|
1011
|
+
agents: {
|
|
1012
|
+
deployed?: {
|
|
1013
|
+
web?: string | undefined;
|
|
1014
|
+
phone?: string | undefined;
|
|
1015
|
+
email?: string | undefined;
|
|
1016
|
+
} | undefined;
|
|
1017
|
+
firstName?: string | undefined;
|
|
1018
|
+
lastName?: string | undefined;
|
|
1019
|
+
inactive?: boolean | undefined;
|
|
1020
|
+
programmablePhoneNumber?: string | undefined;
|
|
1021
|
+
programmablePhoneNumberSid?: string | undefined;
|
|
1022
|
+
programmableEmail?: string | undefined;
|
|
1023
|
+
forwardEmail?: string | undefined;
|
|
1024
|
+
forwardPhone?: string | undefined;
|
|
1025
|
+
title?: string | undefined;
|
|
1026
|
+
context?: string | undefined;
|
|
1027
|
+
includedLocations?: string[] | undefined;
|
|
1028
|
+
excludedLocations?: string[] | undefined;
|
|
1029
|
+
model?: "openai" | "bard" | "Scout9" | undefined;
|
|
1030
|
+
transcripts?: {
|
|
1031
|
+
time: string;
|
|
1032
|
+
content: string;
|
|
1033
|
+
role: "agent" | "customer" | "system";
|
|
1034
|
+
name?: string | undefined;
|
|
1035
|
+
}[][] | undefined;
|
|
1036
|
+
audios?: any[] | undefined;
|
|
1037
|
+
}[];
|
|
1038
|
+
entities: {
|
|
1039
|
+
[x: string]: any;
|
|
1040
|
+
id?: any;
|
|
1041
|
+
training?: {
|
|
1042
|
+
text: string;
|
|
1043
|
+
intent?: any;
|
|
1044
|
+
}[] | undefined;
|
|
1045
|
+
tests?: {
|
|
1046
|
+
text: string;
|
|
1047
|
+
expected: {
|
|
1048
|
+
intent?: any;
|
|
1049
|
+
context?: any;
|
|
1050
|
+
};
|
|
1051
|
+
}[] | undefined;
|
|
1052
|
+
definitions?: {
|
|
1053
|
+
[x: string]: any;
|
|
1054
|
+
utterance?: any;
|
|
1055
|
+
value?: string | undefined;
|
|
1056
|
+
text?: string[] | undefined;
|
|
1057
|
+
}[] | undefined;
|
|
1058
|
+
entities?: ZodString[] | undefined;
|
|
1059
|
+
entity?: any;
|
|
1060
|
+
api?: {
|
|
1061
|
+
GET?: boolean | undefined;
|
|
1062
|
+
UPDATE?: boolean | undefined;
|
|
1063
|
+
QUERY?: boolean | undefined;
|
|
1064
|
+
PUT?: boolean | undefined;
|
|
1065
|
+
PATCH?: boolean | undefined;
|
|
1066
|
+
DELETE?: boolean | undefined;
|
|
1067
|
+
} | null | undefined;
|
|
1068
|
+
}[];
|
|
1069
|
+
initialContext: string[];
|
|
1070
|
+
workflows: {
|
|
1071
|
+
entities: ZodString[];
|
|
1072
|
+
entity?: any;
|
|
1073
|
+
}[];
|
|
1074
|
+
llm: {
|
|
1075
|
+
model: string;
|
|
1076
|
+
engine: "openai";
|
|
1077
|
+
} | {
|
|
1078
|
+
model: string;
|
|
1079
|
+
engine: "llama";
|
|
1080
|
+
} | {
|
|
1081
|
+
model: string;
|
|
1082
|
+
engine: "bard";
|
|
1083
|
+
};
|
|
1084
|
+
pmt: {
|
|
1085
|
+
model: string;
|
|
1086
|
+
engine: "scout9";
|
|
1087
|
+
};
|
|
1088
|
+
tag?: string | undefined;
|
|
1089
|
+
maxLockAttempts?: number | undefined;
|
|
1090
|
+
organization?: {
|
|
1091
|
+
name: string;
|
|
1092
|
+
description: string;
|
|
1093
|
+
dashboard?: string | undefined;
|
|
1094
|
+
logo?: string | undefined;
|
|
1095
|
+
icon?: string | undefined;
|
|
1096
|
+
logos?: string | undefined;
|
|
1097
|
+
website?: string | undefined;
|
|
1098
|
+
email?: string | undefined;
|
|
1099
|
+
phone?: string | undefined;
|
|
1100
|
+
} | undefined;
|
|
1101
|
+
}>;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
540
1104
|
declare module '@scout9/app/spirits' {
|
|
541
1105
|
export namespace Spirits {
|
|
542
1106
|
function customer(input: ConversationData & CustomerSpiritCallbacks): Promise<ConversationEvent>;
|
package/types/index.d.ts.map
CHANGED
|
@@ -42,17 +42,20 @@
|
|
|
42
42
|
"createMockMessage",
|
|
43
43
|
"createMockConversation",
|
|
44
44
|
"createMockWorkflowEvent",
|
|
45
|
-
"Scout9Test"
|
|
45
|
+
"Scout9Test",
|
|
46
|
+
"Scout9ProjectBuildConfigSchema"
|
|
46
47
|
],
|
|
47
48
|
"sources": [
|
|
48
49
|
"../src/public.d.ts",
|
|
49
50
|
"../src/testing-tools/mocks.js",
|
|
50
|
-
"../src/testing-tools/dev.js"
|
|
51
|
+
"../src/testing-tools/dev.js",
|
|
52
|
+
"../src/runtime/client/config.js"
|
|
51
53
|
],
|
|
52
54
|
"sourcesContent": [
|
|
55
|
+
null,
|
|
53
56
|
null,
|
|
54
57
|
null,
|
|
55
58
|
null
|
|
56
59
|
],
|
|
57
|
-
"mappings": ";;;;mBAIiBA,mBAAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA+DnBC,iBAAiBA;;;;;;;;;;;;;;;;;;;;;mBAqBjBC,yBAAyBA;;;;;;;;;;;;;;cAc9BC,mBAAmBA;;cAEnBC,mBAAmBA;;;;cAInBC,oBAAoBA;;;;mBAIfC,wBAAwBA;;;;;;;mBAOxBC,aAAaA;;;;mBAIbC,YAAYA;;;;;mBAKZC,UAAUA;;;;;mBAKVC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2BZC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2BPC,QAAQA;;;;;;;;;;;;;;;;;;;;mBAoBRC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BVC,OAAOA;;;;;mBAKFC,aAAaA;;;;;;;;;;;;;;;mBAebC,WAAWA;;;;;mBAKXC,oBAAoBA;;;;;;;;;;;;;;;;;;;;cAoBzBC,gBAAgBA;;cAEhBC,gBAAgBA;;kBAEJC,IAAIA;;kBAEJC,GAAGA;;kBAEHC,SAASA;;kBAETC,KAAKA;;kBAELC,MAAMA;;eAEjBC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCdC,iBAAiBA;;;;;cAKjBC,WAAWA;cACXC,gBAAgBA;cAChBC,cAAcA;cACdC,eAAeA;cACfC,cAAcA;cACdC,gBAAgBA;cAChBC,iBAAiBA;;;cAGjBC,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;iBCpVnBC,eAAeA;iBAWfC,kBAAkBA;iBAgBlBC,iBAAiBA;iBAcjBC,sBAAsBA;iBAatBC,uBAAuBA;;;;cC7CvBC,UAAUA"
|
|
60
|
+
"mappings": ";;;;mBAIiBA,mBAAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA+DnBC,iBAAiBA;;;;;;;;;;;;;;;;;;;;;mBAqBjBC,yBAAyBA;;;;;;;;;;;;;;cAc9BC,mBAAmBA;;cAEnBC,mBAAmBA;;;;cAInBC,oBAAoBA;;;;mBAIfC,wBAAwBA;;;;;;;mBAOxBC,aAAaA;;;;mBAIbC,YAAYA;;;;;mBAKZC,UAAUA;;;;;mBAKVC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2BZC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2BPC,QAAQA;;;;;;;;;;;;;;;;;;;;mBAoBRC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BVC,OAAOA;;;;;mBAKFC,aAAaA;;;;;;;;;;;;;;;mBAebC,WAAWA;;;;;mBAKXC,oBAAoBA;;;;;;;;;;;;;;;;;;;;cAoBzBC,gBAAgBA;;cAEhBC,gBAAgBA;;kBAEJC,IAAIA;;kBAEJC,GAAGA;;kBAEHC,SAASA;;kBAETC,KAAKA;;kBAELC,MAAMA;;eAEjBC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCdC,iBAAiBA;;;;;cAKjBC,WAAWA;cACXC,gBAAgBA;cAChBC,cAAcA;cACdC,eAAeA;cACfC,cAAcA;cACdC,gBAAgBA;cAChBC,iBAAiBA;;;cAGjBC,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;iBCpVnBC,eAAeA;iBAWfC,kBAAkBA;iBAgBlBC,iBAAiBA;iBAcjBC,sBAAsBA;iBAatBC,uBAAuBA;;;;cC7CvBC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCkCVC,8BAA8BA"
|
|
58
61
|
}
|