@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
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
"state": {
|
|
32
|
+
"$ref": "#/$defs/ProductResearchCardState"
|
|
33
|
+
},
|
|
34
|
+
"actions": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"$defs": {
|
|
42
|
+
"ProductResearchCardState": {
|
|
43
|
+
"title": "ProductResearchCardState",
|
|
44
|
+
"description": "The researched product and its research content. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
45
|
+
"$comment": "This schema validates the runtime state value the backend pushes to the frontend.",
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["product", "summary", "bullets"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"product": {
|
|
50
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/product.schema.json"
|
|
51
|
+
},
|
|
52
|
+
"summary": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"description": "Short research paragraph about the product."
|
|
56
|
+
},
|
|
57
|
+
"bullets": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"minItems": 1,
|
|
60
|
+
"description": "Concise product-education bullets, in display order. Producers currently emit at most 5 bullets.",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"additionalProperties": false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/product-summary.schema.json",
|
|
4
|
+
"title": "ProductSummary",
|
|
5
|
+
"description": "Renders a single commerce product as a compact summary row (thumbnail, name, short description, price) for a category slot. Read-only from the frontend.",
|
|
6
|
+
"$comment": "Compact-row presentation is expressed by this component type on the A2-UI plane, never as data in AG-UI state.",
|
|
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": "ProductSummary"
|
|
19
|
+
},
|
|
20
|
+
"categoryLabel": {
|
|
21
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
22
|
+
"description": "The product category label, bound to /state/<id>/categoryLabel."
|
|
23
|
+
},
|
|
24
|
+
"product": {
|
|
25
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
26
|
+
"description": "The single summarized product, bound to /state/<id>/product."
|
|
27
|
+
},
|
|
28
|
+
"state": {
|
|
29
|
+
"$ref": "#/$defs/ProductSummaryState"
|
|
30
|
+
},
|
|
31
|
+
"actions": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"$defs": {
|
|
39
|
+
"ProductSummaryState": {
|
|
40
|
+
"title": "ProductSummaryState",
|
|
41
|
+
"description": "The single product to summarize for a category slot. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["categoryLabel", "product"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"categoryLabel": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Display label of the product category this summary represents (e.g. 'Surfboard')."
|
|
48
|
+
},
|
|
49
|
+
"product": {
|
|
50
|
+
"description": "The single product to summarize, or null when no product is available for this slot.",
|
|
51
|
+
"oneOf": [
|
|
52
|
+
{
|
|
53
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/product.schema.json"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "null"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/query-suggestions.schema.json",
|
|
4
|
+
"title": "QuerySuggestions",
|
|
5
|
+
"description": "Requests and renders backend-provided query completions and product suggestions for the active search input.",
|
|
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": "QuerySuggestions"
|
|
18
|
+
},
|
|
19
|
+
"query": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The input query these suggestions were requested for, bound to /state/<id>/query."
|
|
22
|
+
},
|
|
23
|
+
"completions": {
|
|
24
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
25
|
+
"description": "The query completions, bound to /state/<id>/completions."
|
|
26
|
+
},
|
|
27
|
+
"products": {
|
|
28
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
29
|
+
"description": "The product suggestions, bound to /state/<id>/products."
|
|
30
|
+
},
|
|
31
|
+
"state": {
|
|
32
|
+
"$ref": "#/$defs/QuerySuggestionsState"
|
|
33
|
+
},
|
|
34
|
+
"actions": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["fetchSuggestions"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"fetchSuggestions": {
|
|
39
|
+
"$ref": "#/$defs/FetchSuggestionsAction"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"$defs": {
|
|
47
|
+
"QuerySuggestionsState": {
|
|
48
|
+
"title": "QuerySuggestionsState",
|
|
49
|
+
"description": "The suggestion result for one query. Owned exclusively by the backend.",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["query", "completions", "products"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"query": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "The input query for which these suggestions were requested."
|
|
56
|
+
},
|
|
57
|
+
"completions": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"description": "Query completions returned by the commerce service.",
|
|
60
|
+
"items": {
|
|
61
|
+
"$ref": "#/$defs/QueryCompletion"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"products": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"description": "Product suggestions returned by the commerce service.",
|
|
67
|
+
"items": {
|
|
68
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/product.schema.json"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
},
|
|
74
|
+
"FetchSuggestionsAction": {
|
|
75
|
+
"title": "fetchSuggestions",
|
|
76
|
+
"description": "Fetches query completions and product suggestions for the current input.",
|
|
77
|
+
"allOf": [
|
|
78
|
+
{
|
|
79
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"properties": {
|
|
83
|
+
"payload": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"required": ["query"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"query": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"QueryCompletion": {
|
|
96
|
+
"title": "QueryCompletion",
|
|
97
|
+
"description": "One query completion returned by the commerce service.",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"required": ["expression"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"expression": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "The suggested query text."
|
|
104
|
+
},
|
|
105
|
+
"score": {
|
|
106
|
+
"type": "number",
|
|
107
|
+
"description": "The relevance score returned by the commerce service, when available."
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"additionalProperties": false
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/query-summary.schema.json",
|
|
4
|
+
"title": "QuerySummary",
|
|
5
|
+
"description": "Summarizes the current result window for a search surface (e.g. 'Products 1-12 of 43 for Water Sports'). Read-only from the frontend.",
|
|
6
|
+
"$comment": "Carries its own backend-computed aggregate instead of reading sibling state (search box, pagination, product-list), so it has no cross-component coupling.",
|
|
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": "QuerySummary"
|
|
19
|
+
},
|
|
20
|
+
"query": {
|
|
21
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
22
|
+
"description": "The current query string, bound to /state/<id>/query."
|
|
23
|
+
},
|
|
24
|
+
"firstIndex": {
|
|
25
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
26
|
+
"description": "The 1-based index of the first result on the page, bound to /state/<id>/firstIndex."
|
|
27
|
+
},
|
|
28
|
+
"lastIndex": {
|
|
29
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
30
|
+
"description": "The 1-based index of the last result on the page, bound to /state/<id>/lastIndex."
|
|
31
|
+
},
|
|
32
|
+
"totalEntries": {
|
|
33
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
34
|
+
"description": "The total number of results, bound to /state/<id>/totalEntries."
|
|
35
|
+
},
|
|
36
|
+
"state": {
|
|
37
|
+
"$ref": "#/$defs/QuerySummaryState"
|
|
38
|
+
},
|
|
39
|
+
"actions": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {},
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"$defs": {
|
|
47
|
+
"QuerySummaryState": {
|
|
48
|
+
"title": "QuerySummaryState",
|
|
49
|
+
"description": "The backend-computed aggregate for the current result window. Owned exclusively by the backend; the frontend must not mutate this directly.",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["query", "firstIndex", "lastIndex", "totalEntries"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"query": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "The current query string. May be empty when the surface has no active query."
|
|
56
|
+
},
|
|
57
|
+
"firstIndex": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 0,
|
|
60
|
+
"description": "The 1-based index of the first result on the current page."
|
|
61
|
+
},
|
|
62
|
+
"lastIndex": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 0,
|
|
65
|
+
"description": "The 1-based index of the last result on the current page."
|
|
66
|
+
},
|
|
67
|
+
"totalEntries": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"minimum": 0,
|
|
70
|
+
"description": "The total number of results across all pages."
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -9,9 +9,40 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"properties": {
|
|
12
|
-
"
|
|
12
|
+
"component": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"const": "
|
|
14
|
+
"const": "RegularFacet"
|
|
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 is built 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 facet values, bound to /state/<id>/values."
|
|
30
|
+
},
|
|
31
|
+
"hasActiveValues": {
|
|
32
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
33
|
+
"description": "Whether at least one facet value is active, bound to /state/<id>/hasActiveValues."
|
|
34
|
+
},
|
|
35
|
+
"canShowMoreValues": {
|
|
36
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
37
|
+
"description": "Whether more facet values can be shown, bound to /state/<id>/canShowMoreValues."
|
|
38
|
+
},
|
|
39
|
+
"canShowLessValues": {
|
|
40
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
41
|
+
"description": "Whether fewer facet values can be shown, bound to /state/<id>/canShowLessValues."
|
|
42
|
+
},
|
|
43
|
+
"facetSearch": {
|
|
44
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
45
|
+
"description": "The facet search state, bound to /state/<id>/facetSearch."
|
|
15
46
|
},
|
|
16
47
|
"state": {
|
|
17
48
|
"$ref": "#/$defs/RegularFacetState"
|
|
@@ -84,19 +115,14 @@
|
|
|
84
115
|
"field": {
|
|
85
116
|
"type": "string",
|
|
86
117
|
"minLength": 1,
|
|
87
|
-
"maxLength": 255,
|
|
88
118
|
"description": "The index field the facet is built on."
|
|
89
119
|
},
|
|
90
120
|
"displayName": {
|
|
91
121
|
"type": "string",
|
|
92
|
-
"minLength": 1,
|
|
93
|
-
"maxLength": 255,
|
|
94
122
|
"description": "Human-readable name for the facet."
|
|
95
123
|
},
|
|
96
124
|
"values": {
|
|
97
125
|
"type": "array",
|
|
98
|
-
"minItems": 0,
|
|
99
|
-
"maxItems": 1000,
|
|
100
126
|
"description": "The facet values available for selection.",
|
|
101
127
|
"items": {
|
|
102
128
|
"$ref": "#/$defs/RegularFacetValue"
|
|
@@ -125,22 +151,16 @@
|
|
|
125
151
|
"title": "RegularFacetValue",
|
|
126
152
|
"description": "A single selectable value within a regular facet.",
|
|
127
153
|
"type": "object",
|
|
128
|
-
"required": [
|
|
129
|
-
"value",
|
|
130
|
-
"numberOfResults",
|
|
131
|
-
"state"
|
|
132
|
-
],
|
|
154
|
+
"required": ["value", "numberOfResults", "state"],
|
|
133
155
|
"properties": {
|
|
134
156
|
"value": {
|
|
135
157
|
"type": "string",
|
|
136
158
|
"minLength": 1,
|
|
137
|
-
"maxLength": 1024,
|
|
138
159
|
"description": "The raw facet value."
|
|
139
160
|
},
|
|
140
161
|
"numberOfResults": {
|
|
141
162
|
"type": "integer",
|
|
142
163
|
"minimum": 0,
|
|
143
|
-
"maximum": 999999999,
|
|
144
164
|
"description": "The number of results matching this facet value."
|
|
145
165
|
},
|
|
146
166
|
"state": {
|
|
@@ -154,16 +174,10 @@
|
|
|
154
174
|
"title": "RegularFacetSearch",
|
|
155
175
|
"description": "The facet search state for a regular facet.",
|
|
156
176
|
"type": "object",
|
|
157
|
-
"required": [
|
|
158
|
-
"query",
|
|
159
|
-
"canShowMoreResults",
|
|
160
|
-
"results"
|
|
161
|
-
],
|
|
177
|
+
"required": ["query", "canShowMoreResults", "results"],
|
|
162
178
|
"properties": {
|
|
163
179
|
"query": {
|
|
164
180
|
"type": "string",
|
|
165
|
-
"minLength": 0,
|
|
166
|
-
"maxLength": 1024,
|
|
167
181
|
"description": "The current facet search query."
|
|
168
182
|
},
|
|
169
183
|
"canShowMoreResults": {
|
|
@@ -172,8 +186,6 @@
|
|
|
172
186
|
},
|
|
173
187
|
"results": {
|
|
174
188
|
"type": "array",
|
|
175
|
-
"minItems": 0,
|
|
176
|
-
"maxItems": 1000,
|
|
177
189
|
"description": "The current facet search results.",
|
|
178
190
|
"items": {
|
|
179
191
|
"$ref": "#/$defs/RegularFacetSearchResult"
|
|
@@ -186,21 +198,16 @@
|
|
|
186
198
|
"title": "RegularFacetSearchResult",
|
|
187
199
|
"description": "A single result returned by a regular facet search. Facet search only returns idle (unselected) values, so it carries no selection state.",
|
|
188
200
|
"type": "object",
|
|
189
|
-
"required": [
|
|
190
|
-
"value",
|
|
191
|
-
"numberOfResults"
|
|
192
|
-
],
|
|
201
|
+
"required": ["value", "numberOfResults"],
|
|
193
202
|
"properties": {
|
|
194
203
|
"value": {
|
|
195
204
|
"type": "string",
|
|
196
205
|
"minLength": 1,
|
|
197
|
-
"maxLength": 1024,
|
|
198
206
|
"description": "The raw facet value. Pass this to toggleSelect/toggleExclude to act on it."
|
|
199
207
|
},
|
|
200
208
|
"numberOfResults": {
|
|
201
209
|
"type": "integer",
|
|
202
210
|
"minimum": 0,
|
|
203
|
-
"maximum": 999999999,
|
|
204
211
|
"description": "The number of results matching this facet search value."
|
|
205
212
|
}
|
|
206
213
|
},
|
|
@@ -217,14 +224,11 @@
|
|
|
217
224
|
"properties": {
|
|
218
225
|
"payload": {
|
|
219
226
|
"type": "object",
|
|
220
|
-
"required": [
|
|
221
|
-
"value"
|
|
222
|
-
],
|
|
227
|
+
"required": ["value"],
|
|
223
228
|
"properties": {
|
|
224
229
|
"value": {
|
|
225
230
|
"type": "string",
|
|
226
231
|
"minLength": 1,
|
|
227
|
-
"maxLength": 1024,
|
|
228
232
|
"description": "The raw facet value to toggle selection for."
|
|
229
233
|
}
|
|
230
234
|
},
|
|
@@ -243,14 +247,11 @@
|
|
|
243
247
|
"properties": {
|
|
244
248
|
"payload": {
|
|
245
249
|
"type": "object",
|
|
246
|
-
"required": [
|
|
247
|
-
"value"
|
|
248
|
-
],
|
|
250
|
+
"required": ["value"],
|
|
249
251
|
"properties": {
|
|
250
252
|
"value": {
|
|
251
253
|
"type": "string",
|
|
252
254
|
"minLength": 1,
|
|
253
|
-
"maxLength": 1024,
|
|
254
255
|
"description": "The raw facet value to toggle exclusion for."
|
|
255
256
|
}
|
|
256
257
|
},
|
|
@@ -269,14 +270,11 @@
|
|
|
269
270
|
"properties": {
|
|
270
271
|
"payload": {
|
|
271
272
|
"type": "object",
|
|
272
|
-
"required": [
|
|
273
|
-
"value"
|
|
274
|
-
],
|
|
273
|
+
"required": ["value"],
|
|
275
274
|
"properties": {
|
|
276
275
|
"value": {
|
|
277
276
|
"type": "string",
|
|
278
277
|
"minLength": 1,
|
|
279
|
-
"maxLength": 1024,
|
|
280
278
|
"description": "The raw facet value to single-select."
|
|
281
279
|
}
|
|
282
280
|
},
|
|
@@ -295,14 +293,11 @@
|
|
|
295
293
|
"properties": {
|
|
296
294
|
"payload": {
|
|
297
295
|
"type": "object",
|
|
298
|
-
"required": [
|
|
299
|
-
"value"
|
|
300
|
-
],
|
|
296
|
+
"required": ["value"],
|
|
301
297
|
"properties": {
|
|
302
298
|
"value": {
|
|
303
299
|
"type": "string",
|
|
304
300
|
"minLength": 1,
|
|
305
|
-
"maxLength": 1024,
|
|
306
301
|
"description": "The raw facet value to single-exclude."
|
|
307
302
|
}
|
|
308
303
|
},
|
|
@@ -330,14 +325,10 @@
|
|
|
330
325
|
"properties": {
|
|
331
326
|
"payload": {
|
|
332
327
|
"type": "object",
|
|
333
|
-
"required": [
|
|
334
|
-
"query"
|
|
335
|
-
],
|
|
328
|
+
"required": ["query"],
|
|
336
329
|
"properties": {
|
|
337
330
|
"query": {
|
|
338
331
|
"type": "string",
|
|
339
|
-
"minLength": 0,
|
|
340
|
-
"maxLength": 1024,
|
|
341
332
|
"description": "The facet search query to run."
|
|
342
333
|
}
|
|
343
334
|
},
|
|
@@ -382,4 +373,4 @@
|
|
|
382
373
|
]
|
|
383
374
|
}
|
|
384
375
|
}
|
|
385
|
-
}
|
|
376
|
+
}
|