@coveo/thermidor-schema 1.0.0-beta.7 → 1.0.0-beta.8
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.
- package/dist/generated/schemas.d.ts +847 -141
- package/dist/generated/schemas.js +85 -22
- package/dist/generated/zod3/schemas.d.ts +1892 -555
- package/dist/generated/zod3/schemas.js +85 -22
- package/package.json +3 -2
|
@@ -645,8 +645,11 @@ export const ComponentContractsSchema = z.discriminatedUnion('component', [
|
|
|
645
645
|
* ComponentId / ChildList), so it is not re-declared here; the unions below reference it.
|
|
646
646
|
*/
|
|
647
647
|
export const FunctionCallSchema = z.object({
|
|
648
|
-
|
|
649
|
-
args: z.
|
|
648
|
+
call: z.string(),
|
|
649
|
+
args: z.record(z.string(), z.any()),
|
|
650
|
+
returnType: z
|
|
651
|
+
.enum(['string', 'number', 'boolean', 'array', 'object', 'any', 'void'])
|
|
652
|
+
.default('boolean'),
|
|
650
653
|
});
|
|
651
654
|
export const DynamicNumberSchema = z.union([z.number(), DataBindingSchema, FunctionCallSchema]);
|
|
652
655
|
export const DynamicStringSchema = z.union([z.string(), DataBindingSchema, FunctionCallSchema]);
|
|
@@ -676,16 +679,24 @@ export const DynamicActionSchema = z.object({
|
|
|
676
679
|
* untouched. The resolved shape a renderer actually reads is the `XxxProps` type.
|
|
677
680
|
*/
|
|
678
681
|
export const BundleDisplayPropsSchema = z.object({
|
|
679
|
-
tiers:
|
|
682
|
+
tiers: z.union([BundleDisplayStateSchema.shape['tiers'], DataBindingSchema, FunctionCallSchema]),
|
|
680
683
|
});
|
|
681
684
|
export const CartPropsSchema = z.object({});
|
|
682
685
|
export const CategoryFacetPropsSchema = z.object({
|
|
683
686
|
field: DynamicStringSchema,
|
|
684
687
|
displayName: DynamicStringSchema,
|
|
685
|
-
values:
|
|
688
|
+
values: z.union([
|
|
689
|
+
CategoryFacetStateSchema.shape['values'],
|
|
690
|
+
DataBindingSchema,
|
|
691
|
+
FunctionCallSchema,
|
|
692
|
+
]),
|
|
686
693
|
canShowMoreValues: DynamicBooleanSchema,
|
|
687
694
|
canShowLessValues: DynamicBooleanSchema,
|
|
688
|
-
facetSearch:
|
|
695
|
+
facetSearch: z.union([
|
|
696
|
+
CategoryFacetStateSchema.shape['facetSearch'],
|
|
697
|
+
DataBindingSchema,
|
|
698
|
+
FunctionCallSchema,
|
|
699
|
+
]),
|
|
689
700
|
});
|
|
690
701
|
export const CommerceSearchPropsSchema = z.object({
|
|
691
702
|
sidebarChild: z.string().optional(),
|
|
@@ -694,14 +705,26 @@ export const CommerceSearchPropsSchema = z.object({
|
|
|
694
705
|
export const ComparisonTablePropsSchema = z.object({
|
|
695
706
|
heading: DynamicStringSchema,
|
|
696
707
|
summary: DynamicStringSchema,
|
|
697
|
-
products:
|
|
698
|
-
|
|
708
|
+
products: z.union([
|
|
709
|
+
ComparisonTableStateSchema.shape['products'],
|
|
710
|
+
DataBindingSchema,
|
|
711
|
+
FunctionCallSchema,
|
|
712
|
+
]),
|
|
713
|
+
attributes: z.union([
|
|
714
|
+
ComparisonTableStateSchema.shape['attributes'],
|
|
715
|
+
DataBindingSchema,
|
|
716
|
+
FunctionCallSchema,
|
|
717
|
+
]),
|
|
699
718
|
});
|
|
700
719
|
export const DateFacetPropsSchema = z.object({
|
|
701
720
|
field: DynamicStringSchema,
|
|
702
721
|
displayName: DynamicStringSchema,
|
|
703
|
-
values:
|
|
704
|
-
customRange:
|
|
722
|
+
values: z.union([DateFacetStateSchema.shape['values'], DataBindingSchema, FunctionCallSchema]),
|
|
723
|
+
customRange: z.union([
|
|
724
|
+
DateFacetStateSchema.shape['customRange'],
|
|
725
|
+
DataBindingSchema,
|
|
726
|
+
FunctionCallSchema,
|
|
727
|
+
]),
|
|
705
728
|
hasActiveValues: DynamicBooleanSchema,
|
|
706
729
|
canShowMoreValues: DynamicBooleanSchema,
|
|
707
730
|
canShowLessValues: DynamicBooleanSchema,
|
|
@@ -714,17 +737,25 @@ export const LayoutStackPropsSchema = z.object({
|
|
|
714
737
|
children: z.array(z.string()).optional(),
|
|
715
738
|
});
|
|
716
739
|
export const NextActionsBarPropsSchema = z.object({
|
|
717
|
-
suggestedActions:
|
|
740
|
+
suggestedActions: z.union([
|
|
741
|
+
NextActionsStateSchema.shape['suggestedActions'],
|
|
742
|
+
DataBindingSchema,
|
|
743
|
+
FunctionCallSchema,
|
|
744
|
+
]),
|
|
718
745
|
});
|
|
719
746
|
export const NumericFacetPropsSchema = z.object({
|
|
720
747
|
field: DynamicStringSchema,
|
|
721
748
|
displayName: DynamicStringSchema,
|
|
722
|
-
values:
|
|
723
|
-
customRange:
|
|
749
|
+
values: z.union([NumericFacetStateSchema.shape['values'], DataBindingSchema, FunctionCallSchema]),
|
|
750
|
+
customRange: z.union([
|
|
751
|
+
NumericFacetStateSchema.shape['customRange'],
|
|
752
|
+
DataBindingSchema,
|
|
753
|
+
FunctionCallSchema,
|
|
754
|
+
]),
|
|
724
755
|
hasActiveValues: DynamicBooleanSchema,
|
|
725
756
|
canShowMoreValues: DynamicBooleanSchema,
|
|
726
757
|
canShowLessValues: DynamicBooleanSchema,
|
|
727
|
-
domain:
|
|
758
|
+
domain: z.union([NumericFacetStateSchema.shape['domain'], DataBindingSchema, FunctionCallSchema]),
|
|
728
759
|
});
|
|
729
760
|
export const PageSizePropsSchema = z.object({
|
|
730
761
|
pageSize: DynamicNumberSchema,
|
|
@@ -737,19 +768,39 @@ export const PaginationPropsSchema = z.object({
|
|
|
737
768
|
});
|
|
738
769
|
export const ProductCarouselPropsSchema = z.object({
|
|
739
770
|
heading: DynamicStringSchema,
|
|
740
|
-
products:
|
|
771
|
+
products: z.union([
|
|
772
|
+
ProductCarouselStateSchema.shape['products'],
|
|
773
|
+
DataBindingSchema,
|
|
774
|
+
FunctionCallSchema,
|
|
775
|
+
]),
|
|
741
776
|
});
|
|
742
777
|
export const ProductListPropsSchema = z.object({
|
|
743
|
-
products:
|
|
778
|
+
products: z.union([
|
|
779
|
+
ProductListStateSchema.shape['products'],
|
|
780
|
+
DataBindingSchema,
|
|
781
|
+
FunctionCallSchema,
|
|
782
|
+
]),
|
|
744
783
|
});
|
|
745
784
|
export const ProductSummaryPropsSchema = z.object({
|
|
746
785
|
categoryLabel: DynamicStringSchema,
|
|
747
|
-
product:
|
|
786
|
+
product: z.union([
|
|
787
|
+
ProductSummaryStateSchema.shape['product'],
|
|
788
|
+
DataBindingSchema,
|
|
789
|
+
FunctionCallSchema,
|
|
790
|
+
]),
|
|
748
791
|
});
|
|
749
792
|
export const QuerySuggestionsPropsSchema = z.object({
|
|
750
793
|
query: DynamicStringSchema,
|
|
751
|
-
completions:
|
|
752
|
-
|
|
794
|
+
completions: z.union([
|
|
795
|
+
QuerySuggestionsStateSchema.shape['completions'],
|
|
796
|
+
DataBindingSchema,
|
|
797
|
+
FunctionCallSchema,
|
|
798
|
+
]),
|
|
799
|
+
products: z.union([
|
|
800
|
+
QuerySuggestionsStateSchema.shape['products'],
|
|
801
|
+
DataBindingSchema,
|
|
802
|
+
FunctionCallSchema,
|
|
803
|
+
]),
|
|
753
804
|
});
|
|
754
805
|
export const QuerySummaryPropsSchema = z.object({
|
|
755
806
|
query: DynamicStringSchema,
|
|
@@ -760,15 +811,27 @@ export const QuerySummaryPropsSchema = z.object({
|
|
|
760
811
|
export const RegularFacetPropsSchema = z.object({
|
|
761
812
|
field: DynamicStringSchema,
|
|
762
813
|
displayName: DynamicStringSchema,
|
|
763
|
-
values:
|
|
814
|
+
values: z.union([RegularFacetStateSchema.shape['values'], DataBindingSchema, FunctionCallSchema]),
|
|
764
815
|
hasActiveValues: DynamicBooleanSchema,
|
|
765
816
|
canShowMoreValues: DynamicBooleanSchema,
|
|
766
817
|
canShowLessValues: DynamicBooleanSchema,
|
|
767
|
-
facetSearch:
|
|
818
|
+
facetSearch: z.union([
|
|
819
|
+
RegularFacetStateSchema.shape['facetSearch'],
|
|
820
|
+
DataBindingSchema,
|
|
821
|
+
FunctionCallSchema,
|
|
822
|
+
]),
|
|
768
823
|
});
|
|
769
824
|
export const SortPropsSchema = z.object({
|
|
770
|
-
appliedSort:
|
|
771
|
-
|
|
825
|
+
appliedSort: z.union([
|
|
826
|
+
SortStateSchema.shape['appliedSort'],
|
|
827
|
+
DataBindingSchema,
|
|
828
|
+
FunctionCallSchema,
|
|
829
|
+
]),
|
|
830
|
+
availableSorts: z.union([
|
|
831
|
+
SortStateSchema.shape['availableSorts'],
|
|
832
|
+
DataBindingSchema,
|
|
833
|
+
FunctionCallSchema,
|
|
834
|
+
]),
|
|
772
835
|
});
|
|
773
836
|
/**
|
|
774
837
|
* Per-component action unions in the standard A2-UI event shape
|