@wise/dynamic-flow-types 2.11.0-experimental-ed080a1 → 2.12.0-experimental-6654c72

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.
@@ -5,7 +5,7 @@ import type { PersistAsync } from './PersistAsync';
5
5
  import type { Promotion } from './Promotion';
6
6
  import type { ValidationAsync } from './ValidationAsync';
7
7
  import type { Icon, Image, Alert, Help } from './core';
8
- export type Schema = AllOfSchema | ArraySchema | BlobSchema | BooleanSchema | IntegerSchema | NumberSchema | ObjectSchema | OneOfSchema | StringSchema | ListArraySchema | TupleArraySchema | FileUploadSchema | MultipleFileUploadSchema | ConstSchema;
8
+ export type Schema = AllOfSchema | ArraySchema | BlobSchema | BooleanSchema | IntegerSchema | NumberSchema | ObjectSchema | OneOfSchema | StringSchema | ListArraySchema | TupleArraySchema | FileUploadSchema | MultipleFileUploadSchema | MultiSelectSchema | ConstSchema;
9
9
  type SchemaBase = {
10
10
  $id?: string;
11
11
  type?: 'boolean' | 'blob' | 'array' | 'integer' | 'number' | 'string' | 'object';
@@ -88,6 +88,12 @@ export type TupleArraySchema = ArraySchema & {
88
88
  export type MultipleFileUploadSchema = ListArraySchema & {
89
89
  items: PersistAsyncSchema;
90
90
  };
91
+ export type MultiSelectSchema = ListArraySchema & {
92
+ placeholder?: string;
93
+ items: Omit<OneOfSchema, 'oneOf'> & {
94
+ oneOf: ConstSchema[];
95
+ };
96
+ };
91
97
  export type BlobSchema = SchemaBase & {
92
98
  type: 'blob';
93
99
  accepts?: string[];
@@ -0,0 +1,9 @@
1
+ export type ValidationResult = {
2
+ valid: true;
3
+ } | {
4
+ valid: false;
5
+ errors: string;
6
+ };
7
+ export declare function validateStep(step: unknown): ValidationResult;
8
+ export declare function validateActionResponse(response: unknown): ValidationResult;
9
+ export declare function validateErrorResponse(response: unknown): ValidationResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-types",
3
- "version": "2.11.0-experimental-ed080a1",
3
+ "version": "2.12.0-experimental-6654c72",
4
4
  "description": "Dynamic Flow TypeScript Types",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -15,7 +15,7 @@
15
15
  "build"
16
16
  ],
17
17
  "devDependencies": {
18
- "@formatjs/cli": "^6.2.8",
18
+ "@formatjs/cli": "^6.2.9",
19
19
  "esbuild": "0.20.2",
20
20
  "npm-run-all2": "5.0.2",
21
21
  "ts-to-zod": "3.6.1",
@@ -30,8 +30,8 @@
30
30
  "test": "pnpm tsc --noEmit",
31
31
  "build": "rm -rf build && npm-run-all build:*",
32
32
  "build:types": "pnpm tsc --emitDeclarationOnly",
33
- "build:zod": "./src/zod/build_zod.sh",
34
33
  "build:js": "node ./scripts/build.mjs",
34
+ "zod": "./src/zod/build_zod.sh",
35
35
  "types": "pnpm tsc --noEmit",
36
36
  "lint": "eslint 'src/**/*.{js,ts}' --quiet"
37
37
  }