@wix/auto_sdk_stores_subscription-options 1.0.61 → 1.0.63
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/cjs/index.d.ts +53 -77
- package/build/cjs/index.js +288 -738
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +157 -157
- package/build/cjs/index.typings.js +236 -686
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +108 -108
- package/build/cjs/meta.js +204 -204
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +84 -84
- package/build/cjs/schemas.js +104 -104
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +53 -77
- package/build/es/index.mjs +288 -728
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +157 -157
- package/build/es/index.typings.mjs +236 -676
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +108 -108
- package/build/es/meta.mjs +204 -204
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +84 -84
- package/build/es/schemas.mjs +104 -104
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +53 -77
- package/build/internal/cjs/index.js +288 -738
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +157 -157
- package/build/internal/cjs/index.typings.js +236 -686
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +108 -108
- package/build/internal/cjs/meta.js +204 -204
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +84 -84
- package/build/internal/cjs/schemas.js +104 -104
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +53 -77
- package/build/internal/es/index.mjs +288 -728
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +157 -157
- package/build/internal/es/index.typings.mjs +236 -676
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +108 -108
- package/build/internal/es/meta.mjs +204 -204
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +84 -84
- package/build/internal/es/schemas.mjs +104 -104
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -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, [
|
|
@@ -312,509 +412,8 @@ function allowOneTimePurchases(payload) {
|
|
|
312
412
|
};
|
|
313
413
|
return metadata;
|
|
314
414
|
}
|
|
315
|
-
return __allowOneTimePurchases;
|
|
316
|
-
}
|
|
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
|
|
326
|
-
},
|
|
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;
|
|
339
|
-
}
|
|
340
|
-
return __getSubscriptionOption;
|
|
341
|
-
}
|
|
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
|
|
351
|
-
},
|
|
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;
|
|
368
|
-
}
|
|
369
|
-
return __getSubscriptionOptionsForProduct;
|
|
370
|
-
}
|
|
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
|
|
380
|
-
},
|
|
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;
|
|
391
|
-
}
|
|
392
|
-
return __getProductIdsForSubscriptionOption;
|
|
393
|
-
}
|
|
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
|
|
403
|
-
},
|
|
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;
|
|
414
|
-
}
|
|
415
|
-
return __getOneTimePurchasesStatus;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// src/stores-v1-subscription-option-subscription-options.schemas.ts
|
|
419
|
-
import * as z from "zod";
|
|
420
|
-
var CreateSubscriptionOptionRequest = z.object({
|
|
421
|
-
subscriptionOption: z.object({
|
|
422
|
-
_id: z.string().describe(
|
|
423
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
424
|
-
).regex(
|
|
425
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
426
|
-
"Must be a valid GUID"
|
|
427
|
-
).optional().nullable(),
|
|
428
|
-
title: z.string().describe("Subscription option title.").min(1).max(20),
|
|
429
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
430
|
-
subscriptionSettings: z.object({
|
|
431
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
|
|
432
|
-
autoRenewal: z.boolean().describe(
|
|
433
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
434
|
-
).optional(),
|
|
435
|
-
billingCycles: z.number().int().describe(
|
|
436
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
437
|
-
).min(2).max(999).optional().nullable()
|
|
438
|
-
}).describe(
|
|
439
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
440
|
-
),
|
|
441
|
-
discount: z.object({
|
|
442
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
|
|
443
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
444
|
-
}).describe(
|
|
445
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
446
|
-
).optional()
|
|
447
|
-
}).describe("Subscription option info.")
|
|
448
|
-
});
|
|
449
|
-
var CreateSubscriptionOptionResponse = z.object({
|
|
450
|
-
_id: z.string().describe(
|
|
451
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
452
|
-
).regex(
|
|
453
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
454
|
-
"Must be a valid GUID"
|
|
455
|
-
).optional().nullable(),
|
|
456
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
457
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
458
|
-
subscriptionSettings: z.object({
|
|
459
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
|
|
460
|
-
autoRenewal: z.boolean().describe(
|
|
461
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
462
|
-
).optional(),
|
|
463
|
-
billingCycles: z.number().int().describe(
|
|
464
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
465
|
-
).min(2).max(999).optional().nullable()
|
|
466
|
-
}).describe(
|
|
467
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
468
|
-
).optional(),
|
|
469
|
-
discount: z.object({
|
|
470
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
|
|
471
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
472
|
-
}).describe(
|
|
473
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
474
|
-
).optional()
|
|
475
|
-
});
|
|
476
|
-
var UpdateSubscriptionOptionRequest = z.object({
|
|
477
|
-
_id: z.string().describe(
|
|
478
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
479
|
-
).regex(
|
|
480
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
481
|
-
"Must be a valid GUID"
|
|
482
|
-
),
|
|
483
|
-
subscriptionOption: z.object({
|
|
484
|
-
_id: z.string().describe(
|
|
485
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
486
|
-
).regex(
|
|
487
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
488
|
-
"Must be a valid GUID"
|
|
489
|
-
).optional().nullable(),
|
|
490
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
491
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
492
|
-
subscriptionSettings: z.object({
|
|
493
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
|
|
494
|
-
autoRenewal: z.boolean().describe(
|
|
495
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
496
|
-
).optional(),
|
|
497
|
-
billingCycles: z.number().int().describe(
|
|
498
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
499
|
-
).min(2).max(999).optional().nullable()
|
|
500
|
-
}).describe(
|
|
501
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
502
|
-
).optional(),
|
|
503
|
-
discount: z.object({
|
|
504
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
|
|
505
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
506
|
-
}).describe(
|
|
507
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
508
|
-
).optional()
|
|
509
|
-
}).describe("Subscription option update options.")
|
|
510
|
-
});
|
|
511
|
-
var UpdateSubscriptionOptionResponse = z.object({
|
|
512
|
-
_id: z.string().describe(
|
|
513
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
514
|
-
).regex(
|
|
515
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
516
|
-
"Must be a valid GUID"
|
|
517
|
-
).optional().nullable(),
|
|
518
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
519
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
520
|
-
subscriptionSettings: z.object({
|
|
521
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
|
|
522
|
-
autoRenewal: z.boolean().describe(
|
|
523
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
524
|
-
).optional(),
|
|
525
|
-
billingCycles: z.number().int().describe(
|
|
526
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
527
|
-
).min(2).max(999).optional().nullable()
|
|
528
|
-
}).describe(
|
|
529
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
530
|
-
).optional(),
|
|
531
|
-
discount: z.object({
|
|
532
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
|
|
533
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
534
|
-
}).describe(
|
|
535
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
536
|
-
).optional()
|
|
537
|
-
});
|
|
538
|
-
var DeleteSubscriptionOptionRequest = z.object({
|
|
539
|
-
_id: z.string().describe("ID of the subscription option to delete.").min(1).regex(
|
|
540
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
541
|
-
"Must be a valid GUID"
|
|
542
|
-
)
|
|
543
|
-
});
|
|
544
|
-
var DeleteSubscriptionOptionResponse = z.object({});
|
|
545
|
-
var BulkCreateSubscriptionOptionsRequest = z.object({
|
|
546
|
-
subscriptionOptions: z.array(
|
|
547
|
-
z.object({
|
|
548
|
-
_id: z.string().describe(
|
|
549
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
550
|
-
).regex(
|
|
551
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
552
|
-
"Must be a valid GUID"
|
|
553
|
-
).optional().nullable(),
|
|
554
|
-
title: z.string().describe("Subscription option title.").min(1).max(20),
|
|
555
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
556
|
-
subscriptionSettings: z.object({
|
|
557
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
|
|
558
|
-
autoRenewal: z.boolean().describe(
|
|
559
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
560
|
-
).optional(),
|
|
561
|
-
billingCycles: z.number().int().describe(
|
|
562
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
563
|
-
).min(2).max(999).optional().nullable()
|
|
564
|
-
}).describe(
|
|
565
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
566
|
-
),
|
|
567
|
-
discount: z.object({
|
|
568
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
|
|
569
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
570
|
-
}).describe(
|
|
571
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
572
|
-
).optional()
|
|
573
|
-
})
|
|
574
|
-
).max(100)
|
|
575
|
-
});
|
|
576
|
-
var BulkCreateSubscriptionOptionsResponse = z.object({
|
|
577
|
-
subscriptionOptions: z.array(
|
|
578
|
-
z.object({
|
|
579
|
-
_id: z.string().describe(
|
|
580
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
581
|
-
).regex(
|
|
582
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
583
|
-
"Must be a valid GUID"
|
|
584
|
-
).optional().nullable(),
|
|
585
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
586
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
587
|
-
subscriptionSettings: z.object({
|
|
588
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
|
|
589
|
-
autoRenewal: z.boolean().describe(
|
|
590
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
591
|
-
).optional(),
|
|
592
|
-
billingCycles: z.number().int().describe(
|
|
593
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
594
|
-
).min(2).max(999).optional().nullable()
|
|
595
|
-
}).describe(
|
|
596
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
597
|
-
).optional(),
|
|
598
|
-
discount: z.object({
|
|
599
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
|
|
600
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
601
|
-
}).describe(
|
|
602
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
603
|
-
).optional()
|
|
604
|
-
})
|
|
605
|
-
).optional()
|
|
606
|
-
});
|
|
607
|
-
var BulkUpdateSubscriptionOptionsRequest = z.object({
|
|
608
|
-
subscriptionOptions: z.array(
|
|
609
|
-
z.object({
|
|
610
|
-
_id: z.string().describe(
|
|
611
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
612
|
-
).regex(
|
|
613
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
614
|
-
"Must be a valid GUID"
|
|
615
|
-
),
|
|
616
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
617
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
618
|
-
subscriptionSettings: z.object({
|
|
619
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
|
|
620
|
-
autoRenewal: z.boolean().describe(
|
|
621
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
622
|
-
).optional(),
|
|
623
|
-
billingCycles: z.number().int().describe(
|
|
624
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
625
|
-
).min(2).max(999).optional().nullable()
|
|
626
|
-
}).describe(
|
|
627
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
628
|
-
).optional(),
|
|
629
|
-
discount: z.object({
|
|
630
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
|
|
631
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
632
|
-
}).describe(
|
|
633
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
634
|
-
).optional()
|
|
635
|
-
})
|
|
636
|
-
).max(100)
|
|
637
|
-
});
|
|
638
|
-
var BulkUpdateSubscriptionOptionsResponse = z.object({
|
|
639
|
-
subscriptionOptions: z.array(
|
|
640
|
-
z.object({
|
|
641
|
-
_id: z.string().describe(
|
|
642
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
643
|
-
).regex(
|
|
644
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
645
|
-
"Must be a valid GUID"
|
|
646
|
-
).optional().nullable(),
|
|
647
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
648
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
649
|
-
subscriptionSettings: z.object({
|
|
650
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
|
|
651
|
-
autoRenewal: z.boolean().describe(
|
|
652
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
653
|
-
).optional(),
|
|
654
|
-
billingCycles: z.number().int().describe(
|
|
655
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
656
|
-
).min(2).max(999).optional().nullable()
|
|
657
|
-
}).describe(
|
|
658
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
659
|
-
).optional(),
|
|
660
|
-
discount: z.object({
|
|
661
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
|
|
662
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
663
|
-
}).describe(
|
|
664
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
665
|
-
).optional()
|
|
666
|
-
})
|
|
667
|
-
).optional()
|
|
668
|
-
});
|
|
669
|
-
var BulkDeleteSubscriptionOptionsRequest = z.object({
|
|
670
|
-
ids: z.array(z.string()).max(100)
|
|
671
|
-
});
|
|
672
|
-
var BulkDeleteSubscriptionOptionsResponse = z.object({});
|
|
673
|
-
var AssignSubscriptionOptionsToProductRequest = z.object({
|
|
674
|
-
productId: z.string().describe("Product ID.").min(1),
|
|
675
|
-
options: z.object({
|
|
676
|
-
assignedSubscriptionOptions: z.array(
|
|
677
|
-
z.object({
|
|
678
|
-
_id: z.string().describe("Subscription option ID.").regex(
|
|
679
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
680
|
-
"Must be a valid GUID"
|
|
681
|
-
).optional(),
|
|
682
|
-
hidden: z.boolean().describe(
|
|
683
|
-
"Whether the subscription option is hidden for the product (the default is false)."
|
|
684
|
-
).optional(),
|
|
685
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
686
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
687
|
-
subscriptionSettings: z.object({
|
|
688
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).optional(),
|
|
689
|
-
autoRenewal: z.boolean().describe(
|
|
690
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
691
|
-
).optional(),
|
|
692
|
-
billingCycles: z.number().int().describe(
|
|
693
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
694
|
-
).min(2).max(999).optional().nullable()
|
|
695
|
-
}).describe(
|
|
696
|
-
"Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
697
|
-
).optional(),
|
|
698
|
-
discount: z.object({
|
|
699
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).optional(),
|
|
700
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
701
|
-
}).describe("Discount info (optional).").optional()
|
|
702
|
-
})
|
|
703
|
-
).max(6).optional()
|
|
704
|
-
}).describe("Subscription option assignment options.").optional()
|
|
705
|
-
});
|
|
706
|
-
var AssignSubscriptionOptionsToProductResponse = z.object({});
|
|
707
|
-
var AllowOneTimePurchasesRequest = z.object({
|
|
708
|
-
productId: z.string().describe("Product ID.").min(1),
|
|
709
|
-
allowed: z.boolean().describe(
|
|
710
|
-
"Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only."
|
|
711
|
-
)
|
|
712
|
-
});
|
|
713
|
-
var AllowOneTimePurchasesResponse = z.object({});
|
|
714
|
-
var GetSubscriptionOptionRequest = z.object({
|
|
715
|
-
_id: z.string().describe("Subscription option ID.").min(1).regex(
|
|
716
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
717
|
-
"Must be a valid GUID"
|
|
718
|
-
)
|
|
719
|
-
});
|
|
720
|
-
var GetSubscriptionOptionResponse = z.object({
|
|
721
|
-
_id: z.string().describe(
|
|
722
|
-
"Subscription option ID (auto-generated upon subscription option creation)."
|
|
723
|
-
).regex(
|
|
724
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
725
|
-
"Must be a valid GUID"
|
|
726
|
-
).optional().nullable(),
|
|
727
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
728
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
729
|
-
subscriptionSettings: z.object({
|
|
730
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
|
|
731
|
-
autoRenewal: z.boolean().describe(
|
|
732
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
733
|
-
).optional(),
|
|
734
|
-
billingCycles: z.number().int().describe(
|
|
735
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
736
|
-
).min(2).max(999).optional().nullable()
|
|
737
|
-
}).describe(
|
|
738
|
-
"Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
739
|
-
).optional(),
|
|
740
|
-
discount: z.object({
|
|
741
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
|
|
742
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
743
|
-
}).describe(
|
|
744
|
-
"Discount info (optional).\nFor example, a $20 discount would be `value: 20`, `type: AMOUNT`."
|
|
745
|
-
).optional()
|
|
746
|
-
});
|
|
747
|
-
var GetSubscriptionOptionsForProductRequest = z.object({
|
|
748
|
-
productId: z.string().describe("Product ID.").min(1),
|
|
749
|
-
options: z.object({
|
|
750
|
-
includeHiddenSubscriptionOptions: z.boolean().describe(
|
|
751
|
-
"Whether to include hidden subscription options in the results."
|
|
752
|
-
).optional()
|
|
753
|
-
}).describe("Options.").optional()
|
|
754
|
-
});
|
|
755
|
-
var GetSubscriptionOptionsForProductResponse = z.object({
|
|
756
|
-
subscriptionOptions: z.array(
|
|
757
|
-
z.object({
|
|
758
|
-
_id: z.string().describe("Subscription option ID.").regex(
|
|
759
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
760
|
-
"Must be a valid GUID"
|
|
761
|
-
).optional(),
|
|
762
|
-
hidden: z.boolean().describe(
|
|
763
|
-
"Whether the subscription option is hidden for the product (the default is false)."
|
|
764
|
-
).optional(),
|
|
765
|
-
title: z.string().describe("Subscription option title.").min(1).max(20).optional().nullable(),
|
|
766
|
-
description: z.string().describe("Subscription option description (optional).").max(60).optional().nullable(),
|
|
767
|
-
subscriptionSettings: z.object({
|
|
768
|
-
frequency: z.enum(["UNDEFINED", "DAY", "WEEK", "MONTH", "YEAR"]).describe("Frequency of recurring payment.").optional(),
|
|
769
|
-
autoRenewal: z.boolean().describe(
|
|
770
|
-
"Whether subscription is renewed automatically at the end of each period."
|
|
771
|
-
).optional(),
|
|
772
|
-
billingCycles: z.number().int().describe(
|
|
773
|
-
"Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`."
|
|
774
|
-
).min(2).max(999).optional().nullable()
|
|
775
|
-
}).describe(
|
|
776
|
-
"Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months."
|
|
777
|
-
).optional(),
|
|
778
|
-
discount: z.object({
|
|
779
|
-
type: z.enum(["UNDEFINED", "AMOUNT", "PERCENT"]).describe("Discount type.").optional(),
|
|
780
|
-
value: z.number().describe("Discount value.").min(0).optional()
|
|
781
|
-
}).describe("Discount info (optional).").optional()
|
|
782
|
-
})
|
|
783
|
-
).optional()
|
|
784
|
-
});
|
|
785
|
-
var GetProductIdsForSubscriptionOptionRequest = z.object({
|
|
786
|
-
_id: z.string().describe("Subscription option ID.").min(1).regex(
|
|
787
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
788
|
-
"Must be a valid GUID"
|
|
789
|
-
),
|
|
790
|
-
options: z.object({
|
|
791
|
-
includeHiddenProducts: z.boolean().describe("Whether to include hidden products in the returned results.").optional(),
|
|
792
|
-
paging: z.object({
|
|
793
|
-
limit: z.number().int().describe("Amount of items to load per page.").min(0).max(100).optional().nullable(),
|
|
794
|
-
offset: z.number().int().describe(
|
|
795
|
-
"Number of items to skip in the display (relevant for all pages after the first)."
|
|
796
|
-
).min(0).optional().nullable()
|
|
797
|
-
}).describe("Optional pagination parameters").optional()
|
|
798
|
-
}).describe("Paging and other options.").optional()
|
|
799
|
-
});
|
|
800
|
-
var GetProductIdsForSubscriptionOptionResponse = z.object({
|
|
801
|
-
productIds: z.array(z.string()).optional(),
|
|
802
|
-
metadata: z.object({
|
|
803
|
-
items: z.number().int().describe("Amount of items to load per page.").optional(),
|
|
804
|
-
offset: z.number().int().describe(
|
|
805
|
-
"Number of items to skip in the display (relevant for all pages after the first)."
|
|
806
|
-
).optional()
|
|
807
|
-
}).describe("Paging metadata.").optional(),
|
|
808
|
-
totalResults: z.number().int().describe("Number of total results.").optional()
|
|
809
|
-
});
|
|
810
|
-
var GetOneTimePurchasesStatusRequest = z.object({
|
|
811
|
-
productId: z.string().describe("Product ID.").min(1)
|
|
812
|
-
});
|
|
813
|
-
var GetOneTimePurchasesStatusResponse = z.object({
|
|
814
|
-
allowed: z.boolean().describe(
|
|
815
|
-
"Whether the specified product is available for one-time purchase"
|
|
816
|
-
).optional()
|
|
817
|
-
});
|
|
415
|
+
return __allowOneTimePurchases;
|
|
416
|
+
}
|
|
818
417
|
|
|
819
418
|
// src/stores-v1-subscription-option-subscription-options.universal.ts
|
|
820
419
|
var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
|
|
@@ -831,15 +430,10 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
|
|
|
831
430
|
DiscountType2["PERCENT"] = "PERCENT";
|
|
832
431
|
return DiscountType2;
|
|
833
432
|
})(DiscountType || {});
|
|
834
|
-
async function
|
|
835
|
-
const { httpClient, sideEffects
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
}
|
|
839
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
840
|
-
subscriptionOption
|
|
841
|
-
});
|
|
842
|
-
const reqOpts = createSubscriptionOption(payload);
|
|
433
|
+
async function getSubscriptionOption2(_id) {
|
|
434
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
435
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
436
|
+
const reqOpts = getSubscriptionOption(payload);
|
|
843
437
|
sideEffects?.onSiteCall?.();
|
|
844
438
|
try {
|
|
845
439
|
const result = await httpClient.request(reqOpts);
|
|
@@ -850,79 +444,85 @@ async function createSubscriptionOption2(subscriptionOption) {
|
|
|
850
444
|
err,
|
|
851
445
|
{
|
|
852
446
|
spreadPathsToArguments: {},
|
|
853
|
-
explicitPathsToArguments: {
|
|
447
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
854
448
|
singleArgumentUnchanged: false
|
|
855
449
|
},
|
|
856
|
-
["
|
|
450
|
+
["_id"]
|
|
857
451
|
);
|
|
858
452
|
sideEffects?.onError?.(err);
|
|
859
453
|
throw transformedError;
|
|
860
454
|
}
|
|
861
455
|
}
|
|
862
|
-
async function
|
|
863
|
-
const { httpClient, sideEffects
|
|
864
|
-
if (validateRequestSchema) {
|
|
865
|
-
UpdateSubscriptionOptionRequest.parse({ _id, subscriptionOption });
|
|
866
|
-
}
|
|
456
|
+
async function getSubscriptionOptionsForProduct2(productId, options) {
|
|
457
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
867
458
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
868
|
-
|
|
459
|
+
productId,
|
|
460
|
+
includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
|
|
869
461
|
});
|
|
870
|
-
const reqOpts =
|
|
462
|
+
const reqOpts = getSubscriptionOptionsForProduct(
|
|
463
|
+
payload
|
|
464
|
+
);
|
|
871
465
|
sideEffects?.onSiteCall?.();
|
|
872
466
|
try {
|
|
873
467
|
const result = await httpClient.request(reqOpts);
|
|
874
468
|
sideEffects?.onSuccess?.(result);
|
|
875
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)
|
|
469
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
876
470
|
} catch (err) {
|
|
877
471
|
const transformedError = sdkTransformError(
|
|
878
472
|
err,
|
|
879
473
|
{
|
|
880
|
-
spreadPathsToArguments: {
|
|
881
|
-
explicitPathsToArguments: {
|
|
474
|
+
spreadPathsToArguments: {},
|
|
475
|
+
explicitPathsToArguments: {
|
|
476
|
+
productId: "$[0]",
|
|
477
|
+
includeHiddenSubscriptionOptions: "$[1].includeHiddenSubscriptionOptions"
|
|
478
|
+
},
|
|
882
479
|
singleArgumentUnchanged: false
|
|
883
480
|
},
|
|
884
|
-
["
|
|
481
|
+
["productId", "options"]
|
|
885
482
|
);
|
|
886
483
|
sideEffects?.onError?.(err);
|
|
887
484
|
throw transformedError;
|
|
888
485
|
}
|
|
889
486
|
}
|
|
890
|
-
async function
|
|
891
|
-
const { httpClient, sideEffects
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
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
|
+
);
|
|
897
497
|
sideEffects?.onSiteCall?.();
|
|
898
498
|
try {
|
|
899
499
|
const result = await httpClient.request(reqOpts);
|
|
900
500
|
sideEffects?.onSuccess?.(result);
|
|
501
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
901
502
|
} catch (err) {
|
|
902
503
|
const transformedError = sdkTransformError(
|
|
903
504
|
err,
|
|
904
505
|
{
|
|
905
506
|
spreadPathsToArguments: {},
|
|
906
|
-
explicitPathsToArguments: {
|
|
507
|
+
explicitPathsToArguments: {
|
|
508
|
+
id: "$[0]",
|
|
509
|
+
includeHiddenProducts: "$[1].includeHiddenProducts",
|
|
510
|
+
paging: "$[1].paging"
|
|
511
|
+
},
|
|
907
512
|
singleArgumentUnchanged: false
|
|
908
513
|
},
|
|
909
|
-
["_id"]
|
|
514
|
+
["_id", "options"]
|
|
910
515
|
);
|
|
911
516
|
sideEffects?.onError?.(err);
|
|
912
517
|
throw transformedError;
|
|
913
518
|
}
|
|
914
519
|
}
|
|
915
|
-
async function
|
|
916
|
-
const { httpClient, sideEffects
|
|
917
|
-
if (validateRequestSchema) {
|
|
918
|
-
BulkCreateSubscriptionOptionsRequest.parse({ subscriptionOptions });
|
|
919
|
-
}
|
|
520
|
+
async function getOneTimePurchasesStatus2(productId) {
|
|
521
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
920
522
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
921
|
-
|
|
523
|
+
productId
|
|
922
524
|
});
|
|
923
|
-
const reqOpts =
|
|
924
|
-
payload
|
|
925
|
-
);
|
|
525
|
+
const reqOpts = getOneTimePurchasesStatus(payload);
|
|
926
526
|
sideEffects?.onSiteCall?.();
|
|
927
527
|
try {
|
|
928
528
|
const result = await httpClient.request(reqOpts);
|
|
@@ -933,87 +533,69 @@ async function bulkCreateSubscriptionOptions2(subscriptionOptions) {
|
|
|
933
533
|
err,
|
|
934
534
|
{
|
|
935
535
|
spreadPathsToArguments: {},
|
|
936
|
-
explicitPathsToArguments: {
|
|
536
|
+
explicitPathsToArguments: { productId: "$[0]" },
|
|
937
537
|
singleArgumentUnchanged: false
|
|
938
538
|
},
|
|
939
|
-
["
|
|
539
|
+
["productId"]
|
|
940
540
|
);
|
|
941
541
|
sideEffects?.onError?.(err);
|
|
942
542
|
throw transformedError;
|
|
943
543
|
}
|
|
944
544
|
}
|
|
945
|
-
async function
|
|
946
|
-
const { httpClient, sideEffects
|
|
947
|
-
if (validateRequestSchema) {
|
|
948
|
-
BulkUpdateSubscriptionOptionsRequest.parse({ subscriptionOptions });
|
|
949
|
-
}
|
|
545
|
+
async function createSubscriptionOption2(subscriptionOption) {
|
|
546
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
950
547
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
951
|
-
|
|
548
|
+
subscriptionOption
|
|
952
549
|
});
|
|
953
|
-
const reqOpts =
|
|
954
|
-
payload
|
|
955
|
-
);
|
|
550
|
+
const reqOpts = createSubscriptionOption(payload);
|
|
956
551
|
sideEffects?.onSiteCall?.();
|
|
957
552
|
try {
|
|
958
553
|
const result = await httpClient.request(reqOpts);
|
|
959
554
|
sideEffects?.onSuccess?.(result);
|
|
960
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
555
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.subscriptionOption;
|
|
961
556
|
} catch (err) {
|
|
962
557
|
const transformedError = sdkTransformError(
|
|
963
558
|
err,
|
|
964
559
|
{
|
|
965
560
|
spreadPathsToArguments: {},
|
|
966
|
-
explicitPathsToArguments: {
|
|
561
|
+
explicitPathsToArguments: { subscriptionOption: "$[0]" },
|
|
967
562
|
singleArgumentUnchanged: false
|
|
968
563
|
},
|
|
969
|
-
["
|
|
564
|
+
["subscriptionOption"]
|
|
970
565
|
);
|
|
971
566
|
sideEffects?.onError?.(err);
|
|
972
567
|
throw transformedError;
|
|
973
568
|
}
|
|
974
569
|
}
|
|
975
|
-
async function
|
|
976
|
-
const { httpClient, sideEffects
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
}
|
|
980
|
-
const
|
|
981
|
-
const reqOpts = bulkDeleteSubscriptionOptions(
|
|
982
|
-
payload
|
|
983
|
-
);
|
|
570
|
+
async function updateSubscriptionOption2(_id, subscriptionOption) {
|
|
571
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
572
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
573
|
+
subscriptionOption: { ...subscriptionOption, id: _id }
|
|
574
|
+
});
|
|
575
|
+
const reqOpts = updateSubscriptionOption(payload);
|
|
984
576
|
sideEffects?.onSiteCall?.();
|
|
985
577
|
try {
|
|
986
578
|
const result = await httpClient.request(reqOpts);
|
|
987
579
|
sideEffects?.onSuccess?.(result);
|
|
580
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.subscriptionOption;
|
|
988
581
|
} catch (err) {
|
|
989
582
|
const transformedError = sdkTransformError(
|
|
990
583
|
err,
|
|
991
584
|
{
|
|
992
|
-
spreadPathsToArguments: {},
|
|
993
|
-
explicitPathsToArguments: {
|
|
585
|
+
spreadPathsToArguments: { subscriptionOption: "$[1]" },
|
|
586
|
+
explicitPathsToArguments: { "subscriptionOption.id": "$[0]" },
|
|
994
587
|
singleArgumentUnchanged: false
|
|
995
588
|
},
|
|
996
|
-
["
|
|
589
|
+
["_id", "subscriptionOption"]
|
|
997
590
|
);
|
|
998
591
|
sideEffects?.onError?.(err);
|
|
999
592
|
throw transformedError;
|
|
1000
593
|
}
|
|
1001
594
|
}
|
|
1002
|
-
async function
|
|
1003
|
-
const { httpClient, sideEffects
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
productId,
|
|
1007
|
-
options
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1010
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1011
|
-
productId,
|
|
1012
|
-
assignedSubscriptionOptions: options?.assignedSubscriptionOptions
|
|
1013
|
-
});
|
|
1014
|
-
const reqOpts = assignSubscriptionOptionsToProduct(
|
|
1015
|
-
payload
|
|
1016
|
-
);
|
|
595
|
+
async function deleteSubscriptionOption2(_id) {
|
|
596
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
597
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
598
|
+
const reqOpts = deleteSubscriptionOption(payload);
|
|
1017
599
|
sideEffects?.onSiteCall?.();
|
|
1018
600
|
try {
|
|
1019
601
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1023,165 +605,143 @@ async function assignSubscriptionOptionsToProduct2(productId, options) {
|
|
|
1023
605
|
err,
|
|
1024
606
|
{
|
|
1025
607
|
spreadPathsToArguments: {},
|
|
1026
|
-
explicitPathsToArguments: {
|
|
1027
|
-
productId: "$[0]",
|
|
1028
|
-
assignedSubscriptionOptions: "$[1].assignedSubscriptionOptions"
|
|
1029
|
-
},
|
|
608
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
1030
609
|
singleArgumentUnchanged: false
|
|
1031
610
|
},
|
|
1032
|
-
["
|
|
611
|
+
["_id"]
|
|
1033
612
|
);
|
|
1034
613
|
sideEffects?.onError?.(err);
|
|
1035
614
|
throw transformedError;
|
|
1036
615
|
}
|
|
1037
616
|
}
|
|
1038
|
-
async function
|
|
1039
|
-
const { httpClient, sideEffects
|
|
1040
|
-
if (validateRequestSchema) {
|
|
1041
|
-
AllowOneTimePurchasesRequest.parse({ productId, allowed });
|
|
1042
|
-
}
|
|
617
|
+
async function bulkCreateSubscriptionOptions2(subscriptionOptions) {
|
|
618
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1043
619
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1044
|
-
|
|
1045
|
-
allowed
|
|
620
|
+
subscriptionOptions
|
|
1046
621
|
});
|
|
1047
|
-
const reqOpts =
|
|
622
|
+
const reqOpts = bulkCreateSubscriptionOptions(
|
|
623
|
+
payload
|
|
624
|
+
);
|
|
1048
625
|
sideEffects?.onSiteCall?.();
|
|
1049
626
|
try {
|
|
1050
627
|
const result = await httpClient.request(reqOpts);
|
|
1051
628
|
sideEffects?.onSuccess?.(result);
|
|
629
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1052
630
|
} catch (err) {
|
|
1053
631
|
const transformedError = sdkTransformError(
|
|
1054
632
|
err,
|
|
1055
633
|
{
|
|
1056
634
|
spreadPathsToArguments: {},
|
|
1057
|
-
explicitPathsToArguments: {
|
|
635
|
+
explicitPathsToArguments: { subscriptionOptions: "$[0]" },
|
|
1058
636
|
singleArgumentUnchanged: false
|
|
1059
637
|
},
|
|
1060
|
-
["
|
|
638
|
+
["subscriptionOptions"]
|
|
1061
639
|
);
|
|
1062
640
|
sideEffects?.onError?.(err);
|
|
1063
641
|
throw transformedError;
|
|
1064
642
|
}
|
|
1065
643
|
}
|
|
1066
|
-
async function
|
|
1067
|
-
const { httpClient, sideEffects
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
}
|
|
1071
|
-
const
|
|
1072
|
-
|
|
644
|
+
async function bulkUpdateSubscriptionOptions2(subscriptionOptions) {
|
|
645
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
646
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
647
|
+
subscriptionOptions
|
|
648
|
+
});
|
|
649
|
+
const reqOpts = bulkUpdateSubscriptionOptions(
|
|
650
|
+
payload
|
|
651
|
+
);
|
|
1073
652
|
sideEffects?.onSiteCall?.();
|
|
1074
653
|
try {
|
|
1075
654
|
const result = await httpClient.request(reqOpts);
|
|
1076
655
|
sideEffects?.onSuccess?.(result);
|
|
1077
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)
|
|
656
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1078
657
|
} catch (err) {
|
|
1079
658
|
const transformedError = sdkTransformError(
|
|
1080
659
|
err,
|
|
1081
660
|
{
|
|
1082
661
|
spreadPathsToArguments: {},
|
|
1083
|
-
explicitPathsToArguments: {
|
|
662
|
+
explicitPathsToArguments: { subscriptionOptions: "$[0]" },
|
|
1084
663
|
singleArgumentUnchanged: false
|
|
1085
664
|
},
|
|
1086
|
-
["
|
|
665
|
+
["subscriptionOptions"]
|
|
1087
666
|
);
|
|
1088
667
|
sideEffects?.onError?.(err);
|
|
1089
668
|
throw transformedError;
|
|
1090
669
|
}
|
|
1091
670
|
}
|
|
1092
|
-
async function
|
|
1093
|
-
const { httpClient, sideEffects
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
}
|
|
1097
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1098
|
-
productId,
|
|
1099
|
-
includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
|
|
1100
|
-
});
|
|
1101
|
-
const reqOpts = getSubscriptionOptionsForProduct(
|
|
671
|
+
async function bulkDeleteSubscriptionOptions2(ids) {
|
|
672
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
673
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
|
|
674
|
+
const reqOpts = bulkDeleteSubscriptionOptions(
|
|
1102
675
|
payload
|
|
1103
676
|
);
|
|
1104
677
|
sideEffects?.onSiteCall?.();
|
|
1105
678
|
try {
|
|
1106
679
|
const result = await httpClient.request(reqOpts);
|
|
1107
680
|
sideEffects?.onSuccess?.(result);
|
|
1108
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1109
681
|
} catch (err) {
|
|
1110
682
|
const transformedError = sdkTransformError(
|
|
1111
683
|
err,
|
|
1112
684
|
{
|
|
1113
685
|
spreadPathsToArguments: {},
|
|
1114
|
-
explicitPathsToArguments: {
|
|
1115
|
-
productId: "$[0]",
|
|
1116
|
-
includeHiddenSubscriptionOptions: "$[1].includeHiddenSubscriptionOptions"
|
|
1117
|
-
},
|
|
686
|
+
explicitPathsToArguments: { ids: "$[0]" },
|
|
1118
687
|
singleArgumentUnchanged: false
|
|
1119
688
|
},
|
|
1120
|
-
["
|
|
689
|
+
["ids"]
|
|
1121
690
|
);
|
|
1122
691
|
sideEffects?.onError?.(err);
|
|
1123
692
|
throw transformedError;
|
|
1124
693
|
}
|
|
1125
694
|
}
|
|
1126
|
-
async function
|
|
1127
|
-
const { httpClient, sideEffects
|
|
1128
|
-
if (validateRequestSchema) {
|
|
1129
|
-
GetProductIdsForSubscriptionOptionRequest.parse({ _id, options });
|
|
1130
|
-
}
|
|
695
|
+
async function assignSubscriptionOptionsToProduct2(productId, options) {
|
|
696
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1131
697
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
paging: options?.paging
|
|
698
|
+
productId,
|
|
699
|
+
assignedSubscriptionOptions: options?.assignedSubscriptionOptions
|
|
1135
700
|
});
|
|
1136
|
-
const reqOpts =
|
|
701
|
+
const reqOpts = assignSubscriptionOptionsToProduct(
|
|
1137
702
|
payload
|
|
1138
703
|
);
|
|
1139
704
|
sideEffects?.onSiteCall?.();
|
|
1140
705
|
try {
|
|
1141
706
|
const result = await httpClient.request(reqOpts);
|
|
1142
707
|
sideEffects?.onSuccess?.(result);
|
|
1143
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1144
708
|
} catch (err) {
|
|
1145
709
|
const transformedError = sdkTransformError(
|
|
1146
710
|
err,
|
|
1147
711
|
{
|
|
1148
712
|
spreadPathsToArguments: {},
|
|
1149
713
|
explicitPathsToArguments: {
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
paging: "$[1].paging"
|
|
714
|
+
productId: "$[0]",
|
|
715
|
+
assignedSubscriptionOptions: "$[1].assignedSubscriptionOptions"
|
|
1153
716
|
},
|
|
1154
717
|
singleArgumentUnchanged: false
|
|
1155
718
|
},
|
|
1156
|
-
["
|
|
719
|
+
["productId", "options"]
|
|
1157
720
|
);
|
|
1158
721
|
sideEffects?.onError?.(err);
|
|
1159
722
|
throw transformedError;
|
|
1160
723
|
}
|
|
1161
724
|
}
|
|
1162
|
-
async function
|
|
1163
|
-
const { httpClient, sideEffects
|
|
1164
|
-
if (validateRequestSchema) {
|
|
1165
|
-
GetOneTimePurchasesStatusRequest.parse({ productId });
|
|
1166
|
-
}
|
|
725
|
+
async function allowOneTimePurchases2(productId, allowed) {
|
|
726
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1167
727
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1168
|
-
productId
|
|
728
|
+
productId,
|
|
729
|
+
allowed
|
|
1169
730
|
});
|
|
1170
|
-
const reqOpts =
|
|
731
|
+
const reqOpts = allowOneTimePurchases(payload);
|
|
1171
732
|
sideEffects?.onSiteCall?.();
|
|
1172
733
|
try {
|
|
1173
734
|
const result = await httpClient.request(reqOpts);
|
|
1174
735
|
sideEffects?.onSuccess?.(result);
|
|
1175
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1176
736
|
} catch (err) {
|
|
1177
737
|
const transformedError = sdkTransformError(
|
|
1178
738
|
err,
|
|
1179
739
|
{
|
|
1180
740
|
spreadPathsToArguments: {},
|
|
1181
|
-
explicitPathsToArguments: { productId: "$[0]" },
|
|
741
|
+
explicitPathsToArguments: { productId: "$[0]", allowed: "$[1]" },
|
|
1182
742
|
singleArgumentUnchanged: false
|
|
1183
743
|
},
|
|
1184
|
-
["productId"]
|
|
744
|
+
["productId", "allowed"]
|
|
1185
745
|
);
|
|
1186
746
|
sideEffects?.onError?.(err);
|
|
1187
747
|
throw transformedError;
|
|
@@ -1189,98 +749,102 @@ async function getOneTimePurchasesStatus2(productId) {
|
|
|
1189
749
|
}
|
|
1190
750
|
|
|
1191
751
|
// src/stores-v1-subscription-option-subscription-options.public.ts
|
|
1192
|
-
function
|
|
752
|
+
function getSubscriptionOption3(httpClient) {
|
|
753
|
+
return (_id) => getSubscriptionOption2(
|
|
754
|
+
_id,
|
|
755
|
+
// @ts-ignore
|
|
756
|
+
{ httpClient }
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
function getSubscriptionOptionsForProduct3(httpClient) {
|
|
760
|
+
return (productId, options) => getSubscriptionOptionsForProduct2(
|
|
761
|
+
productId,
|
|
762
|
+
options,
|
|
763
|
+
// @ts-ignore
|
|
764
|
+
{ httpClient }
|
|
765
|
+
);
|
|
766
|
+
}
|
|
767
|
+
function getProductIdsForSubscriptionOption3(httpClient) {
|
|
768
|
+
return (_id, options) => getProductIdsForSubscriptionOption2(
|
|
769
|
+
_id,
|
|
770
|
+
options,
|
|
771
|
+
// @ts-ignore
|
|
772
|
+
{ httpClient }
|
|
773
|
+
);
|
|
774
|
+
}
|
|
775
|
+
function getOneTimePurchasesStatus3(httpClient) {
|
|
776
|
+
return (productId) => getOneTimePurchasesStatus2(
|
|
777
|
+
productId,
|
|
778
|
+
// @ts-ignore
|
|
779
|
+
{ httpClient }
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
function createSubscriptionOption3(httpClient) {
|
|
1193
783
|
return (subscriptionOption) => createSubscriptionOption2(
|
|
1194
784
|
subscriptionOption,
|
|
1195
785
|
// @ts-ignore
|
|
1196
|
-
{ httpClient
|
|
786
|
+
{ httpClient }
|
|
1197
787
|
);
|
|
1198
788
|
}
|
|
1199
|
-
function updateSubscriptionOption3(httpClient
|
|
789
|
+
function updateSubscriptionOption3(httpClient) {
|
|
1200
790
|
return (_id, subscriptionOption) => updateSubscriptionOption2(
|
|
1201
791
|
_id,
|
|
1202
792
|
subscriptionOption,
|
|
1203
793
|
// @ts-ignore
|
|
1204
|
-
{ httpClient
|
|
794
|
+
{ httpClient }
|
|
1205
795
|
);
|
|
1206
796
|
}
|
|
1207
|
-
function deleteSubscriptionOption3(httpClient
|
|
797
|
+
function deleteSubscriptionOption3(httpClient) {
|
|
1208
798
|
return (_id) => deleteSubscriptionOption2(
|
|
1209
799
|
_id,
|
|
1210
800
|
// @ts-ignore
|
|
1211
|
-
{ httpClient
|
|
801
|
+
{ httpClient }
|
|
1212
802
|
);
|
|
1213
803
|
}
|
|
1214
|
-
function bulkCreateSubscriptionOptions3(httpClient
|
|
804
|
+
function bulkCreateSubscriptionOptions3(httpClient) {
|
|
1215
805
|
return (subscriptionOptions) => bulkCreateSubscriptionOptions2(
|
|
1216
806
|
subscriptionOptions,
|
|
1217
807
|
// @ts-ignore
|
|
1218
|
-
{ httpClient
|
|
808
|
+
{ httpClient }
|
|
1219
809
|
);
|
|
1220
810
|
}
|
|
1221
|
-
function bulkUpdateSubscriptionOptions3(httpClient
|
|
811
|
+
function bulkUpdateSubscriptionOptions3(httpClient) {
|
|
1222
812
|
return (subscriptionOptions) => bulkUpdateSubscriptionOptions2(
|
|
1223
813
|
subscriptionOptions,
|
|
1224
814
|
// @ts-ignore
|
|
1225
|
-
{ httpClient
|
|
815
|
+
{ httpClient }
|
|
1226
816
|
);
|
|
1227
817
|
}
|
|
1228
|
-
function bulkDeleteSubscriptionOptions3(httpClient
|
|
818
|
+
function bulkDeleteSubscriptionOptions3(httpClient) {
|
|
1229
819
|
return (ids) => bulkDeleteSubscriptionOptions2(
|
|
1230
820
|
ids,
|
|
1231
821
|
// @ts-ignore
|
|
1232
|
-
{ httpClient
|
|
822
|
+
{ httpClient }
|
|
1233
823
|
);
|
|
1234
824
|
}
|
|
1235
|
-
function assignSubscriptionOptionsToProduct3(httpClient
|
|
825
|
+
function assignSubscriptionOptionsToProduct3(httpClient) {
|
|
1236
826
|
return (productId, options) => assignSubscriptionOptionsToProduct2(
|
|
1237
827
|
productId,
|
|
1238
828
|
options,
|
|
1239
829
|
// @ts-ignore
|
|
1240
|
-
{ httpClient
|
|
830
|
+
{ httpClient }
|
|
1241
831
|
);
|
|
1242
832
|
}
|
|
1243
|
-
function allowOneTimePurchases3(httpClient
|
|
833
|
+
function allowOneTimePurchases3(httpClient) {
|
|
1244
834
|
return (productId, allowed) => allowOneTimePurchases2(
|
|
1245
835
|
productId,
|
|
1246
836
|
allowed,
|
|
1247
837
|
// @ts-ignore
|
|
1248
|
-
{ httpClient
|
|
1249
|
-
);
|
|
1250
|
-
}
|
|
1251
|
-
function getSubscriptionOption3(httpClient, __options) {
|
|
1252
|
-
return (_id) => getSubscriptionOption2(
|
|
1253
|
-
_id,
|
|
1254
|
-
// @ts-ignore
|
|
1255
|
-
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1256
|
-
);
|
|
1257
|
-
}
|
|
1258
|
-
function getSubscriptionOptionsForProduct3(httpClient, __options) {
|
|
1259
|
-
return (productId, options) => getSubscriptionOptionsForProduct2(
|
|
1260
|
-
productId,
|
|
1261
|
-
options,
|
|
1262
|
-
// @ts-ignore
|
|
1263
|
-
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1264
|
-
);
|
|
1265
|
-
}
|
|
1266
|
-
function getProductIdsForSubscriptionOption3(httpClient, __options) {
|
|
1267
|
-
return (_id, options) => getProductIdsForSubscriptionOption2(
|
|
1268
|
-
_id,
|
|
1269
|
-
options,
|
|
1270
|
-
// @ts-ignore
|
|
1271
|
-
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1272
|
-
);
|
|
1273
|
-
}
|
|
1274
|
-
function getOneTimePurchasesStatus3(httpClient, __options) {
|
|
1275
|
-
return (productId) => getOneTimePurchasesStatus2(
|
|
1276
|
-
productId,
|
|
1277
|
-
// @ts-ignore
|
|
1278
|
-
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
838
|
+
{ httpClient }
|
|
1279
839
|
);
|
|
1280
840
|
}
|
|
1281
841
|
|
|
1282
842
|
// src/stores-v1-subscription-option-subscription-options.context.ts
|
|
1283
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);
|
|
1284
848
|
var createSubscriptionOption4 = /* @__PURE__ */ createRESTModule(createSubscriptionOption3);
|
|
1285
849
|
var updateSubscriptionOption4 = /* @__PURE__ */ createRESTModule(updateSubscriptionOption3);
|
|
1286
850
|
var deleteSubscriptionOption4 = /* @__PURE__ */ createRESTModule(deleteSubscriptionOption3);
|
|
@@ -1289,10 +853,6 @@ var bulkUpdateSubscriptionOptions4 = /* @__PURE__ */ createRESTModule(bulkUpdate
|
|
|
1289
853
|
var bulkDeleteSubscriptionOptions4 = /* @__PURE__ */ createRESTModule(bulkDeleteSubscriptionOptions3);
|
|
1290
854
|
var assignSubscriptionOptionsToProduct4 = /* @__PURE__ */ createRESTModule(assignSubscriptionOptionsToProduct3);
|
|
1291
855
|
var allowOneTimePurchases4 = /* @__PURE__ */ createRESTModule(allowOneTimePurchases3);
|
|
1292
|
-
var getSubscriptionOption4 = /* @__PURE__ */ createRESTModule(getSubscriptionOption3);
|
|
1293
|
-
var getSubscriptionOptionsForProduct4 = /* @__PURE__ */ createRESTModule(getSubscriptionOptionsForProduct3);
|
|
1294
|
-
var getProductIdsForSubscriptionOption4 = /* @__PURE__ */ createRESTModule(getProductIdsForSubscriptionOption3);
|
|
1295
|
-
var getOneTimePurchasesStatus4 = /* @__PURE__ */ createRESTModule(getOneTimePurchasesStatus3);
|
|
1296
856
|
export {
|
|
1297
857
|
DiscountType,
|
|
1298
858
|
SubscriptionFrequency,
|