@coveo/thermidor-schema 0.0.0 → 1.0.0-beta.1

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 (33) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/dist/generated/schemas.d.ts +1823 -0
  4. package/dist/generated/schemas.js +539 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +2 -0
  7. package/package.json +46 -8
  8. package/schema/base/action.schema.json +12 -0
  9. package/schema/base/catalog.schema.json +37 -0
  10. package/schema/base/component.schema.json +41 -0
  11. package/schema/components/bundle-display.schema.json +47 -0
  12. package/schema/components/cart.schema.json +108 -0
  13. package/schema/components/category-facet.schema.json +292 -0
  14. package/schema/components/comparison-table.schema.json +54 -0
  15. package/schema/components/component-contracts.schema.json +55 -0
  16. package/schema/components/date-facet.schema.json +281 -0
  17. package/schema/components/facet-manager.schema.json +47 -0
  18. package/schema/components/next-actions-bar.schema.json +87 -0
  19. package/schema/components/numeric-facet.schema.json +303 -0
  20. package/schema/components/pagination.schema.json +123 -0
  21. package/schema/components/product-carousel.schema.json +52 -0
  22. package/schema/components/product-list.schema.json +46 -0
  23. package/schema/components/regular-facet.schema.json +385 -0
  24. package/schema/components/search-box.schema.json +74 -0
  25. package/schema/components/sort.schema.json +107 -0
  26. package/schema/definitions/action-item.schema.json +20 -0
  27. package/schema/definitions/bundle-tier.schema.json +44 -0
  28. package/schema/definitions/cart-item.schema.json +29 -0
  29. package/schema/definitions/comparison-attribute.schema.json +19 -0
  30. package/schema/definitions/comparison-product.schema.json +39 -0
  31. package/schema/definitions/facet-value-state.schema.json +8 -0
  32. package/schema/definitions/product.schema.json +92 -0
  33. package/schema/definitions/selectable-facet-value-state.schema.json +8 -0
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/definitions/comparison-product.schema.json",
4
+ "title": "ComparisonProduct",
5
+ "description": "A product entry in a comparison table, containing required identifiers and a values record mapping attribute keys to display strings.",
6
+ "type": "object",
7
+ "required": ["productId", "name", "values"],
8
+ "properties": {
9
+ "productId": {
10
+ "type": "string",
11
+ "description": "Unique product identifier."
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "description": "Display name of the product."
16
+ },
17
+ "values": {
18
+ "type": "object",
19
+ "description": "Attribute values keyed by attribute key.",
20
+ "additionalProperties": {"type": "string"}
21
+ },
22
+ "imageUrl": {
23
+ "type": "string",
24
+ "format": "uri",
25
+ "description": "Product image URL."
26
+ },
27
+ "price": {
28
+ "type": "number",
29
+ "description": "Product price."
30
+ },
31
+ "rating": {
32
+ "type": "number",
33
+ "minimum": 0,
34
+ "maximum": 5,
35
+ "description": "Product rating on a 0-5 scale."
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/definitions/facet-value-state.schema.json",
4
+ "title": "FacetValueState",
5
+ "description": "The selection state of a facet value, shared across all commerce facet components.",
6
+ "type": "string",
7
+ "enum": ["idle", "selected", "excluded"]
8
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.thermidor.coveo.com/definitions/product.schema.json",
4
+ "title": "Product",
5
+ "description": "A single commerce product as exposed by the ProductListController state. Field names follow the Coveo commerce field conventions (ec_* prefix).",
6
+ "type": "object",
7
+ "required": ["permanentid", "ec_name", "additionalFields"],
8
+ "properties": {
9
+ "permanentid": {
10
+ "type": "string",
11
+ "description": "The stable, unique product identifier."
12
+ },
13
+ "ec_name": {
14
+ "type": "string",
15
+ "description": "The display name of the product."
16
+ },
17
+ "ec_description": {
18
+ "type": "string",
19
+ "description": "Long-form product description."
20
+ },
21
+ "ec_shortdesc": {
22
+ "type": "string",
23
+ "description": "Short product description or tagline."
24
+ },
25
+ "ec_brand": {
26
+ "type": "string",
27
+ "description": "The brand or manufacturer name."
28
+ },
29
+ "ec_category": {
30
+ "type": "array",
31
+ "items": {"type": "string"},
32
+ "description": "Ordered list of category path segments (e.g. [\"Sports\", \"Kayaks\"])."
33
+ },
34
+ "ec_price": {
35
+ "type": "number",
36
+ "description": "Regular unit price in the request currency."
37
+ },
38
+ "ec_promo_price": {
39
+ "type": "number",
40
+ "description": "Promotional/sale price. When present and lower than ec_price, this is the effective price."
41
+ },
42
+ "ec_images": {
43
+ "type": "array",
44
+ "items": {"type": "string", "format": "uri"},
45
+ "description": "Full-resolution image URLs, in display order."
46
+ },
47
+ "ec_thumbnails": {
48
+ "type": "array",
49
+ "items": {"type": "string", "format": "uri"},
50
+ "description": "Thumbnail image URLs, in display order."
51
+ },
52
+ "ec_in_stock": {
53
+ "type": "boolean",
54
+ "description": "Whether the product is currently available for purchase."
55
+ },
56
+ "ec_rating": {
57
+ "type": ["number", "null"],
58
+ "minimum": 0,
59
+ "maximum": 5,
60
+ "description": "Average customer rating on a 0-5 scale. Null when no ratings exist."
61
+ },
62
+ "ec_color": {
63
+ "type": "string",
64
+ "description": "Primary product colour."
65
+ },
66
+ "ec_item_group_id": {
67
+ "type": "string",
68
+ "description": "Identifier of the parent product group (used for variant grouping)."
69
+ },
70
+ "ec_item_group_name": {
71
+ "type": "string",
72
+ "description": "Display name of the parent product group."
73
+ },
74
+ "clickUri": {
75
+ "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."
79
+ },
80
+ "additionalFields": {
81
+ "type": "object",
82
+ "description": "Catch-all bag for any extra fields returned by the index that are not part of the standard schema.",
83
+ "additionalProperties": true
84
+ },
85
+ "children": {
86
+ "type": "array",
87
+ "items": {"$ref": "#"},
88
+ "description": "Product variants (e.g. sizes or colours). Each child is itself a Product."
89
+ }
90
+ },
91
+ "additionalProperties": false
92
+ }
@@ -0,0 +1,8 @@
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
+ }