@coveo/thermidor-schema 1.0.0-beta.24 → 1.0.0-beta.26
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/dist/generated/schemas.d.ts +685 -0
- package/dist/generated/schemas.js +127 -0
- package/dist/generated/zod3/index.d.ts +2 -2
- package/dist/generated/zod3/index.js +1 -1
- package/dist/generated/zod3/schemas.d.ts +10115 -3820
- package/dist/generated/zod3/schemas.js +127 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/schema/component-contracts.schema.json +3 -0
- package/schema/components/breadbox.schema.json +82 -0
- package/schema/definitions/badge-placement.schema.json +22 -0
- package/schema/definitions/badge.schema.json +27 -0
- package/schema/definitions/breadbox-date-range-facet.schema.json +56 -0
- package/schema/definitions/breadbox-deselect-date-range.schema.json +28 -0
- package/schema/definitions/breadbox-deselect-hierarchical-path.schema.json +28 -0
- package/schema/definitions/breadbox-deselect-numerical-range.schema.json +28 -0
- package/schema/definitions/breadbox-deselect-payload.schema.json +20 -0
- package/schema/definitions/breadbox-deselect-regular-value.schema.json +25 -0
- package/schema/definitions/breadbox-facet.schema.json +20 -0
- package/schema/definitions/breadbox-hierarchical-facet.schema.json +37 -0
- package/schema/definitions/breadbox-numerical-range-facet.schema.json +56 -0
- package/schema/definitions/breadbox-regular-facet.schema.json +59 -0
- package/schema/definitions/product.schema.json +7 -0
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
// The Zod 3 dialect of this file. Generated from the same canonical JSON Schema
|
|
4
4
|
// documents as ../schemas.ts; see ../../zod3-compat.ts.
|
|
5
5
|
import * as z from '../../zod3-compat.js';
|
|
6
|
+
// Whether the value is selected or excluded.
|
|
7
|
+
export const BreadboxRegularFacetValueStateSchema = z.enum(['excluded', 'selected']);
|
|
6
8
|
export const CartUpdateOperationSchema = z.enum(['add', 'remove', 'setQuantity']);
|
|
7
9
|
// The kind of action selected: "followup" or "search".
|
|
8
10
|
export const SelectActionPayloadTypeSchema = z.enum(['followup', 'search']);
|
|
@@ -16,8 +18,17 @@ export const FacetValueStateSchema = z.enum(['excluded', 'idle', 'selected']);
|
|
|
16
18
|
//
|
|
17
19
|
// The selection state of this facet value (idle or selected; exclusion is not supported).
|
|
18
20
|
export const SelectableFacetValueStateSchema = z.enum(['idle', 'selected']);
|
|
21
|
+
export const BreadboxFacetTypeSchema = z.enum([
|
|
22
|
+
'dateRange',
|
|
23
|
+
'hierarchical',
|
|
24
|
+
'numericalRange',
|
|
25
|
+
'regular',
|
|
26
|
+
]);
|
|
19
27
|
export const ProductSchema = z.strictObject({
|
|
20
28
|
additionalFields: z.record(z.string(), z.unknown()),
|
|
29
|
+
get badgePlacements() {
|
|
30
|
+
return z.array(BadgePlacementSchema).optional();
|
|
31
|
+
},
|
|
21
32
|
get children() {
|
|
22
33
|
return z.array(ProductSchema).optional();
|
|
23
34
|
},
|
|
@@ -58,11 +69,58 @@ export const ChildListClassSchema = z.strictObject({
|
|
|
58
69
|
componentId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
59
70
|
path: z.string(),
|
|
60
71
|
});
|
|
72
|
+
export const BreadboxRegularFacetValueSchema = z.strictObject({
|
|
73
|
+
state: z.enum(['selected', 'excluded']),
|
|
74
|
+
value: z.string().min(1),
|
|
75
|
+
});
|
|
76
|
+
export const BreadboxNumericalRangeFacetValueSchema = z.strictObject({
|
|
77
|
+
end: z.number(),
|
|
78
|
+
start: z.number(),
|
|
79
|
+
});
|
|
80
|
+
export const BreadboxDateRangeFacetValueSchema = z.strictObject({
|
|
81
|
+
end: z.string(),
|
|
82
|
+
start: z.string(),
|
|
83
|
+
});
|
|
84
|
+
export const BreadboxHierarchicalFacetSchema = z.strictObject({
|
|
85
|
+
displayName: z.string(),
|
|
86
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
87
|
+
field: z.string().min(1),
|
|
88
|
+
path: z.array(z.string()).min(1),
|
|
89
|
+
type: z.literal('hierarchical'),
|
|
90
|
+
});
|
|
91
|
+
export const BreadboxDeselectRegularValueSchema = z.strictObject({
|
|
92
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
93
|
+
type: z.literal('regular'),
|
|
94
|
+
value: z.string().min(1),
|
|
95
|
+
});
|
|
96
|
+
export const BreadboxDeselectNumericalRangeSchema = z.strictObject({
|
|
97
|
+
end: z.number(),
|
|
98
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
99
|
+
start: z.number(),
|
|
100
|
+
type: z.literal('numericalRange'),
|
|
101
|
+
});
|
|
102
|
+
export const BreadboxDeselectDateRangeSchema = z.strictObject({
|
|
103
|
+
end: z.string(),
|
|
104
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
105
|
+
start: z.string(),
|
|
106
|
+
type: z.literal('dateRange'),
|
|
107
|
+
});
|
|
108
|
+
export const BreadboxDeselectHierarchicalPathSchema = z.strictObject({
|
|
109
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
110
|
+
path: z.array(z.string()).min(1),
|
|
111
|
+
type: z.literal('hierarchical'),
|
|
112
|
+
});
|
|
61
113
|
export const ProductCarouselActionsSchema = z.strictObject({});
|
|
62
114
|
export const ProductCarouselStateSchema = z.strictObject({
|
|
63
115
|
heading: z.string(),
|
|
64
116
|
products: z.array(ProductSchema),
|
|
65
117
|
});
|
|
118
|
+
export const BadgeSchema = z.strictObject({
|
|
119
|
+
backgroundColor: z.string().optional(),
|
|
120
|
+
iconUrl: z.string().optional(),
|
|
121
|
+
text: z.string(),
|
|
122
|
+
textColor: z.string().optional(),
|
|
123
|
+
});
|
|
66
124
|
export const PurchaseProductSchema = z.strictObject({
|
|
67
125
|
name: z.string().optional(),
|
|
68
126
|
price: z.union([z.number(), z.null()]).optional(),
|
|
@@ -257,6 +315,18 @@ export const CategoryFacetValuesSchema = z.strictObject({
|
|
|
257
315
|
});
|
|
258
316
|
export const FacetManagerActionsSchema = z.strictObject({});
|
|
259
317
|
export const FacetManagerStateSchema = z.strictObject({});
|
|
318
|
+
export const BreadboxDeselectPayloadSchema = z.discriminatedUnion('type', [
|
|
319
|
+
BreadboxDeselectRegularValueSchema,
|
|
320
|
+
BreadboxDeselectNumericalRangeSchema,
|
|
321
|
+
BreadboxDeselectDateRangeSchema,
|
|
322
|
+
BreadboxDeselectHierarchicalPathSchema,
|
|
323
|
+
]);
|
|
324
|
+
export const BreadboxFacetValueSchema = z.strictObject({
|
|
325
|
+
state: z.enum(['selected', 'excluded']).optional(),
|
|
326
|
+
value: z.string().min(1).optional(),
|
|
327
|
+
end: z.union([z.number(), z.string()]).optional(),
|
|
328
|
+
start: z.union([z.number(), z.string()]).optional(),
|
|
329
|
+
});
|
|
260
330
|
export const OverrideCorrectionPayloadSchema = z.strictObject({
|
|
261
331
|
originalQuery: z.string().min(1),
|
|
262
332
|
});
|
|
@@ -284,12 +354,37 @@ export const SetPageSizePayloadSchema = z.strictObject({
|
|
|
284
354
|
export const PageSizeStateSchema = z.strictObject({
|
|
285
355
|
pageSize: z.number().int().min(1),
|
|
286
356
|
});
|
|
357
|
+
export const BreadboxRegularFacetSchema = z.strictObject({
|
|
358
|
+
displayName: z.string(),
|
|
359
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
360
|
+
field: z.string().min(1),
|
|
361
|
+
type: z.literal('regular'),
|
|
362
|
+
values: z.array(BreadboxRegularFacetValueSchema).min(1),
|
|
363
|
+
});
|
|
364
|
+
export const BreadboxNumericalRangeFacetSchema = z.strictObject({
|
|
365
|
+
displayName: z.string(),
|
|
366
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
367
|
+
field: z.string().min(1),
|
|
368
|
+
type: z.literal('numericalRange'),
|
|
369
|
+
values: z.array(BreadboxNumericalRangeFacetValueSchema).min(1),
|
|
370
|
+
});
|
|
371
|
+
export const BreadboxDateRangeFacetSchema = z.strictObject({
|
|
372
|
+
displayName: z.string(),
|
|
373
|
+
facetId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
374
|
+
field: z.string().min(1),
|
|
375
|
+
type: z.literal('dateRange'),
|
|
376
|
+
values: z.array(BreadboxDateRangeFacetValueSchema).min(1),
|
|
377
|
+
});
|
|
287
378
|
export const ProductCarouselSchema = z.looseObject({
|
|
288
379
|
actions: ProductCarouselActionsSchema.optional(),
|
|
289
380
|
component: z.literal('ProductCarousel'),
|
|
290
381
|
id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
291
382
|
state: ProductCarouselStateSchema.optional(),
|
|
292
383
|
});
|
|
384
|
+
export const BadgePlacementSchema = z.strictObject({
|
|
385
|
+
badges: z.array(BadgeSchema),
|
|
386
|
+
placementId: z.string(),
|
|
387
|
+
});
|
|
293
388
|
export const PurchasePayloadSchema = z.strictObject({
|
|
294
389
|
products: z.array(PurchaseProductSchema),
|
|
295
390
|
transaction: TransactionSchema,
|
|
@@ -434,6 +529,15 @@ export const FacetManagerSchema = z.looseObject({
|
|
|
434
529
|
id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
435
530
|
state: FacetManagerStateSchema.optional(),
|
|
436
531
|
});
|
|
532
|
+
export const BreadboxDeselectSchema = z.strictObject({
|
|
533
|
+
payload: BreadboxDeselectPayloadSchema,
|
|
534
|
+
});
|
|
535
|
+
export const BreadboxFacetSchema = z.discriminatedUnion('type', [
|
|
536
|
+
BreadboxRegularFacetSchema,
|
|
537
|
+
BreadboxNumericalRangeFacetSchema,
|
|
538
|
+
BreadboxDateRangeFacetSchema,
|
|
539
|
+
BreadboxHierarchicalFacetSchema,
|
|
540
|
+
]);
|
|
437
541
|
export const OverrideCorrectionSchema = z.strictObject({
|
|
438
542
|
payload: OverrideCorrectionPayloadSchema,
|
|
439
543
|
});
|
|
@@ -546,6 +650,13 @@ export const CategoryFacetStateSchema = z.strictObject({
|
|
|
546
650
|
field: z.string(),
|
|
547
651
|
values: CategoryFacetValuesSchema,
|
|
548
652
|
});
|
|
653
|
+
export const BreadboxActionsSchema = z.strictObject({
|
|
654
|
+
clearAll: ActionSchema,
|
|
655
|
+
deselect: BreadboxDeselectSchema,
|
|
656
|
+
});
|
|
657
|
+
export const BreadboxStateSchema = z.strictObject({
|
|
658
|
+
facets: z.array(BreadboxFacetSchema),
|
|
659
|
+
});
|
|
549
660
|
export const RestoreStatePayloadSchema = z.strictObject({
|
|
550
661
|
facets: z.array(FacetRestoreSchema).optional(),
|
|
551
662
|
page: z.number().int().min(0),
|
|
@@ -621,6 +732,12 @@ export const CategoryFacetSchema = z.looseObject({
|
|
|
621
732
|
id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
622
733
|
state: CategoryFacetStateSchema.optional(),
|
|
623
734
|
});
|
|
735
|
+
export const BreadboxSchema = z.looseObject({
|
|
736
|
+
actions: BreadboxActionsSchema.optional(),
|
|
737
|
+
component: z.literal('Breadbox'),
|
|
738
|
+
id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
739
|
+
state: BreadboxStateSchema.optional(),
|
|
740
|
+
});
|
|
624
741
|
export const RestoreStateSchema = z.strictObject({
|
|
625
742
|
payload: RestoreStatePayloadSchema,
|
|
626
743
|
});
|
|
@@ -664,6 +781,7 @@ export const ComponentContractsSchema = z.discriminatedUnion('component', [
|
|
|
664
781
|
DateFacetSchema,
|
|
665
782
|
CategoryFacetSchema,
|
|
666
783
|
FacetManagerSchema,
|
|
784
|
+
BreadboxSchema,
|
|
667
785
|
CommerceSearchSchema,
|
|
668
786
|
LayoutStackSchema,
|
|
669
787
|
QuerySummarySchema,
|
|
@@ -713,6 +831,9 @@ export const DynamicActionSchema = z.object({
|
|
|
713
831
|
* data model; composition child-ref props stay static so child ids reach the renderer
|
|
714
832
|
* untouched. The resolved shape a renderer actually reads is the `XxxProps` type.
|
|
715
833
|
*/
|
|
834
|
+
export const BreadboxPropsSchema = z.object({
|
|
835
|
+
facets: z.union([BreadboxStateSchema.shape['facets'], DataBindingSchema, FunctionCallSchema]),
|
|
836
|
+
});
|
|
716
837
|
export const BundleDisplayPropsSchema = z.object({
|
|
717
838
|
heading: DynamicStringSchema.optional(),
|
|
718
839
|
tiers: z.union([BundleDisplayStateSchema.shape['tiers'], DataBindingSchema, FunctionCallSchema]),
|
|
@@ -888,6 +1009,12 @@ export const SortPropsSchema = z.object({
|
|
|
888
1009
|
* never`. The wire field is `context`; the internal validation layer calls the same data
|
|
889
1010
|
* `payload` (see design: Action typing).
|
|
890
1011
|
*/
|
|
1012
|
+
export const BreadboxActionSchema = z.union([
|
|
1013
|
+
z.object({
|
|
1014
|
+
event: z.object({ name: z.literal('deselect'), context: BreadboxDeselectPayloadSchema }),
|
|
1015
|
+
}),
|
|
1016
|
+
z.object({ event: z.object({ name: z.literal('clearAll'), context: z.unknown() }) }),
|
|
1017
|
+
]);
|
|
891
1018
|
export const BundleDisplayActionSchema = z.never();
|
|
892
1019
|
export const CartActionSchema = z.union([
|
|
893
1020
|
z.object({
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const THERMIDOR_CATALOG_ID = "https://schema.thermidor.coveo.com/a2-ui/catalog.json";
|
|
2
|
-
export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
|
|
3
|
-
export type { ActionItem, FollowupActionItem, SearchActionItem, SearchOptionActionItem, Cart, CartActions, CartState, UpdateCart, UpdateCartPayload, CartUpdateOperation, Purchase, PurchasePayload, PurchaseProduct, Transaction, QuerySuggestions, QuerySuggestionsActions, QuerySuggestionsState, QueryCompletion, FetchSuggestions, FetchSuggestionsPayload, RestoreState, RestoreStatePayload, FacetRestore, NumericRangeRestore, OverrideCorrection, OverrideCorrectionPayload, ShowMore, ShowMorePayload, SelectProducts, SelectProductsPayload, ProductClick, ProductClickPayload, BundleDisplay, BundleDisplayState, BundleSlot, BundleTier, CategoryFacet, CategoryFacetActions, CategoryFacetValue, CategoryFacetSearch, CategoryFacetSearchPayload, CategoryFacetSelectPathPayload, CategoryFacetState, CategoryFacetValues, CommerceSearch, CommerceSearchActions, CommerceSearchState, SubmitQuery, SubmitQueryPayload, ComparisonAttribute, ComparisonProduct, ComparisonTable, ComparisonTableState, ComponentContracts, DateFacet, DateFacetActions, DateFacetApplyCustomRangePayload, DateFacetCustomRange, DateFacetState, DateFacetToggleSelectPayload, DateFacetToggleSingleSelectPayload, DateFacetValue, FacetManager, FacetManagerActions, FacetManagerState, FacetValueState, SelectableFacetValueState, LayoutStack, LayoutStackState, NextActionsBar, NextActionsState, NumericFacet, NumericFacetActions, NumericFacetCustomRange, NumericFacetDomain, NumericFacetApplyCustomRangePayload, NumericFacetState, NumericFacetToggleSelectPayload, NumericFacetToggleSingleSelectPayload, NumericFacetValue, PageSize, PageSizeActions, PageSizeState, Pagination, PaginationActions, PaginationState, Product, ProductCarousel, ProductCarouselState, ProductList, ProductListActions, ProductListState, ProductResearchCard, ProductResearchCardActions, ProductResearchCardState, ProductSummary, ProductSummaryActions, ProductSummaryState, QuerySummary, QuerySummaryState, RegularFacet, RegularFacetActions, RegularFacetSearch, RegularFacetSearchResult, RegularFacetState, RegularFacetToggleExcludePayload, RegularFacetToggleSelectPayload, RegularFacetToggleSingleExcludePayload, RegularFacetToggleSingleSelectPayload, RegularFacetValue, SelectActionPayload, SelectSearchOptionPayload, SelectPagePayload, SelectSortPayload, SetPageSizePayload, Sort, SortActions, SortCriterion, SortState, DataBinding, FunctionCall, DynamicNumber, DynamicString, DynamicBoolean, DynamicStringList, DynamicValue, DynamicAction, BundleDisplayAction, CategoryFacetAction, CommerceSearchAction, ComparisonTableAction, DateFacetAction, FacetManagerAction, LayoutStackAction, NextActionsBarAction, NumericFacetAction, PageSizeAction, PaginationAction, ProductCarouselAction, ProductListAction, ProductResearchCardAction, ProductSummaryAction, QuerySummaryAction, RegularFacetAction, SortAction, BundleDisplayProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, LayoutStackProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, ProductResearchCardProps, ProductSummaryProps, QuerySummaryProps, RegularFacetProps, SortProps, } from './generated/schemas.js';
|
|
2
|
+
export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, BreadboxSchema, BreadboxActionsSchema, BreadboxStateSchema, BreadboxFacetSchema, BreadboxRegularFacetSchema, BreadboxRegularFacetValueSchema, BreadboxNumericalRangeFacetSchema, BreadboxNumericalRangeFacetValueSchema, BreadboxDateRangeFacetSchema, BreadboxDateRangeFacetValueSchema, BreadboxHierarchicalFacetSchema, BreadboxDeselectPayloadSchema, BreadboxDeselectRegularValueSchema, BreadboxDeselectNumericalRangeSchema, BreadboxDeselectDateRangeSchema, BreadboxDeselectHierarchicalPathSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, BadgeSchema, BadgePlacementSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, BreadboxPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, BreadboxActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
|
|
3
|
+
export type { ActionItem, FollowupActionItem, SearchActionItem, SearchOptionActionItem, Cart, CartActions, CartState, UpdateCart, UpdateCartPayload, CartUpdateOperation, Purchase, PurchasePayload, PurchaseProduct, Transaction, QuerySuggestions, QuerySuggestionsActions, QuerySuggestionsState, QueryCompletion, FetchSuggestions, FetchSuggestionsPayload, RestoreState, RestoreStatePayload, FacetRestore, NumericRangeRestore, OverrideCorrection, OverrideCorrectionPayload, ShowMore, ShowMorePayload, SelectProducts, SelectProductsPayload, ProductClick, ProductClickPayload, BundleDisplay, BundleDisplayState, BundleSlot, BundleTier, CategoryFacet, CategoryFacetActions, CategoryFacetValue, CategoryFacetSearch, CategoryFacetSearchPayload, CategoryFacetSelectPathPayload, CategoryFacetState, CategoryFacetValues, CommerceSearch, CommerceSearchActions, CommerceSearchState, SubmitQuery, SubmitQueryPayload, ComparisonAttribute, ComparisonProduct, ComparisonTable, ComparisonTableState, ComponentContracts, DateFacet, DateFacetActions, DateFacetApplyCustomRangePayload, DateFacetCustomRange, DateFacetState, DateFacetToggleSelectPayload, DateFacetToggleSingleSelectPayload, DateFacetValue, FacetManager, FacetManagerActions, FacetManagerState, Breadbox, BreadboxActions, BreadboxState, BreadboxFacet, BreadboxRegularFacet, BreadboxRegularFacetValue, BreadboxNumericalRangeFacet, BreadboxNumericalRangeFacetValue, BreadboxDateRangeFacet, BreadboxDateRangeFacetValue, BreadboxHierarchicalFacet, BreadboxDeselectPayload, BreadboxDeselectRegularValue, BreadboxDeselectNumericalRange, BreadboxDeselectDateRange, BreadboxDeselectHierarchicalPath, FacetValueState, SelectableFacetValueState, LayoutStack, LayoutStackState, NextActionsBar, NextActionsState, NumericFacet, NumericFacetActions, NumericFacetCustomRange, NumericFacetDomain, NumericFacetApplyCustomRangePayload, NumericFacetState, NumericFacetToggleSelectPayload, NumericFacetToggleSingleSelectPayload, NumericFacetValue, PageSize, PageSizeActions, PageSizeState, Pagination, PaginationActions, PaginationState, Badge, BadgePlacement, Product, ProductCarousel, ProductCarouselState, ProductList, ProductListActions, ProductListState, ProductResearchCard, ProductResearchCardActions, ProductResearchCardState, ProductSummary, ProductSummaryActions, ProductSummaryState, QuerySummary, QuerySummaryState, RegularFacet, RegularFacetActions, RegularFacetSearch, RegularFacetSearchResult, RegularFacetState, RegularFacetToggleExcludePayload, RegularFacetToggleSelectPayload, RegularFacetToggleSingleExcludePayload, RegularFacetToggleSingleSelectPayload, RegularFacetValue, SelectActionPayload, SelectSearchOptionPayload, SelectPagePayload, SelectSortPayload, SetPageSizePayload, Sort, SortActions, SortCriterion, SortState, DataBinding, FunctionCall, DynamicNumber, DynamicString, DynamicBoolean, DynamicStringList, DynamicValue, DynamicAction, BundleDisplayAction, CategoryFacetAction, CommerceSearchAction, ComparisonTableAction, DateFacetAction, FacetManagerAction, BreadboxAction, LayoutStackAction, NextActionsBarAction, NumericFacetAction, PageSizeAction, PaginationAction, ProductCarouselAction, ProductListAction, ProductResearchCardAction, ProductSummaryAction, QuerySummaryAction, RegularFacetAction, SortAction, BundleDisplayProps, CategoryFacetProps, CommerceSearchProps, ComparisonTableProps, DateFacetProps, FacetManagerProps, BreadboxProps, LayoutStackProps, NextActionsBarProps, NumericFacetProps, PageSizeProps, PaginationProps, ProductCarouselProps, ProductListProps, ProductResearchCardProps, ProductSummaryProps, QuerySummaryProps, RegularFacetProps, SortProps, } from './generated/schemas.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const THERMIDOR_CATALOG_ID = 'https://schema.thermidor.coveo.com/a2-ui/catalog.json';
|
|
2
|
-
export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
|
|
2
|
+
export { ActionItemSchema, FollowupActionItemSchema, SearchActionItemSchema, SearchOptionActionItemSchema, CartSchema, CartActionsSchema, CartStateSchema, UpdateCartSchema, UpdateCartPayloadSchema, CartUpdateOperationSchema, PurchaseSchema, PurchasePayloadSchema, PurchaseProductSchema, TransactionSchema, QuerySuggestionsSchema, QuerySuggestionsActionsSchema, QuerySuggestionsStateSchema, QueryCompletionSchema, FetchSuggestionsSchema, FetchSuggestionsPayloadSchema, RestoreStateSchema, RestoreStatePayloadSchema, FacetRestoreSchema, NumericRangeRestoreSchema, OverrideCorrectionSchema, OverrideCorrectionPayloadSchema, ShowMoreSchema, ShowMorePayloadSchema, SelectProductsSchema, SelectProductsPayloadSchema, ProductClickSchema, ProductClickPayloadSchema, BundleDisplaySchema, BundleDisplayStateSchema, BundleSlotSchema, BundleTierSchema, CategoryFacetSchema, CategoryFacetActionsSchema, CategoryFacetValueSchema, CategoryFacetSearchSchema, CategoryFacetSearchPayloadSchema, CategoryFacetSelectPathPayloadSchema, CategoryFacetStateSchema, CategoryFacetValuesSchema, CommerceSearchSchema, CommerceSearchActionsSchema, CommerceSearchStateSchema, SubmitQuerySchema, SubmitQueryPayloadSchema, ComparisonAttributeSchema, ComparisonProductSchema, ComparisonTableSchema, ComparisonTableStateSchema, ComponentContractsSchema, DateFacetSchema, DateFacetActionsSchema, DateFacetApplyCustomRangePayloadSchema, DateFacetCustomRangeSchema, DateFacetStateSchema, DateFacetToggleSelectPayloadSchema, DateFacetToggleSingleSelectPayloadSchema, DateFacetValueSchema, FacetManagerSchema, FacetManagerActionsSchema, FacetManagerStateSchema, BreadboxSchema, BreadboxActionsSchema, BreadboxStateSchema, BreadboxFacetSchema, BreadboxRegularFacetSchema, BreadboxRegularFacetValueSchema, BreadboxNumericalRangeFacetSchema, BreadboxNumericalRangeFacetValueSchema, BreadboxDateRangeFacetSchema, BreadboxDateRangeFacetValueSchema, BreadboxHierarchicalFacetSchema, BreadboxDeselectPayloadSchema, BreadboxDeselectRegularValueSchema, BreadboxDeselectNumericalRangeSchema, BreadboxDeselectDateRangeSchema, BreadboxDeselectHierarchicalPathSchema, FacetValueStateSchema, SelectableFacetValueStateSchema, LayoutStackSchema, LayoutStackStateSchema, NextActionsBarSchema, NextActionsStateSchema, NumericFacetSchema, NumericFacetActionsSchema, NumericFacetCustomRangeSchema, NumericFacetDomainSchema, NumericFacetApplyCustomRangePayloadSchema, NumericFacetStateSchema, NumericFacetToggleSelectPayloadSchema, NumericFacetToggleSingleSelectPayloadSchema, NumericFacetValueSchema, PageSizeSchema, PageSizeActionsSchema, PageSizeStateSchema, PaginationSchema, PaginationActionsSchema, PaginationStateSchema, ProductCarouselSchema, ProductCarouselStateSchema, ProductListSchema, ProductListActionsSchema, ProductListStateSchema, ProductResearchCardSchema, ProductResearchCardActionsSchema, ProductResearchCardStateSchema, ProductSummarySchema, ProductSummaryActionsSchema, ProductSummaryStateSchema, QuerySummarySchema, QuerySummaryStateSchema, BadgeSchema, BadgePlacementSchema, ProductSchema, RegularFacetSchema, RegularFacetActionsSchema, RegularFacetSearchSchema, RegularFacetSearchResultSchema, RegularFacetStateSchema, RegularFacetToggleExcludePayloadSchema, RegularFacetToggleSelectPayloadSchema, RegularFacetToggleSingleExcludePayloadSchema, RegularFacetToggleSingleSelectPayloadSchema, RegularFacetValueSchema, SelectActionPayloadSchema, SelectSearchOptionPayloadSchema, SelectPagePayloadSchema, SelectSortPayloadSchema, SetPageSizePayloadSchema, SortSchema, SortActionsSchema, SortCriterionSchema, SortStateSchema, BundleDisplayPropsSchema, CategoryFacetPropsSchema, CommerceSearchPropsSchema, ComparisonTablePropsSchema, DateFacetPropsSchema, FacetManagerPropsSchema, BreadboxPropsSchema, LayoutStackPropsSchema, NextActionsBarPropsSchema, NumericFacetPropsSchema, PageSizePropsSchema, PaginationPropsSchema, ProductCarouselPropsSchema, ProductListPropsSchema, ProductResearchCardPropsSchema, ProductSummaryPropsSchema, QuerySummaryPropsSchema, RegularFacetPropsSchema, SortPropsSchema, DataBindingSchema, FunctionCallSchema, DynamicNumberSchema, DynamicStringSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, DynamicActionSchema, BundleDisplayActionSchema, CategoryFacetActionSchema, CommerceSearchActionSchema, ComparisonTableActionSchema, DateFacetActionSchema, FacetManagerActionSchema, BreadboxActionSchema, LayoutStackActionSchema, NextActionsBarActionSchema, NumericFacetActionSchema, PageSizeActionSchema, PaginationActionSchema, ProductCarouselActionSchema, ProductListActionSchema, ProductResearchCardActionSchema, ProductSummaryActionSchema, QuerySummaryActionSchema, RegularFacetActionSchema, SortActionSchema, } from './generated/schemas.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/thermidor-schema",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.26",
|
|
4
4
|
"description": "Zod and TypeScript projections of the Thermidor JSON Schema contract.",
|
|
5
5
|
"homepage": "https://github.com/coveo-platform/thermidor-schema#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -55,6 +55,9 @@
|
|
|
55
55
|
{
|
|
56
56
|
"$ref": "https://schema.thermidor.coveo.com/components/facet-manager.schema.json"
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
"$ref": "https://schema.thermidor.coveo.com/components/breadbox.schema.json"
|
|
60
|
+
},
|
|
58
61
|
{
|
|
59
62
|
"$ref": "https://schema.thermidor.coveo.com/components/commerce-search.schema.json"
|
|
60
63
|
},
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/components/breadbox.schema.json",
|
|
4
|
+
"title": "Breadbox",
|
|
5
|
+
"description": "Renders the active facet values across every facet, and dispatches actions to remove one of them or clear them all. The Breadbox owns its state and actions: it references facets by component id and neither binds into their state nor dispatches their actions.",
|
|
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": "Breadbox"
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"facets": {
|
|
20
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/data-binding.schema.json",
|
|
21
|
+
"description": "The active facets, bound to /state/<id>/facets."
|
|
22
|
+
},
|
|
23
|
+
"state": {
|
|
24
|
+
"$ref": "#/$defs/BreadboxState"
|
|
25
|
+
},
|
|
26
|
+
"actions": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["deselect", "clearAll"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"deselect": {
|
|
31
|
+
"$ref": "#/$defs/BreadboxDeselectAction"
|
|
32
|
+
},
|
|
33
|
+
"clearAll": {
|
|
34
|
+
"$ref": "#/$defs/BreadboxClearAllAction"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"$defs": {
|
|
42
|
+
"BreadboxState": {
|
|
43
|
+
"title": "BreadboxState",
|
|
44
|
+
"description": "The observable state of the Breadbox. Owned exclusively by the backend.",
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": ["facets"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"facets": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"description": "The facets with at least one active value, in the FacetManager order. Empty when no facet value is active.",
|
|
51
|
+
"items": {
|
|
52
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-facet.schema.json"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"BreadboxDeselectAction": {
|
|
59
|
+
"title": "breadboxDeselect",
|
|
60
|
+
"description": "Removes one active value from a facet. Deselecting an excluded regular value removes the exclusion; deselecting a category value clears its whole path.",
|
|
61
|
+
"allOf": [
|
|
62
|
+
{
|
|
63
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"properties": {
|
|
67
|
+
"payload": {
|
|
68
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-payload.schema.json"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"BreadboxClearAllAction": {
|
|
73
|
+
"title": "breadboxClearAll",
|
|
74
|
+
"description": "Clears the active values of every facet.",
|
|
75
|
+
"allOf": [
|
|
76
|
+
{
|
|
77
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/badge-placement.schema.json",
|
|
4
|
+
"title": "BadgePlacement",
|
|
5
|
+
"description": "The badges a product earned for one badge placement configured on the tracking ID. Mirrors the Commerce API BadgePlacementViewModel.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["placementId", "badges"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"placementId": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The unique identifier of the badge placement."
|
|
12
|
+
},
|
|
13
|
+
"badges": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"description": "The badges to render for this placement, in display order.",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/badge.schema.json"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/badge.schema.json",
|
|
4
|
+
"title": "Badge",
|
|
5
|
+
"description": "A merchandising badge displayed on a product (e.g. 'Bestseller!'). Mirrors the Commerce API BadgeViewModel.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["text"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"text": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The localized text displayed on the badge."
|
|
12
|
+
},
|
|
13
|
+
"backgroundColor": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The badge background color in the format #RRGGBB."
|
|
16
|
+
},
|
|
17
|
+
"textColor": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The badge text color in the format #RRGGBB."
|
|
20
|
+
},
|
|
21
|
+
"iconUrl": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "The URL of an icon to render with the badge text."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/breadbox-date-range-facet.schema.json",
|
|
4
|
+
"title": "BreadboxDateRangeFacet",
|
|
5
|
+
"description": "A Breadbox entry for a date facet: its selected ranges.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["facetId", "field", "displayName", "type", "values"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"facetId": {
|
|
10
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
|
|
11
|
+
"description": "The id of the facet component the entry reflects."
|
|
12
|
+
},
|
|
13
|
+
"field": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"description": "The commerce index field the facet operates on."
|
|
17
|
+
},
|
|
18
|
+
"displayName": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Human-readable label for the facet."
|
|
21
|
+
},
|
|
22
|
+
"type": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"const": "dateRange",
|
|
25
|
+
"description": "The BreadboxFacet discriminator."
|
|
26
|
+
},
|
|
27
|
+
"values": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"minItems": 1,
|
|
30
|
+
"description": "The selected ranges of the facet, in the facet order.",
|
|
31
|
+
"items": {
|
|
32
|
+
"$ref": "#/$defs/BreadboxDateRangeFacetValue"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"$defs": {
|
|
38
|
+
"BreadboxDateRangeFacetValue": {
|
|
39
|
+
"title": "BreadboxDateRangeFacetValue",
|
|
40
|
+
"description": "A selected date range.",
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["start", "end"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"start": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "The inclusive start of the date range, as a Commerce API date string (YYYY/MM/DD@HH:mm:ss)."
|
|
47
|
+
},
|
|
48
|
+
"end": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "The end of the date range, as a Commerce API date string (YYYY/MM/DD@HH:mm:ss)."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-date-range.schema.json",
|
|
4
|
+
"title": "BreadboxDeselectDateRange",
|
|
5
|
+
"description": "Deselects a date facet range.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["facetId", "type", "start", "end"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"facetId": {
|
|
10
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
|
|
11
|
+
"description": "The id of the facet component to remove the value from."
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "dateRange",
|
|
16
|
+
"description": "The BreadboxDeselectPayload discriminator."
|
|
17
|
+
},
|
|
18
|
+
"start": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The inclusive start of the date range, as a Commerce API date string (YYYY/MM/DD@HH:mm:ss)."
|
|
21
|
+
},
|
|
22
|
+
"end": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The end of the date range, as a Commerce API date string (YYYY/MM/DD@HH:mm:ss)."
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-hierarchical-path.schema.json",
|
|
4
|
+
"title": "BreadboxDeselectHierarchicalPath",
|
|
5
|
+
"description": "Clears the selected path of a category facet: the whole path is cleared, not only its last value.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["facetId", "type", "path"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"facetId": {
|
|
10
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
|
|
11
|
+
"description": "The id of the facet component to remove the value from."
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "hierarchical",
|
|
16
|
+
"description": "The BreadboxDeselectPayload discriminator."
|
|
17
|
+
},
|
|
18
|
+
"path": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"minItems": 1,
|
|
21
|
+
"description": "The selected path to clear, as shown in the Breadbox entry.",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-numerical-range.schema.json",
|
|
4
|
+
"title": "BreadboxDeselectNumericalRange",
|
|
5
|
+
"description": "Deselects a numeric facet range.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["facetId", "type", "start", "end"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"facetId": {
|
|
10
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
|
|
11
|
+
"description": "The id of the facet component to remove the value from."
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "numericalRange",
|
|
16
|
+
"description": "The BreadboxDeselectPayload discriminator."
|
|
17
|
+
},
|
|
18
|
+
"start": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"description": "The inclusive start of the range to deselect."
|
|
21
|
+
},
|
|
22
|
+
"end": {
|
|
23
|
+
"type": "number",
|
|
24
|
+
"description": "The end of the range to deselect."
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-payload.schema.json",
|
|
4
|
+
"title": "BreadboxDeselectPayload",
|
|
5
|
+
"description": "The facet component id and the value to remove, in the shape of the facet type. Discriminated by type.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-regular-value.schema.json"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-numerical-range.schema.json"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-date-range.schema.json"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-hierarchical-path.schema.json"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/breadbox-deselect-regular-value.schema.json",
|
|
4
|
+
"title": "BreadboxDeselectRegularValue",
|
|
5
|
+
"description": "Removes a regular facet value: a selected value is deselected, and an excluded value has its exclusion removed.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["facetId", "type", "value"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"facetId": {
|
|
10
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/component-id.schema.json",
|
|
11
|
+
"description": "The id of the facet component to remove the value from."
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "regular",
|
|
16
|
+
"description": "The BreadboxDeselectPayload discriminator."
|
|
17
|
+
},
|
|
18
|
+
"value": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "The facet value to remove."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/breadbox-facet.schema.json",
|
|
4
|
+
"title": "BreadboxFacet",
|
|
5
|
+
"description": "An active facet shown in the Breadbox, with its active values in the shape of its facet type. Discriminated by type.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-regular-facet.schema.json"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-numerical-range-facet.schema.json"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-date-range-facet.schema.json"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/breadbox-hierarchical-facet.schema.json"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|