@wix/auto_sdk_stores_subscription-options 1.0.30 → 1.0.32

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 +53 -42
  2. package/build/cjs/index.js +293 -234
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +175 -150
  5. package/build/cjs/index.typings.js +255 -205
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +122 -108
  8. package/build/cjs/meta.js +219 -176
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +53 -42
  11. package/build/es/index.mjs +292 -234
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +175 -150
  14. package/build/es/index.typings.mjs +254 -205
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +122 -108
  17. package/build/es/meta.mjs +218 -176
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +53 -42
  20. package/build/internal/cjs/index.js +293 -234
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +175 -150
  23. package/build/internal/cjs/index.typings.js +255 -205
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +122 -108
  26. package/build/internal/cjs/meta.js +219 -176
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +53 -42
  29. package/build/internal/es/index.mjs +292 -234
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +175 -150
  32. package/build/internal/es/index.typings.mjs +254 -205
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +122 -108
  35. package/build/internal/es/meta.mjs +218 -176
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -29,6 +29,7 @@ __export(meta_exports, {
29
29
  bulkUpdateSubscriptionOptions: () => bulkUpdateSubscriptionOptions2,
30
30
  createSubscriptionOption: () => createSubscriptionOption2,
31
31
  deleteSubscriptionOption: () => deleteSubscriptionOption2,
32
+ enableCustomerCancellation: () => enableCustomerCancellation2,
32
33
  getOneTimePurchasesStatus: () => getOneTimePurchasesStatus2,
33
34
  getProductIdsForSubscriptionOption: () => getProductIdsForSubscriptionOption2,
34
35
  getSubscriptionOption: () => getSubscriptionOption2,
@@ -43,35 +44,6 @@ var import_float = require("@wix/sdk-runtime/transformations/float");
43
44
  var import_float2 = require("@wix/sdk-runtime/transformations/float");
44
45
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
45
46
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
46
- function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
47
- const domainToMappings = {
48
- "api._api_base_domain_": [
49
- {
50
- srcPath: "/wix-ecommerce-plans-reader",
51
- destPath: ""
52
- }
53
- ],
54
- "www._base_domain_": [
55
- {
56
- srcPath: "/_api/wix-ecommerce-plans-reader",
57
- destPath: ""
58
- }
59
- ],
60
- _: [
61
- {
62
- srcPath: "/_api/subscription-options-reader-server",
63
- destPath: ""
64
- }
65
- ],
66
- "manage._base_domain_": [
67
- {
68
- srcPath: "/_api/subscription-options-reader-server",
69
- destPath: ""
70
- }
71
- ]
72
- };
73
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
74
- }
75
47
  function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(opts) {
76
48
  const domainToMappings = {
77
49
  "api._api_base_domain_": [
@@ -119,7 +91,136 @@ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUr
119
91
  };
120
92
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
121
93
  }
94
+ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
95
+ const domainToMappings = {
96
+ "api._api_base_domain_": [
97
+ {
98
+ srcPath: "/wix-ecommerce-plans-reader",
99
+ destPath: ""
100
+ }
101
+ ],
102
+ "www._base_domain_": [
103
+ {
104
+ srcPath: "/_api/wix-ecommerce-plans-reader",
105
+ destPath: ""
106
+ }
107
+ ],
108
+ _: [
109
+ {
110
+ srcPath: "/_api/subscription-options-reader-server",
111
+ destPath: ""
112
+ }
113
+ ],
114
+ "manage._base_domain_": [
115
+ {
116
+ srcPath: "/_api/subscription-options-reader-server",
117
+ destPath: ""
118
+ }
119
+ ]
120
+ };
121
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
122
+ }
122
123
  var PACKAGE_NAME = "@wix/auto_sdk_stores_subscription-options";
124
+ function getSubscriptionOption(payload) {
125
+ function __getSubscriptionOption({ host }) {
126
+ const metadata = {
127
+ entityFqdn: "wix.stores.v1.subscription_option",
128
+ method: "GET",
129
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
130
+ packageName: PACKAGE_NAME,
131
+ migrationOptions: {
132
+ optInTransformResponse: true
133
+ },
134
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
135
+ { protoPath: "/v1/subscription-options/{id}", data: payload, host }
136
+ ),
137
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
138
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
139
+ {
140
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
141
+ paths: [{ path: "subscriptionOption.discount.value" }]
142
+ }
143
+ ])
144
+ };
145
+ return metadata;
146
+ }
147
+ return __getSubscriptionOption;
148
+ }
149
+ function getSubscriptionOptionsForProduct(payload) {
150
+ function __getSubscriptionOptionsForProduct({ host }) {
151
+ const metadata = {
152
+ entityFqdn: "wix.stores.v1.subscription_option",
153
+ method: "GET",
154
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
155
+ packageName: PACKAGE_NAME,
156
+ migrationOptions: {
157
+ optInTransformResponse: true
158
+ },
159
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
160
+ {
161
+ protoPath: "/v1/subscription-options/byProduct/{productId}",
162
+ data: payload,
163
+ host
164
+ }
165
+ ),
166
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
167
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
168
+ {
169
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
170
+ paths: [{ path: "subscriptionOptions.discount.value" }]
171
+ }
172
+ ])
173
+ };
174
+ return metadata;
175
+ }
176
+ return __getSubscriptionOptionsForProduct;
177
+ }
178
+ function getProductIdsForSubscriptionOption(payload) {
179
+ function __getProductIdsForSubscriptionOption({ host }) {
180
+ const metadata = {
181
+ entityFqdn: "wix.stores.v1.subscription_option",
182
+ method: "GET",
183
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
184
+ packageName: PACKAGE_NAME,
185
+ migrationOptions: {
186
+ optInTransformResponse: true
187
+ },
188
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
189
+ {
190
+ protoPath: "/v1/subscription-options/{id}/productIds",
191
+ data: payload,
192
+ host
193
+ }
194
+ ),
195
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
196
+ };
197
+ return metadata;
198
+ }
199
+ return __getProductIdsForSubscriptionOption;
200
+ }
201
+ function getOneTimePurchasesStatus(payload) {
202
+ function __getOneTimePurchasesStatus({ host }) {
203
+ const metadata = {
204
+ entityFqdn: "wix.stores.v1.subscription_option",
205
+ method: "GET",
206
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
207
+ packageName: PACKAGE_NAME,
208
+ migrationOptions: {
209
+ optInTransformResponse: true
210
+ },
211
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
212
+ {
213
+ protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
214
+ data: payload,
215
+ host
216
+ }
217
+ ),
218
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
219
+ };
220
+ return metadata;
221
+ }
222
+ return __getOneTimePurchasesStatus;
223
+ }
123
224
  function createSubscriptionOption(payload) {
124
225
  function __createSubscriptionOption({ host }) {
125
226
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -346,105 +447,28 @@ function allowOneTimePurchases(payload) {
346
447
  }
347
448
  return __allowOneTimePurchases;
348
449
  }
349
- function getSubscriptionOption(payload) {
350
- function __getSubscriptionOption({ host }) {
351
- const metadata = {
352
- entityFqdn: "wix.stores.v1.subscription_option",
353
- method: "GET",
354
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
355
- packageName: PACKAGE_NAME,
356
- migrationOptions: {
357
- optInTransformResponse: true
358
- },
359
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
360
- { protoPath: "/v1/subscription-options/{id}", data: payload, host }
361
- ),
362
- params: (0, import_rest_modules.toURLSearchParams)(payload),
363
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
364
- {
365
- transformFn: import_float2.transformRESTFloatToSDKFloat,
366
- paths: [{ path: "subscriptionOption.discount.value" }]
367
- }
368
- ])
369
- };
370
- return metadata;
371
- }
372
- return __getSubscriptionOption;
373
- }
374
- function getSubscriptionOptionsForProduct(payload) {
375
- function __getSubscriptionOptionsForProduct({ host }) {
450
+ function enableCustomerCancellation(payload) {
451
+ function __enableCustomerCancellation({ host }) {
376
452
  const metadata = {
377
453
  entityFqdn: "wix.stores.v1.subscription_option",
378
- method: "GET",
379
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
380
- packageName: PACKAGE_NAME,
381
- migrationOptions: {
382
- optInTransformResponse: true
383
- },
384
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
385
- {
386
- protoPath: "/v1/subscription-options/byProduct/{productId}",
387
- data: payload,
388
- host
389
- }
390
- ),
391
- params: (0, import_rest_modules.toURLSearchParams)(payload),
392
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
393
- {
394
- transformFn: import_float2.transformRESTFloatToSDKFloat,
395
- paths: [{ path: "subscriptionOptions.discount.value" }]
396
- }
397
- ])
398
- };
399
- return metadata;
400
- }
401
- return __getSubscriptionOptionsForProduct;
402
- }
403
- function getProductIdsForSubscriptionOption(payload) {
404
- function __getProductIdsForSubscriptionOption({ host }) {
405
- const metadata = {
406
- entityFqdn: "wix.stores.v1.subscription_option",
407
- method: "GET",
408
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
409
- packageName: PACKAGE_NAME,
410
- migrationOptions: {
411
- optInTransformResponse: true
412
- },
413
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
414
- {
415
- protoPath: "/v1/subscription-options/{id}/productIds",
416
- data: payload,
417
- host
418
- }
419
- ),
420
- params: (0, import_rest_modules.toURLSearchParams)(payload)
421
- };
422
- return metadata;
423
- }
424
- return __getProductIdsForSubscriptionOption;
425
- }
426
- function getOneTimePurchasesStatus(payload) {
427
- function __getOneTimePurchasesStatus({ host }) {
428
- const metadata = {
429
- entityFqdn: "wix.stores.v1.subscription_option",
430
- method: "GET",
431
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
454
+ method: "PATCH",
455
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.EnableCustomerCancellation",
432
456
  packageName: PACKAGE_NAME,
433
457
  migrationOptions: {
434
458
  optInTransformResponse: true
435
459
  },
436
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
460
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
437
461
  {
438
- protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
462
+ protoPath: "/v1/subscription-options/product/{productId}/enableCustomerCancellation",
439
463
  data: payload,
440
464
  host
441
465
  }
442
466
  ),
443
- params: (0, import_rest_modules.toURLSearchParams)(payload)
467
+ data: payload
444
468
  };
445
469
  return metadata;
446
470
  }
447
- return __getOneTimePurchasesStatus;
471
+ return __enableCustomerCancellation;
448
472
  }
449
473
 
450
474
  // src/stores-v1-subscription-option-subscription-options.types.ts
@@ -464,6 +488,82 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
464
488
  })(DiscountType || {});
465
489
 
466
490
  // src/stores-v1-subscription-option-subscription-options.meta.ts
491
+ function getSubscriptionOption2() {
492
+ const payload = { id: ":id" };
493
+ const getRequestOptions = getSubscriptionOption(payload);
494
+ const getUrl = (context) => {
495
+ const { url } = getRequestOptions(context);
496
+ return url;
497
+ };
498
+ return {
499
+ getUrl,
500
+ httpMethod: "GET",
501
+ path: "/v1/subscription-options/{id}",
502
+ pathParams: { id: "id" },
503
+ __requestType: null,
504
+ __originalRequestType: null,
505
+ __responseType: null,
506
+ __originalResponseType: null
507
+ };
508
+ }
509
+ function getSubscriptionOptionsForProduct2() {
510
+ const payload = { productId: ":productId" };
511
+ const getRequestOptions = getSubscriptionOptionsForProduct(
512
+ payload
513
+ );
514
+ const getUrl = (context) => {
515
+ const { url } = getRequestOptions(context);
516
+ return url;
517
+ };
518
+ return {
519
+ getUrl,
520
+ httpMethod: "GET",
521
+ path: "/v1/subscription-options/byProduct/{productId}",
522
+ pathParams: { productId: "productId" },
523
+ __requestType: null,
524
+ __originalRequestType: null,
525
+ __responseType: null,
526
+ __originalResponseType: null
527
+ };
528
+ }
529
+ function getProductIdsForSubscriptionOption2() {
530
+ const payload = { id: ":id" };
531
+ const getRequestOptions = getProductIdsForSubscriptionOption(
532
+ payload
533
+ );
534
+ const getUrl = (context) => {
535
+ const { url } = getRequestOptions(context);
536
+ return url;
537
+ };
538
+ return {
539
+ getUrl,
540
+ httpMethod: "GET",
541
+ path: "/v1/subscription-options/{id}/productIds",
542
+ pathParams: { id: "id" },
543
+ __requestType: null,
544
+ __originalRequestType: null,
545
+ __responseType: null,
546
+ __originalResponseType: null
547
+ };
548
+ }
549
+ function getOneTimePurchasesStatus2() {
550
+ const payload = { productId: ":productId" };
551
+ const getRequestOptions = getOneTimePurchasesStatus(payload);
552
+ const getUrl = (context) => {
553
+ const { url } = getRequestOptions(context);
554
+ return url;
555
+ };
556
+ return {
557
+ getUrl,
558
+ httpMethod: "GET",
559
+ path: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
560
+ pathParams: { productId: "productId" },
561
+ __requestType: null,
562
+ __originalRequestType: null,
563
+ __responseType: null,
564
+ __originalResponseType: null
565
+ };
566
+ }
467
567
  function createSubscriptionOption2() {
468
568
  const payload = {};
469
569
  const getRequestOptions = createSubscriptionOption(payload);
@@ -618,75 +718,17 @@ function allowOneTimePurchases2() {
618
718
  __originalResponseType: null
619
719
  };
620
720
  }
621
- function getSubscriptionOption2() {
622
- const payload = { id: ":id" };
623
- const getRequestOptions = getSubscriptionOption(payload);
624
- const getUrl = (context) => {
625
- const { url } = getRequestOptions(context);
626
- return url;
627
- };
628
- return {
629
- getUrl,
630
- httpMethod: "GET",
631
- path: "/v1/subscription-options/{id}",
632
- pathParams: { id: "id" },
633
- __requestType: null,
634
- __originalRequestType: null,
635
- __responseType: null,
636
- __originalResponseType: null
637
- };
638
- }
639
- function getSubscriptionOptionsForProduct2() {
640
- const payload = { productId: ":productId" };
641
- const getRequestOptions = getSubscriptionOptionsForProduct(
642
- payload
643
- );
644
- const getUrl = (context) => {
645
- const { url } = getRequestOptions(context);
646
- return url;
647
- };
648
- return {
649
- getUrl,
650
- httpMethod: "GET",
651
- path: "/v1/subscription-options/byProduct/{productId}",
652
- pathParams: { productId: "productId" },
653
- __requestType: null,
654
- __originalRequestType: null,
655
- __responseType: null,
656
- __originalResponseType: null
657
- };
658
- }
659
- function getProductIdsForSubscriptionOption2() {
660
- const payload = { id: ":id" };
661
- const getRequestOptions = getProductIdsForSubscriptionOption(
662
- payload
663
- );
664
- const getUrl = (context) => {
665
- const { url } = getRequestOptions(context);
666
- return url;
667
- };
668
- return {
669
- getUrl,
670
- httpMethod: "GET",
671
- path: "/v1/subscription-options/{id}/productIds",
672
- pathParams: { id: "id" },
673
- __requestType: null,
674
- __originalRequestType: null,
675
- __responseType: null,
676
- __originalResponseType: null
677
- };
678
- }
679
- function getOneTimePurchasesStatus2() {
721
+ function enableCustomerCancellation2() {
680
722
  const payload = { productId: ":productId" };
681
- const getRequestOptions = getOneTimePurchasesStatus(payload);
723
+ const getRequestOptions = enableCustomerCancellation(payload);
682
724
  const getUrl = (context) => {
683
725
  const { url } = getRequestOptions(context);
684
726
  return url;
685
727
  };
686
728
  return {
687
729
  getUrl,
688
- httpMethod: "GET",
689
- path: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
730
+ httpMethod: "PATCH",
731
+ path: "/v1/subscription-options/product/{productId}/enableCustomerCancellation",
690
732
  pathParams: { productId: "productId" },
691
733
  __requestType: null,
692
734
  __originalRequestType: null,
@@ -705,6 +747,7 @@ function getOneTimePurchasesStatus2() {
705
747
  bulkUpdateSubscriptionOptions,
706
748
  createSubscriptionOption,
707
749
  deleteSubscriptionOption,
750
+ enableCustomerCancellation,
708
751
  getOneTimePurchasesStatus,
709
752
  getProductIdsForSubscriptionOption,
710
753
  getSubscriptionOption,