@wix/auto_sdk_stores_subscription-options 1.0.49 → 1.0.51

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 +45 -45
  2. package/build/cjs/index.js +274 -274
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +157 -157
  5. package/build/cjs/index.typings.js +230 -230
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +108 -108
  8. package/build/cjs/meta.js +204 -204
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +45 -45
  11. package/build/es/index.mjs +274 -274
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +157 -157
  14. package/build/es/index.typings.mjs +230 -230
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +108 -108
  17. package/build/es/meta.mjs +204 -204
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +45 -45
  20. package/build/internal/cjs/index.js +274 -274
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +157 -157
  23. package/build/internal/cjs/index.typings.js +230 -230
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +108 -108
  26. package/build/internal/cjs/meta.js +204 -204
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +45 -45
  29. package/build/internal/es/index.mjs +274 -274
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +157 -157
  32. package/build/internal/es/index.typings.mjs +230 -230
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +108 -108
  35. package/build/internal/es/meta.mjs +204 -204
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +4 -4
@@ -11,35 +11,6 @@ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/f
11
11
  import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
12
12
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
13
13
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
14
- function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
15
- const domainToMappings = {
16
- "api._api_base_domain_": [
17
- {
18
- srcPath: "/wix-ecommerce-plans-reader",
19
- destPath: ""
20
- }
21
- ],
22
- "www._base_domain_": [
23
- {
24
- srcPath: "/_api/wix-ecommerce-plans-reader",
25
- destPath: ""
26
- }
27
- ],
28
- _: [
29
- {
30
- srcPath: "/_api/subscription-options-reader-server",
31
- destPath: ""
32
- }
33
- ],
34
- "manage._base_domain_": [
35
- {
36
- srcPath: "/_api/subscription-options-reader-server",
37
- destPath: ""
38
- }
39
- ]
40
- };
41
- return resolveUrl(Object.assign(opts, { domainToMappings }));
42
- }
43
14
  function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(opts) {
44
15
  const domainToMappings = {
45
16
  "api._api_base_domain_": [
@@ -87,7 +58,136 @@ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUr
87
58
  };
88
59
  return resolveUrl(Object.assign(opts, { domainToMappings }));
89
60
  }
61
+ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
62
+ const domainToMappings = {
63
+ "api._api_base_domain_": [
64
+ {
65
+ srcPath: "/wix-ecommerce-plans-reader",
66
+ destPath: ""
67
+ }
68
+ ],
69
+ "www._base_domain_": [
70
+ {
71
+ srcPath: "/_api/wix-ecommerce-plans-reader",
72
+ destPath: ""
73
+ }
74
+ ],
75
+ _: [
76
+ {
77
+ srcPath: "/_api/subscription-options-reader-server",
78
+ destPath: ""
79
+ }
80
+ ],
81
+ "manage._base_domain_": [
82
+ {
83
+ srcPath: "/_api/subscription-options-reader-server",
84
+ destPath: ""
85
+ }
86
+ ]
87
+ };
88
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
89
+ }
90
90
  var PACKAGE_NAME = "@wix/auto_sdk_stores_subscription-options";
91
+ function getSubscriptionOption(payload) {
92
+ function __getSubscriptionOption({ host }) {
93
+ const metadata = {
94
+ entityFqdn: "wix.stores.v1.subscription_option",
95
+ method: "GET",
96
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
97
+ packageName: PACKAGE_NAME,
98
+ migrationOptions: {
99
+ optInTransformResponse: true
100
+ },
101
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
102
+ { protoPath: "/v1/subscription-options/{id}", data: payload, host }
103
+ ),
104
+ params: toURLSearchParams(payload),
105
+ transformResponse: (payload2) => transformPaths(payload2, [
106
+ {
107
+ transformFn: transformRESTFloatToSDKFloat,
108
+ paths: [{ path: "subscriptionOption.discount.value" }]
109
+ }
110
+ ])
111
+ };
112
+ return metadata;
113
+ }
114
+ return __getSubscriptionOption;
115
+ }
116
+ function getSubscriptionOptionsForProduct(payload) {
117
+ function __getSubscriptionOptionsForProduct({ host }) {
118
+ const metadata = {
119
+ entityFqdn: "wix.stores.v1.subscription_option",
120
+ method: "GET",
121
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
122
+ packageName: PACKAGE_NAME,
123
+ migrationOptions: {
124
+ optInTransformResponse: true
125
+ },
126
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
127
+ {
128
+ protoPath: "/v1/subscription-options/byProduct/{productId}",
129
+ data: payload,
130
+ host
131
+ }
132
+ ),
133
+ params: toURLSearchParams(payload),
134
+ transformResponse: (payload2) => transformPaths(payload2, [
135
+ {
136
+ transformFn: transformRESTFloatToSDKFloat,
137
+ paths: [{ path: "subscriptionOptions.discount.value" }]
138
+ }
139
+ ])
140
+ };
141
+ return metadata;
142
+ }
143
+ return __getSubscriptionOptionsForProduct;
144
+ }
145
+ function getProductIdsForSubscriptionOption(payload) {
146
+ function __getProductIdsForSubscriptionOption({ host }) {
147
+ const metadata = {
148
+ entityFqdn: "wix.stores.v1.subscription_option",
149
+ method: "GET",
150
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
151
+ packageName: PACKAGE_NAME,
152
+ migrationOptions: {
153
+ optInTransformResponse: true
154
+ },
155
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
156
+ {
157
+ protoPath: "/v1/subscription-options/{id}/productIds",
158
+ data: payload,
159
+ host
160
+ }
161
+ ),
162
+ params: toURLSearchParams(payload)
163
+ };
164
+ return metadata;
165
+ }
166
+ return __getProductIdsForSubscriptionOption;
167
+ }
168
+ function getOneTimePurchasesStatus(payload) {
169
+ function __getOneTimePurchasesStatus({ host }) {
170
+ const metadata = {
171
+ entityFqdn: "wix.stores.v1.subscription_option",
172
+ method: "GET",
173
+ methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
174
+ packageName: PACKAGE_NAME,
175
+ migrationOptions: {
176
+ optInTransformResponse: true
177
+ },
178
+ url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
179
+ {
180
+ protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
181
+ data: payload,
182
+ host
183
+ }
184
+ ),
185
+ params: toURLSearchParams(payload)
186
+ };
187
+ return metadata;
188
+ }
189
+ return __getOneTimePurchasesStatus;
190
+ }
91
191
  function createSubscriptionOption(payload) {
92
192
  function __createSubscriptionOption({ host }) {
93
193
  const serializedData = transformPaths(payload, [
@@ -314,122 +414,134 @@ function allowOneTimePurchases(payload) {
314
414
  }
315
415
  return __allowOneTimePurchases;
316
416
  }
317
- function getSubscriptionOption(payload) {
318
- function __getSubscriptionOption({ host }) {
319
- const metadata = {
320
- entityFqdn: "wix.stores.v1.subscription_option",
321
- method: "GET",
322
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
323
- packageName: PACKAGE_NAME,
324
- migrationOptions: {
325
- optInTransformResponse: true
417
+
418
+ // src/stores-v1-subscription-option-subscription-options.universal.ts
419
+ var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
420
+ SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
421
+ SubscriptionFrequency2["DAY"] = "DAY";
422
+ SubscriptionFrequency2["WEEK"] = "WEEK";
423
+ SubscriptionFrequency2["MONTH"] = "MONTH";
424
+ SubscriptionFrequency2["YEAR"] = "YEAR";
425
+ return SubscriptionFrequency2;
426
+ })(SubscriptionFrequency || {});
427
+ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
428
+ DiscountType2["UNDEFINED"] = "UNDEFINED";
429
+ DiscountType2["AMOUNT"] = "AMOUNT";
430
+ DiscountType2["PERCENT"] = "PERCENT";
431
+ return DiscountType2;
432
+ })(DiscountType || {});
433
+ async function getSubscriptionOption2(_id) {
434
+ const { httpClient, sideEffects } = arguments[1];
435
+ const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
436
+ const reqOpts = getSubscriptionOption(payload);
437
+ sideEffects?.onSiteCall?.();
438
+ try {
439
+ const result = await httpClient.request(reqOpts);
440
+ sideEffects?.onSuccess?.(result);
441
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.subscriptionOption;
442
+ } catch (err) {
443
+ const transformedError = sdkTransformError(
444
+ err,
445
+ {
446
+ spreadPathsToArguments: {},
447
+ explicitPathsToArguments: { id: "$[0]" },
448
+ singleArgumentUnchanged: false
326
449
  },
327
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
328
- { protoPath: "/v1/subscription-options/{id}", data: payload, host }
329
- ),
330
- params: toURLSearchParams(payload),
331
- transformResponse: (payload2) => transformPaths(payload2, [
332
- {
333
- transformFn: transformRESTFloatToSDKFloat,
334
- paths: [{ path: "subscriptionOption.discount.value" }]
335
- }
336
- ])
337
- };
338
- return metadata;
450
+ ["_id"]
451
+ );
452
+ sideEffects?.onError?.(err);
453
+ throw transformedError;
339
454
  }
340
- return __getSubscriptionOption;
341
455
  }
342
- function getSubscriptionOptionsForProduct(payload) {
343
- function __getSubscriptionOptionsForProduct({ host }) {
344
- const metadata = {
345
- entityFqdn: "wix.stores.v1.subscription_option",
346
- method: "GET",
347
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
348
- packageName: PACKAGE_NAME,
349
- migrationOptions: {
350
- optInTransformResponse: true
456
+ async function getSubscriptionOptionsForProduct2(productId, options) {
457
+ const { httpClient, sideEffects } = arguments[2];
458
+ const payload = renameKeysFromSDKRequestToRESTRequest({
459
+ productId,
460
+ includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
461
+ });
462
+ const reqOpts = getSubscriptionOptionsForProduct(
463
+ payload
464
+ );
465
+ sideEffects?.onSiteCall?.();
466
+ try {
467
+ const result = await httpClient.request(reqOpts);
468
+ sideEffects?.onSuccess?.(result);
469
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
470
+ } catch (err) {
471
+ const transformedError = sdkTransformError(
472
+ err,
473
+ {
474
+ spreadPathsToArguments: {},
475
+ explicitPathsToArguments: {
476
+ productId: "$[0]",
477
+ includeHiddenSubscriptionOptions: "$[1].includeHiddenSubscriptionOptions"
478
+ },
479
+ singleArgumentUnchanged: false
351
480
  },
352
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
353
- {
354
- protoPath: "/v1/subscription-options/byProduct/{productId}",
355
- data: payload,
356
- host
357
- }
358
- ),
359
- params: toURLSearchParams(payload),
360
- transformResponse: (payload2) => transformPaths(payload2, [
361
- {
362
- transformFn: transformRESTFloatToSDKFloat,
363
- paths: [{ path: "subscriptionOptions.discount.value" }]
364
- }
365
- ])
366
- };
367
- return metadata;
481
+ ["productId", "options"]
482
+ );
483
+ sideEffects?.onError?.(err);
484
+ throw transformedError;
368
485
  }
369
- return __getSubscriptionOptionsForProduct;
370
486
  }
371
- function getProductIdsForSubscriptionOption(payload) {
372
- function __getProductIdsForSubscriptionOption({ host }) {
373
- const metadata = {
374
- entityFqdn: "wix.stores.v1.subscription_option",
375
- method: "GET",
376
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
377
- packageName: PACKAGE_NAME,
378
- migrationOptions: {
379
- optInTransformResponse: true
487
+ async function getProductIdsForSubscriptionOption2(_id, options) {
488
+ const { httpClient, sideEffects } = arguments[2];
489
+ const payload = renameKeysFromSDKRequestToRESTRequest({
490
+ id: _id,
491
+ includeHiddenProducts: options?.includeHiddenProducts,
492
+ paging: options?.paging
493
+ });
494
+ const reqOpts = getProductIdsForSubscriptionOption(
495
+ payload
496
+ );
497
+ sideEffects?.onSiteCall?.();
498
+ try {
499
+ const result = await httpClient.request(reqOpts);
500
+ sideEffects?.onSuccess?.(result);
501
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
502
+ } catch (err) {
503
+ const transformedError = sdkTransformError(
504
+ err,
505
+ {
506
+ spreadPathsToArguments: {},
507
+ explicitPathsToArguments: {
508
+ id: "$[0]",
509
+ includeHiddenProducts: "$[1].includeHiddenProducts",
510
+ paging: "$[1].paging"
511
+ },
512
+ singleArgumentUnchanged: false
380
513
  },
381
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
382
- {
383
- protoPath: "/v1/subscription-options/{id}/productIds",
384
- data: payload,
385
- host
386
- }
387
- ),
388
- params: toURLSearchParams(payload)
389
- };
390
- return metadata;
514
+ ["_id", "options"]
515
+ );
516
+ sideEffects?.onError?.(err);
517
+ throw transformedError;
391
518
  }
392
- return __getProductIdsForSubscriptionOption;
393
519
  }
394
- function getOneTimePurchasesStatus(payload) {
395
- function __getOneTimePurchasesStatus({ host }) {
396
- const metadata = {
397
- entityFqdn: "wix.stores.v1.subscription_option",
398
- method: "GET",
399
- methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
400
- packageName: PACKAGE_NAME,
401
- migrationOptions: {
402
- optInTransformResponse: true
520
+ async function getOneTimePurchasesStatus2(productId) {
521
+ const { httpClient, sideEffects } = arguments[1];
522
+ const payload = renameKeysFromSDKRequestToRESTRequest({
523
+ productId
524
+ });
525
+ const reqOpts = getOneTimePurchasesStatus(payload);
526
+ sideEffects?.onSiteCall?.();
527
+ try {
528
+ const result = await httpClient.request(reqOpts);
529
+ sideEffects?.onSuccess?.(result);
530
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
531
+ } catch (err) {
532
+ const transformedError = sdkTransformError(
533
+ err,
534
+ {
535
+ spreadPathsToArguments: {},
536
+ explicitPathsToArguments: { productId: "$[0]" },
537
+ singleArgumentUnchanged: false
403
538
  },
404
- url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
405
- {
406
- protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
407
- data: payload,
408
- host
409
- }
410
- ),
411
- params: toURLSearchParams(payload)
412
- };
413
- return metadata;
539
+ ["productId"]
540
+ );
541
+ sideEffects?.onError?.(err);
542
+ throw transformedError;
414
543
  }
415
- return __getOneTimePurchasesStatus;
416
544
  }
417
-
418
- // src/stores-v1-subscription-option-subscription-options.universal.ts
419
- var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
420
- SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
421
- SubscriptionFrequency2["DAY"] = "DAY";
422
- SubscriptionFrequency2["WEEK"] = "WEEK";
423
- SubscriptionFrequency2["MONTH"] = "MONTH";
424
- SubscriptionFrequency2["YEAR"] = "YEAR";
425
- return SubscriptionFrequency2;
426
- })(SubscriptionFrequency || {});
427
- var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
428
- DiscountType2["UNDEFINED"] = "UNDEFINED";
429
- DiscountType2["AMOUNT"] = "AMOUNT";
430
- DiscountType2["PERCENT"] = "PERCENT";
431
- return DiscountType2;
432
- })(DiscountType || {});
433
545
  async function createSubscriptionOption2(subscriptionOption) {
434
546
  const { httpClient, sideEffects } = arguments[1];
435
547
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -635,120 +747,38 @@ async function allowOneTimePurchases2(productId, allowed) {
635
747
  throw transformedError;
636
748
  }
637
749
  }
638
- async function getSubscriptionOption2(_id) {
639
- const { httpClient, sideEffects } = arguments[1];
640
- const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
641
- const reqOpts = getSubscriptionOption(payload);
642
- sideEffects?.onSiteCall?.();
643
- try {
644
- const result = await httpClient.request(reqOpts);
645
- sideEffects?.onSuccess?.(result);
646
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.subscriptionOption;
647
- } catch (err) {
648
- const transformedError = sdkTransformError(
649
- err,
650
- {
651
- spreadPathsToArguments: {},
652
- explicitPathsToArguments: { id: "$[0]" },
653
- singleArgumentUnchanged: false
654
- },
655
- ["_id"]
656
- );
657
- sideEffects?.onError?.(err);
658
- throw transformedError;
659
- }
750
+
751
+ // src/stores-v1-subscription-option-subscription-options.public.ts
752
+ function getSubscriptionOption3(httpClient) {
753
+ return (_id) => getSubscriptionOption2(
754
+ _id,
755
+ // @ts-ignore
756
+ { httpClient }
757
+ );
660
758
  }
661
- async function getSubscriptionOptionsForProduct2(productId, options) {
662
- const { httpClient, sideEffects } = arguments[2];
663
- const payload = renameKeysFromSDKRequestToRESTRequest({
759
+ function getSubscriptionOptionsForProduct3(httpClient) {
760
+ return (productId, options) => getSubscriptionOptionsForProduct2(
664
761
  productId,
665
- includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
666
- });
667
- const reqOpts = getSubscriptionOptionsForProduct(
668
- payload
762
+ options,
763
+ // @ts-ignore
764
+ { httpClient }
669
765
  );
670
- sideEffects?.onSiteCall?.();
671
- try {
672
- const result = await httpClient.request(reqOpts);
673
- sideEffects?.onSuccess?.(result);
674
- return renameKeysFromRESTResponseToSDKResponse(result.data);
675
- } catch (err) {
676
- const transformedError = sdkTransformError(
677
- err,
678
- {
679
- spreadPathsToArguments: {},
680
- explicitPathsToArguments: {
681
- productId: "$[0]",
682
- includeHiddenSubscriptionOptions: "$[1].includeHiddenSubscriptionOptions"
683
- },
684
- singleArgumentUnchanged: false
685
- },
686
- ["productId", "options"]
687
- );
688
- sideEffects?.onError?.(err);
689
- throw transformedError;
690
- }
691
766
  }
692
- async function getProductIdsForSubscriptionOption2(_id, options) {
693
- const { httpClient, sideEffects } = arguments[2];
694
- const payload = renameKeysFromSDKRequestToRESTRequest({
695
- id: _id,
696
- includeHiddenProducts: options?.includeHiddenProducts,
697
- paging: options?.paging
698
- });
699
- const reqOpts = getProductIdsForSubscriptionOption(
700
- payload
767
+ function getProductIdsForSubscriptionOption3(httpClient) {
768
+ return (_id, options) => getProductIdsForSubscriptionOption2(
769
+ _id,
770
+ options,
771
+ // @ts-ignore
772
+ { httpClient }
701
773
  );
702
- sideEffects?.onSiteCall?.();
703
- try {
704
- const result = await httpClient.request(reqOpts);
705
- sideEffects?.onSuccess?.(result);
706
- return renameKeysFromRESTResponseToSDKResponse(result.data);
707
- } catch (err) {
708
- const transformedError = sdkTransformError(
709
- err,
710
- {
711
- spreadPathsToArguments: {},
712
- explicitPathsToArguments: {
713
- id: "$[0]",
714
- includeHiddenProducts: "$[1].includeHiddenProducts",
715
- paging: "$[1].paging"
716
- },
717
- singleArgumentUnchanged: false
718
- },
719
- ["_id", "options"]
720
- );
721
- sideEffects?.onError?.(err);
722
- throw transformedError;
723
- }
724
774
  }
725
- async function getOneTimePurchasesStatus2(productId) {
726
- const { httpClient, sideEffects } = arguments[1];
727
- const payload = renameKeysFromSDKRequestToRESTRequest({
728
- productId
729
- });
730
- const reqOpts = getOneTimePurchasesStatus(payload);
731
- sideEffects?.onSiteCall?.();
732
- try {
733
- const result = await httpClient.request(reqOpts);
734
- sideEffects?.onSuccess?.(result);
735
- return renameKeysFromRESTResponseToSDKResponse(result.data);
736
- } catch (err) {
737
- const transformedError = sdkTransformError(
738
- err,
739
- {
740
- spreadPathsToArguments: {},
741
- explicitPathsToArguments: { productId: "$[0]" },
742
- singleArgumentUnchanged: false
743
- },
744
- ["productId"]
745
- );
746
- sideEffects?.onError?.(err);
747
- throw transformedError;
748
- }
775
+ function getOneTimePurchasesStatus3(httpClient) {
776
+ return (productId) => getOneTimePurchasesStatus2(
777
+ productId,
778
+ // @ts-ignore
779
+ { httpClient }
780
+ );
749
781
  }
750
-
751
- // src/stores-v1-subscription-option-subscription-options.public.ts
752
782
  function createSubscriptionOption3(httpClient) {
753
783
  return (subscriptionOption) => createSubscriptionOption2(
754
784
  subscriptionOption,
@@ -808,39 +838,13 @@ function allowOneTimePurchases3(httpClient) {
808
838
  { httpClient }
809
839
  );
810
840
  }
811
- function getSubscriptionOption3(httpClient) {
812
- return (_id) => getSubscriptionOption2(
813
- _id,
814
- // @ts-ignore
815
- { httpClient }
816
- );
817
- }
818
- function getSubscriptionOptionsForProduct3(httpClient) {
819
- return (productId, options) => getSubscriptionOptionsForProduct2(
820
- productId,
821
- options,
822
- // @ts-ignore
823
- { httpClient }
824
- );
825
- }
826
- function getProductIdsForSubscriptionOption3(httpClient) {
827
- return (_id, options) => getProductIdsForSubscriptionOption2(
828
- _id,
829
- options,
830
- // @ts-ignore
831
- { httpClient }
832
- );
833
- }
834
- function getOneTimePurchasesStatus3(httpClient) {
835
- return (productId) => getOneTimePurchasesStatus2(
836
- productId,
837
- // @ts-ignore
838
- { httpClient }
839
- );
840
- }
841
841
 
842
842
  // src/stores-v1-subscription-option-subscription-options.context.ts
843
843
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
844
+ var getSubscriptionOption4 = /* @__PURE__ */ createRESTModule(getSubscriptionOption3);
845
+ var getSubscriptionOptionsForProduct4 = /* @__PURE__ */ createRESTModule(getSubscriptionOptionsForProduct3);
846
+ var getProductIdsForSubscriptionOption4 = /* @__PURE__ */ createRESTModule(getProductIdsForSubscriptionOption3);
847
+ var getOneTimePurchasesStatus4 = /* @__PURE__ */ createRESTModule(getOneTimePurchasesStatus3);
844
848
  var createSubscriptionOption4 = /* @__PURE__ */ createRESTModule(createSubscriptionOption3);
845
849
  var updateSubscriptionOption4 = /* @__PURE__ */ createRESTModule(updateSubscriptionOption3);
846
850
  var deleteSubscriptionOption4 = /* @__PURE__ */ createRESTModule(deleteSubscriptionOption3);
@@ -849,10 +853,6 @@ var bulkUpdateSubscriptionOptions4 = /* @__PURE__ */ createRESTModule(bulkUpdate
849
853
  var bulkDeleteSubscriptionOptions4 = /* @__PURE__ */ createRESTModule(bulkDeleteSubscriptionOptions3);
850
854
  var assignSubscriptionOptionsToProduct4 = /* @__PURE__ */ createRESTModule(assignSubscriptionOptionsToProduct3);
851
855
  var allowOneTimePurchases4 = /* @__PURE__ */ createRESTModule(allowOneTimePurchases3);
852
- var getSubscriptionOption4 = /* @__PURE__ */ createRESTModule(getSubscriptionOption3);
853
- var getSubscriptionOptionsForProduct4 = /* @__PURE__ */ createRESTModule(getSubscriptionOptionsForProduct3);
854
- var getProductIdsForSubscriptionOption4 = /* @__PURE__ */ createRESTModule(getProductIdsForSubscriptionOption3);
855
- var getOneTimePurchasesStatus4 = /* @__PURE__ */ createRESTModule(getOneTimePurchasesStatus3);
856
856
  export {
857
857
  DiscountType,
858
858
  SubscriptionFrequency,