@coveo/thermidor-schema 1.0.0-beta.4 → 1.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/generated/schemas.d.ts +1545 -339
  2. package/dist/generated/schemas.js +557 -208
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.js +1 -1
  5. package/package.json +20 -19
  6. package/schema/base/catalog.schema.json +3 -2
  7. package/schema/base/component.schema.json +24 -33
  8. package/schema/{components/component-contracts.schema.json → component-contracts.schema.json} +8 -2
  9. package/schema/components/bundle-display.schema.json +9 -13
  10. package/schema/components/cart.schema.json +147 -0
  11. package/schema/components/category-facet.schema.json +29 -13
  12. package/schema/components/commerce-search.schema.json +129 -15
  13. package/schema/components/comparison-table.schema.json +21 -13
  14. package/schema/components/date-facet.schema.json +33 -13
  15. package/schema/components/facet-manager.schema.json +12 -14
  16. package/schema/components/layout-stack.schema.json +18 -15
  17. package/schema/components/next-actions-bar.schema.json +12 -15
  18. package/schema/components/numeric-facet.schema.json +37 -13
  19. package/schema/components/page-size.schema.json +13 -15
  20. package/schema/components/pagination.schema.json +41 -14
  21. package/schema/components/product-carousel.schema.json +13 -13
  22. package/schema/components/product-list.schema.json +75 -14
  23. package/schema/components/product-summary.schema.json +15 -14
  24. package/schema/components/query-suggestions.schema.json +113 -0
  25. package/schema/components/query-summary.schema.json +23 -14
  26. package/schema/components/regular-facet.schema.json +33 -13
  27. package/schema/components/sort.schema.json +13 -13
  28. package/schema/definitions/bundle-tier.schema.json +6 -1
  29. package/schema/definitions/child-list.schema.json +32 -0
  30. package/schema/definitions/component-id.schema.json +9 -0
  31. package/schema/definitions/data-binding.schema.json +16 -0
  32. package/schema/definitions/child-ref.schema.json +0 -8
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, 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, 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, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, } from './generated/schemas.js';
3
- export type { ActionItem, 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, ProductSummary, ProductSummaryActions, ProductSummaryState, QuerySummary, QuerySummaryState, RegularFacet, RegularFacetActions, RegularFacetSearch, RegularFacetSearchResult, RegularFacetState, RegularFacetToggleExcludePayload, RegularFacetToggleSelectPayload, RegularFacetToggleSingleExcludePayload, RegularFacetToggleSingleSelectPayload, RegularFacetValue, SelectActionPayload, SelectPagePayload, SelectSortPayload, SetPageSizePayload, Sort, SortActions, SortCriterion, SortState, BundleDisplayProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, LayoutStackProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, ProductSummaryProps, QuerySummaryProps, RegularFacetProps, SortProps, } from './generated/schemas.js';
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, 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, 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, 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, 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, ProductSummaryAction, QuerySummaryAction, RegularFacetAction, SortAction, BundleDisplayProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, LayoutStackProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, 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, 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, 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, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, } from './generated/schemas.js';
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, 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, 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, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
package/package.json CHANGED
@@ -1,23 +1,26 @@
1
1
  {
2
2
  "name": "@coveo/thermidor-schema",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
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
- "bugs": {
14
- "url": "https://github.com/coveo-platform/thermidor-schema/issues"
15
- },
16
- "homepage": "https://github.com/coveo-platform/thermidor-schema#readme",
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",
@@ -25,23 +28,21 @@
25
28
  },
26
29
  "./schema/*": "./schema/*"
27
30
  },
28
- "files": [
29
- "dist",
30
- "schema",
31
- "README.md",
32
- "LICENSE"
33
- ],
34
31
  "publishConfig": {
35
32
  "access": "public"
36
33
  },
37
- "peerDependencies": {
38
- "zod": "^4.4.3"
39
- },
40
34
  "devDependencies": {
35
+ "fast-check": "4.9.0",
41
36
  "typescript": "7.0.2",
42
37
  "vitest": "4.1.11",
43
38
  "zod": "4.4.3"
44
39
  },
40
+ "peerDependencies": {
41
+ "zod": "^4.4.3"
42
+ },
43
+ "engines": {
44
+ "node": ">=22.14.0"
45
+ },
45
46
  "scripts": {
46
47
  "build": "node scripts/clean-build.mjs && tsc --project tsconfig.json",
47
48
  "test": "vitest run",
@@ -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": "A Catalog is the top-level registry of all available UI Components. It is the entry point of the Thermidor contract: both the backend (producer) and the frontend (consumer) reference the same Catalog to know what components exist and how they are structured. For the initial implementation, a Catalog corresponds to an A2-UI catalog.",
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 JSON Schema meta-annotation. Included here so that catalog documents may carry a '$schema' pointer to this schema for tooling support (IDE validation, etc.) without failing additionalProperties checks."
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,53 +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 Component is a discrete, renderable UI element. Components describe what can be rendered, not how it is rendered. Each component has a type, an observable state, and a set of available actions.",
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": ["componentId", "displayName", "componentType", "state", "actions"],
8
+ "required": ["id", "component"],
9
+ "not": {
10
+ "anyOf": [
11
+ {
12
+ "required": ["componentId"]
13
+ },
14
+ {
15
+ "required": ["componentType"]
16
+ }
17
+ ]
18
+ },
8
19
  "properties": {
9
- "componentId": {
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 identifier for this component (e.g. 'product-carousel'). Must be unique within a Catalog."
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>."
13
26
  },
14
- "displayName": {
27
+ "component": {
15
28
  "type": "string",
16
- "description": "Human-readable name for this component (e.g. 'Product Carousel')."
17
- },
18
- "description": {
19
- "type": "string",
20
- "description": "Human-readable description of this component's purpose and rendering intent."
21
- },
22
- "componentType": {
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. 'product-carousel'). 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
- },
39
- "children": {
40
- "type": "array",
41
- "items": {
42
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
43
- },
44
- "maxItems": 1000,
45
- "default": [],
46
- "description": "Ordered list of child component ids referencing other components in the same flat map. Order is backend-owned and meaningful for container components; referential integrity and uniqueness are owned by the backend and not enforced at parse time."
47
- },
48
- "child": {
49
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json",
50
- "description": "A single child component id following the A2-UI single-child convention."
51
43
  }
52
- },
53
- "additionalProperties": false
44
+ }
54
45
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schema.thermidor.coveo.com/components/component-contracts.schema.json",
3
+ "$id": "https://schema.thermidor.coveo.com/component-contracts.schema.json",
4
4
  "title": "Component Contracts",
5
- "description": "Discriminated index of component runtime contracts. componentType is the stable discriminant; componentId identifies a particular instance outside this static contract.",
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",
@@ -10,6 +10,12 @@
10
10
  {
11
11
  "$ref": "https://schema.thermidor.coveo.com/components/product-carousel.schema.json"
12
12
  },
13
+ {
14
+ "$ref": "https://schema.thermidor.coveo.com/components/cart.schema.json"
15
+ },
16
+ {
17
+ "$ref": "https://schema.thermidor.coveo.com/components/query-suggestions.schema.json"
18
+ },
13
19
  {
14
20
  "$ref": "https://schema.thermidor.coveo.com/components/next-actions-bar.schema.json"
15
21
  },
@@ -9,9 +9,16 @@
9
9
  }
10
10
  ],
11
11
  "properties": {
12
- "componentType": {
12
+ "id": {
13
+ "type": "string"
14
+ },
15
+ "component": {
13
16
  "type": "string",
14
- "const": "bundle-display"
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"
@@ -20,17 +27,6 @@
20
27
  "type": "object",
21
28
  "properties": {},
22
29
  "additionalProperties": false
23
- },
24
- "children": {
25
- "type": "array",
26
- "items": {
27
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
28
- },
29
- "maxItems": 1000,
30
- "default": []
31
- },
32
- "child": {
33
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
34
30
  }
35
31
  },
36
32
  "additionalProperties": false,
@@ -0,0 +1,147 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/components/cart.schema.json",
4
+ "title": "Cart",
5
+ "description": "Represents a commerce cart or checkout surface. The backend owns cart state; semantic cart mutations and purchase completion are dispatched through this component.",
6
+ "allOf": [
7
+ {
8
+ "$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
9
+ }
10
+ ],
11
+ "properties": {
12
+ "component": {
13
+ "type": "string",
14
+ "const": "Cart"
15
+ },
16
+ "id": {
17
+ "type": "string"
18
+ },
19
+ "state": {
20
+ "$ref": "#/$defs/CartState"
21
+ },
22
+ "actions": {
23
+ "type": "object",
24
+ "required": ["updateCart", "purchase"],
25
+ "properties": {
26
+ "updateCart": {
27
+ "$ref": "#/$defs/UpdateCartAction"
28
+ },
29
+ "purchase": {
30
+ "$ref": "#/$defs/PurchaseAction"
31
+ }
32
+ },
33
+ "additionalProperties": false
34
+ }
35
+ },
36
+ "additionalProperties": false,
37
+ "$defs": {
38
+ "CartState": {
39
+ "title": "CartState",
40
+ "description": "Cart state is backend-owned. This initial contract intentionally carries no presentation fields; it provides the canonical action anchor for cart mutations and checkout completion.",
41
+ "type": "object",
42
+ "properties": {},
43
+ "additionalProperties": false
44
+ },
45
+ "UpdateCartAction": {
46
+ "title": "updateCart",
47
+ "description": "Applies a semantic item update to the cart and records the corresponding commerce cart event.",
48
+ "allOf": [
49
+ {
50
+ "$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
51
+ }
52
+ ],
53
+ "properties": {
54
+ "payload": {
55
+ "type": "object",
56
+ "required": ["productId", "quantity", "operation"],
57
+ "properties": {
58
+ "productId": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "name": {
63
+ "type": "string"
64
+ },
65
+ "price": {
66
+ "type": ["number", "null"]
67
+ },
68
+ "quantity": {
69
+ "type": "integer",
70
+ "minimum": 1
71
+ },
72
+ "operation": {
73
+ "title": "CartUpdateOperation",
74
+ "type": "string",
75
+ "enum": ["add", "remove", "setQuantity"]
76
+ }
77
+ },
78
+ "additionalProperties": false
79
+ }
80
+ }
81
+ },
82
+ "PurchaseAction": {
83
+ "title": "purchase",
84
+ "description": "Records a completed commerce transaction.",
85
+ "allOf": [
86
+ {
87
+ "$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
88
+ }
89
+ ],
90
+ "properties": {
91
+ "payload": {
92
+ "type": "object",
93
+ "required": ["products", "transaction"],
94
+ "properties": {
95
+ "products": {
96
+ "type": "array",
97
+ "items": {
98
+ "$ref": "#/$defs/PurchaseProduct"
99
+ }
100
+ },
101
+ "transaction": {
102
+ "$ref": "#/$defs/Transaction"
103
+ }
104
+ },
105
+ "additionalProperties": false
106
+ }
107
+ }
108
+ },
109
+ "PurchaseProduct": {
110
+ "title": "PurchaseProduct",
111
+ "type": "object",
112
+ "required": ["productId", "quantity"],
113
+ "properties": {
114
+ "productId": {
115
+ "type": "string",
116
+ "minLength": 1
117
+ },
118
+ "name": {
119
+ "type": "string"
120
+ },
121
+ "price": {
122
+ "type": ["number", "null"]
123
+ },
124
+ "quantity": {
125
+ "type": "integer",
126
+ "minimum": 1
127
+ }
128
+ },
129
+ "additionalProperties": false
130
+ },
131
+ "Transaction": {
132
+ "title": "Transaction",
133
+ "type": "object",
134
+ "required": ["id", "revenue"],
135
+ "properties": {
136
+ "id": {
137
+ "type": "string",
138
+ "minLength": 1
139
+ },
140
+ "revenue": {
141
+ "type": "number"
142
+ }
143
+ },
144
+ "additionalProperties": false
145
+ }
146
+ }
147
+ }
@@ -9,9 +9,36 @@
9
9
  }
10
10
  ],
11
11
  "properties": {
12
- "componentType": {
12
+ "component": {
13
13
  "type": "string",
14
- "const": "category-facet"
14
+ "const": "CategoryFacet"
15
+ },
16
+ "id": {
17
+ "type": "string"
18
+ },
19
+ "field": {
20
+ "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
21
+ "description": "The index field the facet operates on, bound to /state/<id>/field."
22
+ },
23
+ "displayName": {
24
+ "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
25
+ "description": "The facet's human-readable label, bound to /state/<id>/displayName."
26
+ },
27
+ "values": {
28
+ "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
29
+ "description": "The category facet values, bound to /state/<id>/values."
30
+ },
31
+ "canShowMoreValues": {
32
+ "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
33
+ "description": "Whether more facet values can be shown, bound to /state/<id>/canShowMoreValues."
34
+ },
35
+ "canShowLessValues": {
36
+ "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
37
+ "description": "Whether fewer facet values can be shown, bound to /state/<id>/canShowLessValues."
38
+ },
39
+ "facetSearch": {
40
+ "$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
41
+ "description": "The facet search state, bound to /state/<id>/facetSearch."
15
42
  },
16
43
  "state": {
17
44
  "$ref": "#/$defs/CategoryFacetState"
@@ -51,17 +78,6 @@
51
78
  }
52
79
  },
53
80
  "additionalProperties": false
54
- },
55
- "children": {
56
- "type": "array",
57
- "items": {
58
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
59
- },
60
- "maxItems": 1000,
61
- "default": []
62
- },
63
- "child": {
64
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
65
81
  }
66
82
  },
67
83
  "additionalProperties": false,
@@ -2,40 +2,47 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.thermidor.coveo.com/components/commerce-search.schema.json",
4
4
  "title": "CommerceSearch",
5
- "description": "Surface-root component for a commerce search surface. Its componentType carries the surface intent; it owns the surface's top-level components via children and dispatches submitQuery when the user submits a new query.",
5
+ "description": "Surface-root component for a commerce search surface. Its component discriminant carries the surface intent; it owns the surface's top-level components via named child slots and dispatches search lifecycle actions (submitQuery, restoreState, overrideCorrection).",
6
6
  "allOf": [
7
7
  {
8
8
  "$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
9
9
  }
10
10
  ],
11
11
  "properties": {
12
- "componentType": {
12
+ "id": {
13
+ "type": "string"
14
+ },
15
+ "component": {
13
16
  "type": "string",
14
- "const": "commerce-search"
17
+ "const": "CommerceSearch"
18
+ },
19
+ "sidebarChild": {
20
+ "$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
21
+ "description": "The sidebar named slot: a static ComponentId the renderer mounts by name via children(sidebarChild).",
22
+ "$comment": "Heterogeneous named-slot composition: CommerceSearch uses named ComponentId slots (sidebar, main) rather than a positional children[] array."
23
+ },
24
+ "mainChild": {
25
+ "$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
26
+ "description": "The main-area named slot: a static ComponentId the renderer mounts by name via children(mainChild)."
15
27
  },
16
28
  "state": {
17
29
  "$ref": "#/$defs/CommerceSearchState"
18
30
  },
19
31
  "actions": {
20
32
  "type": "object",
21
- "required": ["submitQuery"],
33
+ "required": ["submitQuery", "restoreState", "overrideCorrection"],
22
34
  "properties": {
23
35
  "submitQuery": {
24
36
  "$ref": "#/$defs/SubmitQueryAction"
37
+ },
38
+ "restoreState": {
39
+ "$ref": "#/$defs/RestoreStateAction"
40
+ },
41
+ "overrideCorrection": {
42
+ "$ref": "#/$defs/OverrideCorrectionAction"
25
43
  }
26
44
  },
27
45
  "additionalProperties": false
28
- },
29
- "children": {
30
- "type": "array",
31
- "items": {
32
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
33
- },
34
- "maxItems": 1000,
35
- "default": []
36
- },
37
- "child": {
38
- "$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
39
46
  }
40
47
  },
41
48
  "additionalProperties": false,
@@ -67,6 +74,113 @@
67
74
  "additionalProperties": false
68
75
  }
69
76
  }
77
+ },
78
+ "RestoreStateAction": {
79
+ "title": "restoreState",
80
+ "description": "Restores a commerce-search surface from externally persisted search state.",
81
+ "allOf": [
82
+ {
83
+ "$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
84
+ }
85
+ ],
86
+ "properties": {
87
+ "payload": {
88
+ "type": "object",
89
+ "required": ["query", "page", "pageSize"],
90
+ "properties": {
91
+ "query": {
92
+ "type": "string"
93
+ },
94
+ "page": {
95
+ "type": "integer",
96
+ "minimum": 0
97
+ },
98
+ "pageSize": {
99
+ "type": "integer",
100
+ "minimum": 1
101
+ },
102
+ "sortCriteria": {
103
+ "type": "string"
104
+ },
105
+ "facets": {
106
+ "type": "array",
107
+ "items": {
108
+ "$ref": "#/$defs/FacetRestore"
109
+ }
110
+ },
111
+ "pinnedProducts": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string"
115
+ }
116
+ }
117
+ },
118
+ "additionalProperties": false
119
+ }
120
+ }
121
+ },
122
+ "OverrideCorrectionAction": {
123
+ "title": "overrideCorrection",
124
+ "description": "Re-runs a search with the shopper's original query instead of an automatic correction.",
125
+ "allOf": [
126
+ {
127
+ "$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
128
+ }
129
+ ],
130
+ "properties": {
131
+ "payload": {
132
+ "type": "object",
133
+ "required": ["originalQuery"],
134
+ "properties": {
135
+ "originalQuery": {
136
+ "type": "string",
137
+ "minLength": 1
138
+ }
139
+ },
140
+ "additionalProperties": false
141
+ }
142
+ }
143
+ },
144
+ "FacetRestore": {
145
+ "title": "FacetRestore",
146
+ "type": "object",
147
+ "required": ["facetId"],
148
+ "properties": {
149
+ "facetId": {
150
+ "type": "string",
151
+ "minLength": 1
152
+ },
153
+ "values": {
154
+ "type": "array",
155
+ "items": {
156
+ "type": "string"
157
+ }
158
+ },
159
+ "numericRanges": {
160
+ "type": "array",
161
+ "items": {
162
+ "$ref": "#/$defs/NumericRangeRestore"
163
+ }
164
+ }
165
+ },
166
+ "additionalProperties": false
167
+ },
168
+ "NumericRangeRestore": {
169
+ "title": "NumericRangeRestore",
170
+ "type": "object",
171
+ "required": ["start", "end"],
172
+ "properties": {
173
+ "start": {
174
+ "type": "number"
175
+ },
176
+ "end": {
177
+ "type": "number"
178
+ },
179
+ "endInclusive": {
180
+ "type": "boolean"
181
+ }
182
+ },
183
+ "additionalProperties": false
70
184
  }
71
185
  }
72
186
  }