@wix/auto_sdk_stores_subscription-options 1.0.40 → 1.0.42

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 +42 -53
  2. package/build/cjs/index.js +234 -293
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +150 -175
  5. package/build/cjs/index.typings.js +205 -255
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +108 -122
  8. package/build/cjs/meta.js +176 -219
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +42 -53
  11. package/build/es/index.mjs +234 -292
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +150 -175
  14. package/build/es/index.typings.mjs +205 -254
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +108 -122
  17. package/build/es/meta.mjs +176 -218
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +42 -53
  20. package/build/internal/cjs/index.js +234 -293
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +150 -175
  23. package/build/internal/cjs/index.typings.js +205 -255
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +108 -122
  26. package/build/internal/cjs/meta.js +176 -219
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +42 -53
  29. package/build/internal/es/index.mjs +234 -292
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +150 -175
  32. package/build/internal/es/index.typings.mjs +205 -254
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +108 -122
  35. package/build/internal/es/meta.mjs +176 -218
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
package/build/es/meta.mjs CHANGED
@@ -4,76 +4,76 @@ 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 resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(opts) {
7
+ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
8
8
  const domainToMappings = {
9
9
  "api._api_base_domain_": [
10
10
  {
11
- srcPath: "/wix-ecommerce-plans",
11
+ srcPath: "/wix-ecommerce-plans-reader",
12
12
  destPath: ""
13
13
  }
14
14
  ],
15
- "www.wixapis.com": [
15
+ "www._base_domain_": [
16
16
  {
17
- srcPath: "/stores/v1/subscription-options",
18
- destPath: "/v1/subscription-options"
17
+ srcPath: "/_api/wix-ecommerce-plans-reader",
18
+ destPath: ""
19
19
  }
20
20
  ],
21
- "www._base_domain_": [
21
+ _: [
22
22
  {
23
- srcPath: "/_api/subscription-options-server",
23
+ srcPath: "/_api/subscription-options-reader-server",
24
24
  destPath: ""
25
25
  }
26
26
  ],
27
- "editor._base_domain_": [
27
+ "manage._base_domain_": [
28
28
  {
29
- srcPath: "/_api/subscription-options-server",
29
+ srcPath: "/_api/subscription-options-reader-server",
30
30
  destPath: ""
31
31
  }
32
- ],
33
- "blocks._base_domain_": [
32
+ ]
33
+ };
34
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
35
+ }
36
+ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(opts) {
37
+ const domainToMappings = {
38
+ "api._api_base_domain_": [
34
39
  {
35
- srcPath: "/_api/subscription-options-server",
40
+ srcPath: "/wix-ecommerce-plans",
36
41
  destPath: ""
37
42
  }
38
43
  ],
39
- "create.editorx": [
44
+ "www.wixapis.com": [
40
45
  {
41
- srcPath: "/_api/subscription-options-server",
42
- destPath: ""
46
+ srcPath: "/stores/v1/subscription-options",
47
+ destPath: "/v1/subscription-options"
43
48
  }
44
49
  ],
45
- "manage._base_domain_": [
50
+ "www._base_domain_": [
46
51
  {
47
52
  srcPath: "/_api/subscription-options-server",
48
53
  destPath: ""
49
54
  }
50
- ]
51
- };
52
- return resolveUrl(Object.assign(opts, { domainToMappings }));
53
- }
54
- function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
55
- const domainToMappings = {
56
- "api._api_base_domain_": [
55
+ ],
56
+ "editor._base_domain_": [
57
57
  {
58
- srcPath: "/wix-ecommerce-plans-reader",
58
+ srcPath: "/_api/subscription-options-server",
59
59
  destPath: ""
60
60
  }
61
61
  ],
62
- "www._base_domain_": [
62
+ "blocks._base_domain_": [
63
63
  {
64
- srcPath: "/_api/wix-ecommerce-plans-reader",
64
+ srcPath: "/_api/subscription-options-server",
65
65
  destPath: ""
66
66
  }
67
67
  ],
68
- _: [
68
+ "create.editorx": [
69
69
  {
70
- srcPath: "/_api/subscription-options-reader-server",
70
+ srcPath: "/_api/subscription-options-server",
71
71
  destPath: ""
72
72
  }
73
73
  ],
74
74
  "manage._base_domain_": [
75
75
  {
76
- srcPath: "/_api/subscription-options-reader-server",
76
+ srcPath: "/_api/subscription-options-server",
77
77
  destPath: ""
78
78
  }
79
79
  ]
@@ -81,106 +81,6 @@ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl
81
81
  return resolveUrl(Object.assign(opts, { domainToMappings }));
82
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
- }
184
84
  function createSubscriptionOption(payload) {
185
85
  function __createSubscriptionOption({ host }) {
186
86
  const serializedData = transformPaths(payload, [
@@ -407,28 +307,105 @@ function allowOneTimePurchases(payload) {
407
307
  }
408
308
  return __allowOneTimePurchases;
409
309
  }
410
- function enableCustomerCancellation(payload) {
411
- function __enableCustomerCancellation({ host }) {
310
+ function getSubscriptionOption(payload) {
311
+ function __getSubscriptionOption({ host }) {
412
312
  const metadata = {
413
313
  entityFqdn: "wix.stores.v1.subscription_option",
414
- method: "PATCH",
415
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.EnableCustomerCancellation",
314
+ method: "GET",
315
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
416
316
  packageName: PACKAGE_NAME,
417
317
  migrationOptions: {
418
318
  optInTransformResponse: true
419
319
  },
420
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
320
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
321
+ { protoPath: "/v1/subscription-options/{id}", data: payload, host }
322
+ ),
323
+ params: toURLSearchParams(payload),
324
+ transformResponse: (payload2) => transformPaths(payload2, [
421
325
  {
422
- protoPath: "/v1/subscription-options/product/{productId}/enableCustomerCancellation",
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 }) {
337
+ const metadata = {
338
+ 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}",
423
348
  data: payload,
424
349
  host
425
350
  }
426
351
  ),
427
- data: payload
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",
393
+ packageName: PACKAGE_NAME,
394
+ migrationOptions: {
395
+ optInTransformResponse: true
396
+ },
397
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
398
+ {
399
+ protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
400
+ data: payload,
401
+ host
402
+ }
403
+ ),
404
+ params: toURLSearchParams(payload)
428
405
  };
429
406
  return metadata;
430
407
  }
431
- return __enableCustomerCancellation;
408
+ return __getOneTimePurchasesStatus;
432
409
  }
433
410
 
434
411
  // src/stores-v1-subscription-option-subscription-options.types.ts
@@ -448,82 +425,6 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
448
425
  })(DiscountType || {});
449
426
 
450
427
  // 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
- }
527
428
  function createSubscriptionOption2() {
528
429
  const payload = {};
529
430
  const getRequestOptions = createSubscriptionOption(payload);
@@ -678,17 +579,75 @@ function allowOneTimePurchases2() {
678
579
  __originalResponseType: null
679
580
  };
680
581
  }
681
- function enableCustomerCancellation2() {
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() {
682
641
  const payload = { productId: ":productId" };
683
- const getRequestOptions = enableCustomerCancellation(payload);
642
+ const getRequestOptions = getOneTimePurchasesStatus(payload);
684
643
  const getUrl = (context) => {
685
644
  const { url } = getRequestOptions(context);
686
645
  return url;
687
646
  };
688
647
  return {
689
648
  getUrl,
690
- httpMethod: "PATCH",
691
- path: "/v1/subscription-options/product/{productId}/enableCustomerCancellation",
649
+ httpMethod: "GET",
650
+ path: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
692
651
  pathParams: { productId: "productId" },
693
652
  __requestType: null,
694
653
  __originalRequestType: null,
@@ -706,7 +665,6 @@ export {
706
665
  bulkUpdateSubscriptionOptions2 as bulkUpdateSubscriptionOptions,
707
666
  createSubscriptionOption2 as createSubscriptionOption,
708
667
  deleteSubscriptionOption2 as deleteSubscriptionOption,
709
- enableCustomerCancellation2 as enableCustomerCancellation,
710
668
  getOneTimePurchasesStatus2 as getOneTimePurchasesStatus,
711
669
  getProductIdsForSubscriptionOption2 as getProductIdsForSubscriptionOption,
712
670
  getSubscriptionOption2 as getSubscriptionOption,