|
9 | 9 | "properties": {
|
10 | 10 | "value": {
|
11 | 11 | "description": "The filter value, as selected or suitable for visualization.",
|
12 |
| - "type": "string", |
| 12 | + "type": ["string", "object"], |
13 | 13 | "minLength": 1
|
14 | 14 | },
|
15 | 15 | "min": {
|
|
36 | 36 | "description": "The number of products matching a filter. Not supported in all configuration constellations.",
|
37 | 37 | "type": ["number", "null"]
|
38 | 38 | },
|
| 39 | + "frequencyType": { |
| 40 | + "type": "string", |
| 41 | + "enum": [ |
| 42 | + "additive", |
| 43 | + "absolute" |
| 44 | + ], |
| 45 | + "description": "In case of a selected-filter, this property indicates whether the frequency is the number of additional products you'll get after selecting the filter (additive), or whether it's the total number of results you'll have after selecting the filter (absolute)." |
| 46 | + }, |
39 | 47 | "colorCode": {
|
40 | 48 | "description": "For color filters, the hexadecimal code corresponding to the color. The filter's value is the configured color name in such a case.",
|
41 | 49 | "type": "string",
|
|
52 | 60 | },
|
53 | 61 | "additionalProperties": false
|
54 | 62 | },
|
55 |
| - "availableFilter": { |
| 63 | + "filter": { |
56 | 64 | "description": "A selected value, with limited metadata as compared to available filters.",
|
57 | 65 | "type": "object",
|
58 | 66 | "properties": {
|
|
71 | 79 | "type": "string",
|
72 | 80 | "enum": [
|
73 | 81 | "select",
|
74 |
| - "rangeSlider", |
| 82 | + "range-slider", |
75 | 83 | "color",
|
76 | 84 | "label",
|
77 | 85 | "image"
|
|
83 | 91 | "single",
|
84 | 92 | "multiple"
|
85 | 93 | ],
|
86 |
| - "description": "Whether one or more filter values can be selected at the same time. Only applies to a subset of available filter types." |
| 94 | + "description": "Whether one or more filter values can be selected at the same time." |
87 | 95 | },
|
88 | 96 | "cssClass": {
|
89 | 97 | "type": "string",
|
|
104 | 112 | "pinnedFilterValueCount": {
|
105 | 113 | "type": "integer",
|
106 | 114 | "description": "This is the number of filter values that should always be shown, and any more values than that should be hidden, e.g. by putting them in a dropdown."
|
| 115 | + }, |
| 116 | + "combinationOperation": { |
| 117 | + "type": "string", |
| 118 | + "enum": [ |
| 119 | + "or", |
| 120 | + "and" |
| 121 | + ], |
| 122 | + "description": "This indicates whether multiple-filters are applied in a OR- or AND-condition and do only apply after a minimum of two filters have been selected. The AND-condition shrinks the result (A and B have to match), while the OR-condition makes it grow (A or B have to match)." |
| 123 | + }, |
| 124 | + "totalRange": { |
| 125 | + "description": "The usable range of a range slider.", |
| 126 | + "properties": { |
| 127 | + "min": { |
| 128 | + "type": "number", |
| 129 | + "description": "The minimum of the possible range." |
| 130 | + }, |
| 131 | + "max": { |
| 132 | + "type": "number", |
| 133 | + "description": "The maximum of the possible range." |
| 134 | + } |
| 135 | + }, |
| 136 | + "additionalProperties": false, |
| 137 | + "required": [ |
| 138 | + "min", |
| 139 | + "max" |
| 140 | + ] |
| 141 | + }, |
| 142 | + "selectedRange": { |
| 143 | + "description": "The currently selected range of a range slider.", |
| 144 | + "properties": { |
| 145 | + "min": { |
| 146 | + "type": "number", |
| 147 | + "description": "The minimum of the selected range." |
| 148 | + }, |
| 149 | + "max": { |
| 150 | + "type": "number", |
| 151 | + "description": "The maximum of the selected range." |
| 152 | + } |
| 153 | + }, |
| 154 | + "additionalProperties": false, |
| 155 | + "required": [ |
| 156 | + "min", |
| 157 | + "max" |
| 158 | + ] |
| 159 | + }, |
| 160 | + "stepSize": { |
| 161 | + "type": "number", |
| 162 | + "description": "The step size for range filters." |
| 163 | + }, |
| 164 | + "unit": { |
| 165 | + "type": "string", |
| 166 | + "description": "The unit for range filters." |
107 | 167 | }
|
108 | 168 | },
|
109 | 169 | "additionalProperties": false,
|
|
136 | 196 | "description": "Items per page."
|
137 | 197 | },
|
138 | 198 | "serviceId": {
|
139 |
| - "description": "Mirrored from the required request parameter \"shopkey\"", |
| 199 | + "description": "Mirrored from the required request parameter \"shopkey\".", |
140 | 200 | "type": "string",
|
141 | 201 | "pattern": "^[0-9A-F]{32}$"
|
142 | 202 | },
|
|
186 | 246 | "relevanceBased",
|
187 | 247 | "direction"
|
188 | 248 | ]
|
189 |
| - }, |
190 |
| - "selectedFilters": { |
191 |
| - "description": "Filters that have previously been selected.", |
192 |
| - "type": "object", |
193 |
| - "patternProperties": { |
194 |
| - "^.*$": { |
195 |
| - "type": "array", |
196 |
| - "items": { |
197 |
| - "$ref": "#/definitions/filterMetadata" |
198 |
| - } |
199 |
| - } |
200 |
| - } |
201 | 249 | }
|
202 | 250 | },
|
203 | 251 | "additionalProperties": false,
|
|
208 | 256 | "serviceId",
|
209 | 257 | "usergroup",
|
210 | 258 | "userId",
|
211 |
| - "order", |
212 |
| - "selectedFilters" |
| 259 | + "order" |
213 | 260 | ]
|
214 | 261 | },
|
215 | 262 | "result": {
|
|
380 | 427 | "minLength": 0
|
381 | 428 | },
|
382 | 429 | "properties": {
|
383 |
| - "description": "Non-searchable value exported as properties. Includes additional images, if applicable. The desired values have to be requested with the 'properties[]' parameter", |
| 430 | + "description": "Non-searchable value exported as properties. Includes additional images, if applicable. The desired values have to be requested with the 'properties[]' parameter.", |
384 | 431 | "type": "object",
|
385 | 432 | "properties": {
|
386 | 433 | ".*": {
|
|
434 | 481 | ]
|
435 | 482 | }
|
436 | 483 | },
|
437 |
| - "availableFilters": { |
| 484 | + "filters": { |
438 | 485 | "description": "Filters available based on the query, and as configured in the filter configuration. Does not include inactive filters.",
|
439 | 486 | "type": "object",
|
440 | 487 | "properties": {
|
441 | 488 | "main": {
|
442 | 489 | "description": "Filters configured for primary visibility.",
|
443 | 490 | "type": "array",
|
444 | 491 | "items": {
|
445 |
| - "$ref": "#/definitions/availableFilter" |
| 492 | + "$ref": "#/definitions/filter" |
446 | 493 | }
|
447 | 494 | },
|
448 | 495 | "other": {
|
449 | 496 | "description": "Filters configured for secondary visibility. Should be initially hidden or collapsed.",
|
450 | 497 | "type": "array",
|
451 | 498 | "items": {
|
452 |
| - "$ref": "#/definitions/availableFilter" |
| 499 | + "$ref": "#/definitions/filter" |
453 | 500 | }
|
454 | 501 | }
|
455 | 502 | },
|
|
465 | 512 | "metadata",
|
466 | 513 | "variant",
|
467 | 514 | "items",
|
468 |
| - "availableFilters" |
| 515 | + "filters" |
469 | 516 | ]
|
470 | 517 | }
|
471 | 518 | },
|
|
0 commit comments