syllable-sdk 1.0.13-rc.4 → 1.0.13-rc.6

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.
Files changed (157) hide show
  1. package/bin/mcp-server.js +2001 -59
  2. package/bin/mcp-server.js.map +34 -11
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/bodyinsightsfolderuploadfile.d.ts +8 -8
  10. package/models/components/bodyinsightsfolderuploadfile.d.ts.map +1 -1
  11. package/models/components/bodyinsightsfolderuploadfile.js +11 -12
  12. package/models/components/bodyinsightsfolderuploadfile.js.map +1 -1
  13. package/models/components/callaction.d.ts +113 -0
  14. package/models/components/callaction.d.ts.map +1 -0
  15. package/models/components/callaction.js +174 -0
  16. package/models/components/callaction.js.map +1 -0
  17. package/models/components/caseexpression.d.ts +18 -0
  18. package/models/components/caseexpression.d.ts.map +1 -0
  19. package/models/components/caseexpression.js +59 -0
  20. package/models/components/caseexpression.js.map +1 -0
  21. package/models/components/celexpression.d.ts +28 -0
  22. package/models/components/celexpression.d.ts.map +1 -0
  23. package/models/components/celexpression.js +60 -0
  24. package/models/components/celexpression.js.map +1 -0
  25. package/models/components/conditionaltext.d.ts +85 -0
  26. package/models/components/conditionaltext.d.ts.map +1 -0
  27. package/models/components/conditionaltext.js +147 -0
  28. package/models/components/conditionaltext.js.map +1 -0
  29. package/models/components/conditionalvalue.d.ts +147 -0
  30. package/models/components/conditionalvalue.d.ts.map +1 -0
  31. package/models/components/conditionalvalue.js +248 -0
  32. package/models/components/conditionalvalue.js.map +1 -0
  33. package/models/components/context.d.ts +122 -8
  34. package/models/components/context.d.ts.map +1 -1
  35. package/models/components/context.js +199 -6
  36. package/models/components/context.js.map +1 -1
  37. package/models/components/contexttaskmetadata.d.ts +22 -0
  38. package/models/components/contexttaskmetadata.d.ts.map +1 -0
  39. package/models/components/contexttaskmetadata.js +69 -0
  40. package/models/components/contexttaskmetadata.js.map +1 -0
  41. package/models/components/contexttoolinfo.d.ts +25 -0
  42. package/models/components/contexttoolinfo.d.ts.map +1 -0
  43. package/models/components/contexttoolinfo.js +60 -0
  44. package/models/components/contexttoolinfo.js.map +1 -0
  45. package/models/components/eventtask.d.ts +42 -0
  46. package/models/components/eventtask.d.ts.map +1 -0
  47. package/models/components/eventtask.js +76 -0
  48. package/models/components/eventtask.js.map +1 -0
  49. package/models/components/eventtaskevents.d.ts +74 -0
  50. package/models/components/eventtaskevents.d.ts.map +1 -0
  51. package/models/components/eventtaskevents.js +139 -0
  52. package/models/components/eventtaskevents.js.map +1 -0
  53. package/models/components/expressiontask.d.ts +109 -0
  54. package/models/components/expressiontask.d.ts.map +1 -0
  55. package/models/components/expressiontask.js +170 -0
  56. package/models/components/expressiontask.js.map +1 -0
  57. package/models/components/expressiontaskevents.d.ts +131 -0
  58. package/models/components/expressiontaskevents.d.ts.map +1 -0
  59. package/models/components/expressiontaskevents.js +219 -0
  60. package/models/components/expressiontaskevents.js.map +1 -0
  61. package/models/components/incrementaction.d.ts +92 -0
  62. package/models/components/incrementaction.d.ts.map +1 -0
  63. package/models/components/incrementaction.js +151 -0
  64. package/models/components/incrementaction.js.map +1 -0
  65. package/models/components/index.d.ts +24 -1
  66. package/models/components/index.d.ts.map +1 -1
  67. package/models/components/index.js +24 -1
  68. package/models/components/index.js.map +1 -1
  69. package/models/components/inputparameter.d.ts +51 -0
  70. package/models/components/inputparameter.d.ts.map +1 -0
  71. package/models/components/inputparameter.js +87 -0
  72. package/models/components/inputparameter.js.map +1 -0
  73. package/models/components/jmespathexpression.d.ts +44 -0
  74. package/models/components/jmespathexpression.d.ts.map +1 -0
  75. package/models/components/jmespathexpression.js +71 -0
  76. package/models/components/jmespathexpression.js.map +1 -0
  77. package/models/components/loadtoolfromfiletask.d.ts +59 -0
  78. package/models/components/loadtoolfromfiletask.d.ts.map +1 -0
  79. package/models/components/loadtoolfromfiletask.js +88 -0
  80. package/models/components/loadtoolfromfiletask.js.map +1 -0
  81. package/models/components/nextstep.d.ts +93 -0
  82. package/models/components/nextstep.d.ts.map +1 -0
  83. package/models/components/nextstep.js +149 -0
  84. package/models/components/nextstep.js.map +1 -0
  85. package/models/components/saveaction.d.ts +92 -0
  86. package/models/components/saveaction.d.ts.map +1 -0
  87. package/models/components/saveaction.js +151 -0
  88. package/models/components/saveaction.js.map +1 -0
  89. package/models/components/sayaction.d.ts +108 -0
  90. package/models/components/sayaction.d.ts.map +1 -0
  91. package/models/components/sayaction.js +162 -0
  92. package/models/components/sayaction.js.map +1 -0
  93. package/models/components/session.d.ts +5 -0
  94. package/models/components/session.d.ts.map +1 -1
  95. package/models/components/session.js +4 -0
  96. package/models/components/session.js.map +1 -1
  97. package/models/components/setvalueaction.d.ts +154 -0
  98. package/models/components/setvalueaction.d.ts.map +1 -0
  99. package/models/components/setvalueaction.js +246 -0
  100. package/models/components/setvalueaction.js.map +1 -0
  101. package/models/components/step.d.ts +73 -0
  102. package/models/components/step.d.ts.map +1 -0
  103. package/models/components/step.js +103 -0
  104. package/models/components/step.js.map +1 -0
  105. package/models/components/stepeventactions.d.ts +185 -0
  106. package/models/components/stepeventactions.d.ts.map +1 -0
  107. package/models/components/stepeventactions.js +296 -0
  108. package/models/components/stepeventactions.js.map +1 -0
  109. package/models/components/stepstask.d.ts +42 -0
  110. package/models/components/stepstask.d.ts.map +1 -0
  111. package/models/components/stepstask.js +76 -0
  112. package/models/components/stepstask.js.map +1 -0
  113. package/models/components/steptools.d.ts +33 -0
  114. package/models/components/steptools.d.ts.map +1 -0
  115. package/models/components/{contexttask.js → steptools.js} +24 -22
  116. package/models/components/steptools.js.map +1 -0
  117. package/models/components/variable.d.ts +119 -0
  118. package/models/components/variable.d.ts.map +1 -0
  119. package/models/components/variable.js +186 -0
  120. package/models/components/variable.js.map +1 -0
  121. package/openapi.json +2453 -662
  122. package/package.json +1 -1
  123. package/src/lib/config.ts +2 -2
  124. package/src/mcp-server/mcp-server.ts +1 -1
  125. package/src/mcp-server/server.ts +1 -1
  126. package/src/models/components/bodyinsightsfolderuploadfile.ts +36 -25
  127. package/src/models/components/callaction.ts +331 -0
  128. package/src/models/components/caseexpression.ts +53 -0
  129. package/src/models/components/celexpression.ts +60 -0
  130. package/src/models/components/conditionaltext.ts +280 -0
  131. package/src/models/components/conditionalvalue.ts +477 -0
  132. package/src/models/components/context.ts +413 -16
  133. package/src/models/components/contexttaskmetadata.ts +67 -0
  134. package/src/models/components/contexttoolinfo.ts +59 -0
  135. package/src/models/components/eventtask.ts +102 -0
  136. package/src/models/components/eventtaskevents.ts +257 -0
  137. package/src/models/components/expressiontask.ts +333 -0
  138. package/src/models/components/expressiontaskevents.ts +430 -0
  139. package/src/models/components/incrementaction.ts +291 -0
  140. package/src/models/components/index.ts +24 -1
  141. package/src/models/components/inputparameter.ts +103 -0
  142. package/src/models/components/jmespathexpression.ts +86 -0
  143. package/src/models/components/loadtoolfromfiletask.ts +137 -0
  144. package/src/models/components/nextstep.ts +280 -0
  145. package/src/models/components/saveaction.ts +281 -0
  146. package/src/models/components/sayaction.ts +302 -0
  147. package/src/models/components/session.ts +9 -0
  148. package/src/models/components/setvalueaction.ts +508 -0
  149. package/src/models/components/step.ts +174 -0
  150. package/src/models/components/stepeventactions.ts +619 -0
  151. package/src/models/components/stepstask.ts +102 -0
  152. package/src/models/components/steptools.ts +76 -0
  153. package/src/models/components/variable.ts +332 -0
  154. package/models/components/contexttask.d.ts +0 -32
  155. package/models/components/contexttask.d.ts.map +0 -1
  156. package/models/components/contexttask.js.map +0 -1
  157. package/src/models/components/contexttask.ts +0 -78
@@ -0,0 +1,477 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ CaseExpression,
12
+ CaseExpression$inboundSchema,
13
+ CaseExpression$Outbound,
14
+ CaseExpression$outboundSchema,
15
+ } from "./caseexpression.js";
16
+ import {
17
+ CelExpression,
18
+ CelExpression$inboundSchema,
19
+ CelExpression$Outbound,
20
+ CelExpression$outboundSchema,
21
+ } from "./celexpression.js";
22
+ import {
23
+ JMESPathExpression,
24
+ JMESPathExpression$inboundSchema,
25
+ JMESPathExpression$Outbound,
26
+ JMESPathExpression$outboundSchema,
27
+ } from "./jmespathexpression.js";
28
+
29
+ export type ValueFrom1 =
30
+ | (CelExpression & { type: "cel" })
31
+ | (JMESPathExpression & { type: "jmespath" })
32
+ | (JMESPathExpression & { type: "jp" });
33
+
34
+ export type If1 =
35
+ | (CelExpression & { type: "cel" })
36
+ | (JMESPathExpression & { type: "jmespath" })
37
+ | (JMESPathExpression & { type: "jp" });
38
+
39
+ /**
40
+ * An expression that must evaluate to true for the action to be applied.
41
+ */
42
+ export type If =
43
+ | CaseExpression
44
+ | (CelExpression & { type: "cel" })
45
+ | (JMESPathExpression & { type: "jmespath" })
46
+ | (JMESPathExpression & { type: "jp" })
47
+ | string;
48
+
49
+ export type ConditionalValue = {
50
+ /**
51
+ * Initial value of the variable.
52
+ */
53
+ value?: any | null | undefined;
54
+ /**
55
+ * Expression to compute initial value (mutually exclusive with value).
56
+ */
57
+ valueFrom?:
58
+ | CaseExpression
59
+ | (CelExpression & { type: "cel" })
60
+ | (JMESPathExpression & { type: "jmespath" })
61
+ | (JMESPathExpression & { type: "jp" })
62
+ | string
63
+ | null
64
+ | undefined;
65
+ /**
66
+ * An expression that must evaluate to true for the action to be applied.
67
+ */
68
+ if?:
69
+ | CaseExpression
70
+ | (CelExpression & { type: "cel" })
71
+ | (JMESPathExpression & { type: "jmespath" })
72
+ | (JMESPathExpression & { type: "jp" })
73
+ | string
74
+ | null
75
+ | undefined;
76
+ };
77
+
78
+ /**
79
+ * Expression to compute initial value (mutually exclusive with value).
80
+ */
81
+ export type ValueFrom =
82
+ | CaseExpression
83
+ | (CelExpression & { type: "cel" })
84
+ | (JMESPathExpression & { type: "jmespath" })
85
+ | (JMESPathExpression & { type: "jp" })
86
+ | string;
87
+
88
+ /** @internal */
89
+ export const ValueFrom1$inboundSchema: z.ZodType<
90
+ ValueFrom1,
91
+ z.ZodTypeDef,
92
+ unknown
93
+ > = z.union([
94
+ CelExpression$inboundSchema.and(
95
+ z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
96
+ ),
97
+ JMESPathExpression$inboundSchema.and(
98
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
99
+ type: v.type,
100
+ })),
101
+ ),
102
+ JMESPathExpression$inboundSchema.and(
103
+ z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
104
+ ),
105
+ ]);
106
+ /** @internal */
107
+ export type ValueFrom1$Outbound =
108
+ | (CelExpression$Outbound & { type: "cel" })
109
+ | (JMESPathExpression$Outbound & { type: "jmespath" })
110
+ | (JMESPathExpression$Outbound & { type: "jp" });
111
+
112
+ /** @internal */
113
+ export const ValueFrom1$outboundSchema: z.ZodType<
114
+ ValueFrom1$Outbound,
115
+ z.ZodTypeDef,
116
+ ValueFrom1
117
+ > = z.union([
118
+ CelExpression$outboundSchema.and(
119
+ z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
120
+ ),
121
+ JMESPathExpression$outboundSchema.and(
122
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
123
+ type: v.type,
124
+ })),
125
+ ),
126
+ JMESPathExpression$outboundSchema.and(
127
+ z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
128
+ ),
129
+ ]);
130
+
131
+ export function valueFrom1ToJSON(valueFrom1: ValueFrom1): string {
132
+ return JSON.stringify(ValueFrom1$outboundSchema.parse(valueFrom1));
133
+ }
134
+ export function valueFrom1FromJSON(
135
+ jsonString: string,
136
+ ): SafeParseResult<ValueFrom1, SDKValidationError> {
137
+ return safeParse(
138
+ jsonString,
139
+ (x) => ValueFrom1$inboundSchema.parse(JSON.parse(x)),
140
+ `Failed to parse 'ValueFrom1' from JSON`,
141
+ );
142
+ }
143
+
144
+ /** @internal */
145
+ export const If1$inboundSchema: z.ZodType<If1, z.ZodTypeDef, unknown> = z.union(
146
+ [
147
+ CelExpression$inboundSchema.and(
148
+ z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
149
+ ),
150
+ JMESPathExpression$inboundSchema.and(
151
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
152
+ type: v.type,
153
+ })),
154
+ ),
155
+ JMESPathExpression$inboundSchema.and(
156
+ z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
157
+ ),
158
+ ],
159
+ );
160
+ /** @internal */
161
+ export type If1$Outbound =
162
+ | (CelExpression$Outbound & { type: "cel" })
163
+ | (JMESPathExpression$Outbound & { type: "jmespath" })
164
+ | (JMESPathExpression$Outbound & { type: "jp" });
165
+
166
+ /** @internal */
167
+ export const If1$outboundSchema: z.ZodType<If1$Outbound, z.ZodTypeDef, If1> = z
168
+ .union([
169
+ CelExpression$outboundSchema.and(
170
+ z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
171
+ ),
172
+ JMESPathExpression$outboundSchema.and(
173
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
174
+ type: v.type,
175
+ })),
176
+ ),
177
+ JMESPathExpression$outboundSchema.and(
178
+ z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
179
+ ),
180
+ ]);
181
+
182
+ export function if1ToJSON(if1: If1): string {
183
+ return JSON.stringify(If1$outboundSchema.parse(if1));
184
+ }
185
+ export function if1FromJSON(
186
+ jsonString: string,
187
+ ): SafeParseResult<If1, SDKValidationError> {
188
+ return safeParse(
189
+ jsonString,
190
+ (x) => If1$inboundSchema.parse(JSON.parse(x)),
191
+ `Failed to parse 'If1' from JSON`,
192
+ );
193
+ }
194
+
195
+ /** @internal */
196
+ export const If$inboundSchema: z.ZodType<If, z.ZodTypeDef, unknown> = z.union([
197
+ z.lazy(() => CaseExpression$inboundSchema),
198
+ z.union([
199
+ CelExpression$inboundSchema.and(
200
+ z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
201
+ ),
202
+ JMESPathExpression$inboundSchema.and(
203
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
204
+ type: v.type,
205
+ })),
206
+ ),
207
+ JMESPathExpression$inboundSchema.and(
208
+ z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
209
+ ),
210
+ ]),
211
+ z.string(),
212
+ ]);
213
+ /** @internal */
214
+ export type If$Outbound =
215
+ | CaseExpression$Outbound
216
+ | (CelExpression$Outbound & { type: "cel" })
217
+ | (JMESPathExpression$Outbound & { type: "jmespath" })
218
+ | (JMESPathExpression$Outbound & { type: "jp" })
219
+ | string;
220
+
221
+ /** @internal */
222
+ export const If$outboundSchema: z.ZodType<If$Outbound, z.ZodTypeDef, If> = z
223
+ .union([
224
+ z.lazy(() => CaseExpression$outboundSchema),
225
+ z.union([
226
+ CelExpression$outboundSchema.and(
227
+ z.object({ type: z.literal("cel") }).transform((v) => ({
228
+ type: v.type,
229
+ })),
230
+ ),
231
+ JMESPathExpression$outboundSchema.and(
232
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
233
+ type: v.type,
234
+ })),
235
+ ),
236
+ JMESPathExpression$outboundSchema.and(
237
+ z.object({ type: z.literal("jp") }).transform((v) => ({
238
+ type: v.type,
239
+ })),
240
+ ),
241
+ ]),
242
+ z.string(),
243
+ ]);
244
+
245
+ export function ifToJSON(value: If): string {
246
+ return JSON.stringify(If$outboundSchema.parse(value));
247
+ }
248
+ export function ifFromJSON(
249
+ jsonString: string,
250
+ ): SafeParseResult<If, SDKValidationError> {
251
+ return safeParse(
252
+ jsonString,
253
+ (x) => If$inboundSchema.parse(JSON.parse(x)),
254
+ `Failed to parse 'If' from JSON`,
255
+ );
256
+ }
257
+
258
+ /** @internal */
259
+ export const ConditionalValue$inboundSchema: z.ZodType<
260
+ ConditionalValue,
261
+ z.ZodTypeDef,
262
+ unknown
263
+ > = z.object({
264
+ value: z.nullable(z.any()).optional(),
265
+ value_from: z.nullable(
266
+ z.union([
267
+ z.lazy(() => CaseExpression$inboundSchema),
268
+ z.union([
269
+ CelExpression$inboundSchema.and(
270
+ z.object({ type: z.literal("cel") }).transform((v) => ({
271
+ type: v.type,
272
+ })),
273
+ ),
274
+ JMESPathExpression$inboundSchema.and(
275
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
276
+ type: v.type,
277
+ })),
278
+ ),
279
+ JMESPathExpression$inboundSchema.and(
280
+ z.object({ type: z.literal("jp") }).transform((v) => ({
281
+ type: v.type,
282
+ })),
283
+ ),
284
+ ]),
285
+ z.string(),
286
+ ]),
287
+ ).optional(),
288
+ if: z.nullable(
289
+ z.union([
290
+ z.lazy(() => CaseExpression$inboundSchema),
291
+ z.union([
292
+ CelExpression$inboundSchema.and(
293
+ z.object({ type: z.literal("cel") }).transform((v) => ({
294
+ type: v.type,
295
+ })),
296
+ ),
297
+ JMESPathExpression$inboundSchema.and(
298
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
299
+ type: v.type,
300
+ })),
301
+ ),
302
+ JMESPathExpression$inboundSchema.and(
303
+ z.object({ type: z.literal("jp") }).transform((v) => ({
304
+ type: v.type,
305
+ })),
306
+ ),
307
+ ]),
308
+ z.string(),
309
+ ]),
310
+ ).optional(),
311
+ }).transform((v) => {
312
+ return remap$(v, {
313
+ "value_from": "valueFrom",
314
+ });
315
+ });
316
+ /** @internal */
317
+ export type ConditionalValue$Outbound = {
318
+ value?: any | null | undefined;
319
+ value_from?:
320
+ | CaseExpression$Outbound
321
+ | (CelExpression$Outbound & { type: "cel" })
322
+ | (JMESPathExpression$Outbound & { type: "jmespath" })
323
+ | (JMESPathExpression$Outbound & { type: "jp" })
324
+ | string
325
+ | null
326
+ | undefined;
327
+ if?:
328
+ | CaseExpression$Outbound
329
+ | (CelExpression$Outbound & { type: "cel" })
330
+ | (JMESPathExpression$Outbound & { type: "jmespath" })
331
+ | (JMESPathExpression$Outbound & { type: "jp" })
332
+ | string
333
+ | null
334
+ | undefined;
335
+ };
336
+
337
+ /** @internal */
338
+ export const ConditionalValue$outboundSchema: z.ZodType<
339
+ ConditionalValue$Outbound,
340
+ z.ZodTypeDef,
341
+ ConditionalValue
342
+ > = z.object({
343
+ value: z.nullable(z.any()).optional(),
344
+ valueFrom: z.nullable(
345
+ z.union([
346
+ z.lazy(() => CaseExpression$outboundSchema),
347
+ z.union([
348
+ CelExpression$outboundSchema.and(
349
+ z.object({ type: z.literal("cel") }).transform((v) => ({
350
+ type: v.type,
351
+ })),
352
+ ),
353
+ JMESPathExpression$outboundSchema.and(
354
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
355
+ type: v.type,
356
+ })),
357
+ ),
358
+ JMESPathExpression$outboundSchema.and(
359
+ z.object({ type: z.literal("jp") }).transform((v) => ({
360
+ type: v.type,
361
+ })),
362
+ ),
363
+ ]),
364
+ z.string(),
365
+ ]),
366
+ ).optional(),
367
+ if: z.nullable(
368
+ z.union([
369
+ z.lazy(() => CaseExpression$outboundSchema),
370
+ z.union([
371
+ CelExpression$outboundSchema.and(
372
+ z.object({ type: z.literal("cel") }).transform((v) => ({
373
+ type: v.type,
374
+ })),
375
+ ),
376
+ JMESPathExpression$outboundSchema.and(
377
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
378
+ type: v.type,
379
+ })),
380
+ ),
381
+ JMESPathExpression$outboundSchema.and(
382
+ z.object({ type: z.literal("jp") }).transform((v) => ({
383
+ type: v.type,
384
+ })),
385
+ ),
386
+ ]),
387
+ z.string(),
388
+ ]),
389
+ ).optional(),
390
+ }).transform((v) => {
391
+ return remap$(v, {
392
+ valueFrom: "value_from",
393
+ });
394
+ });
395
+
396
+ export function conditionalValueToJSON(
397
+ conditionalValue: ConditionalValue,
398
+ ): string {
399
+ return JSON.stringify(
400
+ ConditionalValue$outboundSchema.parse(conditionalValue),
401
+ );
402
+ }
403
+ export function conditionalValueFromJSON(
404
+ jsonString: string,
405
+ ): SafeParseResult<ConditionalValue, SDKValidationError> {
406
+ return safeParse(
407
+ jsonString,
408
+ (x) => ConditionalValue$inboundSchema.parse(JSON.parse(x)),
409
+ `Failed to parse 'ConditionalValue' from JSON`,
410
+ );
411
+ }
412
+
413
+ /** @internal */
414
+ export const ValueFrom$inboundSchema: z.ZodType<
415
+ ValueFrom,
416
+ z.ZodTypeDef,
417
+ unknown
418
+ > = z.union([
419
+ z.lazy(() => CaseExpression$inboundSchema),
420
+ z.union([
421
+ CelExpression$inboundSchema.and(
422
+ z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
423
+ ),
424
+ JMESPathExpression$inboundSchema.and(
425
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
426
+ type: v.type,
427
+ })),
428
+ ),
429
+ JMESPathExpression$inboundSchema.and(
430
+ z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
431
+ ),
432
+ ]),
433
+ z.string(),
434
+ ]);
435
+ /** @internal */
436
+ export type ValueFrom$Outbound =
437
+ | CaseExpression$Outbound
438
+ | (CelExpression$Outbound & { type: "cel" })
439
+ | (JMESPathExpression$Outbound & { type: "jmespath" })
440
+ | (JMESPathExpression$Outbound & { type: "jp" })
441
+ | string;
442
+
443
+ /** @internal */
444
+ export const ValueFrom$outboundSchema: z.ZodType<
445
+ ValueFrom$Outbound,
446
+ z.ZodTypeDef,
447
+ ValueFrom
448
+ > = z.union([
449
+ z.lazy(() => CaseExpression$outboundSchema),
450
+ z.union([
451
+ CelExpression$outboundSchema.and(
452
+ z.object({ type: z.literal("cel") }).transform((v) => ({ type: v.type })),
453
+ ),
454
+ JMESPathExpression$outboundSchema.and(
455
+ z.object({ type: z.literal("jmespath") }).transform((v) => ({
456
+ type: v.type,
457
+ })),
458
+ ),
459
+ JMESPathExpression$outboundSchema.and(
460
+ z.object({ type: z.literal("jp") }).transform((v) => ({ type: v.type })),
461
+ ),
462
+ ]),
463
+ z.string(),
464
+ ]);
465
+
466
+ export function valueFromToJSON(valueFrom: ValueFrom): string {
467
+ return JSON.stringify(ValueFrom$outboundSchema.parse(valueFrom));
468
+ }
469
+ export function valueFromFromJSON(
470
+ jsonString: string,
471
+ ): SafeParseResult<ValueFrom, SDKValidationError> {
472
+ return safeParse(
473
+ jsonString,
474
+ (x) => ValueFrom$inboundSchema.parse(JSON.parse(x)),
475
+ `Failed to parse 'ValueFrom' from JSON`,
476
+ );
477
+ }