@wise/dynamic-flow-types 3.14.0 → 3.15.0
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/build/main.js +78 -78
- package/build/main.mjs +78 -78
- package/build/next/schema/ConstSchema.d.ts +13 -8
- package/build/zod/schemas.d.ts +1691 -1691
- package/build/zod/schemas.ts +105 -104
- package/package.json +4 -4
package/build/zod/schemas.ts
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
// Generated by ts-to-zod
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import
|
|
4
|
-
JsonElement,
|
|
5
|
-
AdditionalInfo,
|
|
6
|
-
Behavior,
|
|
7
|
-
ModalResponseBody,
|
|
8
|
-
Layout,
|
|
9
|
-
SectionLayoutCallToAction,
|
|
10
|
-
ListLayoutCallToAction,
|
|
11
|
-
ListLayoutItem,
|
|
12
|
-
ButtonLayout,
|
|
13
|
-
TabsLayout,
|
|
14
|
-
TabsLayoutTab,
|
|
15
|
-
ListLayout,
|
|
16
|
-
ItemCallToAction,
|
|
17
|
-
StatusListLayout,
|
|
18
|
-
StatusListLayoutItem,
|
|
19
|
-
DecisionLayoutOption,
|
|
20
|
-
DecisionLayout,
|
|
21
|
-
ReviewLayout,
|
|
22
|
-
ReviewLayoutField,
|
|
23
|
-
ReviewLayoutCallToAction,
|
|
24
|
-
BoxLayout,
|
|
25
|
-
ModalLayout,
|
|
26
|
-
ModalLayoutContent,
|
|
27
|
-
AlertLayout,
|
|
28
|
-
AlertLayoutCallToAction,
|
|
29
|
-
SectionLayout,
|
|
30
|
-
ColumnsLayout,
|
|
31
|
-
Step,
|
|
32
|
-
Schema,
|
|
33
|
-
Polling,
|
|
34
|
-
LinkHandler,
|
|
35
|
-
Toolbar,
|
|
36
|
-
ModalBehavior,
|
|
37
|
-
PollingOnError,
|
|
38
|
-
ToolbarItem,
|
|
39
|
-
ToolbarButton,
|
|
40
|
-
PersistAsync,
|
|
41
|
-
BlobSchema,
|
|
42
|
-
OneOfSchema,
|
|
43
|
-
IntegerSchema,
|
|
44
|
-
StringSchema,
|
|
45
|
-
ObjectSchema,
|
|
46
|
-
AllOfSchema,
|
|
47
|
-
ArraySchema,
|
|
48
|
-
BooleanSchema,
|
|
49
|
-
ConstSchema,
|
|
50
|
-
NumberSchema,
|
|
51
|
-
ArraySchemaTuple,
|
|
52
|
-
ArraySchemaList,
|
|
3
|
+
import {
|
|
4
|
+
type JsonElement,
|
|
5
|
+
type AdditionalInfo,
|
|
6
|
+
type Behavior,
|
|
7
|
+
type ModalResponseBody,
|
|
8
|
+
type Layout,
|
|
9
|
+
type SectionLayoutCallToAction,
|
|
10
|
+
type ListLayoutCallToAction,
|
|
11
|
+
type ListLayoutItem,
|
|
12
|
+
type ButtonLayout,
|
|
13
|
+
type TabsLayout,
|
|
14
|
+
type TabsLayoutTab,
|
|
15
|
+
type ListLayout,
|
|
16
|
+
type ItemCallToAction,
|
|
17
|
+
type StatusListLayout,
|
|
18
|
+
type StatusListLayoutItem,
|
|
19
|
+
type DecisionLayoutOption,
|
|
20
|
+
type DecisionLayout,
|
|
21
|
+
type ReviewLayout,
|
|
22
|
+
type ReviewLayoutField,
|
|
23
|
+
type ReviewLayoutCallToAction,
|
|
24
|
+
type BoxLayout,
|
|
25
|
+
type ModalLayout,
|
|
26
|
+
type ModalLayoutContent,
|
|
27
|
+
type AlertLayout,
|
|
28
|
+
type AlertLayoutCallToAction,
|
|
29
|
+
type SectionLayout,
|
|
30
|
+
type ColumnsLayout,
|
|
31
|
+
type Step,
|
|
32
|
+
type Schema,
|
|
33
|
+
type Polling,
|
|
34
|
+
type LinkHandler,
|
|
35
|
+
type Toolbar,
|
|
36
|
+
type ModalBehavior,
|
|
37
|
+
type PollingOnError,
|
|
38
|
+
type ToolbarItem,
|
|
39
|
+
type ToolbarButton,
|
|
40
|
+
type PersistAsync,
|
|
41
|
+
type BlobSchema,
|
|
42
|
+
type OneOfSchema,
|
|
43
|
+
type IntegerSchema,
|
|
44
|
+
type StringSchema,
|
|
45
|
+
type ObjectSchema,
|
|
46
|
+
type AllOfSchema,
|
|
47
|
+
type ArraySchema,
|
|
48
|
+
type BooleanSchema,
|
|
49
|
+
type ConstSchema,
|
|
50
|
+
type NumberSchema,
|
|
51
|
+
type ArraySchemaTuple,
|
|
52
|
+
type ArraySchemaList,
|
|
53
53
|
} from '../next';
|
|
54
54
|
|
|
55
55
|
export const autocapitalizationTypeSchema = z.union([
|
|
@@ -204,6 +204,8 @@ export const jsonElementSchema: z.ZodSchema<JsonElement> = z.lazy(() =>
|
|
|
204
204
|
.nullable(),
|
|
205
205
|
);
|
|
206
206
|
|
|
207
|
+
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
208
|
+
|
|
207
209
|
export const searchSearchRequestSchema = z.object({
|
|
208
210
|
url: z.string(),
|
|
209
211
|
method: httpMethodSchema,
|
|
@@ -256,6 +258,11 @@ export const searchLayoutSchema = z.object({
|
|
|
256
258
|
analyticsId: z.string().optional(),
|
|
257
259
|
});
|
|
258
260
|
|
|
261
|
+
export const inlineAlertSchema = z.object({
|
|
262
|
+
content: z.string(),
|
|
263
|
+
context: contextSchema.optional(),
|
|
264
|
+
});
|
|
265
|
+
|
|
259
266
|
export const instructionsLayoutItemSchema = z.object({
|
|
260
267
|
text: z.string(),
|
|
261
268
|
context: contextSchema,
|
|
@@ -343,6 +350,19 @@ export const formLayoutSchema = z.object({
|
|
|
343
350
|
analyticsId: z.string().optional(),
|
|
344
351
|
});
|
|
345
352
|
|
|
353
|
+
export const progressLayoutSchema = z.object({
|
|
354
|
+
type: z.literal('progress'),
|
|
355
|
+
title: z.string().optional(),
|
|
356
|
+
description: z.string().optional(),
|
|
357
|
+
progress: z.number(),
|
|
358
|
+
progressText: z.string(),
|
|
359
|
+
context: contextSchema.optional(),
|
|
360
|
+
help: helpSchema.optional(),
|
|
361
|
+
control: z.string().optional(),
|
|
362
|
+
margin: sizeSchema.optional(),
|
|
363
|
+
analyticsId: z.string().optional(),
|
|
364
|
+
});
|
|
365
|
+
|
|
346
366
|
export const externalSchema = z.object({
|
|
347
367
|
url: z.string(),
|
|
348
368
|
});
|
|
@@ -401,6 +421,22 @@ export const summaryProviderSchema = z.object({
|
|
|
401
421
|
providesMedia: z.boolean().optional(),
|
|
402
422
|
});
|
|
403
423
|
|
|
424
|
+
export const actionSchema = z.object({
|
|
425
|
+
title: z.string().optional(),
|
|
426
|
+
type: actionTypeSchema.optional(),
|
|
427
|
+
disabled: z.boolean().optional(),
|
|
428
|
+
$id: z.string().optional(),
|
|
429
|
+
$ref: z.string().optional(),
|
|
430
|
+
id: z.string().optional(),
|
|
431
|
+
url: z.string().optional(),
|
|
432
|
+
method: httpMethodSchema.optional(),
|
|
433
|
+
exit: z.boolean().optional(),
|
|
434
|
+
result: jsonElementSchema.optional(),
|
|
435
|
+
data: jsonElementSchema.optional(),
|
|
436
|
+
timeout: z.number().optional(),
|
|
437
|
+
skipValidation: z.boolean().optional(),
|
|
438
|
+
});
|
|
439
|
+
|
|
404
440
|
export const linkSchema = z.object({
|
|
405
441
|
url: z.string(),
|
|
406
442
|
});
|
|
@@ -414,15 +450,8 @@ export const stringSchemaFormatSchema = z.union([
|
|
|
414
450
|
z.literal('base64url'),
|
|
415
451
|
]);
|
|
416
452
|
|
|
417
|
-
export const iconSchema = z.union([iconNamedSchema, iconTextSchema]);
|
|
418
|
-
|
|
419
453
|
export const avatarContentSchema = z.union([avatarTextContentSchema, avatarUriContentSchema]);
|
|
420
454
|
|
|
421
|
-
export const inlineAlertSchema = z.object({
|
|
422
|
-
content: z.string(),
|
|
423
|
-
context: contextSchema.optional(),
|
|
424
|
-
});
|
|
425
|
-
|
|
426
455
|
export const errorResponseBodySchema = z.object({
|
|
427
456
|
refreshFormUrl: z.string().optional(),
|
|
428
457
|
analytics: z.record(z.string()).optional(),
|
|
@@ -431,39 +460,10 @@ export const errorResponseBodySchema = z.object({
|
|
|
431
460
|
refreshUrl: z.string().optional(),
|
|
432
461
|
});
|
|
433
462
|
|
|
434
|
-
export const actionSchema = z.object({
|
|
435
|
-
title: z.string().optional(),
|
|
436
|
-
type: actionTypeSchema.optional(),
|
|
437
|
-
disabled: z.boolean().optional(),
|
|
438
|
-
$id: z.string().optional(),
|
|
439
|
-
$ref: z.string().optional(),
|
|
440
|
-
id: z.string().optional(),
|
|
441
|
-
url: z.string().optional(),
|
|
442
|
-
method: httpMethodSchema.optional(),
|
|
443
|
-
exit: z.boolean().optional(),
|
|
444
|
-
result: jsonElementSchema.optional(),
|
|
445
|
-
data: jsonElementSchema.optional(),
|
|
446
|
-
timeout: z.number().optional(),
|
|
447
|
-
skipValidation: z.boolean().optional(),
|
|
448
|
-
});
|
|
449
|
-
|
|
450
463
|
export const actionResponseBodySchema = z.object({
|
|
451
464
|
action: actionSchema,
|
|
452
465
|
});
|
|
453
466
|
|
|
454
|
-
export const progressLayoutSchema = z.object({
|
|
455
|
-
type: z.literal('progress'),
|
|
456
|
-
title: z.string().optional(),
|
|
457
|
-
description: z.string().optional(),
|
|
458
|
-
progress: z.number(),
|
|
459
|
-
progressText: z.string(),
|
|
460
|
-
context: contextSchema.optional(),
|
|
461
|
-
help: helpSchema.optional(),
|
|
462
|
-
control: z.string().optional(),
|
|
463
|
-
margin: sizeSchema.optional(),
|
|
464
|
-
analyticsId: z.string().optional(),
|
|
465
|
-
});
|
|
466
|
-
|
|
467
467
|
export const actionBehaviorSchema = z.object({
|
|
468
468
|
type: z.literal('action'),
|
|
469
469
|
action: actionSchema,
|
|
@@ -485,34 +485,36 @@ export const mediaAvatarSchema = z.object({
|
|
|
485
485
|
accessibilityDescription: z.string().optional(),
|
|
486
486
|
});
|
|
487
487
|
|
|
488
|
-
export const navigationSchema = z.object({
|
|
489
|
-
backButton: navigationBackBehaviorSchema.optional(),
|
|
490
|
-
back: navigationBackBehaviorSchema.optional(),
|
|
491
|
-
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
492
|
-
});
|
|
493
|
-
|
|
494
488
|
export const mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
|
|
495
489
|
|
|
496
|
-
export const
|
|
497
|
-
type: z.literal('
|
|
490
|
+
export const searchResultActionSchema = z.object({
|
|
491
|
+
type: z.literal('action'),
|
|
498
492
|
title: z.string(),
|
|
499
493
|
description: z.string().optional(),
|
|
500
494
|
icon: iconSchema.optional(),
|
|
501
495
|
image: imageSchema.optional(),
|
|
502
|
-
value:
|
|
496
|
+
value: actionSchema,
|
|
503
497
|
media: mediaSchema.optional(),
|
|
504
498
|
});
|
|
505
499
|
|
|
506
|
-
export const
|
|
507
|
-
type: z.literal('
|
|
500
|
+
export const searchResultSearchSchema = z.object({
|
|
501
|
+
type: z.literal('search'),
|
|
508
502
|
title: z.string(),
|
|
509
503
|
description: z.string().optional(),
|
|
510
504
|
icon: iconSchema.optional(),
|
|
511
505
|
image: imageSchema.optional(),
|
|
512
|
-
value:
|
|
506
|
+
value: searchSearchRequestSchema,
|
|
513
507
|
media: mediaSchema.optional(),
|
|
514
508
|
});
|
|
515
509
|
|
|
510
|
+
export const searchResultSchema = z.union([searchResultActionSchema, searchResultSearchSchema]);
|
|
511
|
+
|
|
512
|
+
export const navigationSchema = z.object({
|
|
513
|
+
backButton: navigationBackBehaviorSchema.optional(),
|
|
514
|
+
back: navigationBackBehaviorSchema.optional(),
|
|
515
|
+
stackBehavior: navigationStackBehaviorSchema.optional(),
|
|
516
|
+
});
|
|
517
|
+
|
|
516
518
|
export const suggestionsValueSchema = z.object({
|
|
517
519
|
label: z.string(),
|
|
518
520
|
value: jsonElementSchema,
|
|
@@ -538,16 +540,14 @@ export const summarySummariserSchema = z.object({
|
|
|
538
540
|
|
|
539
541
|
export const summarySchema = z.union([summaryProviderSchema, summarySummariserSchema]);
|
|
540
542
|
|
|
541
|
-
export const
|
|
543
|
+
export const suggestionsSchema = z.object({
|
|
544
|
+
values: z.array(suggestionsValueSchema),
|
|
545
|
+
});
|
|
542
546
|
|
|
543
547
|
export const searchResponseBodySchema = z.object({
|
|
544
548
|
results: z.array(searchResultSchema),
|
|
545
549
|
});
|
|
546
550
|
|
|
547
|
-
export const suggestionsSchema = z.object({
|
|
548
|
-
values: z.array(suggestionsValueSchema),
|
|
549
|
-
});
|
|
550
|
-
|
|
551
551
|
export const additionalInfoSchema: z.ZodSchema<AdditionalInfo> = z.lazy(() =>
|
|
552
552
|
z.object({
|
|
553
553
|
text: z.string(),
|
|
@@ -1190,7 +1190,6 @@ export const booleanSchemaSchema: z.ZodSchema<BooleanSchema> = z.lazy(() =>
|
|
|
1190
1190
|
export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
1191
1191
|
z.object({
|
|
1192
1192
|
hidden: z.boolean().optional(),
|
|
1193
|
-
alert: alertLayoutSchema.optional(),
|
|
1194
1193
|
control: z.string().optional(),
|
|
1195
1194
|
promoted: z.boolean().optional(),
|
|
1196
1195
|
$id: z.string().optional(),
|
|
@@ -1204,6 +1203,8 @@ export const constSchemaSchema: z.ZodSchema<ConstSchema> = z.lazy(() =>
|
|
|
1204
1203
|
analyticsId: z.string().optional(),
|
|
1205
1204
|
disabled: z.boolean().optional(),
|
|
1206
1205
|
media: mediaSchema.optional(),
|
|
1206
|
+
alert: alertLayoutSchema.optional(),
|
|
1207
|
+
layout: z.array(layoutSchema).optional(),
|
|
1207
1208
|
}),
|
|
1208
1209
|
);
|
|
1209
1210
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Dynamic Flow TypeScript Types",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@formatjs/cli": "^6.7.2",
|
|
34
34
|
"@types/react": "18.3.24",
|
|
35
|
-
"esbuild": "0.25.
|
|
35
|
+
"esbuild": "0.25.9",
|
|
36
36
|
"npm-run-all2": "8.0.4",
|
|
37
|
-
"ts-to-zod": "3.
|
|
37
|
+
"ts-to-zod": "3.15.0",
|
|
38
38
|
"typescript": "5.9.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"build": "rm -rf build && npm-run-all build:*",
|
|
46
46
|
"build:types": "pnpm tsc --emitDeclarationOnly",
|
|
47
47
|
"build:js": "node ./scripts/build.mjs",
|
|
48
|
-
"build:zod": "./src/zod/build_zod.sh",
|
|
48
|
+
"build:zod": "./src/zod/build_zod.sh && eslint 'src/zod/schemas.ts' --quiet --fix",
|
|
49
49
|
"types": "pnpm tsc --noEmit",
|
|
50
50
|
"types:watch": "pnpm tsc --noEmit --watch",
|
|
51
51
|
"lint": "eslint 'src/**/*.{js,ts}' --quiet"
|