@wix/auto_sdk_stores_subscription-options 1.0.61 → 1.0.62

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,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
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
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // index.typings.ts
@@ -461,407 +451,6 @@ function getOneTimePurchasesStatus(payload) {
461
451
  return __getOneTimePurchasesStatus;
462
452
  }
463
453
 
464
- // src/stores-v1-subscription-option-subscription-options.schemas.ts
465
- var z = __toESM(require("zod"));
466
- var CreateSubscriptionOptionRequest = z.object({
467
- subscriptionOption: z.object({
468
- _id: z.string().describe(
469
- "Subscription option ID (auto-generated upon subscription option creation)."
470
- ).regex(
471
- /^[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}$/,
472
- "Must be a valid GUID"
473
- ).optional().nullable(),
474
- title: z.string().describe("Subscription option title.").min(1).max(20),
475
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
476
- subscriptionSettings: z.object({
477
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
478
- autoRenewal: z.boolean().describe(
479
- "Whether subscription is renewed automatically at the end of each period."
480
- ).optional(),
481
- billingCycles: z.number().int().describe(
482
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
483
- ).min(2).max(999).optional().nullable()
484
- }).describe(
485
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
486
- ),
487
- discount: z.object({
488
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
489
- value: z.number().describe("Discount value.").min(0).optional()
490
- }).describe(
491
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
492
- ).optional()
493
- }).describe("Subscription option info.")
494
- });
495
- var CreateSubscriptionOptionResponse = z.object({
496
- _id: z.string().describe(
497
- "Subscription option ID (auto-generated upon subscription option creation)."
498
- ).regex(
499
- /^[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}$/,
500
- "Must be a valid GUID"
501
- ).optional().nullable(),
502
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
503
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
504
- subscriptionSettings: z.object({
505
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
506
- autoRenewal: z.boolean().describe(
507
- "Whether subscription is renewed automatically at the end of each period."
508
- ).optional(),
509
- billingCycles: z.number().int().describe(
510
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
511
- ).min(2).max(999).optional().nullable()
512
- }).describe(
513
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
514
- ).optional(),
515
- discount: z.object({
516
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
517
- value: z.number().describe("Discount value.").min(0).optional()
518
- }).describe(
519
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
520
- ).optional()
521
- });
522
- var UpdateSubscriptionOptionRequest = z.object({
523
- _id: z.string().describe(
524
- "Subscription option ID (auto-generated upon subscription option creation)."
525
- ).regex(
526
- /^[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}$/,
527
- "Must be a valid GUID"
528
- ),
529
- subscriptionOption: z.object({
530
- _id: z.string().describe(
531
- "Subscription option ID (auto-generated upon subscription option creation)."
532
- ).regex(
533
- /^[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}$/,
534
- "Must be a valid GUID"
535
- ).optional().nullable(),
536
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
537
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
538
- subscriptionSettings: z.object({
539
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
540
- autoRenewal: z.boolean().describe(
541
- "Whether subscription is renewed automatically at the end of each period."
542
- ).optional(),
543
- billingCycles: z.number().int().describe(
544
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
545
- ).min(2).max(999).optional().nullable()
546
- }).describe(
547
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
548
- ).optional(),
549
- discount: z.object({
550
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
551
- value: z.number().describe("Discount value.").min(0).optional()
552
- }).describe(
553
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
554
- ).optional()
555
- }).describe("Subscription option update options.")
556
- });
557
- var UpdateSubscriptionOptionResponse = z.object({
558
- _id: z.string().describe(
559
- "Subscription option ID (auto-generated upon subscription option creation)."
560
- ).regex(
561
- /^[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}$/,
562
- "Must be a valid GUID"
563
- ).optional().nullable(),
564
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
565
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
566
- subscriptionSettings: z.object({
567
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
568
- autoRenewal: z.boolean().describe(
569
- "Whether subscription is renewed automatically at the end of each period."
570
- ).optional(),
571
- billingCycles: z.number().int().describe(
572
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
573
- ).min(2).max(999).optional().nullable()
574
- }).describe(
575
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
576
- ).optional(),
577
- discount: z.object({
578
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
579
- value: z.number().describe("Discount value.").min(0).optional()
580
- }).describe(
581
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
582
- ).optional()
583
- });
584
- var DeleteSubscriptionOptionRequest = z.object({
585
- _id: z.string().describe("ID of the subscription option to delete.").min(1).regex(
586
- /^[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}$/,
587
- "Must be a valid GUID"
588
- )
589
- });
590
- var DeleteSubscriptionOptionResponse = z.object({});
591
- var BulkCreateSubscriptionOptionsRequest = z.object({
592
- subscriptionOptions: z.array(
593
- z.object({
594
- _id: z.string().describe(
595
- "Subscription option ID (auto-generated upon subscription option creation)."
596
- ).regex(
597
- /^[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}$/,
598
- "Must be a valid GUID"
599
- ).optional().nullable(),
600
- title: z.string().describe("Subscription option title.").min(1).max(20),
601
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
602
- subscriptionSettings: z.object({
603
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
604
- autoRenewal: z.boolean().describe(
605
- "Whether subscription is renewed automatically at the end of each period."
606
- ).optional(),
607
- billingCycles: z.number().int().describe(
608
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
609
- ).min(2).max(999).optional().nullable()
610
- }).describe(
611
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
612
- ),
613
- discount: z.object({
614
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
615
- value: z.number().describe("Discount value.").min(0).optional()
616
- }).describe(
617
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
618
- ).optional()
619
- })
620
- ).max(100)
621
- });
622
- var BulkCreateSubscriptionOptionsResponse = z.object({
623
- subscriptionOptions: z.array(
624
- z.object({
625
- _id: z.string().describe(
626
- "Subscription option ID (auto-generated upon subscription option creation)."
627
- ).regex(
628
- /^[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}$/,
629
- "Must be a valid GUID"
630
- ).optional().nullable(),
631
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
632
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
633
- subscriptionSettings: z.object({
634
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
635
- autoRenewal: z.boolean().describe(
636
- "Whether subscription is renewed automatically at the end of each period."
637
- ).optional(),
638
- billingCycles: z.number().int().describe(
639
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
640
- ).min(2).max(999).optional().nullable()
641
- }).describe(
642
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
643
- ).optional(),
644
- discount: z.object({
645
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
646
- value: z.number().describe("Discount value.").min(0).optional()
647
- }).describe(
648
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
649
- ).optional()
650
- })
651
- ).optional()
652
- });
653
- var BulkUpdateSubscriptionOptionsRequest = z.object({
654
- subscriptionOptions: z.array(
655
- z.object({
656
- _id: z.string().describe(
657
- "Subscription option ID (auto-generated upon subscription option creation)."
658
- ).regex(
659
- /^[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}$/,
660
- "Must be a valid GUID"
661
- ),
662
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
663
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
664
- subscriptionSettings: z.object({
665
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
666
- autoRenewal: z.boolean().describe(
667
- "Whether subscription is renewed automatically at the end of each period."
668
- ).optional(),
669
- billingCycles: z.number().int().describe(
670
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
671
- ).min(2).max(999).optional().nullable()
672
- }).describe(
673
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
674
- ).optional(),
675
- discount: z.object({
676
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
677
- value: z.number().describe("Discount value.").min(0).optional()
678
- }).describe(
679
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
680
- ).optional()
681
- })
682
- ).max(100)
683
- });
684
- var BulkUpdateSubscriptionOptionsResponse = z.object({
685
- subscriptionOptions: z.array(
686
- z.object({
687
- _id: z.string().describe(
688
- "Subscription option ID (auto-generated upon subscription option creation)."
689
- ).regex(
690
- /^[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}$/,
691
- "Must be a valid GUID"
692
- ).optional().nullable(),
693
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
694
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
695
- subscriptionSettings: z.object({
696
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
697
- autoRenewal: z.boolean().describe(
698
- "Whether subscription is renewed automatically at the end of each period."
699
- ).optional(),
700
- billingCycles: z.number().int().describe(
701
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
702
- ).min(2).max(999).optional().nullable()
703
- }).describe(
704
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
705
- ).optional(),
706
- discount: z.object({
707
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
708
- value: z.number().describe("Discount value.").min(0).optional()
709
- }).describe(
710
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
711
- ).optional()
712
- })
713
- ).optional()
714
- });
715
- var BulkDeleteSubscriptionOptionsRequest = z.object({
716
- ids: z.array(z.string()).max(100)
717
- });
718
- var BulkDeleteSubscriptionOptionsResponse = z.object({});
719
- var AssignSubscriptionOptionsToProductRequest = z.object({
720
- productId: z.string().describe("Product ID.").min(1),
721
- options: z.object({
722
- assignedSubscriptionOptions: z.array(
723
- z.object({
724
- _id: z.string().describe("Subscription option ID.").regex(
725
- /^[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}$/,
726
- "Must be a valid GUID"
727
- ).optional(),
728
- hidden: z.boolean().describe(
729
- "Whether the subscription option is hidden for the product (the default is false)."
730
- ).optional(),
731
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
732
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
733
- subscriptionSettings: z.object({
734
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
735
- autoRenewal: z.boolean().describe(
736
- "Whether subscription is renewed automatically at the end of each period."
737
- ).optional(),
738
- billingCycles: z.number().int().describe(
739
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
740
- ).min(2).max(999).optional().nullable()
741
- }).describe(
742
- "Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
743
- ).optional(),
744
- discount: z.object({
745
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
746
- value: z.number().describe("Discount value.").min(0).optional()
747
- }).describe("Discount info (optional).").optional()
748
- })
749
- ).max(6).optional()
750
- }).describe("Subscription option assignment options.").optional()
751
- });
752
- var AssignSubscriptionOptionsToProductResponse = z.object({});
753
- var AllowOneTimePurchasesRequest = z.object({
754
- productId: z.string().describe("Product ID.").min(1),
755
- allowed: z.boolean().describe(
756
- "Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only."
757
- )
758
- });
759
- var AllowOneTimePurchasesResponse = z.object({});
760
- var GetSubscriptionOptionRequest = z.object({
761
- _id: z.string().describe("Subscription option ID.").min(1).regex(
762
- /^[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}$/,
763
- "Must be a valid GUID"
764
- )
765
- });
766
- var GetSubscriptionOptionResponse = z.object({
767
- _id: z.string().describe(
768
- "Subscription option ID (auto-generated upon subscription option creation)."
769
- ).regex(
770
- /^[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}$/,
771
- "Must be a valid GUID"
772
- ).optional().nullable(),
773
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
774
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
775
- subscriptionSettings: z.object({
776
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
777
- autoRenewal: z.boolean().describe(
778
- "Whether subscription is renewed automatically at the end of each period."
779
- ).optional(),
780
- billingCycles: z.number().int().describe(
781
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
782
- ).min(2).max(999).optional().nullable()
783
- }).describe(
784
- "Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
785
- ).optional(),
786
- discount: z.object({
787
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
788
- value: z.number().describe("Discount value.").min(0).optional()
789
- }).describe(
790
- "Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
791
- ).optional()
792
- });
793
- var GetSubscriptionOptionsForProductRequest = z.object({
794
- productId: z.string().describe("Product ID.").min(1),
795
- options: z.object({
796
- includeHiddenSubscriptionOptions: z.boolean().describe(
797
- "Whether to include hidden subscription options in the results."
798
- ).optional()
799
- }).describe("Options.").optional()
800
- });
801
- var GetSubscriptionOptionsForProductResponse = z.object({
802
- subscriptionOptions: z.array(
803
- z.object({
804
- _id: z.string().describe("Subscription option ID.").regex(
805
- /^[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}$/,
806
- "Must be a valid GUID"
807
- ).optional(),
808
- hidden: z.boolean().describe(
809
- "Whether the subscription option is hidden for the product (the default is false)."
810
- ).optional(),
811
- title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
812
- description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
813
- subscriptionSettings: z.object({
814
- frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
815
- autoRenewal: z.boolean().describe(
816
- "Whether subscription is renewed automatically at the end of each period."
817
- ).optional(),
818
- billingCycles: z.number().int().describe(
819
- "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
820
- ).min(2).max(999).optional().nullable()
821
- }).describe(
822
- "Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
823
- ).optional(),
824
- discount: z.object({
825
- type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
826
- value: z.number().describe("Discount value.").min(0).optional()
827
- }).describe("Discount info (optional).").optional()
828
- })
829
- ).optional()
830
- });
831
- var GetProductIdsForSubscriptionOptionRequest = z.object({
832
- _id: z.string().describe("Subscription option ID.").min(1).regex(
833
- /^[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}$/,
834
- "Must be a valid GUID"
835
- ),
836
- options: z.object({
837
- includeHiddenProducts: z.boolean().describe("Whether to include hidden products in the returned results.").optional(),
838
- paging: z.object({
839
- limit: z.number().int().describe("Amount of items to load per page.").min(0).max(100).optional().nullable(),
840
- offset: z.number().int().describe(
841
- "Number of items to skip in the display (relevant for all pages after the first)."
842
- ).min(0).optional().nullable()
843
- }).describe("Optional pagination parameters").optional()
844
- }).describe("Paging and other options.").optional()
845
- });
846
- var GetProductIdsForSubscriptionOptionResponse = z.object({
847
- productIds: z.array(z.string()).optional(),
848
- metadata: z.object({
849
- items: z.number().int().describe("Amount of items to load per page.").optional(),
850
- offset: z.number().int().describe(
851
- "Number of items to skip in the display (relevant for all pages after the first)."
852
- ).optional()
853
- }).describe("Paging metadata.").optional(),
854
- totalResults: z.number().int().describe("Number of total results.").optional()
855
- });
856
- var GetOneTimePurchasesStatusRequest = z.object({
857
- productId: z.string().describe("Product ID.").min(1)
858
- });
859
- var GetOneTimePurchasesStatusResponse = z.object({
860
- allowed: z.boolean().describe(
861
- "Whether the specified product is available for one-time purchase"
862
- ).optional()
863
- });
864
-
865
454
  // src/stores-v1-subscription-option-subscription-options.universal.ts
866
455
  var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
867
456
  SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
@@ -878,10 +467,7 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
878
467
  return DiscountType2;
879
468
  })(DiscountType || {});
880
469
  async function createSubscriptionOption2(subscriptionOption) {
881
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
882
- if (validateRequestSchema) {
883
- CreateSubscriptionOptionRequest.parse({ subscriptionOption });
884
- }
470
+ const { httpClient, sideEffects } = arguments[1];
885
471
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
886
472
  subscriptionOption
887
473
  });
@@ -906,10 +492,7 @@ async function createSubscriptionOption2(subscriptionOption) {
906
492
  }
907
493
  }
908
494
  async function updateSubscriptionOption2(_id, subscriptionOption) {
909
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
910
- if (validateRequestSchema) {
911
- UpdateSubscriptionOptionRequest.parse({ _id, subscriptionOption });
912
- }
495
+ const { httpClient, sideEffects } = arguments[2];
913
496
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
914
497
  subscriptionOption: { ...subscriptionOption, id: _id }
915
498
  });
@@ -934,10 +517,7 @@ async function updateSubscriptionOption2(_id, subscriptionOption) {
934
517
  }
935
518
  }
936
519
  async function deleteSubscriptionOption2(_id) {
937
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
938
- if (validateRequestSchema) {
939
- DeleteSubscriptionOptionRequest.parse({ _id });
940
- }
520
+ const { httpClient, sideEffects } = arguments[1];
941
521
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
942
522
  const reqOpts = deleteSubscriptionOption(payload);
943
523
  sideEffects?.onSiteCall?.();
@@ -959,10 +539,7 @@ async function deleteSubscriptionOption2(_id) {
959
539
  }
960
540
  }
961
541
  async function bulkCreateSubscriptionOptions2(subscriptionOptions) {
962
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
963
- if (validateRequestSchema) {
964
- BulkCreateSubscriptionOptionsRequest.parse({ subscriptionOptions });
965
- }
542
+ const { httpClient, sideEffects } = arguments[1];
966
543
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
967
544
  subscriptionOptions
968
545
  });
@@ -989,10 +566,7 @@ async function bulkCreateSubscriptionOptions2(subscriptionOptions) {
989
566
  }
990
567
  }
991
568
  async function bulkUpdateSubscriptionOptions2(subscriptionOptions) {
992
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
993
- if (validateRequestSchema) {
994
- BulkUpdateSubscriptionOptionsRequest.parse({ subscriptionOptions });
995
- }
569
+ const { httpClient, sideEffects } = arguments[1];
996
570
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
997
571
  subscriptionOptions
998
572
  });
@@ -1019,10 +593,7 @@ async function bulkUpdateSubscriptionOptions2(subscriptionOptions) {
1019
593
  }
1020
594
  }
1021
595
  async function bulkDeleteSubscriptionOptions2(ids) {
1022
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1023
- if (validateRequestSchema) {
1024
- BulkDeleteSubscriptionOptionsRequest.parse({ ids });
1025
- }
596
+ const { httpClient, sideEffects } = arguments[1];
1026
597
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ ids });
1027
598
  const reqOpts = bulkDeleteSubscriptionOptions(
1028
599
  payload
@@ -1046,13 +617,7 @@ async function bulkDeleteSubscriptionOptions2(ids) {
1046
617
  }
1047
618
  }
1048
619
  async function assignSubscriptionOptionsToProduct2(productId, options) {
1049
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1050
- if (validateRequestSchema) {
1051
- AssignSubscriptionOptionsToProductRequest.parse({
1052
- productId,
1053
- options
1054
- });
1055
- }
620
+ const { httpClient, sideEffects } = arguments[2];
1056
621
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1057
622
  productId,
1058
623
  assignedSubscriptionOptions: options?.assignedSubscriptionOptions
@@ -1082,10 +647,7 @@ async function assignSubscriptionOptionsToProduct2(productId, options) {
1082
647
  }
1083
648
  }
1084
649
  async function allowOneTimePurchases2(productId, allowed) {
1085
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1086
- if (validateRequestSchema) {
1087
- AllowOneTimePurchasesRequest.parse({ productId, allowed });
1088
- }
650
+ const { httpClient, sideEffects } = arguments[2];
1089
651
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1090
652
  productId,
1091
653
  allowed
@@ -1110,10 +672,7 @@ async function allowOneTimePurchases2(productId, allowed) {
1110
672
  }
1111
673
  }
1112
674
  async function getSubscriptionOption2(_id) {
1113
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1114
- if (validateRequestSchema) {
1115
- GetSubscriptionOptionRequest.parse({ _id });
1116
- }
675
+ const { httpClient, sideEffects } = arguments[1];
1117
676
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1118
677
  const reqOpts = getSubscriptionOption(payload);
1119
678
  sideEffects?.onSiteCall?.();
@@ -1136,10 +695,7 @@ async function getSubscriptionOption2(_id) {
1136
695
  }
1137
696
  }
1138
697
  async function getSubscriptionOptionsForProduct2(productId, options) {
1139
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1140
- if (validateRequestSchema) {
1141
- GetSubscriptionOptionsForProductRequest.parse({ productId, options });
1142
- }
698
+ const { httpClient, sideEffects } = arguments[2];
1143
699
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1144
700
  productId,
1145
701
  includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
@@ -1170,10 +726,7 @@ async function getSubscriptionOptionsForProduct2(productId, options) {
1170
726
  }
1171
727
  }
1172
728
  async function getProductIdsForSubscriptionOption2(_id, options) {
1173
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1174
- if (validateRequestSchema) {
1175
- GetProductIdsForSubscriptionOptionRequest.parse({ _id, options });
1176
- }
729
+ const { httpClient, sideEffects } = arguments[2];
1177
730
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1178
731
  id: _id,
1179
732
  includeHiddenProducts: options?.includeHiddenProducts,
@@ -1206,10 +759,7 @@ async function getProductIdsForSubscriptionOption2(_id, options) {
1206
759
  }
1207
760
  }
1208
761
  async function getOneTimePurchasesStatus2(productId) {
1209
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1210
- if (validateRequestSchema) {
1211
- GetOneTimePurchasesStatusRequest.parse({ productId });
1212
- }
762
+ const { httpClient, sideEffects } = arguments[1];
1213
763
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1214
764
  productId
1215
765
  });