@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
@@ -4,35 +4,6 @@ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/f
4
4
  import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
5
5
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
6
6
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
7
- function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
8
- const domainToMappings = {
9
- "api._api_base_domain_": [
10
- {
11
- srcPath: "/wix-ecommerce-plans-reader",
12
- destPath: ""
13
- }
14
- ],
15
- "www._base_domain_": [
16
- {
17
- srcPath: "/_api/wix-ecommerce-plans-reader",
18
- destPath: ""
19
- }
20
- ],
21
- _: [
22
- {
23
- srcPath: "/_api/subscription-options-reader-server",
24
- destPath: ""
25
- }
26
- ],
27
- "manage._base_domain_": [
28
- {
29
- srcPath: "/_api/subscription-options-reader-server",
30
- destPath: ""
31
- }
32
- ]
33
- };
34
- return resolveUrl(Object.assign(opts, { domainToMappings }));
35
- }
36
7
  function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(opts) {
37
8
  const domainToMappings = {
38
9
  "api._api_base_domain_": [
@@ -80,7 +51,136 @@ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUr
80
51
  };
81
52
  return resolveUrl(Object.assign(opts, { domainToMappings }));
82
53
  }
54
+ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
55
+ const domainToMappings = {
56
+ "api._api_base_domain_": [
57
+ {
58
+ srcPath: "/wix-ecommerce-plans-reader",
59
+ destPath: ""
60
+ }
61
+ ],
62
+ "www._base_domain_": [
63
+ {
64
+ srcPath: "/_api/wix-ecommerce-plans-reader",
65
+ destPath: ""
66
+ }
67
+ ],
68
+ _: [
69
+ {
70
+ srcPath: "/_api/subscription-options-reader-server",
71
+ destPath: ""
72
+ }
73
+ ],
74
+ "manage._base_domain_": [
75
+ {
76
+ srcPath: "/_api/subscription-options-reader-server",
77
+ destPath: ""
78
+ }
79
+ ]
80
+ };
81
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
82
+ }
83
83
  var PACKAGE_NAME = "@wix/auto_sdk_stores_subscription-options";
84
+ function getSubscriptionOption(payload) {
85
+ function __getSubscriptionOption({ host }) {
86
+ const metadata = {
87
+ entityFqdn: "wix.stores.v1.subscription_option",
88
+ method: "GET",
89
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
90
+ packageName: PACKAGE_NAME,
91
+ migrationOptions: {
92
+ optInTransformResponse: true
93
+ },
94
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
95
+ { protoPath: "/v1/subscription-options/{id}", data: payload, host }
96
+ ),
97
+ params: toURLSearchParams(payload),
98
+ transformResponse: (payload2) => transformPaths(payload2, [
99
+ {
100
+ transformFn: transformRESTFloatToSDKFloat,
101
+ paths: [{ path: "subscriptionOption.discount.value" }]
102
+ }
103
+ ])
104
+ };
105
+ return metadata;
106
+ }
107
+ return __getSubscriptionOption;
108
+ }
109
+ function getSubscriptionOptionsForProduct(payload) {
110
+ function __getSubscriptionOptionsForProduct({ host }) {
111
+ const metadata = {
112
+ entityFqdn: "wix.stores.v1.subscription_option",
113
+ method: "GET",
114
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
115
+ packageName: PACKAGE_NAME,
116
+ migrationOptions: {
117
+ optInTransformResponse: true
118
+ },
119
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
120
+ {
121
+ protoPath: "/v1/subscription-options/byProduct/{productId}",
122
+ data: payload,
123
+ host
124
+ }
125
+ ),
126
+ params: toURLSearchParams(payload),
127
+ transformResponse: (payload2) => transformPaths(payload2, [
128
+ {
129
+ transformFn: transformRESTFloatToSDKFloat,
130
+ paths: [{ path: "subscriptionOptions.discount.value" }]
131
+ }
132
+ ])
133
+ };
134
+ return metadata;
135
+ }
136
+ return __getSubscriptionOptionsForProduct;
137
+ }
138
+ function getProductIdsForSubscriptionOption(payload) {
139
+ function __getProductIdsForSubscriptionOption({ host }) {
140
+ const metadata = {
141
+ entityFqdn: "wix.stores.v1.subscription_option",
142
+ method: "GET",
143
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
144
+ packageName: PACKAGE_NAME,
145
+ migrationOptions: {
146
+ optInTransformResponse: true
147
+ },
148
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
149
+ {
150
+ protoPath: "/v1/subscription-options/{id}/productIds",
151
+ data: payload,
152
+ host
153
+ }
154
+ ),
155
+ params: toURLSearchParams(payload)
156
+ };
157
+ return metadata;
158
+ }
159
+ return __getProductIdsForSubscriptionOption;
160
+ }
161
+ function getOneTimePurchasesStatus(payload) {
162
+ function __getOneTimePurchasesStatus({ host }) {
163
+ const metadata = {
164
+ entityFqdn: "wix.stores.v1.subscription_option",
165
+ method: "GET",
166
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
167
+ packageName: PACKAGE_NAME,
168
+ migrationOptions: {
169
+ optInTransformResponse: true
170
+ },
171
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
172
+ {
173
+ protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
174
+ data: payload,
175
+ host
176
+ }
177
+ ),
178
+ params: toURLSearchParams(payload)
179
+ };
180
+ return metadata;
181
+ }
182
+ return __getOneTimePurchasesStatus;
183
+ }
84
184
  function createSubscriptionOption(payload) {
85
185
  function __createSubscriptionOption({ host }) {
86
186
  const serializedData = transformPaths(payload, [
@@ -307,105 +407,28 @@ function allowOneTimePurchases(payload) {
307
407
  }
308
408
  return __allowOneTimePurchases;
309
409
  }
310
- function getSubscriptionOption(payload) {
311
- function __getSubscriptionOption({ host }) {
312
- const metadata = {
313
- entityFqdn: "wix.stores.v1.subscription_option",
314
- method: "GET",
315
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
316
- packageName: PACKAGE_NAME,
317
- migrationOptions: {
318
- optInTransformResponse: true
319
- },
320
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
321
- { protoPath: "/v1/subscription-options/{id}", data: payload, host }
322
- ),
323
- params: toURLSearchParams(payload),
324
- transformResponse: (payload2) => transformPaths(payload2, [
325
- {
326
- transformFn: transformRESTFloatToSDKFloat,
327
- paths: [{ path: "subscriptionOption.discount.value" }]
328
- }
329
- ])
330
- };
331
- return metadata;
332
- }
333
- return __getSubscriptionOption;
334
- }
335
- function getSubscriptionOptionsForProduct(payload) {
336
- function __getSubscriptionOptionsForProduct({ host }) {
410
+ function enableCustomerCancellation(payload) {
411
+ function __enableCustomerCancellation({ host }) {
337
412
  const metadata = {
338
413
  entityFqdn: "wix.stores.v1.subscription_option",
339
- method: "GET",
340
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
341
- packageName: PACKAGE_NAME,
342
- migrationOptions: {
343
- optInTransformResponse: true
344
- },
345
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
346
- {
347
- protoPath: "/v1/subscription-options/byProduct/{productId}",
348
- data: payload,
349
- host
350
- }
351
- ),
352
- params: toURLSearchParams(payload),
353
- transformResponse: (payload2) => transformPaths(payload2, [
354
- {
355
- transformFn: transformRESTFloatToSDKFloat,
356
- paths: [{ path: "subscriptionOptions.discount.value" }]
357
- }
358
- ])
359
- };
360
- return metadata;
361
- }
362
- return __getSubscriptionOptionsForProduct;
363
- }
364
- function getProductIdsForSubscriptionOption(payload) {
365
- function __getProductIdsForSubscriptionOption({ host }) {
366
- const metadata = {
367
- entityFqdn: "wix.stores.v1.subscription_option",
368
- method: "GET",
369
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
370
- packageName: PACKAGE_NAME,
371
- migrationOptions: {
372
- optInTransformResponse: true
373
- },
374
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
375
- {
376
- protoPath: "/v1/subscription-options/{id}/productIds",
377
- data: payload,
378
- host
379
- }
380
- ),
381
- params: toURLSearchParams(payload)
382
- };
383
- return metadata;
384
- }
385
- return __getProductIdsForSubscriptionOption;
386
- }
387
- function getOneTimePurchasesStatus(payload) {
388
- function __getOneTimePurchasesStatus({ host }) {
389
- const metadata = {
390
- entityFqdn: "wix.stores.v1.subscription_option",
391
- method: "GET",
392
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
414
+ method: "PATCH",
415
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.EnableCustomerCancellation",
393
416
  packageName: PACKAGE_NAME,
394
417
  migrationOptions: {
395
418
  optInTransformResponse: true
396
419
  },
397
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
420
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
398
421
  {
399
- protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
422
+ protoPath: "/v1/subscription-options/product/{productId}/enableCustomerCancellation",
400
423
  data: payload,
401
424
  host
402
425
  }
403
426
  ),
404
- params: toURLSearchParams(payload)
427
+ data: payload
405
428
  };
406
429
  return metadata;
407
430
  }
408
- return __getOneTimePurchasesStatus;
431
+ return __enableCustomerCancellation;
409
432
  }
410
433
 
411
434
  // src/stores-v1-subscription-option-subscription-options.types.ts
@@ -425,6 +448,82 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
425
448
  })(DiscountType || {});
426
449
 
427
450
  // src/stores-v1-subscription-option-subscription-options.meta.ts
451
+ function getSubscriptionOption2() {
452
+ const payload = { id: ":id" };
453
+ const getRequestOptions = getSubscriptionOption(payload);
454
+ const getUrl = (context) => {
455
+ const { url } = getRequestOptions(context);
456
+ return url;
457
+ };
458
+ return {
459
+ getUrl,
460
+ httpMethod: "GET",
461
+ path: "/v1/subscription-options/{id}",
462
+ pathParams: { id: "id" },
463
+ __requestType: null,
464
+ __originalRequestType: null,
465
+ __responseType: null,
466
+ __originalResponseType: null
467
+ };
468
+ }
469
+ function getSubscriptionOptionsForProduct2() {
470
+ const payload = { productId: ":productId" };
471
+ const getRequestOptions = getSubscriptionOptionsForProduct(
472
+ payload
473
+ );
474
+ const getUrl = (context) => {
475
+ const { url } = getRequestOptions(context);
476
+ return url;
477
+ };
478
+ return {
479
+ getUrl,
480
+ httpMethod: "GET",
481
+ path: "/v1/subscription-options/byProduct/{productId}",
482
+ pathParams: { productId: "productId" },
483
+ __requestType: null,
484
+ __originalRequestType: null,
485
+ __responseType: null,
486
+ __originalResponseType: null
487
+ };
488
+ }
489
+ function getProductIdsForSubscriptionOption2() {
490
+ const payload = { id: ":id" };
491
+ const getRequestOptions = getProductIdsForSubscriptionOption(
492
+ payload
493
+ );
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}/productIds",
502
+ pathParams: { id: "id" },
503
+ __requestType: null,
504
+ __originalRequestType: null,
505
+ __responseType: null,
506
+ __originalResponseType: null
507
+ };
508
+ }
509
+ function getOneTimePurchasesStatus2() {
510
+ const payload = { productId: ":productId" };
511
+ const getRequestOptions = getOneTimePurchasesStatus(payload);
512
+ const getUrl = (context) => {
513
+ const { url } = getRequestOptions(context);
514
+ return url;
515
+ };
516
+ return {
517
+ getUrl,
518
+ httpMethod: "GET",
519
+ path: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
520
+ pathParams: { productId: "productId" },
521
+ __requestType: null,
522
+ __originalRequestType: null,
523
+ __responseType: null,
524
+ __originalResponseType: null
525
+ };
526
+ }
428
527
  function createSubscriptionOption2() {
429
528
  const payload = {};
430
529
  const getRequestOptions = createSubscriptionOption(payload);
@@ -579,75 +678,17 @@ function allowOneTimePurchases2() {
579
678
  __originalResponseType: null
580
679
  };
581
680
  }
582
- function getSubscriptionOption2() {
583
- const payload = { id: ":id" };
584
- const getRequestOptions = getSubscriptionOption(payload);
585
- const getUrl = (context) => {
586
- const { url } = getRequestOptions(context);
587
- return url;
588
- };
589
- return {
590
- getUrl,
591
- httpMethod: "GET",
592
- path: "/v1/subscription-options/{id}",
593
- pathParams: { id: "id" },
594
- __requestType: null,
595
- __originalRequestType: null,
596
- __responseType: null,
597
- __originalResponseType: null
598
- };
599
- }
600
- function getSubscriptionOptionsForProduct2() {
601
- const payload = { productId: ":productId" };
602
- const getRequestOptions = getSubscriptionOptionsForProduct(
603
- payload
604
- );
605
- const getUrl = (context) => {
606
- const { url } = getRequestOptions(context);
607
- return url;
608
- };
609
- return {
610
- getUrl,
611
- httpMethod: "GET",
612
- path: "/v1/subscription-options/byProduct/{productId}",
613
- pathParams: { productId: "productId" },
614
- __requestType: null,
615
- __originalRequestType: null,
616
- __responseType: null,
617
- __originalResponseType: null
618
- };
619
- }
620
- function getProductIdsForSubscriptionOption2() {
621
- const payload = { id: ":id" };
622
- const getRequestOptions = getProductIdsForSubscriptionOption(
623
- payload
624
- );
625
- const getUrl = (context) => {
626
- const { url } = getRequestOptions(context);
627
- return url;
628
- };
629
- return {
630
- getUrl,
631
- httpMethod: "GET",
632
- path: "/v1/subscription-options/{id}/productIds",
633
- pathParams: { id: "id" },
634
- __requestType: null,
635
- __originalRequestType: null,
636
- __responseType: null,
637
- __originalResponseType: null
638
- };
639
- }
640
- function getOneTimePurchasesStatus2() {
681
+ function enableCustomerCancellation2() {
641
682
  const payload = { productId: ":productId" };
642
- const getRequestOptions = getOneTimePurchasesStatus(payload);
683
+ const getRequestOptions = enableCustomerCancellation(payload);
643
684
  const getUrl = (context) => {
644
685
  const { url } = getRequestOptions(context);
645
686
  return url;
646
687
  };
647
688
  return {
648
689
  getUrl,
649
- httpMethod: "GET",
650
- path: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
690
+ httpMethod: "PATCH",
691
+ path: "/v1/subscription-options/product/{productId}/enableCustomerCancellation",
651
692
  pathParams: { productId: "productId" },
652
693
  __requestType: null,
653
694
  __originalRequestType: null,
@@ -665,6 +706,7 @@ export {
665
706
  bulkUpdateSubscriptionOptions2 as bulkUpdateSubscriptionOptions,
666
707
  createSubscriptionOption2 as createSubscriptionOption,
667
708
  deleteSubscriptionOption2 as deleteSubscriptionOption,
709
+ enableCustomerCancellation2 as enableCustomerCancellation,
668
710
  getOneTimePurchasesStatus2 as getOneTimePurchasesStatus,
669
711
  getProductIdsForSubscriptionOption2 as getProductIdsForSubscriptionOption,
670
712
  getSubscriptionOption2 as getSubscriptionOption,