@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
|
@@ -2,16 +2,25 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/components/facet-manager.schema.json",
|
|
4
4
|
"title": "FacetManager",
|
|
5
|
-
"description": "Manages facet ordering and cross-facet concerns. Holds the backend-determined order of facet components as state
|
|
5
|
+
"description": "Manages facet ordering and cross-facet concerns. Holds the backend-determined order of facet components as state; each identifier's position (from 0) is its rendering rank.",
|
|
6
|
+
"$comment": "Ready to gain cross-facet actions (e.g. clear all facets, reorder) as needs arise.",
|
|
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": "FacetManager"
|
|
19
|
+
},
|
|
20
|
+
"children": {
|
|
21
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/child-list.schema.json",
|
|
22
|
+
"description": "The backend-determined facet order: a ChildList of ComponentId references whose position (from 0) is each facet's rendering rank.",
|
|
23
|
+
"$comment": "Homogeneous ordered-list composition: child ids are static (binder passes through unresolved), mounted in order via children(id)."
|
|
15
24
|
},
|
|
16
25
|
"state": {
|
|
17
26
|
"$ref": "#/$defs/FacetManagerState"
|
|
@@ -26,22 +35,11 @@
|
|
|
26
35
|
"$defs": {
|
|
27
36
|
"FacetManagerState": {
|
|
28
37
|
"title": "FacetManagerState",
|
|
29
|
-
"description": "The facet manager state.
|
|
38
|
+
"description": "The facet manager state. Facet ordering is expressed via the facet-manager A2-UI component node's 'children'; this state carries no facet-ordering data.",
|
|
30
39
|
"type": "object",
|
|
31
|
-
"required": [
|
|
32
|
-
|
|
33
|
-
],
|
|
34
|
-
"properties": {
|
|
35
|
-
"facetIds": {
|
|
36
|
-
"type": "array",
|
|
37
|
-
"description": "Ordered facet component identifiers. Position (indexed from 0) determines the facet's rendering rank. Each identifier is expected to match the 'componentId' of a facet component registered in the catalog; referential integrity is enforced outside JSON Schema.",
|
|
38
|
-
"items": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"pattern": "^[a-z][a-z0-9-]*$"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
40
|
+
"required": [],
|
|
41
|
+
"properties": {},
|
|
44
42
|
"additionalProperties": false
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
|
-
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/layout-stack.schema.json",
|
|
4
|
+
"title": "LayoutStack",
|
|
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.",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"component": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"const": "LayoutStack"
|
|
19
|
+
},
|
|
20
|
+
"direction": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["column", "row"],
|
|
23
|
+
"description": "The axis along which children are stacked. A plain presentation value at the node top level, never server state."
|
|
24
|
+
},
|
|
25
|
+
"children": {
|
|
26
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/child-list.schema.json",
|
|
27
|
+
"description": "The ordered children, a ChildList of ComponentId references mounted in order via children(id).",
|
|
28
|
+
"$comment": "Homogeneous ordered-list composition: the ordered list is the semantics; child ids are static, passed through unresolved."
|
|
29
|
+
},
|
|
30
|
+
"state": {
|
|
31
|
+
"$ref": "#/$defs/LayoutStackState"
|
|
32
|
+
},
|
|
33
|
+
"actions": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {},
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"$defs": {
|
|
41
|
+
"LayoutStackState": {
|
|
42
|
+
"title": "LayoutStackState",
|
|
43
|
+
"description": "Empty: a layout container holds no business data.",
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": [],
|
|
46
|
+
"properties": {},
|
|
47
|
+
"additionalProperties": false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -9,18 +9,24 @@
|
|
|
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": [
|
|
22
|
-
"selectAction"
|
|
23
|
-
],
|
|
29
|
+
"required": ["selectAction"],
|
|
24
30
|
"properties": {
|
|
25
31
|
"selectAction": {
|
|
26
32
|
"$ref": "#/$defs/SelectActionAction"
|
|
@@ -36,11 +42,9 @@
|
|
|
36
42
|
"description": "The list of suggested actions to render. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
37
43
|
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
38
44
|
"type": "object",
|
|
39
|
-
"required": [
|
|
40
|
-
"actions"
|
|
41
|
-
],
|
|
45
|
+
"required": ["suggestedActions"],
|
|
42
46
|
"properties": {
|
|
43
|
-
"
|
|
47
|
+
"suggestedActions": {
|
|
44
48
|
"type": "array",
|
|
45
49
|
"description": "Suggested actions the assistant offers the user.",
|
|
46
50
|
"items": {
|
|
@@ -61,10 +65,7 @@
|
|
|
61
65
|
"properties": {
|
|
62
66
|
"payload": {
|
|
63
67
|
"type": "object",
|
|
64
|
-
"required": [
|
|
65
|
-
"text",
|
|
66
|
-
"type"
|
|
67
|
-
],
|
|
68
|
+
"required": ["text", "type"],
|
|
68
69
|
"properties": {
|
|
69
70
|
"text": {
|
|
70
71
|
"type": "string",
|
|
@@ -72,10 +73,7 @@
|
|
|
72
73
|
},
|
|
73
74
|
"type": {
|
|
74
75
|
"type": "string",
|
|
75
|
-
"enum": [
|
|
76
|
-
"followup",
|
|
77
|
-
"search"
|
|
78
|
-
],
|
|
76
|
+
"enum": ["followup", "search"],
|
|
79
77
|
"description": "The kind of action selected: \"followup\" or \"search\"."
|
|
80
78
|
}
|
|
81
79
|
},
|
|
@@ -84,4 +82,4 @@
|
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
|
-
}
|
|
85
|
+
}
|
|
@@ -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"
|
|
@@ -116,12 +151,7 @@
|
|
|
116
151
|
"title": "NumericFacetValue",
|
|
117
152
|
"description": "A single numeric range value within a numeric facet.",
|
|
118
153
|
"type": "object",
|
|
119
|
-
"required": [
|
|
120
|
-
"start",
|
|
121
|
-
"end",
|
|
122
|
-
"numberOfResults",
|
|
123
|
-
"state"
|
|
124
|
-
],
|
|
154
|
+
"required": ["start", "end", "numberOfResults", "state"],
|
|
125
155
|
"properties": {
|
|
126
156
|
"start": {
|
|
127
157
|
"type": "number",
|
|
@@ -147,11 +177,7 @@
|
|
|
147
177
|
"title": "NumericFacetCustomRange",
|
|
148
178
|
"description": "A custom numeric range applied by the user, with its result count.",
|
|
149
179
|
"type": "object",
|
|
150
|
-
"required": [
|
|
151
|
-
"start",
|
|
152
|
-
"end",
|
|
153
|
-
"numberOfResults"
|
|
154
|
-
],
|
|
180
|
+
"required": ["start", "end", "numberOfResults"],
|
|
155
181
|
"properties": {
|
|
156
182
|
"start": {
|
|
157
183
|
"type": "number",
|
|
@@ -196,10 +222,7 @@
|
|
|
196
222
|
"properties": {
|
|
197
223
|
"payload": {
|
|
198
224
|
"type": "object",
|
|
199
|
-
"required": [
|
|
200
|
-
"start",
|
|
201
|
-
"end"
|
|
202
|
-
],
|
|
225
|
+
"required": ["start", "end"],
|
|
203
226
|
"properties": {
|
|
204
227
|
"start": {
|
|
205
228
|
"type": "number",
|
|
@@ -225,10 +248,7 @@
|
|
|
225
248
|
"properties": {
|
|
226
249
|
"payload": {
|
|
227
250
|
"type": "object",
|
|
228
|
-
"required": [
|
|
229
|
-
"start",
|
|
230
|
-
"end"
|
|
231
|
-
],
|
|
251
|
+
"required": ["start", "end"],
|
|
232
252
|
"properties": {
|
|
233
253
|
"start": {
|
|
234
254
|
"type": "number",
|
|
@@ -263,10 +283,7 @@
|
|
|
263
283
|
"properties": {
|
|
264
284
|
"payload": {
|
|
265
285
|
"type": "object",
|
|
266
|
-
"required": [
|
|
267
|
-
"start",
|
|
268
|
-
"end"
|
|
269
|
-
],
|
|
286
|
+
"required": ["start", "end"],
|
|
270
287
|
"properties": {
|
|
271
288
|
"start": {
|
|
272
289
|
"type": "number",
|
|
@@ -300,4 +317,4 @@
|
|
|
300
317
|
]
|
|
301
318
|
}
|
|
302
319
|
}
|
|
303
|
-
}
|
|
320
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/page-size.schema.json",
|
|
4
|
+
"title": "PageSize",
|
|
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.",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"component": {
|
|
17
|
+
"type": "string",
|
|
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."
|
|
23
|
+
},
|
|
24
|
+
"state": {
|
|
25
|
+
"$ref": "#/$defs/PageSizeState"
|
|
26
|
+
},
|
|
27
|
+
"actions": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["setPageSize"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"setPageSize": {
|
|
32
|
+
"$ref": "#/$defs/SetPageSizeAction"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"$defs": {
|
|
40
|
+
"PageSizeState": {
|
|
41
|
+
"title": "PageSizeState",
|
|
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.",
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["pageSize"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"pageSize": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 1,
|
|
50
|
+
"description": "The number of items displayed per page."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
},
|
|
55
|
+
"SetPageSizeAction": {
|
|
56
|
+
"title": "setPageSize",
|
|
57
|
+
"description": "Changes the number of items displayed per page.",
|
|
58
|
+
"allOf": [
|
|
59
|
+
{
|
|
60
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"properties": {
|
|
64
|
+
"payload": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["pageSize"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"pageSize": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 1,
|
|
71
|
+
"description": "The number of items to display per page."
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -9,25 +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": [
|
|
22
|
-
"selectPage",
|
|
23
|
-
"setPageSize"
|
|
24
|
-
],
|
|
40
|
+
"required": ["selectPage", "setPageSize", "showMore"],
|
|
25
41
|
"properties": {
|
|
26
42
|
"selectPage": {
|
|
27
43
|
"$ref": "#/$defs/SelectPageAction"
|
|
28
44
|
},
|
|
29
45
|
"setPageSize": {
|
|
30
46
|
"$ref": "#/$defs/SetPageSizeAction"
|
|
47
|
+
},
|
|
48
|
+
"showMore": {
|
|
49
|
+
"$ref": "#/$defs/ShowMoreAction"
|
|
31
50
|
}
|
|
32
51
|
},
|
|
33
52
|
"additionalProperties": false
|
|
@@ -39,12 +58,7 @@
|
|
|
39
58
|
"title": "PaginationState",
|
|
40
59
|
"description": "The current pagination state. Owned exclusively by the backend.",
|
|
41
60
|
"type": "object",
|
|
42
|
-
"required": [
|
|
43
|
-
"page",
|
|
44
|
-
"pageSize",
|
|
45
|
-
"totalEntries",
|
|
46
|
-
"totalPages"
|
|
47
|
-
],
|
|
61
|
+
"required": ["page", "pageSize", "totalEntries", "totalPages"],
|
|
48
62
|
"properties": {
|
|
49
63
|
"page": {
|
|
50
64
|
"type": "integer",
|
|
@@ -80,9 +94,7 @@
|
|
|
80
94
|
"properties": {
|
|
81
95
|
"payload": {
|
|
82
96
|
"type": "object",
|
|
83
|
-
"required": [
|
|
84
|
-
"page"
|
|
85
|
-
],
|
|
97
|
+
"required": ["page"],
|
|
86
98
|
"properties": {
|
|
87
99
|
"page": {
|
|
88
100
|
"type": "integer",
|
|
@@ -105,9 +117,7 @@
|
|
|
105
117
|
"properties": {
|
|
106
118
|
"payload": {
|
|
107
119
|
"type": "object",
|
|
108
|
-
"required": [
|
|
109
|
-
"pageSize"
|
|
110
|
-
],
|
|
120
|
+
"required": ["pageSize"],
|
|
111
121
|
"properties": {
|
|
112
122
|
"pageSize": {
|
|
113
123
|
"type": "integer",
|
|
@@ -118,6 +128,22 @@
|
|
|
118
128
|
"additionalProperties": false
|
|
119
129
|
}
|
|
120
130
|
}
|
|
131
|
+
},
|
|
132
|
+
"ShowMoreAction": {
|
|
133
|
+
"title": "showMore",
|
|
134
|
+
"description": "Advances to the next page while preserving backend ownership of pagination state.",
|
|
135
|
+
"allOf": [
|
|
136
|
+
{
|
|
137
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"properties": {
|
|
141
|
+
"payload": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {},
|
|
144
|
+
"additionalProperties": false
|
|
145
|
+
}
|
|
146
|
+
}
|
|
121
147
|
}
|
|
122
148
|
}
|
|
123
|
-
}
|
|
149
|
+
}
|
|
@@ -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"
|
|
@@ -29,10 +40,7 @@
|
|
|
29
40
|
"description": "The ordered list of products to render. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
30
41
|
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
31
42
|
"type": "object",
|
|
32
|
-
"required": [
|
|
33
|
-
"heading",
|
|
34
|
-
"products"
|
|
35
|
-
],
|
|
43
|
+
"required": ["heading", "products"],
|
|
36
44
|
"properties": {
|
|
37
45
|
"heading": {
|
|
38
46
|
"type": "string",
|
|
@@ -49,4 +57,4 @@
|
|
|
49
57
|
"additionalProperties": false
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
|
-
}
|
|
60
|
+
}
|
|
@@ -9,16 +9,31 @@
|
|
|
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
|
-
"
|
|
28
|
+
"required": ["selectProducts", "productClick"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"selectProducts": {
|
|
31
|
+
"$ref": "#/$defs/SelectProductsAction"
|
|
32
|
+
},
|
|
33
|
+
"productClick": {
|
|
34
|
+
"$ref": "#/$defs/ProductClickAction"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
22
37
|
"additionalProperties": false
|
|
23
38
|
}
|
|
24
39
|
},
|
|
@@ -28,9 +43,7 @@
|
|
|
28
43
|
"title": "ProductListState",
|
|
29
44
|
"description": "The ordered list of products to render. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
30
45
|
"type": "object",
|
|
31
|
-
"required": [
|
|
32
|
-
"products"
|
|
33
|
-
],
|
|
46
|
+
"required": ["products"],
|
|
34
47
|
"properties": {
|
|
35
48
|
"products": {
|
|
36
49
|
"type": "array",
|
|
@@ -41,6 +54,63 @@
|
|
|
41
54
|
}
|
|
42
55
|
},
|
|
43
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
|
+
}
|
|
44
114
|
}
|
|
45
115
|
}
|
|
46
|
-
}
|
|
116
|
+
}
|