@wise/dynamic-flow-client 1.3.0 → 1.3.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.
Files changed (135) hide show
  1. package/build/main.js +614 -3429
  2. package/build/main.min.js +1 -22
  3. package/build/types/common/constants/index.d.ts +0 -1
  4. package/build/types/common/hooks/useExternalStepPolling/useExternalStepPolling.d.ts +1 -10
  5. package/build/types/common/hooks/usePersistAsync/usePersistAsync.d.ts +1 -1
  6. package/build/types/common/hooks/useStepPolling/useStepPolling.d.ts +1 -1
  7. package/build/types/common/utils/index.d.ts +3 -1
  8. package/build/types/common/utils/misc-utils.d.ts +2 -0
  9. package/build/types/{types/specification/Model.d.ts → common/utils/model-utils.d.ts} +1 -6
  10. package/build/types/common/utils/schema-utils.d.ts +23 -11
  11. package/build/types/common/utils/step-utils.d.ts +1 -1
  12. package/build/types/common/validators/models/model-validators.d.ts +1 -1
  13. package/build/types/common/validators/models/models.utils.d.ts +1 -1
  14. package/build/types/common/validators/schemas/schema-validators.d.ts +1 -1
  15. package/build/types/common/validators/validationFailures/validation-failures.d.ts +1 -1
  16. package/build/types/dynamicFlow/DynamicFlowStep.d.ts +1 -1
  17. package/build/types/dynamicFlow/DynamicFlowTypes.d.ts +1 -1
  18. package/build/types/dynamicFlow/utils/responseParsers/response-parsers.d.ts +1 -1
  19. package/build/types/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.d.ts +2 -1
  20. package/build/types/dynamicFlow/utils/useDynamicFlowState.d.ts +1 -1
  21. package/build/types/formControl/FormControl.d.ts +58 -2
  22. package/build/types/index.d.ts +1 -2
  23. package/build/types/jsonSchemaForm/JsonSchemaForm.d.ts +1 -1
  24. package/build/types/jsonSchemaForm/allOfSchema/AllOfSchema.d.ts +1 -1
  25. package/build/types/jsonSchemaForm/arrayTypeSchema/ArraySchema.d.ts +1 -1
  26. package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.d.ts +1 -1
  27. package/build/types/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.d.ts +1 -2
  28. package/build/types/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.d.ts +1 -1
  29. package/build/types/jsonSchemaForm/controlFeedback/ControlFeedback.d.ts +1 -1
  30. package/build/types/jsonSchemaForm/genericSchema/GenericSchema.d.ts +1 -1
  31. package/build/types/jsonSchemaForm/objectSchema/ObjectSchema.d.ts +1 -1
  32. package/build/types/jsonSchemaForm/oneOfSchema/OneOfSchema.d.ts +1 -1
  33. package/build/types/jsonSchemaForm/oneOfSchema/{utils/one-of-utils.d.ts → utils.d.ts} +1 -2
  34. package/build/types/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.d.ts +1 -1
  35. package/build/types/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.d.ts +1 -1
  36. package/build/types/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.d.ts +1 -1
  37. package/build/types/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.d.ts +1 -1
  38. package/build/types/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.d.ts +1 -1
  39. package/build/types/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.d.ts +1 -1
  40. package/build/types/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.d.ts +1 -1
  41. package/build/types/jsonSchemaForm/readOnlySchema/ReadOnlySchema.d.ts +1 -1
  42. package/build/types/jsonSchemaForm/schemaFormControl/SchemaFormControl.d.ts +1 -1
  43. package/build/types/jsonSchemaForm/schemaFormControl/utils/mapping-utils.d.ts +1 -1
  44. package/build/types/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.d.ts +1 -2
  45. package/build/types/layout/DynamicLayout.d.ts +1 -1
  46. package/build/types/layout/alert/DynamicAlert.d.ts +1 -1
  47. package/build/types/layout/box/DynamicBox.d.ts +1 -1
  48. package/build/types/layout/button/DynamicButton.d.ts +1 -1
  49. package/build/types/layout/button/utils.d.ts +1 -2
  50. package/build/types/layout/columns/DynamicColumns.d.ts +1 -1
  51. package/build/types/layout/decision/DynamicDecision.d.ts +1 -1
  52. package/build/types/layout/divider/DynamicDivider.d.ts +1 -1
  53. package/build/types/layout/external/DynamicExternal.d.ts +1 -1
  54. package/build/types/layout/form/DynamicForm.d.ts +1 -1
  55. package/build/types/layout/heading/DynamicHeading.d.ts +1 -1
  56. package/build/types/layout/image/DynamicImage.d.ts +1 -1
  57. package/build/types/layout/list/DynamicList.d.ts +1 -1
  58. package/build/types/layout/loadingIndicator/DynamicLoadingIndicator.d.ts +1 -1
  59. package/build/types/layout/markdown/DynamicMarkdown.d.ts +1 -1
  60. package/build/types/layout/paragraph/DynamicParagraph.d.ts +1 -1
  61. package/build/types/layout/review/DynamicReview.d.ts +1 -1
  62. package/build/types/layout/utils.d.ts +1 -1
  63. package/build/types/step/cameraStep/CameraStep.d.ts +1 -1
  64. package/build/types/step/cameraStep/cameraCapture/CameraCapture.d.ts +1 -1
  65. package/build/types/step/cameraStep/cameraCapture/hooks/index.d.ts +1 -1
  66. package/build/types/step/cameraStep/cameraCapture/tracking/index.d.ts +1 -1
  67. package/build/types/step/layoutStep/LayoutStep.d.ts +1 -1
  68. package/build/types/step/layoutStep/utils/inline-reference-utils.d.ts +1 -1
  69. package/build/types/step/layoutStep/utils/layout-utils.d.ts +1 -1
  70. package/package.json +4 -2
  71. package/build/types/common/constants/SchemaType.d.ts +0 -11
  72. package/build/types/fixtures/components/alert.d.ts +0 -3
  73. package/build/types/fixtures/components/box.d.ts +0 -3
  74. package/build/types/fixtures/components/button.d.ts +0 -3
  75. package/build/types/fixtures/components/columns.d.ts +0 -3
  76. package/build/types/fixtures/components/copyable.d.ts +0 -3
  77. package/build/types/fixtures/components/decision-flags.d.ts +0 -3
  78. package/build/types/fixtures/components/decision-icons.d.ts +0 -3
  79. package/build/types/fixtures/components/decision.d.ts +0 -3
  80. package/build/types/fixtures/components/heading.d.ts +0 -3
  81. package/build/types/fixtures/components/image.d.ts +0 -3
  82. package/build/types/fixtures/components/index.d.ts +0 -15
  83. package/build/types/fixtures/components/info.d.ts +0 -3
  84. package/build/types/fixtures/components/list.d.ts +0 -3
  85. package/build/types/fixtures/components/loading-indicator.d.ts +0 -3
  86. package/build/types/fixtures/components/paragraph.d.ts +0 -3
  87. package/build/types/fixtures/components/review.d.ts +0 -3
  88. package/build/types/fixtures/examples/camera-capture.d.ts +0 -3
  89. package/build/types/fixtures/examples/index.d.ts +0 -5
  90. package/build/types/fixtures/examples/recipient-update.d.ts +0 -3
  91. package/build/types/fixtures/examples/recipient.d.ts +0 -3
  92. package/build/types/fixtures/examples/single-file-upload.d.ts +0 -3
  93. package/build/types/fixtures/examples/step-validation-errors.d.ts +0 -3
  94. package/build/types/fixtures/features/action-response.d.ts +0 -3
  95. package/build/types/fixtures/features/external.d.ts +0 -3
  96. package/build/types/fixtures/features/index.d.ts +0 -5
  97. package/build/types/fixtures/features/persist-async.d.ts +0 -3
  98. package/build/types/fixtures/features/polling.d.ts +0 -3
  99. package/build/types/fixtures/features/validation-async.d.ts +0 -3
  100. package/build/types/fixtures/index.d.ts +0 -50
  101. package/build/types/fixtures/jsonSchemaForm/allOf.d.ts +0 -3
  102. package/build/types/fixtures/layouts/all.d.ts +0 -3
  103. package/build/types/fixtures/layouts/final-step-layout.d.ts +0 -3
  104. package/build/types/fixtures/layouts/index.d.ts +0 -6
  105. package/build/types/fixtures/layouts/list.d.ts +0 -3
  106. package/build/types/fixtures/layouts/pay-in.d.ts +0 -3
  107. package/build/types/fixtures/layouts/review.d.ts +0 -3
  108. package/build/types/fixtures/layouts/success.d.ts +0 -3
  109. package/build/types/fixtures/responses/action-response-final.d.ts +0 -3
  110. package/build/types/fixtures/responses/action.d.ts +0 -5
  111. package/build/types/fixtures/responses/exit.d.ts +0 -6
  112. package/build/types/fixtures/responses/index.d.ts +0 -4
  113. package/build/types/fixtures/responses/recipient-update-final.d.ts +0 -3
  114. package/build/types/fixtures/schemas/all-of.d.ts +0 -3
  115. package/build/types/fixtures/schemas/basic-form.d.ts +0 -3
  116. package/build/types/fixtures/schemas/boolean.d.ts +0 -3
  117. package/build/types/fixtures/schemas/index.d.ts +0 -6
  118. package/build/types/fixtures/schemas/number-and-integer.d.ts +0 -3
  119. package/build/types/fixtures/schemas/one-of.d.ts +0 -3
  120. package/build/types/fixtures/schemas/string-formats.d.ts +0 -3
  121. package/build/types/fixtures/utils/image-util.d.ts +0 -2
  122. package/build/types/jsonSchemaForm/oneOfSchema/utils/const-schema-utils.d.ts +0 -3
  123. package/build/types/jsonSchemaForm/oneOfSchema/utils/index.d.ts +0 -2
  124. package/build/types/types/common/FormControl.d.ts +0 -57
  125. package/build/types/types/index.d.ts +0 -15
  126. package/build/types/types/specification/Action.d.ts +0 -19
  127. package/build/types/types/specification/FileUploadSchema.d.ts +0 -23
  128. package/build/types/types/specification/LayoutComponent.d.ts +0 -145
  129. package/build/types/types/specification/PersistAsync.d.ts +0 -8
  130. package/build/types/types/specification/Polling.d.ts +0 -12
  131. package/build/types/types/specification/Promotion.d.ts +0 -20
  132. package/build/types/types/specification/Schema.d.ts +0 -192
  133. package/build/types/types/specification/Step.d.ts +0 -118
  134. package/build/types/types/specification/ValidationAsync.d.ts +0 -6
  135. package/build/types/types/specification/core.d.ts +0 -29
@@ -1,145 +0,0 @@
1
- import { ExternalStepPollingConfiguration } from '../../common/hooks';
2
- import { Action } from './Action';
3
- import { Schema } from './Schema';
4
- import { Margin, Size, Icon, Image, Align, Orientation, Reference, Alert } from './core';
5
- export type LayoutComponent = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | ExternalLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | ListLayout | LoadingIndicatorLayout | MarkdownLayout | ParagraphLayout | ReviewLayout;
6
- export type AlertLayout = {
7
- type: 'alert';
8
- } & Alert;
9
- export type BoxLayout = {
10
- type: 'box';
11
- components: LayoutComponent[];
12
- width?: Size;
13
- margin?: Margin;
14
- border?: boolean;
15
- };
16
- export type ButtonLayout = {
17
- type: 'button';
18
- action: Action | Reference;
19
- title?: string;
20
- control?: 'primary' | 'secondary' | 'tertiary';
21
- context?: 'neutral' | 'positive' | 'negative';
22
- disabled?: boolean;
23
- margin?: Margin;
24
- /**
25
- * @deprecated Only supported on web client
26
- */
27
- size?: Size;
28
- };
29
- export type ColumnsLayout = {
30
- type: 'columns';
31
- left: LayoutComponent[];
32
- right: LayoutComponent[];
33
- bias?: 'none' | 'left' | 'right';
34
- margin?: Margin;
35
- };
36
- export type DecisionLayout = {
37
- type: 'decision';
38
- options: DecisionOption[];
39
- margin?: Margin;
40
- };
41
- type DecisionOption = {
42
- action: Action | Reference;
43
- title: string;
44
- description?: string;
45
- icon?: Icon;
46
- image?: Image;
47
- disabled?: boolean;
48
- };
49
- /**
50
- * @deprecated Only supported on web client
51
- */
52
- export type DividerLayout = {
53
- type: 'divider';
54
- margin?: Margin;
55
- };
56
- /**
57
- * @deprecated Please use the external feature set instead
58
- */
59
- export type ExternalLayout = {
60
- type: 'external';
61
- requestUrl: string;
62
- polling?: Omit<ExternalStepPollingConfiguration, 'responseHandlers'>;
63
- responseHandlers?: ExternalStepPollingConfiguration['responseHandlers'];
64
- retryTitle?: string;
65
- };
66
- export type FormLayout = {
67
- type: 'form';
68
- schemaId?: never;
69
- schema: Schema | Reference;
70
- margin?: Margin;
71
- } | {
72
- type: 'form';
73
- schemaId: string;
74
- schema?: never;
75
- margin?: Margin;
76
- };
77
- export type HeadingLayout = {
78
- type: 'heading';
79
- size?: Size;
80
- text: string;
81
- margin?: Margin;
82
- align?: Align;
83
- };
84
- export type ImageLayout = {
85
- type: 'image';
86
- url: string;
87
- /**
88
- * @deprecated Only supported on web client
89
- */
90
- text?: string;
91
- size?: Size;
92
- margin?: Margin;
93
- };
94
- export type InfoLayout = {
95
- type: 'info';
96
- markdown: string;
97
- margin?: Margin;
98
- align?: Align;
99
- };
100
- export type ListLayout = {
101
- type: 'list';
102
- items: ListItem[];
103
- title?: string;
104
- margin?: Margin;
105
- };
106
- type ListItem = {
107
- title: string;
108
- description?: string;
109
- icon?: Icon;
110
- status?: 'positive' | 'neutral' | 'warning';
111
- };
112
- export type LoadingIndicatorLayout = {
113
- type: 'loading-indicator';
114
- margin?: Margin;
115
- size?: Size;
116
- };
117
- export type MarkdownLayout = {
118
- type: 'markdown';
119
- content: string;
120
- margin?: Margin;
121
- align?: Align;
122
- };
123
- export type ParagraphLayout = {
124
- type: 'paragraph';
125
- text: string;
126
- control?: 'copyable';
127
- margin?: Margin;
128
- align?: Align;
129
- };
130
- export type ReviewLayout = {
131
- type: 'review';
132
- title?: string;
133
- fields: ReviewField[];
134
- orientation?: Orientation;
135
- margin?: Margin;
136
- /**
137
- * @deprecated Only supported on web client
138
- */
139
- action?: Action;
140
- };
141
- type ReviewField = {
142
- label: string;
143
- value: string | number | boolean | null | undefined;
144
- };
145
- export {};
@@ -1,8 +0,0 @@
1
- import { Schema } from './Schema';
2
- export type PersistAsync = {
3
- idProperty: string;
4
- method?: 'POST' | 'PUT' | 'PATCH';
5
- param: string;
6
- schema: Schema;
7
- url: string;
8
- };
@@ -1,12 +0,0 @@
1
- import { Action } from './Action';
2
- export type PollingConfiguration = {
3
- url: string;
4
- interval: number;
5
- maxAttempts: number;
6
- onError: {
7
- action: Action;
8
- };
9
- };
10
- export type PollingResponse = {
11
- action: Action;
12
- } | null;
@@ -1,20 +0,0 @@
1
- import { Icon, Image } from './core';
2
- export type Promotion = {
3
- displayTwice?: boolean;
4
- other: {
5
- description?: string;
6
- heading?: {
7
- text: string;
8
- };
9
- icon?: Icon;
10
- image?: Image;
11
- title: string;
12
- };
13
- promoted?: {
14
- title?: string;
15
- description?: string;
16
- };
17
- control?: string;
18
- checkedMeans?: 'promoted' | 'other';
19
- default?: 'promoted' | 'other';
20
- };
@@ -1,192 +0,0 @@
1
- import { FileUploadSchema } from './FileUploadSchema';
2
- import { Model, ObjectModel } from './Model';
3
- import { PersistAsync } from './PersistAsync';
4
- import { Promotion } from './Promotion';
5
- import { ValidationAsync } from './ValidationAsync';
6
- import { Icon, Image, Alert, Help } from './core';
7
- export type Schema = AllOfSchema | ArraySchema | BlobSchema | BooleanSchema | IntegerSchema | NumberSchema | ObjectSchema | OneOfSchema | StringSchema | ListArraySchema | TupleArraySchema | FileUploadSchema | MultipleFileUploadSchema | ConstSchema;
8
- type SchemaBase = {
9
- $id?: string;
10
- type?: 'boolean' | 'blob' | 'array' | 'integer' | 'number' | 'string' | 'object';
11
- alert?: Alert;
12
- autofillProvider?: string;
13
- autofillKey?: string;
14
- allOf?: never;
15
- analyticsId?: string;
16
- const?: Model;
17
- default?: Model;
18
- description?: string;
19
- disabled?: boolean;
20
- format?: string;
21
- help?: Help;
22
- hidden?: boolean;
23
- icon?: Icon;
24
- image?: Image;
25
- oneOf?: never;
26
- persistAsync?: never;
27
- promoted?: boolean;
28
- promotion?: never;
29
- /**
30
- * @deprecated Please use disabled
31
- */
32
- readOnly?: boolean;
33
- refreshStepOnChange?: boolean;
34
- /**
35
- * @deprecated Please use refreshStepOnChange instead
36
- */
37
- refreshFormOnChange?: boolean;
38
- refreshUrl?: string;
39
- /**
40
- * @deprecated Please use refreshUrl instead
41
- */
42
- refreshFormUrl?: string;
43
- summary?: SchemaSummary;
44
- title?: string;
45
- validationAsync?: ValidationAsync;
46
- validationMessages?: Record<string, string>;
47
- /**
48
- * @deprecated Please use oneOf instead
49
- */
50
- values?: {
51
- label: string;
52
- value: string | number;
53
- }[];
54
- /**
55
- * @deprecated Please use layouts instead
56
- */
57
- width?: string;
58
- keywords?: string[];
59
- };
60
- export type AllOfSchema = Omit<SchemaBase, 'allOf'> & {
61
- allOf: Schema[];
62
- maximum?: number;
63
- minimum?: number;
64
- minLength?: number;
65
- maxLength?: number;
66
- minItems?: number;
67
- maxItems?: number;
68
- required?: string[];
69
- };
70
- export type ArraySchema = Omit<SchemaBase, 'persistAsync'> & {
71
- type: 'array';
72
- addItemTitle?: string;
73
- editItemTitle?: string;
74
- removeItemTitle?: string;
75
- items: Schema | Schema[];
76
- maxItems?: number;
77
- minItems?: number;
78
- persistAsync?: PersistAsync;
79
- summary?: ArraySchemaSummary;
80
- };
81
- export type ListArraySchema = ArraySchema & {
82
- items: Schema;
83
- };
84
- export type TupleArraySchema = ArraySchema & {
85
- items: Schema[];
86
- };
87
- export type MultipleFileUploadSchema = ListArraySchema & {
88
- items: PersistAsyncSchema;
89
- };
90
- export type BlobSchema = SchemaBase & {
91
- type: 'blob';
92
- accepts?: string[];
93
- maxSize?: number;
94
- };
95
- export type BooleanSchema = SchemaBase & {
96
- type: 'boolean';
97
- default?: boolean;
98
- const?: boolean;
99
- oneOf?: BooleanSchema[];
100
- };
101
- export type ConstSchema = SchemaBase & {
102
- type?: never;
103
- const: Model;
104
- };
105
- export type IntegerSchema = Omit<SchemaBase, 'persistAsync'> & {
106
- type: 'integer';
107
- default?: number;
108
- maximum?: number;
109
- minimum?: number;
110
- persistAsync?: PersistAsync;
111
- placeholder?: number;
112
- const?: number;
113
- oneOf?: IntegerSchema[];
114
- };
115
- export type NumberSchema = SchemaBase & Omit<IntegerSchema, 'type'> & {
116
- type: 'number';
117
- oneOf?: NumberSchema[];
118
- };
119
- export type ObjectSchema = SchemaBase & {
120
- type: 'object';
121
- displayOrder: string[];
122
- properties: Record<string, Schema>;
123
- required?: string[];
124
- oneOf?: ObjectSchema[];
125
- };
126
- export type OneOfSchema = Omit<SchemaBase, 'oneOf' | 'promotion'> & {
127
- oneOf: Schema[];
128
- promotion?: Promotion;
129
- maximum?: number;
130
- minimum?: number;
131
- minLength?: number;
132
- maxLength?: number;
133
- minItems?: number;
134
- maxItems?: number;
135
- required?: string[];
136
- default?: Model;
137
- placeholder?: Model;
138
- control?: string;
139
- };
140
- export type OneOfObjectSchema = Omit<OneOfSchema, 'oneOf' | 'default'> & {
141
- oneOf: ObjectSchema[];
142
- default?: ObjectModel;
143
- };
144
- export type PersistAsyncSchema = Schema & {
145
- persistAsync: PersistAsync;
146
- };
147
- export type StringSchema = Omit<SchemaBase, 'persistAsync'> & {
148
- type: 'string';
149
- control?: string;
150
- default?: string;
151
- displayFormat?: string;
152
- minimum?: string;
153
- maximum?: string;
154
- maxLength?: number;
155
- minLength?: number;
156
- pattern?: string;
157
- persistAsync?: PersistAsync;
158
- placeholder?: string;
159
- const?: string;
160
- oneOf?: StringSchema[];
161
- };
162
- export type BasicSchema = BooleanSchema | IntegerSchema | NumberSchema | StringSchema;
163
- export type ValidationAsyncSchema = BasicSchema & {
164
- validationAsync: ValidationAsync;
165
- };
166
- type SchemaSummary = {
167
- providesDescription?: boolean;
168
- providesIcon?: boolean;
169
- providesImage?: boolean;
170
- providesTitle?: boolean;
171
- };
172
- type ArraySchemaSummary = SchemaSummary & {
173
- defaultDescription?: string;
174
- defaultIcon?: Icon;
175
- defaultImage?: Image;
176
- defaultTitle?: string;
177
- };
178
- export declare function isBasicSchema(schema: Schema): schema is BasicSchema;
179
- export declare function isObjectSchema(schema: Schema): schema is ObjectSchema;
180
- export declare function isOneOfObjectSchema(schema: Schema): schema is OneOfObjectSchema;
181
- export declare function isOneOfSchema(schema: Schema): schema is OneOfSchema;
182
- export declare function isAllOfSchema(schema: Schema): schema is AllOfSchema;
183
- export declare function isBlobSchema(schema: Schema): schema is BlobSchema;
184
- export declare function isArraySchema(schema: Schema): schema is ArraySchema;
185
- export declare function isTupleArraySchema(schema: ArraySchema): schema is TupleArraySchema;
186
- export declare function isListArraySchema(schema: ArraySchema): schema is ListArraySchema;
187
- export declare function isStringSchema(schema: Schema): schema is StringSchema;
188
- export declare function isPersistAsyncSchema(schema: Schema): schema is PersistAsyncSchema;
189
- export declare function isPersistAsyncFileSchema(schema: Schema): schema is PersistAsyncSchema;
190
- export declare const isValidationAsyncSchema: (schema: Schema) => schema is ValidationAsyncSchema;
191
- export declare const isMultipleFileUploadSchema: (schema: Schema) => schema is MultipleFileUploadSchema;
192
- export {};
@@ -1,118 +0,0 @@
1
- import { ExternalStepPollingConfiguration } from '../../common/hooks';
2
- import { Action } from './Action';
3
- import { LayoutComponent } from './LayoutComponent';
4
- import { ObjectModel } from './Model';
5
- import { PollingConfiguration } from './Polling';
6
- import { Schema } from './Schema';
7
- import { Image } from './core';
8
- export type Step = FormStep | DecisionStep | ExternalStep | FinalStep;
9
- type BaseStep = {
10
- id?: string;
11
- /**
12
- * @deprecated Please use id instead
13
- */
14
- key?: string;
15
- type?: string;
16
- title?: string;
17
- description?: string;
18
- analytics?: Record<string, unknown>;
19
- layout?: LayoutComponent[];
20
- schemas?: Schema[];
21
- actions?: Action[];
22
- model?: ObjectModel;
23
- refreshUrl?: string;
24
- /**
25
- * @deprecated Please use refreshUrl instead
26
- */
27
- refreshFormUrl?: string;
28
- polling?: PollingConfiguration;
29
- external?: {
30
- url: string;
31
- };
32
- errors?: {
33
- error?: GlobalError;
34
- validation?: FormErrors;
35
- };
36
- };
37
- export type FormStep = BaseStep & {
38
- type?: 'form';
39
- title: string;
40
- layout: LayoutComponent[];
41
- schemas: Schema[];
42
- errors?: unknown;
43
- };
44
- /**
45
- * @deprecated Please use a form step with a layout instead
46
- */
47
- export type FinalStep = BaseStep & {
48
- type: 'final';
49
- actions: Action[];
50
- details: {
51
- description: string;
52
- image?: Image;
53
- title: string;
54
- };
55
- success: boolean;
56
- };
57
- /**
58
- * @deprecated Please use the external feature set instead
59
- */
60
- export type ExternalStep = BaseStep & {
61
- type: 'external';
62
- description?: string;
63
- polling?: Omit<ExternalStepPollingConfiguration, 'responseHandlers'>;
64
- requestUrl: string;
65
- responseHandlers?: ExternalStepPollingConfiguration['responseHandlers'];
66
- retryTitle?: string;
67
- title: string;
68
- };
69
- /**
70
- * @deprecated Please use DecisionLayout instead
71
- */
72
- export type DecisionStep = BaseStep & {
73
- type: 'decision';
74
- options?: DecisionStepOption[];
75
- };
76
- /**
77
- * @deprecated Please use DecisionLayout instead
78
- */
79
- export type DecisionStepOption = {
80
- title: string;
81
- description?: string;
82
- url: string;
83
- disabled?: boolean;
84
- };
85
- export type FormErrors = Record<string, unknown> | string | undefined | null;
86
- export type GlobalError = string | undefined | null;
87
- export type ErrorResponseBody = {
88
- error?: GlobalError;
89
- validation?: FormErrors;
90
- refreshUrl?: string;
91
- /**
92
- * @deprecated Please use refreshUrl instead
93
- */
94
- refreshFormUrl?: string;
95
- };
96
- /**
97
- * @deprecated Please use the review layout component
98
- */
99
- export type LegacyReviewStep = Omit<FormStep, 'actions' | 'schemas' | 'layout'> & {
100
- reviewFields?: LegacyReviewFields;
101
- actions?: Action[];
102
- schemas?: Schema[];
103
- };
104
- export type LegacyReviewFields = {
105
- title?: string;
106
- fields: Array<{
107
- title: string;
108
- value: string;
109
- }>;
110
- };
111
- export type LegacyFormStep = Step & {
112
- type?: 'form';
113
- reviewFields?: LegacyReviewFields;
114
- schemas?: Schema[];
115
- actions?: Action[];
116
- };
117
- export declare const isBasicError: (error: FormErrors) => error is string | null;
118
- export {};
@@ -1,6 +0,0 @@
1
- import { HttpMethod } from './core';
2
- export type ValidationAsync = {
3
- param: string;
4
- url: string;
5
- method?: HttpMethod;
6
- };
@@ -1,29 +0,0 @@
1
- export type Image = {
2
- url: string;
3
- text?: string;
4
- name?: string;
5
- };
6
- export type Icon = {
7
- name?: string;
8
- text?: never;
9
- } | {
10
- name?: never;
11
- text?: string;
12
- };
13
- export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
14
- export type Margin = Size;
15
- export type Context = 'neutral' | 'warning' | 'positive' | 'negative';
16
- export type Orientation = 'horizontal' | 'vertical';
17
- export type Align = 'left' | 'right' | 'center';
18
- export type HttpMethod = 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE';
19
- export type Reference = {
20
- $ref: string;
21
- };
22
- export type Alert = {
23
- markdown: string;
24
- context?: Context;
25
- margin?: Margin;
26
- };
27
- export type Help = {
28
- markdown: string;
29
- };