@heavybit/ecommerce-contracts 0.3.23 → 0.3.25

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.
@@ -20,6 +20,8 @@ export declare const searchDocumentSchema: z.ZodObject<{
20
20
  priceCents: z.ZodNumber;
21
21
  inStock: z.ZodBoolean;
22
22
  rating: z.ZodNumber;
23
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
24
+ popularity: z.ZodOptional<z.ZodNumber>;
23
25
  createdAt: z.ZodString;
24
26
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
25
27
  id: z.ZodString;
@@ -31,6 +33,8 @@ export declare const searchDocumentSchema: z.ZodObject<{
31
33
  priceCents: z.ZodNumber;
32
34
  inStock: z.ZodBoolean;
33
35
  rating: z.ZodNumber;
36
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
37
+ popularity: z.ZodOptional<z.ZodNumber>;
34
38
  createdAt: z.ZodString;
35
39
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
36
40
  id: z.ZodString;
@@ -42,6 +46,8 @@ export declare const searchDocumentSchema: z.ZodObject<{
42
46
  priceCents: z.ZodNumber;
43
47
  inStock: z.ZodBoolean;
44
48
  rating: z.ZodNumber;
49
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
50
+ popularity: z.ZodOptional<z.ZodNumber>;
45
51
  createdAt: z.ZodString;
46
52
  }, z.ZodTypeAny, "passthrough">>;
47
53
  /** Envelope `data` of `GET /api/v1/internal/search-documents/{productId}?companyId=`: `null` when the product is not indexable (draft, disabled, deleted, no active variant, shop not active). */
@@ -56,6 +62,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
56
62
  priceCents: z.ZodNumber;
57
63
  inStock: z.ZodBoolean;
58
64
  rating: z.ZodNumber;
65
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
66
+ popularity: z.ZodOptional<z.ZodNumber>;
59
67
  createdAt: z.ZodString;
60
68
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
61
69
  id: z.ZodString;
@@ -67,6 +75,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
67
75
  priceCents: z.ZodNumber;
68
76
  inStock: z.ZodBoolean;
69
77
  rating: z.ZodNumber;
78
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
79
+ popularity: z.ZodOptional<z.ZodNumber>;
70
80
  createdAt: z.ZodString;
71
81
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
72
82
  id: z.ZodString;
@@ -78,6 +88,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
78
88
  priceCents: z.ZodNumber;
79
89
  inStock: z.ZodBoolean;
80
90
  rating: z.ZodNumber;
91
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
92
+ popularity: z.ZodOptional<z.ZodNumber>;
81
93
  createdAt: z.ZodString;
82
94
  }, z.ZodTypeAny, "passthrough">>>;
83
95
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -91,6 +103,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
91
103
  priceCents: z.ZodNumber;
92
104
  inStock: z.ZodBoolean;
93
105
  rating: z.ZodNumber;
106
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
107
+ popularity: z.ZodOptional<z.ZodNumber>;
94
108
  createdAt: z.ZodString;
95
109
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
96
110
  id: z.ZodString;
@@ -102,6 +116,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
102
116
  priceCents: z.ZodNumber;
103
117
  inStock: z.ZodBoolean;
104
118
  rating: z.ZodNumber;
119
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
120
+ popularity: z.ZodOptional<z.ZodNumber>;
105
121
  createdAt: z.ZodString;
106
122
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
107
123
  id: z.ZodString;
@@ -113,6 +129,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
113
129
  priceCents: z.ZodNumber;
114
130
  inStock: z.ZodBoolean;
115
131
  rating: z.ZodNumber;
132
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
133
+ popularity: z.ZodOptional<z.ZodNumber>;
116
134
  createdAt: z.ZodString;
117
135
  }, z.ZodTypeAny, "passthrough">>>;
118
136
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
@@ -126,6 +144,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
126
144
  priceCents: z.ZodNumber;
127
145
  inStock: z.ZodBoolean;
128
146
  rating: z.ZodNumber;
147
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
148
+ popularity: z.ZodOptional<z.ZodNumber>;
129
149
  createdAt: z.ZodString;
130
150
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
131
151
  id: z.ZodString;
@@ -137,6 +157,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
137
157
  priceCents: z.ZodNumber;
138
158
  inStock: z.ZodBoolean;
139
159
  rating: z.ZodNumber;
160
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
161
+ popularity: z.ZodOptional<z.ZodNumber>;
140
162
  createdAt: z.ZodString;
141
163
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
142
164
  id: z.ZodString;
@@ -148,6 +170,8 @@ export declare const searchDocumentLookupSchema: z.ZodObject<{
148
170
  priceCents: z.ZodNumber;
149
171
  inStock: z.ZodBoolean;
150
172
  rating: z.ZodNumber;
173
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
174
+ popularity: z.ZodOptional<z.ZodNumber>;
151
175
  createdAt: z.ZodString;
152
176
  }, z.ZodTypeAny, "passthrough">>>;
153
177
  }, z.ZodTypeAny, "passthrough">>;
@@ -163,6 +187,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
163
187
  priceCents: z.ZodNumber;
164
188
  inStock: z.ZodBoolean;
165
189
  rating: z.ZodNumber;
190
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
191
+ popularity: z.ZodOptional<z.ZodNumber>;
166
192
  createdAt: z.ZodString;
167
193
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
168
194
  id: z.ZodString;
@@ -174,6 +200,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
174
200
  priceCents: z.ZodNumber;
175
201
  inStock: z.ZodBoolean;
176
202
  rating: z.ZodNumber;
203
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
204
+ popularity: z.ZodOptional<z.ZodNumber>;
177
205
  createdAt: z.ZodString;
178
206
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
179
207
  id: z.ZodString;
@@ -185,6 +213,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
185
213
  priceCents: z.ZodNumber;
186
214
  inStock: z.ZodBoolean;
187
215
  rating: z.ZodNumber;
216
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
217
+ popularity: z.ZodOptional<z.ZodNumber>;
188
218
  createdAt: z.ZodString;
189
219
  }, z.ZodTypeAny, "passthrough">>, "many">;
190
220
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -199,6 +229,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
199
229
  priceCents: z.ZodNumber;
200
230
  inStock: z.ZodBoolean;
201
231
  rating: z.ZodNumber;
232
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
233
+ popularity: z.ZodOptional<z.ZodNumber>;
202
234
  createdAt: z.ZodString;
203
235
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
204
236
  id: z.ZodString;
@@ -210,6 +242,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
210
242
  priceCents: z.ZodNumber;
211
243
  inStock: z.ZodBoolean;
212
244
  rating: z.ZodNumber;
245
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
246
+ popularity: z.ZodOptional<z.ZodNumber>;
213
247
  createdAt: z.ZodString;
214
248
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
215
249
  id: z.ZodString;
@@ -221,6 +255,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
221
255
  priceCents: z.ZodNumber;
222
256
  inStock: z.ZodBoolean;
223
257
  rating: z.ZodNumber;
258
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
259
+ popularity: z.ZodOptional<z.ZodNumber>;
224
260
  createdAt: z.ZodString;
225
261
  }, z.ZodTypeAny, "passthrough">>, "many">;
226
262
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -235,6 +271,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
235
271
  priceCents: z.ZodNumber;
236
272
  inStock: z.ZodBoolean;
237
273
  rating: z.ZodNumber;
274
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
275
+ popularity: z.ZodOptional<z.ZodNumber>;
238
276
  createdAt: z.ZodString;
239
277
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
240
278
  id: z.ZodString;
@@ -246,6 +284,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
246
284
  priceCents: z.ZodNumber;
247
285
  inStock: z.ZodBoolean;
248
286
  rating: z.ZodNumber;
287
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
288
+ popularity: z.ZodOptional<z.ZodNumber>;
249
289
  createdAt: z.ZodString;
250
290
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
251
291
  id: z.ZodString;
@@ -257,6 +297,8 @@ export declare const searchDocumentPageSchema: z.ZodObject<{
257
297
  priceCents: z.ZodNumber;
258
298
  inStock: z.ZodBoolean;
259
299
  rating: z.ZodNumber;
300
+ /** Demand signal for the popularity sort: how many shoppers rated or reviewed it (the count catalog owns, 26.3). Absent on older documents. */
301
+ popularity: z.ZodOptional<z.ZodNumber>;
260
302
  createdAt: z.ZodString;
261
303
  }, z.ZodTypeAny, "passthrough">>, "many">;
262
304
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -268,27 +310,34 @@ export type SearchDocumentLookup = z.infer<typeof searchDocumentLookupSchema>;
268
310
  /** Answer of the page read. */
269
311
  export type SearchDocumentPage = z.infer<typeof searchDocumentPageSchema>;
270
312
  /** Sorts the engine can apply (Prompt 26.2). `relevance` is the engine's own ranking. */
271
- export declare const SEARCH_SORTS: readonly ["relevance", "price_asc", "price_desc", "newest", "rating"];
313
+ export declare const SEARCH_SORTS: readonly ["relevance", "price_asc", "price_desc", "newest", "rating", "popularity"];
272
314
  /** Most ids one `GET /internal/search` page returns. */
273
315
  export declare const MAX_SEARCH_PAGE = 100;
274
316
  /** Most category ids one search can filter on (the chosen category plus its children). */
275
317
  export declare const MAX_SEARCH_CATEGORIES = 100;
318
+ /** Most brand names one search can filter on. */
319
+ export declare const MAX_SEARCH_BRANDS = 20;
276
320
  /**
277
321
  * Query of `GET /api/v1/internal/search` (caller: catalog-service). Always scoped to one shop (`companyId`, TEN-8).
278
322
  * `categoryIds` is a comma-separated list of ULIDs; prices are minor units (KES cents, campaign-aware, CR-26-01).
279
323
  */
280
324
  export declare const searchQuerySchema: z.ZodObject<{
281
325
  companyId: z.ZodString;
282
- q: z.ZodString;
326
+ /** Words to match. Empty browses the whole shop (the facets of a category page). */
327
+ q: z.ZodDefault<z.ZodString>;
283
328
  categoryIds: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
284
329
  minPriceCents: z.ZodOptional<z.ZodNumber>;
285
330
  maxPriceCents: z.ZodOptional<z.ZodNumber>;
286
331
  inStock: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "true" | "false" | undefined>;
287
- sort: z.ZodDefault<z.ZodEnum<["relevance", "price_asc", "price_desc", "newest", "rating"]>>;
332
+ /** Comma-separated brand names (any of). */
333
+ brands: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
334
+ /** Smallest average rating, 1 to 5. */
335
+ minRating: z.ZodOptional<z.ZodNumber>;
336
+ sort: z.ZodDefault<z.ZodEnum<["relevance", "price_asc", "price_desc", "newest", "rating", "popularity"]>>;
288
337
  offset: z.ZodDefault<z.ZodNumber>;
289
338
  limit: z.ZodDefault<z.ZodNumber>;
290
339
  }, "strict", z.ZodTypeAny, {
291
- sort: "rating" | "relevance" | "price_asc" | "price_desc" | "newest";
340
+ sort: "rating" | "popularity" | "relevance" | "price_asc" | "price_desc" | "newest";
292
341
  offset: number;
293
342
  companyId: string;
294
343
  q: string;
@@ -297,15 +346,19 @@ export declare const searchQuerySchema: z.ZodObject<{
297
346
  inStock?: boolean | undefined;
298
347
  minPriceCents?: number | undefined;
299
348
  maxPriceCents?: number | undefined;
349
+ brands?: string[] | undefined;
350
+ minRating?: number | undefined;
300
351
  }, {
301
352
  companyId: string;
302
- q: string;
303
- sort?: "rating" | "relevance" | "price_asc" | "price_desc" | "newest" | undefined;
353
+ sort?: "rating" | "popularity" | "relevance" | "price_asc" | "price_desc" | "newest" | undefined;
304
354
  offset?: number | undefined;
305
355
  categoryIds?: string | undefined;
306
356
  inStock?: "true" | "false" | undefined;
357
+ q?: string | undefined;
307
358
  minPriceCents?: number | undefined;
308
359
  maxPriceCents?: number | undefined;
360
+ brands?: string | undefined;
361
+ minRating?: number | undefined;
309
362
  limit?: number | undefined;
310
363
  }>;
311
364
  /** Envelope `data` of `GET /api/v1/internal/search`: product ids in result order and the engine's total hit count. Catalog hydrates the cards. */
@@ -323,4 +376,668 @@ export declare const searchResultSchema: z.ZodObject<{
323
376
  export type SearchQuery = z.output<typeof searchQuerySchema>;
324
377
  /** Answer of the search. */
325
378
  export type SearchResult = z.infer<typeof searchResultSchema>;
379
+ /** Query of `GET /api/v1/internal/search/facets`: the same filters as the search, without sort or paging. */
380
+ export declare const searchFacetsQuerySchema: z.ZodObject<Omit<{
381
+ companyId: z.ZodString;
382
+ /** Words to match. Empty browses the whole shop (the facets of a category page). */
383
+ q: z.ZodDefault<z.ZodString>;
384
+ categoryIds: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
385
+ minPriceCents: z.ZodOptional<z.ZodNumber>;
386
+ maxPriceCents: z.ZodOptional<z.ZodNumber>;
387
+ inStock: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "true" | "false" | undefined>;
388
+ /** Comma-separated brand names (any of). */
389
+ brands: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>, z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
390
+ /** Smallest average rating, 1 to 5. */
391
+ minRating: z.ZodOptional<z.ZodNumber>;
392
+ sort: z.ZodDefault<z.ZodEnum<["relevance", "price_asc", "price_desc", "newest", "rating", "popularity"]>>;
393
+ offset: z.ZodDefault<z.ZodNumber>;
394
+ limit: z.ZodDefault<z.ZodNumber>;
395
+ }, "sort" | "offset" | "limit">, "strict", z.ZodTypeAny, {
396
+ companyId: string;
397
+ q: string;
398
+ categoryIds?: string[] | undefined;
399
+ inStock?: boolean | undefined;
400
+ minPriceCents?: number | undefined;
401
+ maxPriceCents?: number | undefined;
402
+ brands?: string[] | undefined;
403
+ minRating?: number | undefined;
404
+ }, {
405
+ companyId: string;
406
+ categoryIds?: string | undefined;
407
+ inStock?: "true" | "false" | undefined;
408
+ q?: string | undefined;
409
+ minPriceCents?: number | undefined;
410
+ maxPriceCents?: number | undefined;
411
+ brands?: string | undefined;
412
+ minRating?: number | undefined;
413
+ }>;
414
+ /**
415
+ * Facet counts of one search (26.3), under the shopper's current filters. Price buckets are `[minCents, maxCents]` inclusive
416
+ * (`maxCents` null = open-ended); rating entries are "at least `min` stars". Zero-count entries are left out.
417
+ */
418
+ export declare const searchFacetsSchema: z.ZodObject<{
419
+ categories: z.ZodArray<z.ZodObject<{
420
+ id: z.ZodString;
421
+ count: z.ZodNumber;
422
+ }, "strip", z.ZodTypeAny, {
423
+ id: string;
424
+ count: number;
425
+ }, {
426
+ id: string;
427
+ count: number;
428
+ }>, "many">;
429
+ brands: z.ZodArray<z.ZodObject<{
430
+ name: z.ZodString;
431
+ count: z.ZodNumber;
432
+ }, "strip", z.ZodTypeAny, {
433
+ name: string;
434
+ count: number;
435
+ }, {
436
+ name: string;
437
+ count: number;
438
+ }>, "many">;
439
+ inStock: z.ZodObject<{
440
+ count: z.ZodNumber;
441
+ }, "strip", z.ZodTypeAny, {
442
+ count: number;
443
+ }, {
444
+ count: number;
445
+ }>;
446
+ price: z.ZodArray<z.ZodObject<{
447
+ minCents: z.ZodNumber;
448
+ maxCents: z.ZodNullable<z.ZodNumber>;
449
+ count: z.ZodNumber;
450
+ }, "strip", z.ZodTypeAny, {
451
+ count: number;
452
+ minCents: number;
453
+ maxCents: number | null;
454
+ }, {
455
+ count: number;
456
+ minCents: number;
457
+ maxCents: number | null;
458
+ }>, "many">;
459
+ rating: z.ZodArray<z.ZodObject<{
460
+ min: z.ZodNumber;
461
+ count: z.ZodNumber;
462
+ }, "strip", z.ZodTypeAny, {
463
+ count: number;
464
+ min: number;
465
+ }, {
466
+ count: number;
467
+ min: number;
468
+ }>, "many">;
469
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
470
+ categories: z.ZodArray<z.ZodObject<{
471
+ id: z.ZodString;
472
+ count: z.ZodNumber;
473
+ }, "strip", z.ZodTypeAny, {
474
+ id: string;
475
+ count: number;
476
+ }, {
477
+ id: string;
478
+ count: number;
479
+ }>, "many">;
480
+ brands: z.ZodArray<z.ZodObject<{
481
+ name: z.ZodString;
482
+ count: z.ZodNumber;
483
+ }, "strip", z.ZodTypeAny, {
484
+ name: string;
485
+ count: number;
486
+ }, {
487
+ name: string;
488
+ count: number;
489
+ }>, "many">;
490
+ inStock: z.ZodObject<{
491
+ count: z.ZodNumber;
492
+ }, "strip", z.ZodTypeAny, {
493
+ count: number;
494
+ }, {
495
+ count: number;
496
+ }>;
497
+ price: z.ZodArray<z.ZodObject<{
498
+ minCents: z.ZodNumber;
499
+ maxCents: z.ZodNullable<z.ZodNumber>;
500
+ count: z.ZodNumber;
501
+ }, "strip", z.ZodTypeAny, {
502
+ count: number;
503
+ minCents: number;
504
+ maxCents: number | null;
505
+ }, {
506
+ count: number;
507
+ minCents: number;
508
+ maxCents: number | null;
509
+ }>, "many">;
510
+ rating: z.ZodArray<z.ZodObject<{
511
+ min: z.ZodNumber;
512
+ count: z.ZodNumber;
513
+ }, "strip", z.ZodTypeAny, {
514
+ count: number;
515
+ min: number;
516
+ }, {
517
+ count: number;
518
+ min: number;
519
+ }>, "many">;
520
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
521
+ categories: z.ZodArray<z.ZodObject<{
522
+ id: z.ZodString;
523
+ count: z.ZodNumber;
524
+ }, "strip", z.ZodTypeAny, {
525
+ id: string;
526
+ count: number;
527
+ }, {
528
+ id: string;
529
+ count: number;
530
+ }>, "many">;
531
+ brands: z.ZodArray<z.ZodObject<{
532
+ name: z.ZodString;
533
+ count: z.ZodNumber;
534
+ }, "strip", z.ZodTypeAny, {
535
+ name: string;
536
+ count: number;
537
+ }, {
538
+ name: string;
539
+ count: number;
540
+ }>, "many">;
541
+ inStock: z.ZodObject<{
542
+ count: z.ZodNumber;
543
+ }, "strip", z.ZodTypeAny, {
544
+ count: number;
545
+ }, {
546
+ count: number;
547
+ }>;
548
+ price: z.ZodArray<z.ZodObject<{
549
+ minCents: z.ZodNumber;
550
+ maxCents: z.ZodNullable<z.ZodNumber>;
551
+ count: z.ZodNumber;
552
+ }, "strip", z.ZodTypeAny, {
553
+ count: number;
554
+ minCents: number;
555
+ maxCents: number | null;
556
+ }, {
557
+ count: number;
558
+ minCents: number;
559
+ maxCents: number | null;
560
+ }>, "many">;
561
+ rating: z.ZodArray<z.ZodObject<{
562
+ min: z.ZodNumber;
563
+ count: z.ZodNumber;
564
+ }, "strip", z.ZodTypeAny, {
565
+ count: number;
566
+ min: number;
567
+ }, {
568
+ count: number;
569
+ min: number;
570
+ }>, "many">;
571
+ }, z.ZodTypeAny, "passthrough">>;
572
+ /** Envelope `data` of `GET /api/v1/internal/search/facets`. */
573
+ export declare const searchFacetsResultSchema: z.ZodObject<{
574
+ facets: z.ZodObject<{
575
+ categories: z.ZodArray<z.ZodObject<{
576
+ id: z.ZodString;
577
+ count: z.ZodNumber;
578
+ }, "strip", z.ZodTypeAny, {
579
+ id: string;
580
+ count: number;
581
+ }, {
582
+ id: string;
583
+ count: number;
584
+ }>, "many">;
585
+ brands: z.ZodArray<z.ZodObject<{
586
+ name: z.ZodString;
587
+ count: z.ZodNumber;
588
+ }, "strip", z.ZodTypeAny, {
589
+ name: string;
590
+ count: number;
591
+ }, {
592
+ name: string;
593
+ count: number;
594
+ }>, "many">;
595
+ inStock: z.ZodObject<{
596
+ count: z.ZodNumber;
597
+ }, "strip", z.ZodTypeAny, {
598
+ count: number;
599
+ }, {
600
+ count: number;
601
+ }>;
602
+ price: z.ZodArray<z.ZodObject<{
603
+ minCents: z.ZodNumber;
604
+ maxCents: z.ZodNullable<z.ZodNumber>;
605
+ count: z.ZodNumber;
606
+ }, "strip", z.ZodTypeAny, {
607
+ count: number;
608
+ minCents: number;
609
+ maxCents: number | null;
610
+ }, {
611
+ count: number;
612
+ minCents: number;
613
+ maxCents: number | null;
614
+ }>, "many">;
615
+ rating: z.ZodArray<z.ZodObject<{
616
+ min: z.ZodNumber;
617
+ count: z.ZodNumber;
618
+ }, "strip", z.ZodTypeAny, {
619
+ count: number;
620
+ min: number;
621
+ }, {
622
+ count: number;
623
+ min: number;
624
+ }>, "many">;
625
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
626
+ categories: z.ZodArray<z.ZodObject<{
627
+ id: z.ZodString;
628
+ count: z.ZodNumber;
629
+ }, "strip", z.ZodTypeAny, {
630
+ id: string;
631
+ count: number;
632
+ }, {
633
+ id: string;
634
+ count: number;
635
+ }>, "many">;
636
+ brands: z.ZodArray<z.ZodObject<{
637
+ name: z.ZodString;
638
+ count: z.ZodNumber;
639
+ }, "strip", z.ZodTypeAny, {
640
+ name: string;
641
+ count: number;
642
+ }, {
643
+ name: string;
644
+ count: number;
645
+ }>, "many">;
646
+ inStock: z.ZodObject<{
647
+ count: z.ZodNumber;
648
+ }, "strip", z.ZodTypeAny, {
649
+ count: number;
650
+ }, {
651
+ count: number;
652
+ }>;
653
+ price: z.ZodArray<z.ZodObject<{
654
+ minCents: z.ZodNumber;
655
+ maxCents: z.ZodNullable<z.ZodNumber>;
656
+ count: z.ZodNumber;
657
+ }, "strip", z.ZodTypeAny, {
658
+ count: number;
659
+ minCents: number;
660
+ maxCents: number | null;
661
+ }, {
662
+ count: number;
663
+ minCents: number;
664
+ maxCents: number | null;
665
+ }>, "many">;
666
+ rating: z.ZodArray<z.ZodObject<{
667
+ min: z.ZodNumber;
668
+ count: z.ZodNumber;
669
+ }, "strip", z.ZodTypeAny, {
670
+ count: number;
671
+ min: number;
672
+ }, {
673
+ count: number;
674
+ min: number;
675
+ }>, "many">;
676
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
677
+ categories: z.ZodArray<z.ZodObject<{
678
+ id: z.ZodString;
679
+ count: z.ZodNumber;
680
+ }, "strip", z.ZodTypeAny, {
681
+ id: string;
682
+ count: number;
683
+ }, {
684
+ id: string;
685
+ count: number;
686
+ }>, "many">;
687
+ brands: z.ZodArray<z.ZodObject<{
688
+ name: z.ZodString;
689
+ count: z.ZodNumber;
690
+ }, "strip", z.ZodTypeAny, {
691
+ name: string;
692
+ count: number;
693
+ }, {
694
+ name: string;
695
+ count: number;
696
+ }>, "many">;
697
+ inStock: z.ZodObject<{
698
+ count: z.ZodNumber;
699
+ }, "strip", z.ZodTypeAny, {
700
+ count: number;
701
+ }, {
702
+ count: number;
703
+ }>;
704
+ price: z.ZodArray<z.ZodObject<{
705
+ minCents: z.ZodNumber;
706
+ maxCents: z.ZodNullable<z.ZodNumber>;
707
+ count: z.ZodNumber;
708
+ }, "strip", z.ZodTypeAny, {
709
+ count: number;
710
+ minCents: number;
711
+ maxCents: number | null;
712
+ }, {
713
+ count: number;
714
+ minCents: number;
715
+ maxCents: number | null;
716
+ }>, "many">;
717
+ rating: z.ZodArray<z.ZodObject<{
718
+ min: z.ZodNumber;
719
+ count: z.ZodNumber;
720
+ }, "strip", z.ZodTypeAny, {
721
+ count: number;
722
+ min: number;
723
+ }, {
724
+ count: number;
725
+ min: number;
726
+ }>, "many">;
727
+ }, z.ZodTypeAny, "passthrough">>;
728
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
729
+ facets: z.ZodObject<{
730
+ categories: z.ZodArray<z.ZodObject<{
731
+ id: z.ZodString;
732
+ count: z.ZodNumber;
733
+ }, "strip", z.ZodTypeAny, {
734
+ id: string;
735
+ count: number;
736
+ }, {
737
+ id: string;
738
+ count: number;
739
+ }>, "many">;
740
+ brands: z.ZodArray<z.ZodObject<{
741
+ name: z.ZodString;
742
+ count: z.ZodNumber;
743
+ }, "strip", z.ZodTypeAny, {
744
+ name: string;
745
+ count: number;
746
+ }, {
747
+ name: string;
748
+ count: number;
749
+ }>, "many">;
750
+ inStock: z.ZodObject<{
751
+ count: z.ZodNumber;
752
+ }, "strip", z.ZodTypeAny, {
753
+ count: number;
754
+ }, {
755
+ count: number;
756
+ }>;
757
+ price: z.ZodArray<z.ZodObject<{
758
+ minCents: z.ZodNumber;
759
+ maxCents: z.ZodNullable<z.ZodNumber>;
760
+ count: z.ZodNumber;
761
+ }, "strip", z.ZodTypeAny, {
762
+ count: number;
763
+ minCents: number;
764
+ maxCents: number | null;
765
+ }, {
766
+ count: number;
767
+ minCents: number;
768
+ maxCents: number | null;
769
+ }>, "many">;
770
+ rating: z.ZodArray<z.ZodObject<{
771
+ min: z.ZodNumber;
772
+ count: z.ZodNumber;
773
+ }, "strip", z.ZodTypeAny, {
774
+ count: number;
775
+ min: number;
776
+ }, {
777
+ count: number;
778
+ min: number;
779
+ }>, "many">;
780
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
781
+ categories: z.ZodArray<z.ZodObject<{
782
+ id: z.ZodString;
783
+ count: z.ZodNumber;
784
+ }, "strip", z.ZodTypeAny, {
785
+ id: string;
786
+ count: number;
787
+ }, {
788
+ id: string;
789
+ count: number;
790
+ }>, "many">;
791
+ brands: z.ZodArray<z.ZodObject<{
792
+ name: z.ZodString;
793
+ count: z.ZodNumber;
794
+ }, "strip", z.ZodTypeAny, {
795
+ name: string;
796
+ count: number;
797
+ }, {
798
+ name: string;
799
+ count: number;
800
+ }>, "many">;
801
+ inStock: z.ZodObject<{
802
+ count: z.ZodNumber;
803
+ }, "strip", z.ZodTypeAny, {
804
+ count: number;
805
+ }, {
806
+ count: number;
807
+ }>;
808
+ price: z.ZodArray<z.ZodObject<{
809
+ minCents: z.ZodNumber;
810
+ maxCents: z.ZodNullable<z.ZodNumber>;
811
+ count: z.ZodNumber;
812
+ }, "strip", z.ZodTypeAny, {
813
+ count: number;
814
+ minCents: number;
815
+ maxCents: number | null;
816
+ }, {
817
+ count: number;
818
+ minCents: number;
819
+ maxCents: number | null;
820
+ }>, "many">;
821
+ rating: z.ZodArray<z.ZodObject<{
822
+ min: z.ZodNumber;
823
+ count: z.ZodNumber;
824
+ }, "strip", z.ZodTypeAny, {
825
+ count: number;
826
+ min: number;
827
+ }, {
828
+ count: number;
829
+ min: number;
830
+ }>, "many">;
831
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
832
+ categories: z.ZodArray<z.ZodObject<{
833
+ id: z.ZodString;
834
+ count: z.ZodNumber;
835
+ }, "strip", z.ZodTypeAny, {
836
+ id: string;
837
+ count: number;
838
+ }, {
839
+ id: string;
840
+ count: number;
841
+ }>, "many">;
842
+ brands: z.ZodArray<z.ZodObject<{
843
+ name: z.ZodString;
844
+ count: z.ZodNumber;
845
+ }, "strip", z.ZodTypeAny, {
846
+ name: string;
847
+ count: number;
848
+ }, {
849
+ name: string;
850
+ count: number;
851
+ }>, "many">;
852
+ inStock: z.ZodObject<{
853
+ count: z.ZodNumber;
854
+ }, "strip", z.ZodTypeAny, {
855
+ count: number;
856
+ }, {
857
+ count: number;
858
+ }>;
859
+ price: z.ZodArray<z.ZodObject<{
860
+ minCents: z.ZodNumber;
861
+ maxCents: z.ZodNullable<z.ZodNumber>;
862
+ count: z.ZodNumber;
863
+ }, "strip", z.ZodTypeAny, {
864
+ count: number;
865
+ minCents: number;
866
+ maxCents: number | null;
867
+ }, {
868
+ count: number;
869
+ minCents: number;
870
+ maxCents: number | null;
871
+ }>, "many">;
872
+ rating: z.ZodArray<z.ZodObject<{
873
+ min: z.ZodNumber;
874
+ count: z.ZodNumber;
875
+ }, "strip", z.ZodTypeAny, {
876
+ count: number;
877
+ min: number;
878
+ }, {
879
+ count: number;
880
+ min: number;
881
+ }>, "many">;
882
+ }, z.ZodTypeAny, "passthrough">>;
883
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
884
+ facets: z.ZodObject<{
885
+ categories: z.ZodArray<z.ZodObject<{
886
+ id: z.ZodString;
887
+ count: z.ZodNumber;
888
+ }, "strip", z.ZodTypeAny, {
889
+ id: string;
890
+ count: number;
891
+ }, {
892
+ id: string;
893
+ count: number;
894
+ }>, "many">;
895
+ brands: z.ZodArray<z.ZodObject<{
896
+ name: z.ZodString;
897
+ count: z.ZodNumber;
898
+ }, "strip", z.ZodTypeAny, {
899
+ name: string;
900
+ count: number;
901
+ }, {
902
+ name: string;
903
+ count: number;
904
+ }>, "many">;
905
+ inStock: z.ZodObject<{
906
+ count: z.ZodNumber;
907
+ }, "strip", z.ZodTypeAny, {
908
+ count: number;
909
+ }, {
910
+ count: number;
911
+ }>;
912
+ price: z.ZodArray<z.ZodObject<{
913
+ minCents: z.ZodNumber;
914
+ maxCents: z.ZodNullable<z.ZodNumber>;
915
+ count: z.ZodNumber;
916
+ }, "strip", z.ZodTypeAny, {
917
+ count: number;
918
+ minCents: number;
919
+ maxCents: number | null;
920
+ }, {
921
+ count: number;
922
+ minCents: number;
923
+ maxCents: number | null;
924
+ }>, "many">;
925
+ rating: z.ZodArray<z.ZodObject<{
926
+ min: z.ZodNumber;
927
+ count: z.ZodNumber;
928
+ }, "strip", z.ZodTypeAny, {
929
+ count: number;
930
+ min: number;
931
+ }, {
932
+ count: number;
933
+ min: number;
934
+ }>, "many">;
935
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
936
+ categories: z.ZodArray<z.ZodObject<{
937
+ id: z.ZodString;
938
+ count: z.ZodNumber;
939
+ }, "strip", z.ZodTypeAny, {
940
+ id: string;
941
+ count: number;
942
+ }, {
943
+ id: string;
944
+ count: number;
945
+ }>, "many">;
946
+ brands: z.ZodArray<z.ZodObject<{
947
+ name: z.ZodString;
948
+ count: z.ZodNumber;
949
+ }, "strip", z.ZodTypeAny, {
950
+ name: string;
951
+ count: number;
952
+ }, {
953
+ name: string;
954
+ count: number;
955
+ }>, "many">;
956
+ inStock: z.ZodObject<{
957
+ count: z.ZodNumber;
958
+ }, "strip", z.ZodTypeAny, {
959
+ count: number;
960
+ }, {
961
+ count: number;
962
+ }>;
963
+ price: z.ZodArray<z.ZodObject<{
964
+ minCents: z.ZodNumber;
965
+ maxCents: z.ZodNullable<z.ZodNumber>;
966
+ count: z.ZodNumber;
967
+ }, "strip", z.ZodTypeAny, {
968
+ count: number;
969
+ minCents: number;
970
+ maxCents: number | null;
971
+ }, {
972
+ count: number;
973
+ minCents: number;
974
+ maxCents: number | null;
975
+ }>, "many">;
976
+ rating: z.ZodArray<z.ZodObject<{
977
+ min: z.ZodNumber;
978
+ count: z.ZodNumber;
979
+ }, "strip", z.ZodTypeAny, {
980
+ count: number;
981
+ min: number;
982
+ }, {
983
+ count: number;
984
+ min: number;
985
+ }>, "many">;
986
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
987
+ categories: z.ZodArray<z.ZodObject<{
988
+ id: z.ZodString;
989
+ count: z.ZodNumber;
990
+ }, "strip", z.ZodTypeAny, {
991
+ id: string;
992
+ count: number;
993
+ }, {
994
+ id: string;
995
+ count: number;
996
+ }>, "many">;
997
+ brands: z.ZodArray<z.ZodObject<{
998
+ name: z.ZodString;
999
+ count: z.ZodNumber;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ name: string;
1002
+ count: number;
1003
+ }, {
1004
+ name: string;
1005
+ count: number;
1006
+ }>, "many">;
1007
+ inStock: z.ZodObject<{
1008
+ count: z.ZodNumber;
1009
+ }, "strip", z.ZodTypeAny, {
1010
+ count: number;
1011
+ }, {
1012
+ count: number;
1013
+ }>;
1014
+ price: z.ZodArray<z.ZodObject<{
1015
+ minCents: z.ZodNumber;
1016
+ maxCents: z.ZodNullable<z.ZodNumber>;
1017
+ count: z.ZodNumber;
1018
+ }, "strip", z.ZodTypeAny, {
1019
+ count: number;
1020
+ minCents: number;
1021
+ maxCents: number | null;
1022
+ }, {
1023
+ count: number;
1024
+ minCents: number;
1025
+ maxCents: number | null;
1026
+ }>, "many">;
1027
+ rating: z.ZodArray<z.ZodObject<{
1028
+ min: z.ZodNumber;
1029
+ count: z.ZodNumber;
1030
+ }, "strip", z.ZodTypeAny, {
1031
+ count: number;
1032
+ min: number;
1033
+ }, {
1034
+ count: number;
1035
+ min: number;
1036
+ }>, "many">;
1037
+ }, z.ZodTypeAny, "passthrough">>;
1038
+ }, z.ZodTypeAny, "passthrough">>;
1039
+ /** Facet counts of one search. */
1040
+ export type SearchFacets = z.infer<typeof searchFacetsSchema>;
1041
+ /** Parsed facets query. */
1042
+ export type SearchFacetsQuery = z.output<typeof searchFacetsQuerySchema>;
326
1043
  //# sourceMappingURL=search.d.ts.map