@wise/dynamic-flow-types 3.19.0 → 4.0.0-experimental-8f7ea55

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 (156) hide show
  1. package/build/renderers/BaseInputRendererProps.d.ts +0 -4
  2. package/build/renderers/CallToAction.d.ts +0 -2
  3. package/build/renderers/DecisionRendererProps.d.ts +0 -6
  4. package/build/renderers/FormSectionRendererProps.d.ts +0 -4
  5. package/build/renderers/Icon.d.ts +1 -1
  6. package/build/renderers/InstructionsRendererProps.d.ts +0 -2
  7. package/build/renderers/ListRendererProps.d.ts +1 -13
  8. package/build/renderers/MoneyInputRendererProps.d.ts +1 -1
  9. package/build/renderers/MultiUploadInputRendererProps.d.ts +2 -2
  10. package/build/renderers/RepeatableRendererProps.d.ts +0 -6
  11. package/build/renderers/ReviewRendererProps.d.ts +0 -11
  12. package/build/renderers/SearchRendererProps.d.ts +1 -1
  13. package/build/renderers/SelectInputRendererProps.d.ts +0 -4
  14. package/build/renderers/StatusListRendererProps.d.ts +0 -2
  15. package/build/renderers/StepRendererProps.d.ts +8 -13
  16. package/build/renderers/Suggestions.d.ts +1 -7
  17. package/build/renderers/TabsRendererProps.d.ts +0 -2
  18. package/build/renderers/UploadInputRendererProps.d.ts +2 -2
  19. package/build/renderers/constants.d.ts +1 -1
  20. package/build/renderers/index.d.ts +0 -7
  21. package/build/{next → spec}/index.d.ts +3 -0
  22. package/build/{main.js → spec/main.js} +1 -1
  23. package/build/zod/schemas.d.ts +660 -660
  24. package/build/zod/schemas.ts +1 -1
  25. package/package.json +7 -12
  26. package/build/index.d.ts +0 -16
  27. package/build/spec/Action.d.ts +0 -21
  28. package/build/spec/AutocompleteToken.d.ts +0 -396
  29. package/build/spec/FileUploadSchema.d.ts +0 -19
  30. package/build/spec/LayoutComponent.d.ts +0 -237
  31. package/build/spec/Model.d.ts +0 -6
  32. package/build/spec/Navigation.d.ts +0 -14
  33. package/build/spec/PersistAsync.d.ts +0 -8
  34. package/build/spec/Polling.d.ts +0 -28
  35. package/build/spec/Promotion.d.ts +0 -20
  36. package/build/spec/Schema.d.ts +0 -191
  37. package/build/spec/Search.d.ts +0 -21
  38. package/build/spec/Step.d.ts +0 -112
  39. package/build/spec/ValidationAsync.d.ts +0 -6
  40. package/build/spec/core.d.ts +0 -47
  41. package/build/spec/responses.d.ts +0 -18
  42. /package/build/{next → spec}/JsonElement.d.ts +0 -0
  43. /package/build/{next → spec}/feature/Action.d.ts +0 -0
  44. /package/build/{next → spec}/feature/ActionBehavior.d.ts +0 -0
  45. /package/build/{next → spec}/feature/ActionType.d.ts +0 -0
  46. /package/build/{next → spec}/feature/Behavior.d.ts +0 -0
  47. /package/build/{next → spec}/feature/ContainerBehavior.d.ts +0 -0
  48. /package/build/{next → spec}/feature/CopyBehavior.d.ts +0 -0
  49. /package/build/{next → spec}/feature/DismissBehavior.d.ts +0 -0
  50. /package/build/{next → spec}/feature/External.d.ts +0 -0
  51. /package/build/{next → spec}/feature/Help.d.ts +0 -0
  52. /package/build/{next → spec}/feature/Link.d.ts +0 -0
  53. /package/build/{next → spec}/feature/LinkBehavior.d.ts +0 -0
  54. /package/build/{next → spec}/feature/LinkHandler.d.ts +0 -0
  55. /package/build/{next → spec}/feature/ModalBehavior.d.ts +0 -0
  56. /package/build/{next → spec}/feature/Navigation.d.ts +0 -0
  57. /package/build/{next → spec}/feature/NavigationBackBehavior.d.ts +0 -0
  58. /package/build/{next → spec}/feature/NavigationStackBehavior.d.ts +0 -0
  59. /package/build/{next → spec}/feature/PersistAsync.d.ts +0 -0
  60. /package/build/{next → spec}/feature/Polling.d.ts +0 -0
  61. /package/build/{next → spec}/feature/PollingOnError.d.ts +0 -0
  62. /package/build/{next → spec}/feature/RefreshBehavior.d.ts +0 -0
  63. /package/build/{next → spec}/feature/StepError.d.ts +0 -0
  64. /package/build/{next → spec}/feature/Suggestions.d.ts +0 -0
  65. /package/build/{next → spec}/feature/SuggestionsValue.d.ts +0 -0
  66. /package/build/{next → spec}/feature/Summary.d.ts +0 -0
  67. /package/build/{next → spec}/feature/SummaryProvider.d.ts +0 -0
  68. /package/build/{next → spec}/feature/SummarySummariser.d.ts +0 -0
  69. /package/build/{next → spec}/feature/UploadSource.d.ts +0 -0
  70. /package/build/{next → spec}/feature/ValidateAsync.d.ts +0 -0
  71. /package/build/{next → spec}/feature/toolbar/Toolbar.d.ts +0 -0
  72. /package/build/{next → spec}/feature/toolbar/ToolbarButton.d.ts +0 -0
  73. /package/build/{next → spec}/feature/toolbar/ToolbarItem.d.ts +0 -0
  74. /package/build/{next → spec}/layout/AlertLayout.d.ts +0 -0
  75. /package/build/{next → spec}/layout/AlertLayoutCallToAction.d.ts +0 -0
  76. /package/build/{next → spec}/layout/BoxLayout.d.ts +0 -0
  77. /package/build/{next → spec}/layout/ButtonLayout.d.ts +0 -0
  78. /package/build/{next → spec}/layout/ColumnsLayout.d.ts +0 -0
  79. /package/build/{next → spec}/layout/ColumnsLayoutBias.d.ts +0 -0
  80. /package/build/{next → spec}/layout/DecisionLayout.d.ts +0 -0
  81. /package/build/{next → spec}/layout/DecisionLayoutOption.d.ts +0 -0
  82. /package/build/{next → spec}/layout/DividerLayout.d.ts +0 -0
  83. /package/build/{next → spec}/layout/FormLayout.d.ts +0 -0
  84. /package/build/{next → spec}/layout/FormLayoutSchemaReference.d.ts +0 -0
  85. /package/build/{next → spec}/layout/HeadingLayout.d.ts +0 -0
  86. /package/build/{next → spec}/layout/ImageLayout.d.ts +0 -0
  87. /package/build/{next → spec}/layout/InfoLayout.d.ts +0 -0
  88. /package/build/{next → spec}/layout/InstructionsLayout.d.ts +0 -0
  89. /package/build/{next → spec}/layout/InstructionsLayoutItem.d.ts +0 -0
  90. /package/build/{next → spec}/layout/ItemCallToAction.d.ts +0 -0
  91. /package/build/{next → spec}/layout/Layout.d.ts +0 -0
  92. /package/build/{next → spec}/layout/ListLayout.d.ts +0 -0
  93. /package/build/{next → spec}/layout/ListLayoutCallToAction.d.ts +0 -0
  94. /package/build/{next → spec}/layout/ListLayoutItem.d.ts +0 -0
  95. /package/build/{next → spec}/layout/ListLayoutStatus.d.ts +0 -0
  96. /package/build/{next → spec}/layout/LoadingIndicatorLayout.d.ts +0 -0
  97. /package/build/{next → spec}/layout/MarkdownLayout.d.ts +0 -0
  98. /package/build/{next → spec}/layout/ModalLayout.d.ts +0 -0
  99. /package/build/{next → spec}/layout/ModalLayoutContent.d.ts +0 -0
  100. /package/build/{next → spec}/layout/ModalLayoutTrigger.d.ts +0 -0
  101. /package/build/{next → spec}/layout/ParagraphLayout.d.ts +0 -0
  102. /package/build/{next → spec}/layout/ProgressLayout.d.ts +0 -0
  103. /package/build/{next → spec}/layout/ReviewLayout.d.ts +0 -0
  104. /package/build/{next → spec}/layout/ReviewLayoutCallToAction.d.ts +0 -0
  105. /package/build/{next → spec}/layout/ReviewLayoutField.d.ts +0 -0
  106. /package/build/{next → spec}/layout/SearchLayout.d.ts +0 -0
  107. /package/build/{next → spec}/layout/SectionLayout.d.ts +0 -0
  108. /package/build/{next → spec}/layout/SectionLayoutCallToAction.d.ts +0 -0
  109. /package/build/{next → spec}/layout/StatusListLayout.d.ts +0 -0
  110. /package/build/{next → spec}/layout/StatusListLayoutItem.d.ts +0 -0
  111. /package/build/{next → spec}/layout/StatusListLayoutStatus.d.ts +0 -0
  112. /package/build/{next → spec}/layout/TabsLayout.d.ts +0 -0
  113. /package/build/{next → spec}/layout/TabsLayoutTab.d.ts +0 -0
  114. /package/build/{main.mjs → spec/main.mjs} +0 -0
  115. /package/build/{next → spec}/misc/AdditionalInfo.d.ts +0 -0
  116. /package/build/{next → spec}/misc/Align.d.ts +0 -0
  117. /package/build/{next → spec}/misc/AutocapitalizationType.d.ts +0 -0
  118. /package/build/{next → spec}/misc/AutocompleteToken.d.ts +0 -0
  119. /package/build/{next → spec}/misc/Context.d.ts +0 -0
  120. /package/build/{next → spec}/misc/HttpMethod.d.ts +0 -0
  121. /package/build/{next → spec}/misc/Icon.d.ts +0 -0
  122. /package/build/{next → spec}/misc/IconNamed.d.ts +0 -0
  123. /package/build/{next → spec}/misc/IconText.d.ts +0 -0
  124. /package/build/{next → spec}/misc/Image.d.ts +0 -0
  125. /package/build/{next → spec}/misc/InlineAlert.d.ts +0 -0
  126. /package/build/{next → spec}/misc/Size.d.ts +0 -0
  127. /package/build/{next → spec}/misc/SupportingValues.d.ts +0 -0
  128. /package/build/{next → spec}/misc/media/AvatarContent.d.ts +0 -0
  129. /package/build/{next → spec}/misc/media/AvatarTextContent.d.ts +0 -0
  130. /package/build/{next → spec}/misc/media/AvatarUriContent.d.ts +0 -0
  131. /package/build/{next → spec}/misc/media/Media.d.ts +0 -0
  132. /package/build/{next → spec}/misc/media/MediaAvatar.d.ts +0 -0
  133. /package/build/{next → spec}/misc/media/MediaImage.d.ts +0 -0
  134. /package/build/{next → spec}/responses/action/ActionResponseBody.d.ts +0 -0
  135. /package/build/{next → spec}/responses/error/ErrorResponseBody.d.ts +0 -0
  136. /package/build/{next → spec}/responses/modal/ModalResponseBody.d.ts +0 -0
  137. /package/build/{next → spec}/responses/search/SearchResponseBody.d.ts +0 -0
  138. /package/build/{next → spec}/responses/search/SearchResult.d.ts +0 -0
  139. /package/build/{next → spec}/responses/search/SearchResultAction.d.ts +0 -0
  140. /package/build/{next → spec}/responses/search/SearchResultSearch.d.ts +0 -0
  141. /package/build/{next → spec}/responses/search/SearchSearchRequest.d.ts +0 -0
  142. /package/build/{next → spec}/schema/AllOfSchema.d.ts +0 -0
  143. /package/build/{next → spec}/schema/ArraySchema.d.ts +0 -0
  144. /package/build/{next → spec}/schema/ArraySchemaList.d.ts +0 -0
  145. /package/build/{next → spec}/schema/ArraySchemaTuple.d.ts +0 -0
  146. /package/build/{next → spec}/schema/BlobSchema.d.ts +0 -0
  147. /package/build/{next → spec}/schema/BooleanSchema.d.ts +0 -0
  148. /package/build/{next → spec}/schema/ConstSchema.d.ts +0 -0
  149. /package/build/{next → spec}/schema/IntegerSchema.d.ts +0 -0
  150. /package/build/{next → spec}/schema/NumberSchema.d.ts +0 -0
  151. /package/build/{next → spec}/schema/ObjectSchema.d.ts +0 -0
  152. /package/build/{next → spec}/schema/OneOfSchema.d.ts +0 -0
  153. /package/build/{next → spec}/schema/Schema.d.ts +0 -0
  154. /package/build/{next → spec}/schema/StringSchema.d.ts +0 -0
  155. /package/build/{next → spec}/schema/StringSchemaFormat.d.ts +0 -0
  156. /package/build/{next → spec}/step/Step.d.ts +0 -0
@@ -1,237 +0,0 @@
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, Behavior } 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
- export type AlertLayoutCallToAction = {
8
- title: string;
9
- accessibilityDescription?: string;
10
- behavior: Behavior;
11
- };
12
- export type AlertLayout = Alert & {
13
- type: 'alert';
14
- callToAction?: AlertLayoutCallToAction;
15
- };
16
- export type BoxLayout = {
17
- type: 'box';
18
- components: LayoutComponent[];
19
- width?: Size;
20
- margin?: Margin;
21
- border?: boolean;
22
- };
23
- export type ButtonLayout = {
24
- type: 'button';
25
- action: Action | Reference;
26
- title?: string;
27
- control?: 'primary' | 'secondary' | 'tertiary';
28
- context?: 'neutral' | 'positive' | 'negative';
29
- disabled?: boolean;
30
- margin?: Margin;
31
- /**
32
- * @deprecated Only supported on web client
33
- */
34
- size?: Size;
35
- pinOrder?: number;
36
- };
37
- export type ColumnsLayout = {
38
- type: 'columns';
39
- left: LayoutComponent[];
40
- right: LayoutComponent[];
41
- bias?: 'none' | 'left' | 'right';
42
- margin?: Margin;
43
- };
44
- export type DecisionLayout = {
45
- type: 'decision';
46
- options: DecisionOption[];
47
- margin?: Margin;
48
- title?: string;
49
- };
50
- type DecisionOption = {
51
- action: Action | Reference;
52
- title: string;
53
- description?: string;
54
- icon?: Icon;
55
- image?: Image;
56
- disabled?: boolean;
57
- };
58
- /**
59
- * @deprecated Only supported on web client
60
- */
61
- export type DividerLayout = {
62
- type: 'divider';
63
- margin?: Margin;
64
- };
65
- /**
66
- * @deprecated Please use the external feature set instead
67
- */
68
- export type ExternalLayout = {
69
- type: 'external';
70
- requestUrl: string;
71
- polling?: Omit<ExternalStepPollingConfiguration, 'responseHandlers'>;
72
- responseHandlers?: ExternalStepPollingResponseHandler[];
73
- retryTitle?: string;
74
- };
75
- export type FormLayout = {
76
- type: 'form';
77
- schemaId?: never;
78
- schema: Schema | Reference;
79
- margin?: Margin;
80
- } | {
81
- type: 'form';
82
- schemaId: string;
83
- schema?: never;
84
- margin?: Margin;
85
- };
86
- export type HeadingLayout = {
87
- type: 'heading';
88
- size?: Size;
89
- text: string;
90
- margin?: Margin;
91
- align?: Align;
92
- control?: string;
93
- };
94
- export type ImageLayout = {
95
- type: 'image';
96
- content?: {
97
- accessibilityDescription?: string;
98
- /**
99
- * @deprecated Please use accessibilityDescription
100
- */
101
- text?: string;
102
- /**
103
- * @deprecated Please use uri
104
- */
105
- url?: string;
106
- uri?: string;
107
- };
108
- /**
109
- * @deprecated Please use content.uri
110
- */
111
- url: string;
112
- /**
113
- * @deprecated Please use accessibilityDescription
114
- */
115
- text?: string;
116
- size?: Size;
117
- margin?: Margin;
118
- /**
119
- * @deprecated Please use content.accessibilityDescription
120
- */
121
- accessibilityDescription?: string;
122
- };
123
- /**
124
- * @deprecated Please use MarkdownLayout instead
125
- */
126
- export type InfoLayout = {
127
- type: 'info';
128
- markdown: string;
129
- margin?: Margin;
130
- align?: Align;
131
- };
132
- export type InstructionsLayout = {
133
- type: 'instructions';
134
- title?: string;
135
- items: Instruction[];
136
- margin?: Margin;
137
- };
138
- /**
139
- * @deprecated Please use StatusListLayout instead
140
- */
141
- export type ListLayout = {
142
- type: 'list';
143
- items: ListItem[];
144
- title?: string;
145
- margin?: Margin;
146
- };
147
- type ListItem = {
148
- title: string;
149
- description?: string;
150
- icon?: Icon;
151
- status?: 'positive' | 'neutral' | 'warning';
152
- };
153
- export type StatusListLayout = {
154
- type: 'status-list';
155
- items: StatusListItem[];
156
- title?: string;
157
- margin?: Margin;
158
- };
159
- type StatusListItem = {
160
- title: string;
161
- description?: string;
162
- icon?: Icon;
163
- status?: 'done' | 'not-done' | 'pending';
164
- callToAction?: StatusListItemCallToAction;
165
- };
166
- type StatusListItemCallToAction = {
167
- title: string;
168
- accessibilityDescription?: string;
169
- behavior: Behavior;
170
- };
171
- export type LoadingIndicatorLayout = {
172
- type: 'loading-indicator';
173
- margin?: Margin;
174
- size?: Size;
175
- };
176
- export type MarkdownLayout = {
177
- type: 'markdown';
178
- content: string;
179
- margin?: Margin;
180
- align?: Align;
181
- };
182
- export type ModalLayout = {
183
- type: 'modal';
184
- control?: string;
185
- trigger: {
186
- title: string;
187
- };
188
- content: {
189
- components: LayoutComponent[];
190
- title?: string;
191
- };
192
- margin?: Margin;
193
- };
194
- export type ParagraphLayout = {
195
- type: 'paragraph';
196
- text: string;
197
- control?: 'copyable';
198
- margin?: Margin;
199
- align?: Align;
200
- };
201
- export type ReviewLayout = {
202
- type: 'review';
203
- title?: string;
204
- fields: ReviewField[];
205
- control?: string;
206
- /**
207
- * @deprecated Use `control` instead.
208
- */
209
- orientation?: Orientation;
210
- margin?: Margin;
211
- /**
212
- * @deprecated Please use callToAction instead
213
- */
214
- action?: Action;
215
- callToAction?: {
216
- title: string;
217
- action: Action;
218
- behavior?: Behavior;
219
- };
220
- };
221
- export type SearchLayout = SearchConfig & {
222
- type: 'search';
223
- title: string;
224
- control?: string;
225
- emptyMessage: string;
226
- margin?: Margin;
227
- };
228
- type ReviewField = {
229
- label: string;
230
- value: string | number | boolean | null | undefined;
231
- help?: Help;
232
- };
233
- type Instruction = {
234
- text: string;
235
- context: 'positive' | 'negative' | 'neutral' | 'warning';
236
- };
237
- export {};
@@ -1,6 +0,0 @@
1
- export type BasicModel = boolean | number | string;
2
- export type ObjectModel = {
3
- [key: string]: Model;
4
- };
5
- export type ArrayModel = (Model | null)[];
6
- export type Model = BasicModel | ObjectModel | ArrayModel | null;
@@ -1,14 +0,0 @@
1
- import type { Action } from './Action';
2
- export type Navigation = {
3
- back?: BackBehaviour;
4
- /**
5
- * @deprecated Please use back instead
6
- */
7
- backButton?: BackBehaviour;
8
- stackBehavior?: StackBehavior;
9
- };
10
- export type BackBehaviour = {
11
- title?: string;
12
- action: Action;
13
- };
14
- export type StackBehavior = 'default' | 'remove-previous' | 'remove-all' | 'replace-current';
@@ -1,8 +0,0 @@
1
- import type { 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,28 +0,0 @@
1
- import type { Action } from './Action';
2
- export type PollingConfiguration = {
3
- url: string;
4
- interval?: number;
5
- delay?: number;
6
- timeout?: number;
7
- maxAttempts: number;
8
- onError: {
9
- action: Action;
10
- };
11
- };
12
- export type PollingResponse = {
13
- action: Action;
14
- } | null;
15
- /**
16
- * @deprecated Please use external feature instead of external step
17
- */
18
- export type ExternalStepPollingConfiguration = PollingConfiguration & {
19
- maxConsecutiveFails: number;
20
- responseHandlers: ExternalStepPollingResponseHandler[];
21
- };
22
- /**
23
- * @deprecated Please use external feature instead of external step
24
- */
25
- export type ExternalStepPollingResponseHandler = {
26
- result: string;
27
- action: Action;
28
- };
@@ -1,20 +0,0 @@
1
- import type { 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,191 +0,0 @@
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
- export type Schema = AllOfSchema | ArraySchema | BlobSchema | BooleanSchema | IntegerSchema | NumberSchema | ObjectSchema | OneOfSchema | StringSchema | ListArraySchema | TupleArraySchema | FileUploadSchema | MultipleFileUploadSchema | MultiSelectSchema | ConstSchema;
9
- type SchemaBase = {
10
- $id?: string;
11
- type?: 'boolean' | 'blob' | 'array' | 'integer' | 'number' | 'string' | 'object';
12
- alert?: Alert;
13
- autofillProvider?: string;
14
- autofillKey?: string;
15
- allOf?: never;
16
- analyticsId?: string;
17
- const?: Model;
18
- default?: Model;
19
- description?: string;
20
- disabled?: boolean;
21
- format?: string;
22
- help?: Help;
23
- hidden?: boolean;
24
- icon?: Icon;
25
- image?: Image;
26
- oneOf?: never;
27
- persistAsync?: never;
28
- promoted?: boolean;
29
- promotion?: never;
30
- /**
31
- * @deprecated Please use disabled
32
- */
33
- readOnly?: boolean;
34
- refreshStepOnChange?: boolean;
35
- /**
36
- * @deprecated Please use refreshStepOnChange instead
37
- */
38
- refreshFormOnChange?: boolean;
39
- refreshUrl?: string;
40
- /**
41
- * @deprecated Please use refreshUrl instead
42
- */
43
- refreshFormUrl?: string;
44
- summary?: SchemaSummary;
45
- title?: string;
46
- validationAsync?: ValidationAsync;
47
- validationMessages?: Record<string, string>;
48
- /**
49
- * @deprecated Please use oneOf instead
50
- */
51
- values?: {
52
- label: string;
53
- value: string | number;
54
- }[];
55
- /**
56
- * @deprecated Please use layouts instead
57
- */
58
- width?: string;
59
- keywords?: string[];
60
- };
61
- export type AllOfSchema = Omit<SchemaBase, 'allOf'> & {
62
- allOf: Schema[];
63
- maximum?: number;
64
- minimum?: number;
65
- minLength?: number;
66
- maxLength?: number;
67
- minItems?: number;
68
- maxItems?: number;
69
- required?: string[];
70
- disabled?: never;
71
- };
72
- export type ArraySchema = Omit<SchemaBase, 'persistAsync'> & {
73
- type: 'array';
74
- addItemTitle: string;
75
- editItemTitle: string;
76
- items: Schema | Schema[];
77
- maxItems?: number;
78
- minItems?: number;
79
- persistAsync?: PersistAsync;
80
- summary?: ArraySchemaSummary;
81
- };
82
- export type ListArraySchema = ArraySchema & {
83
- items: Schema;
84
- };
85
- export type TupleArraySchema = ArraySchema & {
86
- items: Schema[];
87
- };
88
- export type MultipleFileUploadSchema = ListArraySchema & {
89
- items: PersistAsyncSchema;
90
- };
91
- export type MultiSelectSchema = ListArraySchema & {
92
- placeholder?: string;
93
- items: Omit<OneOfSchema, 'oneOf'> & {
94
- oneOf: ConstSchema[];
95
- };
96
- };
97
- export type BlobSchema = SchemaBase & {
98
- type: 'blob';
99
- accepts?: string[];
100
- source?: 'file' | 'camera';
101
- maxSize?: number;
102
- };
103
- export type BooleanSchema = SchemaBase & {
104
- type: 'boolean';
105
- default?: boolean;
106
- const?: boolean;
107
- oneOf?: BooleanSchema[];
108
- };
109
- export type ConstSchema = SchemaBase & {
110
- type?: never;
111
- const: Model;
112
- };
113
- export type IntegerSchema = Omit<SchemaBase, 'persistAsync'> & {
114
- type: 'integer';
115
- default?: number;
116
- maximum?: number;
117
- minimum?: number;
118
- persistAsync?: PersistAsync;
119
- placeholder?: string | number;
120
- autocompleteHint?: AutocompleteToken[];
121
- const?: number;
122
- oneOf?: IntegerSchema[];
123
- };
124
- export type NumberSchema = SchemaBase & Omit<IntegerSchema, 'type'> & {
125
- type: 'number';
126
- oneOf?: NumberSchema[];
127
- };
128
- export type ObjectSchema = SchemaBase & {
129
- type: 'object';
130
- displayOrder: string[];
131
- properties: Record<string, Schema>;
132
- required?: string[];
133
- oneOf?: ObjectSchema[];
134
- };
135
- export type OneOfSchema = Omit<SchemaBase, 'oneOf' | 'promotion'> & {
136
- oneOf: Schema[];
137
- promotion?: Promotion;
138
- maximum?: number;
139
- minimum?: number;
140
- minLength?: number;
141
- maxLength?: number;
142
- minItems?: number;
143
- maxItems?: number;
144
- required?: string[];
145
- default?: Model;
146
- placeholder?: Model;
147
- autocompleteHint?: AutocompleteToken[];
148
- control?: string;
149
- };
150
- export type OneOfObjectSchema = Omit<OneOfSchema, 'oneOf' | 'default'> & {
151
- oneOf: ObjectSchema[];
152
- default?: ObjectModel;
153
- };
154
- export type PersistAsyncSchema = Schema & {
155
- persistAsync: PersistAsync;
156
- };
157
- export type StringSchema = Omit<SchemaBase, 'persistAsync'> & {
158
- type: 'string';
159
- control?: string;
160
- default?: string;
161
- displayFormat?: string;
162
- minimum?: string;
163
- maximum?: string;
164
- maxLength?: number;
165
- minLength?: number;
166
- pattern?: string;
167
- persistAsync?: PersistAsync;
168
- placeholder?: string;
169
- autocompleteHint?: AutocompleteToken[];
170
- const?: string;
171
- oneOf?: StringSchema[];
172
- maxSize?: number;
173
- accepts?: string[];
174
- };
175
- export type BasicSchema = BooleanSchema | IntegerSchema | NumberSchema | StringSchema;
176
- export type ValidationAsyncSchema = BasicSchema & {
177
- validationAsync: ValidationAsync;
178
- };
179
- type SchemaSummary = {
180
- providesDescription?: boolean;
181
- providesIcon?: boolean;
182
- providesImage?: boolean;
183
- providesTitle?: boolean;
184
- };
185
- type ArraySchemaSummary = SchemaSummary & {
186
- defaultDescription?: string;
187
- defaultIcon?: Icon;
188
- defaultImage?: Image;
189
- defaultTitle?: string;
190
- };
191
- export {};
@@ -1,21 +0,0 @@
1
- import type { Action } from './Action';
2
- import type { HttpMethod, Icon, Image } from './core';
3
- export type SearchConfig = {
4
- url: string;
5
- method: HttpMethod;
6
- param: string;
7
- };
8
- export type SearchResult = {
9
- title: string;
10
- description?: string;
11
- icon?: Icon;
12
- image?: Image;
13
- } & ({
14
- type: 'action';
15
- value: Action;
16
- } | {
17
- type: 'search';
18
- value: SearchConfig & {
19
- query: string;
20
- };
21
- });
@@ -1,112 +0,0 @@
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
- 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
- /**
24
- * @experimental navigation is experimental and subject to change
25
- */
26
- navigation?: Navigation;
27
- refreshUrl?: string;
28
- /**
29
- * @deprecated Please use refreshUrl instead
30
- */
31
- refreshFormUrl?: string;
32
- polling?: PollingConfiguration;
33
- external?: {
34
- url: string;
35
- };
36
- errors?: {
37
- error?: GlobalError;
38
- validation?: FormErrors;
39
- };
40
- };
41
- export type FormStep = BaseStep & {
42
- type?: 'form';
43
- title: string;
44
- layout: LayoutComponent[];
45
- schemas: Schema[];
46
- errors?: unknown;
47
- };
48
- /**
49
- * @deprecated Please use a form step with a layout instead
50
- */
51
- export type FinalStep = BaseStep & {
52
- type: 'final';
53
- actions: Action[];
54
- details: {
55
- description: string;
56
- image?: Image;
57
- title: string;
58
- };
59
- success: boolean;
60
- };
61
- /**
62
- * @deprecated Please use the external feature set instead
63
- */
64
- export type ExternalStep = BaseStep & {
65
- type: 'external';
66
- description?: string;
67
- polling?: Omit<ExternalStepPollingConfiguration, 'responseHandlers'>;
68
- requestUrl: string;
69
- responseHandlers?: ExternalStepPollingResponseHandler[];
70
- retryTitle?: string;
71
- title: string;
72
- };
73
- /**
74
- * @deprecated Please use DecisionLayout instead
75
- */
76
- export type DecisionStep = BaseStep & {
77
- type: 'decision';
78
- options?: DecisionStepOption[];
79
- };
80
- /**
81
- * @deprecated Please use DecisionLayout instead
82
- */
83
- export type DecisionStepOption = {
84
- title: string;
85
- description?: string;
86
- url: string;
87
- disabled?: boolean;
88
- };
89
- export type FormErrors = Record<string, unknown> | string | undefined | null;
90
- export type GlobalError = string | undefined | null;
91
- /**
92
- * @deprecated Please use the review layout component
93
- */
94
- export type LegacyReviewStep = Omit<FormStep, 'actions' | 'schemas' | 'layout'> & {
95
- reviewFields?: LegacyReviewFields;
96
- actions?: Action[];
97
- schemas?: Schema[];
98
- };
99
- export type LegacyReviewFields = {
100
- title?: string;
101
- fields: {
102
- title: string;
103
- value: string;
104
- }[];
105
- };
106
- export type LegacyFormStep = Step & {
107
- type?: 'form';
108
- reviewFields?: LegacyReviewFields;
109
- schemas?: Schema[];
110
- actions?: Action[];
111
- };
112
- export {};
@@ -1,6 +0,0 @@
1
- import type { HttpMethod } from './core';
2
- export type ValidationAsync = {
3
- param: string;
4
- url: string;
5
- method?: HttpMethod;
6
- };
@@ -1,47 +0,0 @@
1
- import { Action } from './Action';
2
- export type Image = {
3
- type?: 'image';
4
- url: string;
5
- text?: string;
6
- name?: string;
7
- };
8
- export type Icon = {
9
- name?: string;
10
- text?: never;
11
- } | {
12
- name?: never;
13
- text?: string;
14
- };
15
- export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
16
- export type Margin = Size;
17
- export type Context = 'neutral' | 'warning' | 'positive' | 'negative';
18
- export type Orientation = 'horizontal' | 'vertical';
19
- export type Align = 'left' | 'right' | 'center';
20
- export type HttpMethod = 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE';
21
- export type Reference = {
22
- $ref: string;
23
- };
24
- /** @deprecated Prefer Context */
25
- export type LegacyContext = 'success' | 'failure' | 'info' | 'primary';
26
- export type Alert = {
27
- type?: 'alert';
28
- markdown: string;
29
- context?: Context | LegacyContext;
30
- margin?: Margin;
31
- };
32
- export type Help = {
33
- markdown: string;
34
- };
35
- export type Behavior = {
36
- type: 'action';
37
- action: Action;
38
- } | {
39
- type: 'link';
40
- url: string;
41
- } | {
42
- action?: Action;
43
- link?: Link;
44
- };
45
- export type Link = {
46
- url: string;
47
- };