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

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 (65) hide show
  1. package/README.md +32 -5
  2. package/dist/generated/schemas.d.ts +3668 -560
  3. package/dist/generated/schemas.js +912 -285
  4. package/dist/generated/zod3/index.d.ts +3 -0
  5. package/dist/generated/zod3/index.js +5 -0
  6. package/dist/generated/zod3/schemas.d.ts +32331 -0
  7. package/dist/generated/zod3/schemas.js +1282 -0
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +1 -1
  10. package/dist/zod3-compat.d.ts +79 -0
  11. package/dist/zod3-compat.js +82 -0
  12. package/package.json +28 -22
  13. package/schema/base/catalog.schema.json +5 -4
  14. package/schema/base/component.schema.json +22 -33
  15. package/schema/{components/component-contracts.schema.json → component-contracts.schema.json} +23 -2
  16. package/schema/components/breadbox.schema.json +82 -0
  17. package/schema/components/bundle-display.schema.json +17 -13
  18. package/schema/components/cart.schema.json +147 -0
  19. package/schema/components/category-facet.schema.json +30 -16
  20. package/schema/components/commerce-search.schema.json +111 -15
  21. package/schema/components/comparison-table.schema.json +21 -13
  22. package/schema/components/date-facet.schema.json +35 -15
  23. package/schema/components/facet-manager.schema.json +12 -14
  24. package/schema/components/instant-products.schema.json +85 -0
  25. package/schema/components/layout-stack.schema.json +19 -15
  26. package/schema/components/next-actions-bar.schema.json +44 -17
  27. package/schema/components/numeric-facet.schema.json +39 -17
  28. package/schema/components/page-size.schema.json +13 -15
  29. package/schema/components/pagination.schema.json +28 -27
  30. package/schema/components/product-carousel.schema.json +13 -13
  31. package/schema/components/product-list.schema.json +75 -14
  32. package/schema/components/product-research-card.schema.json +107 -0
  33. package/schema/components/product-summary.schema.json +15 -14
  34. package/schema/components/query-suggestions.schema.json +102 -0
  35. package/schema/components/query-summary.schema.json +70 -16
  36. package/schema/components/regular-facet.schema.json +40 -93
  37. package/schema/components/search-box.schema.json +47 -0
  38. package/schema/components/session-shell.schema.json +65 -0
  39. package/schema/components/sort.schema.json +22 -16
  40. package/schema/definitions/action-item.schema.json +10 -13
  41. package/schema/definitions/badge-placement.schema.json +22 -0
  42. package/schema/definitions/badge.schema.json +27 -0
  43. package/schema/definitions/breadbox-date-range-facet.schema.json +56 -0
  44. package/schema/definitions/breadbox-deselect-date-range.schema.json +28 -0
  45. package/schema/definitions/breadbox-deselect-hierarchical-path.schema.json +28 -0
  46. package/schema/definitions/breadbox-deselect-numerical-range.schema.json +28 -0
  47. package/schema/definitions/breadbox-deselect-payload.schema.json +20 -0
  48. package/schema/definitions/breadbox-deselect-regular-value.schema.json +25 -0
  49. package/schema/definitions/breadbox-facet.schema.json +20 -0
  50. package/schema/definitions/breadbox-hierarchical-facet.schema.json +37 -0
  51. package/schema/definitions/breadbox-numerical-range-facet.schema.json +56 -0
  52. package/schema/definitions/breadbox-regular-facet.schema.json +59 -0
  53. package/schema/definitions/bundle-tier.schema.json +6 -1
  54. package/schema/definitions/child-list.schema.json +32 -0
  55. package/schema/definitions/comparison-product.schema.json +7 -2
  56. package/schema/definitions/component-id.schema.json +9 -0
  57. package/schema/definitions/data-binding.schema.json +16 -0
  58. package/schema/definitions/facet-value-state.schema.json +1 -1
  59. package/schema/definitions/followup-action-item.schema.json +20 -0
  60. package/schema/definitions/product.schema.json +10 -6
  61. package/schema/definitions/search-action-item.schema.json +20 -0
  62. package/schema/definitions/search-option-action-item.schema.json +25 -0
  63. package/schema/definitions/sort-field.schema.json +26 -0
  64. package/schema/definitions/child-ref.schema.json +0 -8
  65. package/schema/definitions/selectable-facet-value-state.schema.json +0 -8
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/definitions/followup-action-item.schema.json",
4
+ "title": "FollowupActionItem",
5
+ "description": "An ActionItem that triggers a conversational follow-up.",
6
+ "type": "object",
7
+ "required": ["text", "type"],
8
+ "properties": {
9
+ "text": {
10
+ "type": "string",
11
+ "description": "The display text of the action shown to the user."
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "const": "followup",
16
+ "description": "The ActionItem discriminator."
17
+ }
18
+ },
19
+ "additionalProperties": false
20
+ }
@@ -41,12 +41,12 @@
41
41
  },
42
42
  "ec_images": {
43
43
  "type": "array",
44
- "items": {"type": "string", "format": "uri"},
44
+ "items": {"type": "string"},
45
45
  "description": "Full-resolution image URLs, in display order."
46
46
  },
47
47
  "ec_thumbnails": {
48
48
  "type": "array",
49
- "items": {"type": "string", "format": "uri"},
49
+ "items": {"type": "string"},
50
50
  "description": "Thumbnail image URLs, in display order."
51
51
  },
52
52
  "ec_in_stock": {
@@ -56,7 +56,6 @@
56
56
  "ec_rating": {
57
57
  "type": ["number", "null"],
58
58
  "minimum": 0,
59
- "maximum": 5,
60
59
  "description": "Average customer rating on a 0-5 scale. Null when no ratings exist."
61
60
  },
62
61
  "ec_color": {
@@ -73,15 +72,20 @@
73
72
  },
74
73
  "clickUri": {
75
74
  "type": "string",
76
- "format": "uri",
77
- "$comment": "TODO(quicktype): Restore format: uri-reference when quicktype-core preserves that JSON Schema format through its TypeGraph.",
78
- "description": "Absolute URL to the product detail page."
75
+ "description": "URL of the product detail page."
79
76
  },
80
77
  "additionalFields": {
81
78
  "type": "object",
82
79
  "description": "Catch-all bag for any extra fields returned by the index that are not part of the standard schema.",
83
80
  "additionalProperties": true
84
81
  },
82
+ "badgePlacements": {
83
+ "type": "array",
84
+ "items": {
85
+ "$ref": "https://schema.thermidor.coveo.com/definitions/badge-placement.schema.json"
86
+ },
87
+ "description": "Badges the product earned, grouped by badge placement. Absent or empty when the product has no badges."
88
+ },
85
89
  "children": {
86
90
  "type": "array",
87
91
  "items": {"$ref": "#"},
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/definitions/search-action-item.schema.json",
4
+ "title": "SearchActionItem",
5
+ "description": "An ActionItem that triggers a standalone search.",
6
+ "type": "object",
7
+ "required": ["text", "type"],
8
+ "properties": {
9
+ "text": {
10
+ "type": "string",
11
+ "description": "The display text of the action shown to the user."
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "const": "search",
16
+ "description": "The ActionItem discriminator."
17
+ }
18
+ },
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/definitions/search-option-action-item.schema.json",
4
+ "title": "SearchOptionActionItem",
5
+ "description": "An ActionItem that opens a search the backend saved behind it. Selecting it dispatches selectSearchOption with its optionId and text.",
6
+ "type": "object",
7
+ "required": ["text", "type", "optionId"],
8
+ "properties": {
9
+ "text": {
10
+ "type": "string",
11
+ "description": "The display text of the action shown to the user."
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "const": "searchOption",
16
+ "description": "The ActionItem discriminator."
17
+ },
18
+ "optionId": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "description": "Opaque identifier of the search the backend saved behind the action. Set only by the backend; the frontend sends it back unchanged in the selectSearchOption payload so the backend can run that search."
22
+ }
23
+ },
24
+ "additionalProperties": false
25
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/definitions/sort-field.schema.json",
4
+ "title": "SortField",
5
+ "description": "One field a sort criterion sorts on, with its direction.",
6
+ "type": "object",
7
+ "required": ["field", "direction"],
8
+ "properties": {
9
+ "field": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "description": "The name of the field to sort on (e.g. 'ec_price')."
13
+ },
14
+ "direction": {
15
+ "title": "SortDirection",
16
+ "type": "string",
17
+ "enum": ["asc", "desc"],
18
+ "description": "The sort direction: ascending or descending."
19
+ },
20
+ "displayName": {
21
+ "type": "string",
22
+ "description": "The label to show for this sort field (e.g. 'Price (Low to High)'). Omitted when the search service provides none."
23
+ }
24
+ },
25
+ "additionalProperties": false
26
+ }
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json",
4
- "title": "ChildRef",
5
- "type": "string",
6
- "pattern": "^[a-z][a-z0-9-]*$",
7
- "description": "A reference to another component in the same flat map, by componentId."
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schema.thermidor.coveo.com/definitions/selectable-facet-value-state.schema.json",
4
- "title": "SelectableFacetValueState",
5
- "description": "The selection state of a facet value that supports selection but not exclusion (e.g. numeric and date facets). Constrained to 'idle' or 'selected'.",
6
- "type": "string",
7
- "enum": ["idle", "selected"]
8
- }