@coveo/thermidor-schema 1.0.0-beta.30 → 1.0.0-beta.32

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.
@@ -139,6 +139,8 @@ export const UpdateCartPayloadSchema = z.strictObject({
139
139
  quantity: z.number().int().min(1),
140
140
  });
141
141
  export const CartStateSchema = z.strictObject({});
142
+ export const SearchBoxActionsSchema = z.strictObject({});
143
+ export const SearchBoxStateSchema = z.strictObject({});
142
144
  export const FetchSuggestionsPayloadSchema = z.strictObject({
143
145
  query: z.string(),
144
146
  });
@@ -329,6 +331,8 @@ export const BreadboxFacetValueSchema = z.strictObject({
329
331
  end: z.union([z.number(), z.string()]).optional(),
330
332
  start: z.union([z.number(), z.string()]).optional(),
331
333
  });
334
+ export const InitializePayloadSchema = z.strictObject({});
335
+ export const SessionShellStateSchema = z.strictObject({});
332
336
  export const OverrideCorrectionPayloadSchema = z.strictObject({
333
337
  originalQuery: z.string().min(1),
334
338
  });
@@ -394,12 +398,17 @@ export const PurchasePayloadSchema = z.strictObject({
394
398
  export const UpdateCartSchema = z.strictObject({
395
399
  payload: UpdateCartPayloadSchema,
396
400
  });
401
+ export const SearchBoxSchema = z.looseObject({
402
+ actions: SearchBoxActionsSchema.optional(),
403
+ component: z.literal('SearchBox'),
404
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
405
+ state: SearchBoxStateSchema.optional(),
406
+ });
397
407
  export const FetchSuggestionsSchema = z.strictObject({
398
408
  payload: FetchSuggestionsPayloadSchema,
399
409
  });
400
410
  export const QuerySuggestionsStateSchema = z.strictObject({
401
411
  completions: z.array(QueryCompletionSchema),
402
- products: z.array(ProductSchema),
403
412
  query: z.string(),
404
413
  });
405
414
  export const SelectActionSchema = z.strictObject({
@@ -540,6 +549,9 @@ export const BreadboxFacetSchema = z.discriminatedUnion('type', [
540
549
  BreadboxDateRangeFacetSchema,
541
550
  BreadboxHierarchicalFacetSchema,
542
551
  ]);
552
+ export const InitializeSchema = z.strictObject({
553
+ payload: InitializePayloadSchema,
554
+ });
543
555
  export const OverrideCorrectionSchema = z.strictObject({
544
556
  payload: OverrideCorrectionPayloadSchema,
545
557
  });
@@ -665,6 +677,9 @@ export const BreadboxActionsSchema = z.strictObject({
665
677
  export const BreadboxStateSchema = z.strictObject({
666
678
  facets: z.array(BreadboxFacetSchema),
667
679
  });
680
+ export const SessionShellActionsSchema = z.strictObject({
681
+ initialize: InitializeSchema,
682
+ });
668
683
  export const RestoreStatePayloadSchema = z.strictObject({
669
684
  facets: z.array(FacetRestoreSchema).optional(),
670
685
  page: z.number().int().min(0),
@@ -746,6 +761,12 @@ export const BreadboxSchema = z.looseObject({
746
761
  id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
747
762
  state: BreadboxStateSchema.optional(),
748
763
  });
764
+ export const SessionShellSchema = z.looseObject({
765
+ actions: SessionShellActionsSchema.optional(),
766
+ component: z.literal('SessionShell'),
767
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
768
+ state: SessionShellStateSchema.optional(),
769
+ });
749
770
  export const RestoreStateSchema = z.strictObject({
750
771
  payload: RestoreStatePayloadSchema,
751
772
  });
@@ -775,6 +796,7 @@ export const CommerceSearchSchema = z.looseObject({
775
796
  export const ComponentContractsSchema = z.discriminatedUnion('component', [
776
797
  ProductCarouselSchema,
777
798
  CartSchema,
799
+ SearchBoxSchema,
778
800
  QuerySuggestionsSchema,
779
801
  NextActionsBarSchema,
780
802
  BundleDisplaySchema,
@@ -790,6 +812,7 @@ export const ComponentContractsSchema = z.discriminatedUnion('component', [
790
812
  CategoryFacetSchema,
791
813
  FacetManagerSchema,
792
814
  BreadboxSchema,
815
+ SessionShellSchema,
793
816
  CommerceSearchSchema,
794
817
  LayoutStackSchema,
795
818
  QuerySummarySchema,
@@ -979,11 +1002,6 @@ export const QuerySuggestionsPropsSchema = z.object({
979
1002
  DataBindingSchema,
980
1003
  FunctionCallSchema,
981
1004
  ]),
982
- products: z.union([
983
- QuerySuggestionsStateSchema.shape['products'],
984
- DataBindingSchema,
985
- FunctionCallSchema,
986
- ]),
987
1005
  });
988
1006
  export const QuerySummaryPropsSchema = z.object({
989
1007
  query: DynamicStringSchema,
@@ -1004,6 +1022,12 @@ export const RegularFacetPropsSchema = z.object({
1004
1022
  FunctionCallSchema,
1005
1023
  ]),
1006
1024
  });
1025
+ export const SearchBoxPropsSchema = z.object({
1026
+ suggestionsChild: z.string().optional(),
1027
+ });
1028
+ export const SessionShellPropsSchema = z.object({
1029
+ children: z.array(z.string()).optional(),
1030
+ });
1007
1031
  export const SortPropsSchema = z.object({
1008
1032
  appliedSort: z.union([
1009
1033
  SortStateSchema.shape['appliedSort'],
@@ -1242,6 +1266,10 @@ export const RegularFacetActionSchema = z.union([
1242
1266
  z.object({ event: z.object({ name: z.literal('showMoreValues'), context: z.unknown() }) }),
1243
1267
  z.object({ event: z.object({ name: z.literal('showLessValues'), context: z.unknown() }) }),
1244
1268
  ]);
1269
+ export const SearchBoxActionSchema = z.never();
1270
+ export const SessionShellActionSchema = z.union([
1271
+ z.object({ event: z.object({ name: z.literal('initialize'), context: z.strictObject({}) }) }),
1272
+ ]);
1245
1273
  export const SortActionSchema = z.union([
1246
1274
  z.object({
1247
1275
  event: z.object({
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export declare const THERMIDOR_CATALOG_ID = "https://schema.thermidor.coveo.com/a2-ui/catalog.json";
2
- export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, BreadboxSchema, BreadboxActionsSchema, BreadboxStateSchema, BreadboxFacetSchema, BreadboxRegularFacetSchema, BreadboxRegularFacetValueSchema, BreadboxNumericalRangeFacetSchema, BreadboxNumericalRangeFacetValueSchema, BreadboxDateRangeFacetSchema, BreadboxDateRangeFacetValueSchema, BreadboxHierarchicalFacetSchema, BreadboxDeselectPayloadSchema, BreadboxDeselectRegularValueSchema, BreadboxDeselectNumericalRangeSchema, BreadboxDeselectDateRangeSchema, BreadboxDeselectHierarchicalPathSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductResearchRelatedDocumentSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, BadgeSchema, BadgePlacementSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CartPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, BreadboxPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySuggestionsPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, BreadboxActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
3
- export type { ActionItem, FollowupActionItem, SearchActionItem, SearchOptionActionItem, Cart, CartActions, CartState, UpdateCart, UpdateCartPayload, CartUpdateOperation, Purchase, PurchasePayload, PurchaseProduct, Transaction, QuerySuggestions, QuerySuggestionsActions, QuerySuggestionsState, QueryCompletion, FetchSuggestions, FetchSuggestionsPayload, RestoreState, RestoreStatePayload, FacetRestore, NumericRangeRestore, OverrideCorrection, OverrideCorrectionPayload, ShowMore, ShowMorePayload, SelectProducts, SelectProductsPayload, ProductClick, ProductClickPayload, BundleDisplay, BundleDisplayState, BundleSlot, BundleTier, CategoryFacet, CategoryFacetActions, CategoryFacetValue, CategoryFacetSearch, CategoryFacetSearchPayload, CategoryFacetSelectPathPayload, CategoryFacetState, CategoryFacetValues, CommerceSearch, CommerceSearchActions, CommerceSearchState, SubmitQuery, SubmitQueryPayload, ComparisonAttribute, ComparisonProduct, ComparisonTable, ComparisonTableState, ComponentContracts, DateFacet, DateFacetActions, DateFacetApplyCustomRangePayload, DateFacetCustomRange, DateFacetState, DateFacetToggleSelectPayload, DateFacetToggleSingleSelectPayload, DateFacetValue, FacetManager, FacetManagerActions, FacetManagerState, Breadbox, BreadboxActions, BreadboxState, BreadboxFacet, BreadboxRegularFacet, BreadboxRegularFacetValue, BreadboxNumericalRangeFacet, BreadboxNumericalRangeFacetValue, BreadboxDateRangeFacet, BreadboxDateRangeFacetValue, BreadboxHierarchicalFacet, BreadboxDeselectPayload, BreadboxDeselectRegularValue, BreadboxDeselectNumericalRange, BreadboxDeselectDateRange, BreadboxDeselectHierarchicalPath, FacetValueState, SelectableFacetValueState, LayoutStack, LayoutStackState, NextActionsBar, NextActionsState, NumericFacet, NumericFacetActions, NumericFacetCustomRange, NumericFacetDomain, NumericFacetApplyCustomRangePayload, NumericFacetState, NumericFacetToggleSelectPayload, NumericFacetToggleSingleSelectPayload, NumericFacetValue, PageSize, PageSizeActions, PageSizeState, Pagination, PaginationActions, PaginationState, Badge, BadgePlacement, Product, ProductCarousel, ProductCarouselState, ProductList, ProductListActions, ProductListState, ProductResearchCard, ProductResearchCardActions, ProductResearchCardState, ProductResearchRelatedDocument, ProductSummary, ProductSummaryActions, ProductSummaryState, QuerySummary, QuerySummaryState, RegularFacet, RegularFacetActions, RegularFacetSearch, RegularFacetSearchResult, RegularFacetState, RegularFacetToggleExcludePayload, RegularFacetToggleSelectPayload, RegularFacetToggleSingleExcludePayload, RegularFacetToggleSingleSelectPayload, RegularFacetValue, SelectActionPayload, SelectSearchOptionPayload, SelectPagePayload, SelectSortPayload, SetPageSizePayload, Sort, SortActions, SortCriterion, SortState, DataBinding, FunctionCall, DynamicNumber, DynamicString, DynamicBoolean, DynamicStringList, DynamicValue, DynamicAction, BundleDisplayAction, CategoryFacetAction, CommerceSearchAction, ComparisonTableAction, DateFacetAction, FacetManagerAction, BreadboxAction, LayoutStackAction, NextActionsBarAction, NumericFacetAction, PageSizeAction, PaginationAction, ProductCarouselAction, ProductListAction, ProductResearchCardAction, ProductSummaryAction, QuerySummaryAction, RegularFacetAction, SortAction, BundleDisplayProps, CartProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, BreadboxProps, LayoutStackProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, ProductResearchCardProps, ProductSummaryProps, QuerySuggestionsProps, QuerySummaryProps, RegularFacetProps, SortProps, } from './generated/schemas.js';
2
+ export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, BreadboxSchema, BreadboxActionsSchema, BreadboxStateSchema, BreadboxFacetSchema, BreadboxRegularFacetSchema, BreadboxRegularFacetValueSchema, BreadboxNumericalRangeFacetSchema, BreadboxNumericalRangeFacetValueSchema, BreadboxDateRangeFacetSchema, BreadboxDateRangeFacetValueSchema, BreadboxHierarchicalFacetSchema, BreadboxDeselectPayloadSchema, BreadboxDeselectRegularValueSchema, BreadboxDeselectNumericalRangeSchema, BreadboxDeselectDateRangeSchema, BreadboxDeselectHierarchicalPathSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, SearchBoxSchema, SearchBoxStateSchema, SessionShellSchema, SessionShellActionsSchema, SessionShellStateSchema, InitializeSchema, InitializePayloadSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductResearchRelatedDocumentSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, BadgeSchema, BadgePlacementSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CartPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, BreadboxPropsSchema, LayoutStackPropsSchema, SearchBoxPropsSchema, SessionShellPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySuggestionsPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, BreadboxActionSchema, LayoutStackActionSchema, SearchBoxActionSchema, SessionShellActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
3
+ export type { ActionItem, FollowupActionItem, SearchActionItem, SearchOptionActionItem, Cart, CartActions, CartState, UpdateCart, UpdateCartPayload, CartUpdateOperation, Purchase, PurchasePayload, PurchaseProduct, Transaction, QuerySuggestions, QuerySuggestionsActions, QuerySuggestionsState, QueryCompletion, FetchSuggestions, FetchSuggestionsPayload, RestoreState, RestoreStatePayload, FacetRestore, NumericRangeRestore, OverrideCorrection, OverrideCorrectionPayload, ShowMore, ShowMorePayload, SelectProducts, SelectProductsPayload, ProductClick, ProductClickPayload, BundleDisplay, BundleDisplayState, BundleSlot, BundleTier, CategoryFacet, CategoryFacetActions, CategoryFacetValue, CategoryFacetSearch, CategoryFacetSearchPayload, CategoryFacetSelectPathPayload, CategoryFacetState, CategoryFacetValues, CommerceSearch, CommerceSearchActions, CommerceSearchState, SubmitQuery, SubmitQueryPayload, ComparisonAttribute, ComparisonProduct, ComparisonTable, ComparisonTableState, ComponentContracts, DateFacet, DateFacetActions, DateFacetApplyCustomRangePayload, DateFacetCustomRange, DateFacetState, DateFacetToggleSelectPayload, DateFacetToggleSingleSelectPayload, DateFacetValue, FacetManager, FacetManagerActions, FacetManagerState, Breadbox, BreadboxActions, BreadboxState, BreadboxFacet, BreadboxRegularFacet, BreadboxRegularFacetValue, BreadboxNumericalRangeFacet, BreadboxNumericalRangeFacetValue, BreadboxDateRangeFacet, BreadboxDateRangeFacetValue, BreadboxHierarchicalFacet, BreadboxDeselectPayload, BreadboxDeselectRegularValue, BreadboxDeselectNumericalRange, BreadboxDeselectDateRange, BreadboxDeselectHierarchicalPath, FacetValueState, SelectableFacetValueState, LayoutStack, LayoutStackState, SearchBox, SearchBoxState, SessionShell, SessionShellActions, SessionShellState, Initialize, InitializePayload, NextActionsBar, NextActionsState, NumericFacet, NumericFacetActions, NumericFacetCustomRange, NumericFacetDomain, NumericFacetApplyCustomRangePayload, NumericFacetState, NumericFacetToggleSelectPayload, NumericFacetToggleSingleSelectPayload, NumericFacetValue, PageSize, PageSizeActions, PageSizeState, Pagination, PaginationActions, PaginationState, Badge, BadgePlacement, Product, ProductCarousel, ProductCarouselState, ProductList, ProductListActions, ProductListState, ProductResearchCard, ProductResearchCardActions, ProductResearchCardState, ProductResearchRelatedDocument, ProductSummary, ProductSummaryActions, ProductSummaryState, QuerySummary, QuerySummaryState, RegularFacet, RegularFacetActions, RegularFacetSearch, RegularFacetSearchResult, RegularFacetState, RegularFacetToggleExcludePayload, RegularFacetToggleSelectPayload, RegularFacetToggleSingleExcludePayload, RegularFacetToggleSingleSelectPayload, RegularFacetValue, SelectActionPayload, SelectSearchOptionPayload, SelectPagePayload, SelectSortPayload, SetPageSizePayload, Sort, SortActions, SortCriterion, SortState, DataBinding, FunctionCall, DynamicNumber, DynamicString, DynamicBoolean, DynamicStringList, DynamicValue, DynamicAction, BundleDisplayAction, CategoryFacetAction, CommerceSearchAction, ComparisonTableAction, DateFacetAction, FacetManagerAction, BreadboxAction, LayoutStackAction, SearchBoxAction, SessionShellAction, NextActionsBarAction, NumericFacetAction, PageSizeAction, PaginationAction, ProductCarouselAction, ProductListAction, ProductResearchCardAction, ProductSummaryAction, QuerySummaryAction, RegularFacetAction, SortAction, BundleDisplayProps, CartProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, BreadboxProps, LayoutStackProps, SearchBoxProps, SessionShellProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, ProductResearchCardProps, ProductSummaryProps, QuerySuggestionsProps, QuerySummaryProps, RegularFacetProps, SortProps, } from './generated/schemas.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const THERMIDOR_CATALOG_ID = 'https://schema.thermidor.coveo.com/a2-ui/catalog.json';
2
- export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, BreadboxSchema, BreadboxActionsSchema, BreadboxStateSchema, BreadboxFacetSchema, BreadboxRegularFacetSchema, BreadboxRegularFacetValueSchema, BreadboxNumericalRangeFacetSchema, BreadboxNumericalRangeFacetValueSchema, BreadboxDateRangeFacetSchema, BreadboxDateRangeFacetValueSchema, BreadboxHierarchicalFacetSchema, BreadboxDeselectPayloadSchema, BreadboxDeselectRegularValueSchema, BreadboxDeselectNumericalRangeSchema, BreadboxDeselectDateRangeSchema, BreadboxDeselectHierarchicalPathSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductResearchRelatedDocumentSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, BadgeSchema, BadgePlacementSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CartPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, BreadboxPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySuggestionsPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, BreadboxActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
2
+ export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, BreadboxSchema, BreadboxActionsSchema, BreadboxStateSchema, BreadboxFacetSchema, BreadboxRegularFacetSchema, BreadboxRegularFacetValueSchema, BreadboxNumericalRangeFacetSchema, BreadboxNumericalRangeFacetValueSchema, BreadboxDateRangeFacetSchema, BreadboxDateRangeFacetValueSchema, BreadboxHierarchicalFacetSchema, BreadboxDeselectPayloadSchema, BreadboxDeselectRegularValueSchema, BreadboxDeselectNumericalRangeSchema, BreadboxDeselectDateRangeSchema, BreadboxDeselectHierarchicalPathSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, SearchBoxSchema, SearchBoxStateSchema, SessionShellSchema, SessionShellActionsSchema, SessionShellStateSchema, InitializeSchema, InitializePayloadSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductResearchRelatedDocumentSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, BadgeSchema, BadgePlacementSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CartPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, BreadboxPropsSchema, LayoutStackPropsSchema, SearchBoxPropsSchema, SessionShellPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySuggestionsPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, BreadboxActionSchema, LayoutStackActionSchema, SearchBoxActionSchema, SessionShellActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/thermidor-schema",
3
- "version": "1.0.0-beta.30",
3
+ "version": "1.0.0-beta.32",
4
4
  "description": "Zod and TypeScript projections of the Thermidor JSON Schema contract.",
5
5
  "homepage": "https://github.com/coveo-platform/thermidor-schema#readme",
6
6
  "bugs": {
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "24.13.6",
40
- "fast-check": "4.9.0",
40
+ "fast-check": "4.10.2",
41
41
  "typescript": "7.0.2",
42
42
  "vitest": "4.1.11",
43
- "zod": "4.4.3"
43
+ "zod": "4.6.7"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "zod": "^3.25 || ^4.4.3"
@@ -13,6 +13,9 @@
13
13
  {
14
14
  "$ref": "https://schema.thermidor.coveo.com/components/cart.schema.json"
15
15
  },
16
+ {
17
+ "$ref": "https://schema.thermidor.coveo.com/components/search-box.schema.json"
18
+ },
16
19
  {
17
20
  "$ref": "https://schema.thermidor.coveo.com/components/query-suggestions.schema.json"
18
21
  },
@@ -58,6 +61,9 @@
58
61
  {
59
62
  "$ref": "https://schema.thermidor.coveo.com/components/breadbox.schema.json"
60
63
  },
64
+ {
65
+ "$ref": "https://schema.thermidor.coveo.com/components/session-shell.schema.json"
66
+ },
61
67
  {
62
68
  "$ref": "https://schema.thermidor.coveo.com/components/commerce-search.schema.json"
63
69
  },
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.thermidor.coveo.com/components/query-suggestions.schema.json",
4
4
  "title": "QuerySuggestions",
5
- "description": "Requests and renders backend-provided query completions and product suggestions for the active search input.",
5
+ "description": "Requests and renders backend-provided query completions for the active search input.",
6
6
  "allOf": [
7
7
  {
8
8
  "$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
@@ -24,10 +24,6 @@
24
24
  "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
25
25
  "description": "The query completions, bound to /state/<id>/completions."
26
26
  },
27
- "products": {
28
- "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
29
- "description": "The product suggestions, bound to /state/<id>/products."
30
- },
31
27
  "state": {
32
28
  "$ref": "#/$defs/QuerySuggestionsState"
33
29
  },
@@ -48,7 +44,7 @@
48
44
  "title": "QuerySuggestionsState",
49
45
  "description": "The suggestion result for one query. Owned exclusively by the backend.",
50
46
  "type": "object",
51
- "required": ["query", "completions", "products"],
47
+ "required": ["query", "completions"],
52
48
  "properties": {
53
49
  "query": {
54
50
  "type": "string",
@@ -60,20 +56,13 @@
60
56
  "items": {
61
57
  "$ref": "#/$defs/QueryCompletion"
62
58
  }
63
- },
64
- "products": {
65
- "type": "array",
66
- "description": "Product suggestions returned by the commerce service.",
67
- "items": {
68
- "$ref": "https://schema.thermidor.coveo.com/definitions/product.schema.json"
69
- }
70
59
  }
71
60
  },
72
61
  "additionalProperties": false
73
62
  },
74
63
  "FetchSuggestionsAction": {
75
64
  "title": "fetchSuggestions",
76
- "description": "Fetches query completions and product suggestions for the current input.",
65
+ "description": "Fetches query completions for the current input.",
77
66
  "allOf": [
78
67
  {
79
68
  "$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/components/search-box.schema.json",
4
+ "title": "SearchBox",
5
+ "description": "Draws the search input. What is typed stays on the renderer side, which passes it to the search box's children; what submitting does is the application's.",
6
+ "allOf": [
7
+ {
8
+ "$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
9
+ }
10
+ ],
11
+ "properties": {
12
+ "id": {
13
+ "type": "string"
14
+ },
15
+ "component": {
16
+ "type": "string",
17
+ "const": "SearchBox"
18
+ },
19
+ "suggestionsChild": {
20
+ "$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
21
+ "description": "The suggestions named slot: a static ComponentId of the QuerySuggestions node that draws the completions, mounted by name via children(suggestionsChild)."
22
+ },
23
+ "state": {
24
+ "$ref": "#/$defs/SearchBoxState"
25
+ },
26
+ "actions": {
27
+ "type": "object",
28
+ "properties": {},
29
+ "additionalProperties": false
30
+ }
31
+ },
32
+ "additionalProperties": false,
33
+ "$defs": {
34
+ "SearchBoxState": {
35
+ "title": "SearchBoxState",
36
+ "description": "Empty: what is typed stays on the renderer side.",
37
+ "type": "object",
38
+ "required": [],
39
+ "properties": {},
40
+ "additionalProperties": false
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/components/session-shell.schema.json",
4
+ "title": "SessionShell",
5
+ "description": "Root of the surface that lives for the whole session. Its children are the components that exist for the whole session; other surfaces stay independent of it. Dispatches initialize to open the session.",
6
+ "allOf": [
7
+ {
8
+ "$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
9
+ }
10
+ ],
11
+ "properties": {
12
+ "id": {
13
+ "type": "string"
14
+ },
15
+ "component": {
16
+ "type": "string",
17
+ "const": "SessionShell"
18
+ },
19
+ "children": {
20
+ "$ref": "https://schema.thermidor.coveo.com/definitions/child-list.schema.json",
21
+ "description": "The components that exist for the whole session, a ChildList of ComponentId references mounted in order via children(id).",
22
+ "$comment": "Homogeneous ordered-list composition: the ordered list is the semantics; child ids are static, passed through unresolved."
23
+ },
24
+ "state": {
25
+ "$ref": "#/$defs/SessionShellState"
26
+ },
27
+ "actions": {
28
+ "type": "object",
29
+ "required": ["initialize"],
30
+ "properties": {
31
+ "initialize": {
32
+ "$ref": "#/$defs/InitializeAction"
33
+ }
34
+ },
35
+ "additionalProperties": false
36
+ }
37
+ },
38
+ "additionalProperties": false,
39
+ "$defs": {
40
+ "SessionShellState": {
41
+ "title": "SessionShellState",
42
+ "description": "Empty: the shell holds no business data.",
43
+ "type": "object",
44
+ "required": [],
45
+ "properties": {},
46
+ "additionalProperties": false
47
+ },
48
+ "InitializeAction": {
49
+ "title": "initialize",
50
+ "description": "Opens the session. Sent before any component exists, with no surface id or source component, and only without a session token.",
51
+ "allOf": [
52
+ {
53
+ "$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
54
+ }
55
+ ],
56
+ "properties": {
57
+ "payload": {
58
+ "type": "object",
59
+ "properties": {},
60
+ "additionalProperties": false
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }