@wise/dynamic-flow-types 4.6.0 → 4.8.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.
@@ -1,6 +1,8 @@
1
+ import { Context } from './constants';
1
2
  export type CallToAction = {
2
3
  accessibilityDescription?: string;
3
4
  href?: string;
4
5
  title: string;
6
+ context?: Context;
5
7
  onClick: () => void;
6
8
  };
@@ -0,0 +1,10 @@
1
+ import { Align, Margin, Size } from './constants';
2
+ import { Media } from './Media';
3
+ import { BaseRendererProps } from './RendererProps';
4
+ export type MediaRendererProps = BaseRendererProps & {
5
+ type: 'media';
6
+ media: Media;
7
+ align: Align;
8
+ margin: Margin;
9
+ size: Size;
10
+ };
@@ -20,6 +20,7 @@ import type { IntegerInputRendererProps } from './IntegerInputRendererProps';
20
20
  import type { ListRendererProps } from './ListRendererProps';
21
21
  import type { LoadingIndicatorRendererProps } from './LoadingIndicatorRendererProps';
22
22
  import type { MarkdownRendererProps } from './MarkdownRendererProps';
23
+ import type { MediaRendererProps } from './MediaRendererProps';
23
24
  import type { ModalLayoutRendererProps } from './ModalLayoutRendererProps';
24
25
  import type { ModalRendererProps } from './ModalRendererProps';
25
26
  import type { MoneyInputRendererProps } from './MoneyInputRendererProps';
@@ -40,7 +41,8 @@ import { SubflowRendererProps } from './SubflowRendererProps';
40
41
  import { TabsRendererProps } from './TabsRendererProps';
41
42
  import type { TextInputRendererProps } from './TextInputRendererProps';
42
43
  import type { UploadInputRendererProps } from './UploadInputRendererProps';
43
- export type RendererProps = AlertRendererProps | CheckboxInputRendererProps | BoxRendererProps | ButtonRendererProps | ColumnsRendererProps | CoreContainerRendererProps | DateInputRendererProps | DecisionRendererProps | DividerRendererProps | ExternalConfirmationRendererProps | FormattedValueRendererProps | FormRendererProps | HeadingRendererProps | HiddenRendererProps | ImageRendererProps | InstructionsRendererProps | IntegerInputRendererProps | ListRendererProps | LoadingIndicatorRendererProps | MarkdownRendererProps | ModalLayoutRendererProps | ModalRendererProps | MoneyInputRendererProps | MultiSelectInputRendererProps | MultiUploadInputRendererProps | NumberInputRendererProps | ParagraphRendererProps | ProgressRendererProps | RepeatableRendererProps | ReviewRendererProps | RootRendererProps | SearchRendererProps | FormSectionRendererProps | SelectInputRendererProps | SectionRendererProps | StatusListRendererProps | StepRendererProps | SubflowRendererProps | TabsRendererProps | TextInputRendererProps | UploadInputRendererProps;
44
+ import type { UpsellRendererProps } from './UpsellRendererProps';
45
+ export type RendererProps = AlertRendererProps | CheckboxInputRendererProps | BoxRendererProps | ButtonRendererProps | ColumnsRendererProps | CoreContainerRendererProps | DateInputRendererProps | DecisionRendererProps | DividerRendererProps | ExternalConfirmationRendererProps | FormattedValueRendererProps | FormRendererProps | HeadingRendererProps | HiddenRendererProps | ImageRendererProps | InstructionsRendererProps | IntegerInputRendererProps | ListRendererProps | LoadingIndicatorRendererProps | MarkdownRendererProps | MediaRendererProps | ModalLayoutRendererProps | ModalRendererProps | MoneyInputRendererProps | MultiSelectInputRendererProps | MultiUploadInputRendererProps | NumberInputRendererProps | ParagraphRendererProps | ProgressRendererProps | RepeatableRendererProps | ReviewRendererProps | RootRendererProps | SearchRendererProps | FormSectionRendererProps | SelectInputRendererProps | SectionRendererProps | StatusListRendererProps | StepRendererProps | SubflowRendererProps | TabsRendererProps | TextInputRendererProps | UploadInputRendererProps | UpsellRendererProps;
44
46
  export type Renderer<P extends RendererProps> = {
45
47
  canRenderType: P['type'];
46
48
  canRender?: (props: P) => boolean;
@@ -50,7 +52,7 @@ export type RendererContext = {
50
52
  render: RenderFunction;
51
53
  };
52
54
  export type RenderFunction = (props: RendererProps | null) => JSX.Element | null;
53
- export type Renderers = readonly (Renderer<StepRendererProps> | Renderer<CoreContainerRendererProps> | Renderer<AlertRendererProps> | Renderer<BoxRendererProps> | Renderer<ColumnsRendererProps> | Renderer<DecisionRendererProps> | Renderer<DividerRendererProps> | Renderer<ExternalConfirmationRendererProps> | Renderer<FormattedValueRendererProps> | Renderer<FormRendererProps> | Renderer<HeadingRendererProps> | Renderer<InstructionsRendererProps> | Renderer<ListRendererProps> | Renderer<LoadingIndicatorRendererProps> | Renderer<MarkdownRendererProps> | Renderer<ImageRendererProps> | Renderer<ModalLayoutRendererProps> | Renderer<ModalRendererProps> | Renderer<ParagraphRendererProps> | Renderer<ProgressRendererProps> | Renderer<ReviewRendererProps> | Renderer<SearchRendererProps> | Renderer<StatusListRendererProps> | Renderer<CheckboxInputRendererProps> | Renderer<ButtonRendererProps> | Renderer<DateInputRendererProps> | Renderer<HiddenRendererProps> | Renderer<IntegerInputRendererProps> | Renderer<MoneyInputRendererProps> | Renderer<NumberInputRendererProps> | Renderer<RepeatableRendererProps> | Renderer<RootRendererProps> | Renderer<FormSectionRendererProps> | Renderer<SelectInputRendererProps> | Renderer<SectionRendererProps> | Renderer<SubflowRendererProps> | Renderer<MultiSelectInputRendererProps> | Renderer<TabsRendererProps> | Renderer<TextInputRendererProps> | Renderer<UploadInputRendererProps> | Renderer<MultiUploadInputRendererProps>)[];
55
+ export type Renderers = readonly (Renderer<StepRendererProps> | Renderer<CoreContainerRendererProps> | Renderer<AlertRendererProps> | Renderer<BoxRendererProps> | Renderer<ColumnsRendererProps> | Renderer<DecisionRendererProps> | Renderer<DividerRendererProps> | Renderer<ExternalConfirmationRendererProps> | Renderer<FormattedValueRendererProps> | Renderer<FormRendererProps> | Renderer<HeadingRendererProps> | Renderer<InstructionsRendererProps> | Renderer<ListRendererProps> | Renderer<LoadingIndicatorRendererProps> | Renderer<MarkdownRendererProps> | Renderer<ImageRendererProps> | Renderer<MediaRendererProps> | Renderer<ModalLayoutRendererProps> | Renderer<ModalRendererProps> | Renderer<ParagraphRendererProps> | Renderer<ProgressRendererProps> | Renderer<ReviewRendererProps> | Renderer<SearchRendererProps> | Renderer<StatusListRendererProps> | Renderer<CheckboxInputRendererProps> | Renderer<ButtonRendererProps> | Renderer<DateInputRendererProps> | Renderer<HiddenRendererProps> | Renderer<IntegerInputRendererProps> | Renderer<MoneyInputRendererProps> | Renderer<NumberInputRendererProps> | Renderer<RepeatableRendererProps> | Renderer<RootRendererProps> | Renderer<FormSectionRendererProps> | Renderer<SelectInputRendererProps> | Renderer<SectionRendererProps> | Renderer<SubflowRendererProps> | Renderer<MultiSelectInputRendererProps> | Renderer<TabsRendererProps> | Renderer<TextInputRendererProps> | Renderer<UploadInputRendererProps> | Renderer<MultiUploadInputRendererProps> | Renderer<UpsellRendererProps>)[];
54
56
  export type BaseRendererProps = {
55
57
  uid: string;
56
58
  analyticsId?: string;
@@ -6,6 +6,7 @@ import { BaseRendererProps } from './RendererProps';
6
6
  export type SearchRendererProps = BaseRendererProps & {
7
7
  type: 'search';
8
8
  id: string;
9
+ hint?: string;
9
10
  isLoading: boolean;
10
11
  margin: Margin;
11
12
  query: string;
@@ -0,0 +1,13 @@
1
+ import { CallToAction } from './CallToAction';
2
+ import { Context, Margin } from './constants';
3
+ import { Media } from './Media';
4
+ import { BaseRendererProps } from './RendererProps';
5
+ export type UpsellRendererProps = BaseRendererProps & {
6
+ type: 'upsell';
7
+ text: string;
8
+ callToAction: CallToAction;
9
+ media?: Media;
10
+ context: Context;
11
+ margin: Margin;
12
+ onDismiss?: () => void;
13
+ };
@@ -19,6 +19,7 @@ export type { IntegerInputRendererProps } from './IntegerInputRendererProps';
19
19
  export type { ListRendererProps } from './ListRendererProps';
20
20
  export type { LoadingIndicatorRendererProps } from './LoadingIndicatorRendererProps';
21
21
  export type { MarkdownRendererProps } from './MarkdownRendererProps';
22
+ export type { MediaRendererProps } from './MediaRendererProps';
22
23
  export type { ModalLayoutRendererProps } from './ModalLayoutRendererProps';
23
24
  export type { ModalRendererProps } from './ModalRendererProps';
24
25
  export type { MoneyInputRendererProps } from './MoneyInputRendererProps';
@@ -38,6 +39,7 @@ export type { AnalyticsEventDispatcher, LoadingState, StepRendererProps, } from
38
39
  export type { Tab, TabsRendererProps } from './TabsRendererProps';
39
40
  export type { TextInputRendererProps } from './TextInputRendererProps';
40
41
  export type { UploadInputRendererProps } from './UploadInputRendererProps';
42
+ export type { UpsellRendererProps } from './UpsellRendererProps';
41
43
  export type { ValidationResult } from './BaseInputRendererProps';
42
44
  export type { SubflowRendererProps } from './SubflowRendererProps';
43
45
  export type { Align, Context, Margin, Size } from './constants';
@@ -26,7 +26,8 @@ export type SubflowBehavior = {
26
26
  */
27
27
  onCompletion?: Behavior;
28
28
  /**
29
- * The behavior performed when the subflow fails
29
+ * The behavior performed when the subflow fails. If not provided, the
30
+ * parent flow will be ended and its onError will be called.
30
31
  */
31
32
  onError?: Behavior;
32
33
  };
@@ -51,6 +51,7 @@ export type { ListLayoutItem } from './layout/ListLayoutItem';
51
51
  export type { ListLayoutStatus } from './layout/ListLayoutStatus';
52
52
  export type { LoadingIndicatorLayout } from './layout/LoadingIndicatorLayout';
53
53
  export type { MarkdownLayout } from './layout/MarkdownLayout';
54
+ export type { MediaLayout } from './layout/MediaLayout';
54
55
  export type { ModalLayout } from './layout/ModalLayout';
55
56
  export type { ModalLayoutContent } from './layout/ModalLayoutContent';
56
57
  export type { ModalLayoutTrigger } from './layout/ModalLayoutTrigger';
@@ -67,6 +68,8 @@ export type { StatusListLayoutItem } from './layout/StatusListLayoutItem';
67
68
  export type { StatusListLayoutStatus } from './layout/StatusListLayoutStatus';
68
69
  export type { TabsLayout } from './layout/TabsLayout';
69
70
  export type { TabsLayoutTab } from './layout/TabsLayoutTab';
71
+ export type { UpsellLayout } from './layout/UpsellLayout';
72
+ export type { UpsellLayoutCallToAction } from './layout/UpsellLayoutCallToAction';
70
73
  export type FormLayout = GeneratedFormLayout & {
71
74
  schema?: Reference;
72
75
  };
@@ -1,4 +1,5 @@
1
1
  import type { Behavior } from '../feature/Behavior';
2
+ import type { Context } from '../misc/Context';
2
3
  /**
3
4
  * The call to action configuration to be used by the Alert.
4
5
  */
@@ -15,4 +16,8 @@ export type AlertLayoutCallToAction = {
15
16
  * Behavior that should be performed when user interacts with call to action.
16
17
  */
17
18
  behavior: Behavior;
19
+ /**
20
+ * The semantics of the call-to-action button. Defaults to neutral.
21
+ */
22
+ context?: Context;
18
23
  };
@@ -1,4 +1,5 @@
1
1
  import type { Behavior } from '../feature/Behavior';
2
+ import type { Context } from '../misc/Context';
2
3
  /**
3
4
  * The call to action configuration to be used by the status list item.
4
5
  */
@@ -15,4 +16,8 @@ export type ItemCallToAction = {
15
16
  * Behavior that should be performed when user interacts with call to action.
16
17
  */
17
18
  behavior: Behavior;
19
+ /**
20
+ * The semantics of the call-to-action button. Defaults to neutral.
21
+ */
22
+ context?: Context;
18
23
  };
@@ -12,6 +12,7 @@ import type { InstructionsLayout } from './InstructionsLayout';
12
12
  import type { ListLayout } from './ListLayout';
13
13
  import type { LoadingIndicatorLayout } from './LoadingIndicatorLayout';
14
14
  import type { MarkdownLayout } from './MarkdownLayout';
15
+ import type { MediaLayout } from './MediaLayout';
15
16
  import type { ModalLayout } from './ModalLayout';
16
17
  import type { ParagraphLayout } from './ParagraphLayout';
17
18
  import type { ProgressLayout } from './ProgressLayout';
@@ -20,7 +21,8 @@ import type { SearchLayout } from './SearchLayout';
20
21
  import type { SectionLayout } from './SectionLayout';
21
22
  import type { StatusListLayout } from './StatusListLayout';
22
23
  import type { TabsLayout } from './TabsLayout';
24
+ import type { UpsellLayout } from './UpsellLayout';
23
25
  /**
24
26
  * Layouts allow you to display information to the user and customise how a step is structured.
25
27
  */
26
- export type Layout = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | InstructionsLayout | ListLayout | LoadingIndicatorLayout | MarkdownLayout | ModalLayout | ParagraphLayout | ProgressLayout | ReviewLayout | SearchLayout | SectionLayout | StatusListLayout | TabsLayout;
28
+ export type Layout = AlertLayout | BoxLayout | ButtonLayout | ColumnsLayout | DecisionLayout | DividerLayout | FormLayout | HeadingLayout | ImageLayout | InfoLayout | InstructionsLayout | ListLayout | LoadingIndicatorLayout | MarkdownLayout | MediaLayout | ModalLayout | ParagraphLayout | ProgressLayout | ReviewLayout | SearchLayout | SectionLayout | StatusListLayout | TabsLayout | UpsellLayout;
@@ -1,4 +1,5 @@
1
1
  import type { Behavior } from '../feature/Behavior';
2
+ import type { Context } from '../misc/Context';
2
3
  /**
3
4
  * The call to action configuration used by [com.wise.dynamicflow.layout.ListLayout]. For example, it could be used to provide an edit action.
4
5
  */
@@ -15,4 +16,8 @@ export type ListLayoutCallToAction = {
15
16
  * Behavior that should be performed when user interacts with call to action.
16
17
  */
17
18
  behavior: Behavior;
19
+ /**
20
+ * The semantics of the call-to-action button. Defaults to neutral.
21
+ */
22
+ context?: Context;
18
23
  };
@@ -0,0 +1,43 @@
1
+ import type { Media } from '../misc/media/Media';
2
+ import type { Align } from '../misc/Align';
3
+ import type { Size } from '../misc/Size';
4
+ /**
5
+ * Contains a [Media] which is added to the Layout.
6
+ */
7
+ export type MediaLayout = {
8
+ /**
9
+ * It must be `media`.
10
+ */
11
+ type: 'media';
12
+ /**
13
+ * The media to display
14
+ */
15
+ media: Media;
16
+ /**
17
+ * Controls how the media should be aligned with its container. Defaults to `center`
18
+ */
19
+ align?: Align;
20
+ /**
21
+ * The horizontal size of the media. Defaults to `md`.
22
+ * The media is scaled down to fit the provided size while preserving the aspect ratio, and
23
+ * it is never stretched beyond its pixel size.
24
+ * When a [Media.Image] is provided, an `xl` size will allow it to fill as much space as it can.
25
+ */
26
+ size?: Size;
27
+ /**
28
+ * An optional identifier to be used in analytics tracking.
29
+ */
30
+ analyticsId?: string;
31
+ /**
32
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
33
+ */
34
+ control?: string;
35
+ /**
36
+ * The vertical margin to apply after this component. Defaults to `md`.
37
+ */
38
+ margin?: Size;
39
+ /**
40
+ * An optional list of identifiers used to configure renderers.
41
+ */
42
+ tags?: string[];
43
+ };
@@ -1,5 +1,6 @@
1
1
  import type { Action } from '../feature/Action';
2
2
  import type { Behavior } from '../feature/Behavior';
3
+ import type { Context } from '../misc/Context';
3
4
  /**
4
5
  * Adds an [com.wise.dynamicflow.feature.Action] to the review layout. For example, it could be used to provide an edit action.
5
6
  */
@@ -21,4 +22,8 @@ export type ReviewLayoutCallToAction = {
21
22
  * The [com.wise.dynamicflow.feature.Behavior] that should be performed when user interacts with call to action.
22
23
  */
23
24
  behavior?: Behavior;
25
+ /**
26
+ * The semantics of the call-to-action button. Defaults to neutral.
27
+ */
28
+ context?: Context;
24
29
  };
@@ -46,4 +46,8 @@ export type SearchLayout = {
46
46
  * An optional list of identifiers used to configure renderers.
47
47
  */
48
48
  tags?: string[];
49
+ /**
50
+ * A suggestion to the user on how they can search, or what terms are searchable.
51
+ */
52
+ hint?: string;
49
53
  };
@@ -1,4 +1,5 @@
1
1
  import type { Behavior } from '../feature/Behavior';
2
+ import type { Context } from '../misc/Context';
2
3
  /**
3
4
  * The call to action configuration used by [com.wise.dynamicflow.layout.SectionLayout].
4
5
  */
@@ -15,4 +16,8 @@ export type SectionLayoutCallToAction = {
15
16
  * Behavior that should be performed when user interacts with call to action.
16
17
  */
17
18
  behavior: Behavior;
19
+ /**
20
+ * The semantics of the call-to-action button. Defaults to neutral.
21
+ */
22
+ context?: Context;
18
23
  };
@@ -0,0 +1,51 @@
1
+ import type { UpsellLayoutCallToAction } from './UpsellLayoutCallToAction';
2
+ import type { Media } from '../misc/media/Media';
3
+ import type { Request } from '../misc/Request';
4
+ import type { Context } from '../misc/Context';
5
+ import type { Size } from '../misc/Size';
6
+ /**
7
+ * A component used to encourage the user to perform an action whilst showing an attention-grabbing message.
8
+ */
9
+ export type UpsellLayout = {
10
+ /**
11
+ * It must be `upsell`.
12
+ */
13
+ type: 'upsell';
14
+ /**
15
+ * The main text of the upsell
16
+ */
17
+ text: string;
18
+ /**
19
+ * A titled call to action which can be performed by the user.
20
+ */
21
+ callToAction: UpsellLayoutCallToAction;
22
+ /**
23
+ * A media object (avatar, icon, image) which the client can use to represent this button.
24
+ */
25
+ media?: Media;
26
+ /**
27
+ * The request sent when the upsell is dismissed. After the request is sent, clients do not collect the response.
28
+ * This request notifies the backend that the user has closed the upsell
29
+ */
30
+ onDismiss?: Request;
31
+ /**
32
+ * The semantics of the upsell
33
+ */
34
+ context?: Context;
35
+ /**
36
+ * Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
37
+ */
38
+ control?: string;
39
+ /**
40
+ * The vertical margin to apply after this component. Defaults to `md`.
41
+ */
42
+ margin?: Size;
43
+ /**
44
+ * An optional identifier to be used in analytics tracking.
45
+ */
46
+ analyticsId?: string;
47
+ /**
48
+ * An optional list of identifiers used to configure renderers.
49
+ */
50
+ tags?: string[];
51
+ };
@@ -0,0 +1,23 @@
1
+ import type { Behavior } from '../feature/Behavior';
2
+ import type { Context } from '../misc/Context';
3
+ /**
4
+ * The call to action configuration to be used by the Upsell.
5
+ */
6
+ export type UpsellLayoutCallToAction = {
7
+ /**
8
+ * A user-facing title.
9
+ */
10
+ title: string;
11
+ /**
12
+ * A description of the call to action to be used by screen readers.
13
+ */
14
+ accessibilityDescription?: string;
15
+ /**
16
+ * Behavior that should be performed when user interacts with call to action.
17
+ */
18
+ behavior: Behavior;
19
+ /**
20
+ * The semantics of the call-to-action button. Defaults to neutral.
21
+ */
22
+ context?: Context;
23
+ };
@@ -184,6 +184,7 @@ var loadingIndicatorLayoutSchema = import_zod.z.object({
184
184
  analyticsId: import_zod.z.string().optional(),
185
185
  tags: import_zod.z.array(import_zod.z.string()).optional()
186
186
  });
187
+ var mediaSchema = import_zod.z.union([mediaAvatarSchema, mediaImageSchema]);
187
188
  var paragraphLayoutSchema = import_zod.z.object({
188
189
  type: import_zod.z.literal("paragraph"),
189
190
  text: import_zod.z.string(),
@@ -206,6 +207,12 @@ var listLayoutStatusSchema = import_zod.z.union([
206
207
  import_zod.z.literal("neutral"),
207
208
  import_zod.z.literal("positive")
208
209
  ]);
210
+ var requestSchema = import_zod.z.object({
211
+ url: import_zod.z.string(),
212
+ method: httpMethodSchema,
213
+ body: jsonElementSchema.optional(),
214
+ prefetch: import_zod.z.boolean().optional()
215
+ });
209
216
  var formLayoutSchemaReferenceSchema = import_zod.z.object({
210
217
  $ref: import_zod.z.string()
211
218
  });
@@ -250,7 +257,8 @@ var searchLayoutSchema = import_zod.z.object({
250
257
  control: import_zod.z.string().optional(),
251
258
  margin: sizeSchema.optional(),
252
259
  analyticsId: import_zod.z.string().optional(),
253
- tags: import_zod.z.array(import_zod.z.string()).optional()
260
+ tags: import_zod.z.array(import_zod.z.string()).optional(),
261
+ hint: import_zod.z.string().optional()
254
262
  });
255
263
  var infoLayoutSchema = import_zod.z.object({
256
264
  type: import_zod.z.literal("info"),
@@ -299,6 +307,16 @@ var markdownLayoutSchema = import_zod.z.object({
299
307
  tags: import_zod.z.array(import_zod.z.string()).optional(),
300
308
  size: sizeSchema.optional()
301
309
  });
310
+ var mediaLayoutSchema = import_zod.z.object({
311
+ type: import_zod.z.literal("media"),
312
+ media: mediaSchema,
313
+ align: alignSchema.optional(),
314
+ size: sizeSchema.optional(),
315
+ analyticsId: import_zod.z.string().optional(),
316
+ control: import_zod.z.string().optional(),
317
+ margin: sizeSchema.optional(),
318
+ tags: import_zod.z.array(import_zod.z.string()).optional()
319
+ });
302
320
  var progressLayoutSchema = import_zod.z.object({
303
321
  type: import_zod.z.literal("progress"),
304
322
  title: import_zod.z.string().optional(),
@@ -317,7 +335,6 @@ var columnsLayoutBiasSchema = import_zod.z.union([
317
335
  import_zod.z.literal("left"),
318
336
  import_zod.z.literal("right")
319
337
  ]);
320
- var mediaSchema = import_zod.z.union([mediaAvatarSchema, mediaImageSchema]);
321
338
  var searchSearchRequestSchema = import_zod.z.object({
322
339
  url: import_zod.z.string(),
323
340
  method: httpMethodSchema,
@@ -427,12 +444,6 @@ var actionSchema = import_zod.z.object({
427
444
  prefetch: import_zod.z.boolean().optional()
428
445
  });
429
446
  var summarySchema = import_zod.z.union([summaryProviderSchema, summarySummariserSchema]);
430
- var requestSchema = import_zod.z.object({
431
- url: import_zod.z.string(),
432
- method: httpMethodSchema,
433
- body: jsonElementSchema.optional(),
434
- prefetch: import_zod.z.boolean().optional()
435
- });
436
447
  var modalPresentationSchema = import_zod.z.object({
437
448
  type: import_zod.z.literal("modal")
438
449
  });
@@ -516,7 +527,8 @@ var reviewLayoutCallToActionSchema = import_zod.z.lazy(
516
527
  action: actionSchema.optional(),
517
528
  title: import_zod.z.string(),
518
529
  accessibilityDescription: import_zod.z.string().optional(),
519
- behavior: behaviorSchema.optional()
530
+ behavior: behaviorSchema.optional(),
531
+ context: contextSchema.optional()
520
532
  })
521
533
  );
522
534
  var tabsLayoutSchema = import_zod.z.lazy(
@@ -554,7 +566,8 @@ var alertLayoutCallToActionSchema = import_zod.z.lazy(
554
566
  () => import_zod.z.object({
555
567
  title: import_zod.z.string(),
556
568
  accessibilityDescription: import_zod.z.string().optional(),
557
- behavior: behaviorSchema
569
+ behavior: behaviorSchema,
570
+ context: contextSchema.optional()
558
571
  })
559
572
  );
560
573
  var listLayoutSchema = import_zod.z.lazy(
@@ -573,7 +586,8 @@ var listLayoutCallToActionSchema = import_zod.z.lazy(
573
586
  () => import_zod.z.object({
574
587
  title: import_zod.z.string(),
575
588
  accessibilityDescription: import_zod.z.string().optional(),
576
- behavior: behaviorSchema
589
+ behavior: behaviorSchema,
590
+ context: contextSchema.optional()
577
591
  })
578
592
  );
579
593
  var listLayoutItemSchema = import_zod.z.lazy(
@@ -596,6 +610,28 @@ var listLayoutItemSchema = import_zod.z.lazy(
596
610
  callToAction: listLayoutCallToActionSchema.optional()
597
611
  })
598
612
  );
613
+ var upsellLayoutCallToActionSchema = import_zod.z.lazy(
614
+ () => import_zod.z.object({
615
+ title: import_zod.z.string(),
616
+ accessibilityDescription: import_zod.z.string().optional(),
617
+ behavior: behaviorSchema,
618
+ context: contextSchema.optional()
619
+ })
620
+ );
621
+ var upsellLayoutSchema = import_zod.z.lazy(
622
+ () => import_zod.z.object({
623
+ type: import_zod.z.literal("upsell"),
624
+ text: import_zod.z.string(),
625
+ callToAction: upsellLayoutCallToActionSchema,
626
+ media: mediaSchema.optional(),
627
+ onDismiss: requestSchema.optional(),
628
+ context: contextSchema.optional(),
629
+ control: import_zod.z.string().optional(),
630
+ margin: sizeSchema.optional(),
631
+ analyticsId: import_zod.z.string().optional(),
632
+ tags: import_zod.z.array(import_zod.z.string()).optional()
633
+ })
634
+ );
599
635
  var decisionLayoutSchema = import_zod.z.lazy(
600
636
  () => import_zod.z.object({
601
637
  type: import_zod.z.literal("decision"),
@@ -630,7 +666,8 @@ var sectionLayoutCallToActionSchema = import_zod.z.lazy(
630
666
  () => import_zod.z.object({
631
667
  title: import_zod.z.string(),
632
668
  accessibilityDescription: import_zod.z.string().optional(),
633
- behavior: behaviorSchema
669
+ behavior: behaviorSchema,
670
+ context: contextSchema.optional()
634
671
  })
635
672
  );
636
673
  var statusListLayoutSchema = import_zod.z.lazy(
@@ -684,6 +721,7 @@ var layoutSchema = import_zod.z.lazy(
684
721
  listLayoutSchema,
685
722
  loadingIndicatorLayoutSchema,
686
723
  markdownLayoutSchema,
724
+ mediaLayoutSchema,
687
725
  modalLayoutSchema,
688
726
  paragraphLayoutSchema,
689
727
  progressLayoutSchema,
@@ -691,14 +729,16 @@ var layoutSchema = import_zod.z.lazy(
691
729
  searchLayoutSchema,
692
730
  sectionLayoutSchema,
693
731
  statusListLayoutSchema,
694
- tabsLayoutSchema
732
+ tabsLayoutSchema,
733
+ upsellLayoutSchema
695
734
  ])
696
735
  );
697
736
  var itemCallToActionSchema = import_zod.z.lazy(
698
737
  () => import_zod.z.object({
699
738
  title: import_zod.z.string(),
700
739
  accessibilityDescription: import_zod.z.string().optional(),
701
- behavior: behaviorSchema
740
+ behavior: behaviorSchema,
741
+ context: contextSchema.optional()
702
742
  })
703
743
  );
704
744
  var boxLayoutSchema = import_zod.z.lazy(
@@ -827,7 +867,8 @@ var stepSchema = import_zod.z.lazy(
827
867
  control: import_zod.z.string().optional(),
828
868
  refreshAfter: import_zod.z.string().optional(),
829
869
  toolbar: toolbarSchema.optional(),
830
- tags: import_zod.z.array(import_zod.z.string()).optional()
870
+ tags: import_zod.z.array(import_zod.z.string()).optional(),
871
+ footer: import_zod.z.array(layoutSchema).optional()
831
872
  })
832
873
  );
833
874
  var schemaSchema = import_zod.z.lazy(