@wix/auto_sdk_stores_subscription-options 1.0.20 → 1.0.22
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 +8 -8
- package/build/cjs/index.js +36 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -8
- package/build/cjs/index.typings.js +36 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +36 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -8
- package/build/es/index.mjs +36 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -8
- package/build/es/index.typings.mjs +36 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +36 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -8
- package/build/internal/cjs/index.js +36 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +8 -8
- package/build/internal/cjs/index.typings.js +36 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +36 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -8
- package/build/internal/es/index.mjs +36 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +8 -8
- package/build/internal/es/index.typings.mjs +36 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +36 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -95,6 +95,9 @@ function getSubscriptionOption(payload) {
|
|
|
95
95
|
method: "GET",
|
|
96
96
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
|
|
97
97
|
packageName: PACKAGE_NAME,
|
|
98
|
+
migrationOptions: {
|
|
99
|
+
optInTransformResponse: true
|
|
100
|
+
},
|
|
98
101
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
99
102
|
{ protoPath: "/v1/subscription-options/{id}", data: payload, host }
|
|
100
103
|
),
|
|
@@ -117,6 +120,9 @@ function getSubscriptionOptionsForProduct(payload) {
|
|
|
117
120
|
method: "GET",
|
|
118
121
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
|
|
119
122
|
packageName: PACKAGE_NAME,
|
|
123
|
+
migrationOptions: {
|
|
124
|
+
optInTransformResponse: true
|
|
125
|
+
},
|
|
120
126
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
121
127
|
{
|
|
122
128
|
protoPath: "/v1/subscription-options/byProduct/{productId}",
|
|
@@ -143,6 +149,9 @@ function getProductIdsForSubscriptionOption(payload) {
|
|
|
143
149
|
method: "GET",
|
|
144
150
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
|
|
145
151
|
packageName: PACKAGE_NAME,
|
|
152
|
+
migrationOptions: {
|
|
153
|
+
optInTransformResponse: true
|
|
154
|
+
},
|
|
146
155
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
147
156
|
{
|
|
148
157
|
protoPath: "/v1/subscription-options/{id}/productIds",
|
|
@@ -163,6 +172,9 @@ function getOneTimePurchasesStatus(payload) {
|
|
|
163
172
|
method: "GET",
|
|
164
173
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
|
|
165
174
|
packageName: PACKAGE_NAME,
|
|
175
|
+
migrationOptions: {
|
|
176
|
+
optInTransformResponse: true
|
|
177
|
+
},
|
|
166
178
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
167
179
|
{
|
|
168
180
|
protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
|
|
@@ -189,6 +201,9 @@ function createSubscriptionOption(payload) {
|
|
|
189
201
|
method: "POST",
|
|
190
202
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption",
|
|
191
203
|
packageName: PACKAGE_NAME,
|
|
204
|
+
migrationOptions: {
|
|
205
|
+
optInTransformResponse: true
|
|
206
|
+
},
|
|
192
207
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
193
208
|
{ protoPath: "/v1/subscription-options", data: serializedData, host }
|
|
194
209
|
),
|
|
@@ -217,6 +232,9 @@ function updateSubscriptionOption(payload) {
|
|
|
217
232
|
method: "PATCH",
|
|
218
233
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption",
|
|
219
234
|
packageName: PACKAGE_NAME,
|
|
235
|
+
migrationOptions: {
|
|
236
|
+
optInTransformResponse: true
|
|
237
|
+
},
|
|
220
238
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
221
239
|
{
|
|
222
240
|
protoPath: "/v1/subscription-options/{subscriptionOption.id}",
|
|
@@ -243,6 +261,9 @@ function deleteSubscriptionOption(payload) {
|
|
|
243
261
|
method: "DELETE",
|
|
244
262
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption",
|
|
245
263
|
packageName: PACKAGE_NAME,
|
|
264
|
+
migrationOptions: {
|
|
265
|
+
optInTransformResponse: true
|
|
266
|
+
},
|
|
246
267
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
247
268
|
{ protoPath: "/v1/subscription-options/{id}", data: payload, host }
|
|
248
269
|
),
|
|
@@ -265,6 +286,9 @@ function bulkCreateSubscriptionOptions(payload) {
|
|
|
265
286
|
method: "POST",
|
|
266
287
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions",
|
|
267
288
|
packageName: PACKAGE_NAME,
|
|
289
|
+
migrationOptions: {
|
|
290
|
+
optInTransformResponse: true
|
|
291
|
+
},
|
|
268
292
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
269
293
|
{
|
|
270
294
|
protoPath: "/v1/subscription-options/createBulk",
|
|
@@ -297,6 +321,9 @@ function bulkUpdateSubscriptionOptions(payload) {
|
|
|
297
321
|
method: "PATCH",
|
|
298
322
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions",
|
|
299
323
|
packageName: PACKAGE_NAME,
|
|
324
|
+
migrationOptions: {
|
|
325
|
+
optInTransformResponse: true
|
|
326
|
+
},
|
|
300
327
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
301
328
|
{ protoPath: "/v1/subscription-options", data: serializedData, host }
|
|
302
329
|
),
|
|
@@ -319,6 +346,9 @@ function bulkDeleteSubscriptionOptions(payload) {
|
|
|
319
346
|
method: "POST",
|
|
320
347
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions",
|
|
321
348
|
packageName: PACKAGE_NAME,
|
|
349
|
+
migrationOptions: {
|
|
350
|
+
optInTransformResponse: true
|
|
351
|
+
},
|
|
322
352
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
323
353
|
{
|
|
324
354
|
protoPath: "/v1/subscription-options/deleteBulk",
|
|
@@ -345,6 +375,9 @@ function assignSubscriptionOptionsToProduct(payload) {
|
|
|
345
375
|
method: "POST",
|
|
346
376
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct",
|
|
347
377
|
packageName: PACKAGE_NAME,
|
|
378
|
+
migrationOptions: {
|
|
379
|
+
optInTransformResponse: true
|
|
380
|
+
},
|
|
348
381
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
349
382
|
{
|
|
350
383
|
protoPath: "/v1/subscription-options/product/{productId}/assign",
|
|
@@ -365,6 +398,9 @@ function allowOneTimePurchases(payload) {
|
|
|
365
398
|
method: "PATCH",
|
|
366
399
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases",
|
|
367
400
|
packageName: PACKAGE_NAME,
|
|
401
|
+
migrationOptions: {
|
|
402
|
+
optInTransformResponse: true
|
|
403
|
+
},
|
|
368
404
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
369
405
|
{
|
|
370
406
|
protoPath: "/v1/subscription-options/product/{productId}/allowOneTimePurchase",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/stores-v1-subscription-option-subscription-options.universal.ts","../../src/stores-v1-subscription-option-subscription-options.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixStoresV1SubscriptionOption from './stores-v1-subscription-option-subscription-options.http.js';\n\nexport interface SubscriptionOption {\n /**\n * Subscription option ID (auto-generated upon subscription option creation).\n * @format GUID\n */\n _id?: string | null;\n /**\n * Subscription option title.\n * @minLength 1\n * @maxLength 20\n */\n title?: string | null;\n /**\n * Subscription option description (optional).\n * @maxLength 60\n */\n description?: string | null;\n /** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Discount info (optional).\n * For example, a $20 discount would be `value: 20`, `type: AMOUNT`.\n */\n discount?: Discount;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequencyWithLiterals;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.\n * @min 2\n * @max 999\n */\n billingCycles?: number | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface Discount {\n /** Discount type. */\n type?: DiscountTypeWithLiterals;\n /** Discount value. */\n value?: number;\n}\n\nexport enum DiscountType {\n UNDEFINED = 'UNDEFINED',\n /** No discount */\n AMOUNT = 'AMOUNT',\n PERCENT = 'PERCENT',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'UNDEFINED'\n | 'AMOUNT'\n | 'PERCENT';\n\nexport interface GetSubscriptionOptionRequest {\n /**\n * Subscription option ID.\n * @minLength 1\n * @format GUID\n */\n _id: string;\n}\n\nexport interface GetSubscriptionOptionResponse {\n /** Subscription option. */\n subscriptionOption?: SubscriptionOption;\n}\n\nexport interface GetSubscriptionOptionsForProductRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n /** Whether to include hidden subscription options in the results. */\n includeHiddenSubscriptionOptions?: boolean;\n}\n\nexport interface GetSubscriptionOptionsForProductResponse {\n /** Subscription options. */\n subscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\nexport interface SubscriptionOptionInProduct {\n /**\n * Subscription option ID.\n * @format GUID\n */\n _id?: string;\n /** Whether the subscription option is hidden for the product (the default is false). */\n hidden?: boolean;\n /**\n * Subscription option title.\n * @minLength 1\n * @maxLength 20\n * @readonly\n */\n title?: string | null;\n /**\n * Subscription option description (optional).\n * @maxLength 60\n * @readonly\n */\n description?: string | null;\n /**\n * Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months.\n * @readonly\n */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Discount info (optional).\n * @readonly\n */\n discount?: Discount;\n}\n\nexport interface ListSubscriptionOptionsRequest {\n /**\n * Subscription option IDs.\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport interface ListSubscriptionOptionsResponse {\n /** Subscription options. */\n subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface CalculatePricesRequest {\n /** original price to which subscription options discount will be applied */\n price?: number;\n /**\n * ids of subscription options which will be applied to original price\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport interface CalculatePricesResponse {\n /** array of calculated prices */\n prices?: SubscriptionOptionPrices[];\n /** price to which subscription options discount applied */\n originalPrice?: number;\n}\n\nexport interface SubscriptionOptionPrices {\n /** Subscription option id */\n _id?: string;\n /** Price data calculated for subscription option */\n priceData?: SubscriptionOptionPriceData;\n /** Price data calculated for subscription option, converted to the currency requested in request header */\n convertedPriceData?: SubscriptionOptionPriceData;\n}\n\nexport interface SubscriptionOptionPriceData {\n /** Subscription option price currency */\n currency?: string;\n /** Price calculated after subscription option discount applied */\n discountedPrice?: number;\n /** Price calculated after subscription option discount applied, formatted with the currency */\n formattedDiscountedPrice?: string;\n}\n\nexport interface BulkCalculatePricesRequest {\n /**\n * Original prices to which subscription options discount will be applied.\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * @maxSize 1001\n */\n prices?: Record<string, number>;\n /**\n * ids of subscription options which will be applied to original price\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport interface BulkCalculatePricesResponse {\n /**\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * Value is response with calculated prices for each subscription option\n */\n calculatedPrices?: Record<string, CalculatePricesResponse>;\n}\n\nexport interface BulkCalculatePricesRequestV2 {\n /**\n * Original prices to be calculated for each corresponding product id with related subscription plan ids\n * @maxSize 100\n */\n items?: BulkCalculatePricesRequestItem[];\n}\n\nexport interface BulkCalculatePricesRequestItem {\n /**\n * Calculation id (product id)\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * Original prices to which subscription options discount will be applied.\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * @maxSize 1001\n */\n prices?: Record<string, number>;\n /**\n * ids of subscription options which will be applied to original price.\n * @format GUID\n * @maxSize 100\n */\n subscriptionOptionIds?: string[];\n}\n\nexport interface BulkCalculatePricesResponseV2 {\n /**\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * Value is response with calculated prices for each subscription option for each product\n */\n calculatedPricesPerProduct?: BulkCalculatePricesResponseItem[];\n}\n\nexport interface BulkCalculatePricesResponseItem {\n /**\n * Calculation id (product id)\n * @minLength 1\n */\n _id?: string;\n /**\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * Value is response with calculated prices for each subscription option\n */\n calculatedPrices?: Record<string, CalculatePricesResponse>;\n}\n\nexport interface GetProductIdsForSubscriptionOptionRequest {\n /**\n * Subscription option ID.\n * @minLength 1\n * @format GUID\n */\n _id: string;\n /** Whether to include hidden products in the returned results. */\n includeHiddenProducts?: boolean;\n /** Optional pagination parameters */\n paging?: Paging;\n}\n\nexport interface Paging {\n /**\n * Amount of items to load per page.\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip in the display (relevant for all pages after the first). */\n offset?: number | null;\n}\n\nexport interface GetProductIdsForSubscriptionOptionResponse {\n /** IDs of products associated with the specified subscription option. */\n productIds?: string[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n /** Number of total results. */\n totalResults?: number;\n}\n\nexport interface PagingMetadata {\n /** Amount of items to load per page. */\n items?: number;\n /** Number of items to skip in the display (relevant for all pages after the first). */\n offset?: number;\n}\n\nexport interface GetOneTimePurchasesStatusRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n}\n\nexport interface GetOneTimePurchasesStatusResponse {\n /** Whether the specified product is available for one-time purchase */\n allowed?: boolean;\n}\n\nexport interface CreateSubscriptionOptionRequest {\n /** Subscription option info. */\n subscriptionOption: SubscriptionOption;\n}\n\nexport interface CreateSubscriptionOptionResponse {\n /** Newly created subscription option. */\n subscriptionOption?: SubscriptionOption;\n}\n\nexport interface UpdateSubscriptionOptionRequest {\n /** Subscription option info. Only the passed parameters will be updated. */\n subscriptionOption: SubscriptionOption;\n}\n\nexport interface UpdateSubscriptionOptionResponse {\n /** Updated subscription option. */\n subscriptionOption?: SubscriptionOption;\n}\n\nexport interface DeleteSubscriptionOptionRequest {\n /**\n * ID of the subscription option to delete.\n * @minLength 1\n * @format GUID\n */\n _id: string;\n}\n\nexport interface DeleteSubscriptionOptionResponse {}\n\nexport interface BulkCreateSubscriptionOptionsRequest {\n /**\n * Subscription options info.\n * @maxSize 100\n */\n subscriptionOptions: SubscriptionOption[];\n}\n\nexport interface BulkCreateSubscriptionOptionsResponse {\n /** Newly created subscription options. */\n subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface BulkUpdateSubscriptionOptionsRequest {\n /**\n * Subscription options info. Only the passed parameters in each subscription option will be updated.\n * @maxSize 100\n */\n subscriptionOptions: SubscriptionOption[];\n}\n\nexport interface BulkUpdateSubscriptionOptionsResponse {\n /** Updated subscription options. */\n subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface BulkDeleteSubscriptionOptionsRequest {\n /**\n * IDs of the subscription options to delete.\n * @maxSize 100\n * @format GUID\n */\n ids: string[];\n}\n\nexport interface BulkDeleteSubscriptionOptionsResponse {}\n\nexport interface AssignSubscriptionOptionsToProductRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n /**\n * Ordered array of subscription options that will be assigned to the product. Pass an empty array to remove all subscription options from the product.\n * @maxSize 6\n */\n assignedSubscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\nexport interface AssignSubscriptionOptionsToProductResponse {}\n\nexport interface AllowOneTimePurchasesRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n /** Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only. */\n allowed: boolean | null;\n}\n\nexport interface AllowOneTimePurchasesResponse {}\n\n/**\n * Retrieves a subscription option by ID.\n * @param _id - Subscription option ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption\n * @deprecated\n */\nexport async function getSubscriptionOption(\n _id: string\n): Promise<\n NonNullablePaths<\n SubscriptionOption,\n | `subscriptionSettings.frequency`\n | `subscriptionSettings.autoRenewal`\n | `discount.type`\n | `discount.value`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.subscriptionOption!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves all subscription options assigned to a specified product.\n * By default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @param options - Options.\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct\n * @deprecated\n */\nexport async function getSubscriptionOptionsForProduct(\n productId: string,\n options?: GetSubscriptionOptionsForProductOptions\n): Promise<\n NonNullablePaths<\n GetSubscriptionOptionsForProductResponse,\n | `subscriptionOptions`\n | `subscriptionOptions.${number}._id`\n | `subscriptionOptions.${number}.hidden`\n | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n | `subscriptionOptions.${number}.discount.type`\n | `subscriptionOptions.${number}.discount.value`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getSubscriptionOptionsForProduct(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n productId: '$[0]',\n includeHiddenSubscriptionOptions:\n '$[1].includeHiddenSubscriptionOptions',\n },\n singleArgumentUnchanged: false,\n },\n ['productId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSubscriptionOptionsForProductOptions {\n /** Whether to include hidden subscription options in the results. */\n includeHiddenSubscriptionOptions?: boolean;\n}\n\n/**\n * Retrieves the IDs of products associated with a specified subscription option.\n * @param _id - Subscription option ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @param options - Paging and other options.\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption\n * @deprecated\n */\nexport async function getProductIdsForSubscriptionOption(\n _id: string,\n options?: GetProductIdsForSubscriptionOptionOptions\n): Promise<\n NonNullablePaths<\n GetProductIdsForSubscriptionOptionResponse,\n `productIds` | `metadata.items` | `metadata.offset` | `totalResults`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n includeHiddenProducts: options?.includeHiddenProducts,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getProductIdsForSubscriptionOption(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n includeHiddenProducts: '$[1].includeHiddenProducts',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetProductIdsForSubscriptionOptionOptions {\n /** Whether to include hidden products in the returned results. */\n includeHiddenProducts?: boolean;\n /** Optional pagination parameters */\n paging?: Paging;\n}\n\n/**\n * Checks whether a specified product (associated with subscription options) is available for one-time purchase.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus\n * @deprecated\n */\nexport async function getOneTimePurchasesStatus(\n productId: string\n): Promise<NonNullablePaths<GetOneTimePurchasesStatusResponse, `allowed`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getOneTimePurchasesStatus(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { productId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['productId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a subscription option.\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @param subscriptionOption - Subscription option info.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOption\n * @requiredField subscriptionOption.subscriptionSettings\n * @requiredField subscriptionOption.title\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Newly created subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption\n * @deprecated\n */\nexport async function createSubscriptionOption(\n subscriptionOption: NonNullablePaths<\n SubscriptionOption,\n `subscriptionSettings` | `title`\n >\n): Promise<\n NonNullablePaths<\n SubscriptionOption,\n | `subscriptionSettings.frequency`\n | `subscriptionSettings.autoRenewal`\n | `discount.type`\n | `discount.value`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOption: subscriptionOption,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.createSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.subscriptionOption!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionOption: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionOption']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a subscription option.\n * Only parameters passed will be updated.\n * @param _id - Subscription option ID (auto-generated upon subscription option creation).\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField subscriptionOption\n * @param subscriptionOption - Subscription option update options.\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Updated subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption\n * @deprecated\n */\nexport async function updateSubscriptionOption(\n _id: string,\n subscriptionOption: UpdateSubscriptionOption\n): Promise<\n NonNullablePaths<\n SubscriptionOption,\n | `subscriptionSettings.frequency`\n | `subscriptionSettings.autoRenewal`\n | `discount.type`\n | `discount.value`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOption: { ...subscriptionOption, id: _id },\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.updateSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.subscriptionOption!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { subscriptionOption: '$[1]' },\n explicitPathsToArguments: { 'subscriptionOption.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'subscriptionOption']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateSubscriptionOption {\n /**\n * Subscription option ID (auto-generated upon subscription option creation).\n * @format GUID\n */\n _id?: string | null;\n /**\n * Subscription option title.\n * @minLength 1\n * @maxLength 20\n */\n title?: string | null;\n /**\n * Subscription option description (optional).\n * @maxLength 60\n */\n description?: string | null;\n /** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Discount info (optional).\n * For example, a $20 discount would be `value: 20`, `type: AMOUNT`.\n */\n discount?: Discount;\n}\n\n/**\n * Deletes a subscription option.\n * @param _id - ID of the subscription option to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption\n * @deprecated\n */\nexport async function deleteSubscriptionOption(_id: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.deleteSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates multiple subscription options (up to 100).\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @param subscriptionOptions - Subscription options info.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOptions\n * @requiredField subscriptionOptions.subscriptionSettings\n * @requiredField subscriptionOptions.title\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions\n * @deprecated\n */\nexport async function bulkCreateSubscriptionOptions(\n subscriptionOptions: NonNullablePaths<\n SubscriptionOption,\n `subscriptionSettings` | `title`\n >[]\n): Promise<\n NonNullablePaths<\n BulkCreateSubscriptionOptionsResponse,\n | `subscriptionOptions`\n | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n | `subscriptionOptions.${number}.discount.type`\n | `subscriptionOptions.${number}.discount.value`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOptions: subscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.bulkCreateSubscriptionOptions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionOptions: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionOptions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates multiple subscription options.\n * Only parameters passed will be updated.\n * @param subscriptionOptions - Subscription options info. Only the passed parameters in each subscription option will be updated.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOptions\n * @requiredField subscriptionOptions._id\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions\n * @deprecated\n */\nexport async function bulkUpdateSubscriptionOptions(\n subscriptionOptions: NonNullablePaths<SubscriptionOption, `_id`>[]\n): Promise<\n NonNullablePaths<\n BulkUpdateSubscriptionOptionsResponse,\n | `subscriptionOptions`\n | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n | `subscriptionOptions.${number}.discount.type`\n | `subscriptionOptions.${number}.discount.value`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOptions: subscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.bulkUpdateSubscriptionOptions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionOptions: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionOptions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes multiple subscription options.\n * @param ids - IDs of the subscription options to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField ids\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions\n * @deprecated\n */\nexport async function bulkDeleteSubscriptionOptions(\n ids: string[]\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.bulkDeleteSubscriptionOptions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ids: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ids']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Assign up to 6 subscription options to a specified product.\n * Pass an empty array to remove all subscription options assigned to a product.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @param options - Subscription option assignment options.\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct\n * @deprecated\n */\nexport async function assignSubscriptionOptionsToProduct(\n productId: string,\n options?: AssignSubscriptionOptionsToProductOptions\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n assignedSubscriptionOptions: options?.assignedSubscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.assignSubscriptionOptionsToProduct(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n productId: '$[0]',\n assignedSubscriptionOptions: '$[1].assignedSubscriptionOptions',\n },\n singleArgumentUnchanged: false,\n },\n ['productId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AssignSubscriptionOptionsToProductOptions {\n /**\n * Ordered array of subscription options that will be assigned to the product. Pass an empty array to remove all subscription options from the product.\n * @maxSize 6\n */\n assignedSubscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\n/**\n * Allow for one-time purchase of a product.\n * By default, product can be sold only as part of a subscription, not as a one-time purchase.\n * @param productId - Product ID.\n * @param allowed - Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only.\n * @public\n * @documentationMaturity preview\n * @requiredField allowed\n * @requiredField productId\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases\n * @deprecated\n */\nexport async function allowOneTimePurchases(\n productId: string,\n allowed: boolean\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n allowed: allowed,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.allowOneTimePurchases(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { productId: '$[0]', allowed: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['productId', 'allowed']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wix-ecommerce-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/stores/v1/subscription-options',\n destPath: '/v1/subscription-options',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wix-ecommerce-plans-reader',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-ecommerce-plans-reader',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/subscription-options-reader-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/subscription-options-reader-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_stores_subscription-options';\n\n/**\n * Retrieves a subscription option by ID.\n * @deprecated\n */\nexport function getSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSubscriptionOption({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n { protoPath: '/v1/subscription-options/{id}', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSubscriptionOption;\n}\n\n/**\n * Retrieves all subscription options assigned to a specified product.\n * By default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.\n * @deprecated\n */\nexport function getSubscriptionOptionsForProduct(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSubscriptionOptionsForProduct({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n {\n protoPath: '/v1/subscription-options/byProduct/{productId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSubscriptionOptionsForProduct;\n}\n\n/**\n * Retrieves the IDs of products associated with a specified subscription option.\n * @deprecated\n */\nexport function getProductIdsForSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __getProductIdsForSubscriptionOption({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n {\n protoPath: '/v1/subscription-options/{id}/productIds',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getProductIdsForSubscriptionOption;\n}\n\n/**\n * Checks whether a specified product (associated with subscription options) is available for one-time purchase.\n * @deprecated\n */\nexport function getOneTimePurchasesStatus(\n payload: object\n): RequestOptionsFactory<any> {\n function __getOneTimePurchasesStatus({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n {\n protoPath:\n '/v1/subscription-options/product/{productId}/oneTimePurchasesStatus',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getOneTimePurchasesStatus;\n}\n\n/**\n * Creates a subscription option.\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @deprecated\n */\nexport function createSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __createSubscriptionOption({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n { protoPath: '/v1/subscription-options', data: serializedData, host }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createSubscriptionOption;\n}\n\n/**\n * Updates a subscription option.\n * Only parameters passed will be updated.\n * @deprecated\n */\nexport function updateSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSubscriptionOption({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/{subscriptionOption.id}',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateSubscriptionOption;\n}\n\n/**\n * Deletes a subscription option.\n * @deprecated\n */\nexport function deleteSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteSubscriptionOption({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n { protoPath: '/v1/subscription-options/{id}', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteSubscriptionOption;\n}\n\n/**\n * Creates multiple subscription options (up to 100).\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @deprecated\n */\nexport function bulkCreateSubscriptionOptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateSubscriptionOptions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/createBulk',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateSubscriptionOptions;\n}\n\n/**\n * Updates multiple subscription options.\n * Only parameters passed will be updated.\n * @deprecated\n */\nexport function bulkUpdateSubscriptionOptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateSubscriptionOptions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n { protoPath: '/v1/subscription-options', data: serializedData, host }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateSubscriptionOptions;\n}\n\n/**\n * Deletes multiple subscription options.\n * @deprecated\n */\nexport function bulkDeleteSubscriptionOptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteSubscriptionOptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/deleteBulk',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteSubscriptionOptions;\n}\n\n/**\n * Assign up to 6 subscription options to a specified product.\n * Pass an empty array to remove all subscription options assigned to a product.\n * @deprecated\n */\nexport function assignSubscriptionOptionsToProduct(\n payload: object\n): RequestOptionsFactory<any> {\n function __assignSubscriptionOptionsToProduct({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'assignedSubscriptionOptions.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/product/{productId}/assign',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __assignSubscriptionOptionsToProduct;\n}\n\n/**\n * Allow for one-time purchase of a product.\n * By default, product can be sold only as part of a subscription, not as a one-time purchase.\n * @deprecated\n */\nexport function allowOneTimePurchases(\n payload: object\n): RequestOptionsFactory<any> {\n function __allowOneTimePurchases({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases',\n packageName: PACKAGE_NAME,\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath:\n '/v1/subscription-options/product/{productId}/allowOneTimePurchase',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __allowOneTimePurchases;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,yEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,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AACF;AAeA,eAAsBC,oCACpB,WACA,SACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA,6BAA6B,SAAS;AAAA,EACxC,CAAC;AAED,QAAM,UACoC;AAAA,IACtC;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,WAAW;AAAA,UACX,6BAA6B;AAAA,QAC/B;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAwBA,eAAsBC,uBACpB,WACA,SACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UACoC,sBAAsB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,WAAW,QAAQ,SAAS,OAAO;AAAA,QAC/D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","SubscriptionFrequency","DiscountType","getSubscriptionOption","getSubscriptionOptionsForProduct","getProductIdsForSubscriptionOption","getOneTimePurchasesStatus","createSubscriptionOption","updateSubscriptionOption","deleteSubscriptionOption","bulkCreateSubscriptionOptions","bulkUpdateSubscriptionOptions","bulkDeleteSubscriptionOptions","assignSubscriptionOptionsToProduct","allowOneTimePurchases"]}
|
|
1
|
+
{"version":3,"sources":["../../src/stores-v1-subscription-option-subscription-options.universal.ts","../../src/stores-v1-subscription-option-subscription-options.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixStoresV1SubscriptionOption from './stores-v1-subscription-option-subscription-options.http.js';\n\nexport interface SubscriptionOption {\n /**\n * Subscription option ID (auto-generated upon subscription option creation).\n * @format GUID\n */\n _id?: string | null;\n /**\n * Subscription option title.\n * @minLength 1\n * @maxLength 20\n */\n title?: string | null;\n /**\n * Subscription option description (optional).\n * @maxLength 60\n */\n description?: string | null;\n /** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Discount info (optional).\n * For example, a $20 discount would be `value: 20`, `type: AMOUNT`.\n */\n discount?: Discount;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequencyWithLiterals;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.\n * @min 2\n * @max 999\n */\n billingCycles?: number | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface Discount {\n /** Discount type. */\n type?: DiscountTypeWithLiterals;\n /** Discount value. */\n value?: number;\n}\n\nexport enum DiscountType {\n UNDEFINED = 'UNDEFINED',\n /** No discount */\n AMOUNT = 'AMOUNT',\n PERCENT = 'PERCENT',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'UNDEFINED'\n | 'AMOUNT'\n | 'PERCENT';\n\nexport interface GetSubscriptionOptionRequest {\n /**\n * Subscription option ID.\n * @minLength 1\n * @format GUID\n */\n _id: string;\n}\n\nexport interface GetSubscriptionOptionResponse {\n /** Subscription option. */\n subscriptionOption?: SubscriptionOption;\n}\n\nexport interface GetSubscriptionOptionsForProductRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n /** Whether to include hidden subscription options in the results. */\n includeHiddenSubscriptionOptions?: boolean;\n}\n\nexport interface GetSubscriptionOptionsForProductResponse {\n /** Subscription options. */\n subscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\nexport interface SubscriptionOptionInProduct {\n /**\n * Subscription option ID.\n * @format GUID\n */\n _id?: string;\n /** Whether the subscription option is hidden for the product (the default is false). */\n hidden?: boolean;\n /**\n * Subscription option title.\n * @minLength 1\n * @maxLength 20\n * @readonly\n */\n title?: string | null;\n /**\n * Subscription option description (optional).\n * @maxLength 60\n * @readonly\n */\n description?: string | null;\n /**\n * Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months.\n * @readonly\n */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Discount info (optional).\n * @readonly\n */\n discount?: Discount;\n}\n\nexport interface ListSubscriptionOptionsRequest {\n /**\n * Subscription option IDs.\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport interface ListSubscriptionOptionsResponse {\n /** Subscription options. */\n subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface CalculatePricesRequest {\n /** original price to which subscription options discount will be applied */\n price?: number;\n /**\n * ids of subscription options which will be applied to original price\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport interface CalculatePricesResponse {\n /** array of calculated prices */\n prices?: SubscriptionOptionPrices[];\n /** price to which subscription options discount applied */\n originalPrice?: number;\n}\n\nexport interface SubscriptionOptionPrices {\n /** Subscription option id */\n _id?: string;\n /** Price data calculated for subscription option */\n priceData?: SubscriptionOptionPriceData;\n /** Price data calculated for subscription option, converted to the currency requested in request header */\n convertedPriceData?: SubscriptionOptionPriceData;\n}\n\nexport interface SubscriptionOptionPriceData {\n /** Subscription option price currency */\n currency?: string;\n /** Price calculated after subscription option discount applied */\n discountedPrice?: number;\n /** Price calculated after subscription option discount applied, formatted with the currency */\n formattedDiscountedPrice?: string;\n}\n\nexport interface BulkCalculatePricesRequest {\n /**\n * Original prices to which subscription options discount will be applied.\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * @maxSize 1001\n */\n prices?: Record<string, number>;\n /**\n * ids of subscription options which will be applied to original price\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport interface BulkCalculatePricesResponse {\n /**\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * Value is response with calculated prices for each subscription option\n */\n calculatedPrices?: Record<string, CalculatePricesResponse>;\n}\n\nexport interface BulkCalculatePricesRequestV2 {\n /**\n * Original prices to be calculated for each corresponding product id with related subscription plan ids\n * @maxSize 100\n */\n items?: BulkCalculatePricesRequestItem[];\n}\n\nexport interface BulkCalculatePricesRequestItem {\n /**\n * Calculation id (product id)\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * Original prices to which subscription options discount will be applied.\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * @maxSize 1001\n */\n prices?: Record<string, number>;\n /**\n * ids of subscription options which will be applied to original price.\n * @format GUID\n * @maxSize 100\n */\n subscriptionOptionIds?: string[];\n}\n\nexport interface BulkCalculatePricesResponseV2 {\n /**\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * Value is response with calculated prices for each subscription option for each product\n */\n calculatedPricesPerProduct?: BulkCalculatePricesResponseItem[];\n}\n\nexport interface BulkCalculatePricesResponseItem {\n /**\n * Calculation id (product id)\n * @minLength 1\n */\n _id?: string;\n /**\n * Key is identifier unique per price that can be used to match calculated prices with original price\n * Value is response with calculated prices for each subscription option\n */\n calculatedPrices?: Record<string, CalculatePricesResponse>;\n}\n\nexport interface GetProductIdsForSubscriptionOptionRequest {\n /**\n * Subscription option ID.\n * @minLength 1\n * @format GUID\n */\n _id: string;\n /** Whether to include hidden products in the returned results. */\n includeHiddenProducts?: boolean;\n /** Optional pagination parameters */\n paging?: Paging;\n}\n\nexport interface Paging {\n /**\n * Amount of items to load per page.\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip in the display (relevant for all pages after the first). */\n offset?: number | null;\n}\n\nexport interface GetProductIdsForSubscriptionOptionResponse {\n /** IDs of products associated with the specified subscription option. */\n productIds?: string[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n /** Number of total results. */\n totalResults?: number;\n}\n\nexport interface PagingMetadata {\n /** Amount of items to load per page. */\n items?: number;\n /** Number of items to skip in the display (relevant for all pages after the first). */\n offset?: number;\n}\n\nexport interface GetOneTimePurchasesStatusRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n}\n\nexport interface GetOneTimePurchasesStatusResponse {\n /** Whether the specified product is available for one-time purchase */\n allowed?: boolean;\n}\n\nexport interface CreateSubscriptionOptionRequest {\n /** Subscription option info. */\n subscriptionOption: SubscriptionOption;\n}\n\nexport interface CreateSubscriptionOptionResponse {\n /** Newly created subscription option. */\n subscriptionOption?: SubscriptionOption;\n}\n\nexport interface UpdateSubscriptionOptionRequest {\n /** Subscription option info. Only the passed parameters will be updated. */\n subscriptionOption: SubscriptionOption;\n}\n\nexport interface UpdateSubscriptionOptionResponse {\n /** Updated subscription option. */\n subscriptionOption?: SubscriptionOption;\n}\n\nexport interface DeleteSubscriptionOptionRequest {\n /**\n * ID of the subscription option to delete.\n * @minLength 1\n * @format GUID\n */\n _id: string;\n}\n\nexport interface DeleteSubscriptionOptionResponse {}\n\nexport interface BulkCreateSubscriptionOptionsRequest {\n /**\n * Subscription options info.\n * @maxSize 100\n */\n subscriptionOptions: SubscriptionOption[];\n}\n\nexport interface BulkCreateSubscriptionOptionsResponse {\n /** Newly created subscription options. */\n subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface BulkUpdateSubscriptionOptionsRequest {\n /**\n * Subscription options info. Only the passed parameters in each subscription option will be updated.\n * @maxSize 100\n */\n subscriptionOptions: SubscriptionOption[];\n}\n\nexport interface BulkUpdateSubscriptionOptionsResponse {\n /** Updated subscription options. */\n subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface BulkDeleteSubscriptionOptionsRequest {\n /**\n * IDs of the subscription options to delete.\n * @maxSize 100\n * @format GUID\n */\n ids: string[];\n}\n\nexport interface BulkDeleteSubscriptionOptionsResponse {}\n\nexport interface AssignSubscriptionOptionsToProductRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n /**\n * Ordered array of subscription options that will be assigned to the product. Pass an empty array to remove all subscription options from the product.\n * @maxSize 6\n */\n assignedSubscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\nexport interface AssignSubscriptionOptionsToProductResponse {}\n\nexport interface AllowOneTimePurchasesRequest {\n /**\n * Product ID.\n * @minLength 1\n */\n productId: string;\n /** Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only. */\n allowed: boolean | null;\n}\n\nexport interface AllowOneTimePurchasesResponse {}\n\n/**\n * Retrieves a subscription option by ID.\n * @param _id - Subscription option ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption\n * @deprecated\n */\nexport async function getSubscriptionOption(\n _id: string\n): Promise<\n NonNullablePaths<\n SubscriptionOption,\n | `subscriptionSettings.frequency`\n | `subscriptionSettings.autoRenewal`\n | `discount.type`\n | `discount.value`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.subscriptionOption!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves all subscription options assigned to a specified product.\n * By default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @param options - Options.\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct\n * @deprecated\n */\nexport async function getSubscriptionOptionsForProduct(\n productId: string,\n options?: GetSubscriptionOptionsForProductOptions\n): Promise<\n NonNullablePaths<\n GetSubscriptionOptionsForProductResponse,\n | `subscriptionOptions`\n | `subscriptionOptions.${number}._id`\n | `subscriptionOptions.${number}.hidden`\n | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n | `subscriptionOptions.${number}.discount.type`\n | `subscriptionOptions.${number}.discount.value`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getSubscriptionOptionsForProduct(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n productId: '$[0]',\n includeHiddenSubscriptionOptions:\n '$[1].includeHiddenSubscriptionOptions',\n },\n singleArgumentUnchanged: false,\n },\n ['productId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSubscriptionOptionsForProductOptions {\n /** Whether to include hidden subscription options in the results. */\n includeHiddenSubscriptionOptions?: boolean;\n}\n\n/**\n * Retrieves the IDs of products associated with a specified subscription option.\n * @param _id - Subscription option ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @param options - Paging and other options.\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption\n * @deprecated\n */\nexport async function getProductIdsForSubscriptionOption(\n _id: string,\n options?: GetProductIdsForSubscriptionOptionOptions\n): Promise<\n NonNullablePaths<\n GetProductIdsForSubscriptionOptionResponse,\n `productIds` | `metadata.items` | `metadata.offset` | `totalResults`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n includeHiddenProducts: options?.includeHiddenProducts,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getProductIdsForSubscriptionOption(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n includeHiddenProducts: '$[1].includeHiddenProducts',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetProductIdsForSubscriptionOptionOptions {\n /** Whether to include hidden products in the returned results. */\n includeHiddenProducts?: boolean;\n /** Optional pagination parameters */\n paging?: Paging;\n}\n\n/**\n * Checks whether a specified product (associated with subscription options) is available for one-time purchase.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus\n * @deprecated\n */\nexport async function getOneTimePurchasesStatus(\n productId: string\n): Promise<NonNullablePaths<GetOneTimePurchasesStatusResponse, `allowed`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.getOneTimePurchasesStatus(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { productId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['productId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a subscription option.\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @param subscriptionOption - Subscription option info.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOption\n * @requiredField subscriptionOption.subscriptionSettings\n * @requiredField subscriptionOption.title\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Newly created subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption\n * @deprecated\n */\nexport async function createSubscriptionOption(\n subscriptionOption: NonNullablePaths<\n SubscriptionOption,\n `subscriptionSettings` | `title`,\n 2\n >\n): Promise<\n NonNullablePaths<\n SubscriptionOption,\n | `subscriptionSettings.frequency`\n | `subscriptionSettings.autoRenewal`\n | `discount.type`\n | `discount.value`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOption: subscriptionOption,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.createSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.subscriptionOption!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionOption: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionOption']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a subscription option.\n * Only parameters passed will be updated.\n * @param _id - Subscription option ID (auto-generated upon subscription option creation).\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField subscriptionOption\n * @param subscriptionOption - Subscription option update options.\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Updated subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption\n * @deprecated\n */\nexport async function updateSubscriptionOption(\n _id: string,\n subscriptionOption: UpdateSubscriptionOption\n): Promise<\n NonNullablePaths<\n SubscriptionOption,\n | `subscriptionSettings.frequency`\n | `subscriptionSettings.autoRenewal`\n | `discount.type`\n | `discount.value`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOption: { ...subscriptionOption, id: _id },\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.updateSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.subscriptionOption!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { subscriptionOption: '$[1]' },\n explicitPathsToArguments: { 'subscriptionOption.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'subscriptionOption']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateSubscriptionOption {\n /**\n * Subscription option ID (auto-generated upon subscription option creation).\n * @format GUID\n */\n _id?: string | null;\n /**\n * Subscription option title.\n * @minLength 1\n * @maxLength 20\n */\n title?: string | null;\n /**\n * Subscription option description (optional).\n * @maxLength 60\n */\n description?: string | null;\n /** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */\n subscriptionSettings?: SubscriptionSettings;\n /**\n * Discount info (optional).\n * For example, a $20 discount would be `value: 20`, `type: AMOUNT`.\n */\n discount?: Discount;\n}\n\n/**\n * Deletes a subscription option.\n * @param _id - ID of the subscription option to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption\n * @deprecated\n */\nexport async function deleteSubscriptionOption(_id: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.deleteSubscriptionOption(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates multiple subscription options (up to 100).\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @param subscriptionOptions - Subscription options info.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOptions\n * @requiredField subscriptionOptions.subscriptionSettings\n * @requiredField subscriptionOptions.title\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions\n * @deprecated\n */\nexport async function bulkCreateSubscriptionOptions(\n subscriptionOptions: NonNullablePaths<\n SubscriptionOption,\n `subscriptionSettings` | `title`,\n 2\n >[]\n): Promise<\n NonNullablePaths<\n BulkCreateSubscriptionOptionsResponse,\n | `subscriptionOptions`\n | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n | `subscriptionOptions.${number}.discount.type`\n | `subscriptionOptions.${number}.discount.value`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOptions: subscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.bulkCreateSubscriptionOptions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionOptions: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionOptions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates multiple subscription options.\n * Only parameters passed will be updated.\n * @param subscriptionOptions - Subscription options info. Only the passed parameters in each subscription option will be updated.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOptions\n * @requiredField subscriptionOptions._id\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions\n * @deprecated\n */\nexport async function bulkUpdateSubscriptionOptions(\n subscriptionOptions: NonNullablePaths<SubscriptionOption, `_id`, 2>[]\n): Promise<\n NonNullablePaths<\n BulkUpdateSubscriptionOptionsResponse,\n | `subscriptionOptions`\n | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n | `subscriptionOptions.${number}.discount.type`\n | `subscriptionOptions.${number}.discount.value`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subscriptionOptions: subscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.bulkUpdateSubscriptionOptions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionOptions: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionOptions']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes multiple subscription options.\n * @param ids - IDs of the subscription options to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField ids\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions\n * @deprecated\n */\nexport async function bulkDeleteSubscriptionOptions(\n ids: string[]\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.bulkDeleteSubscriptionOptions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ids: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ids']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Assign up to 6 subscription options to a specified product.\n * Pass an empty array to remove all subscription options assigned to a product.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @param options - Subscription option assignment options.\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct\n * @deprecated\n */\nexport async function assignSubscriptionOptionsToProduct(\n productId: string,\n options?: AssignSubscriptionOptionsToProductOptions\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n assignedSubscriptionOptions: options?.assignedSubscriptionOptions,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.assignSubscriptionOptionsToProduct(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n productId: '$[0]',\n assignedSubscriptionOptions: '$[1].assignedSubscriptionOptions',\n },\n singleArgumentUnchanged: false,\n },\n ['productId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AssignSubscriptionOptionsToProductOptions {\n /**\n * Ordered array of subscription options that will be assigned to the product. Pass an empty array to remove all subscription options from the product.\n * @maxSize 6\n */\n assignedSubscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\n/**\n * Allow for one-time purchase of a product.\n * By default, product can be sold only as part of a subscription, not as a one-time purchase.\n * @param productId - Product ID.\n * @param allowed - Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only.\n * @public\n * @documentationMaturity preview\n * @requiredField allowed\n * @requiredField productId\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases\n * @deprecated\n */\nexport async function allowOneTimePurchases(\n productId: string,\n allowed: boolean\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n productId: productId,\n allowed: allowed,\n });\n\n const reqOpts =\n ambassadorWixStoresV1SubscriptionOption.allowOneTimePurchases(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { productId: '$[0]', allowed: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['productId', 'allowed']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wix-ecommerce-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/stores/v1/subscription-options',\n destPath: '/v1/subscription-options',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/subscription-options-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wix-ecommerce-plans-reader',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-ecommerce-plans-reader',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/subscription-options-reader-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/subscription-options-reader-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_stores_subscription-options';\n\n/**\n * Retrieves a subscription option by ID.\n * @deprecated\n */\nexport function getSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSubscriptionOption({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n { protoPath: '/v1/subscription-options/{id}', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSubscriptionOption;\n}\n\n/**\n * Retrieves all subscription options assigned to a specified product.\n * By default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.\n * @deprecated\n */\nexport function getSubscriptionOptionsForProduct(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSubscriptionOptionsForProduct({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n {\n protoPath: '/v1/subscription-options/byProduct/{productId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSubscriptionOptionsForProduct;\n}\n\n/**\n * Retrieves the IDs of products associated with a specified subscription option.\n * @deprecated\n */\nexport function getProductIdsForSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __getProductIdsForSubscriptionOption({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n {\n protoPath: '/v1/subscription-options/{id}/productIds',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getProductIdsForSubscriptionOption;\n}\n\n/**\n * Checks whether a specified product (associated with subscription options) is available for one-time purchase.\n * @deprecated\n */\nexport function getOneTimePurchasesStatus(\n payload: object\n): RequestOptionsFactory<any> {\n function __getOneTimePurchasesStatus({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n {\n protoPath:\n '/v1/subscription-options/product/{productId}/oneTimePurchasesStatus',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getOneTimePurchasesStatus;\n}\n\n/**\n * Creates a subscription option.\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @deprecated\n */\nexport function createSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __createSubscriptionOption({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n { protoPath: '/v1/subscription-options', data: serializedData, host }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createSubscriptionOption;\n}\n\n/**\n * Updates a subscription option.\n * Only parameters passed will be updated.\n * @deprecated\n */\nexport function updateSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSubscriptionOption({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/{subscriptionOption.id}',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOption.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateSubscriptionOption;\n}\n\n/**\n * Deletes a subscription option.\n * @deprecated\n */\nexport function deleteSubscriptionOption(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteSubscriptionOption({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n { protoPath: '/v1/subscription-options/{id}', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteSubscriptionOption;\n}\n\n/**\n * Creates multiple subscription options (up to 100).\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @deprecated\n */\nexport function bulkCreateSubscriptionOptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateSubscriptionOptions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/createBulk',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateSubscriptionOptions;\n}\n\n/**\n * Updates multiple subscription options.\n * Only parameters passed will be updated.\n * @deprecated\n */\nexport function bulkUpdateSubscriptionOptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateSubscriptionOptions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n { protoPath: '/v1/subscription-options', data: serializedData, host }\n ),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'subscriptionOptions.discount.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateSubscriptionOptions;\n}\n\n/**\n * Deletes multiple subscription options.\n * @deprecated\n */\nexport function bulkDeleteSubscriptionOptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteSubscriptionOptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/deleteBulk',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteSubscriptionOptions;\n}\n\n/**\n * Assign up to 6 subscription options to a specified product.\n * Pass an empty array to remove all subscription options assigned to a product.\n * @deprecated\n */\nexport function assignSubscriptionOptionsToProduct(\n payload: object\n): RequestOptionsFactory<any> {\n function __assignSubscriptionOptionsToProduct({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'assignedSubscriptionOptions.discount.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath: '/v1/subscription-options/product/{productId}/assign',\n data: serializedData,\n host,\n }\n ),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __assignSubscriptionOptionsToProduct;\n}\n\n/**\n * Allow for one-time purchase of a product.\n * By default, product can be sold only as part of a subscription, not as a one-time purchase.\n * @deprecated\n */\nexport function allowOneTimePurchases(\n payload: object\n): RequestOptionsFactory<any> {\n function __allowOneTimePurchases({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.stores.v1.subscription_option',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n {\n protoPath:\n '/v1/subscription-options/product/{productId}/allowOneTimePurchase',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __allowOneTimePurchases;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,yEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IAC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;AAAA,EACR;AACF;AAwBA,eAAsBC,uBACpB,WACA,SACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UACoC,sBAAsB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,WAAW,QAAQ,SAAS,OAAO;AAAA,QAC/D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","SubscriptionFrequency","DiscountType","getSubscriptionOption","getSubscriptionOptionsForProduct","getProductIdsForSubscriptionOption","getOneTimePurchasesStatus","createSubscriptionOption","updateSubscriptionOption","deleteSubscriptionOption","bulkCreateSubscriptionOptions","bulkUpdateSubscriptionOptions","bulkDeleteSubscriptionOptions","assignSubscriptionOptionsToProduct","allowOneTimePurchases"]}
|
package/build/es/meta.mjs
CHANGED
|
@@ -88,6 +88,9 @@ function getSubscriptionOption(payload) {
|
|
|
88
88
|
method: "GET",
|
|
89
89
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
|
|
90
90
|
packageName: PACKAGE_NAME,
|
|
91
|
+
migrationOptions: {
|
|
92
|
+
optInTransformResponse: true
|
|
93
|
+
},
|
|
91
94
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
92
95
|
{ protoPath: "/v1/subscription-options/{id}", data: payload, host }
|
|
93
96
|
),
|
|
@@ -110,6 +113,9 @@ function getSubscriptionOptionsForProduct(payload) {
|
|
|
110
113
|
method: "GET",
|
|
111
114
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
|
|
112
115
|
packageName: PACKAGE_NAME,
|
|
116
|
+
migrationOptions: {
|
|
117
|
+
optInTransformResponse: true
|
|
118
|
+
},
|
|
113
119
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
114
120
|
{
|
|
115
121
|
protoPath: "/v1/subscription-options/byProduct/{productId}",
|
|
@@ -136,6 +142,9 @@ function getProductIdsForSubscriptionOption(payload) {
|
|
|
136
142
|
method: "GET",
|
|
137
143
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
|
|
138
144
|
packageName: PACKAGE_NAME,
|
|
145
|
+
migrationOptions: {
|
|
146
|
+
optInTransformResponse: true
|
|
147
|
+
},
|
|
139
148
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
140
149
|
{
|
|
141
150
|
protoPath: "/v1/subscription-options/{id}/productIds",
|
|
@@ -156,6 +165,9 @@ function getOneTimePurchasesStatus(payload) {
|
|
|
156
165
|
method: "GET",
|
|
157
166
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
|
|
158
167
|
packageName: PACKAGE_NAME,
|
|
168
|
+
migrationOptions: {
|
|
169
|
+
optInTransformResponse: true
|
|
170
|
+
},
|
|
159
171
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
|
|
160
172
|
{
|
|
161
173
|
protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
|
|
@@ -182,6 +194,9 @@ function createSubscriptionOption(payload) {
|
|
|
182
194
|
method: "POST",
|
|
183
195
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption",
|
|
184
196
|
packageName: PACKAGE_NAME,
|
|
197
|
+
migrationOptions: {
|
|
198
|
+
optInTransformResponse: true
|
|
199
|
+
},
|
|
185
200
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
186
201
|
{ protoPath: "/v1/subscription-options", data: serializedData, host }
|
|
187
202
|
),
|
|
@@ -210,6 +225,9 @@ function updateSubscriptionOption(payload) {
|
|
|
210
225
|
method: "PATCH",
|
|
211
226
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption",
|
|
212
227
|
packageName: PACKAGE_NAME,
|
|
228
|
+
migrationOptions: {
|
|
229
|
+
optInTransformResponse: true
|
|
230
|
+
},
|
|
213
231
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
214
232
|
{
|
|
215
233
|
protoPath: "/v1/subscription-options/{subscriptionOption.id}",
|
|
@@ -236,6 +254,9 @@ function deleteSubscriptionOption(payload) {
|
|
|
236
254
|
method: "DELETE",
|
|
237
255
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption",
|
|
238
256
|
packageName: PACKAGE_NAME,
|
|
257
|
+
migrationOptions: {
|
|
258
|
+
optInTransformResponse: true
|
|
259
|
+
},
|
|
239
260
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
240
261
|
{ protoPath: "/v1/subscription-options/{id}", data: payload, host }
|
|
241
262
|
),
|
|
@@ -258,6 +279,9 @@ function bulkCreateSubscriptionOptions(payload) {
|
|
|
258
279
|
method: "POST",
|
|
259
280
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions",
|
|
260
281
|
packageName: PACKAGE_NAME,
|
|
282
|
+
migrationOptions: {
|
|
283
|
+
optInTransformResponse: true
|
|
284
|
+
},
|
|
261
285
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
262
286
|
{
|
|
263
287
|
protoPath: "/v1/subscription-options/createBulk",
|
|
@@ -290,6 +314,9 @@ function bulkUpdateSubscriptionOptions(payload) {
|
|
|
290
314
|
method: "PATCH",
|
|
291
315
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions",
|
|
292
316
|
packageName: PACKAGE_NAME,
|
|
317
|
+
migrationOptions: {
|
|
318
|
+
optInTransformResponse: true
|
|
319
|
+
},
|
|
293
320
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
294
321
|
{ protoPath: "/v1/subscription-options", data: serializedData, host }
|
|
295
322
|
),
|
|
@@ -312,6 +339,9 @@ function bulkDeleteSubscriptionOptions(payload) {
|
|
|
312
339
|
method: "POST",
|
|
313
340
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions",
|
|
314
341
|
packageName: PACKAGE_NAME,
|
|
342
|
+
migrationOptions: {
|
|
343
|
+
optInTransformResponse: true
|
|
344
|
+
},
|
|
315
345
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
316
346
|
{
|
|
317
347
|
protoPath: "/v1/subscription-options/deleteBulk",
|
|
@@ -338,6 +368,9 @@ function assignSubscriptionOptionsToProduct(payload) {
|
|
|
338
368
|
method: "POST",
|
|
339
369
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct",
|
|
340
370
|
packageName: PACKAGE_NAME,
|
|
371
|
+
migrationOptions: {
|
|
372
|
+
optInTransformResponse: true
|
|
373
|
+
},
|
|
341
374
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
342
375
|
{
|
|
343
376
|
protoPath: "/v1/subscription-options/product/{productId}/assign",
|
|
@@ -358,6 +391,9 @@ function allowOneTimePurchases(payload) {
|
|
|
358
391
|
method: "PATCH",
|
|
359
392
|
methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases",
|
|
360
393
|
packageName: PACKAGE_NAME,
|
|
394
|
+
migrationOptions: {
|
|
395
|
+
optInTransformResponse: true
|
|
396
|
+
},
|
|
361
397
|
url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
|
|
362
398
|
{
|
|
363
399
|
protoPath: "/v1/subscription-options/product/{productId}/allowOneTimePurchase",
|