@wise/dynamic-flow-types 2.18.0 → 2.18.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.
@@ -6,7 +6,7 @@ import type { JsonElement } from '../JsonElement';
6
6
  * An action typically defines its URL and HTTP method to submit step data, and can optionally indicate that on success
7
7
  * this action will end the flow.
8
8
  * An endpoint can respond to a submitting action with an error status code and the standard error response format in order to display errors to the user.
9
- * ### Behaviour
9
+ * ### Behavior
10
10
  * #### Non-Exiting Actions
11
11
  * If an action does not specify the `exit` property as true, it is expected that the action will submit the step payload.
12
12
  * For example, the following action is a non-exiting action.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * External specifies a URL to be opened automatically when a step loads. Url-opening behaviour depends on the platform.
2
+ * External specifies a URL to be opened automatically when a step loads. Url-opening behavior depends on the platform.
3
3
  * General guidance is as follows:
4
4
  * Web:
5
5
  * - Open a URL in a new browser tab.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Describes the behaviour of the navigation stack when the step is presented.
2
+ * Describes the behavior of the navigation stack when the step is presented.
3
3
  * @experimental This feature may be changed in the future without notice.
4
4
  */
5
5
  export type NavigationStackBehavior = 'default' | 'remove-previous' | 'remove-all' | 'replace-current';
@@ -10,7 +10,7 @@ import type { Navigation } from '../feature/Navigation';
10
10
  /**
11
11
  * A step represents a single screen in a flow. It is made up of schemas, which represent data to be collected from the
12
12
  * user, layouts which describe how the screen looks, and a number of advanced features to provide more complex
13
- * behaviours.
13
+ * behaviors.
14
14
  * ### Step Response
15
15
  * A response is determined to be a Step when the status code is in the 200-299 range, the `exit` property in the triggering action was not set to `true`, and the `X-DF-Response-Type: step` header is provided.
16
16
  */
@@ -40,10 +40,6 @@ export type Step = {
40
40
  */
41
41
  title: string;
42
42
  /**
43
- * A user-facing subtitle.
44
- */
45
- description?: string;
46
- /**
47
43
  * An array of schemas describing the data for the user to input. Each root schemas which should be displayed to the
48
44
  * user must be referenced by a [com.wise.dynamicflow.layout.FormLayout] in the `layout` property. If a schema is
49
45
  * not referenced by a [com.wise.dynamicflow.layout.FormLayout], it won't be displayed, but it will still be submitted.
@@ -56,6 +52,10 @@ export type Step = {
56
52
  */
57
53
  layout: Layout[];
58
54
  /**
55
+ * A user-facing subtitle.
56
+ */
57
+ description?: string;
58
+ /**
59
59
  * The data to use when initialising the step. It must follow the structure the schemas array describes, and any
60
60
  * data which doesn't correspond to the schema is ignored.
61
61
  */
@@ -65,7 +65,7 @@ export type Step = {
65
65
  */
66
66
  external?: External;
67
67
  /**
68
- * Used to configure a polling behaviour, allowing the flow to progress automatically.
68
+ * Used to configure a polling behavior, allowing the flow to progress automatically.
69
69
  */
70
70
  polling?: Polling;
71
71
  /**
@@ -82,7 +82,7 @@ export type Step = {
82
82
  */
83
83
  errors?: StepError;
84
84
  /**
85
- * Used to configure navigational behaviour of the step, for example to provide an
85
+ * Used to configure navigational behavior of the step, for example to provide an
86
86
  * [com.wise.dynamicflow.feature.Action] to perform when navigating back.
87
87
  */
88
88
  navigation?: Navigation;
@@ -916,9 +916,9 @@ export const stepSchema: z.ZodSchema<Step> = z.lazy(() =>
916
916
  refreshFormUrl: z.string().optional(),
917
917
  id: z.string(),
918
918
  title: z.string(),
919
- description: z.string().optional(),
920
919
  schemas: z.array(schemaSchema),
921
920
  layout: z.array(layoutSchema),
921
+ description: z.string().optional(),
922
922
  model: jsonElementSchema.optional(),
923
923
  external: externalSchema.optional(),
924
924
  polling: pollingSchema.optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-types",
3
- "version": "2.18.0",
3
+ "version": "2.18.1",
4
4
  "description": "Dynamic Flow TypeScript Types",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {