@wise/dynamic-flow-types 2.4.0 → 2.4.1

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.
@@ -1,2 +1,46 @@
1
- import type { Step } from './step/Step';
2
- export type { Step };
1
+ import type { Step as GeneratedStep } from './step/Step';
2
+ import type { FormLayout as GeneratedFormLayout } from './layout/FormLayout';
3
+ export type { Action } from './feature/Action';
4
+ export type { Align } from './misc/Align';
5
+ export type { Context } from './misc/Context';
6
+ export type { Size } from './misc/Size';
7
+ export type { Size as Margin } from './misc/Size';
8
+ export type { Layout } from './layout/Layout';
9
+ export type { AlertLayout } from './layout/AlertLayout';
10
+ export type { BoxLayout } from './layout/BoxLayout';
11
+ export type { ButtonLayout } from './layout/ButtonLayout';
12
+ export type { ColumnsLayout } from './layout/ColumnsLayout';
13
+ export type FormLayout = GeneratedFormLayout & {
14
+ schema?: Reference;
15
+ };
16
+ export type { HeadingLayout } from './layout/HeadingLayout';
17
+ export type { ParagraphLayout } from './layout/ParagraphLayout';
18
+ export type { Schema } from './schema/Schema';
19
+ export type { ObjectSchema } from './schema/ObjectSchema';
20
+ export type { AllOfSchema } from './schema/AllOfSchema';
21
+ export type { OneOfSchema } from './schema/OneOfSchema';
22
+ export type { StringSchema } from './schema/StringSchema';
23
+ export type { NumberSchema } from './schema/NumberSchema';
24
+ export type { IntegerSchema } from './schema/IntegerSchema';
25
+ export type { StringSchemaFormat } from './schema/StringSchemaFormat';
26
+ type BasicModel = boolean | number | string;
27
+ type ObjectModel = {
28
+ [key: string]: Model;
29
+ };
30
+ type ArrayModel = (Model | null)[];
31
+ export type Model = BasicModel | ObjectModel | ArrayModel | null;
32
+ type ValidationErrorObject = {
33
+ [key: string]: ValidationError;
34
+ };
35
+ export type ValidationError = string | ValidationErrorObject | null;
36
+ export type StepError = {
37
+ error?: string;
38
+ validation?: ValidationError;
39
+ };
40
+ export type Step = Omit<GeneratedStep, 'model' | 'errors'> & {
41
+ model?: Model;
42
+ errors?: StepError;
43
+ };
44
+ export type Reference = {
45
+ $ref: string;
46
+ };
@@ -1,7 +1,12 @@
1
+ import type { FormLayoutSchemaReference } from './FormLayoutSchemaReference';
1
2
  import type { Size } from '../misc/Size';
2
3
  export type FormLayout = {
3
4
  type: 'form';
4
5
  schemaId: string;
5
6
  control?: string;
6
7
  margin?: Size;
8
+ /**
9
+ * @deprecated Please use 'schemaId' instead.
10
+ */
11
+ schema?: FormLayoutSchemaReference;
7
12
  };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @deprecated Please use 'schemaId' instead.
3
+ */
4
+ export type FormLayoutSchemaReference = {
5
+ $ref: string;
6
+ };
@@ -25,6 +25,7 @@ export type ArraySchemaList = {
25
25
  persistAsync?: PersistAsync;
26
26
  validationAsync?: ValidateAsync;
27
27
  alert?: AlertLayout;
28
+ validationMessages?: Record<string, string>;
28
29
  disabled?: boolean;
29
30
  /**
30
31
  * @deprecated Please use nested oneOf schemas instead.
@@ -25,6 +25,7 @@ export type OneOfSchema = {
25
25
  help?: Help;
26
26
  autocompleteHint?: AutocompleteToken[];
27
27
  autofillKey?: string;
28
+ validationMessages?: Record<string, string>;
28
29
  /**
29
30
  * @deprecated This property is deprecated
30
31
  */
@@ -65,5 +65,13 @@ export type StringSchema = {
65
65
  /**
66
66
  * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
67
67
  */
68
+ accepts?: string[];
69
+ /**
70
+ * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
71
+ */
72
+ maxSize?: number;
73
+ /**
74
+ * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
75
+ */
68
76
  source?: StringSchemaSource;
69
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-types",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Dynamic Flow TypeScript Types",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {