@wix/auto_sdk_stores_subscription-options 1.0.60 → 1.0.61

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.
@@ -415,6 +415,407 @@ function getOneTimePurchasesStatus(payload) {
415
415
  return __getOneTimePurchasesStatus;
416
416
  }
417
417
 
418
+ // src/stores-v1-subscription-option-subscription-options.schemas.ts
419
+ import * as z from "zod";
420
+ var CreateSubscriptionOptionRequest = z.object({
421
+ subscriptionOption: z.object({
422
+ _id: z.string().describe(
423
+ "Subscription option ID (auto-generated upon subscription option creation)."
424
+ ).regex(
425
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
426
+ "Must be a valid GUID"
427
+ ).optional().nullable(),
428
+ title: z.string().describe("Subscription option title.").min(1).max(20),
429
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
430
+ subscriptionSettings: z.object({
431
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
432
+ autoRenewal: z.boolean().describe(
433
+ "Whether subscription is renewed automatically at the end of each period."
434
+ ).optional(),
435
+ billingCycles: z.number().int().describe(
436
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
437
+ ).min(2).max(999).optional().nullable()
438
+ }).describe(
439
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
440
+ ),
441
+ discount: z.object({
442
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
443
+ value: z.number().describe("Discount value.").min(0).optional()
444
+ }).describe(
445
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
446
+ ).optional()
447
+ }).describe("Subscription option info.")
448
+ });
449
+ var CreateSubscriptionOptionResponse = z.object({
450
+ _id: z.string().describe(
451
+ "Subscription option ID (auto-generated upon subscription option creation)."
452
+ ).regex(
453
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
454
+ "Must be a valid GUID"
455
+ ).optional().nullable(),
456
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
457
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
458
+ subscriptionSettings: z.object({
459
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
460
+ autoRenewal: z.boolean().describe(
461
+ "Whether subscription is renewed automatically at the end of each period."
462
+ ).optional(),
463
+ billingCycles: z.number().int().describe(
464
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
465
+ ).min(2).max(999).optional().nullable()
466
+ }).describe(
467
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
468
+ ).optional(),
469
+ discount: z.object({
470
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
471
+ value: z.number().describe("Discount value.").min(0).optional()
472
+ }).describe(
473
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
474
+ ).optional()
475
+ });
476
+ var UpdateSubscriptionOptionRequest = z.object({
477
+ _id: z.string().describe(
478
+ "Subscription option ID (auto-generated upon subscription option creation)."
479
+ ).regex(
480
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
481
+ "Must be a valid GUID"
482
+ ),
483
+ subscriptionOption: z.object({
484
+ _id: z.string().describe(
485
+ "Subscription option ID (auto-generated upon subscription option creation)."
486
+ ).regex(
487
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
488
+ "Must be a valid GUID"
489
+ ).optional().nullable(),
490
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
491
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
492
+ subscriptionSettings: z.object({
493
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
494
+ autoRenewal: z.boolean().describe(
495
+ "Whether subscription is renewed automatically at the end of each period."
496
+ ).optional(),
497
+ billingCycles: z.number().int().describe(
498
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
499
+ ).min(2).max(999).optional().nullable()
500
+ }).describe(
501
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
502
+ ).optional(),
503
+ discount: z.object({
504
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
505
+ value: z.number().describe("Discount value.").min(0).optional()
506
+ }).describe(
507
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
508
+ ).optional()
509
+ }).describe("Subscription option update options.")
510
+ });
511
+ var UpdateSubscriptionOptionResponse = z.object({
512
+ _id: z.string().describe(
513
+ "Subscription option ID (auto-generated upon subscription option creation)."
514
+ ).regex(
515
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
516
+ "Must be a valid GUID"
517
+ ).optional().nullable(),
518
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
519
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
520
+ subscriptionSettings: z.object({
521
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
522
+ autoRenewal: z.boolean().describe(
523
+ "Whether subscription is renewed automatically at the end of each period."
524
+ ).optional(),
525
+ billingCycles: z.number().int().describe(
526
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
527
+ ).min(2).max(999).optional().nullable()
528
+ }).describe(
529
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
530
+ ).optional(),
531
+ discount: z.object({
532
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
533
+ value: z.number().describe("Discount value.").min(0).optional()
534
+ }).describe(
535
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
536
+ ).optional()
537
+ });
538
+ var DeleteSubscriptionOptionRequest = z.object({
539
+ _id: z.string().describe("ID of the subscription option to delete.").min(1).regex(
540
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
541
+ "Must be a valid GUID"
542
+ )
543
+ });
544
+ var DeleteSubscriptionOptionResponse = z.object({});
545
+ var BulkCreateSubscriptionOptionsRequest = z.object({
546
+ subscriptionOptions: z.array(
547
+ z.object({
548
+ _id: z.string().describe(
549
+ "Subscription option ID (auto-generated upon subscription option creation)."
550
+ ).regex(
551
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
552
+ "Must be a valid GUID"
553
+ ).optional().nullable(),
554
+ title: z.string().describe("Subscription option title.").min(1).max(20),
555
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
556
+ subscriptionSettings: z.object({
557
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
558
+ autoRenewal: z.boolean().describe(
559
+ "Whether subscription is renewed automatically at the end of each period."
560
+ ).optional(),
561
+ billingCycles: z.number().int().describe(
562
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
563
+ ).min(2).max(999).optional().nullable()
564
+ }).describe(
565
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
566
+ ),
567
+ discount: z.object({
568
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
569
+ value: z.number().describe("Discount value.").min(0).optional()
570
+ }).describe(
571
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
572
+ ).optional()
573
+ })
574
+ ).max(100)
575
+ });
576
+ var BulkCreateSubscriptionOptionsResponse = z.object({
577
+ subscriptionOptions: z.array(
578
+ z.object({
579
+ _id: z.string().describe(
580
+ "Subscription option ID (auto-generated upon subscription option creation)."
581
+ ).regex(
582
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
583
+ "Must be a valid GUID"
584
+ ).optional().nullable(),
585
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
586
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
587
+ subscriptionSettings: z.object({
588
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
589
+ autoRenewal: z.boolean().describe(
590
+ "Whether subscription is renewed automatically at the end of each period."
591
+ ).optional(),
592
+ billingCycles: z.number().int().describe(
593
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
594
+ ).min(2).max(999).optional().nullable()
595
+ }).describe(
596
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
597
+ ).optional(),
598
+ discount: z.object({
599
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
600
+ value: z.number().describe("Discount value.").min(0).optional()
601
+ }).describe(
602
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
603
+ ).optional()
604
+ })
605
+ ).optional()
606
+ });
607
+ var BulkUpdateSubscriptionOptionsRequest = z.object({
608
+ subscriptionOptions: z.array(
609
+ z.object({
610
+ _id: z.string().describe(
611
+ "Subscription option ID (auto-generated upon subscription option creation)."
612
+ ).regex(
613
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
614
+ "Must be a valid GUID"
615
+ ),
616
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
617
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
618
+ subscriptionSettings: z.object({
619
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
620
+ autoRenewal: z.boolean().describe(
621
+ "Whether subscription is renewed automatically at the end of each period."
622
+ ).optional(),
623
+ billingCycles: z.number().int().describe(
624
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
625
+ ).min(2).max(999).optional().nullable()
626
+ }).describe(
627
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
628
+ ).optional(),
629
+ discount: z.object({
630
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
631
+ value: z.number().describe("Discount value.").min(0).optional()
632
+ }).describe(
633
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
634
+ ).optional()
635
+ })
636
+ ).max(100)
637
+ });
638
+ var BulkUpdateSubscriptionOptionsResponse = z.object({
639
+ subscriptionOptions: z.array(
640
+ z.object({
641
+ _id: z.string().describe(
642
+ "Subscription option ID (auto-generated upon subscription option creation)."
643
+ ).regex(
644
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
645
+ "Must be a valid GUID"
646
+ ).optional().nullable(),
647
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
648
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
649
+ subscriptionSettings: z.object({
650
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
651
+ autoRenewal: z.boolean().describe(
652
+ "Whether subscription is renewed automatically at the end of each period."
653
+ ).optional(),
654
+ billingCycles: z.number().int().describe(
655
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
656
+ ).min(2).max(999).optional().nullable()
657
+ }).describe(
658
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
659
+ ).optional(),
660
+ discount: z.object({
661
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
662
+ value: z.number().describe("Discount value.").min(0).optional()
663
+ }).describe(
664
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
665
+ ).optional()
666
+ })
667
+ ).optional()
668
+ });
669
+ var BulkDeleteSubscriptionOptionsRequest = z.object({
670
+ ids: z.array(z.string()).max(100)
671
+ });
672
+ var BulkDeleteSubscriptionOptionsResponse = z.object({});
673
+ var AssignSubscriptionOptionsToProductRequest = z.object({
674
+ productId: z.string().describe("Product ID.").min(1),
675
+ options: z.object({
676
+ assignedSubscriptionOptions: z.array(
677
+ z.object({
678
+ _id: z.string().describe("Subscription option ID.").regex(
679
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
680
+ "Must be a valid GUID"
681
+ ).optional(),
682
+ hidden: z.boolean().describe(
683
+ "Whether the subscription option is hidden for the product (the default is false)."
684
+ ).optional(),
685
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
686
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
687
+ subscriptionSettings: z.object({
688
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
689
+ autoRenewal: z.boolean().describe(
690
+ "Whether subscription is renewed automatically at the end of each period."
691
+ ).optional(),
692
+ billingCycles: z.number().int().describe(
693
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
694
+ ).min(2).max(999).optional().nullable()
695
+ }).describe(
696
+ "Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
697
+ ).optional(),
698
+ discount: z.object({
699
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
700
+ value: z.number().describe("Discount value.").min(0).optional()
701
+ }).describe("Discount info (optional).").optional()
702
+ })
703
+ ).max(6).optional()
704
+ }).describe("Subscription option assignment options.").optional()
705
+ });
706
+ var AssignSubscriptionOptionsToProductResponse = z.object({});
707
+ var AllowOneTimePurchasesRequest = z.object({
708
+ productId: z.string().describe("Product ID.").min(1),
709
+ allowed: z.boolean().describe(
710
+ "Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only."
711
+ )
712
+ });
713
+ var AllowOneTimePurchasesResponse = z.object({});
714
+ var GetSubscriptionOptionRequest = z.object({
715
+ _id: z.string().describe("Subscription option ID.").min(1).regex(
716
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
717
+ "Must be a valid GUID"
718
+ )
719
+ });
720
+ var GetSubscriptionOptionResponse = z.object({
721
+ _id: z.string().describe(
722
+ "Subscription option ID (auto-generated upon subscription option creation)."
723
+ ).regex(
724
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
725
+ "Must be a valid GUID"
726
+ ).optional().nullable(),
727
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
728
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
729
+ subscriptionSettings: z.object({
730
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
731
+ autoRenewal: z.boolean().describe(
732
+ "Whether subscription is renewed automatically at the end of each period."
733
+ ).optional(),
734
+ billingCycles: z.number().int().describe(
735
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
736
+ ).min(2).max(999).optional().nullable()
737
+ }).describe(
738
+ "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
739
+ ).optional(),
740
+ discount: z.object({
741
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
742
+ value: z.number().describe("Discount value.").min(0).optional()
743
+ }).describe(
744
+ "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
745
+ ).optional()
746
+ });
747
+ var GetSubscriptionOptionsForProductRequest = z.object({
748
+ productId: z.string().describe("Product ID.").min(1),
749
+ options: z.object({
750
+ includeHiddenSubscriptionOptions: z.boolean().describe(
751
+ "Whether to include hidden subscription options in the results."
752
+ ).optional()
753
+ }).describe("Options.").optional()
754
+ });
755
+ var GetSubscriptionOptionsForProductResponse = z.object({
756
+ subscriptionOptions: z.array(
757
+ z.object({
758
+ _id: z.string().describe("Subscription option ID.").regex(
759
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
760
+ "Must be a valid GUID"
761
+ ).optional(),
762
+ hidden: z.boolean().describe(
763
+ "Whether the subscription option is hidden for the product (the default is false)."
764
+ ).optional(),
765
+ title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
766
+ description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
767
+ subscriptionSettings: z.object({
768
+ frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
769
+ autoRenewal: z.boolean().describe(
770
+ "Whether subscription is renewed automatically at the end of each period."
771
+ ).optional(),
772
+ billingCycles: z.number().int().describe(
773
+ "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
774
+ ).min(2).max(999).optional().nullable()
775
+ }).describe(
776
+ "Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
777
+ ).optional(),
778
+ discount: z.object({
779
+ type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
780
+ value: z.number().describe("Discount value.").min(0).optional()
781
+ }).describe("Discount info (optional).").optional()
782
+ })
783
+ ).optional()
784
+ });
785
+ var GetProductIdsForSubscriptionOptionRequest = z.object({
786
+ _id: z.string().describe("Subscription option ID.").min(1).regex(
787
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
788
+ "Must be a valid GUID"
789
+ ),
790
+ options: z.object({
791
+ includeHiddenProducts: z.boolean().describe("Whether to include hidden products in the returned results.").optional(),
792
+ paging: z.object({
793
+ limit: z.number().int().describe("Amount of items to load per page.").min(0).max(100).optional().nullable(),
794
+ offset: z.number().int().describe(
795
+ "Number of items to skip in the display (relevant for all pages after the first)."
796
+ ).min(0).optional().nullable()
797
+ }).describe("Optional pagination parameters").optional()
798
+ }).describe("Paging and other options.").optional()
799
+ });
800
+ var GetProductIdsForSubscriptionOptionResponse = z.object({
801
+ productIds: z.array(z.string()).optional(),
802
+ metadata: z.object({
803
+ items: z.number().int().describe("Amount of items to load per page.").optional(),
804
+ offset: z.number().int().describe(
805
+ "Number of items to skip in the display (relevant for all pages after the first)."
806
+ ).optional()
807
+ }).describe("Paging metadata.").optional(),
808
+ totalResults: z.number().int().describe("Number of total results.").optional()
809
+ });
810
+ var GetOneTimePurchasesStatusRequest = z.object({
811
+ productId: z.string().describe("Product ID.").min(1)
812
+ });
813
+ var GetOneTimePurchasesStatusResponse = z.object({
814
+ allowed: z.boolean().describe(
815
+ "Whether the specified product is available for one-time purchase"
816
+ ).optional()
817
+ });
818
+
418
819
  // src/stores-v1-subscription-option-subscription-options.universal.ts
419
820
  var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
420
821
  SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
@@ -431,7 +832,10 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
431
832
  return DiscountType2;
432
833
  })(DiscountType || {});
433
834
  async function createSubscriptionOption2(subscriptionOption) {
434
- const { httpClient, sideEffects } = arguments[1];
835
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
836
+ if (validateRequestSchema) {
837
+ CreateSubscriptionOptionRequest.parse({ subscriptionOption });
838
+ }
435
839
  const payload = renameKeysFromSDKRequestToRESTRequest({
436
840
  subscriptionOption
437
841
  });
@@ -456,7 +860,10 @@ async function createSubscriptionOption2(subscriptionOption) {
456
860
  }
457
861
  }
458
862
  async function updateSubscriptionOption2(_id, subscriptionOption) {
459
- const { httpClient, sideEffects } = arguments[2];
863
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
864
+ if (validateRequestSchema) {
865
+ UpdateSubscriptionOptionRequest.parse({ _id, subscriptionOption });
866
+ }
460
867
  const payload = renameKeysFromSDKRequestToRESTRequest({
461
868
  subscriptionOption: { ...subscriptionOption, id: _id }
462
869
  });
@@ -481,7 +888,10 @@ async function updateSubscriptionOption2(_id, subscriptionOption) {
481
888
  }
482
889
  }
483
890
  async function deleteSubscriptionOption2(_id) {
484
- const { httpClient, sideEffects } = arguments[1];
891
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
892
+ if (validateRequestSchema) {
893
+ DeleteSubscriptionOptionRequest.parse({ _id });
894
+ }
485
895
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
486
896
  const reqOpts = deleteSubscriptionOption(payload);
487
897
  sideEffects?.onSiteCall?.();
@@ -503,7 +913,10 @@ async function deleteSubscriptionOption2(_id) {
503
913
  }
504
914
  }
505
915
  async function bulkCreateSubscriptionOptions2(subscriptionOptions) {
506
- const { httpClient, sideEffects } = arguments[1];
916
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
917
+ if (validateRequestSchema) {
918
+ BulkCreateSubscriptionOptionsRequest.parse({ subscriptionOptions });
919
+ }
507
920
  const payload = renameKeysFromSDKRequestToRESTRequest({
508
921
  subscriptionOptions
509
922
  });
@@ -530,7 +943,10 @@ async function bulkCreateSubscriptionOptions2(subscriptionOptions) {
530
943
  }
531
944
  }
532
945
  async function bulkUpdateSubscriptionOptions2(subscriptionOptions) {
533
- const { httpClient, sideEffects } = arguments[1];
946
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
947
+ if (validateRequestSchema) {
948
+ BulkUpdateSubscriptionOptionsRequest.parse({ subscriptionOptions });
949
+ }
534
950
  const payload = renameKeysFromSDKRequestToRESTRequest({
535
951
  subscriptionOptions
536
952
  });
@@ -557,7 +973,10 @@ async function bulkUpdateSubscriptionOptions2(subscriptionOptions) {
557
973
  }
558
974
  }
559
975
  async function bulkDeleteSubscriptionOptions2(ids) {
560
- const { httpClient, sideEffects } = arguments[1];
976
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
977
+ if (validateRequestSchema) {
978
+ BulkDeleteSubscriptionOptionsRequest.parse({ ids });
979
+ }
561
980
  const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
562
981
  const reqOpts = bulkDeleteSubscriptionOptions(
563
982
  payload
@@ -581,7 +1000,13 @@ async function bulkDeleteSubscriptionOptions2(ids) {
581
1000
  }
582
1001
  }
583
1002
  async function assignSubscriptionOptionsToProduct2(productId, options) {
584
- const { httpClient, sideEffects } = arguments[2];
1003
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1004
+ if (validateRequestSchema) {
1005
+ AssignSubscriptionOptionsToProductRequest.parse({
1006
+ productId,
1007
+ options
1008
+ });
1009
+ }
585
1010
  const payload = renameKeysFromSDKRequestToRESTRequest({
586
1011
  productId,
587
1012
  assignedSubscriptionOptions: options?.assignedSubscriptionOptions
@@ -611,7 +1036,10 @@ async function assignSubscriptionOptionsToProduct2(productId, options) {
611
1036
  }
612
1037
  }
613
1038
  async function allowOneTimePurchases2(productId, allowed) {
614
- const { httpClient, sideEffects } = arguments[2];
1039
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1040
+ if (validateRequestSchema) {
1041
+ AllowOneTimePurchasesRequest.parse({ productId, allowed });
1042
+ }
615
1043
  const payload = renameKeysFromSDKRequestToRESTRequest({
616
1044
  productId,
617
1045
  allowed
@@ -636,7 +1064,10 @@ async function allowOneTimePurchases2(productId, allowed) {
636
1064
  }
637
1065
  }
638
1066
  async function getSubscriptionOption2(_id) {
639
- const { httpClient, sideEffects } = arguments[1];
1067
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1068
+ if (validateRequestSchema) {
1069
+ GetSubscriptionOptionRequest.parse({ _id });
1070
+ }
640
1071
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
641
1072
  const reqOpts = getSubscriptionOption(payload);
642
1073
  sideEffects?.onSiteCall?.();
@@ -659,7 +1090,10 @@ async function getSubscriptionOption2(_id) {
659
1090
  }
660
1091
  }
661
1092
  async function getSubscriptionOptionsForProduct2(productId, options) {
662
- const { httpClient, sideEffects } = arguments[2];
1093
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1094
+ if (validateRequestSchema) {
1095
+ GetSubscriptionOptionsForProductRequest.parse({ productId, options });
1096
+ }
663
1097
  const payload = renameKeysFromSDKRequestToRESTRequest({
664
1098
  productId,
665
1099
  includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
@@ -690,7 +1124,10 @@ async function getSubscriptionOptionsForProduct2(productId, options) {
690
1124
  }
691
1125
  }
692
1126
  async function getProductIdsForSubscriptionOption2(_id, options) {
693
- const { httpClient, sideEffects } = arguments[2];
1127
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1128
+ if (validateRequestSchema) {
1129
+ GetProductIdsForSubscriptionOptionRequest.parse({ _id, options });
1130
+ }
694
1131
  const payload = renameKeysFromSDKRequestToRESTRequest({
695
1132
  id: _id,
696
1133
  includeHiddenProducts: options?.includeHiddenProducts,
@@ -723,7 +1160,10 @@ async function getProductIdsForSubscriptionOption2(_id, options) {
723
1160
  }
724
1161
  }
725
1162
  async function getOneTimePurchasesStatus2(productId) {
726
- const { httpClient, sideEffects } = arguments[1];
1163
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1164
+ if (validateRequestSchema) {
1165
+ GetOneTimePurchasesStatusRequest.parse({ productId });
1166
+ }
727
1167
  const payload = renameKeysFromSDKRequestToRESTRequest({
728
1168
  productId
729
1169
  });
@@ -749,93 +1189,93 @@ async function getOneTimePurchasesStatus2(productId) {
749
1189
  }
750
1190
 
751
1191
  // src/stores-v1-subscription-option-subscription-options.public.ts
752
- function createSubscriptionOption3(httpClient) {
1192
+ function createSubscriptionOption3(httpClient, __options) {
753
1193
  return (subscriptionOption) => createSubscriptionOption2(
754
1194
  subscriptionOption,
755
1195
  // @ts-ignore
756
- { httpClient }
1196
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
757
1197
  );
758
1198
  }
759
- function updateSubscriptionOption3(httpClient) {
1199
+ function updateSubscriptionOption3(httpClient, __options) {
760
1200
  return (_id, subscriptionOption) => updateSubscriptionOption2(
761
1201
  _id,
762
1202
  subscriptionOption,
763
1203
  // @ts-ignore
764
- { httpClient }
1204
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
765
1205
  );
766
1206
  }
767
- function deleteSubscriptionOption3(httpClient) {
1207
+ function deleteSubscriptionOption3(httpClient, __options) {
768
1208
  return (_id) => deleteSubscriptionOption2(
769
1209
  _id,
770
1210
  // @ts-ignore
771
- { httpClient }
1211
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
772
1212
  );
773
1213
  }
774
- function bulkCreateSubscriptionOptions3(httpClient) {
1214
+ function bulkCreateSubscriptionOptions3(httpClient, __options) {
775
1215
  return (subscriptionOptions) => bulkCreateSubscriptionOptions2(
776
1216
  subscriptionOptions,
777
1217
  // @ts-ignore
778
- { httpClient }
1218
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
779
1219
  );
780
1220
  }
781
- function bulkUpdateSubscriptionOptions3(httpClient) {
1221
+ function bulkUpdateSubscriptionOptions3(httpClient, __options) {
782
1222
  return (subscriptionOptions) => bulkUpdateSubscriptionOptions2(
783
1223
  subscriptionOptions,
784
1224
  // @ts-ignore
785
- { httpClient }
1225
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
786
1226
  );
787
1227
  }
788
- function bulkDeleteSubscriptionOptions3(httpClient) {
1228
+ function bulkDeleteSubscriptionOptions3(httpClient, __options) {
789
1229
  return (ids) => bulkDeleteSubscriptionOptions2(
790
1230
  ids,
791
1231
  // @ts-ignore
792
- { httpClient }
1232
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
793
1233
  );
794
1234
  }
795
- function assignSubscriptionOptionsToProduct3(httpClient) {
1235
+ function assignSubscriptionOptionsToProduct3(httpClient, __options) {
796
1236
  return (productId, options) => assignSubscriptionOptionsToProduct2(
797
1237
  productId,
798
1238
  options,
799
1239
  // @ts-ignore
800
- { httpClient }
1240
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
801
1241
  );
802
1242
  }
803
- function allowOneTimePurchases3(httpClient) {
1243
+ function allowOneTimePurchases3(httpClient, __options) {
804
1244
  return (productId, allowed) => allowOneTimePurchases2(
805
1245
  productId,
806
1246
  allowed,
807
1247
  // @ts-ignore
808
- { httpClient }
1248
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
809
1249
  );
810
1250
  }
811
- function getSubscriptionOption3(httpClient) {
1251
+ function getSubscriptionOption3(httpClient, __options) {
812
1252
  return (_id) => getSubscriptionOption2(
813
1253
  _id,
814
1254
  // @ts-ignore
815
- { httpClient }
1255
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
816
1256
  );
817
1257
  }
818
- function getSubscriptionOptionsForProduct3(httpClient) {
1258
+ function getSubscriptionOptionsForProduct3(httpClient, __options) {
819
1259
  return (productId, options) => getSubscriptionOptionsForProduct2(
820
1260
  productId,
821
1261
  options,
822
1262
  // @ts-ignore
823
- { httpClient }
1263
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
824
1264
  );
825
1265
  }
826
- function getProductIdsForSubscriptionOption3(httpClient) {
1266
+ function getProductIdsForSubscriptionOption3(httpClient, __options) {
827
1267
  return (_id, options) => getProductIdsForSubscriptionOption2(
828
1268
  _id,
829
1269
  options,
830
1270
  // @ts-ignore
831
- { httpClient }
1271
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
832
1272
  );
833
1273
  }
834
- function getOneTimePurchasesStatus3(httpClient) {
1274
+ function getOneTimePurchasesStatus3(httpClient, __options) {
835
1275
  return (productId) => getOneTimePurchasesStatus2(
836
1276
  productId,
837
1277
  // @ts-ignore
838
- { httpClient }
1278
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
839
1279
  );
840
1280
  }
841
1281