@coveo/thermidor-schema 1.0.0-beta.19 → 1.0.0-beta.20

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.
@@ -21,21 +21,21 @@ export const ProductSchema = z.strictObject({
21
21
  get children() {
22
22
  return z.array(ProductSchema).optional();
23
23
  },
24
- clickUri: z.url().optional(),
24
+ clickUri: z.string().optional(),
25
25
  ec_brand: z.string().optional(),
26
26
  ec_category: z.array(z.string()).optional(),
27
27
  ec_color: z.string().optional(),
28
28
  ec_description: z.string().optional(),
29
- ec_images: z.array(z.url()).optional(),
29
+ ec_images: z.array(z.string()).optional(),
30
30
  ec_in_stock: z.boolean().optional(),
31
31
  ec_item_group_id: z.string().optional(),
32
32
  ec_item_group_name: z.string().optional(),
33
33
  ec_name: z.string(),
34
34
  ec_price: z.number().optional(),
35
35
  ec_promo_price: z.number().optional(),
36
- ec_rating: z.union([z.number().min(0).max(5), z.null()]).optional(),
36
+ ec_rating: z.union([z.number().min(0), z.null()]).optional(),
37
37
  ec_shortdesc: z.string().optional(),
38
- ec_thumbnails: z.array(z.url()).optional(),
38
+ ec_thumbnails: z.array(z.string()).optional(),
39
39
  permanentid: z.string(),
40
40
  });
41
41
  export const DataBindingSchema = z.strictObject({
@@ -96,11 +96,11 @@ export const ComparisonAttributeSchema = z.strictObject({
96
96
  label: z.string(),
97
97
  });
98
98
  export const ComparisonProductSchema = z.strictObject({
99
- imageUrl: z.url().optional(),
99
+ imageUrl: z.string().optional(),
100
100
  name: z.string(),
101
101
  price: z.number().optional(),
102
102
  productId: z.string(),
103
- rating: z.number().min(0).max(5).optional(),
103
+ rating: z.number().min(0).optional(),
104
104
  values: z.record(z.string(), z.string()).optional(),
105
105
  });
106
106
  export const ProductClickPayloadSchema = z.strictObject({
@@ -151,28 +151,28 @@ export const ActionSchema = z.strictObject({
151
151
  payload: z.unknown(),
152
152
  });
153
153
  export const SearchPayloadSchema = z.strictObject({
154
- query: z.string().min(0).max(1024),
154
+ query: z.string(),
155
155
  });
156
156
  export const RegularFacetToggleExcludePayloadSchema = z.strictObject({
157
- value: z.string().min(1).max(1024),
157
+ value: z.string().min(1),
158
158
  });
159
159
  export const RegularFacetToggleSelectPayloadSchema = z.strictObject({
160
- value: z.string().min(1).max(1024),
160
+ value: z.string().min(1),
161
161
  });
162
162
  export const RegularFacetToggleSingleExcludePayloadSchema = z.strictObject({
163
- value: z.string().min(1).max(1024),
163
+ value: z.string().min(1),
164
164
  });
165
165
  export const RegularFacetToggleSingleSelectPayloadSchema = z.strictObject({
166
- value: z.string().min(1).max(1024),
166
+ value: z.string().min(1),
167
167
  });
168
168
  export const RegularFacetSearchResultSchema = z.strictObject({
169
- numberOfResults: z.number().int().min(0).max(999999999),
170
- value: z.string().min(1).max(1024),
169
+ numberOfResults: z.number().int().min(0),
170
+ value: z.string().min(1),
171
171
  });
172
172
  export const RegularFacetValueSchema = z.strictObject({
173
- numberOfResults: z.number().int().min(0).max(999999999),
173
+ numberOfResults: z.number().int().min(0),
174
174
  state: z.enum(['idle', 'selected', 'excluded']),
175
- value: z.string().min(1).max(1024),
175
+ value: z.string().min(1),
176
176
  });
177
177
  export const NumericFacetApplyCustomRangePayloadSchema = z.strictObject({
178
178
  end: z.number(),
@@ -225,7 +225,7 @@ export const DateFacetValueSchema = z.strictObject({
225
225
  state: z.enum(['idle', 'selected']),
226
226
  });
227
227
  export const CategoryFacetSearchPayloadSchema = z.strictObject({
228
- query: z.string().max(256),
228
+ query: z.string(),
229
229
  });
230
230
  export const CategoryFacetSelectPathPayloadSchema = z.strictObject({
231
231
  path: z.array(z.string()),
@@ -272,7 +272,7 @@ export const PageSizeStateSchema = z.strictObject({
272
272
  export const ProductCarouselSchema = z.looseObject({
273
273
  actions: ProductCarouselActionsSchema.optional(),
274
274
  component: z.literal('ProductCarousel'),
275
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
275
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
276
276
  state: ProductCarouselStateSchema.optional(),
277
277
  });
278
278
  export const PurchasePayloadSchema = z.strictObject({
@@ -317,13 +317,13 @@ export const SelectProductsSchema = z.strictObject({
317
317
  export const ProductSummarySchema = z.looseObject({
318
318
  actions: ProductSummaryActionsSchema.optional(),
319
319
  component: z.literal('ProductSummary'),
320
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
320
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
321
321
  state: ProductSummaryStateSchema.optional(),
322
322
  });
323
323
  export const ProductResearchCardSchema = z.looseObject({
324
324
  actions: ProductResearchCardActionsSchema.optional(),
325
325
  component: z.literal('ProductResearchCard'),
326
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
326
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
327
327
  state: ProductResearchCardStateSchema.optional(),
328
328
  });
329
329
  export const SelectPageSchema = z.strictObject({
@@ -359,8 +359,8 @@ export const RegularFacetToggleSingleSelectSchema = z.strictObject({
359
359
  });
360
360
  export const RegularFacetSearchSchema = z.strictObject({
361
361
  canShowMoreResults: z.boolean(),
362
- query: z.string().min(0).max(1024),
363
- results: z.array(RegularFacetSearchResultSchema).max(1000),
362
+ query: z.string(),
363
+ results: z.array(RegularFacetSearchResultSchema),
364
364
  });
365
365
  export const NumericFacetApplyCustomRangeSchema = z.strictObject({
366
366
  payload: NumericFacetApplyCustomRangePayloadSchema,
@@ -379,7 +379,7 @@ export const NumericFacetStateSchema = z.strictObject({
379
379
  domain: NumericFacetDomainSchema.optional(),
380
380
  field: z.string(),
381
381
  hasActiveValues: z.boolean(),
382
- values: z.array(NumericFacetValueSchema).max(500),
382
+ values: z.array(NumericFacetValueSchema),
383
383
  });
384
384
  export const DateFacetApplyCustomRangeSchema = z.strictObject({
385
385
  payload: DateFacetApplyCustomRangePayloadSchema,
@@ -407,13 +407,13 @@ export const CategoryFacetSelectPathSchema = z.strictObject({
407
407
  });
408
408
  export const FacetSearchClassSchema = z.strictObject({
409
409
  canShowMoreResults: z.boolean(),
410
- query: z.string().max(256),
410
+ query: z.string(),
411
411
  results: z.array(CategoryFacetValueSchema),
412
412
  });
413
413
  export const FacetManagerSchema = z.looseObject({
414
414
  actions: FacetManagerActionsSchema.optional(),
415
415
  component: z.literal('FacetManager'),
416
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
416
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
417
417
  state: FacetManagerStateSchema.optional(),
418
418
  });
419
419
  export const OverrideCorrectionSchema = z.strictObject({
@@ -430,13 +430,13 @@ export const SubmitQuerySchema = z.strictObject({
430
430
  export const LayoutStackSchema = z.looseObject({
431
431
  actions: LayoutStackActionsSchema.optional(),
432
432
  component: z.literal('LayoutStack'),
433
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
433
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
434
434
  state: LayoutStackStateSchema.optional(),
435
435
  });
436
436
  export const QuerySummarySchema = z.looseObject({
437
437
  actions: QuerySummaryActionsSchema.optional(),
438
438
  component: z.literal('QuerySummary'),
439
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
439
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
440
440
  state: QuerySummaryStateSchema.optional(),
441
441
  });
442
442
  export const FluffySetPageSizeSchema = z.strictObject({
@@ -457,7 +457,7 @@ export const BundleDisplayStateSchema = z.strictObject({
457
457
  export const ComparisonTableSchema = z.looseObject({
458
458
  actions: ComparisonTableActionsSchema.optional(),
459
459
  component: z.literal('ComparisonTable'),
460
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
460
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
461
461
  state: ComparisonTableStateSchema.optional(),
462
462
  });
463
463
  export const ProductListActionsSchema = z.strictObject({
@@ -487,11 +487,11 @@ export const RegularFacetActionsSchema = z.strictObject({
487
487
  export const RegularFacetStateSchema = z.strictObject({
488
488
  canShowLessValues: z.boolean(),
489
489
  canShowMoreValues: z.boolean(),
490
- displayName: z.string().min(1).max(255),
490
+ displayName: z.string(),
491
491
  facetSearch: RegularFacetSearchSchema,
492
- field: z.string().min(1).max(255),
492
+ field: z.string().min(1),
493
493
  hasActiveValues: z.boolean(),
494
- values: z.array(RegularFacetValueSchema).max(1000),
494
+ values: z.array(RegularFacetValueSchema),
495
495
  });
496
496
  export const NumericFacetActionsSchema = z.strictObject({
497
497
  applyCustomRange: NumericFacetApplyCustomRangeSchema,
@@ -544,61 +544,61 @@ export const CartActionsSchema = z.strictObject({
544
544
  export const QuerySuggestionsSchema = z.looseObject({
545
545
  actions: QuerySuggestionsActionsSchema.optional(),
546
546
  component: z.literal('QuerySuggestions'),
547
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
547
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
548
548
  state: QuerySuggestionsStateSchema.optional(),
549
549
  });
550
550
  export const NextActionsBarSchema = z.looseObject({
551
551
  actions: NextActionsBarActionsSchema.optional(),
552
552
  component: z.literal('NextActionsBar'),
553
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
553
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
554
554
  state: NextActionsStateSchema.optional(),
555
555
  });
556
556
  export const BundleDisplaySchema = z.looseObject({
557
557
  actions: BundleDisplayActionsSchema.optional(),
558
558
  component: z.literal('BundleDisplay'),
559
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
559
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
560
560
  state: BundleDisplayStateSchema.optional(),
561
561
  });
562
562
  export const ProductListSchema = z.looseObject({
563
563
  actions: ProductListActionsSchema.optional(),
564
564
  component: z.literal('ProductList'),
565
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
565
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
566
566
  state: ProductListStateSchema.optional(),
567
567
  });
568
568
  export const PaginationSchema = z.looseObject({
569
569
  actions: PaginationActionsSchema.optional(),
570
570
  component: z.literal('Pagination'),
571
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
571
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
572
572
  state: PaginationStateSchema.optional(),
573
573
  });
574
574
  export const SortSchema = z.looseObject({
575
575
  actions: SortActionsSchema.optional(),
576
576
  component: z.literal('Sort'),
577
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
577
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
578
578
  state: SortStateSchema.optional(),
579
579
  });
580
580
  export const RegularFacetSchema = z.looseObject({
581
581
  actions: RegularFacetActionsSchema.optional(),
582
582
  component: z.literal('RegularFacet'),
583
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
583
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
584
584
  state: RegularFacetStateSchema.optional(),
585
585
  });
586
586
  export const NumericFacetSchema = z.looseObject({
587
587
  actions: NumericFacetActionsSchema.optional(),
588
588
  component: z.literal('NumericFacet'),
589
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
589
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
590
590
  state: NumericFacetStateSchema.optional(),
591
591
  });
592
592
  export const DateFacetSchema = z.looseObject({
593
593
  actions: DateFacetActionsSchema.optional(),
594
594
  component: z.literal('DateFacet'),
595
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
595
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
596
596
  state: DateFacetStateSchema.optional(),
597
597
  });
598
598
  export const CategoryFacetSchema = z.looseObject({
599
599
  actions: CategoryFacetActionsSchema.optional(),
600
600
  component: z.literal('CategoryFacet'),
601
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
601
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
602
602
  state: CategoryFacetStateSchema.optional(),
603
603
  });
604
604
  export const RestoreStateSchema = z.strictObject({
@@ -607,13 +607,13 @@ export const RestoreStateSchema = z.strictObject({
607
607
  export const PageSizeSchema = z.looseObject({
608
608
  actions: PageSizeActionsSchema.optional(),
609
609
  component: z.literal('PageSize'),
610
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
610
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
611
611
  state: PageSizeStateSchema.optional(),
612
612
  });
613
613
  export const CartSchema = z.looseObject({
614
614
  actions: CartActionsSchema.optional(),
615
615
  component: z.literal('Cart'),
616
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
616
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
617
617
  state: CartStateSchema.optional(),
618
618
  });
619
619
  export const CommerceSearchActionsSchema = z.strictObject({
@@ -624,7 +624,7 @@ export const CommerceSearchActionsSchema = z.strictObject({
624
624
  export const CommerceSearchSchema = z.looseObject({
625
625
  actions: CommerceSearchActionsSchema.optional(),
626
626
  component: z.literal('CommerceSearch'),
627
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
627
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
628
628
  state: CommerceSearchStateSchema.optional(),
629
629
  });
630
630
  export const ComponentContractsSchema = z.discriminatedUnion('component', [
@@ -895,10 +895,7 @@ export const CategoryFacetActionSchema = z.union([
895
895
  }),
896
896
  z.object({ event: z.object({ name: z.literal('clearSelectedPath'), context: z.unknown() }) }),
897
897
  z.object({
898
- event: z.object({
899
- name: z.literal('search'),
900
- context: z.strictObject({ query: z.string().max(256) }),
901
- }),
898
+ event: z.object({ name: z.literal('search'), context: z.strictObject({ query: z.string() }) }),
902
899
  }),
903
900
  z.object({ event: z.object({ name: z.literal('showMoreSearchResults'), context: z.unknown() }) }),
904
901
  z.object({ event: z.object({ name: z.literal('clearSearch'), context: z.unknown() }) }),
@@ -1048,33 +1045,30 @@ export const RegularFacetActionSchema = z.union([
1048
1045
  z.object({
1049
1046
  event: z.object({
1050
1047
  name: z.literal('toggleSelect'),
1051
- context: z.strictObject({ value: z.string().max(1024) }),
1048
+ context: z.strictObject({ value: z.string() }),
1052
1049
  }),
1053
1050
  }),
1054
1051
  z.object({
1055
1052
  event: z.object({
1056
1053
  name: z.literal('toggleExclude'),
1057
- context: z.strictObject({ value: z.string().max(1024) }),
1054
+ context: z.strictObject({ value: z.string() }),
1058
1055
  }),
1059
1056
  }),
1060
1057
  z.object({
1061
1058
  event: z.object({
1062
1059
  name: z.literal('toggleSingleSelect'),
1063
- context: z.strictObject({ value: z.string().max(1024) }),
1060
+ context: z.strictObject({ value: z.string() }),
1064
1061
  }),
1065
1062
  }),
1066
1063
  z.object({
1067
1064
  event: z.object({
1068
1065
  name: z.literal('toggleSingleExclude'),
1069
- context: z.strictObject({ value: z.string().max(1024) }),
1066
+ context: z.strictObject({ value: z.string() }),
1070
1067
  }),
1071
1068
  }),
1072
1069
  z.object({ event: z.object({ name: z.literal('clearAllActiveValues'), context: z.unknown() }) }),
1073
1070
  z.object({
1074
- event: z.object({
1075
- name: z.literal('search'),
1076
- context: z.strictObject({ query: z.string().max(1024) }),
1077
- }),
1071
+ event: z.object({ name: z.literal('search'), context: z.strictObject({ query: z.string() }) }),
1078
1072
  }),
1079
1073
  z.object({ event: z.object({ name: z.literal('showMoreSearchResults'), context: z.unknown() }) }),
1080
1074
  z.object({ event: z.object({ name: z.literal('clearSearch'), context: z.unknown() }) }),
@@ -23,21 +23,21 @@ export const ProductSchema = z.strictObject({
23
23
  get children() {
24
24
  return z.array(ProductSchema).optional();
25
25
  },
26
- clickUri: z.url().optional(),
26
+ clickUri: z.string().optional(),
27
27
  ec_brand: z.string().optional(),
28
28
  ec_category: z.array(z.string()).optional(),
29
29
  ec_color: z.string().optional(),
30
30
  ec_description: z.string().optional(),
31
- ec_images: z.array(z.url()).optional(),
31
+ ec_images: z.array(z.string()).optional(),
32
32
  ec_in_stock: z.boolean().optional(),
33
33
  ec_item_group_id: z.string().optional(),
34
34
  ec_item_group_name: z.string().optional(),
35
35
  ec_name: z.string(),
36
36
  ec_price: z.number().optional(),
37
37
  ec_promo_price: z.number().optional(),
38
- ec_rating: z.union([z.number().min(0).max(5), z.null()]).optional(),
38
+ ec_rating: z.union([z.number().min(0), z.null()]).optional(),
39
39
  ec_shortdesc: z.string().optional(),
40
- ec_thumbnails: z.array(z.url()).optional(),
40
+ ec_thumbnails: z.array(z.string()).optional(),
41
41
  permanentid: z.string(),
42
42
  });
43
43
  export const DataBindingSchema = z.strictObject({
@@ -98,11 +98,11 @@ export const ComparisonAttributeSchema = z.strictObject({
98
98
  label: z.string(),
99
99
  });
100
100
  export const ComparisonProductSchema = z.strictObject({
101
- imageUrl: z.url().optional(),
101
+ imageUrl: z.string().optional(),
102
102
  name: z.string(),
103
103
  price: z.number().optional(),
104
104
  productId: z.string(),
105
- rating: z.number().min(0).max(5).optional(),
105
+ rating: z.number().min(0).optional(),
106
106
  values: z.record(z.string(), z.string()).optional(),
107
107
  });
108
108
  export const ProductClickPayloadSchema = z.strictObject({
@@ -153,28 +153,28 @@ export const ActionSchema = z.strictObject({
153
153
  payload: z.unknown(),
154
154
  });
155
155
  export const SearchPayloadSchema = z.strictObject({
156
- query: z.string().min(0).max(1024),
156
+ query: z.string(),
157
157
  });
158
158
  export const RegularFacetToggleExcludePayloadSchema = z.strictObject({
159
- value: z.string().min(1).max(1024),
159
+ value: z.string().min(1),
160
160
  });
161
161
  export const RegularFacetToggleSelectPayloadSchema = z.strictObject({
162
- value: z.string().min(1).max(1024),
162
+ value: z.string().min(1),
163
163
  });
164
164
  export const RegularFacetToggleSingleExcludePayloadSchema = z.strictObject({
165
- value: z.string().min(1).max(1024),
165
+ value: z.string().min(1),
166
166
  });
167
167
  export const RegularFacetToggleSingleSelectPayloadSchema = z.strictObject({
168
- value: z.string().min(1).max(1024),
168
+ value: z.string().min(1),
169
169
  });
170
170
  export const RegularFacetSearchResultSchema = z.strictObject({
171
- numberOfResults: z.number().int().min(0).max(999999999),
172
- value: z.string().min(1).max(1024),
171
+ numberOfResults: z.number().int().min(0),
172
+ value: z.string().min(1),
173
173
  });
174
174
  export const RegularFacetValueSchema = z.strictObject({
175
- numberOfResults: z.number().int().min(0).max(999999999),
175
+ numberOfResults: z.number().int().min(0),
176
176
  state: z.enum(['idle', 'selected', 'excluded']),
177
- value: z.string().min(1).max(1024),
177
+ value: z.string().min(1),
178
178
  });
179
179
  export const NumericFacetApplyCustomRangePayloadSchema = z.strictObject({
180
180
  end: z.number(),
@@ -227,7 +227,7 @@ export const DateFacetValueSchema = z.strictObject({
227
227
  state: z.enum(['idle', 'selected']),
228
228
  });
229
229
  export const CategoryFacetSearchPayloadSchema = z.strictObject({
230
- query: z.string().max(256),
230
+ query: z.string(),
231
231
  });
232
232
  export const CategoryFacetSelectPathPayloadSchema = z.strictObject({
233
233
  path: z.array(z.string()),
@@ -274,7 +274,7 @@ export const PageSizeStateSchema = z.strictObject({
274
274
  export const ProductCarouselSchema = z.looseObject({
275
275
  actions: ProductCarouselActionsSchema.optional(),
276
276
  component: z.literal('ProductCarousel'),
277
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
277
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
278
278
  state: ProductCarouselStateSchema.optional(),
279
279
  });
280
280
  export const PurchasePayloadSchema = z.strictObject({
@@ -319,13 +319,13 @@ export const SelectProductsSchema = z.strictObject({
319
319
  export const ProductSummarySchema = z.looseObject({
320
320
  actions: ProductSummaryActionsSchema.optional(),
321
321
  component: z.literal('ProductSummary'),
322
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
322
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
323
323
  state: ProductSummaryStateSchema.optional(),
324
324
  });
325
325
  export const ProductResearchCardSchema = z.looseObject({
326
326
  actions: ProductResearchCardActionsSchema.optional(),
327
327
  component: z.literal('ProductResearchCard'),
328
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
328
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
329
329
  state: ProductResearchCardStateSchema.optional(),
330
330
  });
331
331
  export const SelectPageSchema = z.strictObject({
@@ -361,8 +361,8 @@ export const RegularFacetToggleSingleSelectSchema = z.strictObject({
361
361
  });
362
362
  export const RegularFacetSearchSchema = z.strictObject({
363
363
  canShowMoreResults: z.boolean(),
364
- query: z.string().min(0).max(1024),
365
- results: z.array(RegularFacetSearchResultSchema).max(1000),
364
+ query: z.string(),
365
+ results: z.array(RegularFacetSearchResultSchema),
366
366
  });
367
367
  export const NumericFacetApplyCustomRangeSchema = z.strictObject({
368
368
  payload: NumericFacetApplyCustomRangePayloadSchema,
@@ -381,7 +381,7 @@ export const NumericFacetStateSchema = z.strictObject({
381
381
  domain: NumericFacetDomainSchema.optional(),
382
382
  field: z.string(),
383
383
  hasActiveValues: z.boolean(),
384
- values: z.array(NumericFacetValueSchema).max(500),
384
+ values: z.array(NumericFacetValueSchema),
385
385
  });
386
386
  export const DateFacetApplyCustomRangeSchema = z.strictObject({
387
387
  payload: DateFacetApplyCustomRangePayloadSchema,
@@ -409,13 +409,13 @@ export const CategoryFacetSelectPathSchema = z.strictObject({
409
409
  });
410
410
  export const FacetSearchClassSchema = z.strictObject({
411
411
  canShowMoreResults: z.boolean(),
412
- query: z.string().max(256),
412
+ query: z.string(),
413
413
  results: z.array(CategoryFacetValueSchema),
414
414
  });
415
415
  export const FacetManagerSchema = z.looseObject({
416
416
  actions: FacetManagerActionsSchema.optional(),
417
417
  component: z.literal('FacetManager'),
418
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
418
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
419
419
  state: FacetManagerStateSchema.optional(),
420
420
  });
421
421
  export const OverrideCorrectionSchema = z.strictObject({
@@ -432,13 +432,13 @@ export const SubmitQuerySchema = z.strictObject({
432
432
  export const LayoutStackSchema = z.looseObject({
433
433
  actions: LayoutStackActionsSchema.optional(),
434
434
  component: z.literal('LayoutStack'),
435
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
435
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
436
436
  state: LayoutStackStateSchema.optional(),
437
437
  });
438
438
  export const QuerySummarySchema = z.looseObject({
439
439
  actions: QuerySummaryActionsSchema.optional(),
440
440
  component: z.literal('QuerySummary'),
441
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
441
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
442
442
  state: QuerySummaryStateSchema.optional(),
443
443
  });
444
444
  export const FluffySetPageSizeSchema = z.strictObject({
@@ -459,7 +459,7 @@ export const BundleDisplayStateSchema = z.strictObject({
459
459
  export const ComparisonTableSchema = z.looseObject({
460
460
  actions: ComparisonTableActionsSchema.optional(),
461
461
  component: z.literal('ComparisonTable'),
462
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
462
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
463
463
  state: ComparisonTableStateSchema.optional(),
464
464
  });
465
465
  export const ProductListActionsSchema = z.strictObject({
@@ -489,11 +489,11 @@ export const RegularFacetActionsSchema = z.strictObject({
489
489
  export const RegularFacetStateSchema = z.strictObject({
490
490
  canShowLessValues: z.boolean(),
491
491
  canShowMoreValues: z.boolean(),
492
- displayName: z.string().min(1).max(255),
492
+ displayName: z.string(),
493
493
  facetSearch: RegularFacetSearchSchema,
494
- field: z.string().min(1).max(255),
494
+ field: z.string().min(1),
495
495
  hasActiveValues: z.boolean(),
496
- values: z.array(RegularFacetValueSchema).max(1000),
496
+ values: z.array(RegularFacetValueSchema),
497
497
  });
498
498
  export const NumericFacetActionsSchema = z.strictObject({
499
499
  applyCustomRange: NumericFacetApplyCustomRangeSchema,
@@ -546,61 +546,61 @@ export const CartActionsSchema = z.strictObject({
546
546
  export const QuerySuggestionsSchema = z.looseObject({
547
547
  actions: QuerySuggestionsActionsSchema.optional(),
548
548
  component: z.literal('QuerySuggestions'),
549
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
549
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
550
550
  state: QuerySuggestionsStateSchema.optional(),
551
551
  });
552
552
  export const NextActionsBarSchema = z.looseObject({
553
553
  actions: NextActionsBarActionsSchema.optional(),
554
554
  component: z.literal('NextActionsBar'),
555
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
555
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
556
556
  state: NextActionsStateSchema.optional(),
557
557
  });
558
558
  export const BundleDisplaySchema = z.looseObject({
559
559
  actions: BundleDisplayActionsSchema.optional(),
560
560
  component: z.literal('BundleDisplay'),
561
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
561
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
562
562
  state: BundleDisplayStateSchema.optional(),
563
563
  });
564
564
  export const ProductListSchema = z.looseObject({
565
565
  actions: ProductListActionsSchema.optional(),
566
566
  component: z.literal('ProductList'),
567
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
567
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
568
568
  state: ProductListStateSchema.optional(),
569
569
  });
570
570
  export const PaginationSchema = z.looseObject({
571
571
  actions: PaginationActionsSchema.optional(),
572
572
  component: z.literal('Pagination'),
573
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
573
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
574
574
  state: PaginationStateSchema.optional(),
575
575
  });
576
576
  export const SortSchema = z.looseObject({
577
577
  actions: SortActionsSchema.optional(),
578
578
  component: z.literal('Sort'),
579
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
579
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
580
580
  state: SortStateSchema.optional(),
581
581
  });
582
582
  export const RegularFacetSchema = z.looseObject({
583
583
  actions: RegularFacetActionsSchema.optional(),
584
584
  component: z.literal('RegularFacet'),
585
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
585
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
586
586
  state: RegularFacetStateSchema.optional(),
587
587
  });
588
588
  export const NumericFacetSchema = z.looseObject({
589
589
  actions: NumericFacetActionsSchema.optional(),
590
590
  component: z.literal('NumericFacet'),
591
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
591
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
592
592
  state: NumericFacetStateSchema.optional(),
593
593
  });
594
594
  export const DateFacetSchema = z.looseObject({
595
595
  actions: DateFacetActionsSchema.optional(),
596
596
  component: z.literal('DateFacet'),
597
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
597
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
598
598
  state: DateFacetStateSchema.optional(),
599
599
  });
600
600
  export const CategoryFacetSchema = z.looseObject({
601
601
  actions: CategoryFacetActionsSchema.optional(),
602
602
  component: z.literal('CategoryFacet'),
603
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
603
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
604
604
  state: CategoryFacetStateSchema.optional(),
605
605
  });
606
606
  export const RestoreStateSchema = z.strictObject({
@@ -609,13 +609,13 @@ export const RestoreStateSchema = z.strictObject({
609
609
  export const PageSizeSchema = z.looseObject({
610
610
  actions: PageSizeActionsSchema.optional(),
611
611
  component: z.literal('PageSize'),
612
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
612
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
613
613
  state: PageSizeStateSchema.optional(),
614
614
  });
615
615
  export const CartSchema = z.looseObject({
616
616
  actions: CartActionsSchema.optional(),
617
617
  component: z.literal('Cart'),
618
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
618
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
619
619
  state: CartStateSchema.optional(),
620
620
  });
621
621
  export const CommerceSearchActionsSchema = z.strictObject({
@@ -626,7 +626,7 @@ export const CommerceSearchActionsSchema = z.strictObject({
626
626
  export const CommerceSearchSchema = z.looseObject({
627
627
  actions: CommerceSearchActionsSchema.optional(),
628
628
  component: z.literal('CommerceSearch'),
629
- id: z.string().min(1).max(256).regex(new RegExp('^[a-z][a-z0-9-]*$')),
629
+ id: z.string().min(1).regex(new RegExp('^[a-z][a-z0-9-]*$')),
630
630
  state: CommerceSearchStateSchema.optional(),
631
631
  });
632
632
  export const ComponentContractsSchema = z.discriminatedUnion('component', [
@@ -897,10 +897,7 @@ export const CategoryFacetActionSchema = z.union([
897
897
  }),
898
898
  z.object({ event: z.object({ name: z.literal('clearSelectedPath'), context: z.unknown() }) }),
899
899
  z.object({
900
- event: z.object({
901
- name: z.literal('search'),
902
- context: z.strictObject({ query: z.string().max(256) }),
903
- }),
900
+ event: z.object({ name: z.literal('search'), context: z.strictObject({ query: z.string() }) }),
904
901
  }),
905
902
  z.object({ event: z.object({ name: z.literal('showMoreSearchResults'), context: z.unknown() }) }),
906
903
  z.object({ event: z.object({ name: z.literal('clearSearch'), context: z.unknown() }) }),
@@ -1050,33 +1047,30 @@ export const RegularFacetActionSchema = z.union([
1050
1047
  z.object({
1051
1048
  event: z.object({
1052
1049
  name: z.literal('toggleSelect'),
1053
- context: z.strictObject({ value: z.string().max(1024) }),
1050
+ context: z.strictObject({ value: z.string() }),
1054
1051
  }),
1055
1052
  }),
1056
1053
  z.object({
1057
1054
  event: z.object({
1058
1055
  name: z.literal('toggleExclude'),
1059
- context: z.strictObject({ value: z.string().max(1024) }),
1056
+ context: z.strictObject({ value: z.string() }),
1060
1057
  }),
1061
1058
  }),
1062
1059
  z.object({
1063
1060
  event: z.object({
1064
1061
  name: z.literal('toggleSingleSelect'),
1065
- context: z.strictObject({ value: z.string().max(1024) }),
1062
+ context: z.strictObject({ value: z.string() }),
1066
1063
  }),
1067
1064
  }),
1068
1065
  z.object({
1069
1066
  event: z.object({
1070
1067
  name: z.literal('toggleSingleExclude'),
1071
- context: z.strictObject({ value: z.string().max(1024) }),
1068
+ context: z.strictObject({ value: z.string() }),
1072
1069
  }),
1073
1070
  }),
1074
1071
  z.object({ event: z.object({ name: z.literal('clearAllActiveValues'), context: z.unknown() }) }),
1075
1072
  z.object({
1076
- event: z.object({
1077
- name: z.literal('search'),
1078
- context: z.strictObject({ query: z.string().max(1024) }),
1079
- }),
1073
+ event: z.object({ name: z.literal('search'), context: z.strictObject({ query: z.string() }) }),
1080
1074
  }),
1081
1075
  z.object({ event: z.object({ name: z.literal('showMoreSearchResults'), context: z.unknown() }) }),
1082
1076
  z.object({ event: z.object({ name: z.literal('clearSearch'), context: z.unknown() }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/thermidor-schema",
3
- "version": "1.0.0-beta.19",
3
+ "version": "1.0.0-beta.20",
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": {