@coveo/thermidor-schema 1.0.0-beta.1 → 1.0.0-beta.13
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/README.md +32 -5
- package/dist/generated/schemas.d.ts +2547 -378
- package/dist/generated/schemas.js +689 -143
- package/dist/generated/zod3/schemas.d.ts +23821 -0
- package/dist/generated/zod3/schemas.js +1087 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/zod3/index.d.ts +3 -0
- package/dist/zod3/index.js +5 -0
- package/dist/zod3-compat.d.ts +79 -0
- package/dist/zod3-compat.js +82 -0
- package/package.json +26 -20
- package/schema/base/catalog.schema.json +3 -2
- package/schema/base/component.schema.json +24 -20
- package/schema/{components/component-contracts.schema.json → component-contracts.schema.json} +23 -5
- package/schema/components/bundle-display.schema.json +11 -6
- package/schema/components/cart.schema.json +85 -46
- package/schema/components/category-facet.schema.json +35 -24
- package/schema/components/commerce-search.schema.json +186 -0
- package/schema/components/comparison-table.schema.json +35 -11
- package/schema/components/date-facet.schema.json +39 -26
- package/schema/components/facet-manager.schema.json +16 -18
- package/schema/components/layout-stack.schema.json +50 -0
- package/schema/components/next-actions-bar.schema.json +16 -18
- package/schema/components/numeric-facet.schema.json +43 -26
- package/schema/components/page-size.schema.json +79 -0
- package/schema/components/pagination.schema.json +45 -19
- package/schema/components/product-carousel.schema.json +15 -7
- package/schema/components/product-list.schema.json +77 -7
- package/schema/components/product-research-card.schema.json +70 -0
- package/schema/components/product-summary.schema.json +64 -0
- package/schema/components/query-suggestions.schema.json +113 -0
- package/schema/components/query-summary.schema.json +76 -0
- package/schema/components/regular-facet.schema.json +42 -32
- package/schema/components/sort.schema.json +18 -18
- package/schema/definitions/bundle-tier.schema.json +9 -4
- package/schema/definitions/child-list.schema.json +32 -0
- package/schema/definitions/comparison-attribute.schema.json +2 -2
- package/schema/definitions/comparison-product.schema.json +2 -2
- package/schema/definitions/component-id.schema.json +9 -0
- package/schema/definitions/data-binding.schema.json +16 -0
- package/schema/components/search-box.schema.json +0 -74
- package/schema/definitions/cart-item.schema.json +0 -29
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,
|
|
3
|
-
export type { ActionItem,
|
|
2
|
+
export { ActionItemSchema, 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, 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, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
|
|
3
|
+
export type { ActionItem, 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, FacetValueState, SelectableFacetValueState, LayoutStack, LayoutStackState, NextActionsBar, NextActionsState, NumericFacet, NumericFacetActions, NumericFacetCustomRange, NumericFacetDomain, NumericFacetApplyCustomRangePayload, NumericFacetState, NumericFacetToggleSelectPayload, NumericFacetToggleSingleSelectPayload, NumericFacetValue, PageSize, PageSizeActions, PageSizeState, Pagination, PaginationActions, PaginationState, Product, ProductCarousel, ProductCarouselState, ProductList, ProductListActions, ProductListState, ProductResearchCard, ProductResearchCardActions, ProductResearchCardState, ProductSummary, ProductSummaryActions, ProductSummaryState, QuerySummary, QuerySummaryState, RegularFacet, RegularFacetActions, RegularFacetSearch, RegularFacetSearchResult, RegularFacetState, RegularFacetToggleExcludePayload, RegularFacetToggleSelectPayload, RegularFacetToggleSingleExcludePayload, RegularFacetToggleSingleSelectPayload, RegularFacetValue, SelectActionPayload, SelectPagePayload, SelectSortPayload, SetPageSizePayload, Sort, SortActions, SortCriterion, SortState, DataBinding, FunctionCall, DynamicNumber, DynamicString, DynamicBoolean, DynamicStringList, DynamicValue, DynamicAction, BundleDisplayAction, CategoryFacetAction, CommerceSearchAction, ComparisonTableAction, DateFacetAction, FacetManagerAction, LayoutStackAction, NextActionsBarAction, NumericFacetAction, PageSizeAction, PaginationAction, ProductCarouselAction, ProductListAction, ProductResearchCardAction, ProductSummaryAction, QuerySummaryAction, RegularFacetAction, SortAction, BundleDisplayProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, LayoutStackProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, ProductResearchCardProps, ProductSummaryProps, 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,
|
|
2
|
+
export { ActionItemSchema, 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, 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, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const THERMIDOR_CATALOG_ID = "https://schema.thermidor.coveo.com/a2-ui/catalog.json";
|
|
2
|
+
export { ActionItemSchema, 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, 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, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from '../generated/zod3/schemas.js';
|
|
3
|
+
export type { ActionItem, 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, FacetValueState, SelectableFacetValueState, LayoutStack, LayoutStackState, NextActionsBar, NextActionsState, NumericFacet, NumericFacetActions, NumericFacetCustomRange, NumericFacetDomain, NumericFacetApplyCustomRangePayload, NumericFacetState, NumericFacetToggleSelectPayload, NumericFacetToggleSingleSelectPayload, NumericFacetValue, PageSize, PageSizeActions, PageSizeState, Pagination, PaginationActions, PaginationState, Product, ProductCarousel, ProductCarouselState, ProductList, ProductListActions, ProductListState, ProductResearchCard, ProductResearchCardActions, ProductResearchCardState, ProductSummary, ProductSummaryActions, ProductSummaryState, QuerySummary, QuerySummaryState, RegularFacet, RegularFacetActions, RegularFacetSearch, RegularFacetSearchResult, RegularFacetState, RegularFacetToggleExcludePayload, RegularFacetToggleSelectPayload, RegularFacetToggleSingleExcludePayload, RegularFacetToggleSingleSelectPayload, RegularFacetValue, SelectActionPayload, SelectPagePayload, SelectSortPayload, SetPageSizePayload, Sort, SortActions, SortCriterion, SortState, DataBinding, FunctionCall, DynamicNumber, DynamicString, DynamicBoolean, DynamicStringList, DynamicValue, DynamicAction, BundleDisplayAction, CategoryFacetAction, CommerceSearchAction, ComparisonTableAction, DateFacetAction, FacetManagerAction, LayoutStackAction, NextActionsBarAction, NumericFacetAction, PageSizeAction, PaginationAction, ProductCarouselAction, ProductListAction, ProductResearchCardAction, ProductSummaryAction, QuerySummaryAction, RegularFacetAction, SortAction, BundleDisplayProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, LayoutStackProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, ProductResearchCardProps, ProductSummaryProps, QuerySummaryProps, RegularFacetProps, SortProps, } from '../generated/zod3/schemas.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file is generated from src/index.ts; it mirrors the curated public surface
|
|
2
|
+
// of the default entry point against the Zod 3 schema build.
|
|
3
|
+
// Do not edit it directly; run `mise run generate` from the repository root.
|
|
4
|
+
export const THERMIDOR_CATALOG_ID = 'https://schema.thermidor.coveo.com/a2-ui/catalog.json';
|
|
5
|
+
export { ActionItemSchema, 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, 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, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from '../generated/zod3/schemas.js';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod 3 compatibility layer for the `./zod3` schema build.
|
|
3
|
+
*
|
|
4
|
+
* ## Why this exists
|
|
5
|
+
*
|
|
6
|
+
* The canonical generated schemas (`src/generated/schemas.ts`) are emitted in the
|
|
7
|
+
* Zod 4 dialect and import `zod/v4`. Some consumers are pinned to Zod 3 by a
|
|
8
|
+
* dependency they do not control — most notably the frozen A2-UI renderer, whose
|
|
9
|
+
* binder (`@a2ui/web_core`) resolves `{ path }` data bindings by reading **Zod 3**
|
|
10
|
+
* runtime internals. Handing such a consumer a Zod 4 schema means every field is
|
|
11
|
+
* misclassified and bindings leak to the renderer unresolved.
|
|
12
|
+
*
|
|
13
|
+
* Rather than ask those consumers to rebuild our schemas at runtime, the package
|
|
14
|
+
* ships a second, pre-built entry point (`@coveo/thermidor-schema/zod3`) whose
|
|
15
|
+
* schemas are real Zod 3 objects. That build reuses the SAME generated source and
|
|
16
|
+
* only swaps its Zod import for this module.
|
|
17
|
+
*
|
|
18
|
+
* ## How it works
|
|
19
|
+
*
|
|
20
|
+
* `import * as z from 'zod/v3'` already exposes every builder the generated source
|
|
21
|
+
* uses (`string`, `number`, `object`, `array`, `union`, `discriminatedUnion`,
|
|
22
|
+
* `literal`, `enum`, `record`, `unknown`, `null`, `never`, the `infer` type, and the
|
|
23
|
+
* `.min/.max/.int/.regex/.optional` refinements) with identical call signatures.
|
|
24
|
+
*
|
|
25
|
+
* Exactly three constructors in the generated output have no Zod 3 counterpart under
|
|
26
|
+
* the same name. They are defined here in terms of their Zod 3 equivalents:
|
|
27
|
+
*
|
|
28
|
+
* | Zod 4 (generated) | Zod 3 equivalent |
|
|
29
|
+
* | --------------------- | -------------------------------- |
|
|
30
|
+
* | `z.strictObject(s)` | `z.object(s).strict()` |
|
|
31
|
+
* | `z.looseObject(s)` | `z.object(s).passthrough()` |
|
|
32
|
+
* | `z.url()` | `z.string().url()` |
|
|
33
|
+
*
|
|
34
|
+
* `z.union` needs one further accommodation: Zod 4 accepts a single-member union,
|
|
35
|
+
* Zod 3 requires at least two. A one-member union is semantically the member
|
|
36
|
+
* itself, so the override below unwraps it — preserving the inferred type exactly
|
|
37
|
+
* (see the overloads).
|
|
38
|
+
*
|
|
39
|
+
* `z.record(key, value)` is emitted in its two-argument form, which Zod 3 accepts
|
|
40
|
+
* unchanged, so it needs no shim.
|
|
41
|
+
*
|
|
42
|
+
* Because this module is a superset of `zod/v3`, the generated source compiles and
|
|
43
|
+
* runs against it verbatim — the dialect difference is confined to these functions,
|
|
44
|
+
* and adding a component to the canonical JSON Schema requires no change here.
|
|
45
|
+
* (Explicit exports below take precedence over the `export *`, which is how
|
|
46
|
+
* `union` overrides the Zod 3 original.)
|
|
47
|
+
*
|
|
48
|
+
* ## Stability
|
|
49
|
+
*
|
|
50
|
+
* This is a build-time dialect adapter, not a runtime schema rewriter: the schemas
|
|
51
|
+
* it produces ARE Zod 3 schemas, constructed by Zod 3 itself. There is no
|
|
52
|
+
* reflection over Zod internals and nothing to keep in sync with a Zod release.
|
|
53
|
+
*/
|
|
54
|
+
export * from 'zod/v3';
|
|
55
|
+
import * as z3 from 'zod/v3';
|
|
56
|
+
/**
|
|
57
|
+
* Zod 4's `z.strictObject(shape)` — an object schema that rejects unknown keys.
|
|
58
|
+
* Zod 3 spells the same thing `z.object(shape).strict()`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function strictObject<T extends z3.ZodRawShape>(shape: T): z3.ZodObject<T, "strict", z3.ZodTypeAny, z3.objectUtil.addQuestionMarks<z3.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z3.baseObjectInputType<T> extends infer T_2 ? { [k in keyof T_2]: T_2[k]; } : never>;
|
|
61
|
+
/**
|
|
62
|
+
* Zod 4's `z.looseObject(shape)` — an object schema that preserves unknown keys.
|
|
63
|
+
* Zod 3 spells the same thing `z.object(shape).passthrough()`.
|
|
64
|
+
*/
|
|
65
|
+
export declare function looseObject<T extends z3.ZodRawShape>(shape: T): z3.ZodObject<T, "passthrough", z3.ZodTypeAny, z3.objectOutputType<T, z3.ZodTypeAny, "passthrough">, z3.objectInputType<T, z3.ZodTypeAny, "passthrough">>;
|
|
66
|
+
/**
|
|
67
|
+
* Zod 4's top-level `z.url()` string format. In Zod 3 the URL check is a
|
|
68
|
+
* refinement on the string schema: `z.string().url()`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function url(): z3.ZodString;
|
|
71
|
+
/**
|
|
72
|
+
* `z.union`, widened to accept the single-member unions Zod 4 permits (the
|
|
73
|
+
* generated action unions use one member for a component that declares exactly one
|
|
74
|
+
* action). Zod 3's `union` requires a two-element tuple, so a one-member union is
|
|
75
|
+
* unwrapped to the member itself — semantically identical, and the overload keeps
|
|
76
|
+
* `z.infer` precise instead of degrading to `any`.
|
|
77
|
+
*/
|
|
78
|
+
export declare function union<T extends z3.ZodTypeAny>(options: readonly [T]): T;
|
|
79
|
+
export declare function union<T extends readonly [z3.ZodTypeAny, z3.ZodTypeAny, ...z3.ZodTypeAny[]]>(options: T): z3.ZodUnion<T>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod 3 compatibility layer for the `./zod3` schema build.
|
|
3
|
+
*
|
|
4
|
+
* ## Why this exists
|
|
5
|
+
*
|
|
6
|
+
* The canonical generated schemas (`src/generated/schemas.ts`) are emitted in the
|
|
7
|
+
* Zod 4 dialect and import `zod/v4`. Some consumers are pinned to Zod 3 by a
|
|
8
|
+
* dependency they do not control — most notably the frozen A2-UI renderer, whose
|
|
9
|
+
* binder (`@a2ui/web_core`) resolves `{ path }` data bindings by reading **Zod 3**
|
|
10
|
+
* runtime internals. Handing such a consumer a Zod 4 schema means every field is
|
|
11
|
+
* misclassified and bindings leak to the renderer unresolved.
|
|
12
|
+
*
|
|
13
|
+
* Rather than ask those consumers to rebuild our schemas at runtime, the package
|
|
14
|
+
* ships a second, pre-built entry point (`@coveo/thermidor-schema/zod3`) whose
|
|
15
|
+
* schemas are real Zod 3 objects. That build reuses the SAME generated source and
|
|
16
|
+
* only swaps its Zod import for this module.
|
|
17
|
+
*
|
|
18
|
+
* ## How it works
|
|
19
|
+
*
|
|
20
|
+
* `import * as z from 'zod/v3'` already exposes every builder the generated source
|
|
21
|
+
* uses (`string`, `number`, `object`, `array`, `union`, `discriminatedUnion`,
|
|
22
|
+
* `literal`, `enum`, `record`, `unknown`, `null`, `never`, the `infer` type, and the
|
|
23
|
+
* `.min/.max/.int/.regex/.optional` refinements) with identical call signatures.
|
|
24
|
+
*
|
|
25
|
+
* Exactly three constructors in the generated output have no Zod 3 counterpart under
|
|
26
|
+
* the same name. They are defined here in terms of their Zod 3 equivalents:
|
|
27
|
+
*
|
|
28
|
+
* | Zod 4 (generated) | Zod 3 equivalent |
|
|
29
|
+
* | --------------------- | -------------------------------- |
|
|
30
|
+
* | `z.strictObject(s)` | `z.object(s).strict()` |
|
|
31
|
+
* | `z.looseObject(s)` | `z.object(s).passthrough()` |
|
|
32
|
+
* | `z.url()` | `z.string().url()` |
|
|
33
|
+
*
|
|
34
|
+
* `z.union` needs one further accommodation: Zod 4 accepts a single-member union,
|
|
35
|
+
* Zod 3 requires at least two. A one-member union is semantically the member
|
|
36
|
+
* itself, so the override below unwraps it — preserving the inferred type exactly
|
|
37
|
+
* (see the overloads).
|
|
38
|
+
*
|
|
39
|
+
* `z.record(key, value)` is emitted in its two-argument form, which Zod 3 accepts
|
|
40
|
+
* unchanged, so it needs no shim.
|
|
41
|
+
*
|
|
42
|
+
* Because this module is a superset of `zod/v3`, the generated source compiles and
|
|
43
|
+
* runs against it verbatim — the dialect difference is confined to these functions,
|
|
44
|
+
* and adding a component to the canonical JSON Schema requires no change here.
|
|
45
|
+
* (Explicit exports below take precedence over the `export *`, which is how
|
|
46
|
+
* `union` overrides the Zod 3 original.)
|
|
47
|
+
*
|
|
48
|
+
* ## Stability
|
|
49
|
+
*
|
|
50
|
+
* This is a build-time dialect adapter, not a runtime schema rewriter: the schemas
|
|
51
|
+
* it produces ARE Zod 3 schemas, constructed by Zod 3 itself. There is no
|
|
52
|
+
* reflection over Zod internals and nothing to keep in sync with a Zod release.
|
|
53
|
+
*/
|
|
54
|
+
export * from 'zod/v3';
|
|
55
|
+
import * as z3 from 'zod/v3';
|
|
56
|
+
/**
|
|
57
|
+
* Zod 4's `z.strictObject(shape)` — an object schema that rejects unknown keys.
|
|
58
|
+
* Zod 3 spells the same thing `z.object(shape).strict()`.
|
|
59
|
+
*/
|
|
60
|
+
export function strictObject(shape) {
|
|
61
|
+
return z3.object(shape).strict();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Zod 4's `z.looseObject(shape)` — an object schema that preserves unknown keys.
|
|
65
|
+
* Zod 3 spells the same thing `z.object(shape).passthrough()`.
|
|
66
|
+
*/
|
|
67
|
+
export function looseObject(shape) {
|
|
68
|
+
return z3.object(shape).passthrough();
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Zod 4's top-level `z.url()` string format. In Zod 3 the URL check is a
|
|
72
|
+
* refinement on the string schema: `z.string().url()`.
|
|
73
|
+
*/
|
|
74
|
+
export function url() {
|
|
75
|
+
return z3.string().url();
|
|
76
|
+
}
|
|
77
|
+
export function union(options) {
|
|
78
|
+
if (options.length === 1) {
|
|
79
|
+
return options[0];
|
|
80
|
+
}
|
|
81
|
+
return z3.union(options);
|
|
82
|
+
}
|
package/package.json
CHANGED
|
@@ -1,50 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/thermidor-schema",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.13",
|
|
4
4
|
"description": "Zod and TypeScript projections of the Thermidor JSON Schema contract.",
|
|
5
|
+
"homepage": "https://github.com/coveo-platform/thermidor-schema#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/coveo-platform/thermidor-schema/issues"
|
|
8
|
+
},
|
|
5
9
|
"license": "Apache-2.0",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"sideEffects": false,
|
|
8
10
|
"repository": {
|
|
9
11
|
"type": "git",
|
|
10
12
|
"url": "https://github.com/coveo-platform/thermidor-schema.git",
|
|
11
13
|
"directory": "packages/typescript"
|
|
12
14
|
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"schema",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"sideEffects": false,
|
|
17
23
|
"types": "./dist/index.d.ts",
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=22.14.0"
|
|
20
|
-
},
|
|
21
24
|
"exports": {
|
|
22
25
|
".": {
|
|
23
26
|
"types": "./dist/index.d.ts",
|
|
24
27
|
"import": "./dist/index.js"
|
|
25
28
|
},
|
|
29
|
+
"./zod3": {
|
|
30
|
+
"types": "./dist/zod3/index.d.ts",
|
|
31
|
+
"import": "./dist/zod3/index.js"
|
|
32
|
+
},
|
|
26
33
|
"./schema/*": "./schema/*"
|
|
27
34
|
},
|
|
28
|
-
"files": [
|
|
29
|
-
"dist",
|
|
30
|
-
"schema",
|
|
31
|
-
"README.md",
|
|
32
|
-
"LICENSE"
|
|
33
|
-
],
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|
|
36
37
|
},
|
|
37
|
-
"peerDependencies": {
|
|
38
|
-
"zod": "^4.4.3"
|
|
39
|
-
},
|
|
40
38
|
"devDependencies": {
|
|
39
|
+
"@types/node": "24.13.6",
|
|
40
|
+
"fast-check": "4.9.0",
|
|
41
41
|
"typescript": "7.0.2",
|
|
42
42
|
"vitest": "4.1.11",
|
|
43
43
|
"zod": "4.4.3"
|
|
44
44
|
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"zod": "^3.25 || ^4.4.3"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=22.14.0"
|
|
50
|
+
},
|
|
45
51
|
"scripts": {
|
|
46
52
|
"build": "node scripts/clean-build.mjs && tsc --project tsconfig.json",
|
|
47
53
|
"test": "vitest run",
|
|
48
|
-
"typecheck": "tsc --noEmit --project tsconfig.json"
|
|
54
|
+
"typecheck": "tsc --noEmit --project tsconfig.json && tsc --noEmit --project tsconfig.typecheck.json"
|
|
49
55
|
}
|
|
50
56
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/base/catalog.schema.json",
|
|
4
4
|
"title": "Catalog",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "The top-level registry of all available UI Components, and the entry point of the Thermidor contract: backend (producer) and frontend (consumer) reference the same Catalog to know what components exist and how they are structured.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["catalogId", "version", "components"],
|
|
8
8
|
"properties": {
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"$schema": {
|
|
32
32
|
"type": "string",
|
|
33
|
-
"description": "Optional
|
|
33
|
+
"description": "Optional '$schema' pointer to this schema, for tooling support (IDE validation, etc.).",
|
|
34
|
+
"$comment": "Declared so catalog documents may carry '$schema' without failing additionalProperties."
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
37
|
"additionalProperties": false
|
|
@@ -2,40 +2,44 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/base/component.schema.json",
|
|
4
4
|
"title": "Component",
|
|
5
|
-
"description": "A
|
|
5
|
+
"description": "A discrete, renderable UI element describing what to render, not how. Following the A2-UI v1.0 adjacency-list model, the node is flat: a single id/component identity with top-level properties; `state`/`actions` are Thermidor backend-contract extensions.",
|
|
6
|
+
"$comment": "The base declares only the shared trunk (id/component/state/actions) and is intentionally open: with allOf composition, a closed base would reject each component's own top-level properties, so every component contract closes itself with additionalProperties:false.",
|
|
6
7
|
"type": "object",
|
|
7
|
-
"required": ["
|
|
8
|
+
"required": ["id", "component"],
|
|
9
|
+
"not": {
|
|
10
|
+
"anyOf": [
|
|
11
|
+
{
|
|
12
|
+
"required": ["componentId"]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"required": ["componentType"]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
8
19
|
"properties": {
|
|
9
|
-
"
|
|
20
|
+
"id": {
|
|
10
21
|
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"maxLength": 256,
|
|
11
24
|
"pattern": "^[a-z][a-z0-9-]*$",
|
|
12
|
-
"description": "Stable kebab-case
|
|
13
|
-
},
|
|
14
|
-
"displayName": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Human-readable name for this component (e.g. 'Product Carousel')."
|
|
25
|
+
"description": "Stable kebab-case node identity, unique within a surface. Also the state root key: the component's Component_State lives at statePath(id) = /state/<id>."
|
|
17
26
|
},
|
|
18
|
-
"
|
|
27
|
+
"component": {
|
|
19
28
|
"type": "string",
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"type": "string",
|
|
24
|
-
"pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
|
|
25
|
-
"maxLength": 128,
|
|
26
|
-
"description": "Stable kebab-case type identifier (e.g. 'cart'). Used as discriminant for contract resolution."
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"maxLength": 256,
|
|
31
|
+
"description": "PascalCase catalog key used as the discriminant for contract resolution (e.g. 'Pagination', 'CommerceSearch', 'RegularFacet')."
|
|
27
32
|
},
|
|
28
33
|
"state": {
|
|
29
34
|
"type": "object",
|
|
30
|
-
"description": "The observable state owned by the backend. An empty object {} is valid for components with no observable state."
|
|
35
|
+
"description": "The observable state owned by the backend. An empty object {} is valid for components with no observable state. A Thermidor backend-contract extension, not part of the A2-UI catalog component model."
|
|
31
36
|
},
|
|
32
37
|
"actions": {
|
|
33
38
|
"type": "object",
|
|
34
|
-
"description": "Map of available actions. Each value conforms to base/action.schema.json. An empty object {} is valid for read-only components.",
|
|
39
|
+
"description": "Map of available actions. Each value conforms to base/action.schema.json. An empty object {} is valid for read-only components. A Thermidor backend-contract extension, not part of the A2-UI catalog component model.",
|
|
35
40
|
"additionalProperties": {
|
|
36
41
|
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
|
-
}
|
|
40
|
-
"additionalProperties": false
|
|
44
|
+
}
|
|
41
45
|
}
|
package/schema/{components/component-contracts.schema.json → component-contracts.schema.json}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.thermidor.coveo.com/
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/component-contracts.schema.json",
|
|
4
4
|
"title": "Component Contracts",
|
|
5
|
-
"description": "Discriminated index of component runtime contracts.
|
|
5
|
+
"description": "Discriminated index of component runtime contracts. The PascalCase 'component' key is the stable discriminant; the kebab-case 'id' identifies a particular instance outside this static contract.",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"ComponentContracts": {
|
|
8
8
|
"title": "ComponentContracts",
|
|
@@ -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/query-suggestions.schema.json"
|
|
18
|
+
},
|
|
16
19
|
{
|
|
17
20
|
"$ref": "https://schema.thermidor.coveo.com/components/next-actions-bar.schema.json"
|
|
18
21
|
},
|
|
@@ -26,13 +29,16 @@
|
|
|
26
29
|
"$ref": "https://schema.thermidor.coveo.com/components/product-list.schema.json"
|
|
27
30
|
},
|
|
28
31
|
{
|
|
29
|
-
"$ref": "https://schema.thermidor.coveo.com/components/
|
|
32
|
+
"$ref": "https://schema.thermidor.coveo.com/components/product-summary.schema.json"
|
|
30
33
|
},
|
|
31
34
|
{
|
|
32
|
-
"$ref": "https://schema.thermidor.coveo.com/components/
|
|
35
|
+
"$ref": "https://schema.thermidor.coveo.com/components/product-research-card.schema.json"
|
|
33
36
|
},
|
|
34
37
|
{
|
|
35
|
-
"$ref": "https://schema.thermidor.coveo.com/components/
|
|
38
|
+
"$ref": "https://schema.thermidor.coveo.com/components/pagination.schema.json"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"$ref": "https://schema.thermidor.coveo.com/components/sort.schema.json"
|
|
36
42
|
},
|
|
37
43
|
{
|
|
38
44
|
"$ref": "https://schema.thermidor.coveo.com/components/regular-facet.schema.json"
|
|
@@ -48,6 +54,18 @@
|
|
|
48
54
|
},
|
|
49
55
|
{
|
|
50
56
|
"$ref": "https://schema.thermidor.coveo.com/components/facet-manager.schema.json"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"$ref": "https://schema.thermidor.coveo.com/components/commerce-search.schema.json"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"$ref": "https://schema.thermidor.coveo.com/components/layout-stack.schema.json"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"$ref": "https://schema.thermidor.coveo.com/components/query-summary.schema.json"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"$ref": "https://schema.thermidor.coveo.com/components/page-size.schema.json"
|
|
51
69
|
}
|
|
52
70
|
]
|
|
53
71
|
}
|
|
@@ -9,9 +9,16 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"properties": {
|
|
12
|
-
"
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"component": {
|
|
13
16
|
"type": "string",
|
|
14
|
-
"const": "
|
|
17
|
+
"const": "BundleDisplay"
|
|
18
|
+
},
|
|
19
|
+
"tiers": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The tiered bundle layout, bound to /state/<id>/tiers via a { \"path\": ... } Data_Binding."
|
|
15
22
|
},
|
|
16
23
|
"state": {
|
|
17
24
|
"$ref": "#/$defs/BundleDisplayState"
|
|
@@ -29,9 +36,7 @@
|
|
|
29
36
|
"description": "The tiered product bundle layout. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
30
37
|
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
31
38
|
"type": "object",
|
|
32
|
-
"required": [
|
|
33
|
-
"tiers"
|
|
34
|
-
],
|
|
39
|
+
"required": ["tiers"],
|
|
35
40
|
"properties": {
|
|
36
41
|
"tiers": {
|
|
37
42
|
"type": "array",
|
|
@@ -44,4 +49,4 @@
|
|
|
44
49
|
"additionalProperties": false
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
|
-
}
|
|
52
|
+
}
|