@coveo/thermidor-schema 1.0.0-beta.2 → 1.0.0-beta.21
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 +2651 -408
- package/dist/generated/schemas.js +738 -173
- package/dist/generated/zod3/index.d.ts +3 -0
- package/dist/generated/zod3/index.js +5 -0
- package/dist/generated/zod3/schemas.d.ts +24410 -0
- package/dist/generated/zod3/schemas.js +1106 -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 +26 -20
- package/schema/base/catalog.schema.json +5 -4
- package/schema/base/component.schema.json +22 -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 -26
- 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 +43 -19
- package/schema/components/numeric-facet.schema.json +43 -28
- 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 -51
- package/schema/components/sort.schema.json +18 -18
- package/schema/definitions/action-item.schema.json +10 -13
- package/schema/definitions/bundle-tier.schema.json +9 -4
- package/schema/definitions/child-list.schema.json +31 -0
- package/schema/definitions/comparison-attribute.schema.json +2 -2
- package/schema/definitions/comparison-product.schema.json +2 -4
- package/schema/definitions/component-id.schema.json +9 -0
- package/schema/definitions/data-binding.schema.json +16 -0
- package/schema/definitions/followup-action-item.schema.json +20 -0
- package/schema/definitions/product.schema.json +3 -6
- package/schema/definitions/search-action-item.schema.json +20 -0
- package/schema/definitions/search-option-action-item.schema.json +25 -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
|
+
}
|
|
@@ -2,28 +2,37 @@
|
|
|
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": [
|
|
22
|
-
"selectAction"
|
|
23
|
-
],
|
|
29
|
+
"required": ["selectAction", "selectSearchOption"],
|
|
24
30
|
"properties": {
|
|
25
31
|
"selectAction": {
|
|
26
32
|
"$ref": "#/$defs/SelectActionAction"
|
|
33
|
+
},
|
|
34
|
+
"selectSearchOption": {
|
|
35
|
+
"$ref": "#/$defs/SelectSearchOptionAction"
|
|
27
36
|
}
|
|
28
37
|
},
|
|
29
38
|
"additionalProperties": false
|
|
@@ -36,11 +45,9 @@
|
|
|
36
45
|
"description": "The list of suggested actions to render. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
37
46
|
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
38
47
|
"type": "object",
|
|
39
|
-
"required": [
|
|
40
|
-
"actions"
|
|
41
|
-
],
|
|
48
|
+
"required": ["suggestedActions"],
|
|
42
49
|
"properties": {
|
|
43
|
-
"
|
|
50
|
+
"suggestedActions": {
|
|
44
51
|
"type": "array",
|
|
45
52
|
"description": "Suggested actions the assistant offers the user.",
|
|
46
53
|
"items": {
|
|
@@ -61,10 +68,7 @@
|
|
|
61
68
|
"properties": {
|
|
62
69
|
"payload": {
|
|
63
70
|
"type": "object",
|
|
64
|
-
"required": [
|
|
65
|
-
"text",
|
|
66
|
-
"type"
|
|
67
|
-
],
|
|
71
|
+
"required": ["text", "type"],
|
|
68
72
|
"properties": {
|
|
69
73
|
"text": {
|
|
70
74
|
"type": "string",
|
|
@@ -72,16 +76,36 @@
|
|
|
72
76
|
},
|
|
73
77
|
"type": {
|
|
74
78
|
"type": "string",
|
|
75
|
-
"enum": [
|
|
76
|
-
"followup",
|
|
77
|
-
"search"
|
|
78
|
-
],
|
|
79
|
+
"enum": ["followup", "search"],
|
|
79
80
|
"description": "The kind of action selected: \"followup\" or \"search\"."
|
|
80
81
|
}
|
|
81
82
|
},
|
|
82
83
|
"additionalProperties": false
|
|
83
84
|
}
|
|
84
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.",
|
|
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"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"optionId": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"description": "The optionId of the selected action, echoed unchanged."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
}
|
|
108
|
+
}
|
|
85
109
|
}
|
|
86
110
|
}
|
|
87
|
-
}
|
|
111
|
+
}
|
|
@@ -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"
|
|
@@ -76,8 +111,6 @@
|
|
|
76
111
|
"values": {
|
|
77
112
|
"type": "array",
|
|
78
113
|
"description": "The numeric range values available for this facet.",
|
|
79
|
-
"minItems": 0,
|
|
80
|
-
"maxItems": 500,
|
|
81
114
|
"items": {
|
|
82
115
|
"$ref": "#/$defs/NumericFacetValue"
|
|
83
116
|
}
|
|
@@ -116,12 +149,7 @@
|
|
|
116
149
|
"title": "NumericFacetValue",
|
|
117
150
|
"description": "A single numeric range value within a numeric facet.",
|
|
118
151
|
"type": "object",
|
|
119
|
-
"required": [
|
|
120
|
-
"start",
|
|
121
|
-
"end",
|
|
122
|
-
"numberOfResults",
|
|
123
|
-
"state"
|
|
124
|
-
],
|
|
152
|
+
"required": ["start", "end", "numberOfResults", "state"],
|
|
125
153
|
"properties": {
|
|
126
154
|
"start": {
|
|
127
155
|
"type": "number",
|
|
@@ -147,11 +175,7 @@
|
|
|
147
175
|
"title": "NumericFacetCustomRange",
|
|
148
176
|
"description": "A custom numeric range applied by the user, with its result count.",
|
|
149
177
|
"type": "object",
|
|
150
|
-
"required": [
|
|
151
|
-
"start",
|
|
152
|
-
"end",
|
|
153
|
-
"numberOfResults"
|
|
154
|
-
],
|
|
178
|
+
"required": ["start", "end", "numberOfResults"],
|
|
155
179
|
"properties": {
|
|
156
180
|
"start": {
|
|
157
181
|
"type": "number",
|
|
@@ -196,10 +220,7 @@
|
|
|
196
220
|
"properties": {
|
|
197
221
|
"payload": {
|
|
198
222
|
"type": "object",
|
|
199
|
-
"required": [
|
|
200
|
-
"start",
|
|
201
|
-
"end"
|
|
202
|
-
],
|
|
223
|
+
"required": ["start", "end"],
|
|
203
224
|
"properties": {
|
|
204
225
|
"start": {
|
|
205
226
|
"type": "number",
|
|
@@ -225,10 +246,7 @@
|
|
|
225
246
|
"properties": {
|
|
226
247
|
"payload": {
|
|
227
248
|
"type": "object",
|
|
228
|
-
"required": [
|
|
229
|
-
"start",
|
|
230
|
-
"end"
|
|
231
|
-
],
|
|
249
|
+
"required": ["start", "end"],
|
|
232
250
|
"properties": {
|
|
233
251
|
"start": {
|
|
234
252
|
"type": "number",
|
|
@@ -263,10 +281,7 @@
|
|
|
263
281
|
"properties": {
|
|
264
282
|
"payload": {
|
|
265
283
|
"type": "object",
|
|
266
|
-
"required": [
|
|
267
|
-
"start",
|
|
268
|
-
"end"
|
|
269
|
-
],
|
|
284
|
+
"required": ["start", "end"],
|
|
270
285
|
"properties": {
|
|
271
286
|
"start": {
|
|
272
287
|
"type": "number",
|
|
@@ -300,4 +315,4 @@
|
|
|
300
315
|
]
|
|
301
316
|
}
|
|
302
317
|
}
|
|
303
|
-
}
|
|
318
|
+
}
|
|
@@ -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
|
+
}
|