@wise/dynamic-flow-types 4.17.2 → 4.18.0-experimental-2dcb025

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 (35) hide show
  1. package/build/renderers/CollectionRendererProps.d.ts +69 -0
  2. package/build/renderers/CollectionRendererProps.d.ts.map +1 -0
  3. package/build/renderers/RendererProps.d.ts +3 -2
  4. package/build/renderers/RendererProps.d.ts.map +1 -1
  5. package/build/renderers/index.d.ts +1 -0
  6. package/build/renderers/index.d.ts.map +1 -1
  7. package/build/spec/index.d.ts +7 -0
  8. package/build/spec/index.d.ts.map +1 -1
  9. package/build/spec/layout/CollectionLayout.d.ts +57 -0
  10. package/build/spec/layout/CollectionLayout.d.ts.map +1 -0
  11. package/build/spec/layout/CollectionLayoutCallToAction.d.ts +19 -0
  12. package/build/spec/layout/CollectionLayoutCallToAction.d.ts.map +1 -0
  13. package/build/spec/layout/CollectionLayoutFilter.d.ts +6 -0
  14. package/build/spec/layout/CollectionLayoutFilter.d.ts.map +1 -0
  15. package/build/spec/layout/CollectionLayoutItem.d.ts +56 -0
  16. package/build/spec/layout/CollectionLayoutItem.d.ts.map +1 -0
  17. package/build/spec/layout/CollectionLayoutSearch.d.ts +18 -0
  18. package/build/spec/layout/CollectionLayoutSearch.d.ts.map +1 -0
  19. package/build/spec/layout/CollectionLayoutSection.d.ts +24 -0
  20. package/build/spec/layout/CollectionLayoutSection.d.ts.map +1 -0
  21. package/build/spec/layout/CollectionLayoutSelectFilter.d.ts +24 -0
  22. package/build/spec/layout/CollectionLayoutSelectFilter.d.ts.map +1 -0
  23. package/build/spec/layout/CollectionLayoutState.d.ts +30 -0
  24. package/build/spec/layout/CollectionLayoutState.d.ts.map +1 -0
  25. package/build/spec/layout/Layout.d.ts +4 -3
  26. package/build/spec/layout/Layout.d.ts.map +1 -1
  27. package/build/spec/layout/SelectFilterOption.d.ts +22 -0
  28. package/build/spec/layout/SelectFilterOption.d.ts.map +1 -0
  29. package/build/spec/main.js +99 -28
  30. package/build/spec/main.mjs +99 -28
  31. package/build/tsconfig.tsbuildinfo +1 -1
  32. package/build/zod/schemas.d.ts +118 -2
  33. package/build/zod/schemas.d.ts.map +1 -1
  34. package/build/zod/schemas.ts +86 -0
  35. package/package.json +1 -1
@@ -188,6 +188,11 @@ var loadingIndicatorLayoutSchema = import_zod.z.object({
188
188
  tags: import_zod.z.array(import_zod.z.string()).optional()
189
189
  });
190
190
  var mediaSchema = import_zod.z.union([mediaAvatarSchema, mediaImageSchema]);
191
+ var collectionLayoutSearchSchema = import_zod.z.object({
192
+ param: import_zod.z.string(),
193
+ title: import_zod.z.string().optional(),
194
+ hint: import_zod.z.string().optional()
195
+ });
191
196
  var paragraphLayoutSchema = import_zod.z.object({
192
197
  type: import_zod.z.literal("paragraph"),
193
198
  text: import_zod.z.string(),
@@ -210,6 +215,12 @@ var listLayoutStatusSchema = import_zod.z.union([
210
215
  import_zod.z.literal("neutral"),
211
216
  import_zod.z.literal("positive")
212
217
  ]);
218
+ var selectFilterOptionSchema = import_zod.z.object({
219
+ value: import_zod.z.string(),
220
+ title: import_zod.z.string(),
221
+ accessibilityDescription: import_zod.z.string().optional(),
222
+ selected: import_zod.z.boolean().optional()
223
+ });
213
224
  var requestSchema = import_zod.z.object({
214
225
  url: import_zod.z.string(),
215
226
  method: httpMethodSchema,
@@ -483,6 +494,12 @@ var containerBehaviorSchema = import_zod.z.object({
483
494
  var suggestionsSchema = import_zod.z.object({
484
495
  values: import_zod.z.array(suggestionsValueSchema)
485
496
  });
497
+ var collectionLayoutSelectFilterSchema = import_zod.z.object({
498
+ type: import_zod.z.literal("select"),
499
+ param: import_zod.z.string(),
500
+ options: import_zod.z.array(selectFilterOptionSchema),
501
+ multiSelect: import_zod.z.boolean().optional()
502
+ });
486
503
  var searchResultActionSchema = import_zod.z.object({
487
504
  type: import_zod.z.literal("action"),
488
505
  title: import_zod.z.string(),
@@ -508,6 +525,7 @@ var dynamicLaunchConfigSchema = import_zod.z.object({
508
525
  presentation: presentationSchema
509
526
  });
510
527
  var launchConfigSchema = import_zod.z.union([dynamicLaunchConfigSchema, nativeLaunchConfigSchema]);
528
+ var collectionLayoutFilterSchema = collectionLayoutSelectFilterSchema;
511
529
  var searchResponseBodySchema = import_zod.z.object({
512
530
  type: import_zod.z.literal("results").optional(),
513
531
  results: import_zod.z.array(searchResultSchema)
@@ -549,6 +567,52 @@ var reviewLayoutCallToActionSchema = import_zod.z.lazy(
549
567
  context: contextSchema.optional()
550
568
  })
551
569
  );
570
+ var collectionLayoutStateSchema = import_zod.z.lazy(
571
+ () => import_zod.z.object({
572
+ sections: import_zod.z.array(collectionLayoutSectionSchema),
573
+ nextCursor: import_zod.z.string().optional(),
574
+ filters: import_zod.z.array(collectionLayoutFilterSchema).optional(),
575
+ beforeSections: import_zod.z.array(layoutSchema).optional(),
576
+ afterSections: import_zod.z.array(layoutSchema).optional()
577
+ })
578
+ );
579
+ var collectionLayoutSectionSchema = import_zod.z.lazy(
580
+ () => import_zod.z.object({
581
+ id: import_zod.z.string(),
582
+ items: import_zod.z.array(collectionLayoutItemSchema),
583
+ title: import_zod.z.string().optional(),
584
+ callToAction: collectionLayoutCallToActionSchema.optional()
585
+ })
586
+ );
587
+ var layoutSchema = import_zod.z.lazy(
588
+ () => import_zod.z.union([
589
+ alertLayoutSchema,
590
+ boxLayoutSchema,
591
+ buttonLayoutSchema,
592
+ collectionLayoutSchema,
593
+ columnsLayoutSchema,
594
+ decisionLayoutSchema,
595
+ dividerLayoutSchema,
596
+ formLayoutSchema,
597
+ headingLayoutSchema,
598
+ imageLayoutSchema,
599
+ infoLayoutSchema,
600
+ instructionsLayoutSchema,
601
+ listLayoutSchema,
602
+ loadingIndicatorLayoutSchema,
603
+ markdownLayoutSchema,
604
+ mediaLayoutSchema,
605
+ modalLayoutSchema,
606
+ paragraphLayoutSchema,
607
+ progressLayoutSchema,
608
+ reviewLayoutSchema,
609
+ searchLayoutSchema,
610
+ sectionLayoutSchema,
611
+ statusListLayoutSchema,
612
+ tabsLayoutSchema,
613
+ upsellLayoutSchema
614
+ ])
615
+ );
552
616
  var tabsLayoutSchema = import_zod.z.lazy(
553
617
  () => import_zod.z.object({
554
618
  type: import_zod.z.literal("tabs"),
@@ -588,6 +652,28 @@ var alertLayoutCallToActionSchema = import_zod.z.lazy(
588
652
  context: contextSchema.optional()
589
653
  })
590
654
  );
655
+ var collectionLayoutItemSchema = import_zod.z.lazy(
656
+ () => import_zod.z.object({
657
+ title: import_zod.z.string(),
658
+ description: import_zod.z.string().optional(),
659
+ disabled: import_zod.z.boolean().optional(),
660
+ primaryBehavior: behaviorSchema.optional(),
661
+ callToAction: collectionLayoutCallToActionSchema.optional(),
662
+ additionalInfo: additionalInfoSchema.optional(),
663
+ supportingValues: supportingValuesSchema.optional(),
664
+ inlineAlert: inlineAlertSchema.optional(),
665
+ media: mediaSchema.optional(),
666
+ analyticsId: import_zod.z.string().optional(),
667
+ tags: import_zod.z.array(import_zod.z.string()).optional()
668
+ })
669
+ );
670
+ var collectionLayoutCallToActionSchema = import_zod.z.lazy(
671
+ () => import_zod.z.object({
672
+ title: import_zod.z.string(),
673
+ accessibilityDescription: import_zod.z.string().optional(),
674
+ behavior: behaviorSchema
675
+ })
676
+ );
591
677
  var listLayoutSchema = import_zod.z.lazy(
592
678
  () => import_zod.z.object({
593
679
  type: import_zod.z.literal("list"),
@@ -710,6 +796,19 @@ var statusListLayoutItemSchema = import_zod.z.lazy(
710
796
  tags: import_zod.z.array(import_zod.z.string()).optional()
711
797
  })
712
798
  );
799
+ var collectionLayoutSchema = import_zod.z.lazy(
800
+ () => import_zod.z.object({
801
+ type: import_zod.z.literal("collection"),
802
+ url: import_zod.z.string(),
803
+ method: httpMethodSchema,
804
+ initialState: collectionLayoutStateSchema,
805
+ search: collectionLayoutSearchSchema.optional(),
806
+ control: import_zod.z.string().optional(),
807
+ margin: sizeSchema.optional(),
808
+ analyticsId: import_zod.z.string().optional(),
809
+ tags: import_zod.z.array(import_zod.z.string()).optional()
810
+ })
811
+ );
713
812
  var sectionLayoutSchema = import_zod.z.lazy(
714
813
  () => import_zod.z.object({
715
814
  type: import_zod.z.literal("section"),
@@ -722,34 +821,6 @@ var sectionLayoutSchema = import_zod.z.lazy(
722
821
  tags: import_zod.z.array(import_zod.z.string()).optional()
723
822
  })
724
823
  );
725
- var layoutSchema = import_zod.z.lazy(
726
- () => import_zod.z.union([
727
- alertLayoutSchema,
728
- boxLayoutSchema,
729
- buttonLayoutSchema,
730
- columnsLayoutSchema,
731
- decisionLayoutSchema,
732
- dividerLayoutSchema,
733
- formLayoutSchema,
734
- headingLayoutSchema,
735
- imageLayoutSchema,
736
- infoLayoutSchema,
737
- instructionsLayoutSchema,
738
- listLayoutSchema,
739
- loadingIndicatorLayoutSchema,
740
- markdownLayoutSchema,
741
- mediaLayoutSchema,
742
- modalLayoutSchema,
743
- paragraphLayoutSchema,
744
- progressLayoutSchema,
745
- reviewLayoutSchema,
746
- searchLayoutSchema,
747
- sectionLayoutSchema,
748
- statusListLayoutSchema,
749
- tabsLayoutSchema,
750
- upsellLayoutSchema
751
- ])
752
- );
753
824
  var itemCallToActionSchema = import_zod.z.lazy(
754
825
  () => import_zod.z.object({
755
826
  title: import_zod.z.string(),
@@ -159,6 +159,11 @@ var loadingIndicatorLayoutSchema = z.object({
159
159
  tags: z.array(z.string()).optional()
160
160
  });
161
161
  var mediaSchema = z.union([mediaAvatarSchema, mediaImageSchema]);
162
+ var collectionLayoutSearchSchema = z.object({
163
+ param: z.string(),
164
+ title: z.string().optional(),
165
+ hint: z.string().optional()
166
+ });
162
167
  var paragraphLayoutSchema = z.object({
163
168
  type: z.literal("paragraph"),
164
169
  text: z.string(),
@@ -181,6 +186,12 @@ var listLayoutStatusSchema = z.union([
181
186
  z.literal("neutral"),
182
187
  z.literal("positive")
183
188
  ]);
189
+ var selectFilterOptionSchema = z.object({
190
+ value: z.string(),
191
+ title: z.string(),
192
+ accessibilityDescription: z.string().optional(),
193
+ selected: z.boolean().optional()
194
+ });
184
195
  var requestSchema = z.object({
185
196
  url: z.string(),
186
197
  method: httpMethodSchema,
@@ -454,6 +465,12 @@ var containerBehaviorSchema = z.object({
454
465
  var suggestionsSchema = z.object({
455
466
  values: z.array(suggestionsValueSchema)
456
467
  });
468
+ var collectionLayoutSelectFilterSchema = z.object({
469
+ type: z.literal("select"),
470
+ param: z.string(),
471
+ options: z.array(selectFilterOptionSchema),
472
+ multiSelect: z.boolean().optional()
473
+ });
457
474
  var searchResultActionSchema = z.object({
458
475
  type: z.literal("action"),
459
476
  title: z.string(),
@@ -479,6 +496,7 @@ var dynamicLaunchConfigSchema = z.object({
479
496
  presentation: presentationSchema
480
497
  });
481
498
  var launchConfigSchema = z.union([dynamicLaunchConfigSchema, nativeLaunchConfigSchema]);
499
+ var collectionLayoutFilterSchema = collectionLayoutSelectFilterSchema;
482
500
  var searchResponseBodySchema = z.object({
483
501
  type: z.literal("results").optional(),
484
502
  results: z.array(searchResultSchema)
@@ -520,6 +538,52 @@ var reviewLayoutCallToActionSchema = z.lazy(
520
538
  context: contextSchema.optional()
521
539
  })
522
540
  );
541
+ var collectionLayoutStateSchema = z.lazy(
542
+ () => z.object({
543
+ sections: z.array(collectionLayoutSectionSchema),
544
+ nextCursor: z.string().optional(),
545
+ filters: z.array(collectionLayoutFilterSchema).optional(),
546
+ beforeSections: z.array(layoutSchema).optional(),
547
+ afterSections: z.array(layoutSchema).optional()
548
+ })
549
+ );
550
+ var collectionLayoutSectionSchema = z.lazy(
551
+ () => z.object({
552
+ id: z.string(),
553
+ items: z.array(collectionLayoutItemSchema),
554
+ title: z.string().optional(),
555
+ callToAction: collectionLayoutCallToActionSchema.optional()
556
+ })
557
+ );
558
+ var layoutSchema = z.lazy(
559
+ () => z.union([
560
+ alertLayoutSchema,
561
+ boxLayoutSchema,
562
+ buttonLayoutSchema,
563
+ collectionLayoutSchema,
564
+ columnsLayoutSchema,
565
+ decisionLayoutSchema,
566
+ dividerLayoutSchema,
567
+ formLayoutSchema,
568
+ headingLayoutSchema,
569
+ imageLayoutSchema,
570
+ infoLayoutSchema,
571
+ instructionsLayoutSchema,
572
+ listLayoutSchema,
573
+ loadingIndicatorLayoutSchema,
574
+ markdownLayoutSchema,
575
+ mediaLayoutSchema,
576
+ modalLayoutSchema,
577
+ paragraphLayoutSchema,
578
+ progressLayoutSchema,
579
+ reviewLayoutSchema,
580
+ searchLayoutSchema,
581
+ sectionLayoutSchema,
582
+ statusListLayoutSchema,
583
+ tabsLayoutSchema,
584
+ upsellLayoutSchema
585
+ ])
586
+ );
523
587
  var tabsLayoutSchema = z.lazy(
524
588
  () => z.object({
525
589
  type: z.literal("tabs"),
@@ -559,6 +623,28 @@ var alertLayoutCallToActionSchema = z.lazy(
559
623
  context: contextSchema.optional()
560
624
  })
561
625
  );
626
+ var collectionLayoutItemSchema = z.lazy(
627
+ () => z.object({
628
+ title: z.string(),
629
+ description: z.string().optional(),
630
+ disabled: z.boolean().optional(),
631
+ primaryBehavior: behaviorSchema.optional(),
632
+ callToAction: collectionLayoutCallToActionSchema.optional(),
633
+ additionalInfo: additionalInfoSchema.optional(),
634
+ supportingValues: supportingValuesSchema.optional(),
635
+ inlineAlert: inlineAlertSchema.optional(),
636
+ media: mediaSchema.optional(),
637
+ analyticsId: z.string().optional(),
638
+ tags: z.array(z.string()).optional()
639
+ })
640
+ );
641
+ var collectionLayoutCallToActionSchema = z.lazy(
642
+ () => z.object({
643
+ title: z.string(),
644
+ accessibilityDescription: z.string().optional(),
645
+ behavior: behaviorSchema
646
+ })
647
+ );
562
648
  var listLayoutSchema = z.lazy(
563
649
  () => z.object({
564
650
  type: z.literal("list"),
@@ -681,6 +767,19 @@ var statusListLayoutItemSchema = z.lazy(
681
767
  tags: z.array(z.string()).optional()
682
768
  })
683
769
  );
770
+ var collectionLayoutSchema = z.lazy(
771
+ () => z.object({
772
+ type: z.literal("collection"),
773
+ url: z.string(),
774
+ method: httpMethodSchema,
775
+ initialState: collectionLayoutStateSchema,
776
+ search: collectionLayoutSearchSchema.optional(),
777
+ control: z.string().optional(),
778
+ margin: sizeSchema.optional(),
779
+ analyticsId: z.string().optional(),
780
+ tags: z.array(z.string()).optional()
781
+ })
782
+ );
684
783
  var sectionLayoutSchema = z.lazy(
685
784
  () => z.object({
686
785
  type: z.literal("section"),
@@ -693,34 +792,6 @@ var sectionLayoutSchema = z.lazy(
693
792
  tags: z.array(z.string()).optional()
694
793
  })
695
794
  );
696
- var layoutSchema = z.lazy(
697
- () => z.union([
698
- alertLayoutSchema,
699
- boxLayoutSchema,
700
- buttonLayoutSchema,
701
- columnsLayoutSchema,
702
- decisionLayoutSchema,
703
- dividerLayoutSchema,
704
- formLayoutSchema,
705
- headingLayoutSchema,
706
- imageLayoutSchema,
707
- infoLayoutSchema,
708
- instructionsLayoutSchema,
709
- listLayoutSchema,
710
- loadingIndicatorLayoutSchema,
711
- markdownLayoutSchema,
712
- mediaLayoutSchema,
713
- modalLayoutSchema,
714
- paragraphLayoutSchema,
715
- progressLayoutSchema,
716
- reviewLayoutSchema,
717
- searchLayoutSchema,
718
- sectionLayoutSchema,
719
- statusListLayoutSchema,
720
- tabsLayoutSchema,
721
- upsellLayoutSchema
722
- ])
723
- );
724
795
  var itemCallToActionSchema = z.lazy(
725
796
  () => z.object({
726
797
  title: z.string(),