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
|
@@ -0,0 +1,430 @@
|
|
|
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
|
+
CallAction,
|
|
11
|
+
CallAction$inboundSchema,
|
|
12
|
+
CallAction$Outbound,
|
|
13
|
+
CallAction$outboundSchema,
|
|
14
|
+
} from "./callaction.js";
|
|
15
|
+
import {
|
|
16
|
+
IncrementAction,
|
|
17
|
+
IncrementAction$inboundSchema,
|
|
18
|
+
IncrementAction$Outbound,
|
|
19
|
+
IncrementAction$outboundSchema,
|
|
20
|
+
} from "./incrementaction.js";
|
|
21
|
+
import {
|
|
22
|
+
SaveAction,
|
|
23
|
+
SaveAction$inboundSchema,
|
|
24
|
+
SaveAction$Outbound,
|
|
25
|
+
SaveAction$outboundSchema,
|
|
26
|
+
} from "./saveaction.js";
|
|
27
|
+
import {
|
|
28
|
+
SayAction,
|
|
29
|
+
SayAction$inboundSchema,
|
|
30
|
+
SayAction$Outbound,
|
|
31
|
+
SayAction$outboundSchema,
|
|
32
|
+
} from "./sayaction.js";
|
|
33
|
+
import {
|
|
34
|
+
SetValueAction,
|
|
35
|
+
SetValueAction$inboundSchema,
|
|
36
|
+
SetValueAction$Outbound,
|
|
37
|
+
SetValueAction$outboundSchema,
|
|
38
|
+
} from "./setvalueaction.js";
|
|
39
|
+
|
|
40
|
+
export type Start =
|
|
41
|
+
| (CallAction & { action: "call" })
|
|
42
|
+
| (IncrementAction & { action: "inc" })
|
|
43
|
+
| (SayAction & { action: "say" })
|
|
44
|
+
| (SetValueAction & { action: "set" })
|
|
45
|
+
| (SaveAction & { action: "save" });
|
|
46
|
+
|
|
47
|
+
export type Submit =
|
|
48
|
+
| (CallAction & { action: "call" })
|
|
49
|
+
| (IncrementAction & { action: "inc" })
|
|
50
|
+
| (SayAction & { action: "say" })
|
|
51
|
+
| (SetValueAction & { action: "set" })
|
|
52
|
+
| (SaveAction & { action: "save" });
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Actions to perform when events occur (enter, submit).
|
|
56
|
+
*/
|
|
57
|
+
export type ExpressionTaskEvents = {
|
|
58
|
+
/**
|
|
59
|
+
* Actions to execute on the first input from the user.
|
|
60
|
+
*/
|
|
61
|
+
start?:
|
|
62
|
+
| Array<
|
|
63
|
+
| (CallAction & { action: "call" })
|
|
64
|
+
| (IncrementAction & { action: "inc" })
|
|
65
|
+
| (SayAction & { action: "say" })
|
|
66
|
+
| (SetValueAction & { action: "set" })
|
|
67
|
+
| (SaveAction & { action: "save" })
|
|
68
|
+
>
|
|
69
|
+
| null
|
|
70
|
+
| undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Actions to execute when the tool/step is submitted by the LLM.
|
|
73
|
+
*/
|
|
74
|
+
submit?:
|
|
75
|
+
| Array<
|
|
76
|
+
| (CallAction & { action: "call" })
|
|
77
|
+
| (IncrementAction & { action: "inc" })
|
|
78
|
+
| (SayAction & { action: "say" })
|
|
79
|
+
| (SetValueAction & { action: "set" })
|
|
80
|
+
| (SaveAction & { action: "save" })
|
|
81
|
+
>
|
|
82
|
+
| null
|
|
83
|
+
| undefined;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const Start$inboundSchema: z.ZodType<Start, z.ZodTypeDef, unknown> = z
|
|
88
|
+
.union([
|
|
89
|
+
CallAction$inboundSchema.and(
|
|
90
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
91
|
+
action: v.action,
|
|
92
|
+
})),
|
|
93
|
+
),
|
|
94
|
+
IncrementAction$inboundSchema.and(
|
|
95
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
96
|
+
action: v.action,
|
|
97
|
+
})),
|
|
98
|
+
),
|
|
99
|
+
SayAction$inboundSchema.and(
|
|
100
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
101
|
+
action: v.action,
|
|
102
|
+
})),
|
|
103
|
+
),
|
|
104
|
+
SetValueAction$inboundSchema.and(
|
|
105
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
106
|
+
action: v.action,
|
|
107
|
+
})),
|
|
108
|
+
),
|
|
109
|
+
SaveAction$inboundSchema.and(
|
|
110
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
111
|
+
action: v.action,
|
|
112
|
+
})),
|
|
113
|
+
),
|
|
114
|
+
]);
|
|
115
|
+
/** @internal */
|
|
116
|
+
export type Start$Outbound =
|
|
117
|
+
| (CallAction$Outbound & { action: "call" })
|
|
118
|
+
| (IncrementAction$Outbound & { action: "inc" })
|
|
119
|
+
| (SayAction$Outbound & { action: "say" })
|
|
120
|
+
| (SetValueAction$Outbound & { action: "set" })
|
|
121
|
+
| (SaveAction$Outbound & { action: "save" });
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const Start$outboundSchema: z.ZodType<
|
|
125
|
+
Start$Outbound,
|
|
126
|
+
z.ZodTypeDef,
|
|
127
|
+
Start
|
|
128
|
+
> = z.union([
|
|
129
|
+
CallAction$outboundSchema.and(
|
|
130
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
131
|
+
action: v.action,
|
|
132
|
+
})),
|
|
133
|
+
),
|
|
134
|
+
IncrementAction$outboundSchema.and(
|
|
135
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
136
|
+
action: v.action,
|
|
137
|
+
})),
|
|
138
|
+
),
|
|
139
|
+
SayAction$outboundSchema.and(
|
|
140
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
141
|
+
action: v.action,
|
|
142
|
+
})),
|
|
143
|
+
),
|
|
144
|
+
SetValueAction$outboundSchema.and(
|
|
145
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
146
|
+
action: v.action,
|
|
147
|
+
})),
|
|
148
|
+
),
|
|
149
|
+
SaveAction$outboundSchema.and(
|
|
150
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
151
|
+
action: v.action,
|
|
152
|
+
})),
|
|
153
|
+
),
|
|
154
|
+
]);
|
|
155
|
+
|
|
156
|
+
export function startToJSON(start: Start): string {
|
|
157
|
+
return JSON.stringify(Start$outboundSchema.parse(start));
|
|
158
|
+
}
|
|
159
|
+
export function startFromJSON(
|
|
160
|
+
jsonString: string,
|
|
161
|
+
): SafeParseResult<Start, SDKValidationError> {
|
|
162
|
+
return safeParse(
|
|
163
|
+
jsonString,
|
|
164
|
+
(x) => Start$inboundSchema.parse(JSON.parse(x)),
|
|
165
|
+
`Failed to parse 'Start' from JSON`,
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** @internal */
|
|
170
|
+
export const Submit$inboundSchema: z.ZodType<Submit, z.ZodTypeDef, unknown> = z
|
|
171
|
+
.union([
|
|
172
|
+
CallAction$inboundSchema.and(
|
|
173
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
174
|
+
action: v.action,
|
|
175
|
+
})),
|
|
176
|
+
),
|
|
177
|
+
IncrementAction$inboundSchema.and(
|
|
178
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
179
|
+
action: v.action,
|
|
180
|
+
})),
|
|
181
|
+
),
|
|
182
|
+
SayAction$inboundSchema.and(
|
|
183
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
184
|
+
action: v.action,
|
|
185
|
+
})),
|
|
186
|
+
),
|
|
187
|
+
SetValueAction$inboundSchema.and(
|
|
188
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
189
|
+
action: v.action,
|
|
190
|
+
})),
|
|
191
|
+
),
|
|
192
|
+
SaveAction$inboundSchema.and(
|
|
193
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
194
|
+
action: v.action,
|
|
195
|
+
})),
|
|
196
|
+
),
|
|
197
|
+
]);
|
|
198
|
+
/** @internal */
|
|
199
|
+
export type Submit$Outbound =
|
|
200
|
+
| (CallAction$Outbound & { action: "call" })
|
|
201
|
+
| (IncrementAction$Outbound & { action: "inc" })
|
|
202
|
+
| (SayAction$Outbound & { action: "say" })
|
|
203
|
+
| (SetValueAction$Outbound & { action: "set" })
|
|
204
|
+
| (SaveAction$Outbound & { action: "save" });
|
|
205
|
+
|
|
206
|
+
/** @internal */
|
|
207
|
+
export const Submit$outboundSchema: z.ZodType<
|
|
208
|
+
Submit$Outbound,
|
|
209
|
+
z.ZodTypeDef,
|
|
210
|
+
Submit
|
|
211
|
+
> = z.union([
|
|
212
|
+
CallAction$outboundSchema.and(
|
|
213
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
214
|
+
action: v.action,
|
|
215
|
+
})),
|
|
216
|
+
),
|
|
217
|
+
IncrementAction$outboundSchema.and(
|
|
218
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
219
|
+
action: v.action,
|
|
220
|
+
})),
|
|
221
|
+
),
|
|
222
|
+
SayAction$outboundSchema.and(
|
|
223
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
224
|
+
action: v.action,
|
|
225
|
+
})),
|
|
226
|
+
),
|
|
227
|
+
SetValueAction$outboundSchema.and(
|
|
228
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
229
|
+
action: v.action,
|
|
230
|
+
})),
|
|
231
|
+
),
|
|
232
|
+
SaveAction$outboundSchema.and(
|
|
233
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
234
|
+
action: v.action,
|
|
235
|
+
})),
|
|
236
|
+
),
|
|
237
|
+
]);
|
|
238
|
+
|
|
239
|
+
export function submitToJSON(submit: Submit): string {
|
|
240
|
+
return JSON.stringify(Submit$outboundSchema.parse(submit));
|
|
241
|
+
}
|
|
242
|
+
export function submitFromJSON(
|
|
243
|
+
jsonString: string,
|
|
244
|
+
): SafeParseResult<Submit, SDKValidationError> {
|
|
245
|
+
return safeParse(
|
|
246
|
+
jsonString,
|
|
247
|
+
(x) => Submit$inboundSchema.parse(JSON.parse(x)),
|
|
248
|
+
`Failed to parse 'Submit' from JSON`,
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** @internal */
|
|
253
|
+
export const ExpressionTaskEvents$inboundSchema: z.ZodType<
|
|
254
|
+
ExpressionTaskEvents,
|
|
255
|
+
z.ZodTypeDef,
|
|
256
|
+
unknown
|
|
257
|
+
> = z.object({
|
|
258
|
+
start: z.nullable(
|
|
259
|
+
z.array(
|
|
260
|
+
z.union([
|
|
261
|
+
CallAction$inboundSchema.and(
|
|
262
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
263
|
+
action: v.action,
|
|
264
|
+
})),
|
|
265
|
+
),
|
|
266
|
+
IncrementAction$inboundSchema.and(
|
|
267
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
268
|
+
action: v.action,
|
|
269
|
+
})),
|
|
270
|
+
),
|
|
271
|
+
SayAction$inboundSchema.and(
|
|
272
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
273
|
+
action: v.action,
|
|
274
|
+
})),
|
|
275
|
+
),
|
|
276
|
+
SetValueAction$inboundSchema.and(
|
|
277
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
278
|
+
action: v.action,
|
|
279
|
+
})),
|
|
280
|
+
),
|
|
281
|
+
SaveAction$inboundSchema.and(
|
|
282
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
283
|
+
action: v.action,
|
|
284
|
+
})),
|
|
285
|
+
),
|
|
286
|
+
]),
|
|
287
|
+
),
|
|
288
|
+
).optional(),
|
|
289
|
+
submit: z.nullable(
|
|
290
|
+
z.array(
|
|
291
|
+
z.union([
|
|
292
|
+
CallAction$inboundSchema.and(
|
|
293
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
294
|
+
action: v.action,
|
|
295
|
+
})),
|
|
296
|
+
),
|
|
297
|
+
IncrementAction$inboundSchema.and(
|
|
298
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
299
|
+
action: v.action,
|
|
300
|
+
})),
|
|
301
|
+
),
|
|
302
|
+
SayAction$inboundSchema.and(
|
|
303
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
304
|
+
action: v.action,
|
|
305
|
+
})),
|
|
306
|
+
),
|
|
307
|
+
SetValueAction$inboundSchema.and(
|
|
308
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
309
|
+
action: v.action,
|
|
310
|
+
})),
|
|
311
|
+
),
|
|
312
|
+
SaveAction$inboundSchema.and(
|
|
313
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
314
|
+
action: v.action,
|
|
315
|
+
})),
|
|
316
|
+
),
|
|
317
|
+
]),
|
|
318
|
+
),
|
|
319
|
+
).optional(),
|
|
320
|
+
});
|
|
321
|
+
/** @internal */
|
|
322
|
+
export type ExpressionTaskEvents$Outbound = {
|
|
323
|
+
start?:
|
|
324
|
+
| Array<
|
|
325
|
+
| (CallAction$Outbound & { action: "call" })
|
|
326
|
+
| (IncrementAction$Outbound & { action: "inc" })
|
|
327
|
+
| (SayAction$Outbound & { action: "say" })
|
|
328
|
+
| (SetValueAction$Outbound & { action: "set" })
|
|
329
|
+
| (SaveAction$Outbound & { action: "save" })
|
|
330
|
+
>
|
|
331
|
+
| null
|
|
332
|
+
| undefined;
|
|
333
|
+
submit?:
|
|
334
|
+
| Array<
|
|
335
|
+
| (CallAction$Outbound & { action: "call" })
|
|
336
|
+
| (IncrementAction$Outbound & { action: "inc" })
|
|
337
|
+
| (SayAction$Outbound & { action: "say" })
|
|
338
|
+
| (SetValueAction$Outbound & { action: "set" })
|
|
339
|
+
| (SaveAction$Outbound & { action: "save" })
|
|
340
|
+
>
|
|
341
|
+
| null
|
|
342
|
+
| undefined;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/** @internal */
|
|
346
|
+
export const ExpressionTaskEvents$outboundSchema: z.ZodType<
|
|
347
|
+
ExpressionTaskEvents$Outbound,
|
|
348
|
+
z.ZodTypeDef,
|
|
349
|
+
ExpressionTaskEvents
|
|
350
|
+
> = z.object({
|
|
351
|
+
start: z.nullable(
|
|
352
|
+
z.array(
|
|
353
|
+
z.union([
|
|
354
|
+
CallAction$outboundSchema.and(
|
|
355
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
356
|
+
action: v.action,
|
|
357
|
+
})),
|
|
358
|
+
),
|
|
359
|
+
IncrementAction$outboundSchema.and(
|
|
360
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
361
|
+
action: v.action,
|
|
362
|
+
})),
|
|
363
|
+
),
|
|
364
|
+
SayAction$outboundSchema.and(
|
|
365
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
366
|
+
action: v.action,
|
|
367
|
+
})),
|
|
368
|
+
),
|
|
369
|
+
SetValueAction$outboundSchema.and(
|
|
370
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
371
|
+
action: v.action,
|
|
372
|
+
})),
|
|
373
|
+
),
|
|
374
|
+
SaveAction$outboundSchema.and(
|
|
375
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
376
|
+
action: v.action,
|
|
377
|
+
})),
|
|
378
|
+
),
|
|
379
|
+
]),
|
|
380
|
+
),
|
|
381
|
+
).optional(),
|
|
382
|
+
submit: z.nullable(
|
|
383
|
+
z.array(
|
|
384
|
+
z.union([
|
|
385
|
+
CallAction$outboundSchema.and(
|
|
386
|
+
z.object({ action: z.literal("call") }).transform((v) => ({
|
|
387
|
+
action: v.action,
|
|
388
|
+
})),
|
|
389
|
+
),
|
|
390
|
+
IncrementAction$outboundSchema.and(
|
|
391
|
+
z.object({ action: z.literal("inc") }).transform((v) => ({
|
|
392
|
+
action: v.action,
|
|
393
|
+
})),
|
|
394
|
+
),
|
|
395
|
+
SayAction$outboundSchema.and(
|
|
396
|
+
z.object({ action: z.literal("say") }).transform((v) => ({
|
|
397
|
+
action: v.action,
|
|
398
|
+
})),
|
|
399
|
+
),
|
|
400
|
+
SetValueAction$outboundSchema.and(
|
|
401
|
+
z.object({ action: z.literal("set") }).transform((v) => ({
|
|
402
|
+
action: v.action,
|
|
403
|
+
})),
|
|
404
|
+
),
|
|
405
|
+
SaveAction$outboundSchema.and(
|
|
406
|
+
z.object({ action: z.literal("save") }).transform((v) => ({
|
|
407
|
+
action: v.action,
|
|
408
|
+
})),
|
|
409
|
+
),
|
|
410
|
+
]),
|
|
411
|
+
),
|
|
412
|
+
).optional(),
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
export function expressionTaskEventsToJSON(
|
|
416
|
+
expressionTaskEvents: ExpressionTaskEvents,
|
|
417
|
+
): string {
|
|
418
|
+
return JSON.stringify(
|
|
419
|
+
ExpressionTaskEvents$outboundSchema.parse(expressionTaskEvents),
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
export function expressionTaskEventsFromJSON(
|
|
423
|
+
jsonString: string,
|
|
424
|
+
): SafeParseResult<ExpressionTaskEvents, SDKValidationError> {
|
|
425
|
+
return safeParse(
|
|
426
|
+
jsonString,
|
|
427
|
+
(x) => ExpressionTaskEvents$inboundSchema.parse(JSON.parse(x)),
|
|
428
|
+
`Failed to parse 'ExpressionTaskEvents' from JSON`,
|
|
429
|
+
);
|
|
430
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
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 IncrementActionIf1 =
|
|
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 IncrementActionIf =
|
|
37
|
+
| CaseExpression
|
|
38
|
+
| (CelExpression & { type: "cel" })
|
|
39
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
40
|
+
| (JMESPathExpression & { type: "jp" })
|
|
41
|
+
| string;
|
|
42
|
+
|
|
43
|
+
export type IncrementAction = {
|
|
44
|
+
/**
|
|
45
|
+
* An expression that must evaluate to true for the action to be applied.
|
|
46
|
+
*/
|
|
47
|
+
if?:
|
|
48
|
+
| CaseExpression
|
|
49
|
+
| (CelExpression & { type: "cel" })
|
|
50
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
51
|
+
| (JMESPathExpression & { type: "jp" })
|
|
52
|
+
| string
|
|
53
|
+
| null
|
|
54
|
+
| undefined;
|
|
55
|
+
action?: "inc" | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Numeric destination path to increment.
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* Increment amount (defaults to 1).
|
|
62
|
+
*/
|
|
63
|
+
by?: number | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const IncrementActionIf1$inboundSchema: z.ZodType<
|
|
68
|
+
IncrementActionIf1,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.union([
|
|
72
|
+
CelExpression$inboundSchema.and(
|
|
73
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
74
|
+
),
|
|
75
|
+
JMESPathExpression$inboundSchema.and(
|
|
76
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
77
|
+
type: v.type,
|
|
78
|
+
})),
|
|
79
|
+
),
|
|
80
|
+
JMESPathExpression$inboundSchema.and(
|
|
81
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
82
|
+
),
|
|
83
|
+
]);
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type IncrementActionIf1$Outbound =
|
|
86
|
+
| (CelExpression$Outbound & { type: "cel" })
|
|
87
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
88
|
+
| (JMESPathExpression$Outbound & { type: "jp" });
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const IncrementActionIf1$outboundSchema: z.ZodType<
|
|
92
|
+
IncrementActionIf1$Outbound,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
IncrementActionIf1
|
|
95
|
+
> = z.union([
|
|
96
|
+
CelExpression$outboundSchema.and(
|
|
97
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
98
|
+
),
|
|
99
|
+
JMESPathExpression$outboundSchema.and(
|
|
100
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
101
|
+
type: v.type,
|
|
102
|
+
})),
|
|
103
|
+
),
|
|
104
|
+
JMESPathExpression$outboundSchema.and(
|
|
105
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
106
|
+
),
|
|
107
|
+
]);
|
|
108
|
+
|
|
109
|
+
export function incrementActionIf1ToJSON(
|
|
110
|
+
incrementActionIf1: IncrementActionIf1,
|
|
111
|
+
): string {
|
|
112
|
+
return JSON.stringify(
|
|
113
|
+
IncrementActionIf1$outboundSchema.parse(incrementActionIf1),
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
export function incrementActionIf1FromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<IncrementActionIf1, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) => IncrementActionIf1$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'IncrementActionIf1' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const IncrementActionIf$inboundSchema: z.ZodType<
|
|
128
|
+
IncrementActionIf,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
unknown
|
|
131
|
+
> = z.union([
|
|
132
|
+
CaseExpression$inboundSchema,
|
|
133
|
+
z.union([
|
|
134
|
+
CelExpression$inboundSchema.and(
|
|
135
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
136
|
+
),
|
|
137
|
+
JMESPathExpression$inboundSchema.and(
|
|
138
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
139
|
+
type: v.type,
|
|
140
|
+
})),
|
|
141
|
+
),
|
|
142
|
+
JMESPathExpression$inboundSchema.and(
|
|
143
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
144
|
+
),
|
|
145
|
+
]),
|
|
146
|
+
z.string(),
|
|
147
|
+
]);
|
|
148
|
+
/** @internal */
|
|
149
|
+
export type IncrementActionIf$Outbound =
|
|
150
|
+
| CaseExpression$Outbound
|
|
151
|
+
| (CelExpression$Outbound & { type: "cel" })
|
|
152
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
153
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
154
|
+
| string;
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export const IncrementActionIf$outboundSchema: z.ZodType<
|
|
158
|
+
IncrementActionIf$Outbound,
|
|
159
|
+
z.ZodTypeDef,
|
|
160
|
+
IncrementActionIf
|
|
161
|
+
> = z.union([
|
|
162
|
+
CaseExpression$outboundSchema,
|
|
163
|
+
z.union([
|
|
164
|
+
CelExpression$outboundSchema.and(
|
|
165
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
|
|
166
|
+
),
|
|
167
|
+
JMESPathExpression$outboundSchema.and(
|
|
168
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
169
|
+
type: v.type,
|
|
170
|
+
})),
|
|
171
|
+
),
|
|
172
|
+
JMESPathExpression$outboundSchema.and(
|
|
173
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
|
|
174
|
+
),
|
|
175
|
+
]),
|
|
176
|
+
z.string(),
|
|
177
|
+
]);
|
|
178
|
+
|
|
179
|
+
export function incrementActionIfToJSON(
|
|
180
|
+
incrementActionIf: IncrementActionIf,
|
|
181
|
+
): string {
|
|
182
|
+
return JSON.stringify(
|
|
183
|
+
IncrementActionIf$outboundSchema.parse(incrementActionIf),
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
export function incrementActionIfFromJSON(
|
|
187
|
+
jsonString: string,
|
|
188
|
+
): SafeParseResult<IncrementActionIf, SDKValidationError> {
|
|
189
|
+
return safeParse(
|
|
190
|
+
jsonString,
|
|
191
|
+
(x) => IncrementActionIf$inboundSchema.parse(JSON.parse(x)),
|
|
192
|
+
`Failed to parse 'IncrementActionIf' from JSON`,
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** @internal */
|
|
197
|
+
export const IncrementAction$inboundSchema: z.ZodType<
|
|
198
|
+
IncrementAction,
|
|
199
|
+
z.ZodTypeDef,
|
|
200
|
+
unknown
|
|
201
|
+
> = z.object({
|
|
202
|
+
if: z.nullable(
|
|
203
|
+
z.union([
|
|
204
|
+
CaseExpression$inboundSchema,
|
|
205
|
+
z.union([
|
|
206
|
+
CelExpression$inboundSchema.and(
|
|
207
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({
|
|
208
|
+
type: v.type,
|
|
209
|
+
})),
|
|
210
|
+
),
|
|
211
|
+
JMESPathExpression$inboundSchema.and(
|
|
212
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
213
|
+
type: v.type,
|
|
214
|
+
})),
|
|
215
|
+
),
|
|
216
|
+
JMESPathExpression$inboundSchema.and(
|
|
217
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({
|
|
218
|
+
type: v.type,
|
|
219
|
+
})),
|
|
220
|
+
),
|
|
221
|
+
]),
|
|
222
|
+
z.string(),
|
|
223
|
+
]),
|
|
224
|
+
).optional(),
|
|
225
|
+
action: z.literal("inc").default("inc"),
|
|
226
|
+
name: z.string(),
|
|
227
|
+
by: z.number().int().default(1),
|
|
228
|
+
});
|
|
229
|
+
/** @internal */
|
|
230
|
+
export type IncrementAction$Outbound = {
|
|
231
|
+
if?:
|
|
232
|
+
| CaseExpression$Outbound
|
|
233
|
+
| (CelExpression$Outbound & { type: "cel" })
|
|
234
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
235
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
236
|
+
| string
|
|
237
|
+
| null
|
|
238
|
+
| undefined;
|
|
239
|
+
action: "inc";
|
|
240
|
+
name: string;
|
|
241
|
+
by: number;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
/** @internal */
|
|
245
|
+
export const IncrementAction$outboundSchema: z.ZodType<
|
|
246
|
+
IncrementAction$Outbound,
|
|
247
|
+
z.ZodTypeDef,
|
|
248
|
+
IncrementAction
|
|
249
|
+
> = z.object({
|
|
250
|
+
if: z.nullable(
|
|
251
|
+
z.union([
|
|
252
|
+
CaseExpression$outboundSchema,
|
|
253
|
+
z.union([
|
|
254
|
+
CelExpression$outboundSchema.and(
|
|
255
|
+
z.object({ type: z.literal("cel") }).transform((v) => ({
|
|
256
|
+
type: v.type,
|
|
257
|
+
})),
|
|
258
|
+
),
|
|
259
|
+
JMESPathExpression$outboundSchema.and(
|
|
260
|
+
z.object({ type: z.literal("jmespath") }).transform((v) => ({
|
|
261
|
+
type: v.type,
|
|
262
|
+
})),
|
|
263
|
+
),
|
|
264
|
+
JMESPathExpression$outboundSchema.and(
|
|
265
|
+
z.object({ type: z.literal("jp") }).transform((v) => ({
|
|
266
|
+
type: v.type,
|
|
267
|
+
})),
|
|
268
|
+
),
|
|
269
|
+
]),
|
|
270
|
+
z.string(),
|
|
271
|
+
]),
|
|
272
|
+
).optional(),
|
|
273
|
+
action: z.literal("inc").default("inc" as const),
|
|
274
|
+
name: z.string(),
|
|
275
|
+
by: z.number().int().default(1),
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
export function incrementActionToJSON(
|
|
279
|
+
incrementAction: IncrementAction,
|
|
280
|
+
): string {
|
|
281
|
+
return JSON.stringify(IncrementAction$outboundSchema.parse(incrementAction));
|
|
282
|
+
}
|
|
283
|
+
export function incrementActionFromJSON(
|
|
284
|
+
jsonString: string,
|
|
285
|
+
): SafeParseResult<IncrementAction, SDKValidationError> {
|
|
286
|
+
return safeParse(
|
|
287
|
+
jsonString,
|
|
288
|
+
(x) => IncrementAction$inboundSchema.parse(JSON.parse(x)),
|
|
289
|
+
`Failed to parse 'IncrementAction' from JSON`,
|
|
290
|
+
);
|
|
291
|
+
}
|