@unified-api/typescript-sdk 2.73.1 → 2.73.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1416 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import {
9
+ catchUnrecognizedEnum,
10
+ OpenEnum,
11
+ Unrecognized,
12
+ } from "../../types/enums.js";
13
+ import { Result as SafeParseResult } from "../../types/fp.js";
14
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
15
+
16
+ export type TaskMetadataSchemasExtraData52 = {};
17
+
18
+ export type TaskMetadata5 = TaskMetadataSchemasExtraData52 | Array<any>;
19
+
20
+ export type TaskMetadataSchemasExtraData2 = {};
21
+
22
+ export type TaskMetadata4 = TaskMetadataSchemasExtraData2 | boolean;
23
+
24
+ export type TaskMetadataSchemasExtraData32 = {};
25
+
26
+ export type TaskMetadata3 = TaskMetadataSchemasExtraData32 | number;
27
+
28
+ export type TaskMetadataSchemasExtraData22 = {};
29
+
30
+ export type TaskMetadata2 = TaskMetadataSchemasExtraData22 | string;
31
+
32
+ export type TaskMetadata1 = {};
33
+
34
+ export type TaskMetadataExtraData =
35
+ | TaskMetadata1
36
+ | TaskMetadataSchemasExtraData22
37
+ | string
38
+ | TaskMetadataSchemasExtraData32
39
+ | number
40
+ | TaskMetadataSchemasExtraData2
41
+ | boolean
42
+ | TaskMetadataSchemasExtraData52
43
+ | Array<any>;
44
+
45
+ export const TaskMetadataFormat = {
46
+ Text: "TEXT",
47
+ Number: "NUMBER",
48
+ Date: "DATE",
49
+ Boolean: "BOOLEAN",
50
+ File: "FILE",
51
+ Textarea: "TEXTAREA",
52
+ SingleSelect: "SINGLE_SELECT",
53
+ MultipleSelect: "MULTIPLE_SELECT",
54
+ Measurement: "MEASUREMENT",
55
+ Price: "PRICE",
56
+ YesNo: "YES_NO",
57
+ Currency: "CURRENCY",
58
+ Url: "URL",
59
+ } as const;
60
+ export type TaskMetadataFormat = OpenEnum<typeof TaskMetadataFormat>;
61
+
62
+ export type TaskMetadataSchemasValue52 = {};
63
+
64
+ export type TaskMetadataSchemas5 = TaskMetadataSchemasValue52 | Array<any>;
65
+
66
+ export type TaskMetadataSchemasValue42 = {};
67
+
68
+ export type TaskMetadataSchemas4 = TaskMetadataSchemasValue42 | boolean;
69
+
70
+ export type TaskMetadataSchemasValue32 = {};
71
+
72
+ export type TaskMetadataSchemas3 = TaskMetadataSchemasValue32 | number;
73
+
74
+ export type TaskMetadataSchemasValue2 = {};
75
+
76
+ export type TaskMetadataSchemas2 = TaskMetadataSchemasValue2 | string;
77
+
78
+ export type TaskMetadataSchemas1 = {};
79
+
80
+ export type TaskMetadataValue =
81
+ | TaskMetadataSchemas1
82
+ | TaskMetadataSchemasValue2
83
+ | string
84
+ | TaskMetadataSchemasValue32
85
+ | number
86
+ | TaskMetadataSchemasValue42
87
+ | boolean
88
+ | TaskMetadataSchemasValue52
89
+ | Array<any>;
90
+
91
+ export type TaskMetadata = {
92
+ extraData?:
93
+ | TaskMetadata1
94
+ | TaskMetadataSchemasExtraData22
95
+ | string
96
+ | TaskMetadataSchemasExtraData32
97
+ | number
98
+ | TaskMetadataSchemasExtraData2
99
+ | boolean
100
+ | TaskMetadataSchemasExtraData52
101
+ | Array<any>
102
+ | undefined;
103
+ format?: TaskMetadataFormat | undefined;
104
+ id?: string | undefined;
105
+ key?: string | undefined;
106
+ namespace?: string | undefined;
107
+ slug?: string | undefined;
108
+ type?: string | undefined;
109
+ value?:
110
+ | TaskMetadataSchemas1
111
+ | TaskMetadataSchemasValue2
112
+ | string
113
+ | TaskMetadataSchemasValue32
114
+ | number
115
+ | TaskMetadataSchemasValue42
116
+ | boolean
117
+ | TaskMetadataSchemasValue52
118
+ | Array<any>
119
+ | undefined;
120
+ };
121
+
122
+ /** @internal */
123
+ export const TaskMetadataSchemasExtraData52$inboundSchema: z.ZodType<
124
+ TaskMetadataSchemasExtraData52,
125
+ z.ZodTypeDef,
126
+ unknown
127
+ > = z.object({});
128
+
129
+ /** @internal */
130
+ export type TaskMetadataSchemasExtraData52$Outbound = {};
131
+
132
+ /** @internal */
133
+ export const TaskMetadataSchemasExtraData52$outboundSchema: z.ZodType<
134
+ TaskMetadataSchemasExtraData52$Outbound,
135
+ z.ZodTypeDef,
136
+ TaskMetadataSchemasExtraData52
137
+ > = z.object({});
138
+
139
+ /**
140
+ * @internal
141
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
142
+ */
143
+ export namespace TaskMetadataSchemasExtraData52$ {
144
+ /** @deprecated use `TaskMetadataSchemasExtraData52$inboundSchema` instead. */
145
+ export const inboundSchema = TaskMetadataSchemasExtraData52$inboundSchema;
146
+ /** @deprecated use `TaskMetadataSchemasExtraData52$outboundSchema` instead. */
147
+ export const outboundSchema = TaskMetadataSchemasExtraData52$outboundSchema;
148
+ /** @deprecated use `TaskMetadataSchemasExtraData52$Outbound` instead. */
149
+ export type Outbound = TaskMetadataSchemasExtraData52$Outbound;
150
+ }
151
+
152
+ export function taskMetadataSchemasExtraData52ToJSON(
153
+ taskMetadataSchemasExtraData52: TaskMetadataSchemasExtraData52,
154
+ ): string {
155
+ return JSON.stringify(
156
+ TaskMetadataSchemasExtraData52$outboundSchema.parse(
157
+ taskMetadataSchemasExtraData52,
158
+ ),
159
+ );
160
+ }
161
+
162
+ export function taskMetadataSchemasExtraData52FromJSON(
163
+ jsonString: string,
164
+ ): SafeParseResult<TaskMetadataSchemasExtraData52, SDKValidationError> {
165
+ return safeParse(
166
+ jsonString,
167
+ (x) => TaskMetadataSchemasExtraData52$inboundSchema.parse(JSON.parse(x)),
168
+ `Failed to parse 'TaskMetadataSchemasExtraData52' from JSON`,
169
+ );
170
+ }
171
+
172
+ /** @internal */
173
+ export const TaskMetadata5$inboundSchema: z.ZodType<
174
+ TaskMetadata5,
175
+ z.ZodTypeDef,
176
+ unknown
177
+ > = z.union([
178
+ z.lazy(() => TaskMetadataSchemasExtraData52$inboundSchema),
179
+ z.array(z.any()),
180
+ ]);
181
+
182
+ /** @internal */
183
+ export type TaskMetadata5$Outbound =
184
+ | TaskMetadataSchemasExtraData52$Outbound
185
+ | Array<any>;
186
+
187
+ /** @internal */
188
+ export const TaskMetadata5$outboundSchema: z.ZodType<
189
+ TaskMetadata5$Outbound,
190
+ z.ZodTypeDef,
191
+ TaskMetadata5
192
+ > = z.union([
193
+ z.lazy(() => TaskMetadataSchemasExtraData52$outboundSchema),
194
+ z.array(z.any()),
195
+ ]);
196
+
197
+ /**
198
+ * @internal
199
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
200
+ */
201
+ export namespace TaskMetadata5$ {
202
+ /** @deprecated use `TaskMetadata5$inboundSchema` instead. */
203
+ export const inboundSchema = TaskMetadata5$inboundSchema;
204
+ /** @deprecated use `TaskMetadata5$outboundSchema` instead. */
205
+ export const outboundSchema = TaskMetadata5$outboundSchema;
206
+ /** @deprecated use `TaskMetadata5$Outbound` instead. */
207
+ export type Outbound = TaskMetadata5$Outbound;
208
+ }
209
+
210
+ export function taskMetadata5ToJSON(taskMetadata5: TaskMetadata5): string {
211
+ return JSON.stringify(TaskMetadata5$outboundSchema.parse(taskMetadata5));
212
+ }
213
+
214
+ export function taskMetadata5FromJSON(
215
+ jsonString: string,
216
+ ): SafeParseResult<TaskMetadata5, SDKValidationError> {
217
+ return safeParse(
218
+ jsonString,
219
+ (x) => TaskMetadata5$inboundSchema.parse(JSON.parse(x)),
220
+ `Failed to parse 'TaskMetadata5' from JSON`,
221
+ );
222
+ }
223
+
224
+ /** @internal */
225
+ export const TaskMetadataSchemasExtraData2$inboundSchema: z.ZodType<
226
+ TaskMetadataSchemasExtraData2,
227
+ z.ZodTypeDef,
228
+ unknown
229
+ > = z.object({});
230
+
231
+ /** @internal */
232
+ export type TaskMetadataSchemasExtraData2$Outbound = {};
233
+
234
+ /** @internal */
235
+ export const TaskMetadataSchemasExtraData2$outboundSchema: z.ZodType<
236
+ TaskMetadataSchemasExtraData2$Outbound,
237
+ z.ZodTypeDef,
238
+ TaskMetadataSchemasExtraData2
239
+ > = z.object({});
240
+
241
+ /**
242
+ * @internal
243
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
244
+ */
245
+ export namespace TaskMetadataSchemasExtraData2$ {
246
+ /** @deprecated use `TaskMetadataSchemasExtraData2$inboundSchema` instead. */
247
+ export const inboundSchema = TaskMetadataSchemasExtraData2$inboundSchema;
248
+ /** @deprecated use `TaskMetadataSchemasExtraData2$outboundSchema` instead. */
249
+ export const outboundSchema = TaskMetadataSchemasExtraData2$outboundSchema;
250
+ /** @deprecated use `TaskMetadataSchemasExtraData2$Outbound` instead. */
251
+ export type Outbound = TaskMetadataSchemasExtraData2$Outbound;
252
+ }
253
+
254
+ export function taskMetadataSchemasExtraData2ToJSON(
255
+ taskMetadataSchemasExtraData2: TaskMetadataSchemasExtraData2,
256
+ ): string {
257
+ return JSON.stringify(
258
+ TaskMetadataSchemasExtraData2$outboundSchema.parse(
259
+ taskMetadataSchemasExtraData2,
260
+ ),
261
+ );
262
+ }
263
+
264
+ export function taskMetadataSchemasExtraData2FromJSON(
265
+ jsonString: string,
266
+ ): SafeParseResult<TaskMetadataSchemasExtraData2, SDKValidationError> {
267
+ return safeParse(
268
+ jsonString,
269
+ (x) => TaskMetadataSchemasExtraData2$inboundSchema.parse(JSON.parse(x)),
270
+ `Failed to parse 'TaskMetadataSchemasExtraData2' from JSON`,
271
+ );
272
+ }
273
+
274
+ /** @internal */
275
+ export const TaskMetadata4$inboundSchema: z.ZodType<
276
+ TaskMetadata4,
277
+ z.ZodTypeDef,
278
+ unknown
279
+ > = z.union([
280
+ z.lazy(() => TaskMetadataSchemasExtraData2$inboundSchema),
281
+ z.boolean(),
282
+ ]);
283
+
284
+ /** @internal */
285
+ export type TaskMetadata4$Outbound =
286
+ | TaskMetadataSchemasExtraData2$Outbound
287
+ | boolean;
288
+
289
+ /** @internal */
290
+ export const TaskMetadata4$outboundSchema: z.ZodType<
291
+ TaskMetadata4$Outbound,
292
+ z.ZodTypeDef,
293
+ TaskMetadata4
294
+ > = z.union([
295
+ z.lazy(() => TaskMetadataSchemasExtraData2$outboundSchema),
296
+ z.boolean(),
297
+ ]);
298
+
299
+ /**
300
+ * @internal
301
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
302
+ */
303
+ export namespace TaskMetadata4$ {
304
+ /** @deprecated use `TaskMetadata4$inboundSchema` instead. */
305
+ export const inboundSchema = TaskMetadata4$inboundSchema;
306
+ /** @deprecated use `TaskMetadata4$outboundSchema` instead. */
307
+ export const outboundSchema = TaskMetadata4$outboundSchema;
308
+ /** @deprecated use `TaskMetadata4$Outbound` instead. */
309
+ export type Outbound = TaskMetadata4$Outbound;
310
+ }
311
+
312
+ export function taskMetadata4ToJSON(taskMetadata4: TaskMetadata4): string {
313
+ return JSON.stringify(TaskMetadata4$outboundSchema.parse(taskMetadata4));
314
+ }
315
+
316
+ export function taskMetadata4FromJSON(
317
+ jsonString: string,
318
+ ): SafeParseResult<TaskMetadata4, SDKValidationError> {
319
+ return safeParse(
320
+ jsonString,
321
+ (x) => TaskMetadata4$inboundSchema.parse(JSON.parse(x)),
322
+ `Failed to parse 'TaskMetadata4' from JSON`,
323
+ );
324
+ }
325
+
326
+ /** @internal */
327
+ export const TaskMetadataSchemasExtraData32$inboundSchema: z.ZodType<
328
+ TaskMetadataSchemasExtraData32,
329
+ z.ZodTypeDef,
330
+ unknown
331
+ > = z.object({});
332
+
333
+ /** @internal */
334
+ export type TaskMetadataSchemasExtraData32$Outbound = {};
335
+
336
+ /** @internal */
337
+ export const TaskMetadataSchemasExtraData32$outboundSchema: z.ZodType<
338
+ TaskMetadataSchemasExtraData32$Outbound,
339
+ z.ZodTypeDef,
340
+ TaskMetadataSchemasExtraData32
341
+ > = z.object({});
342
+
343
+ /**
344
+ * @internal
345
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
346
+ */
347
+ export namespace TaskMetadataSchemasExtraData32$ {
348
+ /** @deprecated use `TaskMetadataSchemasExtraData32$inboundSchema` instead. */
349
+ export const inboundSchema = TaskMetadataSchemasExtraData32$inboundSchema;
350
+ /** @deprecated use `TaskMetadataSchemasExtraData32$outboundSchema` instead. */
351
+ export const outboundSchema = TaskMetadataSchemasExtraData32$outboundSchema;
352
+ /** @deprecated use `TaskMetadataSchemasExtraData32$Outbound` instead. */
353
+ export type Outbound = TaskMetadataSchemasExtraData32$Outbound;
354
+ }
355
+
356
+ export function taskMetadataSchemasExtraData32ToJSON(
357
+ taskMetadataSchemasExtraData32: TaskMetadataSchemasExtraData32,
358
+ ): string {
359
+ return JSON.stringify(
360
+ TaskMetadataSchemasExtraData32$outboundSchema.parse(
361
+ taskMetadataSchemasExtraData32,
362
+ ),
363
+ );
364
+ }
365
+
366
+ export function taskMetadataSchemasExtraData32FromJSON(
367
+ jsonString: string,
368
+ ): SafeParseResult<TaskMetadataSchemasExtraData32, SDKValidationError> {
369
+ return safeParse(
370
+ jsonString,
371
+ (x) => TaskMetadataSchemasExtraData32$inboundSchema.parse(JSON.parse(x)),
372
+ `Failed to parse 'TaskMetadataSchemasExtraData32' from JSON`,
373
+ );
374
+ }
375
+
376
+ /** @internal */
377
+ export const TaskMetadata3$inboundSchema: z.ZodType<
378
+ TaskMetadata3,
379
+ z.ZodTypeDef,
380
+ unknown
381
+ > = z.union([
382
+ z.lazy(() => TaskMetadataSchemasExtraData32$inboundSchema),
383
+ z.number(),
384
+ ]);
385
+
386
+ /** @internal */
387
+ export type TaskMetadata3$Outbound =
388
+ | TaskMetadataSchemasExtraData32$Outbound
389
+ | number;
390
+
391
+ /** @internal */
392
+ export const TaskMetadata3$outboundSchema: z.ZodType<
393
+ TaskMetadata3$Outbound,
394
+ z.ZodTypeDef,
395
+ TaskMetadata3
396
+ > = z.union([
397
+ z.lazy(() => TaskMetadataSchemasExtraData32$outboundSchema),
398
+ z.number(),
399
+ ]);
400
+
401
+ /**
402
+ * @internal
403
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
404
+ */
405
+ export namespace TaskMetadata3$ {
406
+ /** @deprecated use `TaskMetadata3$inboundSchema` instead. */
407
+ export const inboundSchema = TaskMetadata3$inboundSchema;
408
+ /** @deprecated use `TaskMetadata3$outboundSchema` instead. */
409
+ export const outboundSchema = TaskMetadata3$outboundSchema;
410
+ /** @deprecated use `TaskMetadata3$Outbound` instead. */
411
+ export type Outbound = TaskMetadata3$Outbound;
412
+ }
413
+
414
+ export function taskMetadata3ToJSON(taskMetadata3: TaskMetadata3): string {
415
+ return JSON.stringify(TaskMetadata3$outboundSchema.parse(taskMetadata3));
416
+ }
417
+
418
+ export function taskMetadata3FromJSON(
419
+ jsonString: string,
420
+ ): SafeParseResult<TaskMetadata3, SDKValidationError> {
421
+ return safeParse(
422
+ jsonString,
423
+ (x) => TaskMetadata3$inboundSchema.parse(JSON.parse(x)),
424
+ `Failed to parse 'TaskMetadata3' from JSON`,
425
+ );
426
+ }
427
+
428
+ /** @internal */
429
+ export const TaskMetadataSchemasExtraData22$inboundSchema: z.ZodType<
430
+ TaskMetadataSchemasExtraData22,
431
+ z.ZodTypeDef,
432
+ unknown
433
+ > = z.object({});
434
+
435
+ /** @internal */
436
+ export type TaskMetadataSchemasExtraData22$Outbound = {};
437
+
438
+ /** @internal */
439
+ export const TaskMetadataSchemasExtraData22$outboundSchema: z.ZodType<
440
+ TaskMetadataSchemasExtraData22$Outbound,
441
+ z.ZodTypeDef,
442
+ TaskMetadataSchemasExtraData22
443
+ > = z.object({});
444
+
445
+ /**
446
+ * @internal
447
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
448
+ */
449
+ export namespace TaskMetadataSchemasExtraData22$ {
450
+ /** @deprecated use `TaskMetadataSchemasExtraData22$inboundSchema` instead. */
451
+ export const inboundSchema = TaskMetadataSchemasExtraData22$inboundSchema;
452
+ /** @deprecated use `TaskMetadataSchemasExtraData22$outboundSchema` instead. */
453
+ export const outboundSchema = TaskMetadataSchemasExtraData22$outboundSchema;
454
+ /** @deprecated use `TaskMetadataSchemasExtraData22$Outbound` instead. */
455
+ export type Outbound = TaskMetadataSchemasExtraData22$Outbound;
456
+ }
457
+
458
+ export function taskMetadataSchemasExtraData22ToJSON(
459
+ taskMetadataSchemasExtraData22: TaskMetadataSchemasExtraData22,
460
+ ): string {
461
+ return JSON.stringify(
462
+ TaskMetadataSchemasExtraData22$outboundSchema.parse(
463
+ taskMetadataSchemasExtraData22,
464
+ ),
465
+ );
466
+ }
467
+
468
+ export function taskMetadataSchemasExtraData22FromJSON(
469
+ jsonString: string,
470
+ ): SafeParseResult<TaskMetadataSchemasExtraData22, SDKValidationError> {
471
+ return safeParse(
472
+ jsonString,
473
+ (x) => TaskMetadataSchemasExtraData22$inboundSchema.parse(JSON.parse(x)),
474
+ `Failed to parse 'TaskMetadataSchemasExtraData22' from JSON`,
475
+ );
476
+ }
477
+
478
+ /** @internal */
479
+ export const TaskMetadata2$inboundSchema: z.ZodType<
480
+ TaskMetadata2,
481
+ z.ZodTypeDef,
482
+ unknown
483
+ > = z.union([
484
+ z.lazy(() => TaskMetadataSchemasExtraData22$inboundSchema),
485
+ z.string(),
486
+ ]);
487
+
488
+ /** @internal */
489
+ export type TaskMetadata2$Outbound =
490
+ | TaskMetadataSchemasExtraData22$Outbound
491
+ | string;
492
+
493
+ /** @internal */
494
+ export const TaskMetadata2$outboundSchema: z.ZodType<
495
+ TaskMetadata2$Outbound,
496
+ z.ZodTypeDef,
497
+ TaskMetadata2
498
+ > = z.union([
499
+ z.lazy(() => TaskMetadataSchemasExtraData22$outboundSchema),
500
+ z.string(),
501
+ ]);
502
+
503
+ /**
504
+ * @internal
505
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
506
+ */
507
+ export namespace TaskMetadata2$ {
508
+ /** @deprecated use `TaskMetadata2$inboundSchema` instead. */
509
+ export const inboundSchema = TaskMetadata2$inboundSchema;
510
+ /** @deprecated use `TaskMetadata2$outboundSchema` instead. */
511
+ export const outboundSchema = TaskMetadata2$outboundSchema;
512
+ /** @deprecated use `TaskMetadata2$Outbound` instead. */
513
+ export type Outbound = TaskMetadata2$Outbound;
514
+ }
515
+
516
+ export function taskMetadata2ToJSON(taskMetadata2: TaskMetadata2): string {
517
+ return JSON.stringify(TaskMetadata2$outboundSchema.parse(taskMetadata2));
518
+ }
519
+
520
+ export function taskMetadata2FromJSON(
521
+ jsonString: string,
522
+ ): SafeParseResult<TaskMetadata2, SDKValidationError> {
523
+ return safeParse(
524
+ jsonString,
525
+ (x) => TaskMetadata2$inboundSchema.parse(JSON.parse(x)),
526
+ `Failed to parse 'TaskMetadata2' from JSON`,
527
+ );
528
+ }
529
+
530
+ /** @internal */
531
+ export const TaskMetadata1$inboundSchema: z.ZodType<
532
+ TaskMetadata1,
533
+ z.ZodTypeDef,
534
+ unknown
535
+ > = z.object({});
536
+
537
+ /** @internal */
538
+ export type TaskMetadata1$Outbound = {};
539
+
540
+ /** @internal */
541
+ export const TaskMetadata1$outboundSchema: z.ZodType<
542
+ TaskMetadata1$Outbound,
543
+ z.ZodTypeDef,
544
+ TaskMetadata1
545
+ > = z.object({});
546
+
547
+ /**
548
+ * @internal
549
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
550
+ */
551
+ export namespace TaskMetadata1$ {
552
+ /** @deprecated use `TaskMetadata1$inboundSchema` instead. */
553
+ export const inboundSchema = TaskMetadata1$inboundSchema;
554
+ /** @deprecated use `TaskMetadata1$outboundSchema` instead. */
555
+ export const outboundSchema = TaskMetadata1$outboundSchema;
556
+ /** @deprecated use `TaskMetadata1$Outbound` instead. */
557
+ export type Outbound = TaskMetadata1$Outbound;
558
+ }
559
+
560
+ export function taskMetadata1ToJSON(taskMetadata1: TaskMetadata1): string {
561
+ return JSON.stringify(TaskMetadata1$outboundSchema.parse(taskMetadata1));
562
+ }
563
+
564
+ export function taskMetadata1FromJSON(
565
+ jsonString: string,
566
+ ): SafeParseResult<TaskMetadata1, SDKValidationError> {
567
+ return safeParse(
568
+ jsonString,
569
+ (x) => TaskMetadata1$inboundSchema.parse(JSON.parse(x)),
570
+ `Failed to parse 'TaskMetadata1' from JSON`,
571
+ );
572
+ }
573
+
574
+ /** @internal */
575
+ export const TaskMetadataExtraData$inboundSchema: z.ZodType<
576
+ TaskMetadataExtraData,
577
+ z.ZodTypeDef,
578
+ unknown
579
+ > = z.union([
580
+ z.lazy(() => TaskMetadata1$inboundSchema),
581
+ z.union([
582
+ z.lazy(() => TaskMetadataSchemasExtraData22$inboundSchema),
583
+ z.string(),
584
+ ]),
585
+ z.union([
586
+ z.lazy(() => TaskMetadataSchemasExtraData32$inboundSchema),
587
+ z.number(),
588
+ ]),
589
+ z.union([
590
+ z.lazy(() => TaskMetadataSchemasExtraData2$inboundSchema),
591
+ z.boolean(),
592
+ ]),
593
+ z.union([
594
+ z.lazy(() => TaskMetadataSchemasExtraData52$inboundSchema),
595
+ z.array(z.any()),
596
+ ]),
597
+ ]);
598
+
599
+ /** @internal */
600
+ export type TaskMetadataExtraData$Outbound =
601
+ | TaskMetadata1$Outbound
602
+ | TaskMetadataSchemasExtraData22$Outbound
603
+ | string
604
+ | TaskMetadataSchemasExtraData32$Outbound
605
+ | number
606
+ | TaskMetadataSchemasExtraData2$Outbound
607
+ | boolean
608
+ | TaskMetadataSchemasExtraData52$Outbound
609
+ | Array<any>;
610
+
611
+ /** @internal */
612
+ export const TaskMetadataExtraData$outboundSchema: z.ZodType<
613
+ TaskMetadataExtraData$Outbound,
614
+ z.ZodTypeDef,
615
+ TaskMetadataExtraData
616
+ > = z.union([
617
+ z.lazy(() => TaskMetadata1$outboundSchema),
618
+ z.union([
619
+ z.lazy(() => TaskMetadataSchemasExtraData22$outboundSchema),
620
+ z.string(),
621
+ ]),
622
+ z.union([
623
+ z.lazy(() => TaskMetadataSchemasExtraData32$outboundSchema),
624
+ z.number(),
625
+ ]),
626
+ z.union([
627
+ z.lazy(() => TaskMetadataSchemasExtraData2$outboundSchema),
628
+ z.boolean(),
629
+ ]),
630
+ z.union([
631
+ z.lazy(() => TaskMetadataSchemasExtraData52$outboundSchema),
632
+ z.array(z.any()),
633
+ ]),
634
+ ]);
635
+
636
+ /**
637
+ * @internal
638
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
639
+ */
640
+ export namespace TaskMetadataExtraData$ {
641
+ /** @deprecated use `TaskMetadataExtraData$inboundSchema` instead. */
642
+ export const inboundSchema = TaskMetadataExtraData$inboundSchema;
643
+ /** @deprecated use `TaskMetadataExtraData$outboundSchema` instead. */
644
+ export const outboundSchema = TaskMetadataExtraData$outboundSchema;
645
+ /** @deprecated use `TaskMetadataExtraData$Outbound` instead. */
646
+ export type Outbound = TaskMetadataExtraData$Outbound;
647
+ }
648
+
649
+ export function taskMetadataExtraDataToJSON(
650
+ taskMetadataExtraData: TaskMetadataExtraData,
651
+ ): string {
652
+ return JSON.stringify(
653
+ TaskMetadataExtraData$outboundSchema.parse(taskMetadataExtraData),
654
+ );
655
+ }
656
+
657
+ export function taskMetadataExtraDataFromJSON(
658
+ jsonString: string,
659
+ ): SafeParseResult<TaskMetadataExtraData, SDKValidationError> {
660
+ return safeParse(
661
+ jsonString,
662
+ (x) => TaskMetadataExtraData$inboundSchema.parse(JSON.parse(x)),
663
+ `Failed to parse 'TaskMetadataExtraData' from JSON`,
664
+ );
665
+ }
666
+
667
+ /** @internal */
668
+ export const TaskMetadataFormat$inboundSchema: z.ZodType<
669
+ TaskMetadataFormat,
670
+ z.ZodTypeDef,
671
+ unknown
672
+ > = z
673
+ .union([
674
+ z.nativeEnum(TaskMetadataFormat),
675
+ z.string().transform(catchUnrecognizedEnum),
676
+ ]);
677
+
678
+ /** @internal */
679
+ export const TaskMetadataFormat$outboundSchema: z.ZodType<
680
+ TaskMetadataFormat,
681
+ z.ZodTypeDef,
682
+ TaskMetadataFormat
683
+ > = z.union([
684
+ z.nativeEnum(TaskMetadataFormat),
685
+ z.string().and(z.custom<Unrecognized<string>>()),
686
+ ]);
687
+
688
+ /**
689
+ * @internal
690
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
691
+ */
692
+ export namespace TaskMetadataFormat$ {
693
+ /** @deprecated use `TaskMetadataFormat$inboundSchema` instead. */
694
+ export const inboundSchema = TaskMetadataFormat$inboundSchema;
695
+ /** @deprecated use `TaskMetadataFormat$outboundSchema` instead. */
696
+ export const outboundSchema = TaskMetadataFormat$outboundSchema;
697
+ }
698
+
699
+ /** @internal */
700
+ export const TaskMetadataSchemasValue52$inboundSchema: z.ZodType<
701
+ TaskMetadataSchemasValue52,
702
+ z.ZodTypeDef,
703
+ unknown
704
+ > = z.object({});
705
+
706
+ /** @internal */
707
+ export type TaskMetadataSchemasValue52$Outbound = {};
708
+
709
+ /** @internal */
710
+ export const TaskMetadataSchemasValue52$outboundSchema: z.ZodType<
711
+ TaskMetadataSchemasValue52$Outbound,
712
+ z.ZodTypeDef,
713
+ TaskMetadataSchemasValue52
714
+ > = z.object({});
715
+
716
+ /**
717
+ * @internal
718
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
719
+ */
720
+ export namespace TaskMetadataSchemasValue52$ {
721
+ /** @deprecated use `TaskMetadataSchemasValue52$inboundSchema` instead. */
722
+ export const inboundSchema = TaskMetadataSchemasValue52$inboundSchema;
723
+ /** @deprecated use `TaskMetadataSchemasValue52$outboundSchema` instead. */
724
+ export const outboundSchema = TaskMetadataSchemasValue52$outboundSchema;
725
+ /** @deprecated use `TaskMetadataSchemasValue52$Outbound` instead. */
726
+ export type Outbound = TaskMetadataSchemasValue52$Outbound;
727
+ }
728
+
729
+ export function taskMetadataSchemasValue52ToJSON(
730
+ taskMetadataSchemasValue52: TaskMetadataSchemasValue52,
731
+ ): string {
732
+ return JSON.stringify(
733
+ TaskMetadataSchemasValue52$outboundSchema.parse(taskMetadataSchemasValue52),
734
+ );
735
+ }
736
+
737
+ export function taskMetadataSchemasValue52FromJSON(
738
+ jsonString: string,
739
+ ): SafeParseResult<TaskMetadataSchemasValue52, SDKValidationError> {
740
+ return safeParse(
741
+ jsonString,
742
+ (x) => TaskMetadataSchemasValue52$inboundSchema.parse(JSON.parse(x)),
743
+ `Failed to parse 'TaskMetadataSchemasValue52' from JSON`,
744
+ );
745
+ }
746
+
747
+ /** @internal */
748
+ export const TaskMetadataSchemas5$inboundSchema: z.ZodType<
749
+ TaskMetadataSchemas5,
750
+ z.ZodTypeDef,
751
+ unknown
752
+ > = z.union([
753
+ z.lazy(() => TaskMetadataSchemasValue52$inboundSchema),
754
+ z.array(z.any()),
755
+ ]);
756
+
757
+ /** @internal */
758
+ export type TaskMetadataSchemas5$Outbound =
759
+ | TaskMetadataSchemasValue52$Outbound
760
+ | Array<any>;
761
+
762
+ /** @internal */
763
+ export const TaskMetadataSchemas5$outboundSchema: z.ZodType<
764
+ TaskMetadataSchemas5$Outbound,
765
+ z.ZodTypeDef,
766
+ TaskMetadataSchemas5
767
+ > = z.union([
768
+ z.lazy(() => TaskMetadataSchemasValue52$outboundSchema),
769
+ z.array(z.any()),
770
+ ]);
771
+
772
+ /**
773
+ * @internal
774
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
775
+ */
776
+ export namespace TaskMetadataSchemas5$ {
777
+ /** @deprecated use `TaskMetadataSchemas5$inboundSchema` instead. */
778
+ export const inboundSchema = TaskMetadataSchemas5$inboundSchema;
779
+ /** @deprecated use `TaskMetadataSchemas5$outboundSchema` instead. */
780
+ export const outboundSchema = TaskMetadataSchemas5$outboundSchema;
781
+ /** @deprecated use `TaskMetadataSchemas5$Outbound` instead. */
782
+ export type Outbound = TaskMetadataSchemas5$Outbound;
783
+ }
784
+
785
+ export function taskMetadataSchemas5ToJSON(
786
+ taskMetadataSchemas5: TaskMetadataSchemas5,
787
+ ): string {
788
+ return JSON.stringify(
789
+ TaskMetadataSchemas5$outboundSchema.parse(taskMetadataSchemas5),
790
+ );
791
+ }
792
+
793
+ export function taskMetadataSchemas5FromJSON(
794
+ jsonString: string,
795
+ ): SafeParseResult<TaskMetadataSchemas5, SDKValidationError> {
796
+ return safeParse(
797
+ jsonString,
798
+ (x) => TaskMetadataSchemas5$inboundSchema.parse(JSON.parse(x)),
799
+ `Failed to parse 'TaskMetadataSchemas5' from JSON`,
800
+ );
801
+ }
802
+
803
+ /** @internal */
804
+ export const TaskMetadataSchemasValue42$inboundSchema: z.ZodType<
805
+ TaskMetadataSchemasValue42,
806
+ z.ZodTypeDef,
807
+ unknown
808
+ > = z.object({});
809
+
810
+ /** @internal */
811
+ export type TaskMetadataSchemasValue42$Outbound = {};
812
+
813
+ /** @internal */
814
+ export const TaskMetadataSchemasValue42$outboundSchema: z.ZodType<
815
+ TaskMetadataSchemasValue42$Outbound,
816
+ z.ZodTypeDef,
817
+ TaskMetadataSchemasValue42
818
+ > = z.object({});
819
+
820
+ /**
821
+ * @internal
822
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
823
+ */
824
+ export namespace TaskMetadataSchemasValue42$ {
825
+ /** @deprecated use `TaskMetadataSchemasValue42$inboundSchema` instead. */
826
+ export const inboundSchema = TaskMetadataSchemasValue42$inboundSchema;
827
+ /** @deprecated use `TaskMetadataSchemasValue42$outboundSchema` instead. */
828
+ export const outboundSchema = TaskMetadataSchemasValue42$outboundSchema;
829
+ /** @deprecated use `TaskMetadataSchemasValue42$Outbound` instead. */
830
+ export type Outbound = TaskMetadataSchemasValue42$Outbound;
831
+ }
832
+
833
+ export function taskMetadataSchemasValue42ToJSON(
834
+ taskMetadataSchemasValue42: TaskMetadataSchemasValue42,
835
+ ): string {
836
+ return JSON.stringify(
837
+ TaskMetadataSchemasValue42$outboundSchema.parse(taskMetadataSchemasValue42),
838
+ );
839
+ }
840
+
841
+ export function taskMetadataSchemasValue42FromJSON(
842
+ jsonString: string,
843
+ ): SafeParseResult<TaskMetadataSchemasValue42, SDKValidationError> {
844
+ return safeParse(
845
+ jsonString,
846
+ (x) => TaskMetadataSchemasValue42$inboundSchema.parse(JSON.parse(x)),
847
+ `Failed to parse 'TaskMetadataSchemasValue42' from JSON`,
848
+ );
849
+ }
850
+
851
+ /** @internal */
852
+ export const TaskMetadataSchemas4$inboundSchema: z.ZodType<
853
+ TaskMetadataSchemas4,
854
+ z.ZodTypeDef,
855
+ unknown
856
+ > = z.union([
857
+ z.lazy(() => TaskMetadataSchemasValue42$inboundSchema),
858
+ z.boolean(),
859
+ ]);
860
+
861
+ /** @internal */
862
+ export type TaskMetadataSchemas4$Outbound =
863
+ | TaskMetadataSchemasValue42$Outbound
864
+ | boolean;
865
+
866
+ /** @internal */
867
+ export const TaskMetadataSchemas4$outboundSchema: z.ZodType<
868
+ TaskMetadataSchemas4$Outbound,
869
+ z.ZodTypeDef,
870
+ TaskMetadataSchemas4
871
+ > = z.union([
872
+ z.lazy(() => TaskMetadataSchemasValue42$outboundSchema),
873
+ z.boolean(),
874
+ ]);
875
+
876
+ /**
877
+ * @internal
878
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
879
+ */
880
+ export namespace TaskMetadataSchemas4$ {
881
+ /** @deprecated use `TaskMetadataSchemas4$inboundSchema` instead. */
882
+ export const inboundSchema = TaskMetadataSchemas4$inboundSchema;
883
+ /** @deprecated use `TaskMetadataSchemas4$outboundSchema` instead. */
884
+ export const outboundSchema = TaskMetadataSchemas4$outboundSchema;
885
+ /** @deprecated use `TaskMetadataSchemas4$Outbound` instead. */
886
+ export type Outbound = TaskMetadataSchemas4$Outbound;
887
+ }
888
+
889
+ export function taskMetadataSchemas4ToJSON(
890
+ taskMetadataSchemas4: TaskMetadataSchemas4,
891
+ ): string {
892
+ return JSON.stringify(
893
+ TaskMetadataSchemas4$outboundSchema.parse(taskMetadataSchemas4),
894
+ );
895
+ }
896
+
897
+ export function taskMetadataSchemas4FromJSON(
898
+ jsonString: string,
899
+ ): SafeParseResult<TaskMetadataSchemas4, SDKValidationError> {
900
+ return safeParse(
901
+ jsonString,
902
+ (x) => TaskMetadataSchemas4$inboundSchema.parse(JSON.parse(x)),
903
+ `Failed to parse 'TaskMetadataSchemas4' from JSON`,
904
+ );
905
+ }
906
+
907
+ /** @internal */
908
+ export const TaskMetadataSchemasValue32$inboundSchema: z.ZodType<
909
+ TaskMetadataSchemasValue32,
910
+ z.ZodTypeDef,
911
+ unknown
912
+ > = z.object({});
913
+
914
+ /** @internal */
915
+ export type TaskMetadataSchemasValue32$Outbound = {};
916
+
917
+ /** @internal */
918
+ export const TaskMetadataSchemasValue32$outboundSchema: z.ZodType<
919
+ TaskMetadataSchemasValue32$Outbound,
920
+ z.ZodTypeDef,
921
+ TaskMetadataSchemasValue32
922
+ > = z.object({});
923
+
924
+ /**
925
+ * @internal
926
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
927
+ */
928
+ export namespace TaskMetadataSchemasValue32$ {
929
+ /** @deprecated use `TaskMetadataSchemasValue32$inboundSchema` instead. */
930
+ export const inboundSchema = TaskMetadataSchemasValue32$inboundSchema;
931
+ /** @deprecated use `TaskMetadataSchemasValue32$outboundSchema` instead. */
932
+ export const outboundSchema = TaskMetadataSchemasValue32$outboundSchema;
933
+ /** @deprecated use `TaskMetadataSchemasValue32$Outbound` instead. */
934
+ export type Outbound = TaskMetadataSchemasValue32$Outbound;
935
+ }
936
+
937
+ export function taskMetadataSchemasValue32ToJSON(
938
+ taskMetadataSchemasValue32: TaskMetadataSchemasValue32,
939
+ ): string {
940
+ return JSON.stringify(
941
+ TaskMetadataSchemasValue32$outboundSchema.parse(taskMetadataSchemasValue32),
942
+ );
943
+ }
944
+
945
+ export function taskMetadataSchemasValue32FromJSON(
946
+ jsonString: string,
947
+ ): SafeParseResult<TaskMetadataSchemasValue32, SDKValidationError> {
948
+ return safeParse(
949
+ jsonString,
950
+ (x) => TaskMetadataSchemasValue32$inboundSchema.parse(JSON.parse(x)),
951
+ `Failed to parse 'TaskMetadataSchemasValue32' from JSON`,
952
+ );
953
+ }
954
+
955
+ /** @internal */
956
+ export const TaskMetadataSchemas3$inboundSchema: z.ZodType<
957
+ TaskMetadataSchemas3,
958
+ z.ZodTypeDef,
959
+ unknown
960
+ > = z.union([
961
+ z.lazy(() => TaskMetadataSchemasValue32$inboundSchema),
962
+ z.number(),
963
+ ]);
964
+
965
+ /** @internal */
966
+ export type TaskMetadataSchemas3$Outbound =
967
+ | TaskMetadataSchemasValue32$Outbound
968
+ | number;
969
+
970
+ /** @internal */
971
+ export const TaskMetadataSchemas3$outboundSchema: z.ZodType<
972
+ TaskMetadataSchemas3$Outbound,
973
+ z.ZodTypeDef,
974
+ TaskMetadataSchemas3
975
+ > = z.union([
976
+ z.lazy(() => TaskMetadataSchemasValue32$outboundSchema),
977
+ z.number(),
978
+ ]);
979
+
980
+ /**
981
+ * @internal
982
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
983
+ */
984
+ export namespace TaskMetadataSchemas3$ {
985
+ /** @deprecated use `TaskMetadataSchemas3$inboundSchema` instead. */
986
+ export const inboundSchema = TaskMetadataSchemas3$inboundSchema;
987
+ /** @deprecated use `TaskMetadataSchemas3$outboundSchema` instead. */
988
+ export const outboundSchema = TaskMetadataSchemas3$outboundSchema;
989
+ /** @deprecated use `TaskMetadataSchemas3$Outbound` instead. */
990
+ export type Outbound = TaskMetadataSchemas3$Outbound;
991
+ }
992
+
993
+ export function taskMetadataSchemas3ToJSON(
994
+ taskMetadataSchemas3: TaskMetadataSchemas3,
995
+ ): string {
996
+ return JSON.stringify(
997
+ TaskMetadataSchemas3$outboundSchema.parse(taskMetadataSchemas3),
998
+ );
999
+ }
1000
+
1001
+ export function taskMetadataSchemas3FromJSON(
1002
+ jsonString: string,
1003
+ ): SafeParseResult<TaskMetadataSchemas3, SDKValidationError> {
1004
+ return safeParse(
1005
+ jsonString,
1006
+ (x) => TaskMetadataSchemas3$inboundSchema.parse(JSON.parse(x)),
1007
+ `Failed to parse 'TaskMetadataSchemas3' from JSON`,
1008
+ );
1009
+ }
1010
+
1011
+ /** @internal */
1012
+ export const TaskMetadataSchemasValue2$inboundSchema: z.ZodType<
1013
+ TaskMetadataSchemasValue2,
1014
+ z.ZodTypeDef,
1015
+ unknown
1016
+ > = z.object({});
1017
+
1018
+ /** @internal */
1019
+ export type TaskMetadataSchemasValue2$Outbound = {};
1020
+
1021
+ /** @internal */
1022
+ export const TaskMetadataSchemasValue2$outboundSchema: z.ZodType<
1023
+ TaskMetadataSchemasValue2$Outbound,
1024
+ z.ZodTypeDef,
1025
+ TaskMetadataSchemasValue2
1026
+ > = z.object({});
1027
+
1028
+ /**
1029
+ * @internal
1030
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1031
+ */
1032
+ export namespace TaskMetadataSchemasValue2$ {
1033
+ /** @deprecated use `TaskMetadataSchemasValue2$inboundSchema` instead. */
1034
+ export const inboundSchema = TaskMetadataSchemasValue2$inboundSchema;
1035
+ /** @deprecated use `TaskMetadataSchemasValue2$outboundSchema` instead. */
1036
+ export const outboundSchema = TaskMetadataSchemasValue2$outboundSchema;
1037
+ /** @deprecated use `TaskMetadataSchemasValue2$Outbound` instead. */
1038
+ export type Outbound = TaskMetadataSchemasValue2$Outbound;
1039
+ }
1040
+
1041
+ export function taskMetadataSchemasValue2ToJSON(
1042
+ taskMetadataSchemasValue2: TaskMetadataSchemasValue2,
1043
+ ): string {
1044
+ return JSON.stringify(
1045
+ TaskMetadataSchemasValue2$outboundSchema.parse(taskMetadataSchemasValue2),
1046
+ );
1047
+ }
1048
+
1049
+ export function taskMetadataSchemasValue2FromJSON(
1050
+ jsonString: string,
1051
+ ): SafeParseResult<TaskMetadataSchemasValue2, SDKValidationError> {
1052
+ return safeParse(
1053
+ jsonString,
1054
+ (x) => TaskMetadataSchemasValue2$inboundSchema.parse(JSON.parse(x)),
1055
+ `Failed to parse 'TaskMetadataSchemasValue2' from JSON`,
1056
+ );
1057
+ }
1058
+
1059
+ /** @internal */
1060
+ export const TaskMetadataSchemas2$inboundSchema: z.ZodType<
1061
+ TaskMetadataSchemas2,
1062
+ z.ZodTypeDef,
1063
+ unknown
1064
+ > = z.union([
1065
+ z.lazy(() => TaskMetadataSchemasValue2$inboundSchema),
1066
+ z.string(),
1067
+ ]);
1068
+
1069
+ /** @internal */
1070
+ export type TaskMetadataSchemas2$Outbound =
1071
+ | TaskMetadataSchemasValue2$Outbound
1072
+ | string;
1073
+
1074
+ /** @internal */
1075
+ export const TaskMetadataSchemas2$outboundSchema: z.ZodType<
1076
+ TaskMetadataSchemas2$Outbound,
1077
+ z.ZodTypeDef,
1078
+ TaskMetadataSchemas2
1079
+ > = z.union([
1080
+ z.lazy(() => TaskMetadataSchemasValue2$outboundSchema),
1081
+ z.string(),
1082
+ ]);
1083
+
1084
+ /**
1085
+ * @internal
1086
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1087
+ */
1088
+ export namespace TaskMetadataSchemas2$ {
1089
+ /** @deprecated use `TaskMetadataSchemas2$inboundSchema` instead. */
1090
+ export const inboundSchema = TaskMetadataSchemas2$inboundSchema;
1091
+ /** @deprecated use `TaskMetadataSchemas2$outboundSchema` instead. */
1092
+ export const outboundSchema = TaskMetadataSchemas2$outboundSchema;
1093
+ /** @deprecated use `TaskMetadataSchemas2$Outbound` instead. */
1094
+ export type Outbound = TaskMetadataSchemas2$Outbound;
1095
+ }
1096
+
1097
+ export function taskMetadataSchemas2ToJSON(
1098
+ taskMetadataSchemas2: TaskMetadataSchemas2,
1099
+ ): string {
1100
+ return JSON.stringify(
1101
+ TaskMetadataSchemas2$outboundSchema.parse(taskMetadataSchemas2),
1102
+ );
1103
+ }
1104
+
1105
+ export function taskMetadataSchemas2FromJSON(
1106
+ jsonString: string,
1107
+ ): SafeParseResult<TaskMetadataSchemas2, SDKValidationError> {
1108
+ return safeParse(
1109
+ jsonString,
1110
+ (x) => TaskMetadataSchemas2$inboundSchema.parse(JSON.parse(x)),
1111
+ `Failed to parse 'TaskMetadataSchemas2' from JSON`,
1112
+ );
1113
+ }
1114
+
1115
+ /** @internal */
1116
+ export const TaskMetadataSchemas1$inboundSchema: z.ZodType<
1117
+ TaskMetadataSchemas1,
1118
+ z.ZodTypeDef,
1119
+ unknown
1120
+ > = z.object({});
1121
+
1122
+ /** @internal */
1123
+ export type TaskMetadataSchemas1$Outbound = {};
1124
+
1125
+ /** @internal */
1126
+ export const TaskMetadataSchemas1$outboundSchema: z.ZodType<
1127
+ TaskMetadataSchemas1$Outbound,
1128
+ z.ZodTypeDef,
1129
+ TaskMetadataSchemas1
1130
+ > = z.object({});
1131
+
1132
+ /**
1133
+ * @internal
1134
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1135
+ */
1136
+ export namespace TaskMetadataSchemas1$ {
1137
+ /** @deprecated use `TaskMetadataSchemas1$inboundSchema` instead. */
1138
+ export const inboundSchema = TaskMetadataSchemas1$inboundSchema;
1139
+ /** @deprecated use `TaskMetadataSchemas1$outboundSchema` instead. */
1140
+ export const outboundSchema = TaskMetadataSchemas1$outboundSchema;
1141
+ /** @deprecated use `TaskMetadataSchemas1$Outbound` instead. */
1142
+ export type Outbound = TaskMetadataSchemas1$Outbound;
1143
+ }
1144
+
1145
+ export function taskMetadataSchemas1ToJSON(
1146
+ taskMetadataSchemas1: TaskMetadataSchemas1,
1147
+ ): string {
1148
+ return JSON.stringify(
1149
+ TaskMetadataSchemas1$outboundSchema.parse(taskMetadataSchemas1),
1150
+ );
1151
+ }
1152
+
1153
+ export function taskMetadataSchemas1FromJSON(
1154
+ jsonString: string,
1155
+ ): SafeParseResult<TaskMetadataSchemas1, SDKValidationError> {
1156
+ return safeParse(
1157
+ jsonString,
1158
+ (x) => TaskMetadataSchemas1$inboundSchema.parse(JSON.parse(x)),
1159
+ `Failed to parse 'TaskMetadataSchemas1' from JSON`,
1160
+ );
1161
+ }
1162
+
1163
+ /** @internal */
1164
+ export const TaskMetadataValue$inboundSchema: z.ZodType<
1165
+ TaskMetadataValue,
1166
+ z.ZodTypeDef,
1167
+ unknown
1168
+ > = z.union([
1169
+ z.lazy(() => TaskMetadataSchemas1$inboundSchema),
1170
+ z.union([z.lazy(() => TaskMetadataSchemasValue2$inboundSchema), z.string()]),
1171
+ z.union([z.lazy(() => TaskMetadataSchemasValue32$inboundSchema), z.number()]),
1172
+ z.union([
1173
+ z.lazy(() => TaskMetadataSchemasValue42$inboundSchema),
1174
+ z.boolean(),
1175
+ ]),
1176
+ z.union([
1177
+ z.lazy(() => TaskMetadataSchemasValue52$inboundSchema),
1178
+ z.array(z.any()),
1179
+ ]),
1180
+ ]);
1181
+
1182
+ /** @internal */
1183
+ export type TaskMetadataValue$Outbound =
1184
+ | TaskMetadataSchemas1$Outbound
1185
+ | TaskMetadataSchemasValue2$Outbound
1186
+ | string
1187
+ | TaskMetadataSchemasValue32$Outbound
1188
+ | number
1189
+ | TaskMetadataSchemasValue42$Outbound
1190
+ | boolean
1191
+ | TaskMetadataSchemasValue52$Outbound
1192
+ | Array<any>;
1193
+
1194
+ /** @internal */
1195
+ export const TaskMetadataValue$outboundSchema: z.ZodType<
1196
+ TaskMetadataValue$Outbound,
1197
+ z.ZodTypeDef,
1198
+ TaskMetadataValue
1199
+ > = z.union([
1200
+ z.lazy(() => TaskMetadataSchemas1$outboundSchema),
1201
+ z.union([z.lazy(() => TaskMetadataSchemasValue2$outboundSchema), z.string()]),
1202
+ z.union([
1203
+ z.lazy(() => TaskMetadataSchemasValue32$outboundSchema),
1204
+ z.number(),
1205
+ ]),
1206
+ z.union([
1207
+ z.lazy(() => TaskMetadataSchemasValue42$outboundSchema),
1208
+ z.boolean(),
1209
+ ]),
1210
+ z.union([
1211
+ z.lazy(() => TaskMetadataSchemasValue52$outboundSchema),
1212
+ z.array(z.any()),
1213
+ ]),
1214
+ ]);
1215
+
1216
+ /**
1217
+ * @internal
1218
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1219
+ */
1220
+ export namespace TaskMetadataValue$ {
1221
+ /** @deprecated use `TaskMetadataValue$inboundSchema` instead. */
1222
+ export const inboundSchema = TaskMetadataValue$inboundSchema;
1223
+ /** @deprecated use `TaskMetadataValue$outboundSchema` instead. */
1224
+ export const outboundSchema = TaskMetadataValue$outboundSchema;
1225
+ /** @deprecated use `TaskMetadataValue$Outbound` instead. */
1226
+ export type Outbound = TaskMetadataValue$Outbound;
1227
+ }
1228
+
1229
+ export function taskMetadataValueToJSON(
1230
+ taskMetadataValue: TaskMetadataValue,
1231
+ ): string {
1232
+ return JSON.stringify(
1233
+ TaskMetadataValue$outboundSchema.parse(taskMetadataValue),
1234
+ );
1235
+ }
1236
+
1237
+ export function taskMetadataValueFromJSON(
1238
+ jsonString: string,
1239
+ ): SafeParseResult<TaskMetadataValue, SDKValidationError> {
1240
+ return safeParse(
1241
+ jsonString,
1242
+ (x) => TaskMetadataValue$inboundSchema.parse(JSON.parse(x)),
1243
+ `Failed to parse 'TaskMetadataValue' from JSON`,
1244
+ );
1245
+ }
1246
+
1247
+ /** @internal */
1248
+ export const TaskMetadata$inboundSchema: z.ZodType<
1249
+ TaskMetadata,
1250
+ z.ZodTypeDef,
1251
+ unknown
1252
+ > = z.object({
1253
+ extra_data: z.union([
1254
+ z.lazy(() => TaskMetadata1$inboundSchema),
1255
+ z.union([
1256
+ z.lazy(() => TaskMetadataSchemasExtraData22$inboundSchema),
1257
+ z.string(),
1258
+ ]),
1259
+ z.union([
1260
+ z.lazy(() => TaskMetadataSchemasExtraData32$inboundSchema),
1261
+ z.number(),
1262
+ ]),
1263
+ z.union([
1264
+ z.lazy(() => TaskMetadataSchemasExtraData2$inboundSchema),
1265
+ z.boolean(),
1266
+ ]),
1267
+ z.union([
1268
+ z.lazy(() => TaskMetadataSchemasExtraData52$inboundSchema),
1269
+ z.array(z.any()),
1270
+ ]),
1271
+ ]).optional(),
1272
+ format: TaskMetadataFormat$inboundSchema.optional(),
1273
+ id: z.string().optional(),
1274
+ key: z.string().optional(),
1275
+ namespace: z.string().optional(),
1276
+ slug: z.string().optional(),
1277
+ type: z.string().optional(),
1278
+ value: z.union([
1279
+ z.lazy(() => TaskMetadataSchemas1$inboundSchema),
1280
+ z.union([
1281
+ z.lazy(() => TaskMetadataSchemasValue2$inboundSchema),
1282
+ z.string(),
1283
+ ]),
1284
+ z.union([
1285
+ z.lazy(() => TaskMetadataSchemasValue32$inboundSchema),
1286
+ z.number(),
1287
+ ]),
1288
+ z.union([
1289
+ z.lazy(() => TaskMetadataSchemasValue42$inboundSchema),
1290
+ z.boolean(),
1291
+ ]),
1292
+ z.union([
1293
+ z.lazy(() => TaskMetadataSchemasValue52$inboundSchema),
1294
+ z.array(z.any()),
1295
+ ]),
1296
+ ]).optional(),
1297
+ }).transform((v) => {
1298
+ return remap$(v, {
1299
+ "extra_data": "extraData",
1300
+ });
1301
+ });
1302
+
1303
+ /** @internal */
1304
+ export type TaskMetadata$Outbound = {
1305
+ extra_data?:
1306
+ | TaskMetadata1$Outbound
1307
+ | TaskMetadataSchemasExtraData22$Outbound
1308
+ | string
1309
+ | TaskMetadataSchemasExtraData32$Outbound
1310
+ | number
1311
+ | TaskMetadataSchemasExtraData2$Outbound
1312
+ | boolean
1313
+ | TaskMetadataSchemasExtraData52$Outbound
1314
+ | Array<any>
1315
+ | undefined;
1316
+ format?: string | undefined;
1317
+ id?: string | undefined;
1318
+ key?: string | undefined;
1319
+ namespace?: string | undefined;
1320
+ slug?: string | undefined;
1321
+ type?: string | undefined;
1322
+ value?:
1323
+ | TaskMetadataSchemas1$Outbound
1324
+ | TaskMetadataSchemasValue2$Outbound
1325
+ | string
1326
+ | TaskMetadataSchemasValue32$Outbound
1327
+ | number
1328
+ | TaskMetadataSchemasValue42$Outbound
1329
+ | boolean
1330
+ | TaskMetadataSchemasValue52$Outbound
1331
+ | Array<any>
1332
+ | undefined;
1333
+ };
1334
+
1335
+ /** @internal */
1336
+ export const TaskMetadata$outboundSchema: z.ZodType<
1337
+ TaskMetadata$Outbound,
1338
+ z.ZodTypeDef,
1339
+ TaskMetadata
1340
+ > = z.object({
1341
+ extraData: z.union([
1342
+ z.lazy(() => TaskMetadata1$outboundSchema),
1343
+ z.union([
1344
+ z.lazy(() => TaskMetadataSchemasExtraData22$outboundSchema),
1345
+ z.string(),
1346
+ ]),
1347
+ z.union([
1348
+ z.lazy(() => TaskMetadataSchemasExtraData32$outboundSchema),
1349
+ z.number(),
1350
+ ]),
1351
+ z.union([
1352
+ z.lazy(() => TaskMetadataSchemasExtraData2$outboundSchema),
1353
+ z.boolean(),
1354
+ ]),
1355
+ z.union([
1356
+ z.lazy(() => TaskMetadataSchemasExtraData52$outboundSchema),
1357
+ z.array(z.any()),
1358
+ ]),
1359
+ ]).optional(),
1360
+ format: TaskMetadataFormat$outboundSchema.optional(),
1361
+ id: z.string().optional(),
1362
+ key: z.string().optional(),
1363
+ namespace: z.string().optional(),
1364
+ slug: z.string().optional(),
1365
+ type: z.string().optional(),
1366
+ value: z.union([
1367
+ z.lazy(() => TaskMetadataSchemas1$outboundSchema),
1368
+ z.union([
1369
+ z.lazy(() => TaskMetadataSchemasValue2$outboundSchema),
1370
+ z.string(),
1371
+ ]),
1372
+ z.union([
1373
+ z.lazy(() => TaskMetadataSchemasValue32$outboundSchema),
1374
+ z.number(),
1375
+ ]),
1376
+ z.union([
1377
+ z.lazy(() => TaskMetadataSchemasValue42$outboundSchema),
1378
+ z.boolean(),
1379
+ ]),
1380
+ z.union([
1381
+ z.lazy(() => TaskMetadataSchemasValue52$outboundSchema),
1382
+ z.array(z.any()),
1383
+ ]),
1384
+ ]).optional(),
1385
+ }).transform((v) => {
1386
+ return remap$(v, {
1387
+ extraData: "extra_data",
1388
+ });
1389
+ });
1390
+
1391
+ /**
1392
+ * @internal
1393
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1394
+ */
1395
+ export namespace TaskMetadata$ {
1396
+ /** @deprecated use `TaskMetadata$inboundSchema` instead. */
1397
+ export const inboundSchema = TaskMetadata$inboundSchema;
1398
+ /** @deprecated use `TaskMetadata$outboundSchema` instead. */
1399
+ export const outboundSchema = TaskMetadata$outboundSchema;
1400
+ /** @deprecated use `TaskMetadata$Outbound` instead. */
1401
+ export type Outbound = TaskMetadata$Outbound;
1402
+ }
1403
+
1404
+ export function taskMetadataToJSON(taskMetadata: TaskMetadata): string {
1405
+ return JSON.stringify(TaskMetadata$outboundSchema.parse(taskMetadata));
1406
+ }
1407
+
1408
+ export function taskMetadataFromJSON(
1409
+ jsonString: string,
1410
+ ): SafeParseResult<TaskMetadata, SDKValidationError> {
1411
+ return safeParse(
1412
+ jsonString,
1413
+ (x) => TaskMetadata$inboundSchema.parse(JSON.parse(x)),
1414
+ `Failed to parse 'TaskMetadata' from JSON`,
1415
+ );
1416
+ }