@wix/auto_sdk_stores_collections 1.0.36 → 1.0.38

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.
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // index.typings.ts
@@ -197,6 +207,507 @@ function getCollectionBySlug(payload) {
197
207
 
198
208
  // src/stores-catalog-v1-collection-collections.universal.ts
199
209
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
210
+
211
+ // src/stores-catalog-v1-collection-collections.schemas.ts
212
+ var z = __toESM(require("zod"));
213
+ var QueryCollectionsRequest = z.object({
214
+ query: z.intersection(
215
+ z.object({
216
+ filter: z.record(z.string(), z.any()).describe("Filter object.").optional().nullable(),
217
+ sort: z.array(
218
+ z.object({
219
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
220
+ order: z.enum(["ASC", "DESC"]).optional()
221
+ })
222
+ ).optional()
223
+ }),
224
+ z.xor([
225
+ z.object({
226
+ paging: z.never().optional(),
227
+ cursorPaging: z.never().optional()
228
+ }),
229
+ z.object({
230
+ cursorPaging: z.never().optional(),
231
+ paging: z.object({
232
+ limit: z.number().int().describe("Number of items to load.").min(0).max(100).optional().nullable(),
233
+ offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
234
+ }).describe(
235
+ "Pointer to page of results using offset. Cannot be used together with `cursorPaging`."
236
+ )
237
+ }),
238
+ z.object({
239
+ paging: z.never().optional(),
240
+ cursorPaging: z.object({
241
+ limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
242
+ cursor: z.string().describe(
243
+ "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
244
+ ).max(16e3).optional().nullable()
245
+ }).describe(
246
+ "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`."
247
+ )
248
+ })
249
+ ])
250
+ )
251
+ });
252
+ var QueryCollectionsResponse = z.object({
253
+ collections: z.array(
254
+ z.object({
255
+ _id: z.string().describe("Collection ID (generated automatically by the catalog).").min(35).max(36).optional().nullable(),
256
+ name: z.string().describe("Collection name.").min(1).max(50).optional().nullable(),
257
+ media: z.object({
258
+ mainMedia: z.intersection(
259
+ z.object({
260
+ thumbnail: z.object({
261
+ url: z.string().describe("Media item URL.").url().optional(),
262
+ width: z.number().int().describe("Media item width.").min(0).optional(),
263
+ height: z.number().int().describe("Media item height.").min(0).optional(),
264
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
265
+ altText: z.string().describe(
266
+ "Alt text. This text will be shown in case the image is not available."
267
+ ).optional().nullable()
268
+ }).describe("Media item thumbnail details.").optional(),
269
+ mediaType: z.enum([
270
+ "unspecified_media_item_type",
271
+ "image",
272
+ "video",
273
+ "audio",
274
+ "document",
275
+ "zip"
276
+ ]).describe("Media item type (image, video, etc.).").optional(),
277
+ title: z.string().describe("Media item title.").optional(),
278
+ _id: z.string().describe(
279
+ 'Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).'
280
+ ).optional()
281
+ }),
282
+ z.xor([
283
+ z.object({
284
+ image: z.never().optional(),
285
+ video: z.never().optional()
286
+ }),
287
+ z.object({
288
+ video: z.never().optional(),
289
+ image: z.object({
290
+ url: z.string().describe("Media item URL.").url().optional(),
291
+ width: z.number().int().describe("Media item width.").min(0).optional(),
292
+ height: z.number().int().describe("Media item height.").min(0).optional(),
293
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
294
+ altText: z.string().describe(
295
+ "Alt text. This text will be shown in case the image is not available."
296
+ ).optional().nullable()
297
+ }).describe("Image data (URL, size).")
298
+ }),
299
+ z.object({
300
+ image: z.never().optional(),
301
+ video: z.object({
302
+ files: z.array(
303
+ z.object({
304
+ url: z.string().describe("Media item URL.").url().optional(),
305
+ width: z.number().int().describe("Media item width.").min(0).optional(),
306
+ height: z.number().int().describe("Media item height.").min(0).optional(),
307
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
308
+ altText: z.string().describe(
309
+ "Alt text. This text will be shown in case the image is not available."
310
+ ).optional().nullable()
311
+ })
312
+ ).optional(),
313
+ stillFrameMediaId: z.string().describe(
314
+ 'ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.'
315
+ ).optional()
316
+ }).describe("Video data (URL, size).")
317
+ })
318
+ ])
319
+ ).describe(
320
+ "Primary media (image, video etc) associated with this product."
321
+ ).optional(),
322
+ items: z.array(
323
+ z.intersection(
324
+ z.object({
325
+ thumbnail: z.object({
326
+ url: z.string().describe("Media item URL.").url().optional(),
327
+ width: z.number().int().describe("Media item width.").min(0).optional(),
328
+ height: z.number().int().describe("Media item height.").min(0).optional(),
329
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
330
+ altText: z.string().describe(
331
+ "Alt text. This text will be shown in case the image is not available."
332
+ ).optional().nullable()
333
+ }).describe("Media item thumbnail details.").optional(),
334
+ mediaType: z.enum([
335
+ "unspecified_media_item_type",
336
+ "image",
337
+ "video",
338
+ "audio",
339
+ "document",
340
+ "zip"
341
+ ]).describe("Media item type (image, video, etc.).").optional(),
342
+ title: z.string().describe("Media item title.").optional(),
343
+ _id: z.string().describe(
344
+ 'Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).'
345
+ ).optional()
346
+ }),
347
+ z.xor([
348
+ z.object({
349
+ image: z.never().optional(),
350
+ video: z.never().optional()
351
+ }),
352
+ z.object({
353
+ video: z.never().optional(),
354
+ image: z.object({
355
+ url: z.string().describe("Media item URL.").url().optional(),
356
+ width: z.number().int().describe("Media item width.").min(0).optional(),
357
+ height: z.number().int().describe("Media item height.").min(0).optional(),
358
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
359
+ altText: z.string().describe(
360
+ "Alt text. This text will be shown in case the image is not available."
361
+ ).optional().nullable()
362
+ }).describe("Image data (URL, size).")
363
+ }),
364
+ z.object({
365
+ image: z.never().optional(),
366
+ video: z.object({
367
+ files: z.array(
368
+ z.object({
369
+ url: z.string().describe("Media item URL.").url().optional(),
370
+ width: z.number().int().describe("Media item width.").min(0).optional(),
371
+ height: z.number().int().describe("Media item height.").min(0).optional(),
372
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
373
+ altText: z.string().describe(
374
+ "Alt text. This text will be shown in case the image is not available."
375
+ ).optional().nullable()
376
+ })
377
+ ).optional(),
378
+ stillFrameMediaId: z.string().describe(
379
+ 'ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.'
380
+ ).optional()
381
+ }).describe("Video data (URL, size).")
382
+ })
383
+ ])
384
+ )
385
+ ).optional()
386
+ }).describe(
387
+ "Media items (images, videos etc) associated with this collection. Read only."
388
+ ).optional(),
389
+ numberOfProducts: z.number().int().describe("Number of products in the collection. Read only.").optional(),
390
+ description: z.string().describe("Collection description.").min(0).max(600).optional().nullable(),
391
+ slug: z.string().describe("Collection slug.").min(1).max(100).optional().nullable(),
392
+ visible: z.boolean().describe(
393
+ "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`."
394
+ ).optional().nullable()
395
+ })
396
+ ).max(100).optional(),
397
+ metadata: z.object({
398
+ count: z.number().int().describe("The number of items returned in this response.").optional().nullable(),
399
+ offset: z.number().int().describe(
400
+ "The offset which was requested. Returned if offset paging was used."
401
+ ).optional().nullable(),
402
+ total: z.number().int().describe(
403
+ "The total number of items that match the query. Returned if offset paging was used."
404
+ ).optional().nullable(),
405
+ cursors: z.object({
406
+ next: z.string().describe(
407
+ "Cursor string pointing to the next page in the list of results."
408
+ ).max(16e3).optional().nullable(),
409
+ prev: z.string().describe(
410
+ "Cursor pointing to the previous page in the list of results."
411
+ ).max(16e3).optional().nullable()
412
+ }).describe(
413
+ "Cursors to navigate through result pages. Returned if cursor paging was used."
414
+ ).optional()
415
+ }).optional()
416
+ });
417
+ var GetCollectionRequest = z.object({
418
+ _id: z.string().describe("Requested collection ID.")
419
+ });
420
+ var GetCollectionResponse = z.object({
421
+ _id: z.string().describe("Collection ID (generated automatically by the catalog).").min(35).max(36).optional().nullable(),
422
+ name: z.string().describe("Collection name.").min(1).max(50).optional().nullable(),
423
+ media: z.object({
424
+ mainMedia: z.intersection(
425
+ z.object({
426
+ thumbnail: z.object({
427
+ url: z.string().describe("Media item URL.").url().optional(),
428
+ width: z.number().int().describe("Media item width.").min(0).optional(),
429
+ height: z.number().int().describe("Media item height.").min(0).optional(),
430
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
431
+ altText: z.string().describe(
432
+ "Alt text. This text will be shown in case the image is not available."
433
+ ).optional().nullable()
434
+ }).describe("Media item thumbnail details.").optional(),
435
+ mediaType: z.enum([
436
+ "unspecified_media_item_type",
437
+ "image",
438
+ "video",
439
+ "audio",
440
+ "document",
441
+ "zip"
442
+ ]).describe("Media item type (image, video, etc.).").optional(),
443
+ title: z.string().describe("Media item title.").optional(),
444
+ _id: z.string().describe(
445
+ 'Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).'
446
+ ).optional()
447
+ }),
448
+ z.xor([
449
+ z.object({
450
+ image: z.never().optional(),
451
+ video: z.never().optional()
452
+ }),
453
+ z.object({
454
+ video: z.never().optional(),
455
+ image: z.object({
456
+ url: z.string().describe("Media item URL.").url().optional(),
457
+ width: z.number().int().describe("Media item width.").min(0).optional(),
458
+ height: z.number().int().describe("Media item height.").min(0).optional(),
459
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
460
+ altText: z.string().describe(
461
+ "Alt text. This text will be shown in case the image is not available."
462
+ ).optional().nullable()
463
+ }).describe("Image data (URL, size).")
464
+ }),
465
+ z.object({
466
+ image: z.never().optional(),
467
+ video: z.object({
468
+ files: z.array(
469
+ z.object({
470
+ url: z.string().describe("Media item URL.").url().optional(),
471
+ width: z.number().int().describe("Media item width.").min(0).optional(),
472
+ height: z.number().int().describe("Media item height.").min(0).optional(),
473
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
474
+ altText: z.string().describe(
475
+ "Alt text. This text will be shown in case the image is not available."
476
+ ).optional().nullable()
477
+ })
478
+ ).optional(),
479
+ stillFrameMediaId: z.string().describe(
480
+ 'ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.'
481
+ ).optional()
482
+ }).describe("Video data (URL, size).")
483
+ })
484
+ ])
485
+ ).describe(
486
+ "Primary media (image, video etc) associated with this product."
487
+ ).optional(),
488
+ items: z.array(
489
+ z.intersection(
490
+ z.object({
491
+ thumbnail: z.object({
492
+ url: z.string().describe("Media item URL.").url().optional(),
493
+ width: z.number().int().describe("Media item width.").min(0).optional(),
494
+ height: z.number().int().describe("Media item height.").min(0).optional(),
495
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
496
+ altText: z.string().describe(
497
+ "Alt text. This text will be shown in case the image is not available."
498
+ ).optional().nullable()
499
+ }).describe("Media item thumbnail details.").optional(),
500
+ mediaType: z.enum([
501
+ "unspecified_media_item_type",
502
+ "image",
503
+ "video",
504
+ "audio",
505
+ "document",
506
+ "zip"
507
+ ]).describe("Media item type (image, video, etc.).").optional(),
508
+ title: z.string().describe("Media item title.").optional(),
509
+ _id: z.string().describe(
510
+ 'Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).'
511
+ ).optional()
512
+ }),
513
+ z.xor([
514
+ z.object({
515
+ image: z.never().optional(),
516
+ video: z.never().optional()
517
+ }),
518
+ z.object({
519
+ video: z.never().optional(),
520
+ image: z.object({
521
+ url: z.string().describe("Media item URL.").url().optional(),
522
+ width: z.number().int().describe("Media item width.").min(0).optional(),
523
+ height: z.number().int().describe("Media item height.").min(0).optional(),
524
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
525
+ altText: z.string().describe(
526
+ "Alt text. This text will be shown in case the image is not available."
527
+ ).optional().nullable()
528
+ }).describe("Image data (URL, size).")
529
+ }),
530
+ z.object({
531
+ image: z.never().optional(),
532
+ video: z.object({
533
+ files: z.array(
534
+ z.object({
535
+ url: z.string().describe("Media item URL.").url().optional(),
536
+ width: z.number().int().describe("Media item width.").min(0).optional(),
537
+ height: z.number().int().describe("Media item height.").min(0).optional(),
538
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
539
+ altText: z.string().describe(
540
+ "Alt text. This text will be shown in case the image is not available."
541
+ ).optional().nullable()
542
+ })
543
+ ).optional(),
544
+ stillFrameMediaId: z.string().describe(
545
+ 'ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.'
546
+ ).optional()
547
+ }).describe("Video data (URL, size).")
548
+ })
549
+ ])
550
+ )
551
+ ).optional()
552
+ }).describe(
553
+ "Media items (images, videos etc) associated with this collection. Read only."
554
+ ).optional(),
555
+ numberOfProducts: z.number().int().describe("Number of products in the collection. Read only.").optional(),
556
+ description: z.string().describe("Collection description.").min(0).max(600).optional().nullable(),
557
+ slug: z.string().describe("Collection slug.").min(1).max(100).optional().nullable(),
558
+ visible: z.boolean().describe(
559
+ "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`."
560
+ ).optional().nullable()
561
+ });
562
+ var GetCollectionBySlugRequest = z.object({
563
+ slug: z.string().describe("Slug of the collection to retrieve.").min(1).max(100)
564
+ });
565
+ var GetCollectionBySlugResponse = z.object({
566
+ collection: z.object({
567
+ _id: z.string().describe("Collection ID (generated automatically by the catalog).").min(35).max(36).optional().nullable(),
568
+ name: z.string().describe("Collection name.").min(1).max(50).optional().nullable(),
569
+ media: z.object({
570
+ mainMedia: z.intersection(
571
+ z.object({
572
+ thumbnail: z.object({
573
+ url: z.string().describe("Media item URL.").url().optional(),
574
+ width: z.number().int().describe("Media item width.").min(0).optional(),
575
+ height: z.number().int().describe("Media item height.").min(0).optional(),
576
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
577
+ altText: z.string().describe(
578
+ "Alt text. This text will be shown in case the image is not available."
579
+ ).optional().nullable()
580
+ }).describe("Media item thumbnail details.").optional(),
581
+ mediaType: z.enum([
582
+ "unspecified_media_item_type",
583
+ "image",
584
+ "video",
585
+ "audio",
586
+ "document",
587
+ "zip"
588
+ ]).describe("Media item type (image, video, etc.).").optional(),
589
+ title: z.string().describe("Media item title.").optional(),
590
+ _id: z.string().describe(
591
+ 'Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).'
592
+ ).optional()
593
+ }),
594
+ z.xor([
595
+ z.object({
596
+ image: z.never().optional(),
597
+ video: z.never().optional()
598
+ }),
599
+ z.object({
600
+ video: z.never().optional(),
601
+ image: z.object({
602
+ url: z.string().describe("Media item URL.").url().optional(),
603
+ width: z.number().int().describe("Media item width.").min(0).optional(),
604
+ height: z.number().int().describe("Media item height.").min(0).optional(),
605
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
606
+ altText: z.string().describe(
607
+ "Alt text. This text will be shown in case the image is not available."
608
+ ).optional().nullable()
609
+ }).describe("Image data (URL, size).")
610
+ }),
611
+ z.object({
612
+ image: z.never().optional(),
613
+ video: z.object({
614
+ files: z.array(
615
+ z.object({
616
+ url: z.string().describe("Media item URL.").url().optional(),
617
+ width: z.number().int().describe("Media item width.").min(0).optional(),
618
+ height: z.number().int().describe("Media item height.").min(0).optional(),
619
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
620
+ altText: z.string().describe(
621
+ "Alt text. This text will be shown in case the image is not available."
622
+ ).optional().nullable()
623
+ })
624
+ ).optional(),
625
+ stillFrameMediaId: z.string().describe(
626
+ 'ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.'
627
+ ).optional()
628
+ }).describe("Video data (URL, size).")
629
+ })
630
+ ])
631
+ ).describe(
632
+ "Primary media (image, video etc) associated with this product."
633
+ ).optional(),
634
+ items: z.array(
635
+ z.intersection(
636
+ z.object({
637
+ thumbnail: z.object({
638
+ url: z.string().describe("Media item URL.").url().optional(),
639
+ width: z.number().int().describe("Media item width.").min(0).optional(),
640
+ height: z.number().int().describe("Media item height.").min(0).optional(),
641
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
642
+ altText: z.string().describe(
643
+ "Alt text. This text will be shown in case the image is not available."
644
+ ).optional().nullable()
645
+ }).describe("Media item thumbnail details.").optional(),
646
+ mediaType: z.enum([
647
+ "unspecified_media_item_type",
648
+ "image",
649
+ "video",
650
+ "audio",
651
+ "document",
652
+ "zip"
653
+ ]).describe("Media item type (image, video, etc.).").optional(),
654
+ title: z.string().describe("Media item title.").optional(),
655
+ _id: z.string().describe(
656
+ 'Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).'
657
+ ).optional()
658
+ }),
659
+ z.xor([
660
+ z.object({
661
+ image: z.never().optional(),
662
+ video: z.never().optional()
663
+ }),
664
+ z.object({
665
+ video: z.never().optional(),
666
+ image: z.object({
667
+ url: z.string().describe("Media item URL.").url().optional(),
668
+ width: z.number().int().describe("Media item width.").min(0).optional(),
669
+ height: z.number().int().describe("Media item height.").min(0).optional(),
670
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
671
+ altText: z.string().describe(
672
+ "Alt text. This text will be shown in case the image is not available."
673
+ ).optional().nullable()
674
+ }).describe("Image data (URL, size).")
675
+ }),
676
+ z.object({
677
+ image: z.never().optional(),
678
+ video: z.object({
679
+ files: z.array(
680
+ z.object({
681
+ url: z.string().describe("Media item URL.").url().optional(),
682
+ width: z.number().int().describe("Media item width.").min(0).optional(),
683
+ height: z.number().int().describe("Media item height.").min(0).optional(),
684
+ format: z.string().describe("Media format (mp4, png, etc.).").optional().nullable(),
685
+ altText: z.string().describe(
686
+ "Alt text. This text will be shown in case the image is not available."
687
+ ).optional().nullable()
688
+ })
689
+ ).optional(),
690
+ stillFrameMediaId: z.string().describe(
691
+ 'ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.'
692
+ ).optional()
693
+ }).describe("Video data (URL, size).")
694
+ })
695
+ ])
696
+ )
697
+ ).optional()
698
+ }).describe(
699
+ "Media items (images, videos etc) associated with this collection. Read only."
700
+ ).optional(),
701
+ numberOfProducts: z.number().int().describe("Number of products in the collection. Read only.").optional(),
702
+ description: z.string().describe("Collection description.").min(0).max(600).optional().nullable(),
703
+ slug: z.string().describe("Collection slug.").min(1).max(100).optional().nullable(),
704
+ visible: z.boolean().describe(
705
+ "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`."
706
+ ).optional().nullable()
707
+ }).describe("The requested collection.").optional()
708
+ });
709
+
710
+ // src/stores-catalog-v1-collection-collections.universal.ts
200
711
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
201
712
  var MediaItemType = /* @__PURE__ */ ((MediaItemType2) => {
202
713
  MediaItemType2["unspecified_media_item_type"] = "unspecified_media_item_type";
@@ -256,7 +767,10 @@ function queryCollections2() {
256
767
  });
257
768
  }
258
769
  async function typedQueryCollections(query) {
259
- const { httpClient, sideEffects } = arguments[1];
770
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
771
+ if (validateRequestSchema) {
772
+ QueryCollectionsRequest.parse({ query });
773
+ }
260
774
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
261
775
  const reqOpts = queryCollections(payload);
262
776
  sideEffects?.onSiteCall?.();
@@ -284,7 +798,10 @@ var utils = {
284
798
  }
285
799
  };
286
800
  async function getCollection2(_id) {
287
- const { httpClient, sideEffects } = arguments[1];
801
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
802
+ if (validateRequestSchema) {
803
+ GetCollectionRequest.parse({ _id });
804
+ }
288
805
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
289
806
  const reqOpts = getCollection(payload);
290
807
  sideEffects?.onSiteCall?.();
@@ -307,7 +824,10 @@ async function getCollection2(_id) {
307
824
  }
308
825
  }
309
826
  async function getCollectionBySlug2(slug) {
310
- const { httpClient, sideEffects } = arguments[1];
827
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
828
+ if (validateRequestSchema) {
829
+ GetCollectionBySlugRequest.parse({ slug });
830
+ }
311
831
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ slug });
312
832
  const reqOpts = getCollectionBySlug(payload);
313
833
  sideEffects?.onSiteCall?.();