{"version":3,"sources":["../../src/stores-v1-subscription-option-subscription-options.universal.ts","../../src/stores-v1-subscription-option-subscription-options.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixStoresV1SubscriptionOption from './stores-v1-subscription-option-subscription-options.http.js';\n\nexport interface SubscriptionOption {\n  /**\n   * Subscription option ID (auto-generated upon subscription option creation).\n   * @format GUID\n   */\n  _id?: string | null;\n  /**\n   * Subscription option title.\n   * @minLength 1\n   * @maxLength 20\n   */\n  title?: string | null;\n  /**\n   * Subscription option description (optional).\n   * @maxLength 60\n   */\n  description?: string | null;\n  /** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */\n  subscriptionSettings?: SubscriptionSettings;\n  /**\n   * Discount info (optional).\n   * For example, a $20 discount would be `value: 20`, `type: AMOUNT`.\n   */\n  discount?: Discount;\n}\n\nexport interface SubscriptionSettings {\n  /** Frequency of recurring payment. */\n  frequency?: SubscriptionFrequencyWithLiterals;\n  /** Whether subscription is renewed automatically at the end of each period. */\n  autoRenewal?: boolean;\n  /**\n   * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.\n   * @min 2\n   * @max 999\n   */\n  billingCycles?: number | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n  UNDEFINED = 'UNDEFINED',\n  DAY = 'DAY',\n  WEEK = 'WEEK',\n  MONTH = 'MONTH',\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n  | SubscriptionFrequency\n  | 'UNDEFINED'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport interface Discount {\n  /** Discount type. */\n  type?: DiscountTypeWithLiterals;\n  /** Discount value. */\n  value?: number;\n}\n\nexport enum DiscountType {\n  UNDEFINED = 'UNDEFINED',\n  /** No discount */\n  AMOUNT = 'AMOUNT',\n  PERCENT = 'PERCENT',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n  | DiscountType\n  | 'UNDEFINED'\n  | 'AMOUNT'\n  | 'PERCENT';\n\nexport interface GetSubscriptionOptionRequest {\n  /**\n   * Subscription option ID.\n   * @minLength 1\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface GetSubscriptionOptionResponse {\n  /** Subscription option. */\n  subscriptionOption?: SubscriptionOption;\n}\n\nexport interface GetSubscriptionOptionsForProductRequest {\n  /**\n   * Product ID.\n   * @minLength 1\n   */\n  productId: string;\n  /** Whether to include hidden subscription options in the results. */\n  includeHiddenSubscriptionOptions?: boolean;\n}\n\nexport interface GetSubscriptionOptionsForProductResponse {\n  /** Subscription options. */\n  subscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\nexport interface SubscriptionOptionInProduct {\n  /**\n   * Subscription option ID.\n   * @format GUID\n   */\n  _id?: string;\n  /** Whether the subscription option is hidden for the product (the default is false). */\n  hidden?: boolean;\n  /**\n   * Subscription option title.\n   * @minLength 1\n   * @maxLength 20\n   * @readonly\n   */\n  title?: string | null;\n  /**\n   * Subscription option description (optional).\n   * @maxLength 60\n   * @readonly\n   */\n  description?: string | null;\n  /**\n   * Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months.\n   * @readonly\n   */\n  subscriptionSettings?: SubscriptionSettings;\n  /**\n   * Discount info (optional).\n   * @readonly\n   */\n  discount?: Discount;\n}\n\nexport interface ListSubscriptionOptionsRequest {\n  /**\n   * Subscription option IDs.\n   * @format GUID\n   * @maxSize 100\n   */\n  ids?: string[];\n}\n\nexport interface ListSubscriptionOptionsResponse {\n  /** Subscription options. */\n  subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface CalculatePricesRequest {\n  /** original price to which subscription options discount will be applied */\n  price?: number;\n  /**\n   * ids of subscription options which will be applied to original price\n   * @format GUID\n   * @maxSize 100\n   */\n  ids?: string[];\n}\n\nexport interface CalculatePricesResponse {\n  /** array of calculated prices */\n  prices?: SubscriptionOptionPrices[];\n  /** price to which subscription options discount applied */\n  originalPrice?: number;\n}\n\nexport interface SubscriptionOptionPrices {\n  /** Subscription option id */\n  _id?: string;\n  /** Price data calculated for subscription option */\n  priceData?: SubscriptionOptionPriceData;\n  /** Price data calculated for subscription option, converted to the currency requested in request header */\n  convertedPriceData?: SubscriptionOptionPriceData;\n}\n\nexport interface SubscriptionOptionPriceData {\n  /** Subscription option price currency */\n  currency?: string;\n  /** Price calculated after subscription option discount applied */\n  discountedPrice?: number;\n  /** Price calculated after subscription option discount applied, formatted with the currency */\n  formattedDiscountedPrice?: string;\n}\n\nexport interface BulkCalculatePricesRequest {\n  /**\n   * Original prices to which subscription options discount will be applied.\n   * Key is identifier unique per price that can be used to match calculated prices with original price\n   * @maxSize 1001\n   */\n  prices?: Record<string, number>;\n  /**\n   * ids of subscription options which will be applied to original price\n   * @format GUID\n   * @maxSize 100\n   */\n  ids?: string[];\n}\n\nexport interface BulkCalculatePricesResponse {\n  /**\n   * Key is identifier unique per price that can be used to match calculated prices with original price\n   * Value is response with calculated prices for each subscription option\n   */\n  calculatedPrices?: Record<string, CalculatePricesResponse>;\n}\n\nexport interface BulkCalculatePricesRequestV2 {\n  /**\n   * Original prices to be calculated for each corresponding product id with related subscription plan ids\n   * @maxSize 100\n   */\n  items?: BulkCalculatePricesRequestItem[];\n}\n\nexport interface BulkCalculatePricesRequestItem {\n  /**\n   * Calculation id (product id)\n   * @minLength 1\n   * @maxLength 36\n   */\n  _id?: string;\n  /**\n   * Original prices to which subscription options discount will be applied.\n   * Key is identifier unique per price that can be used to match calculated prices with original price\n   * @maxSize 1001\n   */\n  prices?: Record<string, number>;\n  /**\n   * ids of subscription options which will be applied to original price.\n   * @format GUID\n   * @maxSize 100\n   */\n  subscriptionOptionIds?: string[];\n}\n\nexport interface BulkCalculatePricesResponseV2 {\n  /**\n   * Key is identifier unique per price that can be used to match calculated prices with original price\n   * Value is response with calculated prices for each subscription option for each product\n   */\n  calculatedPricesPerProduct?: BulkCalculatePricesResponseItem[];\n}\n\nexport interface BulkCalculatePricesResponseItem {\n  /**\n   * Calculation id (product id)\n   * @minLength 1\n   */\n  _id?: string;\n  /**\n   * Key is identifier unique per price that can be used to match calculated prices with original price\n   * Value is response with calculated prices for each subscription option\n   */\n  calculatedPrices?: Record<string, CalculatePricesResponse>;\n}\n\nexport interface GetProductIdsForSubscriptionOptionRequest {\n  /**\n   * Subscription option ID.\n   * @minLength 1\n   * @format GUID\n   */\n  _id: string;\n  /** Whether to include hidden products in the returned results. */\n  includeHiddenProducts?: boolean;\n  /** Optional pagination parameters */\n  paging?: Paging;\n}\n\nexport interface Paging {\n  /**\n   * Amount of items to load per page.\n   * @max 100\n   */\n  limit?: number | null;\n  /** Number of items to skip in the display (relevant for all pages after the first). */\n  offset?: number | null;\n}\n\nexport interface GetProductIdsForSubscriptionOptionResponse {\n  /** IDs of products associated with the specified subscription option. */\n  productIds?: string[];\n  /** Paging metadata. */\n  metadata?: PagingMetadata;\n  /** Number of total results. */\n  totalResults?: number;\n}\n\nexport interface PagingMetadata {\n  /** Amount of items to load per page. */\n  items?: number;\n  /** Number of items to skip in the display (relevant for all pages after the first). */\n  offset?: number;\n}\n\nexport interface GetOneTimePurchasesStatusRequest {\n  /**\n   * Product ID.\n   * @minLength 1\n   */\n  productId: string;\n}\n\nexport interface GetOneTimePurchasesStatusResponse {\n  /** Whether the specified product is available for one-time purchase */\n  allowed?: boolean;\n}\n\nexport interface CreateSubscriptionOptionRequest {\n  /** Subscription option info. */\n  subscriptionOption: SubscriptionOption;\n}\n\nexport interface CreateSubscriptionOptionResponse {\n  /** Newly created subscription option. */\n  subscriptionOption?: SubscriptionOption;\n}\n\nexport interface UpdateSubscriptionOptionRequest {\n  /** Subscription option info. Only the passed parameters will be updated. */\n  subscriptionOption: SubscriptionOption;\n}\n\nexport interface UpdateSubscriptionOptionResponse {\n  /** Updated subscription option. */\n  subscriptionOption?: SubscriptionOption;\n}\n\nexport interface DeleteSubscriptionOptionRequest {\n  /**\n   * ID of the subscription option to delete.\n   * @minLength 1\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface DeleteSubscriptionOptionResponse {}\n\nexport interface BulkCreateSubscriptionOptionsRequest {\n  /**\n   * Subscription options info.\n   * @maxSize 100\n   */\n  subscriptionOptions: SubscriptionOption[];\n}\n\nexport interface BulkCreateSubscriptionOptionsResponse {\n  /** Newly created subscription options. */\n  subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface BulkUpdateSubscriptionOptionsRequest {\n  /**\n   * Subscription options info. Only the passed parameters in each subscription option will be updated.\n   * @maxSize 100\n   */\n  subscriptionOptions: SubscriptionOption[];\n}\n\nexport interface BulkUpdateSubscriptionOptionsResponse {\n  /** Updated subscription options. */\n  subscriptionOptions?: SubscriptionOption[];\n}\n\nexport interface BulkDeleteSubscriptionOptionsRequest {\n  /**\n   * IDs of the subscription options to delete.\n   * @maxSize 100\n   * @format GUID\n   */\n  ids: string[];\n}\n\nexport interface BulkDeleteSubscriptionOptionsResponse {}\n\nexport interface AssignSubscriptionOptionsToProductRequest {\n  /**\n   * Product ID.\n   * @minLength 1\n   */\n  productId: string;\n  /**\n   * Ordered array of subscription options that will be assigned to the product. Pass an empty array to remove all subscription options from the product.\n   * @maxSize 6\n   */\n  assignedSubscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\nexport interface AssignSubscriptionOptionsToProductResponse {}\n\nexport interface AllowOneTimePurchasesRequest {\n  /**\n   * Product ID.\n   * @minLength 1\n   */\n  productId: string;\n  /** Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only. */\n  allowed: boolean | null;\n}\n\nexport interface AllowOneTimePurchasesResponse {}\n\n/**\n * Retrieves a subscription option by ID.\n * @param _id - Subscription option ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption\n * @deprecated\n */\nexport async function getSubscriptionOption(\n  _id: string\n): Promise<\n  NonNullablePaths<\n    SubscriptionOption,\n    | `subscriptionSettings.frequency`\n    | `subscriptionSettings.autoRenewal`\n    | `discount.type`\n    | `discount.value`,\n    3\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.getSubscriptionOption(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.subscriptionOption!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves all subscription options assigned to a specified product.\n * By default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @param options - Options.\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct\n * @deprecated\n */\nexport async function getSubscriptionOptionsForProduct(\n  productId: string,\n  options?: GetSubscriptionOptionsForProductOptions\n): Promise<\n  NonNullablePaths<\n    GetSubscriptionOptionsForProductResponse,\n    | `subscriptionOptions`\n    | `subscriptionOptions.${number}._id`\n    | `subscriptionOptions.${number}.hidden`\n    | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n    | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n    | `subscriptionOptions.${number}.discount.type`\n    | `subscriptionOptions.${number}.discount.value`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    productId: productId,\n    includeHiddenSubscriptionOptions: options?.includeHiddenSubscriptionOptions,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.getSubscriptionOptionsForProduct(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          productId: '$[0]',\n          includeHiddenSubscriptionOptions:\n            '$[1].includeHiddenSubscriptionOptions',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['productId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetSubscriptionOptionsForProductOptions {\n  /** Whether to include hidden subscription options in the results. */\n  includeHiddenSubscriptionOptions?: boolean;\n}\n\n/**\n * Retrieves the IDs of products associated with a specified subscription option.\n * @param _id - Subscription option ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @param options - Paging and other options.\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption\n * @deprecated\n */\nexport async function getProductIdsForSubscriptionOption(\n  _id: string,\n  options?: GetProductIdsForSubscriptionOptionOptions\n): Promise<\n  NonNullablePaths<\n    GetProductIdsForSubscriptionOptionResponse,\n    `productIds` | `metadata.items` | `metadata.offset` | `totalResults`,\n    3\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    includeHiddenProducts: options?.includeHiddenProducts,\n    paging: options?.paging,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.getProductIdsForSubscriptionOption(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          id: '$[0]',\n          includeHiddenProducts: '$[1].includeHiddenProducts',\n          paging: '$[1].paging',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetProductIdsForSubscriptionOptionOptions {\n  /** Whether to include hidden products in the returned results. */\n  includeHiddenProducts?: boolean;\n  /** Optional pagination parameters */\n  paging?: Paging;\n}\n\n/**\n * Checks whether a specified product (associated with subscription options) is available for one-time purchase.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @permissionId WIX_STORES.READ_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus\n * @deprecated\n */\nexport async function getOneTimePurchasesStatus(\n  productId: string\n): Promise<NonNullablePaths<GetOneTimePurchasesStatusResponse, `allowed`, 2>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    productId: productId,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.getOneTimePurchasesStatus(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { productId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['productId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates a subscription option.\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @param subscriptionOption - Subscription option info.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOption\n * @requiredField subscriptionOption.subscriptionSettings\n * @requiredField subscriptionOption.title\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Newly created subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption\n * @deprecated\n */\nexport async function createSubscriptionOption(\n  subscriptionOption: NonNullablePaths<\n    SubscriptionOption,\n    `subscriptionSettings` | `title`,\n    2\n  >\n): Promise<\n  NonNullablePaths<\n    SubscriptionOption,\n    | `subscriptionSettings.frequency`\n    | `subscriptionSettings.autoRenewal`\n    | `discount.type`\n    | `discount.value`,\n    3\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    subscriptionOption: subscriptionOption,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.createSubscriptionOption(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.subscriptionOption!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { subscriptionOption: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['subscriptionOption']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates a subscription option.\n * Only parameters passed will be updated.\n * @param _id - Subscription option ID (auto-generated upon subscription option creation).\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField subscriptionOption\n * @param subscriptionOption - Subscription option update options.\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @returns Updated subscription option.\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption\n * @deprecated\n */\nexport async function updateSubscriptionOption(\n  _id: string,\n  subscriptionOption: UpdateSubscriptionOption\n): Promise<\n  NonNullablePaths<\n    SubscriptionOption,\n    | `subscriptionSettings.frequency`\n    | `subscriptionSettings.autoRenewal`\n    | `discount.type`\n    | `discount.value`,\n    3\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    subscriptionOption: { ...subscriptionOption, id: _id },\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.updateSubscriptionOption(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.subscriptionOption!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { subscriptionOption: '$[1]' },\n        explicitPathsToArguments: { 'subscriptionOption.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'subscriptionOption']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateSubscriptionOption {\n  /**\n   * Subscription option ID (auto-generated upon subscription option creation).\n   * @format GUID\n   */\n  _id?: string | null;\n  /**\n   * Subscription option title.\n   * @minLength 1\n   * @maxLength 20\n   */\n  title?: string | null;\n  /**\n   * Subscription option description (optional).\n   * @maxLength 60\n   */\n  description?: string | null;\n  /** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */\n  subscriptionSettings?: SubscriptionSettings;\n  /**\n   * Discount info (optional).\n   * For example, a $20 discount would be `value: 20`, `type: AMOUNT`.\n   */\n  discount?: Discount;\n}\n\n/**\n * Deletes a subscription option.\n * @param _id - ID of the subscription option to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption\n * @deprecated\n */\nexport async function deleteSubscriptionOption(_id: string): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.deleteSubscriptionOption(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates multiple subscription options (up to 100).\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @param subscriptionOptions - Subscription options info.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOptions\n * @requiredField subscriptionOptions.subscriptionSettings\n * @requiredField subscriptionOptions.title\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions\n * @deprecated\n */\nexport async function bulkCreateSubscriptionOptions(\n  subscriptionOptions: NonNullablePaths<\n    SubscriptionOption,\n    `subscriptionSettings` | `title`,\n    2\n  >[]\n): Promise<\n  NonNullablePaths<\n    BulkCreateSubscriptionOptionsResponse,\n    | `subscriptionOptions`\n    | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n    | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n    | `subscriptionOptions.${number}.discount.type`\n    | `subscriptionOptions.${number}.discount.value`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    subscriptionOptions: subscriptionOptions,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.bulkCreateSubscriptionOptions(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { subscriptionOptions: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['subscriptionOptions']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates multiple subscription options.\n * Only parameters passed will be updated.\n * @param subscriptionOptions - Subscription options info. Only the passed parameters in each subscription option will be updated.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionOptions\n * @requiredField subscriptionOptions._id\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions\n * @deprecated\n */\nexport async function bulkUpdateSubscriptionOptions(\n  subscriptionOptions: NonNullablePaths<SubscriptionOption, `_id`, 2>[]\n): Promise<\n  NonNullablePaths<\n    BulkUpdateSubscriptionOptionsResponse,\n    | `subscriptionOptions`\n    | `subscriptionOptions.${number}.subscriptionSettings.frequency`\n    | `subscriptionOptions.${number}.subscriptionSettings.autoRenewal`\n    | `subscriptionOptions.${number}.discount.type`\n    | `subscriptionOptions.${number}.discount.value`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    subscriptionOptions: subscriptionOptions,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.bulkUpdateSubscriptionOptions(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { subscriptionOptions: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['subscriptionOptions']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Deletes multiple subscription options.\n * @param ids - IDs of the subscription options to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField ids\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions\n * @deprecated\n */\nexport async function bulkDeleteSubscriptionOptions(\n  ids: string[]\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.bulkDeleteSubscriptionOptions(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { ids: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['ids']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Assign up to 6 subscription options to a specified product.\n * Pass an empty array to remove all subscription options assigned to a product.\n * @param productId - Product ID.\n * @public\n * @documentationMaturity preview\n * @requiredField productId\n * @param options - Subscription option assignment options.\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct\n * @deprecated\n */\nexport async function assignSubscriptionOptionsToProduct(\n  productId: string,\n  options?: AssignSubscriptionOptionsToProductOptions\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    productId: productId,\n    assignedSubscriptionOptions: options?.assignedSubscriptionOptions,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.assignSubscriptionOptionsToProduct(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          productId: '$[0]',\n          assignedSubscriptionOptions: '$[1].assignedSubscriptionOptions',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['productId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface AssignSubscriptionOptionsToProductOptions {\n  /**\n   * Ordered array of subscription options that will be assigned to the product. Pass an empty array to remove all subscription options from the product.\n   * @maxSize 6\n   */\n  assignedSubscriptionOptions?: SubscriptionOptionInProduct[];\n}\n\n/**\n * Allow for one-time purchase of a product.\n * By default, product can be sold only as part of a subscription, not as a one-time purchase.\n * @param productId - Product ID.\n * @param allowed - Pass `true` to offer product by subscription and as one-time purchase. Pass `false` to offer product as subscription only.\n * @public\n * @documentationMaturity preview\n * @requiredField allowed\n * @requiredField productId\n * @permissionId WIX_STORES.MODIFY_SUBSCRIPTION_OPTIONS\n * @applicableIdentity APP\n * @fqn wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases\n * @deprecated\n */\nexport async function allowOneTimePurchases(\n  productId: string,\n  allowed: boolean\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    productId: productId,\n    allowed: allowed,\n  });\n\n  const reqOpts =\n    ambassadorWixStoresV1SubscriptionOption.allowOneTimePurchases(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { productId: '$[0]', allowed: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['productId', 'allowed']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/wix-ecommerce-plans',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/stores/v1/subscription-options',\n        destPath: '/v1/subscription-options',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/subscription-options-server',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/subscription-options-server',\n        destPath: '',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/subscription-options-server',\n        destPath: '',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/subscription-options-server',\n        destPath: '',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/subscription-options-server',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/wix-ecommerce-plans-reader',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/wix-ecommerce-plans-reader',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/subscription-options-reader-server',\n        destPath: '',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/subscription-options-reader-server',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_stores_subscription-options';\n\n/**\n * Retrieves a subscription option by ID.\n * @deprecated\n */\nexport function getSubscriptionOption(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getSubscriptionOption({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOption',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n        { protoPath: '/v1/subscription-options/{id}', data: payload, host }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [{ path: 'subscriptionOption.discount.value' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getSubscriptionOption;\n}\n\n/**\n * Retrieves all subscription options assigned to a specified product.\n * By default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.\n * @deprecated\n */\nexport function getSubscriptionOptionsForProduct(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getSubscriptionOptionsForProduct({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetSubscriptionOptionsForProduct',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n        {\n          protoPath: '/v1/subscription-options/byProduct/{productId}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [{ path: 'subscriptionOptions.discount.value' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getSubscriptionOptionsForProduct;\n}\n\n/**\n * Retrieves the IDs of products associated with a specified subscription option.\n * @deprecated\n */\nexport function getProductIdsForSubscriptionOption(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getProductIdsForSubscriptionOption({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetProductIdsForSubscriptionOption',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n        {\n          protoPath: '/v1/subscription-options/{id}/productIds',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __getProductIdsForSubscriptionOption;\n}\n\n/**\n * Checks whether a specified product (associated with subscription options) is available for one-time purchase.\n * @deprecated\n */\nexport function getOneTimePurchasesStatus(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getOneTimePurchasesStatus({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsReadApi.GetOneTimePurchasesStatus',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsReadApiUrl(\n        {\n          protoPath:\n            '/v1/subscription-options/product/{productId}/oneTimePurchasesStatus',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __getOneTimePurchasesStatus;\n}\n\n/**\n * Creates a subscription option.\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @deprecated\n */\nexport function createSubscriptionOption(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createSubscriptionOption({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [{ path: 'subscriptionOption.discount.value' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.CreateSubscriptionOption',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        { protoPath: '/v1/subscription-options', data: serializedData, host }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [{ path: 'subscriptionOption.discount.value' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createSubscriptionOption;\n}\n\n/**\n * Updates a subscription option.\n * Only parameters passed will be updated.\n * @deprecated\n */\nexport function updateSubscriptionOption(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updateSubscriptionOption({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [{ path: 'subscriptionOption.discount.value' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'PATCH' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.UpdateSubscriptionOption',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        {\n          protoPath: '/v1/subscription-options/{subscriptionOption.id}',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [{ path: 'subscriptionOption.discount.value' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateSubscriptionOption;\n}\n\n/**\n * Deletes a subscription option.\n * @deprecated\n */\nexport function deleteSubscriptionOption(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __deleteSubscriptionOption({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'DELETE' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.DeleteSubscriptionOption',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        { protoPath: '/v1/subscription-options/{id}', data: payload, host }\n      ),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteSubscriptionOption;\n}\n\n/**\n * Creates multiple subscription options (up to 100).\n * To assign to a product, call [`assignSubscriptionOptionsToProduct()`](https://www.wix.com/velo/reference/wix-stores-v2/subscriptionoptions/assign-subscription-options-to-product).\n * Subscription options that are not assigned to a product will not be visible in the Wix business manager.\n * @deprecated\n */\nexport function bulkCreateSubscriptionOptions(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkCreateSubscriptionOptions({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [{ path: 'subscriptionOptions.discount.value' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkCreateSubscriptionOptions',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        {\n          protoPath: '/v1/subscription-options/createBulk',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [{ path: 'subscriptionOptions.discount.value' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __bulkCreateSubscriptionOptions;\n}\n\n/**\n * Updates multiple subscription options.\n * Only parameters passed will be updated.\n * @deprecated\n */\nexport function bulkUpdateSubscriptionOptions(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkUpdateSubscriptionOptions({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [{ path: 'subscriptionOptions.discount.value' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'PATCH' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkUpdateSubscriptionOptions',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        { protoPath: '/v1/subscription-options', data: serializedData, host }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [{ path: 'subscriptionOptions.discount.value' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __bulkUpdateSubscriptionOptions;\n}\n\n/**\n * Deletes multiple subscription options.\n * @deprecated\n */\nexport function bulkDeleteSubscriptionOptions(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkDeleteSubscriptionOptions({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.BulkDeleteSubscriptionOptions',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        {\n          protoPath: '/v1/subscription-options/deleteBulk',\n          data: payload,\n          host,\n        }\n      ),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkDeleteSubscriptionOptions;\n}\n\n/**\n * Assign up to 6 subscription options to a specified product.\n * Pass an empty array to remove all subscription options assigned to a product.\n * @deprecated\n */\nexport function assignSubscriptionOptionsToProduct(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __assignSubscriptionOptionsToProduct({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [{ path: 'assignedSubscriptionOptions.discount.value' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AssignSubscriptionOptionsToProduct',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        {\n          protoPath: '/v1/subscription-options/product/{productId}/assign',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n    };\n\n    return metadata;\n  }\n\n  return __assignSubscriptionOptionsToProduct;\n}\n\n/**\n * Allow for one-time purchase of a product.\n * By default, product can be sold only as part of a subscription, not as a one-time purchase.\n * @deprecated\n */\nexport function allowOneTimePurchases(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __allowOneTimePurchases({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.stores.v1.subscription_option',\n      method: 'PATCH' as any,\n      methodFqn:\n        'wix.ecommerce.subscription.option.api.v1.SubscriptionOptionsWriteApi.AllowOneTimePurchases',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixEcommerceSubscriptionOptionApiV1SubscriptionOptionsWriteApiUrl(\n        {\n          protoPath:\n            '/v1/subscription-options/product/{productId}/allowOneTimePurchase',\n          data: payload,\n          host,\n        }\n      ),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __allowOneTimePurchases;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,yEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,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WACA,SACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UACoC,sBAAsB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,WAAW,QAAQ,SAAS,OAAO;AAAA,QAC/D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","SubscriptionFrequency","DiscountType","getSubscriptionOption","getSubscriptionOptionsForProduct","getProductIdsForSubscriptionOption","getOneTimePurchasesStatus","createSubscriptionOption","updateSubscriptionOption","deleteSubscriptionOption","bulkCreateSubscriptionOptions","bulkUpdateSubscriptionOptions","bulkDeleteSubscriptionOptions","assignSubscriptionOptionsToProduct","allowOneTimePurchases"]}