@coveo/thermidor-schema 0.0.0 → 1.0.0-beta.10
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/LICENSE +201 -0
- package/README.md +61 -0
- package/dist/generated/schemas.d.ts +3992 -0
- package/dist/generated/schemas.js +1085 -0
- package/dist/generated/zod3/schemas.d.ts +23821 -0
- package/dist/generated/zod3/schemas.js +1087 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- 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 +52 -8
- package/schema/base/action.schema.json +12 -0
- package/schema/base/catalog.schema.json +38 -0
- package/schema/base/component.schema.json +45 -0
- package/schema/component-contracts.schema.json +73 -0
- package/schema/components/bundle-display.schema.json +52 -0
- package/schema/components/cart.schema.json +147 -0
- package/schema/components/category-facet.schema.json +303 -0
- package/schema/components/commerce-search.schema.json +186 -0
- package/schema/components/comparison-table.schema.json +78 -0
- package/schema/components/date-facet.schema.json +294 -0
- package/schema/components/facet-manager.schema.json +45 -0
- package/schema/components/layout-stack.schema.json +50 -0
- package/schema/components/next-actions-bar.schema.json +85 -0
- package/schema/components/numeric-facet.schema.json +320 -0
- package/schema/components/page-size.schema.json +79 -0
- package/schema/components/pagination.schema.json +149 -0
- package/schema/components/product-carousel.schema.json +60 -0
- package/schema/components/product-list.schema.json +116 -0
- 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 +395 -0
- package/schema/components/sort.schema.json +107 -0
- package/schema/definitions/action-item.schema.json +20 -0
- package/schema/definitions/bundle-tier.schema.json +49 -0
- package/schema/definitions/child-list.schema.json +32 -0
- package/schema/definitions/comparison-attribute.schema.json +19 -0
- package/schema/definitions/comparison-product.schema.json +39 -0
- 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 +8 -0
- package/schema/definitions/product.schema.json +92 -0
- package/schema/definitions/selectable-facet-value-state.schema.json +8 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/comparison-table.schema.json",
|
|
4
|
+
"title": "ComparisonTable",
|
|
5
|
+
"description": "Renders a tabular product comparison. A leaf component that owns its framing (heading and AI summary), the compared products, and the ordered attribute descriptors defining the comparison rows. Read-only: the product set, attributes, and framing are owned by the backend.",
|
|
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": "ComparisonTable"
|
|
18
|
+
},
|
|
19
|
+
"heading": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The table heading, bound to /state/<id>/heading."
|
|
22
|
+
},
|
|
23
|
+
"summary": {
|
|
24
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
25
|
+
"description": "The AI summary text, bound to /state/<id>/summary."
|
|
26
|
+
},
|
|
27
|
+
"products": {
|
|
28
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
29
|
+
"description": "The compared products, bound to /state/<id>/products."
|
|
30
|
+
},
|
|
31
|
+
"attributes": {
|
|
32
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
33
|
+
"description": "The ordered attribute descriptors, bound to /state/<id>/attributes."
|
|
34
|
+
},
|
|
35
|
+
"state": {
|
|
36
|
+
"$ref": "#/$defs/ComparisonTableState"
|
|
37
|
+
},
|
|
38
|
+
"actions": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"$defs": {
|
|
46
|
+
"ComparisonTableState": {
|
|
47
|
+
"title": "ComparisonTableState",
|
|
48
|
+
"description": "The comparison content owned by the backend: the table heading, the AI summary text, the compared products, and the ordered attribute descriptors defining the comparison rows.",
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": ["products", "attributes", "heading", "summary"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"heading": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Title displayed above the comparison table."
|
|
55
|
+
},
|
|
56
|
+
"summary": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "AI-generated summary text displayed below the comparison table."
|
|
59
|
+
},
|
|
60
|
+
"products": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"description": "The compared products shown as columns of the comparison table.",
|
|
63
|
+
"items": {
|
|
64
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/comparison-product.schema.json"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"attributes": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"description": "Attribute descriptors defining the comparison rows.",
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/comparison-attribute.schema.json"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/date-facet.schema.json",
|
|
4
|
+
"title": "DateFacet",
|
|
5
|
+
"description": "Renders a range-based date commerce facet. Presents date range values with their result counts and selection state, and dispatches actions to select, clear active values, apply a custom date range, and show more or fewer values.",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"component": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"const": "DateFacet"
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"field": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The commerce index field the facet operates on, 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 date-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
|
+
"state": {
|
|
48
|
+
"$ref": "#/$defs/DateFacetState"
|
|
49
|
+
},
|
|
50
|
+
"actions": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": [
|
|
53
|
+
"toggleSelect",
|
|
54
|
+
"toggleSingleSelect",
|
|
55
|
+
"clearAllActiveValues",
|
|
56
|
+
"applyCustomRange",
|
|
57
|
+
"showMoreValues",
|
|
58
|
+
"showLessValues"
|
|
59
|
+
],
|
|
60
|
+
"properties": {
|
|
61
|
+
"toggleSelect": {
|
|
62
|
+
"$ref": "#/$defs/DateFacetToggleSelectAction"
|
|
63
|
+
},
|
|
64
|
+
"toggleSingleSelect": {
|
|
65
|
+
"$ref": "#/$defs/DateFacetToggleSingleSelectAction"
|
|
66
|
+
},
|
|
67
|
+
"clearAllActiveValues": {
|
|
68
|
+
"$ref": "#/$defs/DateFacetClearAllActiveValuesAction"
|
|
69
|
+
},
|
|
70
|
+
"applyCustomRange": {
|
|
71
|
+
"$ref": "#/$defs/DateFacetApplyCustomRangeAction"
|
|
72
|
+
},
|
|
73
|
+
"showMoreValues": {
|
|
74
|
+
"$ref": "#/$defs/DateFacetShowMoreValuesAction"
|
|
75
|
+
},
|
|
76
|
+
"showLessValues": {
|
|
77
|
+
"$ref": "#/$defs/DateFacetShowLessValuesAction"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"$defs": {
|
|
85
|
+
"DateFacetState": {
|
|
86
|
+
"title": "DateFacetState",
|
|
87
|
+
"description": "The observable state of a date facet. Owned exclusively by the backend.",
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": [
|
|
90
|
+
"field",
|
|
91
|
+
"displayName",
|
|
92
|
+
"values",
|
|
93
|
+
"customRange",
|
|
94
|
+
"hasActiveValues",
|
|
95
|
+
"canShowMoreValues",
|
|
96
|
+
"canShowLessValues"
|
|
97
|
+
],
|
|
98
|
+
"properties": {
|
|
99
|
+
"field": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "The commerce index field the facet operates on."
|
|
102
|
+
},
|
|
103
|
+
"displayName": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "Human-readable label for the facet."
|
|
106
|
+
},
|
|
107
|
+
"values": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"description": "The date range values currently exposed by the facet.",
|
|
110
|
+
"items": {
|
|
111
|
+
"$ref": "#/$defs/DateFacetValue"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"customRange": {
|
|
115
|
+
"description": "The currently applied custom range, or null when none is active. Mutually exclusive with selected values.",
|
|
116
|
+
"oneOf": [
|
|
117
|
+
{
|
|
118
|
+
"$ref": "#/$defs/DateFacetCustomRange"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "null"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"hasActiveValues": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"description": "Whether at least one range value is not in the idle state."
|
|
128
|
+
},
|
|
129
|
+
"canShowMoreValues": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"description": "Whether more values than currently shown are available."
|
|
132
|
+
},
|
|
133
|
+
"canShowLessValues": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"description": "Whether the number of shown values can be reduced."
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"additionalProperties": false
|
|
139
|
+
},
|
|
140
|
+
"DateFacetValue": {
|
|
141
|
+
"title": "DateFacetValue",
|
|
142
|
+
"description": "A single selectable date range within a date facet.",
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": ["start", "end", "numberOfResults", "state"],
|
|
145
|
+
"properties": {
|
|
146
|
+
"start": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"description": "The inclusive start of the date range."
|
|
149
|
+
},
|
|
150
|
+
"end": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "The end of the date range."
|
|
153
|
+
},
|
|
154
|
+
"numberOfResults": {
|
|
155
|
+
"type": "integer",
|
|
156
|
+
"minimum": 0,
|
|
157
|
+
"description": "The number of results matching this range."
|
|
158
|
+
},
|
|
159
|
+
"state": {
|
|
160
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/selectable-facet-value-state.schema.json",
|
|
161
|
+
"description": "The selection state of this facet value (idle or selected; exclusion is not supported)."
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"additionalProperties": false
|
|
165
|
+
},
|
|
166
|
+
"DateFacetCustomRange": {
|
|
167
|
+
"title": "DateFacetCustomRange",
|
|
168
|
+
"description": "A custom date range applied by the user, with its result count.",
|
|
169
|
+
"type": "object",
|
|
170
|
+
"required": ["start", "end", "numberOfResults"],
|
|
171
|
+
"properties": {
|
|
172
|
+
"start": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"description": "The inclusive start of the custom date range."
|
|
175
|
+
},
|
|
176
|
+
"end": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"description": "The end of the custom date range."
|
|
179
|
+
},
|
|
180
|
+
"numberOfResults": {
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"minimum": 0,
|
|
183
|
+
"description": "The number of results matching this custom range."
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"additionalProperties": false
|
|
187
|
+
},
|
|
188
|
+
"DateFacetToggleSelectAction": {
|
|
189
|
+
"title": "dateFacetToggleSelect",
|
|
190
|
+
"description": "Toggles the selection of a date facet value.",
|
|
191
|
+
"allOf": [
|
|
192
|
+
{
|
|
193
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"properties": {
|
|
197
|
+
"payload": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"required": ["start", "end"],
|
|
200
|
+
"properties": {
|
|
201
|
+
"start": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"description": "The inclusive start of the date range to toggle."
|
|
204
|
+
},
|
|
205
|
+
"end": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"description": "The end of the date range to toggle."
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"DateFacetToggleSingleSelectAction": {
|
|
215
|
+
"title": "dateFacetToggleSingleSelect",
|
|
216
|
+
"description": "Toggles the selection of a range value, deselecting all other values (single-select behavior).",
|
|
217
|
+
"allOf": [
|
|
218
|
+
{
|
|
219
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"properties": {
|
|
223
|
+
"payload": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"required": ["start", "end"],
|
|
226
|
+
"properties": {
|
|
227
|
+
"start": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "The inclusive lower bound of the range to single-select."
|
|
230
|
+
},
|
|
231
|
+
"end": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "The upper bound of the range to single-select."
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"additionalProperties": false
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"DateFacetClearAllActiveValuesAction": {
|
|
241
|
+
"title": "dateFacetClearAllActiveValues",
|
|
242
|
+
"description": "Resets all date range values to the idle state, clearing every selection.",
|
|
243
|
+
"allOf": [
|
|
244
|
+
{
|
|
245
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"DateFacetApplyCustomRangeAction": {
|
|
250
|
+
"title": "dateFacetApplyCustomRange",
|
|
251
|
+
"description": "Applies a single custom date range, clearing any selected displayed ranges.",
|
|
252
|
+
"allOf": [
|
|
253
|
+
{
|
|
254
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"properties": {
|
|
258
|
+
"payload": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"required": ["start", "end"],
|
|
261
|
+
"properties": {
|
|
262
|
+
"start": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"description": "The inclusive start of the custom date range."
|
|
265
|
+
},
|
|
266
|
+
"end": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "The end of the custom date range."
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"additionalProperties": false
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"DateFacetShowMoreValuesAction": {
|
|
276
|
+
"title": "dateFacetShowMoreValues",
|
|
277
|
+
"description": "Increases the number of date range values shown.",
|
|
278
|
+
"allOf": [
|
|
279
|
+
{
|
|
280
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
"DateFacetShowLessValuesAction": {
|
|
285
|
+
"title": "dateFacetShowLessValues",
|
|
286
|
+
"description": "Decreases the number of date range values shown.",
|
|
287
|
+
"allOf": [
|
|
288
|
+
{
|
|
289
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/facet-manager.schema.json",
|
|
4
|
+
"title": "FacetManager",
|
|
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.",
|
|
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": "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)."
|
|
24
|
+
},
|
|
25
|
+
"state": {
|
|
26
|
+
"$ref": "#/$defs/FacetManagerState"
|
|
27
|
+
},
|
|
28
|
+
"actions": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {},
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"$defs": {
|
|
36
|
+
"FacetManagerState": {
|
|
37
|
+
"title": "FacetManagerState",
|
|
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.",
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": [],
|
|
41
|
+
"properties": {},
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
}
|
|
44
|
+
}
|
|
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
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/next-actions-bar.schema.json",
|
|
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 an action button.",
|
|
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": "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."
|
|
23
|
+
},
|
|
24
|
+
"state": {
|
|
25
|
+
"$ref": "#/$defs/NextActionsState"
|
|
26
|
+
},
|
|
27
|
+
"actions": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["selectAction"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"selectAction": {
|
|
32
|
+
"$ref": "#/$defs/SelectActionAction"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"$defs": {
|
|
40
|
+
"NextActionsState": {
|
|
41
|
+
"title": "NextActionsState",
|
|
42
|
+
"description": "The list of suggested actions to render. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
43
|
+
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["suggestedActions"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"suggestedActions": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"description": "Suggested actions the assistant offers the user.",
|
|
50
|
+
"items": {
|
|
51
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/action-item.schema.json"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
},
|
|
57
|
+
"SelectActionAction": {
|
|
58
|
+
"title": "selectAction",
|
|
59
|
+
"description": "Signals that the user selected one of the suggested actions.",
|
|
60
|
+
"allOf": [
|
|
61
|
+
{
|
|
62
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"payload": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["text", "type"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"text": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "The display text of the action the user selected."
|
|
73
|
+
},
|
|
74
|
+
"type": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["followup", "search"],
|
|
77
|
+
"description": "The kind of action selected: \"followup\" or \"search\"."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|