@coveo/thermidor-schema 1.0.0-beta.20 → 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/dist/generated/schemas.d.ts +106 -43
- package/dist/generated/schemas.js +33 -14
- package/dist/generated/zod3/index.d.ts +2 -2
- package/dist/generated/zod3/index.js +1 -1
- package/dist/generated/zod3/schemas.d.ts +686 -204
- package/dist/generated/zod3/schemas.js +33 -14
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/schema/components/next-actions-bar.schema.json +25 -4
- package/schema/definitions/action-item.schema.json +9 -17
- package/schema/definitions/followup-action-item.schema.json +20 -0
- package/schema/definitions/search-action-item.schema.json +20 -0
- package/schema/definitions/search-option-action-item.schema.json +25 -0
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
// documents as ../schemas.ts; see ../../zod3-compat.ts.
|
|
5
5
|
import * as z from '../../zod3-compat.js';
|
|
6
6
|
export const CartUpdateOperationSchema = z.enum(['add', 'remove', 'setQuantity']);
|
|
7
|
-
// The kind of action: "followup" triggers a conversational follow-up, "search" triggers a
|
|
8
|
-
// standalone search.
|
|
9
|
-
//
|
|
10
7
|
// The kind of action selected: "followup" or "search".
|
|
11
|
-
export const
|
|
8
|
+
export const SelectActionPayloadTypeSchema = z.enum(['followup', 'search']);
|
|
9
|
+
export const ActionItemTypeSchema = z.enum(['followup', 'search', 'searchOption']);
|
|
12
10
|
// The selection state of a facet value, shared across all commerce facet components.
|
|
13
11
|
//
|
|
14
12
|
// The selection state of this facet value.
|
|
@@ -43,6 +41,19 @@ export const ProductSchema = z.strictObject({
|
|
|
43
41
|
export const DataBindingSchema = z.strictObject({
|
|
44
42
|
path: z.string(),
|
|
45
43
|
});
|
|
44
|
+
export const FollowupActionItemSchema = z.strictObject({
|
|
45
|
+
text: z.string(),
|
|
46
|
+
type: z.literal('followup'),
|
|
47
|
+
});
|
|
48
|
+
export const SearchActionItemSchema = z.strictObject({
|
|
49
|
+
text: z.string(),
|
|
50
|
+
type: z.literal('search'),
|
|
51
|
+
});
|
|
52
|
+
export const SearchOptionActionItemSchema = z.strictObject({
|
|
53
|
+
optionId: z.string().min(1),
|
|
54
|
+
text: z.string(),
|
|
55
|
+
type: z.literal('searchOption'),
|
|
56
|
+
});
|
|
46
57
|
export const ChildListClassSchema = z.strictObject({
|
|
47
58
|
componentId: z.string().regex(new RegExp('^[a-z][a-z0-9-]*$')),
|
|
48
59
|
path: z.string(),
|
|
@@ -78,15 +89,17 @@ export const QueryCompletionSchema = z.strictObject({
|
|
|
78
89
|
score: z.number().optional(),
|
|
79
90
|
});
|
|
80
91
|
export const SelectActionPayloadSchema = z.strictObject({
|
|
81
|
-
optionId: z.string().min(1).optional(),
|
|
82
92
|
text: z.string(),
|
|
83
93
|
type: z.enum(['followup', 'search']),
|
|
84
94
|
});
|
|
85
|
-
export const
|
|
86
|
-
optionId: z.string().min(1)
|
|
87
|
-
text: z.string(),
|
|
88
|
-
type: z.enum(['followup', 'search']),
|
|
95
|
+
export const SelectSearchOptionPayloadSchema = z.strictObject({
|
|
96
|
+
optionId: z.string().min(1),
|
|
89
97
|
});
|
|
98
|
+
export const ActionItemSchema = z.discriminatedUnion('type', [
|
|
99
|
+
FollowupActionItemSchema,
|
|
100
|
+
SearchActionItemSchema,
|
|
101
|
+
SearchOptionActionItemSchema,
|
|
102
|
+
]);
|
|
90
103
|
export const BundleDisplayActionsSchema = z.strictObject({});
|
|
91
104
|
export const BundleSlotSchema = z.strictObject({
|
|
92
105
|
categoryLabel: z.string(),
|
|
@@ -295,6 +308,9 @@ export const QuerySuggestionsStateSchema = z.strictObject({
|
|
|
295
308
|
export const SelectActionSchema = z.strictObject({
|
|
296
309
|
payload: SelectActionPayloadSchema,
|
|
297
310
|
});
|
|
311
|
+
export const SelectSearchOptionSchema = z.strictObject({
|
|
312
|
+
payload: SelectSearchOptionPayloadSchema,
|
|
313
|
+
});
|
|
298
314
|
export const NextActionsStateSchema = z.strictObject({
|
|
299
315
|
suggestedActions: z.array(ActionItemSchema),
|
|
300
316
|
});
|
|
@@ -452,6 +468,7 @@ export const QuerySuggestionsActionsSchema = z.strictObject({
|
|
|
452
468
|
});
|
|
453
469
|
export const NextActionsBarActionsSchema = z.strictObject({
|
|
454
470
|
selectAction: SelectActionSchema,
|
|
471
|
+
selectSearchOption: SelectSearchOptionSchema,
|
|
455
472
|
});
|
|
456
473
|
export const BundleDisplayStateSchema = z.strictObject({
|
|
457
474
|
tiers: z.array(BundleTierSchema),
|
|
@@ -958,11 +975,13 @@ export const NextActionsBarActionSchema = z.union([
|
|
|
958
975
|
z.object({
|
|
959
976
|
event: z.object({
|
|
960
977
|
name: z.literal('selectAction'),
|
|
961
|
-
context: z.strictObject({
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
978
|
+
context: z.strictObject({ text: z.string(), type: z.enum(['followup', 'search']) }),
|
|
979
|
+
}),
|
|
980
|
+
}),
|
|
981
|
+
z.object({
|
|
982
|
+
event: z.object({
|
|
983
|
+
name: z.literal('selectSearchOption'),
|
|
984
|
+
context: z.strictObject({ optionId: z.string() }),
|
|
966
985
|
}),
|
|
967
986
|
}),
|
|
968
987
|
]);
|
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, 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, 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, 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, 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, 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';
|
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, 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, 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, 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';
|
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.21",
|
|
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": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/components/next-actions-bar.schema.json",
|
|
4
4
|
"title": "NextActionsBar",
|
|
5
|
-
"description": "Renders a set of suggested next actions the user can pick from. The selectAction action is dispatched when the user clicks
|
|
5
|
+
"description": "Renders a set of suggested next actions the user can pick from. The selectAction action is dispatched when the user clicks a \"followup\" or \"search\" action button, and selectSearchOption when they click a \"searchOption\" one.",
|
|
6
6
|
"allOf": [
|
|
7
7
|
{
|
|
8
8
|
"$ref": "https://schema.thermidor.coveo.com/base/component.schema.json"
|
|
@@ -26,10 +26,13 @@
|
|
|
26
26
|
},
|
|
27
27
|
"actions": {
|
|
28
28
|
"type": "object",
|
|
29
|
-
"required": ["selectAction"],
|
|
29
|
+
"required": ["selectAction", "selectSearchOption"],
|
|
30
30
|
"properties": {
|
|
31
31
|
"selectAction": {
|
|
32
32
|
"$ref": "#/$defs/SelectActionAction"
|
|
33
|
+
},
|
|
34
|
+
"selectSearchOption": {
|
|
35
|
+
"$ref": "#/$defs/SelectSearchOptionAction"
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
"additionalProperties": false
|
|
@@ -75,11 +78,29 @@
|
|
|
75
78
|
"type": "string",
|
|
76
79
|
"enum": ["followup", "search"],
|
|
77
80
|
"description": "The kind of action selected: \"followup\" or \"search\"."
|
|
78
|
-
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"SelectSearchOptionAction": {
|
|
88
|
+
"title": "selectSearchOption",
|
|
89
|
+
"description": "Signals that the user selected a \"searchOption\" action. The backend runs the search it saved under optionId.",
|
|
90
|
+
"allOf": [
|
|
91
|
+
{
|
|
92
|
+
"$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"properties": {
|
|
96
|
+
"payload": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": ["optionId"],
|
|
99
|
+
"properties": {
|
|
79
100
|
"optionId": {
|
|
80
101
|
"type": "string",
|
|
81
102
|
"minLength": 1,
|
|
82
|
-
"description": "The optionId of the selected action, echoed unchanged.
|
|
103
|
+
"description": "The optionId of the selected action, echoed unchanged."
|
|
83
104
|
}
|
|
84
105
|
},
|
|
85
106
|
"additionalProperties": false
|
|
@@ -2,24 +2,16 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.thermidor.coveo.com/definitions/action-item.schema.json",
|
|
4
4
|
"title": "ActionItem",
|
|
5
|
-
"description": "A suggested action the assistant offers the user
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"text": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "The display text of the action shown to the user."
|
|
5
|
+
"description": "A suggested action the assistant offers the user: a follow-up question, a search query, or a search the backend saved. Discriminated by type.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/followup-action-item.schema.json"
|
|
12
9
|
},
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"enum": ["followup", "search"],
|
|
16
|
-
"description": "The kind of action: \"followup\" triggers a conversational follow-up, \"search\" triggers a standalone search."
|
|
10
|
+
{
|
|
11
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/search-action-item.schema.json"
|
|
17
12
|
},
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"minLength": 1,
|
|
21
|
-
"description": "Opaque identifier of the search the backend saved behind a \"search\" action. Set only by the backend, from the search the agent sent; the frontend sends it back unchanged in the selectAction payload so the backend can run that search."
|
|
13
|
+
{
|
|
14
|
+
"$ref": "https://schema.thermidor.coveo.com/definitions/search-option-action-item.schema.json"
|
|
22
15
|
}
|
|
23
|
-
|
|
24
|
-
"additionalProperties": false
|
|
16
|
+
]
|
|
25
17
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/followup-action-item.schema.json",
|
|
4
|
+
"title": "FollowupActionItem",
|
|
5
|
+
"description": "An ActionItem that triggers a conversational follow-up.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["text", "type"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"text": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The display text of the action shown to the user."
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "followup",
|
|
16
|
+
"description": "The ActionItem discriminator."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/search-action-item.schema.json",
|
|
4
|
+
"title": "SearchActionItem",
|
|
5
|
+
"description": "An ActionItem that triggers a standalone search.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["text", "type"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"text": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The display text of the action shown to the user."
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "search",
|
|
16
|
+
"description": "The ActionItem discriminator."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.thermidor.coveo.com/definitions/search-option-action-item.schema.json",
|
|
4
|
+
"title": "SearchOptionActionItem",
|
|
5
|
+
"description": "An ActionItem that opens a search the backend saved behind it. Selecting it dispatches selectSearchOption with its optionId.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["text", "type", "optionId"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"text": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The display text of the action shown to the user."
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "searchOption",
|
|
16
|
+
"description": "The ActionItem discriminator."
|
|
17
|
+
},
|
|
18
|
+
"optionId": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "Opaque identifier of the search the backend saved behind the action. Set only by the backend; the frontend sends it back unchanged in the selectSearchOption payload so the backend can run that search."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|