@wise/dynamic-flow-types 2.2.1 → 2.4.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.
Files changed (94) hide show
  1. package/build/next/feature/Action.d.ts +35 -0
  2. package/build/next/feature/ActionType.d.ts +4 -0
  3. package/build/next/feature/External.d.ts +3 -0
  4. package/build/next/feature/Help.d.ts +3 -0
  5. package/build/next/feature/LinkHandler.d.ts +5 -0
  6. package/build/next/feature/Navigation.d.ts +11 -0
  7. package/build/next/feature/NavigationBackBehaviour.d.ts +8 -0
  8. package/build/next/feature/PersistAsync.d.ts +9 -0
  9. package/build/next/feature/Polling.d.ts +7 -0
  10. package/build/next/feature/PollingOnError.d.ts +4 -0
  11. package/build/next/feature/StepError.d.ts +4 -0
  12. package/build/next/feature/Summary.d.ts +3 -0
  13. package/build/next/feature/SummaryProvider.d.ts +6 -0
  14. package/build/next/feature/SummarySummariser.d.ts +12 -0
  15. package/build/next/feature/ValidateAsync.d.ts +6 -0
  16. package/build/next/index.d.ts +2 -0
  17. package/build/next/layout/AlertLayout.d.ts +9 -0
  18. package/build/next/layout/BoxLayout.d.ts +10 -0
  19. package/build/next/layout/ButtonLayout.d.ts +17 -0
  20. package/build/next/layout/ColumnsLayout.d.ts +11 -0
  21. package/build/next/layout/ColumnsLayoutBias.d.ts +1 -0
  22. package/build/next/layout/DecisionLayout.d.ts +8 -0
  23. package/build/next/layout/DecisionLayoutOption.d.ts +11 -0
  24. package/build/next/layout/DividerLayout.d.ts +9 -0
  25. package/build/next/layout/FormLayout.d.ts +7 -0
  26. package/build/next/layout/HeadingLayout.d.ts +10 -0
  27. package/build/next/layout/ImageLayout.d.ts +16 -0
  28. package/build/next/layout/InfoLayout.d.ts +12 -0
  29. package/build/next/layout/InstructionsLayout.d.ts +9 -0
  30. package/build/next/layout/InstructionsLayoutItem.d.ts +5 -0
  31. package/build/next/layout/Layout.d.ts +20 -0
  32. package/build/next/layout/ListLayout.d.ts +12 -0
  33. package/build/next/layout/ListLayoutItem.d.ts +11 -0
  34. package/build/next/layout/ListLayoutStatus.d.ts +4 -0
  35. package/build/next/layout/LoadingIndicatorLayout.d.ts +7 -0
  36. package/build/next/layout/MarkdownLayout.d.ts +9 -0
  37. package/build/next/layout/ModalLayout.d.ts +13 -0
  38. package/build/next/layout/ModalLayoutContent.d.ts +4 -0
  39. package/build/next/layout/ModalLayoutTrigger.d.ts +3 -0
  40. package/build/next/layout/ParagraphLayout.d.ts +9 -0
  41. package/build/next/layout/ReviewLayout.d.ts +20 -0
  42. package/build/next/layout/ReviewLayoutCallToAction.d.ts +5 -0
  43. package/build/next/layout/ReviewLayoutField.d.ts +6 -0
  44. package/build/next/layout/SearchLayout.d.ts +12 -0
  45. package/build/next/layout/StatusListLayout.d.ts +9 -0
  46. package/build/next/layout/StatusListLayoutItem.d.ts +8 -0
  47. package/build/next/layout/StatusListLayoutStatus.d.ts +1 -0
  48. package/build/next/misc/Align.d.ts +1 -0
  49. package/build/next/misc/AutocompleteToken.d.ts +1 -0
  50. package/build/next/misc/Context.d.ts +1 -0
  51. package/build/next/misc/HttpMethod.d.ts +1 -0
  52. package/build/next/misc/Icon.d.ts +3 -0
  53. package/build/next/misc/IconNamed.d.ts +3 -0
  54. package/build/next/misc/IconText.d.ts +3 -0
  55. package/build/next/misc/Size.d.ts +1 -0
  56. package/build/next/responses/action/ActionResponseBody.d.ts +4 -0
  57. package/build/next/responses/error/ErrorResponseBody.d.ts +9 -0
  58. package/build/next/responses/search/SearchResponseBody.d.ts +4 -0
  59. package/build/next/responses/search/SearchResult.d.ts +3 -0
  60. package/build/next/responses/search/SearchResultAction.d.ts +11 -0
  61. package/build/next/responses/search/SearchResultSearch.d.ts +11 -0
  62. package/build/next/responses/search/SearchSearchRequest.d.ts +7 -0
  63. package/build/next/schema/AllOfSchema.d.ts +24 -0
  64. package/build/next/schema/ArraySchema.d.ts +3 -0
  65. package/build/next/schema/ArraySchemaList.d.ts +33 -0
  66. package/build/next/schema/ArraySchemaTuple.d.ts +29 -0
  67. package/build/next/schema/BlobSchema.d.ts +30 -0
  68. package/build/next/schema/BlobSchemaSource.d.ts +1 -0
  69. package/build/next/schema/BooleanSchema.d.ts +48 -0
  70. package/build/next/schema/ConstSchema.d.ts +23 -0
  71. package/build/next/schema/IntegerSchema.d.ts +54 -0
  72. package/build/next/schema/NumberSchema.d.ts +54 -0
  73. package/build/next/schema/ObjectSchema.d.ts +32 -0
  74. package/build/next/schema/OneOfSchema.d.ts +52 -0
  75. package/build/next/schema/Schema.d.ts +11 -0
  76. package/build/next/schema/StringSchema.d.ts +69 -0
  77. package/build/next/schema/StringSchemaFormat.d.ts +1 -0
  78. package/build/next/schema/StringSchemaSource.d.ts +4 -0
  79. package/build/next/step/Step.d.ts +38 -0
  80. package/build/spec/Action.d.ts +1 -1
  81. package/build/spec/FileUploadSchema.d.ts +2 -2
  82. package/build/spec/LayoutComponent.d.ts +21 -6
  83. package/build/spec/Model.d.ts +1 -1
  84. package/build/spec/Navigation.d.ts +1 -1
  85. package/build/spec/PersistAsync.d.ts +1 -1
  86. package/build/spec/Polling.d.ts +1 -1
  87. package/build/spec/Promotion.d.ts +1 -1
  88. package/build/spec/Schema.d.ts +8 -8
  89. package/build/spec/Search.d.ts +2 -2
  90. package/build/spec/Step.d.ts +9 -9
  91. package/build/spec/ValidationAsync.d.ts +1 -1
  92. package/build/spec/core.d.ts +2 -0
  93. package/build/spec/responses.d.ts +3 -3
  94. package/package.json +2 -5
@@ -0,0 +1,33 @@
1
+ import type { Schema } from './Schema';
2
+ import type { Icon } from '../misc/Icon';
3
+ import type { ImageLayout } from '../layout/ImageLayout';
4
+ import type { SummarySummariser } from '../feature/SummarySummariser';
5
+ import type { PersistAsync } from '../feature/PersistAsync';
6
+ import type { ValidateAsync } from '../feature/ValidateAsync';
7
+ import type { AlertLayout } from '../layout/AlertLayout';
8
+ export type ArraySchemaList = {
9
+ type: 'array';
10
+ $id?: string;
11
+ items: Schema;
12
+ addItemTitle: string;
13
+ editItemTitle: string;
14
+ minItems?: number;
15
+ maxItems?: number;
16
+ title?: string;
17
+ description?: string;
18
+ control?: string;
19
+ hidden?: boolean;
20
+ icon?: Icon;
21
+ image?: ImageLayout;
22
+ keywords?: string[];
23
+ summary?: SummarySummariser;
24
+ analyticsId?: string;
25
+ persistAsync?: PersistAsync;
26
+ validationAsync?: ValidateAsync;
27
+ alert?: AlertLayout;
28
+ disabled?: boolean;
29
+ /**
30
+ * @deprecated Please use nested oneOf schemas instead.
31
+ */
32
+ promoted?: boolean;
33
+ };
@@ -0,0 +1,29 @@
1
+ import type { Schema } from './Schema';
2
+ import type { Icon } from '../misc/Icon';
3
+ import type { ImageLayout } from '../layout/ImageLayout';
4
+ import type { SummaryProvider } from '../feature/SummaryProvider';
5
+ import type { PersistAsync } from '../feature/PersistAsync';
6
+ import type { ValidateAsync } from '../feature/ValidateAsync';
7
+ import type { AlertLayout } from '../layout/AlertLayout';
8
+ export type ArraySchemaTuple = {
9
+ type: 'array';
10
+ $id?: string;
11
+ items: Schema[];
12
+ title?: string;
13
+ description?: string;
14
+ control?: string;
15
+ hidden?: boolean;
16
+ icon?: Icon;
17
+ image?: ImageLayout;
18
+ keywords?: string[];
19
+ summary?: SummaryProvider;
20
+ analyticsId?: string;
21
+ persistAsync?: PersistAsync;
22
+ validationAsync?: ValidateAsync;
23
+ alert?: AlertLayout;
24
+ disabled?: boolean;
25
+ /**
26
+ * @deprecated Please use nested oneOf schemas instead.
27
+ */
28
+ promoted?: boolean;
29
+ };
@@ -0,0 +1,30 @@
1
+ import type { BlobSchemaSource } from './BlobSchemaSource';
2
+ import type { Icon } from '../misc/Icon';
3
+ import type { ImageLayout } from '../layout/ImageLayout';
4
+ import type { SummaryProvider } from '../feature/SummaryProvider';
5
+ import type { ValidateAsync } from '../feature/ValidateAsync';
6
+ import type { AlertLayout } from '../layout/AlertLayout';
7
+ export type BlobSchema = {
8
+ type: 'blob';
9
+ disabled: boolean;
10
+ $id?: string;
11
+ accepts: string[];
12
+ maxSize?: number;
13
+ source?: BlobSchemaSource;
14
+ title?: string;
15
+ description?: string;
16
+ control?: string;
17
+ hidden?: boolean;
18
+ icon?: Icon;
19
+ image?: ImageLayout;
20
+ keywords?: string[];
21
+ summary?: SummaryProvider;
22
+ analyticsId?: string;
23
+ validationAsync?: ValidateAsync;
24
+ validationMessages?: Record<string, string>;
25
+ alert?: AlertLayout;
26
+ /**
27
+ * @deprecated Please use nested oneOf schemas instead.
28
+ */
29
+ promoted?: boolean;
30
+ };
@@ -0,0 +1 @@
1
+ export type BlobSchemaSource = 'file' | 'camera';
@@ -0,0 +1,48 @@
1
+ import type { Icon } from '../misc/Icon';
2
+ import type { ImageLayout } from '../layout/ImageLayout';
3
+ import type { SummaryProvider } from '../feature/SummaryProvider';
4
+ import type { PersistAsync } from '../feature/PersistAsync';
5
+ import type { ValidateAsync } from '../feature/ValidateAsync';
6
+ import type { AlertLayout } from '../layout/AlertLayout';
7
+ import type { Help } from '../feature/Help';
8
+ export type BooleanSchema = {
9
+ type: 'boolean';
10
+ $id?: string;
11
+ title?: string;
12
+ description?: string;
13
+ control?: string;
14
+ default?: boolean;
15
+ hidden?: boolean;
16
+ disabled?: boolean;
17
+ icon?: Icon;
18
+ image?: ImageLayout;
19
+ keywords?: string[];
20
+ summary?: SummaryProvider;
21
+ analyticsId?: string;
22
+ persistAsync?: PersistAsync;
23
+ refreshStepOnChange?: boolean;
24
+ validationAsync?: ValidateAsync;
25
+ alert?: AlertLayout;
26
+ autofillKey?: string;
27
+ help?: Help;
28
+ /**
29
+ * @deprecated This property is deprecated
30
+ */
31
+ autofillProvider?: string;
32
+ /**
33
+ * @deprecated Please use nested oneOf schemas instead.
34
+ */
35
+ promoted?: boolean;
36
+ /**
37
+ * @deprecated Please use 'refreshStepOnChange' instead
38
+ */
39
+ refreshFormOnChange?: boolean;
40
+ /**
41
+ * @deprecated Please use 'refreshUrl' in Step instead
42
+ */
43
+ refreshUrl?: string;
44
+ /**
45
+ * @deprecated Please use 'refreshUrl' in Step instead
46
+ */
47
+ refreshFormUrl?: string;
48
+ };
@@ -0,0 +1,23 @@
1
+ import type { AlertLayout } from '../layout/AlertLayout';
2
+ import type { Icon } from '../misc/Icon';
3
+ import type { ImageLayout } from '../layout/ImageLayout';
4
+ import type { SummaryProvider } from '../feature/SummaryProvider';
5
+ export type ConstSchema = {
6
+ disabled?: boolean;
7
+ hidden?: boolean;
8
+ alert?: AlertLayout;
9
+ control?: string;
10
+ $id?: string;
11
+ const?: unknown;
12
+ title?: string;
13
+ description?: string;
14
+ icon?: Icon;
15
+ image?: ImageLayout;
16
+ keywords?: string[];
17
+ summary?: SummaryProvider;
18
+ analyticsId?: string;
19
+ /**
20
+ * @deprecated Please use nested oneOf schemas instead.
21
+ */
22
+ promoted?: boolean;
23
+ };
@@ -0,0 +1,54 @@
1
+ import type { Icon } from '../misc/Icon';
2
+ import type { ImageLayout } from '../layout/ImageLayout';
3
+ import type { SummaryProvider } from '../feature/SummaryProvider';
4
+ import type { PersistAsync } from '../feature/PersistAsync';
5
+ import type { ValidateAsync } from '../feature/ValidateAsync';
6
+ import type { AlertLayout } from '../layout/AlertLayout';
7
+ import type { AutocompleteToken } from '../misc/AutocompleteToken';
8
+ import type { Help } from '../feature/Help';
9
+ export type IntegerSchema = {
10
+ type: 'integer';
11
+ placeholder?: string;
12
+ minimum?: number;
13
+ maximum?: number;
14
+ $id?: string;
15
+ title?: string;
16
+ description?: string;
17
+ control?: string;
18
+ default?: number;
19
+ hidden?: boolean;
20
+ disabled?: boolean;
21
+ icon?: Icon;
22
+ image?: ImageLayout;
23
+ keywords?: string[];
24
+ summary?: SummaryProvider;
25
+ analyticsId?: string;
26
+ persistAsync?: PersistAsync;
27
+ refreshStepOnChange?: boolean;
28
+ validationAsync?: ValidateAsync;
29
+ validationMessages?: Record<string, string>;
30
+ alert?: AlertLayout;
31
+ autocompleteHint?: AutocompleteToken[];
32
+ autofillKey?: string;
33
+ help?: Help;
34
+ /**
35
+ * @deprecated This property is deprecated
36
+ */
37
+ autofillProvider?: string;
38
+ /**
39
+ * @deprecated Please use nested oneOf schemas instead.
40
+ */
41
+ promoted?: boolean;
42
+ /**
43
+ * @deprecated Please use 'refreshStepOnChange' instead
44
+ */
45
+ refreshFormOnChange?: boolean;
46
+ /**
47
+ * @deprecated Please use 'refreshUrl' in Step instead
48
+ */
49
+ refreshUrl?: string;
50
+ /**
51
+ * @deprecated Please use 'refreshUrl' in Step instead
52
+ */
53
+ refreshFormUrl?: string;
54
+ };
@@ -0,0 +1,54 @@
1
+ import type { Icon } from '../misc/Icon';
2
+ import type { ImageLayout } from '../layout/ImageLayout';
3
+ import type { SummaryProvider } from '../feature/SummaryProvider';
4
+ import type { PersistAsync } from '../feature/PersistAsync';
5
+ import type { ValidateAsync } from '../feature/ValidateAsync';
6
+ import type { AlertLayout } from '../layout/AlertLayout';
7
+ import type { AutocompleteToken } from '../misc/AutocompleteToken';
8
+ import type { Help } from '../feature/Help';
9
+ export type NumberSchema = {
10
+ type: 'number';
11
+ placeholder?: string;
12
+ minimum?: number;
13
+ maximum?: number;
14
+ $id?: string;
15
+ title?: string;
16
+ description?: string;
17
+ control?: string;
18
+ default?: number;
19
+ hidden?: boolean;
20
+ disabled?: boolean;
21
+ icon?: Icon;
22
+ image?: ImageLayout;
23
+ keywords?: string[];
24
+ summary?: SummaryProvider;
25
+ analyticsId?: string;
26
+ persistAsync?: PersistAsync;
27
+ refreshStepOnChange?: boolean;
28
+ validationAsync?: ValidateAsync;
29
+ validationMessages?: Record<string, string>;
30
+ alert?: AlertLayout;
31
+ autocompleteHint?: AutocompleteToken[];
32
+ autofillKey?: string;
33
+ help?: Help;
34
+ /**
35
+ * @deprecated This property is deprecated
36
+ */
37
+ autofillProvider?: string;
38
+ /**
39
+ * @deprecated Please use nested oneOf schemas instead.
40
+ */
41
+ promoted?: boolean;
42
+ /**
43
+ * @deprecated Please use 'refreshStepOnChange' instead
44
+ */
45
+ refreshFormOnChange?: boolean;
46
+ /**
47
+ * @deprecated Please use 'refreshUrl' in Step instead
48
+ */
49
+ refreshUrl?: string;
50
+ /**
51
+ * @deprecated Please use 'refreshUrl' in Step instead
52
+ */
53
+ refreshFormUrl?: string;
54
+ };
@@ -0,0 +1,32 @@
1
+ import type { Help } from '../feature/Help';
2
+ import type { Schema } from './Schema';
3
+ import type { Icon } from '../misc/Icon';
4
+ import type { ImageLayout } from '../layout/ImageLayout';
5
+ import type { SummaryProvider } from '../feature/SummaryProvider';
6
+ import type { AlertLayout } from '../layout/AlertLayout';
7
+ export type ObjectSchema = {
8
+ type: 'object';
9
+ disabled?: boolean;
10
+ properties: Record<string, Schema>;
11
+ displayOrder: string[];
12
+ required?: string[];
13
+ $id?: string;
14
+ title?: string;
15
+ description?: string;
16
+ control?: string;
17
+ hidden?: boolean;
18
+ icon?: Icon;
19
+ image?: ImageLayout;
20
+ keywords?: string[];
21
+ summary?: SummaryProvider;
22
+ analyticsId?: string;
23
+ alert?: AlertLayout;
24
+ /**
25
+ * @deprecated Please use nested oneOf schemas instead.
26
+ */
27
+ promoted?: boolean;
28
+ /**
29
+ * @deprecated Only supported on web clients
30
+ */
31
+ help?: Help;
32
+ };
@@ -0,0 +1,52 @@
1
+ import type { Schema } from './Schema';
2
+ import type { Icon } from '../misc/Icon';
3
+ import type { ImageLayout } from '../layout/ImageLayout';
4
+ import type { SummaryProvider } from '../feature/SummaryProvider';
5
+ import type { AlertLayout } from '../layout/AlertLayout';
6
+ import type { Help } from '../feature/Help';
7
+ import type { AutocompleteToken } from '../misc/AutocompleteToken';
8
+ export type OneOfSchema = {
9
+ disabled?: boolean;
10
+ oneOf: Schema[];
11
+ placeholder?: string;
12
+ $id?: string;
13
+ title?: string;
14
+ description?: string;
15
+ control?: string;
16
+ default?: unknown;
17
+ hidden?: boolean;
18
+ icon?: Icon;
19
+ image?: ImageLayout;
20
+ keywords?: string[];
21
+ summary?: SummaryProvider;
22
+ analyticsId?: string;
23
+ refreshStepOnChange?: boolean;
24
+ alert?: AlertLayout;
25
+ help?: Help;
26
+ autocompleteHint?: AutocompleteToken[];
27
+ autofillKey?: string;
28
+ /**
29
+ * @deprecated This property is deprecated
30
+ */
31
+ autofillProvider?: string;
32
+ /**
33
+ * @deprecated Please use nested oneOf schemas instead.
34
+ */
35
+ promoted?: boolean;
36
+ /**
37
+ * @deprecated Please use 'refreshStepOnChange' instead
38
+ */
39
+ refreshFormOnChange?: boolean;
40
+ /**
41
+ * @deprecated Please use 'refreshUrl' in Step instead
42
+ */
43
+ refreshUrl?: string;
44
+ /**
45
+ * @deprecated Please use 'refreshUrl' in Step instead
46
+ */
47
+ refreshFormUrl?: string;
48
+ /**
49
+ * @deprecated OneOf Promotion is no longer supported
50
+ */
51
+ promotion?: unknown;
52
+ };
@@ -0,0 +1,11 @@
1
+ import type { AllOfSchema } from './AllOfSchema';
2
+ import type { ArraySchema } from './ArraySchema';
3
+ import type { BlobSchema } from './BlobSchema';
4
+ import type { BooleanSchema } from './BooleanSchema';
5
+ import type { ConstSchema } from './ConstSchema';
6
+ import type { IntegerSchema } from './IntegerSchema';
7
+ import type { NumberSchema } from './NumberSchema';
8
+ import type { ObjectSchema } from './ObjectSchema';
9
+ import type { OneOfSchema } from './OneOfSchema';
10
+ import type { StringSchema } from './StringSchema';
11
+ export type Schema = AllOfSchema | ArraySchema | BlobSchema | BooleanSchema | ConstSchema | IntegerSchema | NumberSchema | ObjectSchema | OneOfSchema | StringSchema;
@@ -0,0 +1,69 @@
1
+ import type { StringSchemaSource } from './StringSchemaSource';
2
+ import type { StringSchemaFormat } from './StringSchemaFormat';
3
+ import type { Icon } from '../misc/Icon';
4
+ import type { ImageLayout } from '../layout/ImageLayout';
5
+ import type { SummaryProvider } from '../feature/SummaryProvider';
6
+ import type { PersistAsync } from '../feature/PersistAsync';
7
+ import type { ValidateAsync } from '../feature/ValidateAsync';
8
+ import type { AlertLayout } from '../layout/AlertLayout';
9
+ import type { AutocompleteToken } from '../misc/AutocompleteToken';
10
+ import type { Help } from '../feature/Help';
11
+ export type StringSchema = {
12
+ type: 'string';
13
+ format?: StringSchemaFormat;
14
+ displayFormat?: string;
15
+ placeholder?: string;
16
+ minLength?: number;
17
+ maxLength?: number;
18
+ minimum?: string;
19
+ maximum?: string;
20
+ pattern?: string;
21
+ $id?: string;
22
+ title?: string;
23
+ description?: string;
24
+ control?: string;
25
+ default?: string;
26
+ hidden?: boolean;
27
+ disabled?: boolean;
28
+ icon?: Icon;
29
+ image?: ImageLayout;
30
+ keywords?: string[];
31
+ summary?: SummaryProvider;
32
+ analyticsId?: string;
33
+ persistAsync?: PersistAsync;
34
+ refreshStepOnChange?: boolean;
35
+ validationAsync?: ValidateAsync;
36
+ validationMessages?: Record<string, string>;
37
+ alert?: AlertLayout;
38
+ autocompleteHint?: AutocompleteToken[];
39
+ autofillKey?: string;
40
+ help?: Help;
41
+ /**
42
+ * @deprecated This property is deprecated
43
+ */
44
+ autofillProvider?: string;
45
+ /**
46
+ * @deprecated Please use nested oneOf schemas instead.
47
+ */
48
+ promoted?: boolean;
49
+ /**
50
+ * @deprecated Please use 'refreshStepOnChange' instead
51
+ */
52
+ refreshFormOnChange?: boolean;
53
+ /**
54
+ * @deprecated Please use 'refreshUrl' in Step instead
55
+ */
56
+ refreshUrl?: string;
57
+ /**
58
+ * @deprecated Please use 'refreshUrl' in Step instead
59
+ */
60
+ refreshFormUrl?: string;
61
+ /**
62
+ * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
63
+ */
64
+ cameraConfig?: unknown;
65
+ /**
66
+ * @deprecated Please use 'persistAsync' with a 'BlobSchema' instead.
67
+ */
68
+ source?: StringSchemaSource;
69
+ };
@@ -0,0 +1 @@
1
+ export type StringSchemaFormat = 'date' | 'email' | 'numeric' | 'password' | 'phone-number' | 'base64url';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @deprecated Please do not use StringSchema for file uploads. You can use Persist Async with BlobSchema.
3
+ */
4
+ export type StringSchemaSource = 'camera' | 'file';
@@ -0,0 +1,38 @@
1
+ import type { Action } from '../feature/Action';
2
+ import type { Schema } from '../schema/Schema';
3
+ import type { Layout } from '../layout/Layout';
4
+ import type { External } from '../feature/External';
5
+ import type { Polling } from '../feature/Polling';
6
+ import type { LinkHandler } from '../feature/LinkHandler';
7
+ import type { StepError } from '../feature/StepError';
8
+ import type { Navigation } from '../feature/Navigation';
9
+ export type Step = {
10
+ id: string;
11
+ title: string;
12
+ schemas: Schema[];
13
+ layout: Layout[];
14
+ model?: unknown;
15
+ external?: External;
16
+ polling?: Polling;
17
+ linkHandlers?: LinkHandler[];
18
+ analytics?: Record<string, string>;
19
+ errors?: StepError;
20
+ navigation?: Navigation;
21
+ refreshUrl?: string;
22
+ /**
23
+ * @deprecated Please use 'id' instead
24
+ */
25
+ key?: string;
26
+ /**
27
+ * @deprecated Type is no longer required, as only form steps are supported
28
+ */
29
+ type?: string;
30
+ /**
31
+ * @deprecated Please define actions inside Button components.
32
+ */
33
+ actions?: Action[];
34
+ /**
35
+ * @deprecated Please use 'refreshUrl' instead
36
+ */
37
+ refreshFormUrl?: string;
38
+ };
@@ -1,4 +1,4 @@
1
- import { HttpMethod } from './core';
1
+ import type { HttpMethod } from './core';
2
2
  type CoreAction = {
3
3
  id?: string;
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { ImageLayout } from './LayoutComponent';
2
- import { StringSchema } from './Schema';
1
+ import type { ImageLayout } from './LayoutComponent';
2
+ import type { StringSchema } from './Schema';
3
3
  export type FileUploadSchema = Omit<StringSchema, 'type' | 'format' | 'source' | 'image' | 'cameraConfig'> & {
4
4
  type: 'string';
5
5
  format: 'base64url';
@@ -1,9 +1,9 @@
1
- import { Action } from './Action';
2
- import { ExternalStepPollingConfiguration, ExternalStepPollingResponseHandler } from './Polling';
3
- import { Schema } from './Schema';
4
- import { SearchConfig } from './Search';
5
- import { Margin, Size, Icon, Image, Align, Orientation, Reference, Alert, Help } from './core';
6
- export type LayoutComponent = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | ExternalLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | InstructionsLayout | ListLayout | LoadingIndicatorLayout | MarkdownLayout | ParagraphLayout | ReviewLayout | StatusListLayout | SearchLayout;
1
+ import type { Action } from './Action';
2
+ import type { ExternalStepPollingConfiguration, ExternalStepPollingResponseHandler } from './Polling';
3
+ import type { Schema } from './Schema';
4
+ import type { SearchConfig } from './Search';
5
+ import type { Margin, Size, Icon, Image, Align, Orientation, Reference, Alert, Help } from './core';
6
+ export type LayoutComponent = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | ExternalLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | InstructionsLayout | ListLayout | LoadingIndicatorLayout | MarkdownLayout | ModalLayout | ParagraphLayout | ReviewLayout | StatusListLayout | SearchLayout;
7
7
  export type AlertLayout = {
8
8
  type: 'alert';
9
9
  } & Alert;
@@ -81,6 +81,7 @@ export type HeadingLayout = {
81
81
  text: string;
82
82
  margin?: Margin;
83
83
  align?: Align;
84
+ control?: string;
84
85
  };
85
86
  export type ImageLayout = {
86
87
  type: 'image';
@@ -96,6 +97,9 @@ export type ImageLayout = {
96
97
  */
97
98
  accessibilityDescription?: string;
98
99
  };
100
+ /**
101
+ * @deprecated Please use MarkdownLayout instead
102
+ */
99
103
  export type InfoLayout = {
100
104
  type: 'info';
101
105
  markdown: string;
@@ -146,6 +150,17 @@ export type MarkdownLayout = {
146
150
  margin?: Margin;
147
151
  align?: Align;
148
152
  };
153
+ export type ModalLayout = {
154
+ type: 'modal';
155
+ control?: string;
156
+ trigger: {
157
+ title: string;
158
+ };
159
+ content: {
160
+ components: LayoutComponent[];
161
+ };
162
+ margin?: Margin;
163
+ };
149
164
  export type ParagraphLayout = {
150
165
  type: 'paragraph';
151
166
  text: string;
@@ -2,5 +2,5 @@ export type BasicModel = boolean | number | string;
2
2
  export type ObjectModel = {
3
3
  [key: string]: Model;
4
4
  };
5
- export type ArrayModel = Array<Model | null>;
5
+ export type ArrayModel = (Model | null)[];
6
6
  export type Model = BasicModel | ObjectModel | ArrayModel | null;
@@ -1,4 +1,4 @@
1
- import { Action } from './Action';
1
+ import type { Action } from './Action';
2
2
  export type Navigation = {
3
3
  back?: BackBehaviour;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Schema } from './Schema';
1
+ import type { Schema } from './Schema';
2
2
  export type PersistAsync = {
3
3
  idProperty: string;
4
4
  method?: 'POST' | 'PUT' | 'PATCH';
@@ -1,4 +1,4 @@
1
- import { Action } from './Action';
1
+ import type { Action } from './Action';
2
2
  export type PollingConfiguration = {
3
3
  url: string;
4
4
  interval: number;
@@ -1,4 +1,4 @@
1
- import { Icon, Image } from './core';
1
+ import type { Icon, Image } from './core';
2
2
  export type Promotion = {
3
3
  displayTwice?: boolean;
4
4
  other: {
@@ -1,10 +1,10 @@
1
- import { AutocompleteToken } from './AutocompleteToken';
2
- import { FileUploadSchema } from './FileUploadSchema';
3
- import { Model, ObjectModel } from './Model';
4
- import { PersistAsync } from './PersistAsync';
5
- import { Promotion } from './Promotion';
6
- import { ValidationAsync } from './ValidationAsync';
7
- import { Icon, Image, Alert, Help } from './core';
1
+ import type { AutocompleteToken } from './AutocompleteToken';
2
+ import type { FileUploadSchema } from './FileUploadSchema';
3
+ import type { Model, ObjectModel } from './Model';
4
+ import type { PersistAsync } from './PersistAsync';
5
+ import type { Promotion } from './Promotion';
6
+ import type { ValidationAsync } from './ValidationAsync';
7
+ import type { Icon, Image, Alert, Help } from './core';
8
8
  export type Schema = AllOfSchema | ArraySchema | BlobSchema | BooleanSchema | IntegerSchema | NumberSchema | ObjectSchema | OneOfSchema | StringSchema | ListArraySchema | TupleArraySchema | FileUploadSchema | MultipleFileUploadSchema | ConstSchema;
9
9
  type SchemaBase = {
10
10
  $id?: string;
@@ -109,7 +109,7 @@ export type IntegerSchema = Omit<SchemaBase, 'persistAsync'> & {
109
109
  maximum?: number;
110
110
  minimum?: number;
111
111
  persistAsync?: PersistAsync;
112
- placeholder?: number;
112
+ placeholder?: string | number;
113
113
  autocompleteHint?: AutocompleteToken[];
114
114
  const?: number;
115
115
  oneOf?: IntegerSchema[];
@@ -1,5 +1,5 @@
1
- import { Action } from './Action';
2
- import { HttpMethod, Icon, Image } from './core';
1
+ import type { Action } from './Action';
2
+ import type { HttpMethod, Icon, Image } from './core';
3
3
  export type SearchConfig = {
4
4
  url: string;
5
5
  method: HttpMethod;
@@ -1,10 +1,10 @@
1
- import { Action } from './Action';
2
- import { LayoutComponent } from './LayoutComponent';
3
- import { ObjectModel } from './Model';
4
- import { Navigation } from './Navigation';
5
- import { ExternalStepPollingConfiguration, ExternalStepPollingResponseHandler, PollingConfiguration } from './Polling';
6
- import { Schema } from './Schema';
7
- import { Image } from './core';
1
+ import type { Action } from './Action';
2
+ import type { LayoutComponent } from './LayoutComponent';
3
+ import type { ObjectModel } from './Model';
4
+ import type { Navigation } from './Navigation';
5
+ import type { ExternalStepPollingConfiguration, ExternalStepPollingResponseHandler, PollingConfiguration } from './Polling';
6
+ import type { Schema } from './Schema';
7
+ import type { Image } from './core';
8
8
  export type Step = FormStep | DecisionStep | ExternalStep | FinalStep;
9
9
  type BaseStep = {
10
10
  id?: string;
@@ -98,10 +98,10 @@ export type LegacyReviewStep = Omit<FormStep, 'actions' | 'schemas' | 'layout'>
98
98
  };
99
99
  export type LegacyReviewFields = {
100
100
  title?: string;
101
- fields: Array<{
101
+ fields: {
102
102
  title: string;
103
103
  value: string;
104
- }>;
104
+ }[];
105
105
  };
106
106
  export type LegacyFormStep = Step & {
107
107
  type?: 'form';