@coveo/thermidor-schema 1.0.0-beta.4 → 1.0.0-beta.40
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 +3499 -510
- package/dist/generated/schemas.js +897 -277
- package/dist/generated/zod3/index.d.ts +3 -0
- package/dist/generated/zod3/index.js +5 -0
- package/dist/generated/zod3/schemas.d.ts +31511 -0
- package/dist/generated/zod3/schemas.js +1275 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/zod3-compat.d.ts +79 -0
- package/dist/zod3-compat.js +82 -0
- package/package.json +28 -22
- package/schema/base/catalog.schema.json +5 -4
- package/schema/base/component.schema.json +22 -33
- package/schema/{components/component-contracts.schema.json → component-contracts.schema.json} +23 -2
- package/schema/components/breadbox.schema.json +82 -0
- package/schema/components/bundle-display.schema.json +17 -13
- package/schema/components/cart.schema.json +147 -0
- package/schema/components/category-facet.schema.json +30 -16
- package/schema/components/commerce-search.schema.json +111 -15
- package/schema/components/comparison-table.schema.json +21 -13
- package/schema/components/date-facet.schema.json +35 -15
- package/schema/components/facet-manager.schema.json +12 -14
- package/schema/components/instant-products.schema.json +85 -0
- package/schema/components/layout-stack.schema.json +19 -15
- package/schema/components/next-actions-bar.schema.json +44 -17
- package/schema/components/numeric-facet.schema.json +39 -17
- package/schema/components/page-size.schema.json +13 -15
- package/schema/components/pagination.schema.json +28 -27
- package/schema/components/product-carousel.schema.json +13 -13
- package/schema/components/product-list.schema.json +75 -14
- package/schema/components/product-research-card.schema.json +107 -0
- package/schema/components/product-summary.schema.json +15 -14
- package/schema/components/query-suggestions.schema.json +102 -0
- package/schema/components/query-summary.schema.json +70 -16
- package/schema/components/regular-facet.schema.json +40 -93
- package/schema/components/search-box.schema.json +47 -0
- package/schema/components/session-shell.schema.json +65 -0
- package/schema/components/sort.schema.json +13 -13
- package/schema/definitions/action-item.schema.json +10 -13
- package/schema/definitions/badge-placement.schema.json +22 -0
- package/schema/definitions/badge.schema.json +27 -0
- package/schema/definitions/breadbox-date-range-facet.schema.json +56 -0
- package/schema/definitions/breadbox-deselect-date-range.schema.json +28 -0
- package/schema/definitions/breadbox-deselect-hierarchical-path.schema.json +28 -0
- package/schema/definitions/breadbox-deselect-numerical-range.schema.json +28 -0
- package/schema/definitions/breadbox-deselect-payload.schema.json +20 -0
- package/schema/definitions/breadbox-deselect-regular-value.schema.json +25 -0
- package/schema/definitions/breadbox-facet.schema.json +20 -0
- package/schema/definitions/breadbox-hierarchical-facet.schema.json +37 -0
- package/schema/definitions/breadbox-numerical-range-facet.schema.json +56 -0
- package/schema/definitions/breadbox-regular-facet.schema.json +59 -0
- package/schema/definitions/bundle-tier.schema.json +6 -1
- package/schema/definitions/child-list.schema.json +32 -0
- package/schema/definitions/comparison-product.schema.json +7 -2
- package/schema/definitions/component-id.schema.json +9 -0
- package/schema/definitions/data-binding.schema.json +16 -0
- package/schema/definitions/facet-value-state.schema.json +1 -1
- package/schema/definitions/followup-action-item.schema.json +20 -0
- package/schema/definitions/product.schema.json +10 -6
- package/schema/definitions/search-action-item.schema.json +20 -0
- package/schema/definitions/search-option-action-item.schema.json +25 -0
- package/schema/definitions/child-ref.schema.json +0 -8
- package/schema/definitions/selectable-facet-value-state.schema.json +0 -8
|
@@ -2,16 +2,31 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/components/layout-stack.schema.json",
|
|
4
4
|
"title": "LayoutStack",
|
|
5
|
-
"description": "Generic layout container that stacks its children along a single axis.
|
|
5
|
+
"description": "Generic layout container that stacks its children along a single axis. Carries no business data; its state is empty and the stacking direction travels as a presentation prop.",
|
|
6
|
+
"$comment": "Reused across surfaces to compose rows/columns from the A2-UI composition plane rather than hardcoding layout per parent renderer.",
|
|
6
7
|
"allOf": [
|
|
7
8
|
{
|
|
8
9
|
"$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
|
|
9
10
|
}
|
|
10
11
|
],
|
|
11
12
|
"properties": {
|
|
12
|
-
"
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"component": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"const": "LayoutStack"
|
|
19
|
+
},
|
|
20
|
+
"direction": {
|
|
21
|
+
"title": "LayoutStackDirection",
|
|
13
22
|
"type": "string",
|
|
14
|
-
"
|
|
23
|
+
"enum": ["column", "row"],
|
|
24
|
+
"description": "The axis along which children are stacked. A plain presentation value at the node top level, never server state."
|
|
25
|
+
},
|
|
26
|
+
"children": {
|
|
27
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/child-list.schema.json",
|
|
28
|
+
"description": "The ordered children, a ChildList of ComponentId references mounted in order via children(id).",
|
|
29
|
+
"$comment": "Homogeneous ordered-list composition: the ordered list is the semantics; child ids are static, passed through unresolved."
|
|
15
30
|
},
|
|
16
31
|
"state": {
|
|
17
32
|
"$ref": "#/$defs/LayoutStackState"
|
|
@@ -20,24 +35,13 @@
|
|
|
20
35
|
"type": "object",
|
|
21
36
|
"properties": {},
|
|
22
37
|
"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
38
|
}
|
|
35
39
|
},
|
|
36
40
|
"additionalProperties": false,
|
|
37
41
|
"$defs": {
|
|
38
42
|
"LayoutStackState": {
|
|
39
43
|
"title": "LayoutStackState",
|
|
40
|
-
"description": "
|
|
44
|
+
"description": "Empty: a layout container holds no business data.",
|
|
41
45
|
"type": "object",
|
|
42
46
|
"required": [],
|
|
43
47
|
"properties": {},
|
|
@@ -2,40 +2,40 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/components/next-actions-bar.schema.json",
|
|
4
4
|
"title": "NextActionsBar",
|
|
5
|
-
"description": "Renders a set of suggested next actions the user can pick from. The selectAction action is dispatched when the user clicks
|
|
5
|
+
"description": "Renders a set of suggested next actions the user can pick from. The selectAction action is dispatched when the user clicks a \"followup\" or \"search\" action button, and selectSearchOption when they click a \"searchOption\" one.",
|
|
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
|
-
"
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"component": {
|
|
13
16
|
"type": "string",
|
|
14
|
-
"const": "
|
|
17
|
+
"const": "NextActionsBar"
|
|
18
|
+
},
|
|
19
|
+
"suggestedActions": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "Bound list of selectable next-action descriptors (bound to /state/<id>/suggestedActions). Presentation data, not the dispatchable actions map.",
|
|
22
|
+
"$comment": "Named `suggestedActions` (not `actions`) so it does not collide with the reserved dispatchable `actions` map."
|
|
15
23
|
},
|
|
16
24
|
"state": {
|
|
17
25
|
"$ref": "#/$defs/NextActionsState"
|
|
18
26
|
},
|
|
19
27
|
"actions": {
|
|
20
28
|
"type": "object",
|
|
21
|
-
"required": ["selectAction"],
|
|
29
|
+
"required": ["selectAction", "selectSearchOption"],
|
|
22
30
|
"properties": {
|
|
23
31
|
"selectAction": {
|
|
24
32
|
"$ref": "#/$defs/SelectActionAction"
|
|
33
|
+
},
|
|
34
|
+
"selectSearchOption": {
|
|
35
|
+
"$ref": "#/$defs/SelectSearchOptionAction"
|
|
25
36
|
}
|
|
26
37
|
},
|
|
27
38
|
"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
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"additionalProperties": false,
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"description": "The list of suggested actions to render. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
46
46
|
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
47
47
|
"type": "object",
|
|
48
|
-
"required": ["
|
|
48
|
+
"required": ["suggestedActions"],
|
|
49
49
|
"properties": {
|
|
50
|
-
"
|
|
50
|
+
"suggestedActions": {
|
|
51
51
|
"type": "array",
|
|
52
52
|
"description": "Suggested actions the assistant offers the user.",
|
|
53
53
|
"items": {
|
|
@@ -83,6 +83,33 @@
|
|
|
83
83
|
"additionalProperties": false
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
},
|
|
87
|
+
"SelectSearchOptionAction": {
|
|
88
|
+
"title": "selectSearchOption",
|
|
89
|
+
"description": "Signals that the user selected a \"searchOption\" action. The backend runs the search it saved under optionId; text is what the user selected, so a consumer can show it.",
|
|
90
|
+
"allOf": [
|
|
91
|
+
{
|
|
92
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"properties": {
|
|
96
|
+
"payload": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": ["optionId", "text"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"optionId": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"description": "The optionId of the selected action, echoed unchanged."
|
|
104
|
+
},
|
|
105
|
+
"text": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "The display text of the action the user selected."
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"additionalProperties": false
|
|
111
|
+
}
|
|
112
|
+
}
|
|
86
113
|
}
|
|
87
114
|
}
|
|
88
115
|
}
|
|
@@ -9,9 +9,44 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"properties": {
|
|
12
|
-
"
|
|
12
|
+
"component": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"const": "
|
|
14
|
+
"const": "NumericFacet"
|
|
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 queries, 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 numeric-range facet values, bound to /state/<id>/values."
|
|
30
|
+
},
|
|
31
|
+
"customRange": {
|
|
32
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
33
|
+
"description": "The custom range, bound to /state/<id>/customRange."
|
|
34
|
+
},
|
|
35
|
+
"hasActiveValues": {
|
|
36
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
37
|
+
"description": "Whether at least one facet value is active, bound to /state/<id>/hasActiveValues."
|
|
38
|
+
},
|
|
39
|
+
"canShowMoreValues": {
|
|
40
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
41
|
+
"description": "Whether more facet values can be shown, bound to /state/<id>/canShowMoreValues."
|
|
42
|
+
},
|
|
43
|
+
"canShowLessValues": {
|
|
44
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
45
|
+
"description": "Whether fewer facet values can be shown, bound to /state/<id>/canShowLessValues."
|
|
46
|
+
},
|
|
47
|
+
"domain": {
|
|
48
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
49
|
+
"description": "The numeric domain (min/max) of the facet, bound to /state/<id>/domain."
|
|
15
50
|
},
|
|
16
51
|
"state": {
|
|
17
52
|
"$ref": "#/$defs/NumericFacetState"
|
|
@@ -47,17 +82,6 @@
|
|
|
47
82
|
}
|
|
48
83
|
},
|
|
49
84
|
"additionalProperties": false
|
|
50
|
-
},
|
|
51
|
-
"children": {
|
|
52
|
-
"type": "array",
|
|
53
|
-
"items": {
|
|
54
|
-
"$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
|
|
55
|
-
},
|
|
56
|
-
"maxItems": 1000,
|
|
57
|
-
"default": []
|
|
58
|
-
},
|
|
59
|
-
"child": {
|
|
60
|
-
"$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
|
|
61
85
|
}
|
|
62
86
|
},
|
|
63
87
|
"additionalProperties": false,
|
|
@@ -87,8 +111,6 @@
|
|
|
87
111
|
"values": {
|
|
88
112
|
"type": "array",
|
|
89
113
|
"description": "The numeric range values available for this facet.",
|
|
90
|
-
"minItems": 0,
|
|
91
|
-
"maxItems": 500,
|
|
92
114
|
"items": {
|
|
93
115
|
"$ref": "#/$defs/NumericFacetValue"
|
|
94
116
|
}
|
|
@@ -143,8 +165,8 @@
|
|
|
143
165
|
"description": "The number of results matching this range."
|
|
144
166
|
},
|
|
145
167
|
"state": {
|
|
146
|
-
"$ref": "https://schema.thermidor.coveo.com/definitions/
|
|
147
|
-
"description": "The selection state of this facet value
|
|
168
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/facet-value-state.schema.json",
|
|
169
|
+
"description": "The selection state of this facet value."
|
|
148
170
|
}
|
|
149
171
|
},
|
|
150
172
|
"additionalProperties": false
|
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/components/page-size.schema.json",
|
|
4
4
|
"title": "PageSize",
|
|
5
|
-
"description": "A 'Products per page' selector for a search surface.
|
|
5
|
+
"description": "A 'Products per page' selector for a search surface. Owns the current pageSize in its state and dispatches setPageSize.",
|
|
6
|
+
"$comment": "Its own component discriminant lets it mount through the A2-UI tree. The backend applies the change so the pagination component re-renders from the shared view.",
|
|
6
7
|
"allOf": [
|
|
7
8
|
{
|
|
8
9
|
"$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
|
|
9
10
|
}
|
|
10
11
|
],
|
|
11
12
|
"properties": {
|
|
12
|
-
"
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"component": {
|
|
13
17
|
"type": "string",
|
|
14
|
-
"const": "
|
|
18
|
+
"const": "PageSize"
|
|
19
|
+
},
|
|
20
|
+
"pageSize": {
|
|
21
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
22
|
+
"description": "The current page size, bound to /state/<id>/pageSize via a { \"path\": ... } Data_Binding."
|
|
15
23
|
},
|
|
16
24
|
"state": {
|
|
17
25
|
"$ref": "#/$defs/PageSizeState"
|
|
@@ -25,24 +33,14 @@
|
|
|
25
33
|
}
|
|
26
34
|
},
|
|
27
35
|
"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
36
|
}
|
|
40
37
|
},
|
|
41
38
|
"additionalProperties": false,
|
|
42
39
|
"$defs": {
|
|
43
40
|
"PageSizeState": {
|
|
44
41
|
"title": "PageSizeState",
|
|
45
|
-
"description": "The current page size. Owned exclusively by the backend.
|
|
42
|
+
"description": "The current page size. Owned exclusively by the backend.",
|
|
43
|
+
"$comment": "Kept as its own entry (keyed by this component's id) so the selector reads only the field it needs, independent of the pagination component's state shape.",
|
|
46
44
|
"type": "object",
|
|
47
45
|
"required": ["pageSize"],
|
|
48
46
|
"properties": {
|
|
@@ -9,36 +9,44 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"properties": {
|
|
12
|
-
"
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"component": {
|
|
13
16
|
"type": "string",
|
|
14
|
-
"const": "
|
|
17
|
+
"const": "Pagination"
|
|
18
|
+
},
|
|
19
|
+
"page": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The current page number, bound to /state/<id>/page via a { \"path\": ... } Data_Binding."
|
|
22
|
+
},
|
|
23
|
+
"pageSize": {
|
|
24
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
25
|
+
"description": "The number of items per page, bound to /state/<id>/pageSize."
|
|
26
|
+
},
|
|
27
|
+
"totalEntries": {
|
|
28
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
29
|
+
"description": "The total number of items, bound to /state/<id>/totalEntries."
|
|
30
|
+
},
|
|
31
|
+
"totalPages": {
|
|
32
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
33
|
+
"description": "The total number of pages, bound to /state/<id>/totalPages."
|
|
15
34
|
},
|
|
16
35
|
"state": {
|
|
17
36
|
"$ref": "#/$defs/PaginationState"
|
|
18
37
|
},
|
|
19
38
|
"actions": {
|
|
20
39
|
"type": "object",
|
|
21
|
-
"required": ["selectPage", "
|
|
40
|
+
"required": ["selectPage", "showMore"],
|
|
22
41
|
"properties": {
|
|
23
42
|
"selectPage": {
|
|
24
43
|
"$ref": "#/$defs/SelectPageAction"
|
|
25
44
|
},
|
|
26
|
-
"
|
|
27
|
-
"$ref": "#/$defs/
|
|
45
|
+
"showMore": {
|
|
46
|
+
"$ref": "#/$defs/ShowMoreAction"
|
|
28
47
|
}
|
|
29
48
|
},
|
|
30
49
|
"additionalProperties": false
|
|
31
|
-
},
|
|
32
|
-
"children": {
|
|
33
|
-
"type": "array",
|
|
34
|
-
"items": {
|
|
35
|
-
"$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
|
|
36
|
-
},
|
|
37
|
-
"maxItems": 1000,
|
|
38
|
-
"default": []
|
|
39
|
-
},
|
|
40
|
-
"child": {
|
|
41
|
-
"$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
|
|
42
50
|
}
|
|
43
51
|
},
|
|
44
52
|
"additionalProperties": false,
|
|
@@ -95,9 +103,9 @@
|
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
105
|
},
|
|
98
|
-
"
|
|
99
|
-
"title": "
|
|
100
|
-
"description": "
|
|
106
|
+
"ShowMoreAction": {
|
|
107
|
+
"title": "showMore",
|
|
108
|
+
"description": "Advances to the next page while preserving backend ownership of pagination state.",
|
|
101
109
|
"allOf": [
|
|
102
110
|
{
|
|
103
111
|
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
@@ -106,14 +114,7 @@
|
|
|
106
114
|
"properties": {
|
|
107
115
|
"payload": {
|
|
108
116
|
"type": "object",
|
|
109
|
-
"
|
|
110
|
-
"properties": {
|
|
111
|
-
"pageSize": {
|
|
112
|
-
"type": "integer",
|
|
113
|
-
"minimum": 1,
|
|
114
|
-
"description": "The number of items to display per page."
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
+
"properties": {},
|
|
117
118
|
"additionalProperties": false
|
|
118
119
|
}
|
|
119
120
|
}
|
|
@@ -9,9 +9,20 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"properties": {
|
|
12
|
-
"
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"component": {
|
|
13
16
|
"type": "string",
|
|
14
|
-
"const": "
|
|
17
|
+
"const": "ProductCarousel"
|
|
18
|
+
},
|
|
19
|
+
"heading": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The carousel heading, bound to /state/<id>/heading."
|
|
22
|
+
},
|
|
23
|
+
"products": {
|
|
24
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
25
|
+
"description": "The ordered list of products, bound to /state/<id>/products."
|
|
15
26
|
},
|
|
16
27
|
"state": {
|
|
17
28
|
"$ref": "#/$defs/ProductCarouselState"
|
|
@@ -20,17 +31,6 @@
|
|
|
20
31
|
"type": "object",
|
|
21
32
|
"properties": {},
|
|
22
33
|
"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
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"additionalProperties": false,
|
|
@@ -9,28 +9,32 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"properties": {
|
|
12
|
-
"
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"component": {
|
|
13
16
|
"type": "string",
|
|
14
|
-
"const": "
|
|
17
|
+
"const": "ProductList"
|
|
18
|
+
},
|
|
19
|
+
"products": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The ordered list of products, bound to /state/<id>/products via a { \"path\": ... } Data_Binding."
|
|
15
22
|
},
|
|
16
23
|
"state": {
|
|
17
24
|
"$ref": "#/$defs/ProductListState"
|
|
18
25
|
},
|
|
19
26
|
"actions": {
|
|
20
27
|
"type": "object",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
"required": ["selectProducts", "productClick"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"selectProducts": {
|
|
31
|
+
"$ref": "#/$defs/SelectProductsAction"
|
|
32
|
+
},
|
|
33
|
+
"productClick": {
|
|
34
|
+
"$ref": "#/$defs/ProductClickAction"
|
|
35
|
+
}
|
|
28
36
|
},
|
|
29
|
-
"
|
|
30
|
-
"default": []
|
|
31
|
-
},
|
|
32
|
-
"child": {
|
|
33
|
-
"$ref": "https://schema.thermidor.coveo.com/definitions/child-ref.schema.json"
|
|
37
|
+
"additionalProperties": false
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
"additionalProperties": false,
|
|
@@ -50,6 +54,63 @@
|
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"SelectProductsAction": {
|
|
59
|
+
"title": "selectProducts",
|
|
60
|
+
"description": "Persists the set of products selected by the shopper.",
|
|
61
|
+
"allOf": [
|
|
62
|
+
{
|
|
63
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"properties": {
|
|
67
|
+
"payload": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": ["productIds"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"productIds": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"ProductClickAction": {
|
|
84
|
+
"title": "productClick",
|
|
85
|
+
"description": "Records a shopper clicking a product result.",
|
|
86
|
+
"allOf": [
|
|
87
|
+
{
|
|
88
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"payload": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"required": ["productId", "position"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"productId": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1
|
|
99
|
+
},
|
|
100
|
+
"name": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"price": {
|
|
104
|
+
"type": ["number", "null"]
|
|
105
|
+
},
|
|
106
|
+
"position": {
|
|
107
|
+
"type": "integer",
|
|
108
|
+
"minimum": 0
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
}
|
|
113
|
+
}
|
|
53
114
|
}
|
|
54
115
|
}
|
|
55
116
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/product-research-card.schema.json",
|
|
4
|
+
"title": "ProductResearchCard",
|
|
5
|
+
"description": "Renders a research card for a single known product: the product details alongside a short research summary and a list of concise product-education bullets. Read-only from the frontend: the backend is the sole source of truth for the product and the research content.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"component": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"const": "ProductResearchCard"
|
|
18
|
+
},
|
|
19
|
+
"product": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The researched product, bound to /state/<id>/product."
|
|
22
|
+
},
|
|
23
|
+
"summary": {
|
|
24
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
25
|
+
"description": "The research summary, bound to /state/<id>/summary."
|
|
26
|
+
},
|
|
27
|
+
"bullets": {
|
|
28
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
29
|
+
"description": "The product-education bullets, bound to /state/<id>/bullets."
|
|
30
|
+
},
|
|
31
|
+
"relatedDocuments": {
|
|
32
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
33
|
+
"description": "The related documents, bound to /state/<id>/relatedDocuments."
|
|
34
|
+
},
|
|
35
|
+
"state": {
|
|
36
|
+
"$ref": "#/$defs/ProductResearchCardState"
|
|
37
|
+
},
|
|
38
|
+
"actions": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"$defs": {
|
|
46
|
+
"ProductResearchCardState": {
|
|
47
|
+
"title": "ProductResearchCardState",
|
|
48
|
+
"description": "The researched product, its research content, and related documents. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
49
|
+
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["product", "summary", "bullets"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"product": {
|
|
54
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/product.schema.json"
|
|
55
|
+
},
|
|
56
|
+
"summary": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"description": "Short research paragraph about the product."
|
|
60
|
+
},
|
|
61
|
+
"bullets": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"minItems": 1,
|
|
64
|
+
"description": "Concise product-education bullets, in display order. Producers currently emit at most 5 bullets.",
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"relatedDocuments": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"description": "Documents related to the researched product, in display order.",
|
|
73
|
+
"items": {
|
|
74
|
+
"$ref": "#/$defs/ProductResearchRelatedDocument"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
},
|
|
80
|
+
"ProductResearchRelatedDocument": {
|
|
81
|
+
"title": "ProductResearchRelatedDocument",
|
|
82
|
+
"description": "A document related to the researched product.",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"required": ["title"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"title": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "The display title of the document."
|
|
89
|
+
},
|
|
90
|
+
"clickUri": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "The URI used to open the document."
|
|
93
|
+
},
|
|
94
|
+
"size": {
|
|
95
|
+
"type": "integer",
|
|
96
|
+
"minimum": 0,
|
|
97
|
+
"description": "The document size in bytes."
|
|
98
|
+
},
|
|
99
|
+
"filetype": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "The document file type."
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|