@wix/auto_sdk_app-management_app-plans 1.0.28 → 1.0.30

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.
@@ -137,6 +137,16 @@ function resolveWixAppmarketAppPlansV1AppsPlansUrl(opts) {
137
137
  srcPath: "/appmarket/v1/apps-plans",
138
138
  destPath: "/v1/apps-plans"
139
139
  }
140
+ ],
141
+ "vibe._base_domain_": [
142
+ {
143
+ srcPath: "/_api/apps-plans",
144
+ destPath: ""
145
+ },
146
+ {
147
+ srcPath: "/apps-plans",
148
+ destPath: ""
149
+ }
140
150
  ]
141
151
  };
142
152
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/appmarket-v1-app-plans-app-plans.universal.ts","../../src/appmarket-v1-app-plans-app-plans.http.ts","../../src/appmarket-v1-app-plans-app-plans.public.ts","../../src/appmarket-v1-app-plans-app-plans.context.ts"],"sourcesContent":["export * from './src/appmarket-v1-app-plans-app-plans.context.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 ambassadorWixAppmarketV1AppPlans from './appmarket-v1-app-plans-app-plans.http.js';\n\nexport interface AppPlans {\n /** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n _id?: string;\n /**\n * List of the app's pricing plans.\n *\n * Min: `0` plans\n * Max: `50` plans\n * @maxSize 50\n */\n plans?: Plan[];\n}\n\nexport enum SaleType {\n /** Default value, can be used when no specific sale is associated. */\n SALE_TYPE_UNSPECIFIED = 'SALE_TYPE_UNSPECIFIED',\n CYBER_MONDAY = 'CYBER_MONDAY',\n NOVEMBER_SALE = 'NOVEMBER_SALE',\n BLACK_FRIDAY = 'BLACK_FRIDAY',\n DEVELOPER_SALE = 'DEVELOPER_SALE',\n}\n\n/** @enumType */\nexport type SaleTypeWithLiterals =\n | SaleType\n | 'SALE_TYPE_UNSPECIFIED'\n | 'CYBER_MONDAY'\n | 'NOVEMBER_SALE'\n | 'BLACK_FRIDAY'\n | 'DEVELOPER_SALE';\n\nexport enum DiscountType {\n DISCOUNT_TYPE_UNSPECIFIED = 'DISCOUNT_TYPE_UNSPECIFIED',\n /** Discount is a fixed amount in USD. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Discount is a percentage of the total price. */\n PERCENTAGE = 'PERCENTAGE',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'DISCOUNT_TYPE_UNSPECIFIED'\n | 'FIXED_AMOUNT'\n | 'PERCENTAGE';\n\nexport enum SourceType {\n /** Default value, can be used when no specific source is associated. */\n SOURCE_TYPE_UNSPECIFIED = 'SOURCE_TYPE_UNSPECIFIED',\n /** Discount is due to Wix/Developer Sale */\n SALE = 'SALE',\n /** Discount is due to App Benefit */\n APP_BENEFIT = 'APP_BENEFIT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals =\n | SourceType\n | 'SOURCE_TYPE_UNSPECIFIED'\n | 'SALE'\n | 'APP_BENEFIT';\n\nexport interface SaleSource {\n /** @format GUID */\n saleId?: string | null;\n saleType?: SaleTypeWithLiterals;\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface Cycle {\n /**\n * Type of the billing cycle.\n *\n * + `\"UNKNOWN_UNIT\"`: There is no information about the billing cycle.\n * + `\"ONE_TIME\"`: The customer pays for unlimited usage of the app with a single payment.\n * + `\"RECURRING\"`: The customer pays for a subscription to the app on a recurring schedule.\n */\n cycleType?: CycleTypeWithLiterals;\n /** Duration of the billing cycle. Available only for `{\"cycleType\": \"RECURRING\"}`. */\n cycleDuration?: Duration;\n}\n\nexport enum DurationUnit {\n /** unknown interval unit */\n UNKNOWN_UNIT = 'UNKNOWN_UNIT',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport enum CycleType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ONE_TIME = 'ONE_TIME',\n RECURRING = 'RECURRING',\n}\n\n/** @enumType */\nexport type CycleTypeWithLiterals =\n | CycleType\n | 'UNKNOWN_TYPE'\n | 'ONE_TIME'\n | 'RECURRING';\n\nexport interface Duration {\n /** Unit of the billing cycle. */\n unit?: DurationUnitWithLiterals;\n /** Count of units that make up the billing cycle. */\n count?: number;\n}\n\nexport interface UsageBasedDetails {\n /**\n * Smallest possible amount that your app charges customers in usage-based\n * pricing. For example, the price of a single SMS message if your\n * app charges customers for sending text messages. Always in\n * [USD](https://en.wikipedia.org/wiki/United_States_dollar).\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n minimumChargeIncrement?: string | null;\n /**\n * Recurring, monthly base fee in usage-based pricing that your app\n * charges customers regardless of how much they use your app.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n monthlyBaseFee?: string | null;\n /**\n * Description of the usage-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n *\n * Max: 1024 characters\n */\n customChargeDescription?: string | null;\n}\n\nexport interface Discount extends DiscountSourceDataOneOf {\n type?: DiscountTypeWithLiterals;\n /**\n * Discount amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n amount?: string;\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price with 12.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /**\n * Source of the discount.\n * @internal\n */\n sourceType?: SourceTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountSourceDataOneOf {}\n\nexport enum BillingSource {\n UNKNOWN = 'UNKNOWN',\n /** plan billing and charges is managed by Wix */\n WIX = 'WIX',\n /** plan billing and charges is managed by the app */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BillingSourceWithLiterals =\n | BillingSource\n | 'UNKNOWN'\n | 'WIX'\n | 'EXTERNAL';\n\nexport interface Price {\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price by 12.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /** Information about the plan's recurring billing cycle or single payment. */\n billingCycle?: Cycle;\n /**\n * Details about the plan's usage-based pricing.\n * Available only for plans with\n * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).\n */\n usageBaseOptions?: UsageBasedDetails;\n discount?: Discount;\n billingSource?: BillingSourceWithLiterals;\n /**\n * Can be shown instead of plan price - used for dynamic plans\n * @maxLength 140\n */\n customPaymentTitle?: string | null;\n}\n\nexport interface Plan {\n /**\n * ID of the app plan.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Identical to `vendorProductId` in the\n * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).\n */\n vendorId?: string;\n /** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n name?: string;\n /**\n * List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Currently, the benefits are available only in English.\n *\n * Min: `0` benefits\n * Max: `4` benefits\n * Max per benefit: 1024 characters\n * @maxSize 4\n * @maxLength 1024\n */\n benefits?: string[];\n /**\n * List of the plan's prices. Available only when the plan's prices are managed\n * by Wix and not externally.\n *\n * Min: `0` prices\n * Max: `10` prices\n * @maxSize 10\n */\n prices?: Price[];\n}\n\nexport interface ListAppPlansByAppIdRequest {\n /**\n * List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @minSize 1\n * @maxSize 100\n */\n appIds: string[];\n}\n\nexport interface ListAppPlansByAppIdResponse {\n /**\n * Tax settings. Wix calculates the tax settings based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the tax settings based on the caller's IP address. Note that the\n * tax settings may not resolve properly if you call through a VPN.\n */\n taxSettings?: TaxSettings;\n /**\n * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)\n * format. Wix calculates the currency based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the currency based on the caller's IP address. Note that the\n * currency may not resolve properly if you call through a VPN.\n * @format CURRENCY\n */\n currency?: string;\n /**\n * Currency symbol in decimal HTML entity format. For example, `&#36;` for $\n * (United States Dollar). Wix calculates the currency symbol based on the\n * country code that you pass in the call's header. If you don't pass a country\n * code in the header, Wix calculates the tax settings based on the caller's IP\n * address. Note that the currency symbol may not resolve properly if you call\n * through a VPN.\n */\n currencySymbol?: string;\n /**\n * Retrieved app plans.\n *\n * Min: 0 plans\n * Max: 50 plans\n *\n * If any plans aren't returned, it's likely because they haven't been activated yet.\n * @maxSize 50\n */\n appPlans?: AppPlans[];\n}\n\nexport interface TaxSettings {\n /**\n * Whether you must display the total price including taxes in the given\n * country.\n */\n showPriceWithTax?: boolean;\n /**\n * Tax rate for the given country as percentage. Returned as `0` when\n * `{\"showPriceWithTax\": false}`.\n * @format DECIMAL_VALUE\n */\n percentage?: string | null;\n /**\n * Type of tax required in the given country.\n *\n * + `\"NOT_APPLICABLE\"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.\n * + `\"VAT\"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).\n * + `\"GST\"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).\n */\n taxType?: TaxTypeWithLiterals;\n}\n\nexport enum TaxType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n VAT = 'VAT',\n GST = 'GST',\n}\n\n/** @enumType */\nexport type TaxTypeWithLiterals = TaxType | 'NOT_APPLICABLE' | 'VAT' | 'GST';\n\nexport interface GetAvailableAppPlansRequest {\n /**\n * AppId to get the available app plans for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan info to retrieve the available app plans for. */\n appPlanInfo?: AppPlanInfo;\n}\n\n/**\n * An `AppPlanInfo` object describes which app plan you want to retrieve data for.\n * Every plan in an app is identified by a unique combination of `productId` and `billingCycle`.\n */\nexport interface AppPlanInfo {\n /**\n * The app plan's vendorId to retrieve the response for.\n *\n * Max: 100 characters\n * @maxLength 100\n */\n vendorId?: string;\n /** The app plan cycle to retrieve the response for. */\n billingCycle?: Cycle;\n}\n\nexport interface GetAvailableAppPlansResponse {\n /** The available upgrades for the given app plan. */\n availableUpgrades?: AppPlans;\n /** The available downgrades for the given app plan. */\n availableDowngrades?: AppPlans;\n /** The current app plan. */\n currentPlan?: Plan;\n}\n\nexport interface GetPricingPageUrlRequest {\n /**\n * AppId to get the pricing page url for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan to retrieve the pricing page url for. */\n appPlanInfo?: AppPlanInfo;\n}\n\nexport interface GetPricingPageUrlResponse {\n /**\n * the pricing page url, if there is a app plan that is upgradable.\n * @format WEB_URL\n */\n packagePickerUrl?: string | null;\n}\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n * @param appIds - List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @public\n * @requiredField appIds\n * @fqn wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId\n */\nexport async function listAppPlansByAppId(\n appIds: string[]\n): Promise<\n NonNullablePaths<\n ListAppPlansByAppIdResponse,\n | `taxSettings.showPriceWithTax`\n | `taxSettings.taxType`\n | `currency`\n | `currencySymbol`\n | `appPlans`\n | `appPlans.${number}._id`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ appIds: appIds });\n\n const reqOpts = ambassadorWixAppmarketV1AppPlans.listAppPlansByAppId(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: { appIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixAppmarketAppPlansV1AppsPlansUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-market/apps-plans',\n destPath: '/api',\n },\n {\n srcPath: '/api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n _: [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-plans';\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n */\nexport function listAppPlansByAppId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPlansByAppId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.appmarket.v1.app_plans',\n method: 'GET' as any,\n methodFqn: 'wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAppmarketAppPlansV1AppsPlansUrl({\n protoPath: '/v1/apps-plans/{appIds}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPlans.plans.prices.discount.saleOptions.startDate' },\n { path: 'appPlans.plans.prices.discount.saleOptions.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPlansByAppId;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListAppPlansByAppIdResponse,\n listAppPlansByAppId as universalListAppPlansByAppId,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/app-management' };\n\nexport function listAppPlansByAppId(\n httpClient: HttpClient\n): ListAppPlansByAppIdSignature {\n return (appIds: string[]) =>\n universalListAppPlansByAppId(\n appIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAppPlansByAppIdSignature {\n /**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n * @param - List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n */\n (appIds: string[]): Promise<\n NonNullablePaths<\n ListAppPlansByAppIdResponse,\n | `taxSettings.showPriceWithTax`\n | `taxSettings.taxType`\n | `currency`\n | `currencySymbol`\n | `appPlans`\n | `appPlans.${number}._id`,\n 4\n >\n >;\n}\n\nexport {\n AppPlanInfo,\n AppPlans,\n BillingSource,\n Cycle,\n CycleType,\n Discount,\n DiscountSourceDataOneOf,\n DiscountType,\n Duration,\n DurationUnit,\n GetAvailableAppPlansRequest,\n GetAvailableAppPlansResponse,\n GetPricingPageUrlRequest,\n GetPricingPageUrlResponse,\n ListAppPlansByAppIdRequest,\n ListAppPlansByAppIdResponse,\n Plan,\n Price,\n SaleSource,\n SaleType,\n SourceType,\n TaxSettings,\n TaxType,\n UsageBasedDetails,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\n","import { listAppPlansByAppId as publicListAppPlansByAppId } from './appmarket-v1-app-plans-app-plans.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listAppPlansByAppId: MaybeContext<\n BuildRESTFunction<typeof publicListAppPlansByAppId> &\n typeof publicListAppPlansByAppId\n> = /*#__PURE__*/ createRESTModule(publicListAppPlansByAppId);\n\nexport {\n SaleType,\n DiscountType,\n SourceType,\n DurationUnit,\n CycleType,\n BillingSource,\n TaxType,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\nexport {\n AppPlans,\n SaleSource,\n Cycle,\n Duration,\n UsageBasedDetails,\n Discount,\n DiscountSourceDataOneOf,\n Price,\n Plan,\n ListAppPlansByAppIdRequest,\n ListAppPlansByAppIdResponse,\n TaxSettings,\n GetAvailableAppPlansRequest,\n AppPlanInfo,\n GetAvailableAppPlansResponse,\n GetPricingPageUrlRequest,\n GetPricingPageUrlResponse,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\nexport {\n SaleTypeWithLiterals,\n DiscountTypeWithLiterals,\n SourceTypeWithLiterals,\n DurationUnitWithLiterals,\n CycleTypeWithLiterals,\n BillingSourceWithLiterals,\n TaxTypeWithLiterals,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAA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AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEzeO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,WACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AChBA,IAAAC,uBAAiC;AAG1B,IAAMC,uBAGK,2DAAiBA,oBAAyB;","names":["listAppPlansByAppId","import_rest_modules","payload","SaleType","DiscountType","SourceType","DurationUnit","CycleType","BillingSource","TaxType","listAppPlansByAppId","sdkTransformError","listAppPlansByAppId","import_rest_modules","listAppPlansByAppId"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/appmarket-v1-app-plans-app-plans.universal.ts","../../src/appmarket-v1-app-plans-app-plans.http.ts","../../src/appmarket-v1-app-plans-app-plans.public.ts","../../src/appmarket-v1-app-plans-app-plans.context.ts"],"sourcesContent":["export * from './src/appmarket-v1-app-plans-app-plans.context.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 ambassadorWixAppmarketV1AppPlans from './appmarket-v1-app-plans-app-plans.http.js';\n\nexport interface AppPlans {\n /** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n _id?: string;\n /**\n * List of the app's pricing plans.\n *\n * Min: `0` plans\n * Max: `50` plans\n * @maxSize 50\n */\n plans?: Plan[];\n}\n\nexport enum SaleType {\n /** Default value, can be used when no specific sale is associated. */\n SALE_TYPE_UNSPECIFIED = 'SALE_TYPE_UNSPECIFIED',\n CYBER_MONDAY = 'CYBER_MONDAY',\n NOVEMBER_SALE = 'NOVEMBER_SALE',\n BLACK_FRIDAY = 'BLACK_FRIDAY',\n DEVELOPER_SALE = 'DEVELOPER_SALE',\n}\n\n/** @enumType */\nexport type SaleTypeWithLiterals =\n | SaleType\n | 'SALE_TYPE_UNSPECIFIED'\n | 'CYBER_MONDAY'\n | 'NOVEMBER_SALE'\n | 'BLACK_FRIDAY'\n | 'DEVELOPER_SALE';\n\nexport enum DiscountType {\n DISCOUNT_TYPE_UNSPECIFIED = 'DISCOUNT_TYPE_UNSPECIFIED',\n /** Discount is a fixed amount in USD. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Discount is a percentage of the total price. */\n PERCENTAGE = 'PERCENTAGE',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'DISCOUNT_TYPE_UNSPECIFIED'\n | 'FIXED_AMOUNT'\n | 'PERCENTAGE';\n\nexport enum SourceType {\n /** Default value, can be used when no specific source is associated. */\n SOURCE_TYPE_UNSPECIFIED = 'SOURCE_TYPE_UNSPECIFIED',\n /** Discount is due to Wix/Developer Sale */\n SALE = 'SALE',\n /** Discount is due to App Benefit */\n APP_BENEFIT = 'APP_BENEFIT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals =\n | SourceType\n | 'SOURCE_TYPE_UNSPECIFIED'\n | 'SALE'\n | 'APP_BENEFIT';\n\nexport interface SaleSource {\n /** @format GUID */\n saleId?: string | null;\n saleType?: SaleTypeWithLiterals;\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface Cycle {\n /**\n * Type of the billing cycle.\n *\n * + `\"UNKNOWN_UNIT\"`: There is no information about the billing cycle.\n * + `\"ONE_TIME\"`: The customer pays for unlimited usage of the app with a single payment.\n * + `\"RECURRING\"`: The customer pays for a subscription to the app on a recurring schedule.\n */\n cycleType?: CycleTypeWithLiterals;\n /** Duration of the billing cycle. Available only for `{\"cycleType\": \"RECURRING\"}`. */\n cycleDuration?: Duration;\n}\n\nexport enum DurationUnit {\n /** unknown interval unit */\n UNKNOWN_UNIT = 'UNKNOWN_UNIT',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport enum CycleType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ONE_TIME = 'ONE_TIME',\n RECURRING = 'RECURRING',\n}\n\n/** @enumType */\nexport type CycleTypeWithLiterals =\n | CycleType\n | 'UNKNOWN_TYPE'\n | 'ONE_TIME'\n | 'RECURRING';\n\nexport interface Duration {\n /** Unit of the billing cycle. */\n unit?: DurationUnitWithLiterals;\n /** Count of units that make up the billing cycle. */\n count?: number;\n}\n\nexport interface UsageBasedDetails {\n /**\n * Smallest possible amount that your app charges customers in usage-based\n * pricing. For example, the price of a single SMS message if your\n * app charges customers for sending text messages. Always in\n * [USD](https://en.wikipedia.org/wiki/United_States_dollar).\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n minimumChargeIncrement?: string | null;\n /**\n * Recurring, monthly base fee in usage-based pricing that your app\n * charges customers regardless of how much they use your app.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n monthlyBaseFee?: string | null;\n /**\n * Description of the usage-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n *\n * Max: 1024 characters\n */\n customChargeDescription?: string | null;\n}\n\nexport interface Discount extends DiscountSourceDataOneOf {\n type?: DiscountTypeWithLiterals;\n /**\n * Discount amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n amount?: string;\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price with 12.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /**\n * Source of the discount.\n * @internal\n */\n sourceType?: SourceTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountSourceDataOneOf {}\n\nexport enum BillingSource {\n UNKNOWN = 'UNKNOWN',\n /** plan billing and charges is managed by Wix */\n WIX = 'WIX',\n /** plan billing and charges is managed by the app */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BillingSourceWithLiterals =\n | BillingSource\n | 'UNKNOWN'\n | 'WIX'\n | 'EXTERNAL';\n\nexport interface Price {\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price by 12.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /** Information about the plan's recurring billing cycle or single payment. */\n billingCycle?: Cycle;\n /**\n * Details about the plan's usage-based pricing.\n * Available only for plans with\n * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).\n */\n usageBaseOptions?: UsageBasedDetails;\n discount?: Discount;\n billingSource?: BillingSourceWithLiterals;\n /**\n * Can be shown instead of plan price - used for dynamic plans\n * @maxLength 140\n */\n customPaymentTitle?: string | null;\n}\n\nexport interface Plan {\n /**\n * ID of the app plan.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Identical to `vendorProductId` in the\n * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).\n */\n vendorId?: string;\n /** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n name?: string;\n /**\n * List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Currently, the benefits are available only in English.\n *\n * Min: `0` benefits\n * Max: `4` benefits\n * Max per benefit: 1024 characters\n * @maxSize 4\n * @maxLength 1024\n */\n benefits?: string[];\n /**\n * List of the plan's prices. Available only when the plan's prices are managed\n * by Wix and not externally.\n *\n * Min: `0` prices\n * Max: `10` prices\n * @maxSize 10\n */\n prices?: Price[];\n}\n\nexport interface ListAppPlansByAppIdRequest {\n /**\n * List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @minSize 1\n * @maxSize 100\n */\n appIds: string[];\n}\n\nexport interface ListAppPlansByAppIdResponse {\n /**\n * Tax settings. Wix calculates the tax settings based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the tax settings based on the caller's IP address. Note that the\n * tax settings may not resolve properly if you call through a VPN.\n */\n taxSettings?: TaxSettings;\n /**\n * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)\n * format. Wix calculates the currency based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the currency based on the caller's IP address. Note that the\n * currency may not resolve properly if you call through a VPN.\n * @format CURRENCY\n */\n currency?: string;\n /**\n * Currency symbol in decimal HTML entity format. For example, `&#36;` for $\n * (United States Dollar). Wix calculates the currency symbol based on the\n * country code that you pass in the call's header. If you don't pass a country\n * code in the header, Wix calculates the tax settings based on the caller's IP\n * address. Note that the currency symbol may not resolve properly if you call\n * through a VPN.\n */\n currencySymbol?: string;\n /**\n * Retrieved app plans.\n *\n * Min: 0 plans\n * Max: 50 plans\n *\n * If any plans aren't returned, it's likely because they haven't been activated yet.\n * @maxSize 50\n */\n appPlans?: AppPlans[];\n}\n\nexport interface TaxSettings {\n /**\n * Whether you must display the total price including taxes in the given\n * country.\n */\n showPriceWithTax?: boolean;\n /**\n * Tax rate for the given country as percentage. Returned as `0` when\n * `{\"showPriceWithTax\": false}`.\n * @format DECIMAL_VALUE\n */\n percentage?: string | null;\n /**\n * Type of tax required in the given country.\n *\n * + `\"NOT_APPLICABLE\"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.\n * + `\"VAT\"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).\n * + `\"GST\"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).\n */\n taxType?: TaxTypeWithLiterals;\n}\n\nexport enum TaxType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n VAT = 'VAT',\n GST = 'GST',\n}\n\n/** @enumType */\nexport type TaxTypeWithLiterals = TaxType | 'NOT_APPLICABLE' | 'VAT' | 'GST';\n\nexport interface GetAvailableAppPlansRequest {\n /**\n * AppId to get the available app plans for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan info to retrieve the available app plans for. */\n appPlanInfo?: AppPlanInfo;\n}\n\n/**\n * An `AppPlanInfo` object describes which app plan you want to retrieve data for.\n * Every plan in an app is identified by a unique combination of `productId` and `billingCycle`.\n */\nexport interface AppPlanInfo {\n /**\n * The app plan's vendorId to retrieve the response for.\n *\n * Max: 100 characters\n * @maxLength 100\n */\n vendorId?: string;\n /** The app plan cycle to retrieve the response for. */\n billingCycle?: Cycle;\n}\n\nexport interface GetAvailableAppPlansResponse {\n /** The available upgrades for the given app plan. */\n availableUpgrades?: AppPlans;\n /** The available downgrades for the given app plan. */\n availableDowngrades?: AppPlans;\n /** The current app plan. */\n currentPlan?: Plan;\n}\n\nexport interface GetPricingPageUrlRequest {\n /**\n * AppId to get the pricing page url for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan to retrieve the pricing page url for. */\n appPlanInfo?: AppPlanInfo;\n}\n\nexport interface GetPricingPageUrlResponse {\n /**\n * the pricing page url, if there is a app plan that is upgradable.\n * @format WEB_URL\n */\n packagePickerUrl?: string | null;\n}\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n * @param appIds - List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @public\n * @requiredField appIds\n * @fqn wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId\n */\nexport async function listAppPlansByAppId(\n appIds: string[]\n): Promise<\n NonNullablePaths<\n ListAppPlansByAppIdResponse,\n | `taxSettings.showPriceWithTax`\n | `taxSettings.taxType`\n | `currency`\n | `currencySymbol`\n | `appPlans`\n | `appPlans.${number}._id`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ appIds: appIds });\n\n const reqOpts = ambassadorWixAppmarketV1AppPlans.listAppPlansByAppId(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: { appIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixAppmarketAppPlansV1AppsPlansUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-market/apps-plans',\n destPath: '/api',\n },\n {\n srcPath: '/api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n _: [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-plans';\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n */\nexport function listAppPlansByAppId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPlansByAppId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.appmarket.v1.app_plans',\n method: 'GET' as any,\n methodFqn: 'wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAppmarketAppPlansV1AppsPlansUrl({\n protoPath: '/v1/apps-plans/{appIds}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPlans.plans.prices.discount.saleOptions.startDate' },\n { path: 'appPlans.plans.prices.discount.saleOptions.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPlansByAppId;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListAppPlansByAppIdResponse,\n listAppPlansByAppId as universalListAppPlansByAppId,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/app-management' };\n\nexport function listAppPlansByAppId(\n httpClient: HttpClient\n): ListAppPlansByAppIdSignature {\n return (appIds: string[]) =>\n universalListAppPlansByAppId(\n appIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAppPlansByAppIdSignature {\n /**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n * @param - List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n */\n (appIds: string[]): Promise<\n NonNullablePaths<\n ListAppPlansByAppIdResponse,\n | `taxSettings.showPriceWithTax`\n | `taxSettings.taxType`\n | `currency`\n | `currencySymbol`\n | `appPlans`\n | `appPlans.${number}._id`,\n 4\n >\n >;\n}\n\nexport {\n AppPlanInfo,\n AppPlans,\n BillingSource,\n Cycle,\n CycleType,\n Discount,\n DiscountSourceDataOneOf,\n DiscountType,\n Duration,\n DurationUnit,\n GetAvailableAppPlansRequest,\n GetAvailableAppPlansResponse,\n GetPricingPageUrlRequest,\n GetPricingPageUrlResponse,\n ListAppPlansByAppIdRequest,\n ListAppPlansByAppIdResponse,\n Plan,\n Price,\n SaleSource,\n SaleType,\n SourceType,\n TaxSettings,\n TaxType,\n UsageBasedDetails,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\n","import { listAppPlansByAppId as publicListAppPlansByAppId } from './appmarket-v1-app-plans-app-plans.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listAppPlansByAppId: MaybeContext<\n BuildRESTFunction<typeof publicListAppPlansByAppId> &\n typeof publicListAppPlansByAppId\n> = /*#__PURE__*/ createRESTModule(publicListAppPlansByAppId);\n\nexport {\n SaleType,\n DiscountType,\n SourceType,\n DurationUnit,\n CycleType,\n BillingSource,\n TaxType,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\nexport {\n AppPlans,\n SaleSource,\n Cycle,\n Duration,\n UsageBasedDetails,\n Discount,\n DiscountSourceDataOneOf,\n Price,\n Plan,\n ListAppPlansByAppIdRequest,\n ListAppPlansByAppIdResponse,\n TaxSettings,\n GetAvailableAppPlansRequest,\n AppPlanInfo,\n GetAvailableAppPlansResponse,\n GetPricingPageUrlRequest,\n GetPricingPageUrlResponse,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\nexport {\n SaleTypeWithLiterals,\n DiscountTypeWithLiterals,\n SourceTypeWithLiterals,\n DurationUnitWithLiterals,\n CycleTypeWithLiterals,\n BillingSourceWithLiterals,\n TaxTypeWithLiterals,\n} from './appmarket-v1-app-plans-app-plans.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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I;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEzeO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,WACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AChBA,IAAAC,uBAAiC;AAG1B,IAAMC,uBAGK,2DAAiBA,oBAAyB;","names":["listAppPlansByAppId","import_rest_modules","payload","SaleType","DiscountType","SourceType","DurationUnit","CycleType","BillingSource","TaxType","listAppPlansByAppId","sdkTransformError","listAppPlansByAppId","import_rest_modules","listAppPlansByAppId"]}
@@ -137,6 +137,16 @@ function resolveWixAppmarketAppPlansV1AppsPlansUrl(opts) {
137
137
  srcPath: "/appmarket/v1/apps-plans",
138
138
  destPath: "/v1/apps-plans"
139
139
  }
140
+ ],
141
+ "vibe._base_domain_": [
142
+ {
143
+ srcPath: "/_api/apps-plans",
144
+ destPath: ""
145
+ },
146
+ {
147
+ srcPath: "/apps-plans",
148
+ destPath: ""
149
+ }
140
150
  ]
141
151
  };
142
152
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/appmarket-v1-app-plans-app-plans.universal.ts","../../src/appmarket-v1-app-plans-app-plans.http.ts"],"sourcesContent":["export * from './src/appmarket-v1-app-plans-app-plans.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 ambassadorWixAppmarketV1AppPlans from './appmarket-v1-app-plans-app-plans.http.js';\n\nexport interface AppPlans {\n /** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n _id?: string;\n /**\n * List of the app's pricing plans.\n *\n * Min: `0` plans\n * Max: `50` plans\n * @maxSize 50\n */\n plans?: Plan[];\n}\n\nexport enum SaleType {\n /** Default value, can be used when no specific sale is associated. */\n SALE_TYPE_UNSPECIFIED = 'SALE_TYPE_UNSPECIFIED',\n CYBER_MONDAY = 'CYBER_MONDAY',\n NOVEMBER_SALE = 'NOVEMBER_SALE',\n BLACK_FRIDAY = 'BLACK_FRIDAY',\n DEVELOPER_SALE = 'DEVELOPER_SALE',\n}\n\n/** @enumType */\nexport type SaleTypeWithLiterals =\n | SaleType\n | 'SALE_TYPE_UNSPECIFIED'\n | 'CYBER_MONDAY'\n | 'NOVEMBER_SALE'\n | 'BLACK_FRIDAY'\n | 'DEVELOPER_SALE';\n\nexport enum DiscountType {\n DISCOUNT_TYPE_UNSPECIFIED = 'DISCOUNT_TYPE_UNSPECIFIED',\n /** Discount is a fixed amount in USD. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Discount is a percentage of the total price. */\n PERCENTAGE = 'PERCENTAGE',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'DISCOUNT_TYPE_UNSPECIFIED'\n | 'FIXED_AMOUNT'\n | 'PERCENTAGE';\n\nexport enum SourceType {\n /** Default value, can be used when no specific source is associated. */\n SOURCE_TYPE_UNSPECIFIED = 'SOURCE_TYPE_UNSPECIFIED',\n /** Discount is due to Wix/Developer Sale */\n SALE = 'SALE',\n /** Discount is due to App Benefit */\n APP_BENEFIT = 'APP_BENEFIT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals =\n | SourceType\n | 'SOURCE_TYPE_UNSPECIFIED'\n | 'SALE'\n | 'APP_BENEFIT';\n\nexport interface SaleSource {\n /** @format GUID */\n saleId?: string | null;\n saleType?: SaleTypeWithLiterals;\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface Cycle {\n /**\n * Type of the billing cycle.\n *\n * + `\"UNKNOWN_UNIT\"`: There is no information about the billing cycle.\n * + `\"ONE_TIME\"`: The customer pays for unlimited usage of the app with a single payment.\n * + `\"RECURRING\"`: The customer pays for a subscription to the app on a recurring schedule.\n */\n cycleType?: CycleTypeWithLiterals;\n /** Duration of the billing cycle. Available only for `{\"cycleType\": \"RECURRING\"}`. */\n cycleDuration?: Duration;\n}\n\nexport enum DurationUnit {\n /** unknown interval unit */\n UNKNOWN_UNIT = 'UNKNOWN_UNIT',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport enum CycleType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ONE_TIME = 'ONE_TIME',\n RECURRING = 'RECURRING',\n}\n\n/** @enumType */\nexport type CycleTypeWithLiterals =\n | CycleType\n | 'UNKNOWN_TYPE'\n | 'ONE_TIME'\n | 'RECURRING';\n\nexport interface Duration {\n /** Unit of the billing cycle. */\n unit?: DurationUnitWithLiterals;\n /** Count of units that make up the billing cycle. */\n count?: number;\n}\n\nexport interface UsageBasedDetails {\n /**\n * Smallest possible amount that your app charges customers in usage-based\n * pricing. For example, the price of a single SMS message if your\n * app charges customers for sending text messages. Always in\n * [USD](https://en.wikipedia.org/wiki/United_States_dollar).\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n minimumChargeIncrement?: string | null;\n /**\n * Recurring, monthly base fee in usage-based pricing that your app\n * charges customers regardless of how much they use your app.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n monthlyBaseFee?: string | null;\n /**\n * Description of the usage-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n *\n * Max: 1024 characters\n */\n customChargeDescription?: string | null;\n}\n\nexport interface Discount extends DiscountSourceDataOneOf {\n type?: DiscountTypeWithLiterals;\n /**\n * Discount amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n amount?: string;\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price with 12.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /**\n * Source of the discount.\n * @internal\n */\n sourceType?: SourceTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountSourceDataOneOf {}\n\nexport enum BillingSource {\n UNKNOWN = 'UNKNOWN',\n /** plan billing and charges is managed by Wix */\n WIX = 'WIX',\n /** plan billing and charges is managed by the app */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BillingSourceWithLiterals =\n | BillingSource\n | 'UNKNOWN'\n | 'WIX'\n | 'EXTERNAL';\n\nexport interface Price {\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price by 12.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /** Information about the plan's recurring billing cycle or single payment. */\n billingCycle?: Cycle;\n /**\n * Details about the plan's usage-based pricing.\n * Available only for plans with\n * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).\n */\n usageBaseOptions?: UsageBasedDetails;\n discount?: Discount;\n billingSource?: BillingSourceWithLiterals;\n /**\n * Can be shown instead of plan price - used for dynamic plans\n * @maxLength 140\n */\n customPaymentTitle?: string | null;\n}\n\nexport interface Plan {\n /**\n * ID of the app plan.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Identical to `vendorProductId` in the\n * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).\n */\n vendorId?: string;\n /** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n name?: string;\n /**\n * List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Currently, the benefits are available only in English.\n *\n * Min: `0` benefits\n * Max: `4` benefits\n * Max per benefit: 1024 characters\n * @maxSize 4\n * @maxLength 1024\n */\n benefits?: string[];\n /**\n * List of the plan's prices. Available only when the plan's prices are managed\n * by Wix and not externally.\n *\n * Min: `0` prices\n * Max: `10` prices\n * @maxSize 10\n */\n prices?: Price[];\n}\n\nexport interface ListAppPlansByAppIdRequest {\n /**\n * List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @minSize 1\n * @maxSize 100\n */\n appIds: string[];\n}\n\nexport interface ListAppPlansByAppIdResponse {\n /**\n * Tax settings. Wix calculates the tax settings based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the tax settings based on the caller's IP address. Note that the\n * tax settings may not resolve properly if you call through a VPN.\n */\n taxSettings?: TaxSettings;\n /**\n * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)\n * format. Wix calculates the currency based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the currency based on the caller's IP address. Note that the\n * currency may not resolve properly if you call through a VPN.\n * @format CURRENCY\n */\n currency?: string;\n /**\n * Currency symbol in decimal HTML entity format. For example, `&#36;` for $\n * (United States Dollar). Wix calculates the currency symbol based on the\n * country code that you pass in the call's header. If you don't pass a country\n * code in the header, Wix calculates the tax settings based on the caller's IP\n * address. Note that the currency symbol may not resolve properly if you call\n * through a VPN.\n */\n currencySymbol?: string;\n /**\n * Retrieved app plans.\n *\n * Min: 0 plans\n * Max: 50 plans\n *\n * If any plans aren't returned, it's likely because they haven't been activated yet.\n * @maxSize 50\n */\n appPlans?: AppPlans[];\n}\n\nexport interface TaxSettings {\n /**\n * Whether you must display the total price including taxes in the given\n * country.\n */\n showPriceWithTax?: boolean;\n /**\n * Tax rate for the given country as percentage. Returned as `0` when\n * `{\"showPriceWithTax\": false}`.\n * @format DECIMAL_VALUE\n */\n percentage?: string | null;\n /**\n * Type of tax required in the given country.\n *\n * + `\"NOT_APPLICABLE\"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.\n * + `\"VAT\"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).\n * + `\"GST\"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).\n */\n taxType?: TaxTypeWithLiterals;\n}\n\nexport enum TaxType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n VAT = 'VAT',\n GST = 'GST',\n}\n\n/** @enumType */\nexport type TaxTypeWithLiterals = TaxType | 'NOT_APPLICABLE' | 'VAT' | 'GST';\n\nexport interface GetAvailableAppPlansRequest {\n /**\n * AppId to get the available app plans for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan info to retrieve the available app plans for. */\n appPlanInfo?: AppPlanInfo;\n}\n\n/**\n * An `AppPlanInfo` object describes which app plan you want to retrieve data for.\n * Every plan in an app is identified by a unique combination of `productId` and `billingCycle`.\n */\nexport interface AppPlanInfo {\n /**\n * The app plan's vendorId to retrieve the response for.\n *\n * Max: 100 characters\n * @maxLength 100\n */\n vendorId?: string;\n /** The app plan cycle to retrieve the response for. */\n billingCycle?: Cycle;\n}\n\nexport interface GetAvailableAppPlansResponse {\n /** The available upgrades for the given app plan. */\n availableUpgrades?: AppPlans;\n /** The available downgrades for the given app plan. */\n availableDowngrades?: AppPlans;\n /** The current app plan. */\n currentPlan?: Plan;\n}\n\nexport interface GetPricingPageUrlRequest {\n /**\n * AppId to get the pricing page url for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan to retrieve the pricing page url for. */\n appPlanInfo?: AppPlanInfo;\n}\n\nexport interface GetPricingPageUrlResponse {\n /**\n * the pricing page url, if there is a app plan that is upgradable.\n * @format WEB_URL\n */\n packagePickerUrl?: string | null;\n}\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n * @param appIds - List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @public\n * @requiredField appIds\n * @fqn wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId\n */\nexport async function listAppPlansByAppId(\n appIds: string[]\n): Promise<\n NonNullablePaths<\n ListAppPlansByAppIdResponse,\n | `taxSettings.showPriceWithTax`\n | `taxSettings.taxType`\n | `currency`\n | `currencySymbol`\n | `appPlans`\n | `appPlans.${number}._id`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ appIds: appIds });\n\n const reqOpts = ambassadorWixAppmarketV1AppPlans.listAppPlansByAppId(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: { appIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixAppmarketAppPlansV1AppsPlansUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-market/apps-plans',\n destPath: '/api',\n },\n {\n srcPath: '/api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n _: [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-plans';\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n */\nexport function listAppPlansByAppId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPlansByAppId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.appmarket.v1.app_plans',\n method: 'GET' as any,\n methodFqn: 'wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAppmarketAppPlansV1AppsPlansUrl({\n protoPath: '/v1/apps-plans/{appIds}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPlans.plans.prices.discount.saleOptions.startDate' },\n { path: 'appPlans.plans.prices.discount.saleOptions.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPlansByAppId;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;A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,aAAU;AAEV,EAAAA,eAAA,SAAM;AAEN,EAAAA,eAAA,cAAW;AALD,SAAAA;AAAA,GAAA;AAoKL,IAAK,UAAL,kBAAKC,aAAL;AACL,EAAAA,SAAA,oBAAiB;AACjB,EAAAA,SAAA,SAAM;AACN,EAAAA,SAAA,SAAM;AAHI,SAAAA;AAAA,GAAA;AA0FZ,eAAsBC,qBACpB,QAYA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,OAAe,CAAC;AAExE,QAAM,UAA2C,oBAAoB,OAAO;AAE5E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["listAppPlansByAppId","import_rest_modules","payload","SaleType","DiscountType","SourceType","DurationUnit","CycleType","BillingSource","TaxType","listAppPlansByAppId","sdkTransformError"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/appmarket-v1-app-plans-app-plans.universal.ts","../../src/appmarket-v1-app-plans-app-plans.http.ts"],"sourcesContent":["export * from './src/appmarket-v1-app-plans-app-plans.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 ambassadorWixAppmarketV1AppPlans from './appmarket-v1-app-plans-app-plans.http.js';\n\nexport interface AppPlans {\n /** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n _id?: string;\n /**\n * List of the app's pricing plans.\n *\n * Min: `0` plans\n * Max: `50` plans\n * @maxSize 50\n */\n plans?: Plan[];\n}\n\nexport enum SaleType {\n /** Default value, can be used when no specific sale is associated. */\n SALE_TYPE_UNSPECIFIED = 'SALE_TYPE_UNSPECIFIED',\n CYBER_MONDAY = 'CYBER_MONDAY',\n NOVEMBER_SALE = 'NOVEMBER_SALE',\n BLACK_FRIDAY = 'BLACK_FRIDAY',\n DEVELOPER_SALE = 'DEVELOPER_SALE',\n}\n\n/** @enumType */\nexport type SaleTypeWithLiterals =\n | SaleType\n | 'SALE_TYPE_UNSPECIFIED'\n | 'CYBER_MONDAY'\n | 'NOVEMBER_SALE'\n | 'BLACK_FRIDAY'\n | 'DEVELOPER_SALE';\n\nexport enum DiscountType {\n DISCOUNT_TYPE_UNSPECIFIED = 'DISCOUNT_TYPE_UNSPECIFIED',\n /** Discount is a fixed amount in USD. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Discount is a percentage of the total price. */\n PERCENTAGE = 'PERCENTAGE',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'DISCOUNT_TYPE_UNSPECIFIED'\n | 'FIXED_AMOUNT'\n | 'PERCENTAGE';\n\nexport enum SourceType {\n /** Default value, can be used when no specific source is associated. */\n SOURCE_TYPE_UNSPECIFIED = 'SOURCE_TYPE_UNSPECIFIED',\n /** Discount is due to Wix/Developer Sale */\n SALE = 'SALE',\n /** Discount is due to App Benefit */\n APP_BENEFIT = 'APP_BENEFIT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals =\n | SourceType\n | 'SOURCE_TYPE_UNSPECIFIED'\n | 'SALE'\n | 'APP_BENEFIT';\n\nexport interface SaleSource {\n /** @format GUID */\n saleId?: string | null;\n saleType?: SaleTypeWithLiterals;\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface Cycle {\n /**\n * Type of the billing cycle.\n *\n * + `\"UNKNOWN_UNIT\"`: There is no information about the billing cycle.\n * + `\"ONE_TIME\"`: The customer pays for unlimited usage of the app with a single payment.\n * + `\"RECURRING\"`: The customer pays for a subscription to the app on a recurring schedule.\n */\n cycleType?: CycleTypeWithLiterals;\n /** Duration of the billing cycle. Available only for `{\"cycleType\": \"RECURRING\"}`. */\n cycleDuration?: Duration;\n}\n\nexport enum DurationUnit {\n /** unknown interval unit */\n UNKNOWN_UNIT = 'UNKNOWN_UNIT',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport enum CycleType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ONE_TIME = 'ONE_TIME',\n RECURRING = 'RECURRING',\n}\n\n/** @enumType */\nexport type CycleTypeWithLiterals =\n | CycleType\n | 'UNKNOWN_TYPE'\n | 'ONE_TIME'\n | 'RECURRING';\n\nexport interface Duration {\n /** Unit of the billing cycle. */\n unit?: DurationUnitWithLiterals;\n /** Count of units that make up the billing cycle. */\n count?: number;\n}\n\nexport interface UsageBasedDetails {\n /**\n * Smallest possible amount that your app charges customers in usage-based\n * pricing. For example, the price of a single SMS message if your\n * app charges customers for sending text messages. Always in\n * [USD](https://en.wikipedia.org/wiki/United_States_dollar).\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n minimumChargeIncrement?: string | null;\n /**\n * Recurring, monthly base fee in usage-based pricing that your app\n * charges customers regardless of how much they use your app.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n monthlyBaseFee?: string | null;\n /**\n * Description of the usage-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n *\n * Max: 1024 characters\n */\n customChargeDescription?: string | null;\n}\n\nexport interface Discount extends DiscountSourceDataOneOf {\n type?: DiscountTypeWithLiterals;\n /**\n * Discount amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n amount?: string;\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price with 12.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /**\n * Source of the discount.\n * @internal\n */\n sourceType?: SourceTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface DiscountSourceDataOneOf {}\n\nexport enum BillingSource {\n UNKNOWN = 'UNKNOWN',\n /** plan billing and charges is managed by Wix */\n WIX = 'WIX',\n /** plan billing and charges is managed by the app */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BillingSourceWithLiterals =\n | BillingSource\n | 'UNKNOWN'\n | 'WIX'\n | 'EXTERNAL';\n\nexport interface Price {\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price by 12.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /** Information about the plan's recurring billing cycle or single payment. */\n billingCycle?: Cycle;\n /**\n * Details about the plan's usage-based pricing.\n * Available only for plans with\n * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).\n */\n usageBaseOptions?: UsageBasedDetails;\n discount?: Discount;\n billingSource?: BillingSourceWithLiterals;\n /**\n * Can be shown instead of plan price - used for dynamic plans\n * @maxLength 140\n */\n customPaymentTitle?: string | null;\n}\n\nexport interface Plan {\n /**\n * ID of the app plan.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Identical to `vendorProductId` in the\n * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).\n */\n vendorId?: string;\n /** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n name?: string;\n /**\n * List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Currently, the benefits are available only in English.\n *\n * Min: `0` benefits\n * Max: `4` benefits\n * Max per benefit: 1024 characters\n * @maxSize 4\n * @maxLength 1024\n */\n benefits?: string[];\n /**\n * List of the plan's prices. Available only when the plan's prices are managed\n * by Wix and not externally.\n *\n * Min: `0` prices\n * Max: `10` prices\n * @maxSize 10\n */\n prices?: Price[];\n}\n\nexport interface ListAppPlansByAppIdRequest {\n /**\n * List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @minSize 1\n * @maxSize 100\n */\n appIds: string[];\n}\n\nexport interface ListAppPlansByAppIdResponse {\n /**\n * Tax settings. Wix calculates the tax settings based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the tax settings based on the caller's IP address. Note that the\n * tax settings may not resolve properly if you call through a VPN.\n */\n taxSettings?: TaxSettings;\n /**\n * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)\n * format. Wix calculates the currency based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the currency based on the caller's IP address. Note that the\n * currency may not resolve properly if you call through a VPN.\n * @format CURRENCY\n */\n currency?: string;\n /**\n * Currency symbol in decimal HTML entity format. For example, `&#36;` for $\n * (United States Dollar). Wix calculates the currency symbol based on the\n * country code that you pass in the call's header. If you don't pass a country\n * code in the header, Wix calculates the tax settings based on the caller's IP\n * address. Note that the currency symbol may not resolve properly if you call\n * through a VPN.\n */\n currencySymbol?: string;\n /**\n * Retrieved app plans.\n *\n * Min: 0 plans\n * Max: 50 plans\n *\n * If any plans aren't returned, it's likely because they haven't been activated yet.\n * @maxSize 50\n */\n appPlans?: AppPlans[];\n}\n\nexport interface TaxSettings {\n /**\n * Whether you must display the total price including taxes in the given\n * country.\n */\n showPriceWithTax?: boolean;\n /**\n * Tax rate for the given country as percentage. Returned as `0` when\n * `{\"showPriceWithTax\": false}`.\n * @format DECIMAL_VALUE\n */\n percentage?: string | null;\n /**\n * Type of tax required in the given country.\n *\n * + `\"NOT_APPLICABLE\"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.\n * + `\"VAT\"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).\n * + `\"GST\"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).\n */\n taxType?: TaxTypeWithLiterals;\n}\n\nexport enum TaxType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n VAT = 'VAT',\n GST = 'GST',\n}\n\n/** @enumType */\nexport type TaxTypeWithLiterals = TaxType | 'NOT_APPLICABLE' | 'VAT' | 'GST';\n\nexport interface GetAvailableAppPlansRequest {\n /**\n * AppId to get the available app plans for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan info to retrieve the available app plans for. */\n appPlanInfo?: AppPlanInfo;\n}\n\n/**\n * An `AppPlanInfo` object describes which app plan you want to retrieve data for.\n * Every plan in an app is identified by a unique combination of `productId` and `billingCycle`.\n */\nexport interface AppPlanInfo {\n /**\n * The app plan's vendorId to retrieve the response for.\n *\n * Max: 100 characters\n * @maxLength 100\n */\n vendorId?: string;\n /** The app plan cycle to retrieve the response for. */\n billingCycle?: Cycle;\n}\n\nexport interface GetAvailableAppPlansResponse {\n /** The available upgrades for the given app plan. */\n availableUpgrades?: AppPlans;\n /** The available downgrades for the given app plan. */\n availableDowngrades?: AppPlans;\n /** The current app plan. */\n currentPlan?: Plan;\n}\n\nexport interface GetPricingPageUrlRequest {\n /**\n * AppId to get the pricing page url for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan to retrieve the pricing page url for. */\n appPlanInfo?: AppPlanInfo;\n}\n\nexport interface GetPricingPageUrlResponse {\n /**\n * the pricing page url, if there is a app plan that is upgradable.\n * @format WEB_URL\n */\n packagePickerUrl?: string | null;\n}\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n * @param appIds - List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @public\n * @requiredField appIds\n * @fqn wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId\n */\nexport async function listAppPlansByAppId(\n appIds: string[]\n): Promise<\n NonNullablePaths<\n ListAppPlansByAppIdResponse,\n | `taxSettings.showPriceWithTax`\n | `taxSettings.taxType`\n | `currency`\n | `currencySymbol`\n | `appPlans`\n | `appPlans.${number}._id`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ appIds: appIds });\n\n const reqOpts = ambassadorWixAppmarketV1AppPlans.listAppPlansByAppId(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: { appIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixAppmarketAppPlansV1AppsPlansUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-market/apps-plans',\n destPath: '/api',\n },\n {\n srcPath: '/api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n _: [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-plans';\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n */\nexport function listAppPlansByAppId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPlansByAppId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.appmarket.v1.app_plans',\n method: 'GET' as any,\n methodFqn: 'wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAppmarketAppPlansV1AppsPlansUrl({\n protoPath: '/v1/apps-plans/{appIds}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPlans.plans.prices.discount.saleOptions.startDate' },\n { path: 'appPlans.plans.prices.discount.saleOptions.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPlansByAppId;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QAC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A,GAAA;AAgBL,IAAK,YAAL,kBAAKC,eAAL;AACL,EAAAA,WAAA,kBAAe;AACf,EAAAA,WAAA,cAAW;AACX,EAAAA,WAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AA4FL,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,aAAU;AAEV,EAAAA,eAAA,SAAM;AAEN,EAAAA,eAAA,cAAW;AALD,SAAAA;AAAA,GAAA;AAoKL,IAAK,UAAL,kBAAKC,aAAL;AACL,EAAAA,SAAA,oBAAiB;AACjB,EAAAA,SAAA,SAAM;AACN,EAAAA,SAAA,SAAM;AAHI,SAAAA;AAAA,GAAA;AA0FZ,eAAsBC,qBACpB,QAYA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,OAAe,CAAC;AAExE,QAAM,UAA2C,oBAAoB,OAAO;AAE5E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["listAppPlansByAppId","import_rest_modules","payload","SaleType","DiscountType","SourceType","DurationUnit","CycleType","BillingSource","TaxType","listAppPlansByAppId","sdkTransformError"]}
package/build/cjs/meta.js CHANGED
@@ -133,6 +133,16 @@ function resolveWixAppmarketAppPlansV1AppsPlansUrl(opts) {
133
133
  srcPath: "/appmarket/v1/apps-plans",
134
134
  destPath: "/v1/apps-plans"
135
135
  }
136
+ ],
137
+ "vibe._base_domain_": [
138
+ {
139
+ srcPath: "/_api/apps-plans",
140
+ destPath: ""
141
+ },
142
+ {
143
+ srcPath: "/apps-plans",
144
+ destPath: ""
145
+ }
136
146
  ]
137
147
  };
138
148
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/appmarket-v1-app-plans-app-plans.http.ts","../../src/appmarket-v1-app-plans-app-plans.types.ts","../../src/appmarket-v1-app-plans-app-plans.meta.ts"],"sourcesContent":["export * from './src/appmarket-v1-app-plans-app-plans.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixAppmarketAppPlansV1AppsPlansUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-market/apps-plans',\n destPath: '/api',\n },\n {\n srcPath: '/api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n _: [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-plans';\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n */\nexport function listAppPlansByAppId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPlansByAppId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.appmarket.v1.app_plans',\n method: 'GET' as any,\n methodFqn: 'wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAppmarketAppPlansV1AppsPlansUrl({\n protoPath: '/v1/apps-plans/{appIds}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPlans.plans.prices.discount.saleOptions.startDate' },\n { path: 'appPlans.plans.prices.discount.saleOptions.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPlansByAppId;\n}\n","export interface AppPlans {\n /** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n id?: string;\n /**\n * List of the app's pricing plans.\n *\n * Min: `0` plans\n * Max: `50` plans\n * @maxSize 50\n */\n plans?: Plan[];\n}\n\nexport enum SaleType {\n /** Default value, can be used when no specific sale is associated. */\n SALE_TYPE_UNSPECIFIED = 'SALE_TYPE_UNSPECIFIED',\n CYBER_MONDAY = 'CYBER_MONDAY',\n NOVEMBER_SALE = 'NOVEMBER_SALE',\n BLACK_FRIDAY = 'BLACK_FRIDAY',\n DEVELOPER_SALE = 'DEVELOPER_SALE',\n}\n\n/** @enumType */\nexport type SaleTypeWithLiterals =\n | SaleType\n | 'SALE_TYPE_UNSPECIFIED'\n | 'CYBER_MONDAY'\n | 'NOVEMBER_SALE'\n | 'BLACK_FRIDAY'\n | 'DEVELOPER_SALE';\n\nexport enum DiscountType {\n DISCOUNT_TYPE_UNSPECIFIED = 'DISCOUNT_TYPE_UNSPECIFIED',\n /** Discount is a fixed amount in USD. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Discount is a percentage of the total price. */\n PERCENTAGE = 'PERCENTAGE',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'DISCOUNT_TYPE_UNSPECIFIED'\n | 'FIXED_AMOUNT'\n | 'PERCENTAGE';\n\nexport enum SourceType {\n /** Default value, can be used when no specific source is associated. */\n SOURCE_TYPE_UNSPECIFIED = 'SOURCE_TYPE_UNSPECIFIED',\n /** Discount is due to Wix/Developer Sale */\n SALE = 'SALE',\n /** Discount is due to App Benefit */\n APP_BENEFIT = 'APP_BENEFIT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals =\n | SourceType\n | 'SOURCE_TYPE_UNSPECIFIED'\n | 'SALE'\n | 'APP_BENEFIT';\n\nexport interface SaleSource {\n /** @format GUID */\n saleId?: string | null;\n saleType?: SaleTypeWithLiterals;\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface Cycle {\n /**\n * Type of the billing cycle.\n *\n * + `\"UNKNOWN_UNIT\"`: There is no information about the billing cycle.\n * + `\"ONE_TIME\"`: The customer pays for unlimited usage of the app with a single payment.\n * + `\"RECURRING\"`: The customer pays for a subscription to the app on a recurring schedule.\n */\n cycleType?: CycleTypeWithLiterals;\n /** Duration of the billing cycle. Available only for `{\"cycleType\": \"RECURRING\"}`. */\n cycleDuration?: Duration;\n}\n\nexport enum DurationUnit {\n /** unknown interval unit */\n UNKNOWN_UNIT = 'UNKNOWN_UNIT',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport enum CycleType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ONE_TIME = 'ONE_TIME',\n RECURRING = 'RECURRING',\n}\n\n/** @enumType */\nexport type CycleTypeWithLiterals =\n | CycleType\n | 'UNKNOWN_TYPE'\n | 'ONE_TIME'\n | 'RECURRING';\n\nexport interface Duration {\n /** Unit of the billing cycle. */\n unit?: DurationUnitWithLiterals;\n /** Count of units that make up the billing cycle. */\n count?: number;\n}\n\nexport interface UsageBasedDetails {\n /**\n * Smallest possible amount that your app charges customers in usage-based\n * pricing. For example, the price of a single SMS message if your\n * app charges customers for sending text messages. Always in\n * [USD](https://en.wikipedia.org/wiki/United_States_dollar).\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n minimumChargeIncrement?: string | null;\n /**\n * Recurring, monthly base fee in usage-based pricing that your app\n * charges customers regardless of how much they use your app.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n monthlyBaseFee?: string | null;\n /**\n * Description of the usage-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n *\n * Max: 1024 characters\n */\n customChargeDescription?: string | null;\n}\n\nexport interface Discount extends DiscountSourceDataOneOf {\n type?: DiscountTypeWithLiterals;\n /**\n * Discount amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n amount?: string;\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price with 12.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n totalPrice?: string;\n}\n\n/** @oneof */\nexport interface DiscountSourceDataOneOf {}\n\nexport enum BillingSource {\n UNKNOWN = 'UNKNOWN',\n /** plan billing and charges is managed by Wix */\n WIX = 'WIX',\n /** plan billing and charges is managed by the app */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BillingSourceWithLiterals =\n | BillingSource\n | 'UNKNOWN'\n | 'WIX'\n | 'EXTERNAL';\n\nexport interface Price {\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price by 12.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /** Information about the plan's recurring billing cycle or single payment. */\n billingCycle?: Cycle;\n /**\n * Details about the plan's usage-based pricing.\n * Available only for plans with\n * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).\n */\n usageBaseOptions?: UsageBasedDetails;\n discount?: Discount;\n billingSource?: BillingSourceWithLiterals;\n /**\n * Can be shown instead of plan price - used for dynamic plans\n * @maxLength 140\n */\n customPaymentTitle?: string | null;\n}\n\nexport interface Plan {\n /**\n * ID of the app plan.\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Identical to `vendorProductId` in the\n * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).\n */\n vendorId?: string;\n /** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n name?: string;\n /**\n * List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Currently, the benefits are available only in English.\n *\n * Min: `0` benefits\n * Max: `4` benefits\n * Max per benefit: 1024 characters\n * @maxSize 4\n * @maxLength 1024\n */\n benefits?: string[];\n /**\n * List of the plan's prices. Available only when the plan's prices are managed\n * by Wix and not externally.\n *\n * Min: `0` prices\n * Max: `10` prices\n * @maxSize 10\n */\n prices?: Price[];\n}\n\nexport interface ListAppPlansByAppIdRequest {\n /**\n * List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @minSize 1\n * @maxSize 100\n */\n appIds: string[];\n}\n\nexport interface ListAppPlansByAppIdResponse {\n /**\n * Tax settings. Wix calculates the tax settings based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the tax settings based on the caller's IP address. Note that the\n * tax settings may not resolve properly if you call through a VPN.\n */\n taxSettings?: TaxSettings;\n /**\n * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)\n * format. Wix calculates the currency based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the currency based on the caller's IP address. Note that the\n * currency may not resolve properly if you call through a VPN.\n * @format CURRENCY\n */\n currency?: string;\n /**\n * Currency symbol in decimal HTML entity format. For example, `&#36;` for $\n * (United States Dollar). Wix calculates the currency symbol based on the\n * country code that you pass in the call's header. If you don't pass a country\n * code in the header, Wix calculates the tax settings based on the caller's IP\n * address. Note that the currency symbol may not resolve properly if you call\n * through a VPN.\n */\n currencySymbol?: string;\n /**\n * Retrieved app plans.\n *\n * Min: 0 plans\n * Max: 50 plans\n *\n * If any plans aren't returned, it's likely because they haven't been activated yet.\n * @maxSize 50\n */\n appPlans?: AppPlans[];\n}\n\nexport interface TaxSettings {\n /**\n * Whether you must display the total price including taxes in the given\n * country.\n */\n showPriceWithTax?: boolean;\n /**\n * Tax rate for the given country as percentage. Returned as `0` when\n * `{\"showPriceWithTax\": false}`.\n * @format DECIMAL_VALUE\n */\n percentage?: string | null;\n /**\n * Type of tax required in the given country.\n *\n * + `\"NOT_APPLICABLE\"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.\n * + `\"VAT\"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).\n * + `\"GST\"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).\n */\n taxType?: TaxTypeWithLiterals;\n}\n\nexport enum TaxType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n VAT = 'VAT',\n GST = 'GST',\n}\n\n/** @enumType */\nexport type TaxTypeWithLiterals = TaxType | 'NOT_APPLICABLE' | 'VAT' | 'GST';\n\nexport interface GetAvailableAppPlansRequest {\n /**\n * AppId to get the available app plans for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan info to retrieve the available app plans for. */\n appPlanInfo?: AppPlanInfo;\n}\n\n/**\n * An `AppPlanInfo` object describes which app plan you want to retrieve data for.\n * Every plan in an app is identified by a unique combination of `productId` and `billingCycle`.\n */\nexport interface AppPlanInfo {\n /**\n * The app plan's vendorId to retrieve the response for.\n *\n * Max: 100 characters\n * @maxLength 100\n */\n vendorId?: string;\n /** The app plan cycle to retrieve the response for. */\n billingCycle?: Cycle;\n}\n\nexport interface GetAvailableAppPlansResponse {\n /** The available upgrades for the given app plan. */\n availableUpgrades?: AppPlans;\n /** The available downgrades for the given app plan. */\n availableDowngrades?: AppPlans;\n /** The current app plan. */\n currentPlan?: Plan;\n}\n\nexport interface GetPricingPageUrlRequest {\n /**\n * AppId to get the pricing page url for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan to retrieve the pricing page url for. */\n appPlanInfo?: AppPlanInfo;\n}\n\nexport interface GetPricingPageUrlResponse {\n /**\n * the pricing page url, if there is a app plan that is upgradable.\n * @format WEB_URL\n */\n packagePickerUrl?: string | null;\n}\n","import * as ambassadorWixAppmarketV1AppPlans from './appmarket-v1-app-plans-app-plans.http.js';\nimport * as ambassadorWixAppmarketV1AppPlansTypes from './appmarket-v1-app-plans-app-plans.types.js';\nimport * as ambassadorWixAppmarketV1AppPlansUniversalTypes from './appmarket-v1-app-plans-app-plans.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listAppPlansByAppId(): __PublicMethodMetaInfo<\n 'GET',\n { appIds: string },\n ambassadorWixAppmarketV1AppPlansUniversalTypes.ListAppPlansByAppIdRequest,\n ambassadorWixAppmarketV1AppPlansTypes.ListAppPlansByAppIdRequest,\n ambassadorWixAppmarketV1AppPlansUniversalTypes.ListAppPlansByAppIdResponse,\n ambassadorWixAppmarketV1AppPlansTypes.ListAppPlansByAppIdResponse\n> {\n const payload = { appIds: ':appIds' } as any;\n\n const getRequestOptions =\n ambassadorWixAppmarketV1AppPlans.listAppPlansByAppId(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/apps-plans/{appIds}',\n pathParams: { appIds: 'appIds' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n AppPlans as AppPlansOriginal,\n SaleType as SaleTypeOriginal,\n SaleTypeWithLiterals as SaleTypeWithLiteralsOriginal,\n DiscountType as DiscountTypeOriginal,\n DiscountTypeWithLiterals as DiscountTypeWithLiteralsOriginal,\n SourceType as SourceTypeOriginal,\n SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal,\n SaleSource as SaleSourceOriginal,\n Cycle as CycleOriginal,\n DurationUnit as DurationUnitOriginal,\n DurationUnitWithLiterals as DurationUnitWithLiteralsOriginal,\n CycleType as CycleTypeOriginal,\n CycleTypeWithLiterals as CycleTypeWithLiteralsOriginal,\n Duration as DurationOriginal,\n UsageBasedDetails as UsageBasedDetailsOriginal,\n Discount as DiscountOriginal,\n DiscountSourceDataOneOf as DiscountSourceDataOneOfOriginal,\n BillingSource as BillingSourceOriginal,\n BillingSourceWithLiterals as BillingSourceWithLiteralsOriginal,\n Price as PriceOriginal,\n Plan as PlanOriginal,\n ListAppPlansByAppIdRequest as ListAppPlansByAppIdRequestOriginal,\n ListAppPlansByAppIdResponse as ListAppPlansByAppIdResponseOriginal,\n TaxSettings as TaxSettingsOriginal,\n TaxType as TaxTypeOriginal,\n TaxTypeWithLiterals as TaxTypeWithLiteralsOriginal,\n GetAvailableAppPlansRequest as GetAvailableAppPlansRequestOriginal,\n AppPlanInfo as AppPlanInfoOriginal,\n GetAvailableAppPlansResponse as GetAvailableAppPlansResponseOriginal,\n GetPricingPageUrlRequest as GetPricingPageUrlRequestOriginal,\n GetPricingPageUrlResponse as GetPricingPageUrlResponseOriginal,\n} from './appmarket-v1-app-plans-app-plans.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,QAAQ,SAAS;AAAA,IAC/B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["listAppPlansByAppId","import_rest_modules","payload","SaleType","DiscountType","SourceType","DurationUnit","CycleType","BillingSource","TaxType","listAppPlansByAppId"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/appmarket-v1-app-plans-app-plans.http.ts","../../src/appmarket-v1-app-plans-app-plans.types.ts","../../src/appmarket-v1-app-plans-app-plans.meta.ts"],"sourcesContent":["export * from './src/appmarket-v1-app-plans-app-plans.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixAppmarketAppPlansV1AppsPlansUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-market/apps-plans',\n destPath: '/api',\n },\n {\n srcPath: '/api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n _: [\n {\n srcPath: '/appmarket/v1/apps-plans',\n destPath: '/v1/apps-plans',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/apps-plans',\n destPath: '',\n },\n {\n srcPath: '/apps-plans',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-plans';\n\n/**\n * Retrieves plans for the given apps.\n *\n *\n * Also returns tax settings and currency details. Wix calculates this information\n * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format that you pass in the call's header. If you don't pass a country code in\n * the header, Wix calculates the tax settings and currency details based on the\n * call's IP address. Note that the tax settings and currency details may not resolve\n * properly if you call through a VPN.\n *\n * Prices for plans that are managed outside of Wix aren't returned.\n *\n * Consumers must pay for yearly and multi-yearly plans of your app every month.\n * For these plans this method returns the price that the consumer must pay every\n * month and not the total price for the entire year.\n *\n * > **Notes:**\n * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.\n * > - This method only returns app plans that have been activated.\n */\nexport function listAppPlansByAppId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPlansByAppId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.appmarket.v1.app_plans',\n method: 'GET' as any,\n methodFqn: 'wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAppmarketAppPlansV1AppsPlansUrl({\n protoPath: '/v1/apps-plans/{appIds}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPlans.plans.prices.discount.saleOptions.startDate' },\n { path: 'appPlans.plans.prices.discount.saleOptions.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPlansByAppId;\n}\n","export interface AppPlans {\n /** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n id?: string;\n /**\n * List of the app's pricing plans.\n *\n * Min: `0` plans\n * Max: `50` plans\n * @maxSize 50\n */\n plans?: Plan[];\n}\n\nexport enum SaleType {\n /** Default value, can be used when no specific sale is associated. */\n SALE_TYPE_UNSPECIFIED = 'SALE_TYPE_UNSPECIFIED',\n CYBER_MONDAY = 'CYBER_MONDAY',\n NOVEMBER_SALE = 'NOVEMBER_SALE',\n BLACK_FRIDAY = 'BLACK_FRIDAY',\n DEVELOPER_SALE = 'DEVELOPER_SALE',\n}\n\n/** @enumType */\nexport type SaleTypeWithLiterals =\n | SaleType\n | 'SALE_TYPE_UNSPECIFIED'\n | 'CYBER_MONDAY'\n | 'NOVEMBER_SALE'\n | 'BLACK_FRIDAY'\n | 'DEVELOPER_SALE';\n\nexport enum DiscountType {\n DISCOUNT_TYPE_UNSPECIFIED = 'DISCOUNT_TYPE_UNSPECIFIED',\n /** Discount is a fixed amount in USD. */\n FIXED_AMOUNT = 'FIXED_AMOUNT',\n /** Discount is a percentage of the total price. */\n PERCENTAGE = 'PERCENTAGE',\n}\n\n/** @enumType */\nexport type DiscountTypeWithLiterals =\n | DiscountType\n | 'DISCOUNT_TYPE_UNSPECIFIED'\n | 'FIXED_AMOUNT'\n | 'PERCENTAGE';\n\nexport enum SourceType {\n /** Default value, can be used when no specific source is associated. */\n SOURCE_TYPE_UNSPECIFIED = 'SOURCE_TYPE_UNSPECIFIED',\n /** Discount is due to Wix/Developer Sale */\n SALE = 'SALE',\n /** Discount is due to App Benefit */\n APP_BENEFIT = 'APP_BENEFIT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals =\n | SourceType\n | 'SOURCE_TYPE_UNSPECIFIED'\n | 'SALE'\n | 'APP_BENEFIT';\n\nexport interface SaleSource {\n /** @format GUID */\n saleId?: string | null;\n saleType?: SaleTypeWithLiterals;\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface Cycle {\n /**\n * Type of the billing cycle.\n *\n * + `\"UNKNOWN_UNIT\"`: There is no information about the billing cycle.\n * + `\"ONE_TIME\"`: The customer pays for unlimited usage of the app with a single payment.\n * + `\"RECURRING\"`: The customer pays for a subscription to the app on a recurring schedule.\n */\n cycleType?: CycleTypeWithLiterals;\n /** Duration of the billing cycle. Available only for `{\"cycleType\": \"RECURRING\"}`. */\n cycleDuration?: Duration;\n}\n\nexport enum DurationUnit {\n /** unknown interval unit */\n UNKNOWN_UNIT = 'UNKNOWN_UNIT',\n /** month */\n MONTH = 'MONTH',\n /** year */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport enum CycleType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ONE_TIME = 'ONE_TIME',\n RECURRING = 'RECURRING',\n}\n\n/** @enumType */\nexport type CycleTypeWithLiterals =\n | CycleType\n | 'UNKNOWN_TYPE'\n | 'ONE_TIME'\n | 'RECURRING';\n\nexport interface Duration {\n /** Unit of the billing cycle. */\n unit?: DurationUnitWithLiterals;\n /** Count of units that make up the billing cycle. */\n count?: number;\n}\n\nexport interface UsageBasedDetails {\n /**\n * Smallest possible amount that your app charges customers in usage-based\n * pricing. For example, the price of a single SMS message if your\n * app charges customers for sending text messages. Always in\n * [USD](https://en.wikipedia.org/wiki/United_States_dollar).\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n minimumChargeIncrement?: string | null;\n /**\n * Recurring, monthly base fee in usage-based pricing that your app\n * charges customers regardless of how much they use your app.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n monthlyBaseFee?: string | null;\n /**\n * Description of the usage-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n *\n * Max: 1024 characters\n */\n customChargeDescription?: string | null;\n}\n\nexport interface Discount extends DiscountSourceDataOneOf {\n type?: DiscountTypeWithLiterals;\n /**\n * Discount amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n amount?: string;\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price with 12.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @maxLength 1024\n */\n totalPrice?: string;\n}\n\n/** @oneof */\nexport interface DiscountSourceDataOneOf {}\n\nexport enum BillingSource {\n UNKNOWN = 'UNKNOWN',\n /** plan billing and charges is managed by Wix */\n WIX = 'WIX',\n /** plan billing and charges is managed by the app */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BillingSourceWithLiterals =\n | BillingSource\n | 'UNKNOWN'\n | 'WIX'\n | 'EXTERNAL';\n\nexport interface Price {\n /**\n * Price without taxes. For yearly plans, Wix calculates and returns the\n * average price per month. You can get the full price by multiplying the\n * returned price by 12.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n priceBeforeTax?: string;\n /**\n * Total price including taxes.\n *\n * Min: `0.00`\n * Max: 1024 characters\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00 }\n * @maxLength 1024\n */\n totalPrice?: string;\n /** Information about the plan's recurring billing cycle or single payment. */\n billingCycle?: Cycle;\n /**\n * Details about the plan's usage-based pricing.\n * Available only for plans with\n * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).\n */\n usageBaseOptions?: UsageBasedDetails;\n discount?: Discount;\n billingSource?: BillingSourceWithLiterals;\n /**\n * Can be shown instead of plan price - used for dynamic plans\n * @maxLength 140\n */\n customPaymentTitle?: string | null;\n}\n\nexport interface Plan {\n /**\n * ID of the app plan.\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Identical to `vendorProductId` in the\n * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).\n */\n vendorId?: string;\n /** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */\n name?: string;\n /**\n * List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).\n * Currently, the benefits are available only in English.\n *\n * Min: `0` benefits\n * Max: `4` benefits\n * Max per benefit: 1024 characters\n * @maxSize 4\n * @maxLength 1024\n */\n benefits?: string[];\n /**\n * List of the plan's prices. Available only when the plan's prices are managed\n * by Wix and not externally.\n *\n * Min: `0` prices\n * Max: `10` prices\n * @maxSize 10\n */\n prices?: Price[];\n}\n\nexport interface ListAppPlansByAppIdRequest {\n /**\n * List of app IDs to retrieve plans for.\n *\n * Min: 1 app ID\n * Max: 100 app IDs\n * @minSize 1\n * @maxSize 100\n */\n appIds: string[];\n}\n\nexport interface ListAppPlansByAppIdResponse {\n /**\n * Tax settings. Wix calculates the tax settings based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the tax settings based on the caller's IP address. Note that the\n * tax settings may not resolve properly if you call through a VPN.\n */\n taxSettings?: TaxSettings;\n /**\n * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)\n * format. Wix calculates the currency based on the country code that\n * you pass in the call's header. If you don't pass a country code in the header,\n * Wix calculates the currency based on the caller's IP address. Note that the\n * currency may not resolve properly if you call through a VPN.\n * @format CURRENCY\n */\n currency?: string;\n /**\n * Currency symbol in decimal HTML entity format. For example, `&#36;` for $\n * (United States Dollar). Wix calculates the currency symbol based on the\n * country code that you pass in the call's header. If you don't pass a country\n * code in the header, Wix calculates the tax settings based on the caller's IP\n * address. Note that the currency symbol may not resolve properly if you call\n * through a VPN.\n */\n currencySymbol?: string;\n /**\n * Retrieved app plans.\n *\n * Min: 0 plans\n * Max: 50 plans\n *\n * If any plans aren't returned, it's likely because they haven't been activated yet.\n * @maxSize 50\n */\n appPlans?: AppPlans[];\n}\n\nexport interface TaxSettings {\n /**\n * Whether you must display the total price including taxes in the given\n * country.\n */\n showPriceWithTax?: boolean;\n /**\n * Tax rate for the given country as percentage. Returned as `0` when\n * `{\"showPriceWithTax\": false}`.\n * @format DECIMAL_VALUE\n */\n percentage?: string | null;\n /**\n * Type of tax required in the given country.\n *\n * + `\"NOT_APPLICABLE\"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.\n * + `\"VAT\"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).\n * + `\"GST\"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).\n */\n taxType?: TaxTypeWithLiterals;\n}\n\nexport enum TaxType {\n NOT_APPLICABLE = 'NOT_APPLICABLE',\n VAT = 'VAT',\n GST = 'GST',\n}\n\n/** @enumType */\nexport type TaxTypeWithLiterals = TaxType | 'NOT_APPLICABLE' | 'VAT' | 'GST';\n\nexport interface GetAvailableAppPlansRequest {\n /**\n * AppId to get the available app plans for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan info to retrieve the available app plans for. */\n appPlanInfo?: AppPlanInfo;\n}\n\n/**\n * An `AppPlanInfo` object describes which app plan you want to retrieve data for.\n * Every plan in an app is identified by a unique combination of `productId` and `billingCycle`.\n */\nexport interface AppPlanInfo {\n /**\n * The app plan's vendorId to retrieve the response for.\n *\n * Max: 100 characters\n * @maxLength 100\n */\n vendorId?: string;\n /** The app plan cycle to retrieve the response for. */\n billingCycle?: Cycle;\n}\n\nexport interface GetAvailableAppPlansResponse {\n /** The available upgrades for the given app plan. */\n availableUpgrades?: AppPlans;\n /** The available downgrades for the given app plan. */\n availableDowngrades?: AppPlans;\n /** The current app plan. */\n currentPlan?: Plan;\n}\n\nexport interface GetPricingPageUrlRequest {\n /**\n * AppId to get the pricing page url for.\n * @format GUID\n */\n appId?: string;\n /** The specific app plan to retrieve the pricing page url for. */\n appPlanInfo?: AppPlanInfo;\n}\n\nexport interface GetPricingPageUrlResponse {\n /**\n * the pricing page url, if there is a app plan that is upgradable.\n * @format WEB_URL\n */\n packagePickerUrl?: string | null;\n}\n","import * as ambassadorWixAppmarketV1AppPlans from './appmarket-v1-app-plans-app-plans.http.js';\nimport * as ambassadorWixAppmarketV1AppPlansTypes from './appmarket-v1-app-plans-app-plans.types.js';\nimport * as ambassadorWixAppmarketV1AppPlansUniversalTypes from './appmarket-v1-app-plans-app-plans.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listAppPlansByAppId(): __PublicMethodMetaInfo<\n 'GET',\n { appIds: string },\n ambassadorWixAppmarketV1AppPlansUniversalTypes.ListAppPlansByAppIdRequest,\n ambassadorWixAppmarketV1AppPlansTypes.ListAppPlansByAppIdRequest,\n ambassadorWixAppmarketV1AppPlansUniversalTypes.ListAppPlansByAppIdResponse,\n ambassadorWixAppmarketV1AppPlansTypes.ListAppPlansByAppIdResponse\n> {\n const payload = { appIds: ':appIds' } as any;\n\n const getRequestOptions =\n ambassadorWixAppmarketV1AppPlans.listAppPlansByAppId(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/apps-plans/{appIds}',\n pathParams: { appIds: 'appIds' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n AppPlans as AppPlansOriginal,\n SaleType as SaleTypeOriginal,\n SaleTypeWithLiterals as SaleTypeWithLiteralsOriginal,\n DiscountType as DiscountTypeOriginal,\n DiscountTypeWithLiterals as DiscountTypeWithLiteralsOriginal,\n SourceType as SourceTypeOriginal,\n SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal,\n SaleSource as SaleSourceOriginal,\n Cycle as CycleOriginal,\n DurationUnit as DurationUnitOriginal,\n DurationUnitWithLiterals as DurationUnitWithLiteralsOriginal,\n CycleType as CycleTypeOriginal,\n CycleTypeWithLiterals as CycleTypeWithLiteralsOriginal,\n Duration as DurationOriginal,\n UsageBasedDetails as UsageBasedDetailsOriginal,\n Discount as DiscountOriginal,\n DiscountSourceDataOneOf as DiscountSourceDataOneOfOriginal,\n BillingSource as BillingSourceOriginal,\n BillingSourceWithLiterals as BillingSourceWithLiteralsOriginal,\n Price as PriceOriginal,\n Plan as PlanOriginal,\n ListAppPlansByAppIdRequest as ListAppPlansByAppIdRequestOriginal,\n ListAppPlansByAppIdResponse as ListAppPlansByAppIdResponseOriginal,\n TaxSettings as TaxSettingsOriginal,\n TaxType as TaxTypeOriginal,\n TaxTypeWithLiterals as TaxTypeWithLiteralsOriginal,\n GetAvailableAppPlansRequest as GetAvailableAppPlansRequestOriginal,\n AppPlanInfo as AppPlanInfoOriginal,\n GetAvailableAppPlansResponse as GetAvailableAppPlansResponseOriginal,\n GetPricingPageUrlRequest as GetPricingPageUrlRequestOriginal,\n GetPricingPageUrlResponse as GetPricingPageUrlResponseOriginal,\n} from './appmarket-v1-app-plans-app-plans.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAA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AACX,EAAAA,WAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AAuFL,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,aAAU;AAEV,EAAAA,eAAA,SAAM;AAEN,EAAAA,eAAA,cAAW;AALD,SAAAA;AAAA,GAAA;AAoKL,IAAK,UAAL,kBAAKC,aAAL;AACL,EAAAA,SAAA,oBAAiB;AACjB,EAAAA,SAAA,SAAM;AACN,EAAAA,SAAA,SAAM;AAHI,SAAAA;AAAA,GAAA;;;ACxUL,SAASC,uBAOd;AACA,QAAM,UAAU,EAAE,QAAQ,UAAU;AAEpC,QAAM,oBAC6B,oBAAoB,OAAO;AAE9D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,QAAQ,SAAS;AAAA,IAC/B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["listAppPlansByAppId","import_rest_modules","payload","SaleType","DiscountType","SourceType","DurationUnit","CycleType","BillingSource","TaxType","listAppPlansByAppId"]}
@@ -107,6 +107,16 @@ function resolveWixAppmarketAppPlansV1AppsPlansUrl(opts) {
107
107
  srcPath: "/appmarket/v1/apps-plans",
108
108
  destPath: "/v1/apps-plans"
109
109
  }
110
+ ],
111
+ "vibe._base_domain_": [
112
+ {
113
+ srcPath: "/_api/apps-plans",
114
+ destPath: ""
115
+ },
116
+ {
117
+ srcPath: "/apps-plans",
118
+ destPath: ""
119
+ }
110
120
  ]
111
121
  };
112
122
  return resolveUrl(Object.assign(opts, { domainToMappings }));