syllable-sdk 1.0.13-rc.3 → 1.0.13-rc.5
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/bin/mcp-server.js +2809 -806
- package/bin/mcp-server.js.map +34 -9
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/bodyinsightsfolderuploadfile.d.ts +8 -8
- package/models/components/bodyinsightsfolderuploadfile.d.ts.map +1 -1
- package/models/components/bodyinsightsfolderuploadfile.js +11 -12
- package/models/components/bodyinsightsfolderuploadfile.js.map +1 -1
- package/models/components/callaction.d.ts +113 -0
- package/models/components/callaction.d.ts.map +1 -0
- package/models/components/callaction.js +174 -0
- package/models/components/callaction.js.map +1 -0
- package/models/components/caseexpression.d.ts +18 -0
- package/models/components/caseexpression.d.ts.map +1 -0
- package/models/components/caseexpression.js +59 -0
- package/models/components/caseexpression.js.map +1 -0
- package/models/components/celexpression.d.ts +28 -0
- package/models/components/celexpression.d.ts.map +1 -0
- package/models/components/celexpression.js +60 -0
- package/models/components/celexpression.js.map +1 -0
- package/models/components/conditionaltext.d.ts +85 -0
- package/models/components/conditionaltext.d.ts.map +1 -0
- package/models/components/conditionaltext.js +147 -0
- package/models/components/conditionaltext.js.map +1 -0
- package/models/components/conditionalvalue.d.ts +147 -0
- package/models/components/conditionalvalue.d.ts.map +1 -0
- package/models/components/conditionalvalue.js +248 -0
- package/models/components/conditionalvalue.js.map +1 -0
- package/models/components/context.d.ts +150 -0
- package/models/components/context.d.ts.map +1 -0
- package/models/components/context.js +265 -0
- package/models/components/context.js.map +1 -0
- package/models/components/contexttaskmetadata.d.ts +22 -0
- package/models/components/contexttaskmetadata.d.ts.map +1 -0
- package/models/components/contexttaskmetadata.js +69 -0
- package/models/components/contexttaskmetadata.js.map +1 -0
- package/models/components/contexttoolinfo.d.ts +25 -0
- package/models/components/contexttoolinfo.d.ts.map +1 -0
- package/models/components/contexttoolinfo.js +60 -0
- package/models/components/contexttoolinfo.js.map +1 -0
- package/models/components/eventtask.d.ts +42 -0
- package/models/components/eventtask.d.ts.map +1 -0
- package/models/components/eventtask.js +76 -0
- package/models/components/eventtask.js.map +1 -0
- package/models/components/eventtaskevents.d.ts +74 -0
- package/models/components/eventtaskevents.d.ts.map +1 -0
- package/models/components/eventtaskevents.js +139 -0
- package/models/components/eventtaskevents.js.map +1 -0
- package/models/components/expressiontask.d.ts +109 -0
- package/models/components/expressiontask.d.ts.map +1 -0
- package/models/components/expressiontask.js +170 -0
- package/models/components/expressiontask.js.map +1 -0
- package/models/components/expressiontaskevents.d.ts +131 -0
- package/models/components/expressiontaskevents.d.ts.map +1 -0
- package/models/components/expressiontaskevents.js +219 -0
- package/models/components/expressiontaskevents.js.map +1 -0
- package/models/components/incrementaction.d.ts +92 -0
- package/models/components/incrementaction.d.ts.map +1 -0
- package/models/components/incrementaction.js +151 -0
- package/models/components/incrementaction.js.map +1 -0
- package/models/components/index.d.ts +25 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +25 -0
- package/models/components/index.js.map +1 -1
- package/models/components/inputparameter.d.ts +51 -0
- package/models/components/inputparameter.d.ts.map +1 -0
- package/models/components/inputparameter.js +87 -0
- package/models/components/inputparameter.js.map +1 -0
- package/models/components/jmespathexpression.d.ts +44 -0
- package/models/components/jmespathexpression.d.ts.map +1 -0
- package/models/components/jmespathexpression.js +71 -0
- package/models/components/jmespathexpression.js.map +1 -0
- package/models/components/loadtoolfromfiletask.d.ts +59 -0
- package/models/components/loadtoolfromfiletask.d.ts.map +1 -0
- package/models/components/loadtoolfromfiletask.js +88 -0
- package/models/components/loadtoolfromfiletask.js.map +1 -0
- package/models/components/nextstep.d.ts +93 -0
- package/models/components/nextstep.d.ts.map +1 -0
- package/models/components/nextstep.js +149 -0
- package/models/components/nextstep.js.map +1 -0
- package/models/components/saveaction.d.ts +92 -0
- package/models/components/saveaction.d.ts.map +1 -0
- package/models/components/saveaction.js +151 -0
- package/models/components/saveaction.js.map +1 -0
- package/models/components/sayaction.d.ts +108 -0
- package/models/components/sayaction.d.ts.map +1 -0
- package/models/components/sayaction.js +162 -0
- package/models/components/sayaction.js.map +1 -0
- package/models/components/setvalueaction.d.ts +154 -0
- package/models/components/setvalueaction.d.ts.map +1 -0
- package/models/components/setvalueaction.js +246 -0
- package/models/components/setvalueaction.js.map +1 -0
- package/models/components/step.d.ts +73 -0
- package/models/components/step.d.ts.map +1 -0
- package/models/components/step.js +103 -0
- package/models/components/step.js.map +1 -0
- package/models/components/stepeventactions.d.ts +185 -0
- package/models/components/stepeventactions.d.ts.map +1 -0
- package/models/components/stepeventactions.js +296 -0
- package/models/components/stepeventactions.js.map +1 -0
- package/models/components/stepstask.d.ts +42 -0
- package/models/components/stepstask.d.ts.map +1 -0
- package/models/components/stepstask.js +76 -0
- package/models/components/stepstask.js.map +1 -0
- package/models/components/steptools.d.ts +33 -0
- package/models/components/steptools.d.ts.map +1 -0
- package/models/components/steptools.js +71 -0
- package/models/components/steptools.js.map +1 -0
- package/models/components/tooldefinition.d.ts +6 -0
- package/models/components/tooldefinition.d.ts.map +1 -1
- package/models/components/tooldefinition.js +3 -0
- package/models/components/tooldefinition.js.map +1 -1
- package/models/components/variable.d.ts +119 -0
- package/models/components/variable.d.ts.map +1 -0
- package/models/components/variable.js +186 -0
- package/models/components/variable.js.map +1 -0
- package/openapi.json +2138 -291
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/bodyinsightsfolderuploadfile.ts +36 -25
- package/src/models/components/callaction.ts +331 -0
- package/src/models/components/caseexpression.ts +53 -0
- package/src/models/components/celexpression.ts +60 -0
- package/src/models/components/conditionaltext.ts +280 -0
- package/src/models/components/conditionalvalue.ts +477 -0
- package/src/models/components/context.ts +485 -0
- package/src/models/components/contexttaskmetadata.ts +67 -0
- package/src/models/components/contexttoolinfo.ts +59 -0
- package/src/models/components/eventtask.ts +102 -0
- package/src/models/components/eventtaskevents.ts +257 -0
- package/src/models/components/expressiontask.ts +333 -0
- package/src/models/components/expressiontaskevents.ts +430 -0
- package/src/models/components/incrementaction.ts +291 -0
- package/src/models/components/index.ts +25 -0
- package/src/models/components/inputparameter.ts +103 -0
- package/src/models/components/jmespathexpression.ts +86 -0
- package/src/models/components/loadtoolfromfiletask.ts +137 -0
- package/src/models/components/nextstep.ts +280 -0
- package/src/models/components/saveaction.ts +281 -0
- package/src/models/components/sayaction.ts +302 -0
- package/src/models/components/setvalueaction.ts +508 -0
- package/src/models/components/step.ts +174 -0
- package/src/models/components/stepeventactions.ts +619 -0
- package/src/models/components/stepstask.ts +102 -0
- package/src/models/components/steptools.ts +76 -0
- package/src/models/components/tooldefinition.ts +13 -0
- package/src/models/components/variable.ts +332 -0
- package/src/types/enums.ts +1 -21
- package/src/types/index.ts +2 -1
- package/src/types/unrecognized.ts +27 -0
- package/types/enums.d.ts +1 -8
- package/types/enums.d.ts.map +1 -1
- package/types/enums.js +3 -21
- package/types/enums.js.map +1 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/index.js +15 -0
- package/types/index.js.map +1 -1
- package/types/unrecognized.d.ts +10 -0
- package/types/unrecognized.d.ts.map +1 -0
- package/types/unrecognized.js +26 -0
- package/types/unrecognized.js.map +1 -0
|
@@ -29,7 +29,10 @@ export * from "./bodyorganizationsupdate.js";
|
|
|
29
29
|
export * from "./bodyoutboundbatchdelete.js";
|
|
30
30
|
export * from "./bodyoutboundbatchupload.js";
|
|
31
31
|
export * from "./bodypronunciationsuploadcsv.js";
|
|
32
|
+
export * from "./callaction.js";
|
|
32
33
|
export * from "./campaignproperties.js";
|
|
34
|
+
export * from "./caseexpression.js";
|
|
35
|
+
export * from "./celexpression.js";
|
|
33
36
|
export * from "./channel.js";
|
|
34
37
|
export * from "./channelconfigview.js";
|
|
35
38
|
export * from "./channelproperties.js";
|
|
@@ -43,6 +46,11 @@ export * from "./communicationbatchinput.js";
|
|
|
43
46
|
export * from "./communicationbatchupdate.js";
|
|
44
47
|
export * from "./communicationrequest.js";
|
|
45
48
|
export * from "./communicationrequestresult.js";
|
|
49
|
+
export * from "./conditionaltext.js";
|
|
50
|
+
export * from "./conditionalvalue.js";
|
|
51
|
+
export * from "./context.js";
|
|
52
|
+
export * from "./contexttaskmetadata.js";
|
|
53
|
+
export * from "./contexttoolinfo.js";
|
|
46
54
|
export * from "./conversation.js";
|
|
47
55
|
export * from "./conversationproperties.js";
|
|
48
56
|
export * from "./createtakeoutresponse.js";
|
|
@@ -76,12 +84,18 @@ export * from "./directorymembertestresponse.js";
|
|
|
76
84
|
export * from "./directorymemberupdate.js";
|
|
77
85
|
export * from "./event.js";
|
|
78
86
|
export * from "./eventproperties.js";
|
|
87
|
+
export * from "./eventtask.js";
|
|
88
|
+
export * from "./eventtaskevents.js";
|
|
89
|
+
export * from "./expressiontask.js";
|
|
90
|
+
export * from "./expressiontaskevents.js";
|
|
79
91
|
export * from "./folderdetails.js";
|
|
80
92
|
export * from "./incidentcreaterequest.js";
|
|
81
93
|
export * from "./incidentorganizationresponse.js";
|
|
82
94
|
export * from "./incidentproperties.js";
|
|
83
95
|
export * from "./incidentresponse.js";
|
|
84
96
|
export * from "./incidentupdaterequest.js";
|
|
97
|
+
export * from "./incrementaction.js";
|
|
98
|
+
export * from "./inputparameter.js";
|
|
85
99
|
export * from "./insightsfolder.js";
|
|
86
100
|
export * from "./insightsfolderfilemove.js";
|
|
87
101
|
export * from "./insightsfolderinput.js";
|
|
@@ -104,6 +118,7 @@ export * from "./insightworkflowoutput.js";
|
|
|
104
118
|
export * from "./insightworkflowproperties.js";
|
|
105
119
|
export * from "./inspectlatencyresponse.js";
|
|
106
120
|
export * from "./internaltool.js";
|
|
121
|
+
export * from "./jmespathexpression.js";
|
|
107
122
|
export * from "./languagecode.js";
|
|
108
123
|
export * from "./languageconfig.js";
|
|
109
124
|
export * from "./languagegroupagentinfo.js";
|
|
@@ -142,8 +157,10 @@ export * from "./listresponsesessionlabel.js";
|
|
|
142
157
|
export * from "./listresponsetoolresponse.js";
|
|
143
158
|
export * from "./listresponseuserresponse.js";
|
|
144
159
|
export * from "./listresponsevoicegroupresponse.js";
|
|
160
|
+
export * from "./loadtoolfromfiletask.js";
|
|
145
161
|
export * from "./logintype.js";
|
|
146
162
|
export * from "./matchtype.js";
|
|
163
|
+
export * from "./nextstep.js";
|
|
147
164
|
export * from "./orderbydirection.js";
|
|
148
165
|
export * from "./organizationchannelconfig.js";
|
|
149
166
|
export * from "./organizationchannelcreaterequest.js";
|
|
@@ -169,6 +186,8 @@ export * from "./rolecreaterequest.js";
|
|
|
169
186
|
export * from "./roleproperties.js";
|
|
170
187
|
export * from "./roleresponse.js";
|
|
171
188
|
export * from "./roleupdaterequest.js";
|
|
189
|
+
export * from "./saveaction.js";
|
|
190
|
+
export * from "./sayaction.js";
|
|
172
191
|
export * from "./security.js";
|
|
173
192
|
export * from "./servicecreaterequest.js";
|
|
174
193
|
export * from "./serviceproperties.js";
|
|
@@ -186,8 +205,13 @@ export * from "./sessionrecordingresponse.js";
|
|
|
186
205
|
export * from "./sessionsummaryresponse.js";
|
|
187
206
|
export * from "./sessiontext.js";
|
|
188
207
|
export * from "./sessiontranscriptionresponse.js";
|
|
208
|
+
export * from "./setvalueaction.js";
|
|
189
209
|
export * from "./statictoolparameter.js";
|
|
190
210
|
export * from "./statictoolparametertype.js";
|
|
211
|
+
export * from "./step.js";
|
|
212
|
+
export * from "./stepeventactions.js";
|
|
213
|
+
export * from "./stepstask.js";
|
|
214
|
+
export * from "./steptools.js";
|
|
191
215
|
export * from "./summaryentry.js";
|
|
192
216
|
export * from "./supportedllm.js";
|
|
193
217
|
export * from "./takeoutrequeststatus.js";
|
|
@@ -232,6 +256,7 @@ export * from "./userproperties.js";
|
|
|
232
256
|
export * from "./userresponse.js";
|
|
233
257
|
export * from "./userupdaterequest.js";
|
|
234
258
|
export * from "./validationerror.js";
|
|
259
|
+
export * from "./variable.js";
|
|
235
260
|
export * from "./voicedisplayinfo.js";
|
|
236
261
|
export * from "./voicegroupcreaterequest.js";
|
|
237
262
|
export * from "./voicegroupproperties.js";
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const InputParameterType = {
|
|
12
|
+
String: "string",
|
|
13
|
+
Number: "number",
|
|
14
|
+
Integer: "integer",
|
|
15
|
+
Boolean: "boolean",
|
|
16
|
+
Object: "object",
|
|
17
|
+
Array: "array",
|
|
18
|
+
Null: "null",
|
|
19
|
+
} as const;
|
|
20
|
+
export type InputParameterType = ClosedEnum<typeof InputParameterType>;
|
|
21
|
+
|
|
22
|
+
export type InputParameter = {
|
|
23
|
+
/**
|
|
24
|
+
* The name of the property.
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
type?: InputParameterType | null | undefined;
|
|
28
|
+
description?: string | null | undefined;
|
|
29
|
+
title?: string | null | undefined;
|
|
30
|
+
format?: string | null | undefined;
|
|
31
|
+
pattern?: string | null | undefined;
|
|
32
|
+
enum?: Array<string> | null | undefined;
|
|
33
|
+
examples?: Array<any> | null | undefined;
|
|
34
|
+
required?: boolean | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const InputParameterType$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof InputParameterType
|
|
40
|
+
> = z.nativeEnum(InputParameterType);
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const InputParameterType$outboundSchema: z.ZodNativeEnum<
|
|
43
|
+
typeof InputParameterType
|
|
44
|
+
> = InputParameterType$inboundSchema;
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const InputParameter$inboundSchema: z.ZodType<
|
|
48
|
+
InputParameter,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
name: z.string(),
|
|
53
|
+
type: z.nullable(InputParameterType$inboundSchema).optional(),
|
|
54
|
+
description: z.nullable(z.string()).optional(),
|
|
55
|
+
title: z.nullable(z.string()).optional(),
|
|
56
|
+
format: z.nullable(z.string()).optional(),
|
|
57
|
+
pattern: z.nullable(z.string()).optional(),
|
|
58
|
+
enum: z.nullable(z.array(z.string())).optional(),
|
|
59
|
+
examples: z.nullable(z.array(z.any())).optional(),
|
|
60
|
+
required: z.boolean().default(true),
|
|
61
|
+
});
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type InputParameter$Outbound = {
|
|
64
|
+
name: string;
|
|
65
|
+
type?: string | null | undefined;
|
|
66
|
+
description?: string | null | undefined;
|
|
67
|
+
title?: string | null | undefined;
|
|
68
|
+
format?: string | null | undefined;
|
|
69
|
+
pattern?: string | null | undefined;
|
|
70
|
+
enum?: Array<string> | null | undefined;
|
|
71
|
+
examples?: Array<any> | null | undefined;
|
|
72
|
+
required: boolean;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const InputParameter$outboundSchema: z.ZodType<
|
|
77
|
+
InputParameter$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
InputParameter
|
|
80
|
+
> = z.object({
|
|
81
|
+
name: z.string(),
|
|
82
|
+
type: z.nullable(InputParameterType$outboundSchema).optional(),
|
|
83
|
+
description: z.nullable(z.string()).optional(),
|
|
84
|
+
title: z.nullable(z.string()).optional(),
|
|
85
|
+
format: z.nullable(z.string()).optional(),
|
|
86
|
+
pattern: z.nullable(z.string()).optional(),
|
|
87
|
+
enum: z.nullable(z.array(z.string())).optional(),
|
|
88
|
+
examples: z.nullable(z.array(z.any())).optional(),
|
|
89
|
+
required: z.boolean().default(true),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export function inputParameterToJSON(inputParameter: InputParameter): string {
|
|
93
|
+
return JSON.stringify(InputParameter$outboundSchema.parse(inputParameter));
|
|
94
|
+
}
|
|
95
|
+
export function inputParameterFromJSON(
|
|
96
|
+
jsonString: string,
|
|
97
|
+
): SafeParseResult<InputParameter, SDKValidationError> {
|
|
98
|
+
return safeParse(
|
|
99
|
+
jsonString,
|
|
100
|
+
(x) => InputParameter$inboundSchema.parse(JSON.parse(x)),
|
|
101
|
+
`Failed to parse 'InputParameter' from JSON`,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* JMESPath expression.
|
|
13
|
+
*/
|
|
14
|
+
export const JMESPathExpressionType = {
|
|
15
|
+
Jp: "jp",
|
|
16
|
+
Jmespath: "jmespath",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* JMESPath expression.
|
|
20
|
+
*/
|
|
21
|
+
export type JMESPathExpressionType = ClosedEnum<typeof JMESPathExpressionType>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* See https://jmespath.org/specification.html#grammar
|
|
25
|
+
*/
|
|
26
|
+
export type JMESPathExpression = {
|
|
27
|
+
/**
|
|
28
|
+
* The expression to evaluate.
|
|
29
|
+
*/
|
|
30
|
+
expression: string;
|
|
31
|
+
/**
|
|
32
|
+
* JMESPath expression.
|
|
33
|
+
*/
|
|
34
|
+
type?: JMESPathExpressionType | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const JMESPathExpressionType$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof JMESPathExpressionType
|
|
40
|
+
> = z.nativeEnum(JMESPathExpressionType);
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const JMESPathExpressionType$outboundSchema: z.ZodNativeEnum<
|
|
43
|
+
typeof JMESPathExpressionType
|
|
44
|
+
> = JMESPathExpressionType$inboundSchema;
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const JMESPathExpression$inboundSchema: z.ZodType<
|
|
48
|
+
JMESPathExpression,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
expression: z.string(),
|
|
53
|
+
type: JMESPathExpressionType$inboundSchema.default("jp"),
|
|
54
|
+
});
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type JMESPathExpression$Outbound = {
|
|
57
|
+
expression: string;
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const JMESPathExpression$outboundSchema: z.ZodType<
|
|
63
|
+
JMESPathExpression$Outbound,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
JMESPathExpression
|
|
66
|
+
> = z.object({
|
|
67
|
+
expression: z.string(),
|
|
68
|
+
type: JMESPathExpressionType$outboundSchema.default("jp"),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function jmesPathExpressionToJSON(
|
|
72
|
+
jmesPathExpression: JMESPathExpression,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
JMESPathExpression$outboundSchema.parse(jmesPathExpression),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
export function jmesPathExpressionFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<JMESPathExpression, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => JMESPathExpression$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'JMESPathExpression' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
ContextTaskMetadata,
|
|
11
|
+
ContextTaskMetadata$inboundSchema,
|
|
12
|
+
ContextTaskMetadata$Outbound,
|
|
13
|
+
ContextTaskMetadata$outboundSchema,
|
|
14
|
+
} from "./contexttaskmetadata.js";
|
|
15
|
+
import {
|
|
16
|
+
ContextToolInfo,
|
|
17
|
+
ContextToolInfo$inboundSchema,
|
|
18
|
+
ContextToolInfo$Outbound,
|
|
19
|
+
ContextToolInfo$outboundSchema,
|
|
20
|
+
} from "./contexttoolinfo.js";
|
|
21
|
+
import {
|
|
22
|
+
Variable,
|
|
23
|
+
Variable$inboundSchema,
|
|
24
|
+
Variable$Outbound,
|
|
25
|
+
Variable$outboundSchema,
|
|
26
|
+
} from "./variable.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The local path of the tool definition JSON file.
|
|
30
|
+
*/
|
|
31
|
+
export type FileT = string | Array<string>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Bootstraps a tool from a file (for internal developer use only if ENV.local=True).
|
|
35
|
+
*/
|
|
36
|
+
export type LoadToolFromFileTask = {
|
|
37
|
+
/**
|
|
38
|
+
* A unique identifier for the task.
|
|
39
|
+
*/
|
|
40
|
+
id?: string | null | undefined;
|
|
41
|
+
config?: { [k: string]: any } | null | undefined;
|
|
42
|
+
variables?: Array<Variable> | null | undefined;
|
|
43
|
+
metadata?: ContextTaskMetadata | null | undefined;
|
|
44
|
+
tool?: ContextToolInfo | null | undefined;
|
|
45
|
+
type?: "import" | undefined;
|
|
46
|
+
version?: "v1alpha" | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The local path of the tool definition JSON file.
|
|
49
|
+
*/
|
|
50
|
+
file: string | Array<string>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
|
|
55
|
+
.union([z.string(), z.array(z.string())]);
|
|
56
|
+
/** @internal */
|
|
57
|
+
export type FileT$Outbound = string | Array<string>;
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const FileT$outboundSchema: z.ZodType<
|
|
61
|
+
FileT$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
FileT
|
|
64
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
65
|
+
|
|
66
|
+
export function fileToJSON(fileT: FileT): string {
|
|
67
|
+
return JSON.stringify(FileT$outboundSchema.parse(fileT));
|
|
68
|
+
}
|
|
69
|
+
export function fileFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<FileT, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => FileT$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'FileT' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const LoadToolFromFileTask$inboundSchema: z.ZodType<
|
|
81
|
+
LoadToolFromFileTask,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = z.object({
|
|
85
|
+
id: z.nullable(z.string()).optional(),
|
|
86
|
+
config: z.nullable(z.record(z.any())).optional(),
|
|
87
|
+
variables: z.nullable(z.array(Variable$inboundSchema)).optional(),
|
|
88
|
+
metadata: z.nullable(ContextTaskMetadata$inboundSchema).optional(),
|
|
89
|
+
tool: z.nullable(ContextToolInfo$inboundSchema).optional(),
|
|
90
|
+
type: z.literal("import").default("import"),
|
|
91
|
+
version: z.literal("v1alpha").default("v1alpha"),
|
|
92
|
+
file: z.union([z.string(), z.array(z.string())]),
|
|
93
|
+
});
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type LoadToolFromFileTask$Outbound = {
|
|
96
|
+
id?: string | null | undefined;
|
|
97
|
+
config?: { [k: string]: any } | null | undefined;
|
|
98
|
+
variables?: Array<Variable$Outbound> | null | undefined;
|
|
99
|
+
metadata?: ContextTaskMetadata$Outbound | null | undefined;
|
|
100
|
+
tool?: ContextToolInfo$Outbound | null | undefined;
|
|
101
|
+
type: "import";
|
|
102
|
+
version: "v1alpha";
|
|
103
|
+
file: string | Array<string>;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const LoadToolFromFileTask$outboundSchema: z.ZodType<
|
|
108
|
+
LoadToolFromFileTask$Outbound,
|
|
109
|
+
z.ZodTypeDef,
|
|
110
|
+
LoadToolFromFileTask
|
|
111
|
+
> = z.object({
|
|
112
|
+
id: z.nullable(z.string()).optional(),
|
|
113
|
+
config: z.nullable(z.record(z.any())).optional(),
|
|
114
|
+
variables: z.nullable(z.array(Variable$outboundSchema)).optional(),
|
|
115
|
+
metadata: z.nullable(ContextTaskMetadata$outboundSchema).optional(),
|
|
116
|
+
tool: z.nullable(ContextToolInfo$outboundSchema).optional(),
|
|
117
|
+
type: z.literal("import").default("import" as const),
|
|
118
|
+
version: z.literal("v1alpha").default("v1alpha" as const),
|
|
119
|
+
file: z.union([z.string(), z.array(z.string())]),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
export function loadToolFromFileTaskToJSON(
|
|
123
|
+
loadToolFromFileTask: LoadToolFromFileTask,
|
|
124
|
+
): string {
|
|
125
|
+
return JSON.stringify(
|
|
126
|
+
LoadToolFromFileTask$outboundSchema.parse(loadToolFromFileTask),
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
export function loadToolFromFileTaskFromJSON(
|
|
130
|
+
jsonString: string,
|
|
131
|
+
): SafeParseResult<LoadToolFromFileTask, SDKValidationError> {
|
|
132
|
+
return safeParse(
|
|
133
|
+
jsonString,
|
|
134
|
+
(x) => LoadToolFromFileTask$inboundSchema.parse(JSON.parse(x)),
|
|
135
|
+
`Failed to parse 'LoadToolFromFileTask' from JSON`,
|
|
136
|
+
);
|
|
137
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CaseExpression,
|
|
11
|
+
CaseExpression$inboundSchema,
|
|
12
|
+
CaseExpression$Outbound,
|
|
13
|
+
CaseExpression$outboundSchema,
|
|
14
|
+
} from "./caseexpression.js";
|
|
15
|
+
import {
|
|
16
|
+
CelExpression,
|
|
17
|
+
CelExpression$inboundSchema,
|
|
18
|
+
CelExpression$Outbound,
|
|
19
|
+
CelExpression$outboundSchema,
|
|
20
|
+
} from "./celexpression.js";
|
|
21
|
+
import {
|
|
22
|
+
JMESPathExpression,
|
|
23
|
+
JMESPathExpression$inboundSchema,
|
|
24
|
+
JMESPathExpression$Outbound,
|
|
25
|
+
JMESPathExpression$outboundSchema,
|
|
26
|
+
} from "./jmespathexpression.js";
|
|
27
|
+
|
|
28
|
+
export type NextStepIf1 =
|
|
29
|
+
| (CelExpression & { type: "cel" })
|
|
30
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
31
|
+
| (JMESPathExpression & { type: "jp" });
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* An expression that must evaluate to true for the action to be applied.
|
|
35
|
+
*/
|
|
36
|
+
export type NextStepIf =
|
|
37
|
+
| CaseExpression
|
|
38
|
+
| (CelExpression & { type: "cel" })
|
|
39
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
40
|
+
| (JMESPathExpression & { type: "jp" })
|
|
41
|
+
| string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Represents a conditional transition to the next step.
|
|
45
|
+
*/
|
|
46
|
+
export type NextStep = {
|
|
47
|
+
/**
|
|
48
|
+
* An expression that must evaluate to true for the action to be applied.
|
|
49
|
+
*/
|
|
50
|
+
if?:
|
|
51
|
+
| CaseExpression
|
|
52
|
+
| (CelExpression & { type: "cel" })
|
|
53
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
54
|
+
| (JMESPathExpression & { type: "jp" })
|
|
55
|
+
| string
|
|
56
|
+
| null
|
|
57
|
+
| undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The identifier of the next step.
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* List of input field names required for this transition. Validates that specified inputs are collected before allowing transition.
|
|
64
|
+
*/
|
|
65
|
+
requires?: Array<string> | null | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const NextStepIf1$inboundSchema: z.ZodType<
|
|
70
|
+
NextStepIf1,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
unknown
|
|
73
|
+
> = z.union([
|
|
74
|
+
CelExpression$inboundSchema.and(
|
|
75
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
76
|
+
),
|
|
77
|
+
JMESPathExpression$inboundSchema.and(
|
|
78
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
79
|
+
type: v.type,
|
|
80
|
+
})),
|
|
81
|
+
),
|
|
82
|
+
JMESPathExpression$inboundSchema.and(
|
|
83
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
84
|
+
),
|
|
85
|
+
]);
|
|
86
|
+
/** @internal */
|
|
87
|
+
export type NextStepIf1$Outbound =
|
|
88
|
+
| (CelExpression$Outbound & { type: "cel" })
|
|
89
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
90
|
+
| (JMESPathExpression$Outbound & { type: "jp" });
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const NextStepIf1$outboundSchema: z.ZodType<
|
|
94
|
+
NextStepIf1$Outbound,
|
|
95
|
+
z.ZodTypeDef,
|
|
96
|
+
NextStepIf1
|
|
97
|
+
> = z.union([
|
|
98
|
+
CelExpression$outboundSchema.and(
|
|
99
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
100
|
+
),
|
|
101
|
+
JMESPathExpression$outboundSchema.and(
|
|
102
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
103
|
+
type: v.type,
|
|
104
|
+
})),
|
|
105
|
+
),
|
|
106
|
+
JMESPathExpression$outboundSchema.and(
|
|
107
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
108
|
+
),
|
|
109
|
+
]);
|
|
110
|
+
|
|
111
|
+
export function nextStepIf1ToJSON(nextStepIf1: NextStepIf1): string {
|
|
112
|
+
return JSON.stringify(NextStepIf1$outboundSchema.parse(nextStepIf1));
|
|
113
|
+
}
|
|
114
|
+
export function nextStepIf1FromJSON(
|
|
115
|
+
jsonString: string,
|
|
116
|
+
): SafeParseResult<NextStepIf1, SDKValidationError> {
|
|
117
|
+
return safeParse(
|
|
118
|
+
jsonString,
|
|
119
|
+
(x) => NextStepIf1$inboundSchema.parse(JSON.parse(x)),
|
|
120
|
+
`Failed to parse 'NextStepIf1' from JSON`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export const NextStepIf$inboundSchema: z.ZodType<
|
|
126
|
+
NextStepIf,
|
|
127
|
+
z.ZodTypeDef,
|
|
128
|
+
unknown
|
|
129
|
+
> = z.union([
|
|
130
|
+
CaseExpression$inboundSchema,
|
|
131
|
+
z.union([
|
|
132
|
+
CelExpression$inboundSchema.and(
|
|
133
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
134
|
+
),
|
|
135
|
+
JMESPathExpression$inboundSchema.and(
|
|
136
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
137
|
+
type: v.type,
|
|
138
|
+
})),
|
|
139
|
+
),
|
|
140
|
+
JMESPathExpression$inboundSchema.and(
|
|
141
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
142
|
+
),
|
|
143
|
+
]),
|
|
144
|
+
z.string(),
|
|
145
|
+
]);
|
|
146
|
+
/** @internal */
|
|
147
|
+
export type NextStepIf$Outbound =
|
|
148
|
+
| CaseExpression$Outbound
|
|
149
|
+
| (CelExpression$Outbound & { type: "cel" })
|
|
150
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
151
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
152
|
+
| string;
|
|
153
|
+
|
|
154
|
+
/** @internal */
|
|
155
|
+
export const NextStepIf$outboundSchema: z.ZodType<
|
|
156
|
+
NextStepIf$Outbound,
|
|
157
|
+
z.ZodTypeDef,
|
|
158
|
+
NextStepIf
|
|
159
|
+
> = z.union([
|
|
160
|
+
CaseExpression$outboundSchema,
|
|
161
|
+
z.union([
|
|
162
|
+
CelExpression$outboundSchema.and(
|
|
163
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
164
|
+
),
|
|
165
|
+
JMESPathExpression$outboundSchema.and(
|
|
166
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
167
|
+
type: v.type,
|
|
168
|
+
})),
|
|
169
|
+
),
|
|
170
|
+
JMESPathExpression$outboundSchema.and(
|
|
171
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
172
|
+
),
|
|
173
|
+
]),
|
|
174
|
+
z.string(),
|
|
175
|
+
]);
|
|
176
|
+
|
|
177
|
+
export function nextStepIfToJSON(nextStepIf: NextStepIf): string {
|
|
178
|
+
return JSON.stringify(NextStepIf$outboundSchema.parse(nextStepIf));
|
|
179
|
+
}
|
|
180
|
+
export function nextStepIfFromJSON(
|
|
181
|
+
jsonString: string,
|
|
182
|
+
): SafeParseResult<NextStepIf, SDKValidationError> {
|
|
183
|
+
return safeParse(
|
|
184
|
+
jsonString,
|
|
185
|
+
(x) => NextStepIf$inboundSchema.parse(JSON.parse(x)),
|
|
186
|
+
`Failed to parse 'NextStepIf' from JSON`,
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** @internal */
|
|
191
|
+
export const NextStep$inboundSchema: z.ZodType<
|
|
192
|
+
NextStep,
|
|
193
|
+
z.ZodTypeDef,
|
|
194
|
+
unknown
|
|
195
|
+
> = z.object({
|
|
196
|
+
if: z.nullable(
|
|
197
|
+
z.union([
|
|
198
|
+
CaseExpression$inboundSchema,
|
|
199
|
+
z.union([
|
|
200
|
+
CelExpression$inboundSchema.and(
|
|
201
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({
|
|
202
|
+
type: v.type,
|
|
203
|
+
})),
|
|
204
|
+
),
|
|
205
|
+
JMESPathExpression$inboundSchema.and(
|
|
206
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
207
|
+
type: v.type,
|
|
208
|
+
})),
|
|
209
|
+
),
|
|
210
|
+
JMESPathExpression$inboundSchema.and(
|
|
211
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({
|
|
212
|
+
type: v.type,
|
|
213
|
+
})),
|
|
214
|
+
),
|
|
215
|
+
]),
|
|
216
|
+
z.string(),
|
|
217
|
+
]),
|
|
218
|
+
).optional(),
|
|
219
|
+
id: z.string(),
|
|
220
|
+
requires: z.nullable(z.array(z.string())).optional(),
|
|
221
|
+
});
|
|
222
|
+
/** @internal */
|
|
223
|
+
export type NextStep$Outbound = {
|
|
224
|
+
if?:
|
|
225
|
+
| CaseExpression$Outbound
|
|
226
|
+
| (CelExpression$Outbound & { type: "cel" })
|
|
227
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
228
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
229
|
+
| string
|
|
230
|
+
| null
|
|
231
|
+
| undefined;
|
|
232
|
+
id: string;
|
|
233
|
+
requires?: Array<string> | null | undefined;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/** @internal */
|
|
237
|
+
export const NextStep$outboundSchema: z.ZodType<
|
|
238
|
+
NextStep$Outbound,
|
|
239
|
+
z.ZodTypeDef,
|
|
240
|
+
NextStep
|
|
241
|
+
> = z.object({
|
|
242
|
+
if: z.nullable(
|
|
243
|
+
z.union([
|
|
244
|
+
CaseExpression$outboundSchema,
|
|
245
|
+
z.union([
|
|
246
|
+
CelExpression$outboundSchema.and(
|
|
247
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({
|
|
248
|
+
type: v.type,
|
|
249
|
+
})),
|
|
250
|
+
),
|
|
251
|
+
JMESPathExpression$outboundSchema.and(
|
|
252
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
253
|
+
type: v.type,
|
|
254
|
+
})),
|
|
255
|
+
),
|
|
256
|
+
JMESPathExpression$outboundSchema.and(
|
|
257
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({
|
|
258
|
+
type: v.type,
|
|
259
|
+
})),
|
|
260
|
+
),
|
|
261
|
+
]),
|
|
262
|
+
z.string(),
|
|
263
|
+
]),
|
|
264
|
+
).optional(),
|
|
265
|
+
id: z.string(),
|
|
266
|
+
requires: z.nullable(z.array(z.string())).optional(),
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
export function nextStepToJSON(nextStep: NextStep): string {
|
|
270
|
+
return JSON.stringify(NextStep$outboundSchema.parse(nextStep));
|
|
271
|
+
}
|
|
272
|
+
export function nextStepFromJSON(
|
|
273
|
+
jsonString: string,
|
|
274
|
+
): SafeParseResult<NextStep, SDKValidationError> {
|
|
275
|
+
return safeParse(
|
|
276
|
+
jsonString,
|
|
277
|
+
(x) => NextStep$inboundSchema.parse(JSON.parse(x)),
|
|
278
|
+
`Failed to parse 'NextStep' from JSON`,
|
|
279
|
+
);
|
|
280
|
+
}
|