@wix/auto_sdk_stores_subscription-options 1.0.59 → 1.0.61
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 +77 -53
- package/build/cjs/index.js +736 -286
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +157 -157
- package/build/cjs/index.typings.js +686 -236
- 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 +77 -53
- package/build/es/index.mjs +726 -286
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +157 -157
- package/build/es/index.typings.mjs +676 -236
- 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 +77 -53
- package/build/internal/cjs/index.js +736 -286
- 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 +686 -236
- 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 +77 -53
- package/build/internal/es/index.mjs +726 -286
- 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 +676 -236
- 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
|
@@ -11,76 +11,76 @@ 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
|
|
14
|
+
function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
|
|
15
15
|
const domainToMappings = {
|
|
16
16
|
"api._api_base_domain_": [
|
|
17
17
|
{
|
|
18
|
-
srcPath: "/wix-ecommerce-plans",
|
|
18
|
+
srcPath: "/wix-ecommerce-plans-reader",
|
|
19
19
|
destPath: ""
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
|
-
"www.
|
|
22
|
+
"www._base_domain_": [
|
|
23
23
|
{
|
|
24
|
-
srcPath: "/
|
|
25
|
-
destPath: "
|
|
24
|
+
srcPath: "/_api/wix-ecommerce-plans-reader",
|
|
25
|
+
destPath: ""
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
|
-
|
|
28
|
+
_: [
|
|
29
29
|
{
|
|
30
|
-
srcPath: "/_api/subscription-options-server",
|
|
30
|
+
srcPath: "/_api/subscription-options-reader-server",
|
|
31
31
|
destPath: ""
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
|
-
"
|
|
34
|
+
"manage._base_domain_": [
|
|
35
35
|
{
|
|
36
|
-
srcPath: "/_api/subscription-options-server",
|
|
36
|
+
srcPath: "/_api/subscription-options-reader-server",
|
|
37
37
|
destPath: ""
|
|
38
38
|
}
|
|
39
|
-
]
|
|
40
|
-
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
42
|
+
}
|
|
43
|
+
function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(opts) {
|
|
44
|
+
const domainToMappings = {
|
|
45
|
+
"api._api_base_domain_": [
|
|
41
46
|
{
|
|
42
|
-
srcPath: "/
|
|
47
|
+
srcPath: "/wix-ecommerce-plans",
|
|
43
48
|
destPath: ""
|
|
44
49
|
}
|
|
45
50
|
],
|
|
46
|
-
"
|
|
51
|
+
"www.wixapis.com": [
|
|
47
52
|
{
|
|
48
|
-
srcPath: "/
|
|
49
|
-
destPath: ""
|
|
53
|
+
srcPath: "/stores/v1/subscription-options",
|
|
54
|
+
destPath: "/v1/subscription-options"
|
|
50
55
|
}
|
|
51
56
|
],
|
|
52
|
-
"
|
|
57
|
+
"www._base_domain_": [
|
|
53
58
|
{
|
|
54
59
|
srcPath: "/_api/subscription-options-server",
|
|
55
60
|
destPath: ""
|
|
56
61
|
}
|
|
57
|
-
]
|
|
58
|
-
|
|
59
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
60
|
-
}
|
|
61
|
-
function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(opts) {
|
|
62
|
-
const domainToMappings = {
|
|
63
|
-
"api._api_base_domain_": [
|
|
62
|
+
],
|
|
63
|
+
"editor._base_domain_": [
|
|
64
64
|
{
|
|
65
|
-
srcPath: "/
|
|
65
|
+
srcPath: "/_api/subscription-options-server",
|
|
66
66
|
destPath: ""
|
|
67
67
|
}
|
|
68
68
|
],
|
|
69
|
-
"
|
|
69
|
+
"blocks._base_domain_": [
|
|
70
70
|
{
|
|
71
|
-
srcPath: "/_api/
|
|
71
|
+
srcPath: "/_api/subscription-options-server",
|
|
72
72
|
destPath: ""
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
|
-
|
|
75
|
+
"create.editorx": [
|
|
76
76
|
{
|
|
77
|
-
srcPath: "/_api/subscription-options-
|
|
77
|
+
srcPath: "/_api/subscription-options-server",
|
|
78
78
|
destPath: ""
|
|
79
79
|
}
|
|
80
80
|
],
|
|
81
81
|
"manage._base_domain_": [
|
|
82
82
|
{
|
|
83
|
-
srcPath: "/_api/subscription-options-
|
|
83
|
+
srcPath: "/_api/subscription-options-server",
|
|
84
84
|
destPath: ""
|
|
85
85
|
}
|
|
86
86
|
]
|
|
@@ -88,106 +88,6 @@ function resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl
|
|
|
88
88
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
89
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
|
-
}
|
|
191
91
|
function createSubscriptionOption(payload) {
|
|
192
92
|
function __createSubscriptionOption({ host }) {
|
|
193
93
|
const serializedData = transformPaths(payload, [
|
|
@@ -414,6 +314,507 @@ function allowOneTimePurchases(payload) {
|
|
|
414
314
|
}
|
|
415
315
|
return __allowOneTimePurchases;
|
|
416
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
|
+
});
|
|
417
818
|
|
|
418
819
|
// src/stores-v1-subscription-option-subscription-options.universal.ts
|
|
419
820
|
var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
|
|
@@ -430,10 +831,15 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
|
|
|
430
831
|
DiscountType2["PERCENT"] = "PERCENT";
|
|
431
832
|
return DiscountType2;
|
|
432
833
|
})(DiscountType || {});
|
|
433
|
-
async function
|
|
434
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
435
|
-
|
|
436
|
-
|
|
834
|
+
async function createSubscriptionOption2(subscriptionOption) {
|
|
835
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
836
|
+
if (validateRequestSchema) {
|
|
837
|
+
CreateSubscriptionOptionRequest.parse({ subscriptionOption });
|
|
838
|
+
}
|
|
839
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
840
|
+
subscriptionOption
|
|
841
|
+
});
|
|
842
|
+
const reqOpts = createSubscriptionOption(payload);
|
|
437
843
|
sideEffects?.onSiteCall?.();
|
|
438
844
|
try {
|
|
439
845
|
const result = await httpClient.request(reqOpts);
|
|
@@ -444,85 +850,79 @@ async function getSubscriptionOption2(_id) {
|
|
|
444
850
|
err,
|
|
445
851
|
{
|
|
446
852
|
spreadPathsToArguments: {},
|
|
447
|
-
explicitPathsToArguments: {
|
|
853
|
+
explicitPathsToArguments: { subscriptionOption: "$[0]" },
|
|
448
854
|
singleArgumentUnchanged: false
|
|
449
855
|
},
|
|
450
|
-
["
|
|
856
|
+
["subscriptionOption"]
|
|
451
857
|
);
|
|
452
858
|
sideEffects?.onError?.(err);
|
|
453
859
|
throw transformedError;
|
|
454
860
|
}
|
|
455
861
|
}
|
|
456
|
-
async function
|
|
457
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
862
|
+
async function updateSubscriptionOption2(_id, subscriptionOption) {
|
|
863
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
864
|
+
if (validateRequestSchema) {
|
|
865
|
+
UpdateSubscriptionOptionRequest.parse({ _id, subscriptionOption });
|
|
866
|
+
}
|
|
458
867
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
459
|
-
|
|
460
|
-
includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
|
|
868
|
+
subscriptionOption: { ...subscriptionOption, id: _id }
|
|
461
869
|
});
|
|
462
|
-
const reqOpts =
|
|
463
|
-
payload
|
|
464
|
-
);
|
|
870
|
+
const reqOpts = updateSubscriptionOption(payload);
|
|
465
871
|
sideEffects?.onSiteCall?.();
|
|
466
872
|
try {
|
|
467
873
|
const result = await httpClient.request(reqOpts);
|
|
468
874
|
sideEffects?.onSuccess?.(result);
|
|
469
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
875
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.subscriptionOption;
|
|
470
876
|
} catch (err) {
|
|
471
877
|
const transformedError = sdkTransformError(
|
|
472
878
|
err,
|
|
473
879
|
{
|
|
474
|
-
spreadPathsToArguments: {},
|
|
475
|
-
explicitPathsToArguments: {
|
|
476
|
-
productId: "$[0]",
|
|
477
|
-
includeHiddenSubscriptionOptions: "$[1].includeHiddenSubscriptionOptions"
|
|
478
|
-
},
|
|
880
|
+
spreadPathsToArguments: { subscriptionOption: "$[1]" },
|
|
881
|
+
explicitPathsToArguments: { "subscriptionOption.id": "$[0]" },
|
|
479
882
|
singleArgumentUnchanged: false
|
|
480
883
|
},
|
|
481
|
-
["
|
|
884
|
+
["_id", "subscriptionOption"]
|
|
482
885
|
);
|
|
483
886
|
sideEffects?.onError?.(err);
|
|
484
887
|
throw transformedError;
|
|
485
888
|
}
|
|
486
889
|
}
|
|
487
|
-
async function
|
|
488
|
-
const { httpClient, sideEffects } = arguments[
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
const reqOpts = getProductIdsForSubscriptionOption(
|
|
495
|
-
payload
|
|
496
|
-
);
|
|
890
|
+
async function deleteSubscriptionOption2(_id) {
|
|
891
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
892
|
+
if (validateRequestSchema) {
|
|
893
|
+
DeleteSubscriptionOptionRequest.parse({ _id });
|
|
894
|
+
}
|
|
895
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
896
|
+
const reqOpts = deleteSubscriptionOption(payload);
|
|
497
897
|
sideEffects?.onSiteCall?.();
|
|
498
898
|
try {
|
|
499
899
|
const result = await httpClient.request(reqOpts);
|
|
500
900
|
sideEffects?.onSuccess?.(result);
|
|
501
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
502
901
|
} catch (err) {
|
|
503
902
|
const transformedError = sdkTransformError(
|
|
504
903
|
err,
|
|
505
904
|
{
|
|
506
905
|
spreadPathsToArguments: {},
|
|
507
|
-
explicitPathsToArguments: {
|
|
508
|
-
id: "$[0]",
|
|
509
|
-
includeHiddenProducts: "$[1].includeHiddenProducts",
|
|
510
|
-
paging: "$[1].paging"
|
|
511
|
-
},
|
|
906
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
512
907
|
singleArgumentUnchanged: false
|
|
513
908
|
},
|
|
514
|
-
["_id"
|
|
909
|
+
["_id"]
|
|
515
910
|
);
|
|
516
911
|
sideEffects?.onError?.(err);
|
|
517
912
|
throw transformedError;
|
|
518
913
|
}
|
|
519
914
|
}
|
|
520
|
-
async function
|
|
521
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
915
|
+
async function bulkCreateSubscriptionOptions2(subscriptionOptions) {
|
|
916
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
917
|
+
if (validateRequestSchema) {
|
|
918
|
+
BulkCreateSubscriptionOptionsRequest.parse({ subscriptionOptions });
|
|
919
|
+
}
|
|
522
920
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
523
|
-
|
|
921
|
+
subscriptionOptions
|
|
524
922
|
});
|
|
525
|
-
const reqOpts =
|
|
923
|
+
const reqOpts = bulkCreateSubscriptionOptions(
|
|
924
|
+
payload
|
|
925
|
+
);
|
|
526
926
|
sideEffects?.onSiteCall?.();
|
|
527
927
|
try {
|
|
528
928
|
const result = await httpClient.request(reqOpts);
|
|
@@ -533,69 +933,87 @@ async function getOneTimePurchasesStatus2(productId) {
|
|
|
533
933
|
err,
|
|
534
934
|
{
|
|
535
935
|
spreadPathsToArguments: {},
|
|
536
|
-
explicitPathsToArguments: {
|
|
936
|
+
explicitPathsToArguments: { subscriptionOptions: "$[0]" },
|
|
537
937
|
singleArgumentUnchanged: false
|
|
538
938
|
},
|
|
539
|
-
["
|
|
939
|
+
["subscriptionOptions"]
|
|
540
940
|
);
|
|
541
941
|
sideEffects?.onError?.(err);
|
|
542
942
|
throw transformedError;
|
|
543
943
|
}
|
|
544
944
|
}
|
|
545
|
-
async function
|
|
546
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
945
|
+
async function bulkUpdateSubscriptionOptions2(subscriptionOptions) {
|
|
946
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
947
|
+
if (validateRequestSchema) {
|
|
948
|
+
BulkUpdateSubscriptionOptionsRequest.parse({ subscriptionOptions });
|
|
949
|
+
}
|
|
547
950
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
548
|
-
|
|
951
|
+
subscriptionOptions
|
|
549
952
|
});
|
|
550
|
-
const reqOpts =
|
|
953
|
+
const reqOpts = bulkUpdateSubscriptionOptions(
|
|
954
|
+
payload
|
|
955
|
+
);
|
|
551
956
|
sideEffects?.onSiteCall?.();
|
|
552
957
|
try {
|
|
553
958
|
const result = await httpClient.request(reqOpts);
|
|
554
959
|
sideEffects?.onSuccess?.(result);
|
|
555
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)
|
|
960
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
556
961
|
} catch (err) {
|
|
557
962
|
const transformedError = sdkTransformError(
|
|
558
963
|
err,
|
|
559
964
|
{
|
|
560
965
|
spreadPathsToArguments: {},
|
|
561
|
-
explicitPathsToArguments: {
|
|
966
|
+
explicitPathsToArguments: { subscriptionOptions: "$[0]" },
|
|
562
967
|
singleArgumentUnchanged: false
|
|
563
968
|
},
|
|
564
|
-
["
|
|
969
|
+
["subscriptionOptions"]
|
|
565
970
|
);
|
|
566
971
|
sideEffects?.onError?.(err);
|
|
567
972
|
throw transformedError;
|
|
568
973
|
}
|
|
569
974
|
}
|
|
570
|
-
async function
|
|
571
|
-
const { httpClient, sideEffects } = arguments[
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
const
|
|
975
|
+
async function bulkDeleteSubscriptionOptions2(ids) {
|
|
976
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
977
|
+
if (validateRequestSchema) {
|
|
978
|
+
BulkDeleteSubscriptionOptionsRequest.parse({ ids });
|
|
979
|
+
}
|
|
980
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ ids });
|
|
981
|
+
const reqOpts = bulkDeleteSubscriptionOptions(
|
|
982
|
+
payload
|
|
983
|
+
);
|
|
576
984
|
sideEffects?.onSiteCall?.();
|
|
577
985
|
try {
|
|
578
986
|
const result = await httpClient.request(reqOpts);
|
|
579
987
|
sideEffects?.onSuccess?.(result);
|
|
580
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)?.subscriptionOption;
|
|
581
988
|
} catch (err) {
|
|
582
989
|
const transformedError = sdkTransformError(
|
|
583
990
|
err,
|
|
584
991
|
{
|
|
585
|
-
spreadPathsToArguments: {
|
|
586
|
-
explicitPathsToArguments: {
|
|
992
|
+
spreadPathsToArguments: {},
|
|
993
|
+
explicitPathsToArguments: { ids: "$[0]" },
|
|
587
994
|
singleArgumentUnchanged: false
|
|
588
995
|
},
|
|
589
|
-
["
|
|
996
|
+
["ids"]
|
|
590
997
|
);
|
|
591
998
|
sideEffects?.onError?.(err);
|
|
592
999
|
throw transformedError;
|
|
593
1000
|
}
|
|
594
1001
|
}
|
|
595
|
-
async function
|
|
596
|
-
const { httpClient, sideEffects } = arguments[
|
|
597
|
-
|
|
598
|
-
|
|
1002
|
+
async function assignSubscriptionOptionsToProduct2(productId, options) {
|
|
1003
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1004
|
+
if (validateRequestSchema) {
|
|
1005
|
+
AssignSubscriptionOptionsToProductRequest.parse({
|
|
1006
|
+
productId,
|
|
1007
|
+
options
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1011
|
+
productId,
|
|
1012
|
+
assignedSubscriptionOptions: options?.assignedSubscriptionOptions
|
|
1013
|
+
});
|
|
1014
|
+
const reqOpts = assignSubscriptionOptionsToProduct(
|
|
1015
|
+
payload
|
|
1016
|
+
);
|
|
599
1017
|
sideEffects?.onSiteCall?.();
|
|
600
1018
|
try {
|
|
601
1019
|
const result = await httpClient.request(reqOpts);
|
|
@@ -605,143 +1023,165 @@ async function deleteSubscriptionOption2(_id) {
|
|
|
605
1023
|
err,
|
|
606
1024
|
{
|
|
607
1025
|
spreadPathsToArguments: {},
|
|
608
|
-
explicitPathsToArguments: {
|
|
1026
|
+
explicitPathsToArguments: {
|
|
1027
|
+
productId: "$[0]",
|
|
1028
|
+
assignedSubscriptionOptions: "$[1].assignedSubscriptionOptions"
|
|
1029
|
+
},
|
|
609
1030
|
singleArgumentUnchanged: false
|
|
610
1031
|
},
|
|
611
|
-
["
|
|
1032
|
+
["productId", "options"]
|
|
612
1033
|
);
|
|
613
1034
|
sideEffects?.onError?.(err);
|
|
614
1035
|
throw transformedError;
|
|
615
1036
|
}
|
|
616
1037
|
}
|
|
617
|
-
async function
|
|
618
|
-
const { httpClient, sideEffects } = arguments[
|
|
1038
|
+
async function allowOneTimePurchases2(productId, allowed) {
|
|
1039
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1040
|
+
if (validateRequestSchema) {
|
|
1041
|
+
AllowOneTimePurchasesRequest.parse({ productId, allowed });
|
|
1042
|
+
}
|
|
619
1043
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
620
|
-
|
|
1044
|
+
productId,
|
|
1045
|
+
allowed
|
|
621
1046
|
});
|
|
622
|
-
const reqOpts =
|
|
623
|
-
payload
|
|
624
|
-
);
|
|
1047
|
+
const reqOpts = allowOneTimePurchases(payload);
|
|
625
1048
|
sideEffects?.onSiteCall?.();
|
|
626
1049
|
try {
|
|
627
1050
|
const result = await httpClient.request(reqOpts);
|
|
628
1051
|
sideEffects?.onSuccess?.(result);
|
|
629
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
630
1052
|
} catch (err) {
|
|
631
1053
|
const transformedError = sdkTransformError(
|
|
632
1054
|
err,
|
|
633
1055
|
{
|
|
634
1056
|
spreadPathsToArguments: {},
|
|
635
|
-
explicitPathsToArguments: {
|
|
1057
|
+
explicitPathsToArguments: { productId: "$[0]", allowed: "$[1]" },
|
|
636
1058
|
singleArgumentUnchanged: false
|
|
637
1059
|
},
|
|
638
|
-
["
|
|
1060
|
+
["productId", "allowed"]
|
|
639
1061
|
);
|
|
640
1062
|
sideEffects?.onError?.(err);
|
|
641
1063
|
throw transformedError;
|
|
642
1064
|
}
|
|
643
1065
|
}
|
|
644
|
-
async function
|
|
645
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
}
|
|
649
|
-
const
|
|
650
|
-
|
|
651
|
-
);
|
|
1066
|
+
async function getSubscriptionOption2(_id) {
|
|
1067
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1068
|
+
if (validateRequestSchema) {
|
|
1069
|
+
GetSubscriptionOptionRequest.parse({ _id });
|
|
1070
|
+
}
|
|
1071
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
1072
|
+
const reqOpts = getSubscriptionOption(payload);
|
|
652
1073
|
sideEffects?.onSiteCall?.();
|
|
653
1074
|
try {
|
|
654
1075
|
const result = await httpClient.request(reqOpts);
|
|
655
1076
|
sideEffects?.onSuccess?.(result);
|
|
656
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1077
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.subscriptionOption;
|
|
657
1078
|
} catch (err) {
|
|
658
1079
|
const transformedError = sdkTransformError(
|
|
659
1080
|
err,
|
|
660
1081
|
{
|
|
661
1082
|
spreadPathsToArguments: {},
|
|
662
|
-
explicitPathsToArguments: {
|
|
1083
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
663
1084
|
singleArgumentUnchanged: false
|
|
664
1085
|
},
|
|
665
|
-
["
|
|
1086
|
+
["_id"]
|
|
666
1087
|
);
|
|
667
1088
|
sideEffects?.onError?.(err);
|
|
668
1089
|
throw transformedError;
|
|
669
1090
|
}
|
|
670
1091
|
}
|
|
671
|
-
async function
|
|
672
|
-
const { httpClient, sideEffects } = arguments[
|
|
673
|
-
|
|
674
|
-
|
|
1092
|
+
async function getSubscriptionOptionsForProduct2(productId, options) {
|
|
1093
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1094
|
+
if (validateRequestSchema) {
|
|
1095
|
+
GetSubscriptionOptionsForProductRequest.parse({ productId, options });
|
|
1096
|
+
}
|
|
1097
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1098
|
+
productId,
|
|
1099
|
+
includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions
|
|
1100
|
+
});
|
|
1101
|
+
const reqOpts = getSubscriptionOptionsForProduct(
|
|
675
1102
|
payload
|
|
676
1103
|
);
|
|
677
1104
|
sideEffects?.onSiteCall?.();
|
|
678
1105
|
try {
|
|
679
1106
|
const result = await httpClient.request(reqOpts);
|
|
680
1107
|
sideEffects?.onSuccess?.(result);
|
|
1108
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
681
1109
|
} catch (err) {
|
|
682
1110
|
const transformedError = sdkTransformError(
|
|
683
1111
|
err,
|
|
684
1112
|
{
|
|
685
1113
|
spreadPathsToArguments: {},
|
|
686
|
-
explicitPathsToArguments: {
|
|
1114
|
+
explicitPathsToArguments: {
|
|
1115
|
+
productId: "$[0]",
|
|
1116
|
+
includeHiddenSubscriptionOptions: "$[1].includeHiddenSubscriptionOptions"
|
|
1117
|
+
},
|
|
687
1118
|
singleArgumentUnchanged: false
|
|
688
1119
|
},
|
|
689
|
-
["
|
|
1120
|
+
["productId", "options"]
|
|
690
1121
|
);
|
|
691
1122
|
sideEffects?.onError?.(err);
|
|
692
1123
|
throw transformedError;
|
|
693
1124
|
}
|
|
694
1125
|
}
|
|
695
|
-
async function
|
|
696
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1126
|
+
async function getProductIdsForSubscriptionOption2(_id, options) {
|
|
1127
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1128
|
+
if (validateRequestSchema) {
|
|
1129
|
+
GetProductIdsForSubscriptionOptionRequest.parse({ _id, options });
|
|
1130
|
+
}
|
|
697
1131
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
698
|
-
|
|
699
|
-
|
|
1132
|
+
id: _id,
|
|
1133
|
+
includeHiddenProducts: options?.includeHiddenProducts,
|
|
1134
|
+
paging: options?.paging
|
|
700
1135
|
});
|
|
701
|
-
const reqOpts =
|
|
1136
|
+
const reqOpts = getProductIdsForSubscriptionOption(
|
|
702
1137
|
payload
|
|
703
1138
|
);
|
|
704
1139
|
sideEffects?.onSiteCall?.();
|
|
705
1140
|
try {
|
|
706
1141
|
const result = await httpClient.request(reqOpts);
|
|
707
1142
|
sideEffects?.onSuccess?.(result);
|
|
1143
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
708
1144
|
} catch (err) {
|
|
709
1145
|
const transformedError = sdkTransformError(
|
|
710
1146
|
err,
|
|
711
1147
|
{
|
|
712
1148
|
spreadPathsToArguments: {},
|
|
713
1149
|
explicitPathsToArguments: {
|
|
714
|
-
|
|
715
|
-
|
|
1150
|
+
id: "$[0]",
|
|
1151
|
+
includeHiddenProducts: "$[1].includeHiddenProducts",
|
|
1152
|
+
paging: "$[1].paging"
|
|
716
1153
|
},
|
|
717
1154
|
singleArgumentUnchanged: false
|
|
718
1155
|
},
|
|
719
|
-
["
|
|
1156
|
+
["_id", "options"]
|
|
720
1157
|
);
|
|
721
1158
|
sideEffects?.onError?.(err);
|
|
722
1159
|
throw transformedError;
|
|
723
1160
|
}
|
|
724
1161
|
}
|
|
725
|
-
async function
|
|
726
|
-
const { httpClient, sideEffects } = arguments[
|
|
1162
|
+
async function getOneTimePurchasesStatus2(productId) {
|
|
1163
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
1164
|
+
if (validateRequestSchema) {
|
|
1165
|
+
GetOneTimePurchasesStatusRequest.parse({ productId });
|
|
1166
|
+
}
|
|
727
1167
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
728
|
-
productId
|
|
729
|
-
allowed
|
|
1168
|
+
productId
|
|
730
1169
|
});
|
|
731
|
-
const reqOpts =
|
|
1170
|
+
const reqOpts = getOneTimePurchasesStatus(payload);
|
|
732
1171
|
sideEffects?.onSiteCall?.();
|
|
733
1172
|
try {
|
|
734
1173
|
const result = await httpClient.request(reqOpts);
|
|
735
1174
|
sideEffects?.onSuccess?.(result);
|
|
1175
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
736
1176
|
} catch (err) {
|
|
737
1177
|
const transformedError = sdkTransformError(
|
|
738
1178
|
err,
|
|
739
1179
|
{
|
|
740
1180
|
spreadPathsToArguments: {},
|
|
741
|
-
explicitPathsToArguments: { productId: "$[0]"
|
|
1181
|
+
explicitPathsToArguments: { productId: "$[0]" },
|
|
742
1182
|
singleArgumentUnchanged: false
|
|
743
1183
|
},
|
|
744
|
-
["productId"
|
|
1184
|
+
["productId"]
|
|
745
1185
|
);
|
|
746
1186
|
sideEffects?.onError?.(err);
|
|
747
1187
|
throw transformedError;
|