@wix/auto_sdk_stores_subscription-options 1.0.21 → 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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../index.typings.ts","../../../src/stores-v1-subscription-option-subscription-options.universal.ts","../../../src/stores-v1-subscription-option-subscription-options.http.ts"],"sourcesContent":["export * from './src/stores-v1-subscription-option-subscription-options.universal.js';\n","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 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;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA,0CAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,0CAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,wCAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;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,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,I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ct","bulkCreateSubscriptionOptions","bulkDeleteSubscriptionOptions","bulkUpdateSubscriptionOptions","createSubscriptionOption","deleteSubscriptionOption","getOneTimePurchasesStatus","getProductIdsForSubscriptionOption","getSubscriptionOption","getSubscriptionOptionsForProduct","updateSubscriptionOption","import_float","import_rest_modules","payload","SubscriptionFrequency","DiscountType","getSubscriptionOption","sdkTransformError","getSubscriptionOptionsForProduct","getProductIdsForSubscriptionOption","getOneTimePurchasesStatus","createSubscriptionOption","updateSubscriptionOption","deleteSubscriptionOption","bulkCreateSubscriptionOptions","bulkUpdateSubscriptionOptions","bulkDeleteSubscriptionOptions","assignSubscriptionOptionsToProduct","allowOneTimePurchases"]}
1
+ {"version":3,"sources":["../../../index.typings.ts","../../../src/stores-v1-subscription-option-subscription-options.universal.ts","../../../src/stores-v1-subscription-option-subscription-options.http.ts"],"sourcesContent":["export * from './src/stores-v1-subscription-option-subscription-options.universal.js';\n","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;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA,0CAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,0CAAAC;AAAA,EAAA,6BAAAC;AAAA,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AE1B,UAAM;AAAA,EACR;AACF;","names":["allowOneTimePurchases","assignSubscriptionOptionsToProduct","bulkCreateSubscriptionOptions","bulkDeleteSubscriptionOptions","bulkUpdateSubscriptionOptions","createSubscriptionOption","deleteSubscriptionOption","getOneTimePurchasesStatus","getProductIdsForSubscriptionOption","getSubscriptionOption","getSubscriptionOptionsForProduct","updateSubscriptionOption","import_float","import_rest_modules","payload","SubscriptionFrequency","DiscountType","getSubscriptionOption","sdkTransformError","getSubscriptionOptionsForProduct","getProductIdsForSubscriptionOption","getOneTimePurchasesStatus","createSubscriptionOption","updateSubscriptionOption","deleteSubscriptionOption","bulkCreateSubscriptionOptions","bulkUpdateSubscriptionOptions","bulkDeleteSubscriptionOptions","assignSubscriptionOptionsToProduct","allowOneTimePurchases"]}
@@ -125,6 +125,9 @@ function getSubscriptionOption(payload) {
125
125
  method: "GET",
126
126
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption",
127
127
  packageName: PACKAGE_NAME,
128
+ migrationOptions: {
129
+ optInTransformResponse: true
130
+ },
128
131
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
129
132
  { protoPath: "/v1/subscription-options/{id}", data: payload, host }
130
133
  ),
@@ -147,6 +150,9 @@ function getSubscriptionOptionsForProduct(payload) {
147
150
  method: "GET",
148
151
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct",
149
152
  packageName: PACKAGE_NAME,
153
+ migrationOptions: {
154
+ optInTransformResponse: true
155
+ },
150
156
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
151
157
  {
152
158
  protoPath: "/v1/subscription-options/byProduct/{productId}",
@@ -173,6 +179,9 @@ function getProductIdsForSubscriptionOption(payload) {
173
179
  method: "GET",
174
180
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption",
175
181
  packageName: PACKAGE_NAME,
182
+ migrationOptions: {
183
+ optInTransformResponse: true
184
+ },
176
185
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
177
186
  {
178
187
  protoPath: "/v1/subscription-options/{id}/productIds",
@@ -193,6 +202,9 @@ function getOneTimePurchasesStatus(payload) {
193
202
  method: "GET",
194
203
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus",
195
204
  packageName: PACKAGE_NAME,
205
+ migrationOptions: {
206
+ optInTransformResponse: true
207
+ },
196
208
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(
197
209
  {
198
210
  protoPath: "/v1/subscription-options/product/{productId}/oneTimePurchasesStatus",
@@ -219,6 +231,9 @@ function createSubscriptionOption(payload) {
219
231
  method: "POST",
220
232
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption",
221
233
  packageName: PACKAGE_NAME,
234
+ migrationOptions: {
235
+ optInTransformResponse: true
236
+ },
222
237
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
223
238
  { protoPath: "/v1/subscription-options", data: serializedData, host }
224
239
  ),
@@ -247,6 +262,9 @@ function updateSubscriptionOption(payload) {
247
262
  method: "PATCH",
248
263
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption",
249
264
  packageName: PACKAGE_NAME,
265
+ migrationOptions: {
266
+ optInTransformResponse: true
267
+ },
250
268
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
251
269
  {
252
270
  protoPath: "/v1/subscription-options/{subscriptionOption.id}",
@@ -273,6 +291,9 @@ function deleteSubscriptionOption(payload) {
273
291
  method: "DELETE",
274
292
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption",
275
293
  packageName: PACKAGE_NAME,
294
+ migrationOptions: {
295
+ optInTransformResponse: true
296
+ },
276
297
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
277
298
  { protoPath: "/v1/subscription-options/{id}", data: payload, host }
278
299
  ),
@@ -295,6 +316,9 @@ function bulkCreateSubscriptionOptions(payload) {
295
316
  method: "POST",
296
317
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions",
297
318
  packageName: PACKAGE_NAME,
319
+ migrationOptions: {
320
+ optInTransformResponse: true
321
+ },
298
322
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
299
323
  {
300
324
  protoPath: "/v1/subscription-options/createBulk",
@@ -327,6 +351,9 @@ function bulkUpdateSubscriptionOptions(payload) {
327
351
  method: "PATCH",
328
352
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions",
329
353
  packageName: PACKAGE_NAME,
354
+ migrationOptions: {
355
+ optInTransformResponse: true
356
+ },
330
357
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
331
358
  { protoPath: "/v1/subscription-options", data: serializedData, host }
332
359
  ),
@@ -349,6 +376,9 @@ function bulkDeleteSubscriptionOptions(payload) {
349
376
  method: "POST",
350
377
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions",
351
378
  packageName: PACKAGE_NAME,
379
+ migrationOptions: {
380
+ optInTransformResponse: true
381
+ },
352
382
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
353
383
  {
354
384
  protoPath: "/v1/subscription-options/deleteBulk",
@@ -375,6 +405,9 @@ function assignSubscriptionOptionsToProduct(payload) {
375
405
  method: "POST",
376
406
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct",
377
407
  packageName: PACKAGE_NAME,
408
+ migrationOptions: {
409
+ optInTransformResponse: true
410
+ },
378
411
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
379
412
  {
380
413
  protoPath: "/v1/subscription-options/product/{productId}/assign",
@@ -395,6 +428,9 @@ function allowOneTimePurchases(payload) {
395
428
  method: "PATCH",
396
429
  methodFqn: "wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases",
397
430
  packageName: PACKAGE_NAME,
431
+ migrationOptions: {
432
+ optInTransformResponse: true
433
+ },
398
434
  url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(
399
435
  {
400
436
  protoPath: "/v1/subscription-options/product/{productId}/allowOneTimePurchase",