@wise/dynamic-flow-types 2.3.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 (82) 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/Schema.d.ts +1 -1
  81. package/build/spec/core.d.ts +2 -0
  82. package/package.json +1 -1
@@ -0,0 +1,35 @@
1
+ import type { ActionType } from './ActionType';
2
+ import type { HttpMethod } from '../misc/HttpMethod';
3
+ export type Action = {
4
+ id?: string;
5
+ url?: string;
6
+ method?: HttpMethod;
7
+ exit?: boolean;
8
+ result?: unknown;
9
+ data?: unknown;
10
+ timeout?: number;
11
+ /**
12
+ * @deprecated Please use Button.title instead
13
+ */
14
+ title?: string;
15
+ /**
16
+ * @deprecated Please use Button.title instead or Button.context instead
17
+ */
18
+ type?: ActionType;
19
+ /**
20
+ * @deprecated Please use Button.disabled instead or Button.context instead
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * @deprecated Please use 'id' instead
25
+ */
26
+ $id?: string;
27
+ /**
28
+ * @deprecated Action references are deprecated.
29
+ */
30
+ $ref?: string;
31
+ /**
32
+ * @experimental This feature may be changed in the future without notice.
33
+ */
34
+ skipValidation?: boolean;
35
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @deprecated Please use Button.control and Button.context instead
3
+ */
4
+ export type ActionType = 'primary' | 'secondary' | 'link' | 'positive' | 'negative';
@@ -0,0 +1,3 @@
1
+ export type External = {
2
+ url: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ export type Help = {
2
+ markdown: string;
3
+ };
@@ -0,0 +1,5 @@
1
+ import type { Action } from './Action';
2
+ export type LinkHandler = {
3
+ regexPattern: string;
4
+ action: Action;
5
+ };
@@ -0,0 +1,11 @@
1
+ import type { NavigationBackBehaviour } from './NavigationBackBehaviour';
2
+ /**
3
+ * @experimental This feature may be changed in the future without notice.
4
+ */
5
+ export type Navigation = {
6
+ back?: NavigationBackBehaviour;
7
+ /**
8
+ * @deprecated Please use 'back' instead
9
+ */
10
+ backButton?: NavigationBackBehaviour;
11
+ };
@@ -0,0 +1,8 @@
1
+ import type { Action } from './Action';
2
+ /**
3
+ * @experimental This feature may be changed in the future without notice.
4
+ */
5
+ export type NavigationBackBehaviour = {
6
+ title?: string;
7
+ action: Action;
8
+ };
@@ -0,0 +1,9 @@
1
+ import type { Schema } from '../schema/Schema';
2
+ import type { HttpMethod } from '../misc/HttpMethod';
3
+ export type PersistAsync = {
4
+ param: string;
5
+ idProperty: string;
6
+ schema: Schema;
7
+ url: string;
8
+ method: HttpMethod;
9
+ };
@@ -0,0 +1,7 @@
1
+ import type { PollingOnError } from './PollingOnError';
2
+ export type Polling = {
3
+ url: string;
4
+ interval: number;
5
+ maxAttempts: number;
6
+ onError: PollingOnError;
7
+ };
@@ -0,0 +1,4 @@
1
+ import type { Action } from './Action';
2
+ export type PollingOnError = {
3
+ action: Action;
4
+ };
@@ -0,0 +1,4 @@
1
+ export type StepError = {
2
+ error?: string;
3
+ validation?: unknown;
4
+ };
@@ -0,0 +1,3 @@
1
+ import type { SummaryProvider } from './SummaryProvider';
2
+ import type { SummarySummariser } from './SummarySummariser';
3
+ export type Summary = SummaryProvider | SummarySummariser;
@@ -0,0 +1,6 @@
1
+ export type SummaryProvider = {
2
+ providesTitle?: boolean;
3
+ providesDescription?: boolean;
4
+ providesIcon?: boolean;
5
+ providesImage?: boolean;
6
+ };
@@ -0,0 +1,12 @@
1
+ import type { Icon } from '../misc/Icon';
2
+ import type { ImageLayout } from '../layout/ImageLayout';
3
+ export type SummarySummariser = {
4
+ defaultTitle?: string;
5
+ defaultDescription?: string;
6
+ defaultIcon?: Icon;
7
+ defaultImage?: ImageLayout;
8
+ providesTitle?: boolean;
9
+ providesDescription?: boolean;
10
+ providesIcon?: boolean;
11
+ providesImage?: boolean;
12
+ };
@@ -0,0 +1,6 @@
1
+ import type { HttpMethod } from '../misc/HttpMethod';
2
+ export type ValidateAsync = {
3
+ param: string;
4
+ method: HttpMethod;
5
+ url: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ import type { Step } from './step/Step';
2
+ export type { Step };
@@ -0,0 +1,9 @@
1
+ import type { Context } from '../misc/Context';
2
+ import type { Size } from '../misc/Size';
3
+ export type AlertLayout = {
4
+ type: 'alert';
5
+ markdown: string;
6
+ context?: Context;
7
+ control?: string;
8
+ margin?: Size;
9
+ };
@@ -0,0 +1,10 @@
1
+ import type { Layout } from './Layout';
2
+ import type { Size } from '../misc/Size';
3
+ export type BoxLayout = {
4
+ type: 'box';
5
+ components: Layout[];
6
+ width?: Size;
7
+ border?: boolean;
8
+ control?: string;
9
+ margin?: Size;
10
+ };
@@ -0,0 +1,17 @@
1
+ import type { Size } from '../misc/Size';
2
+ import type { Action } from '../feature/Action';
3
+ import type { Context } from '../misc/Context';
4
+ export type ButtonLayout = {
5
+ type: 'button';
6
+ title: string;
7
+ action: Action;
8
+ context?: Context;
9
+ disabled?: boolean;
10
+ pinOrder?: number;
11
+ control?: string;
12
+ margin?: Size;
13
+ /**
14
+ * @deprecated This is a web only feature that will be removed in a later release
15
+ */
16
+ size?: Size;
17
+ };
@@ -0,0 +1,11 @@
1
+ import type { Layout } from './Layout';
2
+ import type { ColumnsLayoutBias } from './ColumnsLayoutBias';
3
+ import type { Size } from '../misc/Size';
4
+ export type ColumnsLayout = {
5
+ type: 'columns';
6
+ left: Layout[];
7
+ right: Layout[];
8
+ bias?: ColumnsLayoutBias;
9
+ control?: string;
10
+ margin?: Size;
11
+ };
@@ -0,0 +1 @@
1
+ export type ColumnsLayoutBias = 'none' | 'left' | 'right';
@@ -0,0 +1,8 @@
1
+ import type { DecisionLayoutOption } from './DecisionLayoutOption';
2
+ import type { Size } from '../misc/Size';
3
+ export type DecisionLayout = {
4
+ type: 'decision';
5
+ options: DecisionLayoutOption[];
6
+ control?: string;
7
+ margin?: Size;
8
+ };
@@ -0,0 +1,11 @@
1
+ import type { Action } from '../feature/Action';
2
+ import type { Icon } from '../misc/Icon';
3
+ import type { ImageLayout } from './ImageLayout';
4
+ export type DecisionLayoutOption = {
5
+ action: Action;
6
+ title: string;
7
+ description?: string;
8
+ disabled?: boolean;
9
+ icon?: Icon;
10
+ image?: ImageLayout;
11
+ };
@@ -0,0 +1,9 @@
1
+ import type { Size } from '../misc/Size';
2
+ /**
3
+ * @deprecated Divider is deprecated and only supported on web. Please do not use.
4
+ */
5
+ export type DividerLayout = {
6
+ type: 'divider';
7
+ control?: string;
8
+ margin?: Size;
9
+ };
@@ -0,0 +1,7 @@
1
+ import type { Size } from '../misc/Size';
2
+ export type FormLayout = {
3
+ type: 'form';
4
+ schemaId: string;
5
+ control?: string;
6
+ margin?: Size;
7
+ };
@@ -0,0 +1,10 @@
1
+ import type { Size } from '../misc/Size';
2
+ import type { Align } from '../misc/Align';
3
+ export type HeadingLayout = {
4
+ type: 'heading';
5
+ text: string;
6
+ size?: Size;
7
+ align?: Align;
8
+ control?: string;
9
+ margin?: Size;
10
+ };
@@ -0,0 +1,16 @@
1
+ import type { Size } from '../misc/Size';
2
+ export type ImageLayout = {
3
+ type: 'image';
4
+ url: string;
5
+ size?: Size;
6
+ control?: string;
7
+ margin?: Size;
8
+ /**
9
+ * @deprecated Please use 'accessibilityDescription' instead
10
+ */
11
+ text?: string;
12
+ /**
13
+ * @experimental This feature may be changed in the future without notice.
14
+ */
15
+ accessibilityDescription?: string;
16
+ };
@@ -0,0 +1,12 @@
1
+ import type { Align } from '../misc/Align';
2
+ import type { Size } from '../misc/Size';
3
+ /**
4
+ * @deprecated Please use 'MarkdownLayout' instead
5
+ */
6
+ export type InfoLayout = {
7
+ type: 'info';
8
+ markdown: string;
9
+ align?: Align;
10
+ control?: string;
11
+ margin?: Size;
12
+ };
@@ -0,0 +1,9 @@
1
+ import type { InstructionsLayoutItem } from './InstructionsLayoutItem';
2
+ import type { Size } from '../misc/Size';
3
+ export type InstructionsLayout = {
4
+ type: 'instructions';
5
+ title?: string;
6
+ items: InstructionsLayoutItem[];
7
+ control?: string;
8
+ margin?: Size;
9
+ };
@@ -0,0 +1,5 @@
1
+ import type { Context } from '../misc/Context';
2
+ export type InstructionsLayoutItem = {
3
+ text: string;
4
+ context: Context;
5
+ };
@@ -0,0 +1,20 @@
1
+ import type { AlertLayout } from './AlertLayout';
2
+ import type { BoxLayout } from './BoxLayout';
3
+ import type { ButtonLayout } from './ButtonLayout';
4
+ import type { ColumnsLayout } from './ColumnsLayout';
5
+ import type { DecisionLayout } from './DecisionLayout';
6
+ import type { DividerLayout } from './DividerLayout';
7
+ import type { FormLayout } from './FormLayout';
8
+ import type { HeadingLayout } from './HeadingLayout';
9
+ import type { ImageLayout } from './ImageLayout';
10
+ import type { InfoLayout } from './InfoLayout';
11
+ import type { InstructionsLayout } from './InstructionsLayout';
12
+ import type { ListLayout } from './ListLayout';
13
+ import type { LoadingIndicatorLayout } from './LoadingIndicatorLayout';
14
+ import type { MarkdownLayout } from './MarkdownLayout';
15
+ import type { ModalLayout } from './ModalLayout';
16
+ import type { ParagraphLayout } from './ParagraphLayout';
17
+ import type { ReviewLayout } from './ReviewLayout';
18
+ import type { SearchLayout } from './SearchLayout';
19
+ import type { StatusListLayout } from './StatusListLayout';
20
+ export type Layout = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | InstructionsLayout | ListLayout | LoadingIndicatorLayout | MarkdownLayout | ModalLayout | ParagraphLayout | ReviewLayout | SearchLayout | StatusListLayout;
@@ -0,0 +1,12 @@
1
+ import type { ListLayoutItem } from './ListLayoutItem';
2
+ import type { Size } from '../misc/Size';
3
+ /**
4
+ * @deprecated Please use 'StatusListLayout' instead
5
+ */
6
+ export type ListLayout = {
7
+ type: 'list';
8
+ items: ListLayoutItem[];
9
+ title?: string;
10
+ control?: string;
11
+ margin?: Size;
12
+ };
@@ -0,0 +1,11 @@
1
+ import type { Icon } from '../misc/Icon';
2
+ import type { ListLayoutStatus } from './ListLayoutStatus';
3
+ /**
4
+ * @deprecated Please use 'StatusListLayout' instead
5
+ */
6
+ export type ListLayoutItem = {
7
+ title: string;
8
+ description?: string;
9
+ icon: Icon;
10
+ status?: ListLayoutStatus;
11
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @deprecated Please use 'StatusListLayout' instead
3
+ */
4
+ export type ListLayoutStatus = 'warning' | 'neutral' | 'positive';
@@ -0,0 +1,7 @@
1
+ import type { Size } from '../misc/Size';
2
+ export type LoadingIndicatorLayout = {
3
+ type: 'loading-indicator';
4
+ size?: Size;
5
+ control?: string;
6
+ margin?: Size;
7
+ };
@@ -0,0 +1,9 @@
1
+ import type { Align } from '../misc/Align';
2
+ import type { Size } from '../misc/Size';
3
+ export type MarkdownLayout = {
4
+ type: 'markdown';
5
+ content: string;
6
+ align?: Align;
7
+ control?: string;
8
+ margin?: Size;
9
+ };
@@ -0,0 +1,13 @@
1
+ import type { Size } from '../misc/Size';
2
+ import type { ModalLayoutTrigger } from './ModalLayoutTrigger';
3
+ import type { ModalLayoutContent } from './ModalLayoutContent';
4
+ /**
5
+ * @experimental This feature may be changed in the future without notice.
6
+ */
7
+ export type ModalLayout = {
8
+ type: 'modal';
9
+ control?: string;
10
+ margin?: Size;
11
+ trigger: ModalLayoutTrigger;
12
+ content: ModalLayoutContent;
13
+ };
@@ -0,0 +1,4 @@
1
+ import type { Layout } from './Layout';
2
+ export type ModalLayoutContent = {
3
+ components: Layout[];
4
+ };
@@ -0,0 +1,3 @@
1
+ export type ModalLayoutTrigger = {
2
+ title: string;
3
+ };
@@ -0,0 +1,9 @@
1
+ import type { Align } from '../misc/Align';
2
+ import type { Size } from '../misc/Size';
3
+ export type ParagraphLayout = {
4
+ type: 'paragraph';
5
+ text: string;
6
+ align?: Align;
7
+ control?: string;
8
+ margin?: Size;
9
+ };
@@ -0,0 +1,20 @@
1
+ import type { Action } from '../feature/Action';
2
+ import type { ReviewLayoutField } from './ReviewLayoutField';
3
+ import type { ReviewLayoutCallToAction } from './ReviewLayoutCallToAction';
4
+ import type { Size } from '../misc/Size';
5
+ export type ReviewLayout = {
6
+ type: 'review';
7
+ fields: ReviewLayoutField[];
8
+ title?: string;
9
+ callToAction?: ReviewLayoutCallToAction;
10
+ control?: string;
11
+ margin?: Size;
12
+ /**
13
+ * @deprecated Please use 'control' instead
14
+ */
15
+ orientation?: string;
16
+ /**
17
+ * @deprecated Please use 'callToAction' instead
18
+ */
19
+ action?: Action;
20
+ };
@@ -0,0 +1,5 @@
1
+ import type { Action } from '../feature/Action';
2
+ export type ReviewLayoutCallToAction = {
3
+ title: string;
4
+ action: Action;
5
+ };
@@ -0,0 +1,6 @@
1
+ import type { Help } from '../feature/Help';
2
+ export type ReviewLayoutField = {
3
+ label: string;
4
+ value: string;
5
+ help?: Help;
6
+ };
@@ -0,0 +1,12 @@
1
+ import type { HttpMethod } from '../misc/HttpMethod';
2
+ import type { Size } from '../misc/Size';
3
+ export type SearchLayout = {
4
+ type: 'search';
5
+ title: string;
6
+ method: HttpMethod;
7
+ url: string;
8
+ param: string;
9
+ emptyMessage?: string;
10
+ control?: string;
11
+ margin?: Size;
12
+ };
@@ -0,0 +1,9 @@
1
+ import type { StatusListLayoutItem } from './StatusListLayoutItem';
2
+ import type { Size } from '../misc/Size';
3
+ export type StatusListLayout = {
4
+ type: 'status-list';
5
+ items: StatusListLayoutItem[];
6
+ title?: string;
7
+ control?: string;
8
+ margin?: Size;
9
+ };
@@ -0,0 +1,8 @@
1
+ import type { Icon } from '../misc/Icon';
2
+ import type { StatusListLayoutStatus } from './StatusListLayoutStatus';
3
+ export type StatusListLayoutItem = {
4
+ title: string;
5
+ description?: string;
6
+ icon: Icon;
7
+ status?: StatusListLayoutStatus;
8
+ };
@@ -0,0 +1 @@
1
+ export type StatusListLayoutStatus = 'not-done' | 'pending' | 'done';
@@ -0,0 +1 @@
1
+ export type Align = 'left' | 'center' | 'right';
@@ -0,0 +1 @@
1
+ export type AutocompleteToken = 'on' | 'name' | 'name-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'name-suffix' | 'nickname' | 'email' | 'username' | 'new-username' | 'new-password' | 'password' | 'one-time-code' | 'job-title' | 'organization-name' | 'full-street-address' | 'street-address-line-1' | 'street-address-line-2' | 'street-address-line-3' | 'address-level-1' | 'address-level-2' | 'address-level-3' | 'address-level-4' | 'country-code' | 'country-name' | 'postal-code' | 'credit-card-name' | 'credit-card-given-name' | 'credit-card-middle-name' | 'credit-card-family-name' | 'credit-card-number' | 'credit-card-expiration' | 'credit-card-expiration-month' | 'credit-card-expiration-year' | 'credit-card-security-code' | 'credit-card-type' | 'transaction-currency' | 'transaction-amount' | 'language' | 'birthdate' | 'birthdate-day' | 'birthdate-month' | 'birthdate-year' | 'gender' | 'phone-number' | 'phone-country-code' | 'phone-national' | 'phone-area-code' | 'phone-local' | 'phone-local-prefix' | 'phone-local-suffix' | 'phone-extension' | 'url' | 'photo' | 'impp' | 'shipping' | 'billing' | 'home' | 'work' | 'mobile' | 'fax' | 'pager';
@@ -0,0 +1 @@
1
+ export type Context = 'positive' | 'neutral' | 'warning' | 'negative' | 'success' | 'failure' | 'info' | 'primary';
@@ -0,0 +1 @@
1
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
@@ -0,0 +1,3 @@
1
+ import type { IconNamed } from './IconNamed';
2
+ import type { IconText } from './IconText';
3
+ export type Icon = IconNamed | IconText;
@@ -0,0 +1,3 @@
1
+ export type IconNamed = {
2
+ name: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ export type IconText = {
2
+ text: string;
3
+ };
@@ -0,0 +1 @@
1
+ export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -0,0 +1,4 @@
1
+ import type { Action } from '../../feature/Action';
2
+ export type ActionResponseBody = {
3
+ action: Action;
4
+ };
@@ -0,0 +1,9 @@
1
+ export type ErrorResponseBody = {
2
+ error?: string;
3
+ validation?: unknown;
4
+ refreshUrl?: string;
5
+ /**
6
+ * @deprecated Please use 'refreshUrl' instead
7
+ */
8
+ refreshFormUrl?: string;
9
+ };
@@ -0,0 +1,4 @@
1
+ import type { SearchResult } from './SearchResult';
2
+ export type SearchResponseBody = {
3
+ results: SearchResult[];
4
+ };
@@ -0,0 +1,3 @@
1
+ import type { SearchResultAction } from './SearchResultAction';
2
+ import type { SearchResultSearch } from './SearchResultSearch';
3
+ export type SearchResult = SearchResultAction | SearchResultSearch;
@@ -0,0 +1,11 @@
1
+ import type { Icon } from '../../misc/Icon';
2
+ import type { ImageLayout } from '../../layout/ImageLayout';
3
+ import type { Action } from '../../feature/Action';
4
+ export type SearchResultAction = {
5
+ type: 'action';
6
+ title: string;
7
+ description?: string;
8
+ icon?: Icon;
9
+ image?: ImageLayout;
10
+ value: Action;
11
+ };
@@ -0,0 +1,11 @@
1
+ import type { Icon } from '../../misc/Icon';
2
+ import type { ImageLayout } from '../../layout/ImageLayout';
3
+ import type { SearchSearchRequest } from './SearchSearchRequest';
4
+ export type SearchResultSearch = {
5
+ type: 'search';
6
+ title: string;
7
+ description?: string;
8
+ icon?: Icon;
9
+ image?: ImageLayout;
10
+ value: SearchSearchRequest;
11
+ };
@@ -0,0 +1,7 @@
1
+ import type { HttpMethod } from '../../misc/HttpMethod';
2
+ export type SearchSearchRequest = {
3
+ url: string;
4
+ method: HttpMethod;
5
+ param: string;
6
+ query: string;
7
+ };
@@ -0,0 +1,24 @@
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
+ export type AllOfSchema = {
7
+ disabled?: boolean;
8
+ allOf: Schema[];
9
+ $id?: string;
10
+ title?: string;
11
+ description?: string;
12
+ control?: string;
13
+ hidden?: boolean;
14
+ icon?: Icon;
15
+ image?: ImageLayout;
16
+ keywords?: string[];
17
+ summary?: SummaryProvider;
18
+ analyticsId?: string;
19
+ alert?: AlertLayout;
20
+ /**
21
+ * @deprecated Please use nested oneOf schemas instead.
22
+ */
23
+ promoted?: boolean;
24
+ };
@@ -0,0 +1,3 @@
1
+ import type { ArraySchemaList } from './ArraySchemaList';
2
+ import type { ArraySchemaTuple } from './ArraySchemaTuple';
3
+ export type ArraySchema = ArraySchemaList | ArraySchemaTuple;
@@ -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
+ };
@@ -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,4 +1,5 @@
1
1
  export type Image = {
2
+ type?: 'image';
2
3
  url: string;
3
4
  text?: string;
4
5
  name?: string;
@@ -22,6 +23,7 @@ export type Reference = {
22
23
  /** @deprecated Prefer Context */
23
24
  export type LegacyContext = 'success' | 'failure' | 'info' | 'primary';
24
25
  export type Alert = {
26
+ type?: 'alert';
25
27
  markdown: string;
26
28
  context?: Context | LegacyContext;
27
29
  margin?: Margin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-types",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Dynamic Flow TypeScript Types",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {