@wix/auto_sdk_subscription_subscriptions 1.0.47 → 1.0.49

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +3 -11
  2. package/build/cjs/index.js +402 -142
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2020 -1771
  5. package/build/cjs/index.typings.js +338 -97
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1991 -1762
  8. package/build/cjs/meta.js +291 -92
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +3 -11
  11. package/build/es/index.mjs +396 -141
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +2020 -1771
  14. package/build/es/index.typings.mjs +332 -96
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +1991 -1762
  17. package/build/es/meta.mjs +285 -91
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +28 -10
  20. package/build/internal/cjs/index.typings.d.ts +1713 -1383
  21. package/build/internal/cjs/meta.d.ts +2124 -1783
  22. package/build/internal/es/index.d.mts +28 -10
  23. package/build/internal/es/index.typings.d.mts +1713 -1383
  24. package/build/internal/es/meta.d.mts +2124 -1783
  25. package/package.json +4 -4
  26. package/build/internal/cjs/index.js +0 -6659
  27. package/build/internal/cjs/index.js.map +0 -1
  28. package/build/internal/cjs/index.typings.js +0 -5629
  29. package/build/internal/cjs/index.typings.js.map +0 -1
  30. package/build/internal/cjs/meta.js +0 -4712
  31. package/build/internal/cjs/meta.js.map +0 -1
  32. package/build/internal/es/index.mjs +0 -6543
  33. package/build/internal/es/index.mjs.map +0 -1
  34. package/build/internal/es/index.typings.mjs +0 -5526
  35. package/build/internal/es/index.typings.mjs.map +0 -1
  36. package/build/internal/es/meta.mjs +0 -4606
  37. package/build/internal/es/meta.mjs.map +0 -1
@@ -25,6 +25,7 @@ __export(index_exports, {
25
25
  AdditionalFeeTrigger: () => AdditionalFeeTrigger,
26
26
  CancellationInitiator: () => CancellationInitiator,
27
27
  ChangeEffectiveTime: () => ChangeEffectiveTime,
28
+ ChangeType: () => ChangeType,
28
29
  CollectionMethod: () => CollectionMethod,
29
30
  CollectionMethodEnumCollectionMethod: () => CollectionMethodEnumCollectionMethod,
30
31
  CreationMode: () => CreationMode,
@@ -35,6 +36,7 @@ __export(index_exports, {
35
36
  IdentityType: () => IdentityType,
36
37
  InvoiceStatus: () => InvoiceStatus,
37
38
  ItemCategory: () => ItemCategory,
39
+ MissingPreviousBillingDateResumeStrategy: () => MissingPreviousBillingDateResumeStrategy,
38
40
  OrderMethod: () => OrderMethod,
39
41
  PauseAt: () => PauseAt,
40
42
  PausePolicy: () => PausePolicy,
@@ -47,6 +49,7 @@ __export(index_exports, {
47
49
  PriceAdjustmentReason: () => PriceAdjustmentReason,
48
50
  ProrationAction: () => ProrationAction,
49
51
  ProrationBehavior: () => ProrationBehavior,
52
+ ProrationBehaviorEnumProrationBehavior: () => ProrationBehaviorEnumProrationBehavior,
50
53
  RefundReason: () => RefundReason,
51
54
  RequestedFields: () => RequestedFields,
52
55
  ResumeAt: () => ResumeAt,
@@ -65,14 +68,17 @@ __export(index_exports, {
65
68
  cancelSubscription: () => cancelSubscription4,
66
69
  countSubscriptions: () => countSubscriptions4,
67
70
  customerAllowedActions: () => customerAllowedActions4,
71
+ customerCancelPendingChange: () => customerCancelPendingChange4,
68
72
  customerCancelScheduledPause: () => customerCancelScheduledPause4,
69
73
  customerCancelScheduledSkip: () => customerCancelScheduledSkip4,
70
74
  customerCancelSubscription: () => customerCancelSubscription4,
75
+ customerChangeSubscription: () => customerChangeSubscription4,
71
76
  customerExtendSubscription: () => customerExtendSubscription4,
72
77
  customerGetSubscription: () => customerGetSubscription4,
73
78
  customerInitiatePaymentMethodSetup: () => customerInitiatePaymentMethodSetup4,
74
79
  customerListUpcomingCharges: () => customerListUpcomingCharges4,
75
80
  customerPauseSubscription: () => customerPauseSubscription4,
81
+ customerPreviewChangeSubscription: () => customerPreviewChangeSubscription4,
76
82
  customerQuerySubscriptions: () => customerQuerySubscriptions4,
77
83
  customerResumeSubscription: () => customerResumeSubscription4,
78
84
  customerSkipCycle: () => customerSkipCycle4,
@@ -102,7 +108,6 @@ __export(index_exports, {
102
108
  onSubscriptionResumed: () => onSubscriptionResumed2,
103
109
  onSubscriptionUpdated: () => onSubscriptionUpdated2,
104
110
  pauseSubscription: () => pauseSubscription4,
105
- payCycle: () => payCycle4,
106
111
  previewSubscriptionCharges: () => previewSubscriptionCharges4,
107
112
  previewSubscriptionsCharges: () => previewSubscriptionsCharges4,
108
113
  querySubscriptions: () => querySubscriptions4,
@@ -129,6 +134,7 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
129
134
 
130
135
  // src/billing-v1-subscription-subscriptions.http.ts
131
136
  var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
137
+ var import_float = require("@wix/sdk-runtime/transformations/float");
132
138
  var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
133
139
  var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
134
140
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
@@ -215,47 +221,6 @@ function resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl(opts
215
221
  };
216
222
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
217
223
  }
218
- function resolveComWixpressBillingSubscriptionsApiV1SubscriptionsBackOfficeServiceUrl(opts) {
219
- const domainToMappings = {
220
- "www._base_domain_": [
221
- {
222
- srcPath: "/_api/billing-subscriptions",
223
- destPath: ""
224
- }
225
- ],
226
- _: [
227
- {
228
- srcPath: "/_api/billing-subscriptions",
229
- destPath: ""
230
- }
231
- ],
232
- "*.dev.wix-code.com": [
233
- {
234
- srcPath: "/_api/billing-subscriptions",
235
- destPath: ""
236
- }
237
- ],
238
- "*.pub.wix-code.com": [
239
- {
240
- srcPath: "/_api/billing-subscriptions",
241
- destPath: ""
242
- }
243
- ],
244
- "manage._base_domain_": [
245
- {
246
- srcPath: "/_api/billing-subscriptions",
247
- destPath: ""
248
- }
249
- ],
250
- "payments.base44.com": [
251
- {
252
- srcPath: "/_api/billing-subscriptions",
253
- destPath: ""
254
- }
255
- ]
256
- };
257
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
258
- }
259
224
  function resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(opts) {
260
225
  const domainToMappings = {
261
226
  "www._base_domain_": [
@@ -556,6 +521,15 @@ function customerExtendSubscription(payload) {
556
521
  }
557
522
  function customerQuerySubscriptions(payload) {
558
523
  function __customerQuerySubscriptions({ host }) {
524
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
525
+ {
526
+ transformFn: import_float.transformSDKFloatToRESTFloat,
527
+ paths: [
528
+ { path: "query.sort.origin.latitude" },
529
+ { path: "query.sort.origin.longitude" }
530
+ ]
531
+ }
532
+ ]);
559
533
  const metadata = {
560
534
  entityFqdn: "wix.billing.v1.subscription",
561
535
  method: "POST",
@@ -565,9 +539,13 @@ function customerQuerySubscriptions(payload) {
565
539
  optInTransformResponse: true
566
540
  },
567
541
  url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
568
- { protoPath: "/v1/customer_subscriptions/query", data: payload, host }
542
+ {
543
+ protoPath: "/v1/customer_subscriptions/query",
544
+ data: serializedData,
545
+ host
546
+ }
569
547
  ),
570
- data: payload,
548
+ data: serializedData,
571
549
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
572
550
  {
573
551
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
@@ -1071,19 +1049,107 @@ function customerUpdateBillingDate(payload) {
1071
1049
  }
1072
1050
  return __customerUpdateBillingDate;
1073
1051
  }
1074
- function payCycle(payload) {
1075
- function __payCycle({ host }) {
1052
+ function customerChangeSubscription(payload) {
1053
+ function __customerChangeSubscription({ host }) {
1054
+ const metadata = {
1055
+ entityFqdn: "wix.billing.v1.subscription",
1056
+ method: "POST",
1057
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerChangeSubscription",
1058
+ packageName: PACKAGE_NAME,
1059
+ migrationOptions: {
1060
+ optInTransformResponse: true
1061
+ },
1062
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
1063
+ {
1064
+ protoPath: "/v1/customer_subscriptions/{subscriptionId}/change",
1065
+ data: payload,
1066
+ host
1067
+ }
1068
+ ),
1069
+ data: payload,
1070
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1071
+ {
1072
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1073
+ paths: [
1074
+ { path: "subscription.createdDate" },
1075
+ { path: "subscription.updatedDate" },
1076
+ { path: "subscription.startDate" },
1077
+ { path: "subscription.endDate" },
1078
+ { path: "subscription.billingStatus.nextBillingDate" },
1079
+ { path: "subscription.billingStatus.previousBillingDate" },
1080
+ {
1081
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
1082
+ },
1083
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
1084
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
1085
+ {
1086
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
1087
+ },
1088
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
1089
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
1090
+ { path: "subscription.pauseInfo.startDate" },
1091
+ { path: "subscription.pauseInfo.resumeDate" },
1092
+ { path: "subscription.cancellationInfo.cancellationDate" },
1093
+ {
1094
+ path: "subscription.specificDatePendingUpdateData.executionDate"
1095
+ }
1096
+ ]
1097
+ }
1098
+ ])
1099
+ };
1100
+ return metadata;
1101
+ }
1102
+ return __customerChangeSubscription;
1103
+ }
1104
+ function customerPreviewChangeSubscription(payload) {
1105
+ function __customerPreviewChangeSubscription({ host }) {
1076
1106
  const metadata = {
1077
1107
  entityFqdn: "wix.billing.v1.subscription",
1078
1108
  method: "POST",
1079
- methodFqn: "com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle",
1109
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerPreviewChangeSubscription",
1080
1110
  packageName: PACKAGE_NAME,
1081
1111
  migrationOptions: {
1082
1112
  optInTransformResponse: true
1083
1113
  },
1084
- url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsBackOfficeServiceUrl(
1114
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
1085
1115
  {
1086
- protoPath: "/v1/subscriptions-bo/{subscriptionId}/pay-cycle",
1116
+ protoPath: "/v1/customer_subscriptions/{subscriptionId}/preview_change",
1117
+ data: payload,
1118
+ host
1119
+ }
1120
+ ),
1121
+ data: payload,
1122
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1123
+ {
1124
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1125
+ paths: [
1126
+ { path: "preview.current.periodStart" },
1127
+ { path: "preview.current.periodEnd" },
1128
+ { path: "preview.proposed.periodStart" },
1129
+ { path: "preview.proposed.periodEnd" },
1130
+ { path: "preview.proration.newPeriodEnd" },
1131
+ { path: "preview.renewalPreview.nextRenewalDate" }
1132
+ ]
1133
+ }
1134
+ ])
1135
+ };
1136
+ return metadata;
1137
+ }
1138
+ return __customerPreviewChangeSubscription;
1139
+ }
1140
+ function customerCancelPendingChange(payload) {
1141
+ function __customerCancelPendingChange({ host }) {
1142
+ const metadata = {
1143
+ entityFqdn: "wix.billing.v1.subscription",
1144
+ method: "POST",
1145
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelPendingChange",
1146
+ packageName: PACKAGE_NAME,
1147
+ migrationOptions: {
1148
+ optInTransformResponse: true
1149
+ },
1150
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
1151
+ {
1152
+ protoPath: "/v1/customer_subscriptions/{subscriptionId}/cancel_pending_change",
1087
1153
  data: payload,
1088
1154
  host
1089
1155
  }
@@ -1121,7 +1187,7 @@ function payCycle(payload) {
1121
1187
  };
1122
1188
  return metadata;
1123
1189
  }
1124
- return __payCycle;
1190
+ return __customerCancelPendingChange;
1125
1191
  }
1126
1192
  function getSubscription(payload) {
1127
1193
  function __getSubscription({ host }) {
@@ -1496,6 +1562,15 @@ function resumeSubscription(payload) {
1496
1562
  }
1497
1563
  function querySubscriptions(payload) {
1498
1564
  function __querySubscriptions({ host }) {
1565
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
1566
+ {
1567
+ transformFn: import_float.transformSDKFloatToRESTFloat,
1568
+ paths: [
1569
+ { path: "query.sort.origin.latitude" },
1570
+ { path: "query.sort.origin.longitude" }
1571
+ ]
1572
+ }
1573
+ ]);
1499
1574
  const metadata = {
1500
1575
  entityFqdn: "wix.billing.v1.subscription",
1501
1576
  method: "POST",
@@ -1506,10 +1581,10 @@ function querySubscriptions(payload) {
1506
1581
  },
1507
1582
  url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({
1508
1583
  protoPath: "/v1/subscriptions/query",
1509
- data: payload,
1584
+ data: serializedData,
1510
1585
  host
1511
1586
  }),
1512
- data: payload,
1587
+ data: serializedData,
1513
1588
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1514
1589
  {
1515
1590
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
@@ -1546,6 +1621,15 @@ function querySubscriptions(payload) {
1546
1621
  }
1547
1622
  function searchSubscriptions(payload) {
1548
1623
  function __searchSubscriptions({ host }) {
1624
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
1625
+ {
1626
+ transformFn: import_float.transformSDKFloatToRESTFloat,
1627
+ paths: [
1628
+ { path: "sorting.sorting.origin.latitude" },
1629
+ { path: "sorting.sorting.origin.longitude" }
1630
+ ]
1631
+ }
1632
+ ]);
1549
1633
  const metadata = {
1550
1634
  entityFqdn: "wix.billing.v1.subscription",
1551
1635
  method: "POST",
@@ -1556,10 +1640,10 @@ function searchSubscriptions(payload) {
1556
1640
  },
1557
1641
  url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({
1558
1642
  protoPath: "/v1/subscriptions/search",
1559
- data: payload,
1643
+ data: serializedData,
1560
1644
  host
1561
1645
  }),
1562
- data: payload,
1646
+ data: serializedData,
1563
1647
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1564
1648
  {
1565
1649
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
@@ -3569,6 +3653,54 @@ function listSubscriptionHistory(payload) {
3569
3653
  {
3570
3654
  path: "historyEntries.event.futurePriceUpdatesRequested.subscription.specificDatePendingUpdateData.executionDate"
3571
3655
  },
3656
+ {
3657
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.createdDate"
3658
+ },
3659
+ {
3660
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.updatedDate"
3661
+ },
3662
+ {
3663
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.startDate"
3664
+ },
3665
+ {
3666
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.endDate"
3667
+ },
3668
+ {
3669
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.nextBillingDate"
3670
+ },
3671
+ {
3672
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.previousBillingDate"
3673
+ },
3674
+ {
3675
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
3676
+ },
3677
+ {
3678
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.freeTrialData.startDate"
3679
+ },
3680
+ {
3681
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.freeTrialData.endDate"
3682
+ },
3683
+ {
3684
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.updateBillingDateData.paidUntil"
3685
+ },
3686
+ {
3687
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.gracePeriodData.startDate"
3688
+ },
3689
+ {
3690
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingStatus.gracePeriodData.endDate"
3691
+ },
3692
+ {
3693
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.pauseInfo.startDate"
3694
+ },
3695
+ {
3696
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.pauseInfo.resumeDate"
3697
+ },
3698
+ {
3699
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.cancellationInfo.cancellationDate"
3700
+ },
3701
+ {
3702
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.specificDatePendingUpdateData.executionDate"
3703
+ },
3572
3704
  {
3573
3705
  path: "historyEntries.event.subscriptionBoAction.subscription.createdDate"
3574
3706
  },
@@ -3719,6 +3851,7 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
3719
3851
  return SortOrder2;
3720
3852
  })(SortOrder || {});
3721
3853
  var SubscriptionStatusGroup = /* @__PURE__ */ ((SubscriptionStatusGroup2) => {
3854
+ SubscriptionStatusGroup2["UNKNOWN_STATUS_GROUP"] = "UNKNOWN_STATUS_GROUP";
3722
3855
  SubscriptionStatusGroup2["ALL"] = "ALL";
3723
3856
  SubscriptionStatusGroup2["LIVE"] = "LIVE";
3724
3857
  return SubscriptionStatusGroup2;
@@ -3740,6 +3873,7 @@ var ActionType = /* @__PURE__ */ ((ActionType2) => {
3740
3873
  ActionType2["UPDATE_COLLECTION_METHOD"] = "UPDATE_COLLECTION_METHOD";
3741
3874
  ActionType2["SKIP_CYCLE"] = "SKIP_CYCLE";
3742
3875
  ActionType2["CUSTOMER_UPDATE_BILLING_DATE"] = "CUSTOMER_UPDATE_BILLING_DATE";
3876
+ ActionType2["CHANGE_SUBSCRIPTION"] = "CHANGE_SUBSCRIPTION";
3743
3877
  return ActionType2;
3744
3878
  })(ActionType || {});
3745
3879
  var ExtendPolicyType = /* @__PURE__ */ ((ExtendPolicyType2) => {
@@ -3759,6 +3893,20 @@ var OrderMethod = /* @__PURE__ */ ((OrderMethod2) => {
3759
3893
  OrderMethod2["NOT_MOTO"] = "NOT_MOTO";
3760
3894
  return OrderMethod2;
3761
3895
  })(OrderMethod || {});
3896
+ var ChangeEffectiveTime = /* @__PURE__ */ ((ChangeEffectiveTime2) => {
3897
+ ChangeEffectiveTime2["UNKNOWN"] = "UNKNOWN";
3898
+ ChangeEffectiveTime2["IMMEDIATELY"] = "IMMEDIATELY";
3899
+ ChangeEffectiveTime2["AT_NEXT_RENEWAL"] = "AT_NEXT_RENEWAL";
3900
+ return ChangeEffectiveTime2;
3901
+ })(ChangeEffectiveTime || {});
3902
+ var ProrationAction = /* @__PURE__ */ ((ProrationAction2) => {
3903
+ ProrationAction2["UNKNOWN"] = "UNKNOWN";
3904
+ ProrationAction2["CHARGE"] = "CHARGE";
3905
+ ProrationAction2["REFUND"] = "REFUND";
3906
+ ProrationAction2["EXTEND_PERIOD"] = "EXTEND_PERIOD";
3907
+ ProrationAction2["NO_CHANGE"] = "NO_CHANGE";
3908
+ return ProrationAction2;
3909
+ })(ProrationAction || {});
3762
3910
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
3763
3911
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
3764
3912
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -3767,25 +3915,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
3767
3915
  WebhookIdentityType2["APP"] = "APP";
3768
3916
  return WebhookIdentityType2;
3769
3917
  })(WebhookIdentityType || {});
3770
- var PaymentTestMode = /* @__PURE__ */ ((PaymentTestMode2) => {
3771
- PaymentTestMode2["REGULAR"] = "REGULAR";
3772
- PaymentTestMode2["FAIL_TECHNICAL"] = "FAIL_TECHNICAL";
3773
- PaymentTestMode2["FAIL_DECLINE"] = "FAIL_DECLINE";
3774
- PaymentTestMode2["FAIL_RETRYABLE_DECLINE"] = "FAIL_RETRYABLE_DECLINE";
3775
- return PaymentTestMode2;
3776
- })(PaymentTestMode || {});
3777
- var RevivePolicy = /* @__PURE__ */ ((RevivePolicy2) => {
3778
- RevivePolicy2["SIMPLE"] = "SIMPLE";
3779
- RevivePolicy2["RESUME"] = "RESUME";
3780
- return RevivePolicy2;
3781
- })(RevivePolicy || {});
3782
- var ActionInitiator = /* @__PURE__ */ ((ActionInitiator2) => {
3783
- ActionInitiator2["UNDEFINED"] = "UNDEFINED";
3784
- ActionInitiator2["BUSINESS"] = "BUSINESS";
3785
- ActionInitiator2["CUSTOMER"] = "CUSTOMER";
3786
- ActionInitiator2["SYSTEM"] = "SYSTEM";
3787
- return ActionInitiator2;
3788
- })(ActionInitiator || {});
3789
3918
  var UpdateAction = /* @__PURE__ */ ((UpdateAction2) => {
3790
3919
  UpdateAction2["NONE"] = "NONE";
3791
3920
  UpdateAction2["IMMEDIATELY"] = "IMMEDIATELY";
@@ -3794,6 +3923,19 @@ var UpdateAction = /* @__PURE__ */ ((UpdateAction2) => {
3794
3923
  UpdateAction2["SPECIFIC_DATE"] = "SPECIFIC_DATE";
3795
3924
  return UpdateAction2;
3796
3925
  })(UpdateAction || {});
3926
+ var ActionInitiator = /* @__PURE__ */ ((ActionInitiator2) => {
3927
+ ActionInitiator2["UNDEFINED"] = "UNDEFINED";
3928
+ ActionInitiator2["BUSINESS"] = "BUSINESS";
3929
+ ActionInitiator2["CUSTOMER"] = "CUSTOMER";
3930
+ ActionInitiator2["SYSTEM"] = "SYSTEM";
3931
+ return ActionInitiator2;
3932
+ })(ActionInitiator || {});
3933
+ var MissingPreviousBillingDateResumeStrategy = /* @__PURE__ */ ((MissingPreviousBillingDateResumeStrategy2) => {
3934
+ MissingPreviousBillingDateResumeStrategy2["UNKNOWN"] = "UNKNOWN";
3935
+ MissingPreviousBillingDateResumeStrategy2["START_BILLING_IMMEDIATELY"] = "START_BILLING_IMMEDIATELY";
3936
+ MissingPreviousBillingDateResumeStrategy2["START_BILLING_AFTER_ONE_FULL_CYCLE"] = "START_BILLING_AFTER_ONE_FULL_CYCLE";
3937
+ return MissingPreviousBillingDateResumeStrategy2;
3938
+ })(MissingPreviousBillingDateResumeStrategy || {});
3797
3939
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
3798
3940
  RequestedFields2["UNSUPPORTED_ACTION"] = "UNSUPPORTED_ACTION";
3799
3941
  return RequestedFields2;
@@ -3852,28 +3994,30 @@ var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
3852
3994
  RefundReason2["OTHER"] = "OTHER";
3853
3995
  return RefundReason2;
3854
3996
  })(RefundReason || {});
3855
- var ChangeEffectiveTime = /* @__PURE__ */ ((ChangeEffectiveTime2) => {
3856
- ChangeEffectiveTime2["UNKNOWN"] = "UNKNOWN";
3857
- ChangeEffectiveTime2["IMMEDIATELY"] = "IMMEDIATELY";
3858
- ChangeEffectiveTime2["AT_NEXT_RENEWAL"] = "AT_NEXT_RENEWAL";
3859
- return ChangeEffectiveTime2;
3860
- })(ChangeEffectiveTime || {});
3997
+ var ProrationBehaviorEnumProrationBehavior = /* @__PURE__ */ ((ProrationBehaviorEnumProrationBehavior2) => {
3998
+ ProrationBehaviorEnumProrationBehavior2["UNKNOWN"] = "UNKNOWN";
3999
+ ProrationBehaviorEnumProrationBehavior2["PRORATE_AND_CHARGE"] = "PRORATE_AND_CHARGE";
4000
+ ProrationBehaviorEnumProrationBehavior2["PRORATE_AND_REFUND"] = "PRORATE_AND_REFUND";
4001
+ ProrationBehaviorEnumProrationBehavior2["PRORATE_AND_EXTEND"] = "PRORATE_AND_EXTEND";
4002
+ ProrationBehaviorEnumProrationBehavior2["NO_PRORATION"] = "NO_PRORATION";
4003
+ return ProrationBehaviorEnumProrationBehavior2;
4004
+ })(ProrationBehaviorEnumProrationBehavior || {});
4005
+ var ChangeType = /* @__PURE__ */ ((ChangeType2) => {
4006
+ ChangeType2["CHANGE_TYPE_UNKNOWN"] = "CHANGE_TYPE_UNKNOWN";
4007
+ ChangeType2["UPGRADE"] = "UPGRADE";
4008
+ ChangeType2["DOWNGRADE"] = "DOWNGRADE";
4009
+ ChangeType2["CYCLE_CHANGE"] = "CYCLE_CHANGE";
4010
+ ChangeType2["QUANTITY_CHANGE"] = "QUANTITY_CHANGE";
4011
+ return ChangeType2;
4012
+ })(ChangeType || {});
3861
4013
  var ProrationBehavior = /* @__PURE__ */ ((ProrationBehavior2) => {
3862
- ProrationBehavior2["UNKNOWN"] = "UNKNOWN";
4014
+ ProrationBehavior2["PRORATION_BEHAVIOR_UNKNOWN"] = "PRORATION_BEHAVIOR_UNKNOWN";
3863
4015
  ProrationBehavior2["PRORATE_AND_CHARGE"] = "PRORATE_AND_CHARGE";
3864
4016
  ProrationBehavior2["PRORATE_AND_REFUND"] = "PRORATE_AND_REFUND";
3865
4017
  ProrationBehavior2["PRORATE_AND_EXTEND"] = "PRORATE_AND_EXTEND";
3866
4018
  ProrationBehavior2["NO_PRORATION"] = "NO_PRORATION";
3867
4019
  return ProrationBehavior2;
3868
4020
  })(ProrationBehavior || {});
3869
- var ProrationAction = /* @__PURE__ */ ((ProrationAction2) => {
3870
- ProrationAction2["UNKNOWN"] = "UNKNOWN";
3871
- ProrationAction2["CHARGE"] = "CHARGE";
3872
- ProrationAction2["REFUND"] = "REFUND";
3873
- ProrationAction2["EXTEND_PERIOD"] = "EXTEND_PERIOD";
3874
- ProrationAction2["NO_CHANGE"] = "NO_CHANGE";
3875
- return ProrationAction2;
3876
- })(ProrationAction || {});
3877
4021
  var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
3878
4022
  IdentityType2["UNDEFINED"] = "UNDEFINED";
3879
4023
  IdentityType2["MEMBER"] = "MEMBER";
@@ -3928,6 +4072,18 @@ var Status = /* @__PURE__ */ ((Status2) => {
3928
4072
  Status2["ENDED"] = "ENDED";
3929
4073
  return Status2;
3930
4074
  })(Status || {});
4075
+ var PaymentTestMode = /* @__PURE__ */ ((PaymentTestMode2) => {
4076
+ PaymentTestMode2["REGULAR"] = "REGULAR";
4077
+ PaymentTestMode2["FAIL_TECHNICAL"] = "FAIL_TECHNICAL";
4078
+ PaymentTestMode2["FAIL_DECLINE"] = "FAIL_DECLINE";
4079
+ PaymentTestMode2["FAIL_RETRYABLE_DECLINE"] = "FAIL_RETRYABLE_DECLINE";
4080
+ return PaymentTestMode2;
4081
+ })(PaymentTestMode || {});
4082
+ var RevivePolicy = /* @__PURE__ */ ((RevivePolicy2) => {
4083
+ RevivePolicy2["SIMPLE"] = "SIMPLE";
4084
+ RevivePolicy2["RESUME"] = "RESUME";
4085
+ return RevivePolicy2;
4086
+ })(RevivePolicy || {});
3931
4087
  var HistoryViewMode = /* @__PURE__ */ ((HistoryViewMode2) => {
3932
4088
  HistoryViewMode2["UNKNOWN"] = "UNKNOWN";
3933
4089
  HistoryViewMode2["BACKOFFICE"] = "BACKOFFICE";
@@ -4529,14 +4685,15 @@ async function customerUpdateBillingDate2(_id, billingDate, options) {
4529
4685
  throw transformedError;
4530
4686
  }
4531
4687
  }
4532
- async function payCycle2(subscriptionId, options) {
4688
+ async function customerChangeSubscription2(subscriptionId, options) {
4533
4689
  const { httpClient, sideEffects } = arguments[2];
4534
4690
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4535
4691
  subscriptionId,
4536
- paymentTestMode: options?.paymentTestMode,
4537
- tenantId: options?.tenantId
4692
+ itemChanges: options?.itemChanges,
4693
+ newCycle: options?.newCycle,
4694
+ effectiveTime: options?.effectiveTime
4538
4695
  });
4539
- const reqOpts = payCycle(payload);
4696
+ const reqOpts = customerChangeSubscription(payload);
4540
4697
  sideEffects?.onSiteCall?.();
4541
4698
  try {
4542
4699
  const result = await httpClient.request(reqOpts);
@@ -4559,8 +4716,9 @@ async function payCycle2(subscriptionId, options) {
4559
4716
  spreadPathsToArguments: {},
4560
4717
  explicitPathsToArguments: {
4561
4718
  subscriptionId: "$[0]",
4562
- paymentTestMode: "$[1].paymentTestMode",
4563
- tenantId: "$[1].tenantId"
4719
+ itemChanges: "$[1].itemChanges",
4720
+ newCycle: "$[1].newCycle",
4721
+ effectiveTime: "$[1].effectiveTime"
4564
4722
  },
4565
4723
  singleArgumentUnchanged: false
4566
4724
  },
@@ -4570,6 +4728,76 @@ async function payCycle2(subscriptionId, options) {
4570
4728
  throw transformedError;
4571
4729
  }
4572
4730
  }
4731
+ async function customerPreviewChangeSubscription2(subscriptionId, options) {
4732
+ const { httpClient, sideEffects } = arguments[2];
4733
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4734
+ subscriptionId,
4735
+ itemChanges: options?.itemChanges,
4736
+ newCycle: options?.newCycle,
4737
+ effectiveTime: options?.effectiveTime
4738
+ });
4739
+ const reqOpts = customerPreviewChangeSubscription(
4740
+ payload
4741
+ );
4742
+ sideEffects?.onSiteCall?.();
4743
+ try {
4744
+ const result = await httpClient.request(reqOpts);
4745
+ sideEffects?.onSuccess?.(result);
4746
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
4747
+ } catch (err) {
4748
+ const transformedError = (0, import_transform_error.transformError)(
4749
+ err,
4750
+ {
4751
+ spreadPathsToArguments: {},
4752
+ explicitPathsToArguments: {
4753
+ subscriptionId: "$[0]",
4754
+ itemChanges: "$[1].itemChanges",
4755
+ newCycle: "$[1].newCycle",
4756
+ effectiveTime: "$[1].effectiveTime"
4757
+ },
4758
+ singleArgumentUnchanged: false
4759
+ },
4760
+ ["subscriptionId", "options"]
4761
+ );
4762
+ sideEffects?.onError?.(err);
4763
+ throw transformedError;
4764
+ }
4765
+ }
4766
+ async function customerCancelPendingChange2(subscriptionId) {
4767
+ const { httpClient, sideEffects } = arguments[1];
4768
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4769
+ subscriptionId
4770
+ });
4771
+ const reqOpts = customerCancelPendingChange(payload);
4772
+ sideEffects?.onSiteCall?.();
4773
+ try {
4774
+ const result = await httpClient.request(reqOpts);
4775
+ sideEffects?.onSuccess?.(result);
4776
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4777
+ (0, import_transform_paths2.transformPaths)(result.data, [
4778
+ {
4779
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4780
+ paths: [
4781
+ { path: "subscription.billingSettings.billingAddress.address" },
4782
+ { path: "subscription.shippingAddress.address" }
4783
+ ]
4784
+ }
4785
+ ])
4786
+ );
4787
+ } catch (err) {
4788
+ const transformedError = (0, import_transform_error.transformError)(
4789
+ err,
4790
+ {
4791
+ spreadPathsToArguments: {},
4792
+ explicitPathsToArguments: { subscriptionId: "$[0]" },
4793
+ singleArgumentUnchanged: false
4794
+ },
4795
+ ["subscriptionId"]
4796
+ );
4797
+ sideEffects?.onError?.(err);
4798
+ throw transformedError;
4799
+ }
4800
+ }
4573
4801
  async function getSubscription2(_id) {
4574
4802
  const { httpClient, sideEffects } = arguments[1];
4575
4803
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
@@ -4805,7 +5033,8 @@ async function resumeSubscription2(_id, options) {
4805
5033
  id: _id,
4806
5034
  resumeAt: options?.resumeAt,
4807
5035
  resumeAtSchedule: options?.resumeAtSchedule,
4808
- actionContext: options?.actionContext
5036
+ actionContext: options?.actionContext,
5037
+ missingPreviousBillingDateResumeStrategy: options?.missingPreviousBillingDateResumeStrategy
4809
5038
  });
4810
5039
  const reqOpts = resumeSubscription(payload);
4811
5040
  sideEffects?.onSiteCall?.();
@@ -4832,7 +5061,8 @@ async function resumeSubscription2(_id, options) {
4832
5061
  id: "$[0]",
4833
5062
  resumeAt: "$[1].resumeAt",
4834
5063
  resumeAtSchedule: "$[1].resumeAtSchedule",
4835
- actionContext: "$[1].actionContext"
5064
+ actionContext: "$[1].actionContext",
5065
+ missingPreviousBillingDateResumeStrategy: "$[1].missingPreviousBillingDateResumeStrategy"
4836
5066
  },
4837
5067
  singleArgumentUnchanged: false
4838
5068
  },
@@ -5535,6 +5765,12 @@ async function listSubscriptionHistory2(subscriptionId, options) {
5535
5765
  {
5536
5766
  path: "historyEntries.event.futurePriceUpdatesRequested.subscription.shippingAddress.address"
5537
5767
  },
5768
+ {
5769
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.billingSettings.billingAddress.address"
5770
+ },
5771
+ {
5772
+ path: "historyEntries.event.offlinePurchaseCompleted.subscription.shippingAddress.address"
5773
+ },
5538
5774
  {
5539
5775
  path: "historyEntries.event.subscriptionBoAction.subscription.billingSettings.billingAddress.address"
5540
5776
  },
@@ -5691,14 +5927,29 @@ function customerUpdateBillingDate3(httpClient) {
5691
5927
  { httpClient }
5692
5928
  );
5693
5929
  }
5694
- function payCycle3(httpClient) {
5695
- return (subscriptionId, options) => payCycle2(
5930
+ function customerChangeSubscription3(httpClient) {
5931
+ return (subscriptionId, options) => customerChangeSubscription2(
5696
5932
  subscriptionId,
5697
5933
  options,
5698
5934
  // @ts-ignore
5699
5935
  { httpClient }
5700
5936
  );
5701
5937
  }
5938
+ function customerPreviewChangeSubscription3(httpClient) {
5939
+ return (subscriptionId, options) => customerPreviewChangeSubscription2(
5940
+ subscriptionId,
5941
+ options,
5942
+ // @ts-ignore
5943
+ { httpClient }
5944
+ );
5945
+ }
5946
+ function customerCancelPendingChange3(httpClient) {
5947
+ return (subscriptionId) => customerCancelPendingChange2(
5948
+ subscriptionId,
5949
+ // @ts-ignore
5950
+ { httpClient }
5951
+ );
5952
+ }
5702
5953
  function getSubscription3(httpClient) {
5703
5954
  return (_id) => getSubscription2(
5704
5955
  _id,
@@ -5868,7 +6119,7 @@ function listSubscriptionHistory3(httpClient) {
5868
6119
  { httpClient }
5869
6120
  );
5870
6121
  }
5871
- var onSubscriptionCanceled = (0, import_sdk_types.EventDefinition)(
6122
+ var onSubscriptionCanceled = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
5872
6123
  "wix.billing.v1.subscription_canceled",
5873
6124
  true,
5874
6125
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -5915,7 +6166,7 @@ var onSubscriptionCanceled = (0, import_sdk_types.EventDefinition)(
5915
6166
  ])
5916
6167
  )
5917
6168
  )();
5918
- var onSubscriptionExtended = (0, import_sdk_types.EventDefinition)(
6169
+ var onSubscriptionExtended = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
5919
6170
  "wix.billing.v1.subscription_extended",
5920
6171
  true,
5921
6172
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -5962,7 +6213,7 @@ var onSubscriptionExtended = (0, import_sdk_types.EventDefinition)(
5962
6213
  ])
5963
6214
  )
5964
6215
  )();
5965
- var onSubscriptionUpdated = (0, import_sdk_types.EventDefinition)(
6216
+ var onSubscriptionUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
5966
6217
  "wix.billing.v1.subscription_updated",
5967
6218
  true,
5968
6219
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6001,7 +6252,7 @@ var onSubscriptionUpdated = (0, import_sdk_types.EventDefinition)(
6001
6252
  ])
6002
6253
  )
6003
6254
  )();
6004
- var onSubscriptionAutoRenewalTurnedOff = (0, import_sdk_types.EventDefinition)(
6255
+ var onSubscriptionAutoRenewalTurnedOff = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6005
6256
  "wix.billing.v1.subscription_auto_renewal_turned_off",
6006
6257
  true,
6007
6258
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6048,7 +6299,7 @@ var onSubscriptionAutoRenewalTurnedOff = (0, import_sdk_types.EventDefinition)(
6048
6299
  ])
6049
6300
  )
6050
6301
  )();
6051
- var onSubscriptionAutoRenewalTurnedOn = (0, import_sdk_types.EventDefinition)(
6302
+ var onSubscriptionAutoRenewalTurnedOn = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6052
6303
  "wix.billing.v1.subscription_auto_renewal_turned_on",
6053
6304
  true,
6054
6305
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6095,7 +6346,7 @@ var onSubscriptionAutoRenewalTurnedOn = (0, import_sdk_types.EventDefinition)(
6095
6346
  ])
6096
6347
  )
6097
6348
  )();
6098
- var onSubscriptionBillingDateUpdated = (0, import_sdk_types.EventDefinition)(
6349
+ var onSubscriptionBillingDateUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6099
6350
  "wix.billing.v1.subscription_billing_date_updated",
6100
6351
  true,
6101
6352
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6143,7 +6394,7 @@ var onSubscriptionBillingDateUpdated = (0, import_sdk_types.EventDefinition)(
6143
6394
  ])
6144
6395
  )
6145
6396
  )();
6146
- var onSubscriptionLatestInvoiceMarkedAsPaid = (0, import_sdk_types.EventDefinition)(
6397
+ var onSubscriptionLatestInvoiceMarkedAsPaid = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6147
6398
  "wix.billing.v1.subscription_latest_invoice_marked_as_paid",
6148
6399
  true,
6149
6400
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6160,7 +6411,9 @@ var onSubscriptionLatestInvoiceMarkedAsPaid = (0, import_sdk_types.EventDefiniti
6160
6411
  {
6161
6412
  path: "data.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
6162
6413
  },
6163
- { path: "data.subscription.billingStatus.freeTrialData.startDate" },
6414
+ {
6415
+ path: "data.subscription.billingStatus.freeTrialData.startDate"
6416
+ },
6164
6417
  { path: "data.subscription.billingStatus.freeTrialData.endDate" },
6165
6418
  {
6166
6419
  path: "data.subscription.billingStatus.updateBillingDateData.paidUntil"
@@ -6168,7 +6421,9 @@ var onSubscriptionLatestInvoiceMarkedAsPaid = (0, import_sdk_types.EventDefiniti
6168
6421
  {
6169
6422
  path: "data.subscription.billingStatus.gracePeriodData.startDate"
6170
6423
  },
6171
- { path: "data.subscription.billingStatus.gracePeriodData.endDate" },
6424
+ {
6425
+ path: "data.subscription.billingStatus.gracePeriodData.endDate"
6426
+ },
6172
6427
  { path: "data.subscription.pauseInfo.startDate" },
6173
6428
  { path: "data.subscription.pauseInfo.resumeDate" },
6174
6429
  { path: "data.subscription.cancellationInfo.cancellationDate" },
@@ -6190,7 +6445,7 @@ var onSubscriptionLatestInvoiceMarkedAsPaid = (0, import_sdk_types.EventDefiniti
6190
6445
  ])
6191
6446
  )
6192
6447
  )();
6193
- var onSubscriptionPauseScheduleCanceled = (0, import_sdk_types.EventDefinition)(
6448
+ var onSubscriptionPauseScheduleCanceled = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6194
6449
  "wix.billing.v1.subscription_pause_schedule_canceled",
6195
6450
  true,
6196
6451
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6207,7 +6462,9 @@ var onSubscriptionPauseScheduleCanceled = (0, import_sdk_types.EventDefinition)(
6207
6462
  {
6208
6463
  path: "data.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
6209
6464
  },
6210
- { path: "data.subscription.billingStatus.freeTrialData.startDate" },
6465
+ {
6466
+ path: "data.subscription.billingStatus.freeTrialData.startDate"
6467
+ },
6211
6468
  { path: "data.subscription.billingStatus.freeTrialData.endDate" },
6212
6469
  {
6213
6470
  path: "data.subscription.billingStatus.updateBillingDateData.paidUntil"
@@ -6215,7 +6472,9 @@ var onSubscriptionPauseScheduleCanceled = (0, import_sdk_types.EventDefinition)(
6215
6472
  {
6216
6473
  path: "data.subscription.billingStatus.gracePeriodData.startDate"
6217
6474
  },
6218
- { path: "data.subscription.billingStatus.gracePeriodData.endDate" },
6475
+ {
6476
+ path: "data.subscription.billingStatus.gracePeriodData.endDate"
6477
+ },
6219
6478
  { path: "data.subscription.pauseInfo.startDate" },
6220
6479
  { path: "data.subscription.pauseInfo.resumeDate" },
6221
6480
  { path: "data.subscription.cancellationInfo.cancellationDate" },
@@ -6237,7 +6496,7 @@ var onSubscriptionPauseScheduleCanceled = (0, import_sdk_types.EventDefinition)(
6237
6496
  ])
6238
6497
  )
6239
6498
  )();
6240
- var onSubscriptionPauseScheduled = (0, import_sdk_types.EventDefinition)(
6499
+ var onSubscriptionPauseScheduled = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6241
6500
  "wix.billing.v1.subscription_pause_scheduled",
6242
6501
  true,
6243
6502
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6284,7 +6543,7 @@ var onSubscriptionPauseScheduled = (0, import_sdk_types.EventDefinition)(
6284
6543
  ])
6285
6544
  )
6286
6545
  )();
6287
- var onSubscriptionPaused = (0, import_sdk_types.EventDefinition)(
6546
+ var onSubscriptionPaused = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6288
6547
  "wix.billing.v1.subscription_paused",
6289
6548
  true,
6290
6549
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6331,7 +6590,7 @@ var onSubscriptionPaused = (0, import_sdk_types.EventDefinition)(
6331
6590
  ])
6332
6591
  )
6333
6592
  )();
6334
- var onSubscriptionResumeScheduleCanceled = (0, import_sdk_types.EventDefinition)(
6593
+ var onSubscriptionResumeScheduleCanceled = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6335
6594
  "wix.billing.v1.subscription_resume_schedule_canceled",
6336
6595
  true,
6337
6596
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6348,7 +6607,9 @@ var onSubscriptionResumeScheduleCanceled = (0, import_sdk_types.EventDefinition)
6348
6607
  {
6349
6608
  path: "data.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
6350
6609
  },
6351
- { path: "data.subscription.billingStatus.freeTrialData.startDate" },
6610
+ {
6611
+ path: "data.subscription.billingStatus.freeTrialData.startDate"
6612
+ },
6352
6613
  { path: "data.subscription.billingStatus.freeTrialData.endDate" },
6353
6614
  {
6354
6615
  path: "data.subscription.billingStatus.updateBillingDateData.paidUntil"
@@ -6356,7 +6617,9 @@ var onSubscriptionResumeScheduleCanceled = (0, import_sdk_types.EventDefinition)
6356
6617
  {
6357
6618
  path: "data.subscription.billingStatus.gracePeriodData.startDate"
6358
6619
  },
6359
- { path: "data.subscription.billingStatus.gracePeriodData.endDate" },
6620
+ {
6621
+ path: "data.subscription.billingStatus.gracePeriodData.endDate"
6622
+ },
6360
6623
  { path: "data.subscription.pauseInfo.startDate" },
6361
6624
  { path: "data.subscription.pauseInfo.resumeDate" },
6362
6625
  { path: "data.subscription.cancellationInfo.cancellationDate" },
@@ -6378,7 +6641,7 @@ var onSubscriptionResumeScheduleCanceled = (0, import_sdk_types.EventDefinition)
6378
6641
  ])
6379
6642
  )
6380
6643
  )();
6381
- var onSubscriptionResumeScheduled = (0, import_sdk_types.EventDefinition)(
6644
+ var onSubscriptionResumeScheduled = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6382
6645
  "wix.billing.v1.subscription_resume_scheduled",
6383
6646
  true,
6384
6647
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6425,7 +6688,7 @@ var onSubscriptionResumeScheduled = (0, import_sdk_types.EventDefinition)(
6425
6688
  ])
6426
6689
  )
6427
6690
  )();
6428
- var onSubscriptionResumed = (0, import_sdk_types.EventDefinition)(
6691
+ var onSubscriptionResumed = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
6429
6692
  "wix.billing.v1.subscription_resumed",
6430
6693
  true,
6431
6694
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
@@ -6498,7 +6761,9 @@ var customerPauseSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.create
6498
6761
  var customerResumeSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerResumeSubscription3);
6499
6762
  var customerCancelScheduledPause4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerCancelScheduledPause3);
6500
6763
  var customerUpdateBillingDate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerUpdateBillingDate3);
6501
- var payCycle4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(payCycle3);
6764
+ var customerChangeSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerChangeSubscription3);
6765
+ var customerPreviewChangeSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerPreviewChangeSubscription3);
6766
+ var customerCancelPendingChange4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerCancelPendingChange3);
6502
6767
  var getSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSubscription3);
6503
6768
  var updateSubscriptionPaymentMethod4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateSubscriptionPaymentMethod3);
6504
6769
  var updateSubscriptionBillingDate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateSubscriptionBillingDate3);
@@ -6521,43 +6786,33 @@ var previewSubscriptionCharges4 = /* @__PURE__ */ (0, import_rest_modules3.creat
6521
6786
  var previewSubscriptionsCharges4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(previewSubscriptionsCharges3);
6522
6787
  var initiatePaymentMethodSetup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(initiatePaymentMethodSetup3);
6523
6788
  var listSubscriptionHistory4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSubscriptionHistory3);
6524
- var onSubscriptionCanceled2 = (0, import_event_definition_modules.createEventModule)(
6789
+ var onSubscriptionCanceled2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6525
6790
  onSubscriptionCanceled
6526
6791
  );
6527
- var onSubscriptionExtended2 = (0, import_event_definition_modules.createEventModule)(
6792
+ var onSubscriptionExtended2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6528
6793
  onSubscriptionExtended
6529
6794
  );
6530
- var onSubscriptionUpdated2 = (0, import_event_definition_modules.createEventModule)(
6795
+ var onSubscriptionUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6531
6796
  onSubscriptionUpdated
6532
6797
  );
6533
- var onSubscriptionAutoRenewalTurnedOff2 = (0, import_event_definition_modules.createEventModule)(
6534
- onSubscriptionAutoRenewalTurnedOff
6535
- );
6536
- var onSubscriptionAutoRenewalTurnedOn2 = (0, import_event_definition_modules.createEventModule)(
6537
- onSubscriptionAutoRenewalTurnedOn
6538
- );
6539
- var onSubscriptionBillingDateUpdated2 = (0, import_event_definition_modules.createEventModule)(
6540
- onSubscriptionBillingDateUpdated
6541
- );
6542
- var onSubscriptionLatestInvoiceMarkedAsPaid2 = (0, import_event_definition_modules.createEventModule)(
6798
+ var onSubscriptionAutoRenewalTurnedOff2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onSubscriptionAutoRenewalTurnedOff);
6799
+ var onSubscriptionAutoRenewalTurnedOn2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onSubscriptionAutoRenewalTurnedOn);
6800
+ var onSubscriptionBillingDateUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onSubscriptionBillingDateUpdated);
6801
+ var onSubscriptionLatestInvoiceMarkedAsPaid2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6543
6802
  onSubscriptionLatestInvoiceMarkedAsPaid
6544
6803
  );
6545
- var onSubscriptionPauseScheduleCanceled2 = (0, import_event_definition_modules.createEventModule)(
6546
- onSubscriptionPauseScheduleCanceled
6547
- );
6548
- var onSubscriptionPauseScheduled2 = (0, import_event_definition_modules.createEventModule)(
6804
+ var onSubscriptionPauseScheduleCanceled2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onSubscriptionPauseScheduleCanceled);
6805
+ var onSubscriptionPauseScheduled2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6549
6806
  onSubscriptionPauseScheduled
6550
6807
  );
6551
- var onSubscriptionPaused2 = (0, import_event_definition_modules.createEventModule)(
6808
+ var onSubscriptionPaused2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6552
6809
  onSubscriptionPaused
6553
6810
  );
6554
- var onSubscriptionResumeScheduleCanceled2 = (0, import_event_definition_modules.createEventModule)(
6555
- onSubscriptionResumeScheduleCanceled
6556
- );
6557
- var onSubscriptionResumeScheduled2 = (0, import_event_definition_modules.createEventModule)(
6811
+ var onSubscriptionResumeScheduleCanceled2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onSubscriptionResumeScheduleCanceled);
6812
+ var onSubscriptionResumeScheduled2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6558
6813
  onSubscriptionResumeScheduled
6559
6814
  );
6560
- var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModule)(
6815
+ var onSubscriptionResumed2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
6561
6816
  onSubscriptionResumed
6562
6817
  );
6563
6818
  // Annotate the CommonJS export names for ESM import in node:
@@ -6567,6 +6822,7 @@ var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModu
6567
6822
  AdditionalFeeTrigger,
6568
6823
  CancellationInitiator,
6569
6824
  ChangeEffectiveTime,
6825
+ ChangeType,
6570
6826
  CollectionMethod,
6571
6827
  CollectionMethodEnumCollectionMethod,
6572
6828
  CreationMode,
@@ -6577,6 +6833,7 @@ var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModu
6577
6833
  IdentityType,
6578
6834
  InvoiceStatus,
6579
6835
  ItemCategory,
6836
+ MissingPreviousBillingDateResumeStrategy,
6580
6837
  OrderMethod,
6581
6838
  PauseAt,
6582
6839
  PausePolicy,
@@ -6589,6 +6846,7 @@ var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModu
6589
6846
  PriceAdjustmentReason,
6590
6847
  ProrationAction,
6591
6848
  ProrationBehavior,
6849
+ ProrationBehaviorEnumProrationBehavior,
6592
6850
  RefundReason,
6593
6851
  RequestedFields,
6594
6852
  ResumeAt,
@@ -6607,14 +6865,17 @@ var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModu
6607
6865
  cancelSubscription,
6608
6866
  countSubscriptions,
6609
6867
  customerAllowedActions,
6868
+ customerCancelPendingChange,
6610
6869
  customerCancelScheduledPause,
6611
6870
  customerCancelScheduledSkip,
6612
6871
  customerCancelSubscription,
6872
+ customerChangeSubscription,
6613
6873
  customerExtendSubscription,
6614
6874
  customerGetSubscription,
6615
6875
  customerInitiatePaymentMethodSetup,
6616
6876
  customerListUpcomingCharges,
6617
6877
  customerPauseSubscription,
6878
+ customerPreviewChangeSubscription,
6618
6879
  customerQuerySubscriptions,
6619
6880
  customerResumeSubscription,
6620
6881
  customerSkipCycle,
@@ -6644,7 +6905,6 @@ var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModu
6644
6905
  onSubscriptionResumed,
6645
6906
  onSubscriptionUpdated,
6646
6907
  pauseSubscription,
6647
- payCycle,
6648
6908
  previewSubscriptionCharges,
6649
6909
  previewSubscriptionsCharges,
6650
6910
  querySubscriptions,