@wix/auto_sdk_subscription_subscriptions 1.0.48 → 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.
package/build/es/meta.mjs CHANGED
@@ -915,6 +915,146 @@ function customerUpdateBillingDate(payload) {
915
915
  }
916
916
  return __customerUpdateBillingDate;
917
917
  }
918
+ function customerChangeSubscription(payload) {
919
+ function __customerChangeSubscription({ host }) {
920
+ const metadata = {
921
+ entityFqdn: "wix.billing.v1.subscription",
922
+ method: "POST",
923
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerChangeSubscription",
924
+ packageName: PACKAGE_NAME,
925
+ migrationOptions: {
926
+ optInTransformResponse: true
927
+ },
928
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
929
+ {
930
+ protoPath: "/v1/customer_subscriptions/{subscriptionId}/change",
931
+ data: payload,
932
+ host
933
+ }
934
+ ),
935
+ data: payload,
936
+ transformResponse: (payload2) => transformPaths(payload2, [
937
+ {
938
+ transformFn: transformRESTTimestampToSDKTimestamp,
939
+ paths: [
940
+ { path: "subscription.createdDate" },
941
+ { path: "subscription.updatedDate" },
942
+ { path: "subscription.startDate" },
943
+ { path: "subscription.endDate" },
944
+ { path: "subscription.billingStatus.nextBillingDate" },
945
+ { path: "subscription.billingStatus.previousBillingDate" },
946
+ {
947
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
948
+ },
949
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
950
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
951
+ {
952
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
953
+ },
954
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
955
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
956
+ { path: "subscription.pauseInfo.startDate" },
957
+ { path: "subscription.pauseInfo.resumeDate" },
958
+ { path: "subscription.cancellationInfo.cancellationDate" },
959
+ {
960
+ path: "subscription.specificDatePendingUpdateData.executionDate"
961
+ }
962
+ ]
963
+ }
964
+ ])
965
+ };
966
+ return metadata;
967
+ }
968
+ return __customerChangeSubscription;
969
+ }
970
+ function customerPreviewChangeSubscription(payload) {
971
+ function __customerPreviewChangeSubscription({ host }) {
972
+ const metadata = {
973
+ entityFqdn: "wix.billing.v1.subscription",
974
+ method: "POST",
975
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerPreviewChangeSubscription",
976
+ packageName: PACKAGE_NAME,
977
+ migrationOptions: {
978
+ optInTransformResponse: true
979
+ },
980
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
981
+ {
982
+ protoPath: "/v1/customer_subscriptions/{subscriptionId}/preview_change",
983
+ data: payload,
984
+ host
985
+ }
986
+ ),
987
+ data: payload,
988
+ transformResponse: (payload2) => transformPaths(payload2, [
989
+ {
990
+ transformFn: transformRESTTimestampToSDKTimestamp,
991
+ paths: [
992
+ { path: "preview.current.periodStart" },
993
+ { path: "preview.current.periodEnd" },
994
+ { path: "preview.proposed.periodStart" },
995
+ { path: "preview.proposed.periodEnd" },
996
+ { path: "preview.proration.newPeriodEnd" },
997
+ { path: "preview.renewalPreview.nextRenewalDate" }
998
+ ]
999
+ }
1000
+ ])
1001
+ };
1002
+ return metadata;
1003
+ }
1004
+ return __customerPreviewChangeSubscription;
1005
+ }
1006
+ function customerCancelPendingChange(payload) {
1007
+ function __customerCancelPendingChange({ host }) {
1008
+ const metadata = {
1009
+ entityFqdn: "wix.billing.v1.subscription",
1010
+ method: "POST",
1011
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelPendingChange",
1012
+ packageName: PACKAGE_NAME,
1013
+ migrationOptions: {
1014
+ optInTransformResponse: true
1015
+ },
1016
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
1017
+ {
1018
+ protoPath: "/v1/customer_subscriptions/{subscriptionId}/cancel_pending_change",
1019
+ data: payload,
1020
+ host
1021
+ }
1022
+ ),
1023
+ data: payload,
1024
+ transformResponse: (payload2) => transformPaths(payload2, [
1025
+ {
1026
+ transformFn: transformRESTTimestampToSDKTimestamp,
1027
+ paths: [
1028
+ { path: "subscription.createdDate" },
1029
+ { path: "subscription.updatedDate" },
1030
+ { path: "subscription.startDate" },
1031
+ { path: "subscription.endDate" },
1032
+ { path: "subscription.billingStatus.nextBillingDate" },
1033
+ { path: "subscription.billingStatus.previousBillingDate" },
1034
+ {
1035
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
1036
+ },
1037
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
1038
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
1039
+ {
1040
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
1041
+ },
1042
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
1043
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
1044
+ { path: "subscription.pauseInfo.startDate" },
1045
+ { path: "subscription.pauseInfo.resumeDate" },
1046
+ { path: "subscription.cancellationInfo.cancellationDate" },
1047
+ {
1048
+ path: "subscription.specificDatePendingUpdateData.executionDate"
1049
+ }
1050
+ ]
1051
+ }
1052
+ ])
1053
+ };
1054
+ return metadata;
1055
+ }
1056
+ return __customerCancelPendingChange;
1057
+ }
918
1058
  function getSubscription(payload) {
919
1059
  function __getSubscription({ host }) {
920
1060
  const metadata = {
@@ -3616,6 +3756,20 @@ var OrderMethod = /* @__PURE__ */ ((OrderMethod2) => {
3616
3756
  OrderMethod2["NOT_MOTO"] = "NOT_MOTO";
3617
3757
  return OrderMethod2;
3618
3758
  })(OrderMethod || {});
3759
+ var ChangeEffectiveTime = /* @__PURE__ */ ((ChangeEffectiveTime2) => {
3760
+ ChangeEffectiveTime2["UNKNOWN"] = "UNKNOWN";
3761
+ ChangeEffectiveTime2["IMMEDIATELY"] = "IMMEDIATELY";
3762
+ ChangeEffectiveTime2["AT_NEXT_RENEWAL"] = "AT_NEXT_RENEWAL";
3763
+ return ChangeEffectiveTime2;
3764
+ })(ChangeEffectiveTime || {});
3765
+ var ProrationAction = /* @__PURE__ */ ((ProrationAction2) => {
3766
+ ProrationAction2["UNKNOWN"] = "UNKNOWN";
3767
+ ProrationAction2["CHARGE"] = "CHARGE";
3768
+ ProrationAction2["REFUND"] = "REFUND";
3769
+ ProrationAction2["EXTEND_PERIOD"] = "EXTEND_PERIOD";
3770
+ ProrationAction2["NO_CHANGE"] = "NO_CHANGE";
3771
+ return ProrationAction2;
3772
+ })(ProrationAction || {});
3619
3773
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
3620
3774
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
3621
3775
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -3703,12 +3857,6 @@ var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
3703
3857
  RefundReason2["OTHER"] = "OTHER";
3704
3858
  return RefundReason2;
3705
3859
  })(RefundReason || {});
3706
- var ChangeEffectiveTime = /* @__PURE__ */ ((ChangeEffectiveTime2) => {
3707
- ChangeEffectiveTime2["UNKNOWN"] = "UNKNOWN";
3708
- ChangeEffectiveTime2["IMMEDIATELY"] = "IMMEDIATELY";
3709
- ChangeEffectiveTime2["AT_NEXT_RENEWAL"] = "AT_NEXT_RENEWAL";
3710
- return ChangeEffectiveTime2;
3711
- })(ChangeEffectiveTime || {});
3712
3860
  var ProrationBehaviorEnumProrationBehavior = /* @__PURE__ */ ((ProrationBehaviorEnumProrationBehavior2) => {
3713
3861
  ProrationBehaviorEnumProrationBehavior2["UNKNOWN"] = "UNKNOWN";
3714
3862
  ProrationBehaviorEnumProrationBehavior2["PRORATE_AND_CHARGE"] = "PRORATE_AND_CHARGE";
@@ -3717,14 +3865,6 @@ var ProrationBehaviorEnumProrationBehavior = /* @__PURE__ */ ((ProrationBehavior
3717
3865
  ProrationBehaviorEnumProrationBehavior2["NO_PRORATION"] = "NO_PRORATION";
3718
3866
  return ProrationBehaviorEnumProrationBehavior2;
3719
3867
  })(ProrationBehaviorEnumProrationBehavior || {});
3720
- var ProrationAction = /* @__PURE__ */ ((ProrationAction2) => {
3721
- ProrationAction2["UNKNOWN"] = "UNKNOWN";
3722
- ProrationAction2["CHARGE"] = "CHARGE";
3723
- ProrationAction2["REFUND"] = "REFUND";
3724
- ProrationAction2["EXTEND_PERIOD"] = "EXTEND_PERIOD";
3725
- ProrationAction2["NO_CHANGE"] = "NO_CHANGE";
3726
- return ProrationAction2;
3727
- })(ProrationAction || {});
3728
3868
  var ChangeType = /* @__PURE__ */ ((ChangeType2) => {
3729
3869
  ChangeType2["CHANGE_TYPE_UNKNOWN"] = "CHANGE_TYPE_UNKNOWN";
3730
3870
  ChangeType2["UPGRADE"] = "UPGRADE";
@@ -4118,6 +4258,62 @@ function customerUpdateBillingDate2() {
4118
4258
  __originalResponseType: null
4119
4259
  };
4120
4260
  }
4261
+ function customerChangeSubscription2() {
4262
+ const payload = { subscriptionId: ":subscriptionId" };
4263
+ const getRequestOptions = customerChangeSubscription(payload);
4264
+ const getUrl = (context) => {
4265
+ const { url } = getRequestOptions(context);
4266
+ return url;
4267
+ };
4268
+ return {
4269
+ getUrl,
4270
+ httpMethod: "POST",
4271
+ path: "/v1/customer_subscriptions/{subscriptionId}/change",
4272
+ pathParams: { subscriptionId: "subscriptionId" },
4273
+ __requestType: null,
4274
+ __originalRequestType: null,
4275
+ __responseType: null,
4276
+ __originalResponseType: null
4277
+ };
4278
+ }
4279
+ function customerPreviewChangeSubscription2() {
4280
+ const payload = { subscriptionId: ":subscriptionId" };
4281
+ const getRequestOptions = customerPreviewChangeSubscription(
4282
+ payload
4283
+ );
4284
+ const getUrl = (context) => {
4285
+ const { url } = getRequestOptions(context);
4286
+ return url;
4287
+ };
4288
+ return {
4289
+ getUrl,
4290
+ httpMethod: "POST",
4291
+ path: "/v1/customer_subscriptions/{subscriptionId}/preview_change",
4292
+ pathParams: { subscriptionId: "subscriptionId" },
4293
+ __requestType: null,
4294
+ __originalRequestType: null,
4295
+ __responseType: null,
4296
+ __originalResponseType: null
4297
+ };
4298
+ }
4299
+ function customerCancelPendingChange2() {
4300
+ const payload = { subscriptionId: ":subscriptionId" };
4301
+ const getRequestOptions = customerCancelPendingChange(payload);
4302
+ const getUrl = (context) => {
4303
+ const { url } = getRequestOptions(context);
4304
+ return url;
4305
+ };
4306
+ return {
4307
+ getUrl,
4308
+ httpMethod: "POST",
4309
+ path: "/v1/customer_subscriptions/{subscriptionId}/cancel_pending_change",
4310
+ pathParams: { subscriptionId: "subscriptionId" },
4311
+ __requestType: null,
4312
+ __originalRequestType: null,
4313
+ __responseType: null,
4314
+ __originalResponseType: null
4315
+ };
4316
+ }
4121
4317
  function getSubscription2() {
4122
4318
  const payload = { id: ":id" };
4123
4319
  const getRequestOptions = getSubscription(payload);
@@ -4563,14 +4759,17 @@ export {
4563
4759
  cancelSubscription2 as cancelSubscription,
4564
4760
  countSubscriptions2 as countSubscriptions,
4565
4761
  customerAllowedActions2 as customerAllowedActions,
4762
+ customerCancelPendingChange2 as customerCancelPendingChange,
4566
4763
  customerCancelScheduledPause2 as customerCancelScheduledPause,
4567
4764
  customerCancelScheduledSkip2 as customerCancelScheduledSkip,
4568
4765
  customerCancelSubscription2 as customerCancelSubscription,
4766
+ customerChangeSubscription2 as customerChangeSubscription,
4569
4767
  customerExtendSubscription2 as customerExtendSubscription,
4570
4768
  customerGetSubscription2 as customerGetSubscription,
4571
4769
  customerInitiatePaymentMethodSetup2 as customerInitiatePaymentMethodSetup,
4572
4770
  customerListUpcomingCharges2 as customerListUpcomingCharges,
4573
4771
  customerPauseSubscription2 as customerPauseSubscription,
4772
+ customerPreviewChangeSubscription2 as customerPreviewChangeSubscription,
4574
4773
  customerQuerySubscriptions2 as customerQuerySubscriptions,
4575
4774
  customerResumeSubscription2 as customerResumeSubscription,
4576
4775
  customerSkipCycle2 as customerSkipCycle,