@wix/auto_sdk_pricing-plans_plans 1.0.94 → 1.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/pricing-plans-v2-plan-plans.public.ts","../../src/pricing-plans-v2-plan-plans.universal.ts","../../src/pricing-plans-v2-plan-plans.http.ts","../../src/pricing-plans-v2-plan-plans.context.ts"],"sourcesContent":["export * from './src/pricing-plans-v2-plan-plans.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ArchivePlanApplicationErrors,\n ArchivePlanResponse,\n ClearPrimaryApplicationErrors,\n CreatePlanApplicationErrors,\n CreatePlanValidationErrors,\n GetPlanApplicationErrors,\n GetPlanStatsApplicationErrors,\n GetPlanStatsResponse,\n ListPlansApplicationErrors,\n ListPlansOptions,\n ListPlansResponse,\n ListPlansValidationErrors,\n ListPublicPlansApplicationErrors,\n ListPublicPlansOptions,\n ListPublicPlansResponse,\n MakePlanPrimaryApplicationErrors,\n MakePlanPrimaryResponse,\n Plan,\n PlanArchivedEnvelope,\n PlanBuyerCanCancelUpdatedEnvelope,\n PlanCreatedEnvelope,\n PlanQuery,\n PlanUpdatedEnvelope,\n PlansQueryBuilder,\n QueryPublicPlansApplicationErrors,\n QueryPublicPlansResponse,\n QueryPublicPlansValidationErrors,\n SetPlanVisibilityApplicationErrors,\n SetPlanVisibilityResponse,\n UpdatePlan,\n UpdatePlanApplicationErrors,\n UpdatePlanValidationErrors,\n archivePlan as universalArchivePlan,\n clearPrimary as universalClearPrimary,\n createPlan as universalCreatePlan,\n getPlan as universalGetPlan,\n getPlanStats as universalGetPlanStats,\n listPlans as universalListPlans,\n listPublicPlans as universalListPublicPlans,\n makePlanPrimary as universalMakePlanPrimary,\n queryPublicPlans as universalQueryPublicPlans,\n setPlanVisibility as universalSetPlanVisibility,\n typedQueryPublicPlans as universalTypedQueryPublicPlans,\n updatePlan as universalUpdatePlan,\n} from './pricing-plans-v2-plan-plans.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/pricing-plans' };\n\nexport function listPublicPlans(\n httpClient: HttpClient\n): ListPublicPlansSignature {\n return (options?: ListPublicPlansOptions) =>\n universalListPublicPlans(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListPublicPlansSignature {\n /**\n * Retrieves a list of up to 100 public pricing plans. Public plans are visible plans that are available to site visitors and can be purchased.\n * @param - Options for filtering and paging the list of public plans.\n * @deprecated\n */\n (options?: ListPublicPlansOptions): Promise<\n NonNullablePaths<\n ListPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: ListPublicPlansApplicationErrors;\n }\n >;\n}\n\nexport function queryPublicPlans(\n httpClient: HttpClient\n): QueryPublicPlansSignature {\n return () =>\n universalQueryPublicPlans(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPublicPlansSignature {\n /**\n * Creates a query to retrieve a list of public pricing plans.\n *\n *\n * The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.\n *\n * You can refine the query by chaining `PublicPlansQueryBuilder` methods onto the query. `PublicPlansQueryBuilder` methods enable you to sort, filter, and control the results that `queryPublicPlans()` returns.\n *\n * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:\n * - [`skip`](#plansquerybuilder/skip): `0`\n * - [`limit`](#plansquerybuilder/limit): `50`\n *\n * The methods that are chained to `queryPublicPlans()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the `_id` property in ascending order, the results are sorted first by the created date of the items and then, if there are multiple results with the same date, the items are sorted by `_id` in ascending order, per created date value.\n *\n * The following `PublicPlansQueryBuilder` methods are supported for the `queryPublicPlans()` method. For a full description of the Plans object, see the object returned for the [`items`](#plansqueryresult/items) property in [`PublicPlansQueryResult`](#plansqueryresult).\n * @deprecated\n */\n (): PlansQueryBuilder;\n}\n\nexport function typedQueryPublicPlans(\n httpClient: HttpClient\n): TypedQueryPublicPlansSignature {\n return (query: PlanQuery) =>\n universalTypedQueryPublicPlans(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPublicPlansSignature {\n /** @returns Fulfilled - The query definition used to run the query using the [`find()`](#find) method. */\n (query: PlanQuery): Promise<\n NonNullablePaths<\n QueryPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: QueryPublicPlansApplicationErrors;\n __validationErrorsType?: QueryPublicPlansValidationErrors;\n }\n >;\n}\n\nexport function getPlan(httpClient: HttpClient): GetPlanSignature {\n return (_id: string) =>\n universalGetPlan(\n _id,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPlanSignature {\n /**\n * Retrieves a pricing plan by ID.\n * @param - Plan ID.\n * @returns Pricing plan.\n * @deprecated\n */\n (_id: string): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: GetPlanApplicationErrors;\n }\n >;\n}\n\nexport function listPlans(httpClient: HttpClient): ListPlansSignature {\n return (options?: ListPlansOptions) =>\n universalListPlans(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListPlansSignature {\n /**\n * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).\n * @param - Options for filtering and paging the list of plans.\n * @deprecated\n */\n (options?: ListPlansOptions): Promise<\n NonNullablePaths<\n ListPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.archived`\n | `plans.${number}.primary`\n | `plans.${number}.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ListPlansApplicationErrors;\n __validationErrorsType?: ListPlansValidationErrors;\n }\n >;\n}\n\nexport function getPlanStats(httpClient: HttpClient): GetPlanStatsSignature {\n return () =>\n universalGetPlanStats(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPlanStatsSignature {\n /**\n * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.\n * @deprecated\n */\n (): Promise<\n NonNullablePaths<GetPlanStatsResponse, `totalPlans`, 2> & {\n __applicationErrorsType?: GetPlanStatsApplicationErrors;\n }\n >;\n}\n\nexport function createPlan(httpClient: HttpClient): CreatePlanSignature {\n return (\n plan: NonNullablePaths<\n Plan,\n | `name`\n | `pricing`\n | `pricing.singlePaymentForDuration.count`\n | `pricing.subscription.cycleCount`\n | `pricing.subscription.cycleDuration`\n | `pricing.subscription.cycleDuration.count`,\n 5\n >\n ) =>\n universalCreatePlan(\n plan,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreatePlanSignature {\n /**\n * Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:\n * - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.\n * - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.\n * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).\n * Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.\n * @param - Information for the plan being created.\n * @returns Created plan.\n * @deprecated\n */\n (\n plan: NonNullablePaths<\n Plan,\n | `name`\n | `pricing`\n | `pricing.singlePaymentForDuration.count`\n | `pricing.subscription.cycleCount`\n | `pricing.subscription.cycleDuration`\n | `pricing.subscription.cycleDuration.count`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: CreatePlanApplicationErrors;\n __validationErrorsType?: CreatePlanValidationErrors;\n }\n >;\n}\n\nexport function updatePlan(httpClient: HttpClient): UpdatePlanSignature {\n return (_id: string, plan: UpdatePlan) =>\n universalUpdatePlan(\n _id,\n plan,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdatePlanSignature {\n /**\n * Updates a pricing plan.\n * Updating a plan doesn't impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.\n * @param - ID of the plan to update.\n * @param - Options for updating the plan.\n * @returns Updated plan.\n * @deprecated\n */\n (_id: string, plan: UpdatePlan): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: UpdatePlanApplicationErrors;\n __validationErrorsType?: UpdatePlanValidationErrors;\n }\n >;\n}\n\nexport function setPlanVisibility(\n httpClient: HttpClient\n): SetPlanVisibilitySignature {\n return (_id: string, visible: boolean) =>\n universalSetPlanVisibility(\n _id,\n visible,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetPlanVisibilitySignature {\n /**\n * Sets visibility for pricing plans. Visible plans are considered public plans.\n * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.\n * As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and can't be made active again.)\n * Changing a plan’s visibility doesn't impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.\n * @param - Whether a plan is visible to members and site visitors. Updates the `public` field.\n * @param - The ID of the plan to either display or hide on the site page.\n * @param - Plan visibility options.\n * @deprecated\n */\n (_id: string, visible: boolean): Promise<\n NonNullablePaths<\n SetPlanVisibilityResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: SetPlanVisibilityApplicationErrors;\n }\n >;\n}\n\nexport function makePlanPrimary(\n httpClient: HttpClient\n): MakePlanPrimarySignature {\n return (_id: string) =>\n universalMakePlanPrimary(\n _id,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface MakePlanPrimarySignature {\n /**\n * Marks a pricing plan as the primary pricing plan. When viewing pricing plans on a site, the primary plan is highlighted with a customizable ribbon. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling Make Plan Primary causes the existing primary plan to lose its primary status.\n * @param - ID of the pricing plan to set as the primary plan.\n * @deprecated\n */\n (_id: string): Promise<\n NonNullablePaths<\n MakePlanPrimaryResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: MakePlanPrimaryApplicationErrors;\n }\n >;\n}\n\nexport function clearPrimary(httpClient: HttpClient): ClearPrimarySignature {\n return () =>\n universalClearPrimary(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ClearPrimarySignature {\n /**\n * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.\n * @deprecated\n */\n (): Promise<\n void & {\n __applicationErrorsType?: ClearPrimaryApplicationErrors;\n }\n >;\n}\n\nexport function archivePlan(httpClient: HttpClient): ArchivePlanSignature {\n return (_id: string) =>\n universalArchivePlan(\n _id,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ArchivePlanSignature {\n /**\n * Archives a single plan.\n * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.\n * This is because the plan's `public` property is automatically set to `false`.\n * Archived plans can't be purchased or reactivated.\n * Plan archiving doesn't impact existing orders made for the plan. All orders for the plan are still active and keep their perks, payment options, and terms.\n * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.\n * > **Note:** An attempt to archive an already-archived plan throws an error.\n * @param - ID of the active plan to archive.\n * @deprecated\n */\n (_id: string): Promise<\n NonNullablePaths<\n ArchivePlanResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ArchivePlanApplicationErrors;\n }\n >;\n}\n\nexport const onPlanBuyerCanCancelUpdated = EventDefinition(\n 'wix.pricing_plans.plan_buyer_can_cancel_updated',\n true,\n (event: PlanBuyerCanCancelUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.plan.createdDate' },\n { path: 'data.plan.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanBuyerCanCancelUpdatedEnvelope>();\nexport const onPlanCreated = EventDefinition(\n 'wix.pricing_plans.plan_created',\n true,\n (event: PlanCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanCreatedEnvelope>();\nexport const onPlanArchived = EventDefinition(\n 'wix.pricing_plans.plan_plan_archived',\n true,\n (event: PlanArchivedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.plan.createdDate' },\n { path: 'data.plan.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanArchivedEnvelope>();\nexport const onPlanUpdated = EventDefinition(\n 'wix.pricing_plans.plan_updated',\n true,\n (event: PlanUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n ActionEvent,\n ApplicationError,\n AppliedAt,\n ArchivePlanRequest,\n ArchivePlanResponse,\n ArchivedFilter,\n ArrangePlansRequest,\n ArrangePlansResponse,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkArchivePlanRequest,\n BulkArchivePlanResponse,\n BulkPlanResult,\n BuyerCanCancelUpdated,\n ClearPrimaryRequest,\n ClearPrimaryResponse,\n CountPlansRequest,\n CountPlansResponse,\n CreatePlanRequest,\n CreatePlanResponse,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n Duration,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n Fee,\n FeeConfig,\n GetPlanRequest,\n GetPlanResponse,\n GetPlanStatsRequest,\n GetPlanStatsResponse,\n GetPlansPremiumStatusRequest,\n GetPlansPremiumStatusResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n ListPlansOptions,\n ListPlansRequest,\n ListPlansResponse,\n ListPublicPlansOptions,\n ListPublicPlansRequest,\n ListPublicPlansResponse,\n MakePlanPrimaryRequest,\n MakePlanPrimaryResponse,\n MessageEnvelope,\n Money,\n Paging,\n PagingMetadataV2,\n PeriodUnit,\n Plan,\n PlanArchived,\n PlanArchivedEnvelope,\n PlanBuyerCanCancelUpdatedEnvelope,\n PlanCreatedEnvelope,\n PlanQuerySpec,\n PlanUpdatedEnvelope,\n PlansQueryBuilder,\n PlansQueryResult,\n Pricing,\n PricingPricingModelOneOf,\n PublicFilter,\n PublicPlan,\n QueryPublicPlansRequest,\n QueryPublicPlansResponse,\n QueryV2,\n Recurrence,\n RestoreInfo,\n SearchPlansRequest,\n SearchPlansResponse,\n SetPlanVisibilityRequest,\n SetPlanVisibilityResponse,\n SortOrder,\n Sorting,\n StringList,\n UpdatePlan,\n UpdatePlanRequest,\n UpdatePlanResponse,\n WebhookIdentityType,\n} from './pricing-plans-v2-plan-plans.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPricingPlansV2Plan from './pricing-plans-v2-plan-plans.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** Information about the pricing plan. */\nexport interface Plan {\n /**\n * Plan ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Plan name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Plan description.\n * @maxLength 450\n */\n description?: string | null;\n /** List of text strings that promote what is included with this plan. For example, \"Plenty of parking\" or \"Free gift on your birthday.\" */\n perks?: StringList;\n /** Plan price, payment schedule, and expiration. */\n pricing?: Pricing;\n /** Whether the plan is public (visible to site visitors and members). */\n public?: boolean | null;\n /**\n * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.\n * @readonly\n */\n archived?: boolean;\n /**\n * Whether the plan is marked as primary.\n * @readonly\n */\n primary?: boolean;\n /**\n * Whether the plan has any orders (including pending and unpaid orders).\n * @readonly\n */\n hasOrders?: boolean;\n /**\n * Date plan was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date plan was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * URL-friendly version of plan name. Unique across all plans in the same site.\n * @minLength 1\n * @readonly\n * @format URL_SLUG\n */\n slug?: string | null;\n /**\n * Number of times the same buyer can purchase the plan. Currently limited to support:\n * - Empty value or a value of `0`, meaning no limitation.\n * - Value of `1`, meaning limited to 1 purchase per buyer.\n * @max 1\n */\n maxPurchasesPerBuyer?: number | null;\n /** Whether the buyer can start the plan at a later date. Defaults to false. */\n allowFutureStartDate?: boolean | null;\n /**\n * Whether the buyer is allowed to cancel their plan. Defaults to false.\n * If false, calling Request Cancellation returns an error.\n */\n buyerCanCancel?: boolean | null;\n /**\n * Any terms and conditions that apply to the plan. This information is displayed during checkout.\n * @maxLength 3000\n */\n termsAndConditions?: string | null;\n /**\n * ID of the form associated with the plan at checkout.\n *\n * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).\n * @format GUID\n */\n formId?: string | null;\n}\n\n/** This wrapper type exists to distinguish an empty string list from no list at all in update requests. */\nexport interface StringList {\n /**\n * @minLength 1\n * @maxLength 1400\n * @maxSize 500\n */\n values?: string[];\n}\n\n/** Plan pricing information. Includes the price of the plan and payment details. */\nexport interface Pricing extends PricingPricingModelOneOf {\n /** Pricing model indicating that the plan has recurring payments. This type of subscription is not a \"Wix subscription,\" which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */\n subscription?: Recurrence;\n /** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */\n singlePaymentForDuration?: Duration;\n /** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */\n singlePaymentUnlimited?: boolean | null;\n /** Amount for a single payment. For subscriptions, this is the amount to pay each payment cycle and it is required. For plans that are not recurring plans, it is the single payment amount for the whole subscription. */\n price?: Money;\n /**\n * Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. Set to `0` to remove the free trial.\n * @max 999\n */\n freeTrialDays?: number | null;\n}\n\n/** @oneof */\nexport interface PricingPricingModelOneOf {\n /** Pricing model indicating that the plan has recurring payments. This type of subscription is not a \"Wix subscription,\" which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */\n subscription?: Recurrence;\n /** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */\n singlePaymentForDuration?: Duration;\n /** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */\n singlePaymentUnlimited?: boolean | null;\n}\n\n/** An object specifying how often and for how long payments recur (may be forever). */\nexport interface Recurrence {\n /**\n * Number of payment cycles the subscription is valid for.\n * `0` for unlimited plans or for plans that are valid until canceled.\n */\n cycleDuration?: Duration;\n /**\n * Length of a payment cycle. For example, 1 month to have monthly payments.\n * Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\n * Currently, only a value of `1` is supported.\n * @max 2000\n */\n cycleCount?: number | null;\n}\n\n/** A duration expressed in number of time units. */\nexport interface Duration {\n /**\n * Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.\n * @min 1\n */\n count?: number | null;\n /** Unit of time for the cycle duration. */\n unit?: PeriodUnitWithLiterals;\n}\n\nexport enum PeriodUnit {\n /** Not defined. */\n UNDEFINED = 'UNDEFINED',\n /** Time unit is a day. */\n DAY = 'DAY',\n /** Time unit is a week. */\n WEEK = 'WEEK',\n /** Time unit is a month. */\n MONTH = 'MONTH',\n /** Time unit is a year. */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type PeriodUnitWithLiterals =\n | PeriodUnit\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface Money {\n /**\n * Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative.\n * @decimalValue options { lt:1000000000000, gte:0.000, maxScale:3 }\n */\n value?: string;\n /**\n * Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`.\n * @format CURRENCY\n */\n currency?: string;\n}\n\nexport interface FeeConfig {\n /** Fee configuration. */\n fee?: Fee;\n /** The time this fee will be charged. */\n appliedAt?: AppliedAtWithLiterals;\n}\n\nexport interface Fee {\n /**\n * Fee name\n * @minLength 1\n * @maxLength 40\n */\n name?: string;\n /**\n * Amount of fee to be charged\n * @decimalValue options { lt:1000000000000, gt:0.000, maxScale:3 }\n */\n amount?: string;\n}\n\nexport enum AppliedAt {\n UNKNOWN_CHARGE_EVENT = 'UNKNOWN_CHARGE_EVENT',\n /** Will charge the fee on the first payment. If the order has a free trial, it will charge after the free trial. */\n FIRST_PAYMENT = 'FIRST_PAYMENT',\n}\n\n/** @enumType */\nexport type AppliedAtWithLiterals =\n | AppliedAt\n | 'UNKNOWN_CHARGE_EVENT'\n | 'FIRST_PAYMENT';\n\nexport interface ListPublicPlansRequest {\n /**\n * Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */\n offset?: number | null;\n /**\n * IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\nexport interface ListPublicPlansResponse {\n /** List of public pricing plans. */\n plans?: PublicPlan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\n/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */\nexport interface PublicPlan {\n /**\n * Plan ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Plan name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Plan description.\n * @maxLength 450\n */\n description?: string | null;\n /** What is included with this plan (for example, 1 weekly entrance to a specific class). */\n perks?: StringList;\n /** Plan price, payment schedule, and expiration. */\n pricing?: Pricing;\n /** Whether the plan is marked as primary. */\n primary?: boolean;\n /** Date plan was created. */\n _createdDate?: Date | null;\n /** Date plan was last updated. */\n _updatedDate?: Date | null;\n /**\n * URL-friendly version of plan name. Unique across all plans in the same site.\n * @minLength 1\n */\n slug?: string | null;\n /** Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation. */\n maxPurchasesPerBuyer?: number | null;\n /** Whether the buyer can start the plan at a later date. Defaults to false. */\n allowFutureStartDate?: boolean | null;\n /** Whether the buyer is allowed to cancel their plan. Defaults to false. */\n buyerCanCancel?: boolean | null;\n /** Any terms and conditions that apply to the plan. This information is displayed during checkout. */\n termsAndConditions?: string | null;\n /**\n * ID of the form associated with the plan at checkout.\n *\n * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).\n * @format GUID\n */\n formId?: string | null;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface QueryPublicPlansRequest {\n /** Query options. */\n query?: QueryV2;\n}\n\nexport interface QueryV2 {\n /** A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans). */\n filter?: Record<string, any> | null;\n /** Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]. */\n sort?: Sorting[];\n /** Pointer to page of results using offset. Can't be used together with 'cursorPaging'. */\n paging?: Paging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryPublicPlansResponse {\n /** List of public pricing plans that match the specified query. */\n plans?: PublicPlan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface GetPlanRequest {\n /**\n * Plan ID.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface GetPlanResponse {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface ListPlansRequest {\n /** Archived filter. Defaults to `ACTIVE` (not archived) only. */\n archived?: ArchivedFilterWithLiterals;\n /** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */\n public?: PublicFilterWithLiterals;\n /**\n * Number of pricing plans to list. Defaults to `75`.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of pricing plans to skip. Defaults to `0`. */\n offset?: number | null;\n /**\n * IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\nexport enum ArchivedFilter {\n /** Returns all plans that are active. */\n ACTIVE = 'ACTIVE',\n /** Returns all plans that are archived. */\n ARCHIVED = 'ARCHIVED',\n /** Returns all plans that are active and archived. */\n ARCHIVED_AND_ACTIVE = 'ARCHIVED_AND_ACTIVE',\n}\n\n/** @enumType */\nexport type ArchivedFilterWithLiterals =\n | ArchivedFilter\n | 'ACTIVE'\n | 'ARCHIVED'\n | 'ARCHIVED_AND_ACTIVE';\n\nexport enum PublicFilter {\n /** Returns all public and hidden plans. */\n PUBLIC_AND_HIDDEN = 'PUBLIC_AND_HIDDEN',\n /** Returns only public plans. */\n PUBLIC = 'PUBLIC',\n /** Returns only hidden plans. */\n HIDDEN = 'HIDDEN',\n}\n\n/** @enumType */\nexport type PublicFilterWithLiterals =\n | PublicFilter\n | 'PUBLIC_AND_HIDDEN'\n | 'PUBLIC'\n | 'HIDDEN';\n\nexport interface ListPlansResponse {\n /** List of all public and hidden pricing plans. */\n plans?: Plan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface GetPlanStatsRequest {}\n\nexport interface GetPlanStatsResponse {\n /** Total number of plans created, including active plans (both public and hidden) and archived plans. */\n totalPlans?: number;\n}\n\nexport interface CreatePlanRequest {\n /** Plan details. */\n plan: Plan;\n}\n\nexport interface CreatePlanResponse {\n /** Created plan. */\n plan?: Plan;\n}\n\nexport interface UpdatePlanRequest {\n /** ID of the plan to update. */\n plan: Plan;\n}\n\nexport interface UpdatePlanResponse {\n /** Updated plan. */\n plan?: Plan;\n}\n\nexport interface BuyerCanCancelUpdated {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface SetPlanVisibilityRequest {\n /**\n * The ID of the plan to either display or hide on a site page.\n * @format GUID\n */\n _id: string;\n /** Whether a plan is visible to members and site visitors. Updates the `public` field. */\n visible: boolean;\n}\n\nexport interface SetPlanVisibilityResponse {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface MakePlanPrimaryRequest {\n /**\n * Pricing plan ID.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface MakePlanPrimaryResponse {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface ClearPrimaryRequest {}\n\nexport interface ClearPrimaryResponse {}\n\nexport interface ArchivePlanRequest {\n /**\n * ID of the active plan to archive.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface ArchivePlanResponse {\n /** Archived plan. */\n plan?: Plan;\n}\n\nexport interface PlanArchived {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface BulkArchivePlanRequest {\n /**\n * List of Plan IDs to archive.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n ids?: string[];\n /** Set to `true` to return the `Plan` entity in the response. */\n returnFullEntity?: boolean;\n}\n\nexport interface BulkArchivePlanResponse {\n /** Plans to be archived. */\n results?: BulkPlanResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkPlanResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ArrangePlansRequest {\n /**\n * IDs of all non-archived plans in the order you want them arranged.\n * @format GUID\n * @minSize 1\n */\n ids?: string[];\n}\n\nexport interface ArrangePlansResponse {}\n\nexport interface CountPlansRequest {\n /** The filter. */\n filter?: Record<string, any> | null;\n /** If true, counts only visible plans (visible and not archived). If no value is specified, all plans are counted. */\n visibility?: boolean | null;\n}\n\nexport interface CountPlansResponse {\n /** Number of plans in the response. */\n count?: number;\n}\n\nexport interface GetPlansPremiumStatusRequest {}\n\nexport interface GetPlansPremiumStatusResponse {\n /** True if a site has non-free, non-template plans. */\n hasPaidPlans?: boolean;\n /** True if a site has plans that were created before Pricing Plans became a premium app. */\n hasOldPlans?: boolean;\n}\n\nexport interface SearchPlansRequest {\n /** Query options. */\n query?: QueryV2;\n /**\n * Search phrase for the plan name.\n * @maxLength 50\n */\n searchPhrase?: string | null;\n}\n\nexport interface SearchPlansResponse {\n /** List of pricing plans that match the specified filter and search phrase. */\n plans?: Plan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type ListPublicPlansApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type QueryPublicPlansApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type QueryPublicPlansValidationErrors = {\n ruleName?: 'PAGING_LIMIT_OUT_OF_RANGE';\n};\n/** @docsIgnore */\nexport type GetPlanApplicationErrors =\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type ListPlansApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ListPlansValidationErrors =\n | {\n ruleName?: 'INVALID_ARCHIVE_FILTER';\n }\n | {\n ruleName?: 'INVALID_VISIBLE_FILTER';\n };\n/** @docsIgnore */\nexport type GetPlanStatsApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreatePlanApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreatePlanValidationErrors =\n | {\n ruleName?: 'PLAN_NAME_BLANK';\n }\n | {\n ruleName?: 'PLAN_FEE_NAME_BLANK';\n }\n | {\n ruleName?: 'PERIOD_AMOUNT_OUT_OF_RANGE';\n }\n | {\n ruleName?: 'RECURRING_PLAN_PAYMENT_PRICE_MISSING';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_DURATION_TOO_SHORT';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_DURATION_TOO_SHORT';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_FREE_TRIAL_UNSUPPORTED';\n }\n | {\n ruleName?: 'INVALID_SINGLE_PAYMENT_WITHOUT_DURATION';\n }\n | {\n ruleName?: 'invalid_duration_unit';\n }\n | {\n ruleName?: 'client_data_is_invalid';\n };\n/** @docsIgnore */\nexport type UpdatePlanApplicationErrors =\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdatePlanValidationErrors =\n | {\n ruleName?: 'MISSING_PLAN_ID';\n }\n | {\n ruleName?: 'PLAN_NAME_BLANK';\n }\n | {\n ruleName?: 'PLAN_FEE_NAME_BLANK';\n }\n | {\n ruleName?: 'PERIOD_AMOUNT_OUT_OF_RANGE';\n }\n | {\n ruleName?: 'RECURRING_PLAN_PAYMENT_PRICE_MISSING';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_DURATION_TOO_SHORT';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_FREE_TRIAL_UNSUPPORTED';\n }\n | {\n ruleName?: 'INVALID_SINGLE_PAYMENT_WITHOUT_DURATION';\n }\n | {\n ruleName?: 'INVALID_DURATION_UNIT';\n }\n | {\n ruleName?: 'update_not_supported';\n }\n | {\n ruleName?: 'invalid_period_amount';\n }\n | {\n ruleName?: 'price_missing';\n }\n | {\n ruleName?: 'duration_missing';\n }\n | {\n ruleName?: 'free_trial_not_supported';\n }\n | {\n ruleName?: 'client_data_is_invalid';\n };\n/** @docsIgnore */\nexport type SetPlanVisibilityApplicationErrors =\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'set_visibility_not_supported';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type MakePlanPrimaryApplicationErrors =\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'set_primary_not_supported';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type ClearPrimaryApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ArchivePlanApplicationErrors =\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'already_archived';\n description?: string;\n data?: Record<string, any>;\n };\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface PlanBuyerCanCancelUpdatedEnvelope {\n data: BuyerCanCancelUpdated;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a plan's `buyerCanCancel` field is updated.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_buyer_can_cancel_updated\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug buyer_can_cancel_updated\n * @deprecated\n */\nexport declare function onPlanBuyerCanCancelUpdated(\n handler: (event: PlanBuyerCanCancelUpdatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PlanCreatedEnvelope {\n entity: Plan;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pricing plan is created.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_created\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug created\n */\nexport declare function onPlanCreated(\n handler: (event: PlanCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PlanArchivedEnvelope {\n data: PlanArchived;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pricing plan is archived.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_plan_archived\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug plan_archived\n * @deprecated\n */\nexport declare function onPlanArchived(\n handler: (event: PlanArchivedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PlanUpdatedEnvelope {\n entity: Plan;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pricing plan is updated.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_updated\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug updated\n * @deprecated\n * @replacedBy wix.pricing_plans.v3.plan_updated\n * @targetRemovalDate 2025-12-31\n */\nexport declare function onPlanUpdated(\n handler: (event: PlanUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a list of up to 100 public pricing plans. Public plans are visible plans that are available to site visitors and can be purchased.\n * @public\n * @param options - Options for filtering and paging the list of public plans.\n * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPublicPlans\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.QueryPlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function listPublicPlans(\n options?: ListPublicPlansOptions\n): Promise<\n NonNullablePaths<\n ListPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: ListPublicPlansApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n limit: options?.limit,\n offset: options?.offset,\n planIds: options?.planIds,\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.listPublicPlans(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: {\n limit: '$[0].limit',\n offset: '$[0].offset',\n planIds: '$[0].planIds',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListPublicPlansOptions {\n /**\n * Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */\n offset?: number | null;\n /**\n * IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\n/**\n * Creates a query to retrieve a list of public pricing plans.\n *\n *\n * The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.\n *\n * You can refine the query by chaining `PublicPlansQueryBuilder` methods onto the query. `PublicPlansQueryBuilder` methods enable you to sort, filter, and control the results that `queryPublicPlans()` returns.\n *\n * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:\n * - [`skip`](#plansquerybuilder/skip): `0`\n * - [`limit`](#plansquerybuilder/limit): `50`\n *\n * The methods that are chained to `queryPublicPlans()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the `_id` property in ascending order, the results are sorted first by the created date of the items and then, if there are multiple results with the same date, the items are sorted by `_id` in ascending order, per created date value.\n *\n * The following `PublicPlansQueryBuilder` methods are supported for the `queryPublicPlans()` method. For a full description of the Plans object, see the object returned for the [`items`](#plansqueryresult/items) property in [`PublicPlansQueryResult`](#plansqueryresult).\n * @public\n * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.QueryPlans\n * @targetRemovalDate 2025-12-31\n */\nexport function queryPublicPlans(): PlansQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Plan,\n 'OFFSET',\n QueryPublicPlansRequest,\n QueryPublicPlansResponse\n >({\n func: async (payload: QueryPublicPlansRequest) => {\n const reqOpts = ambassadorWixPricingPlansV2Plan.queryPublicPlans(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryPublicPlansRequest['query']) => {\n const args = [query, {}] as [QueryPublicPlansRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPublicPlansResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.plans,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'OFFSET',\n transformationPaths: {},\n });\n}\n\ninterface QueryOffsetResult {\n currentPage: number | undefined;\n totalPages: number | undefined;\n totalCount: number | undefined;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PlansQueryResult extends QueryOffsetResult {\n items: PublicPlan[];\n query: PlansQueryBuilder;\n next: () => Promise<PlansQueryResult>;\n prev: () => Promise<PlansQueryResult>;\n}\n\nexport interface PlansQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName: '_id' | 'slug',\n value: string\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any[]\n ) => PlansQueryBuilder;\n in: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n exists: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: boolean\n ) => PlansQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'\n >\n ) => PlansQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'\n >\n ) => PlansQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PlansQueryBuilder;\n /** @param skip - Number of items to skip in the query results before returning the results. */\n skip: (skip: number) => PlansQueryBuilder;\n find: () => Promise<PlansQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans\n * @requiredField query\n * @returns Fulfilled - The query definition used to run the query using the [`find()`](#find) method.\n */\nexport async function typedQueryPublicPlans(query: PlanQuery): Promise<\n NonNullablePaths<\n QueryPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: QueryPublicPlansApplicationErrors;\n __validationErrorsType?: QueryPublicPlansValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.queryPublicPlans(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: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PlanQuerySpec extends QuerySpec {\n paging: 'offset';\n wql: [\n {\n fields: ['_createdDate', '_id', '_updatedDate', 'primary', 'slug'];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Plan, PlanQuerySpec>;\nexport type PlanQuery = {\n /** \n A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]. \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n Pointer to page of results using offset. Can't be used together with 'cursorPaging'. \n */\n paging?: {\n /** \n Number of items to load. \n */\n limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;\n /** \n Number of items to skip in the current sort order. \n */\n offset?:\n | NonNullable<CommonQueryWithEntityContext['paging']>['offset']\n | null;\n };\n};\n\n/**\n * Retrieves a pricing plan by ID.\n * @param _id - Plan ID.\n * @public\n * @requiredField _id\n * @permissionId PRICING_PLANS.READ_PLANS\n * @applicableIdentity APP\n * @returns Pricing plan.\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.GetPlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function getPlan(_id: string): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: GetPlanApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.getPlan(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).\n * @public\n * @param options - Options for filtering and paging the list of plans.\n * @permissionId PRICING_PLANS.READ_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPlans\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.SearchPlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function listPlans(options?: ListPlansOptions): Promise<\n NonNullablePaths<\n ListPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.archived`\n | `plans.${number}.primary`\n | `plans.${number}.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ListPlansApplicationErrors;\n __validationErrorsType?: ListPlansValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n archived: options?.archived,\n public: options?.public,\n limit: options?.limit,\n offset: options?.offset,\n planIds: options?.planIds,\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.listPlans(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: {\n archived: '$[0].archived',\n public: '$[0].public',\n limit: '$[0].limit',\n offset: '$[0].offset',\n planIds: '$[0].planIds',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListPlansOptions {\n /** Archived filter. Defaults to `ACTIVE` (not archived) only. */\n archived?: ArchivedFilterWithLiterals;\n /** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */\n public?: PublicFilterWithLiterals;\n /**\n * Number of pricing plans to list. Defaults to `75`.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of pricing plans to skip. Defaults to `0`. */\n offset?: number | null;\n /**\n * IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\n/**\n * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.\n * @public\n * @permissionId PRICING_PLANS.READ_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlanStats\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.CountPlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function getPlanStats(): Promise<\n NonNullablePaths<GetPlanStatsResponse, `totalPlans`, 2> & {\n __applicationErrorsType?: GetPlanStatsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.getPlanStats(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: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:\n * - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.\n * - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.\n * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).\n * Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.\n * @public\n * @requiredField plan\n * @requiredField plan.name\n * @requiredField plan.pricing\n * @requiredField plan.pricing.pricingModel\n * @requiredField plan.pricing.pricingModel.singlePaymentForDuration.count\n * @requiredField plan.pricing.pricingModel.subscription.cycleCount\n * @requiredField plan.pricing.pricingModel.subscription.cycleDuration\n * @requiredField plan.pricing.pricingModel.subscription.cycleDuration.count\n * @param plan - Information for the plan being created.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @returns Created plan.\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.CreatePlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.CreatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function createPlan(\n plan: NonNullablePaths<\n Plan,\n | `name`\n | `pricing`\n | `pricing.singlePaymentForDuration.count`\n | `pricing.subscription.cycleCount`\n | `pricing.subscription.cycleDuration`\n | `pricing.subscription.cycleDuration.count`,\n 5\n >\n): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: CreatePlanApplicationErrors;\n __validationErrorsType?: CreatePlanValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ plan: plan });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.createPlan(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { plan: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['plan']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a pricing plan.\n * Updating a plan doesn't impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.\n * @public\n * @requiredField _id\n * @requiredField plan\n * @param _id - ID of the plan to update.\n * @param options - Options for updating the plan.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @returns Updated plan.\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.UpdatePlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function updatePlan(\n _id: string,\n plan: UpdatePlan\n): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: UpdatePlanApplicationErrors;\n __validationErrorsType?: UpdatePlanValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n plan: { ...plan, id: _id },\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.updatePlan(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { plan: '$[1]' },\n explicitPathsToArguments: { 'plan.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'plan']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdatePlan {\n /**\n * Plan ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Plan name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Plan description.\n * @maxLength 450\n */\n description?: string | null;\n /** List of text strings that promote what is included with this plan. For example, \"Plenty of parking\" or \"Free gift on your birthday.\" */\n perks?: StringList;\n /** Plan price, payment schedule, and expiration. */\n pricing?: Pricing;\n /** Whether the plan is public (visible to site visitors and members). */\n public?: boolean | null;\n /**\n * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.\n * @readonly\n */\n archived?: boolean;\n /**\n * Whether the plan is marked as primary.\n * @readonly\n */\n primary?: boolean;\n /**\n * Whether the plan has any orders (including pending and unpaid orders).\n * @readonly\n */\n hasOrders?: boolean;\n /**\n * Date plan was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date plan was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * URL-friendly version of plan name. Unique across all plans in the same site.\n * @minLength 1\n * @readonly\n * @format URL_SLUG\n */\n slug?: string | null;\n /**\n * Number of times the same buyer can purchase the plan. Currently limited to support:\n * - Empty value or a value of `0`, meaning no limitation.\n * - Value of `1`, meaning limited to 1 purchase per buyer.\n * @max 1\n */\n maxPurchasesPerBuyer?: number | null;\n /** Whether the buyer can start the plan at a later date. Defaults to false. */\n allowFutureStartDate?: boolean | null;\n /**\n * Whether the buyer is allowed to cancel their plan. Defaults to false.\n * If false, calling Request Cancellation returns an error.\n */\n buyerCanCancel?: boolean | null;\n /**\n * Any terms and conditions that apply to the plan. This information is displayed during checkout.\n * @maxLength 3000\n */\n termsAndConditions?: string | null;\n /**\n * ID of the form associated with the plan at checkout.\n *\n * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).\n * @format GUID\n */\n formId?: string | null;\n}\n\n/**\n * Sets visibility for pricing plans. Visible plans are considered public plans.\n * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.\n * As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and can't be made active again.)\n * Changing a plan’s visibility doesn't impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.\n * @param visible - Whether a plan is visible to members and site visitors. Updates the `public` field.\n * @public\n * @requiredField _id\n * @requiredField visible\n * @param _id - The ID of the plan to either display or hide on the site page.\n * @param options - Plan visibility options.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.SetPlanVisibility\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function setPlanVisibility(\n _id: string,\n visible: boolean\n): Promise<\n NonNullablePaths<\n SetPlanVisibilityResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: SetPlanVisibilityApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n visible: visible,\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.setPlanVisibility(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: { id: '$[0]', visible: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'visible']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks a pricing plan as the primary pricing plan. When viewing pricing plans on a site, the primary plan is highlighted with a customizable ribbon. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling Make Plan Primary causes the existing primary plan to lose its primary status.\n * @public\n * @requiredField _id\n * @param _id - ID of the pricing plan to set as the primary plan.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.MakePlanPrimary\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function makePlanPrimary(_id: string): Promise<\n NonNullablePaths<\n MakePlanPrimaryResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: MakePlanPrimaryApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.makePlanPrimary(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: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.\n * @public\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ClearPrimary\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function clearPrimary(): Promise<\n void & {\n __applicationErrorsType?: ClearPrimaryApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.clearPrimary(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: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Archives a single plan.\n * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.\n * This is because the plan's `public` property is automatically set to `false`.\n * Archived plans can't be purchased or reactivated.\n * Plan archiving doesn't impact existing orders made for the plan. All orders for the plan are still active and keep their perks, payment options, and terms.\n * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.\n * > **Note:** An attempt to archive an already-archived plan throws an error.\n * @public\n * @requiredField _id\n * @param _id - ID of the active plan to archive.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ArchivePlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function archivePlan(_id: string): Promise<\n NonNullablePaths<\n ArchivePlanResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ArchivePlanApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.archivePlan(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: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveComWixpressMembershipV2PlansPlansServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/plan-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n '*.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n _: [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'forums._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'forums.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n {\n srcPath: '/_api/pricing-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/pricing-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_pricing-plans_plans';\n\n/**\n * Retrieves a list of up to 100 public pricing plans. Public plans are visible plans that are available to site visitors and can be purchased.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.QueryPlans(), and will be removed on 2025-12-31.\n */\nexport function listPublicPlans(payload: object): RequestOptionsFactory<any> {\n function __listPublicPlans({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.ListPublicPlans',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/public',\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: 'plans.createdDate' },\n { path: 'plans.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listPublicPlans;\n}\n\n/**\n * Creates a query to retrieve a list of public pricing plans.\n *\n *\n * The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.\n *\n * You can refine the query by chaining `PublicPlansQueryBuilder` methods onto the query. `PublicPlansQueryBuilder` methods enable you to sort, filter, and control the results that `queryPublicPlans()` returns.\n *\n * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:\n * - [`skip`](#plansquerybuilder/skip): `0`\n * - [`limit`](#plansquerybuilder/limit): `50`\n *\n * The methods that are chained to `queryPublicPlans()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the `_id` property in ascending order, the results are sorted first by the created date of the items and then, if there are multiple results with the same date, the items are sorted by `_id` in ascending order, per created date value.\n *\n * The following `PublicPlansQueryBuilder` methods are supported for the `queryPublicPlans()` method. For a full description of the Plans object, see the object returned for the [`items`](#plansqueryresult/items) property in [`PublicPlansQueryResult`](#plansqueryresult).\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.QueryPlans(), and will be removed on 2025-12-31.\n */\nexport function queryPublicPlans(payload: object): RequestOptionsFactory<any> {\n function __queryPublicPlans({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/public/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'plans.createdDate' },\n { path: 'plans.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPublicPlans;\n}\n\n/**\n * Retrieves a pricing plan by ID.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.GetPlan(), and will be removed on 2025-12-31.\n */\nexport function getPlan(payload: object): RequestOptionsFactory<any> {\n function __getPlan({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.GetPlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPlan;\n}\n\n/**\n * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.SearchPlans(), and will be removed on 2025-12-31.\n */\nexport function listPlans(payload: object): RequestOptionsFactory<any> {\n function __listPlans({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.ListPlans',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans',\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: 'plans.createdDate' },\n { path: 'plans.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listPlans;\n}\n\n/**\n * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.CountPlans(), and will be removed on 2025-12-31.\n */\nexport function getPlanStats(payload: object): RequestOptionsFactory<any> {\n function __getPlanStats({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.GetPlanStats',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/stats',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getPlanStats;\n}\n\n/**\n * Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:\n * - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.\n * - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.\n * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).\n * Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.CreatePlan(), and will be removed on 2025-12-31.\n */\nexport function createPlan(payload: object): RequestOptionsFactory<any> {\n function __createPlan({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.CreatePlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createPlan;\n}\n\n/**\n * Updates a pricing plan.\n * Updating a plan doesn't impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.UpdatePlan(), and will be removed on 2025-12-31.\n */\nexport function updatePlan(payload: object): RequestOptionsFactory<any> {\n function __updatePlan({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'PATCH' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.UpdatePlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{plan.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePlan;\n}\n\n/**\n * Sets visibility for pricing plans. Visible plans are considered public plans.\n * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.\n * As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and can't be made active again.)\n * Changing a plan’s visibility doesn't impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.UpdatePlan(), and will be removed on 2025-12-31.\n */\nexport function setPlanVisibility(payload: object): RequestOptionsFactory<any> {\n function __setPlanVisibility({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.SetPlanVisibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}/visibility',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setPlanVisibility;\n}\n\n/**\n * Marks a pricing plan as the primary pricing plan. When viewing pricing plans on a site, the primary plan is highlighted with a customizable ribbon. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling Make Plan Primary causes the existing primary plan to lose its primary status.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans(), and will be removed on 2025-12-31.\n */\nexport function makePlanPrimary(payload: object): RequestOptionsFactory<any> {\n function __makePlanPrimary({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.MakePlanPrimary',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}/make-primary',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __makePlanPrimary;\n}\n\n/**\n * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans(), and will be removed on 2025-12-31.\n */\nexport function clearPrimary(payload: object): RequestOptionsFactory<any> {\n function __clearPrimary({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.ClearPrimary',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/clear-primary',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __clearPrimary;\n}\n\n/**\n * Archives a single plan.\n * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.\n * This is because the plan's `public` property is automatically set to `false`.\n * Archived plans can't be purchased or reactivated.\n * Plan archiving doesn't impact existing orders made for the plan. All orders for the plan are still active and keep their perks, payment options, and terms.\n * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.\n * > **Note:** An attempt to archive an already-archived plan throws an error.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.UpdatePlan(), and will be removed on 2025-12-31.\n */\nexport function archivePlan(payload: object): RequestOptionsFactory<any> {\n function __archivePlan({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.ArchivePlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archivePlan;\n}\n","import {\n listPublicPlans as publicListPublicPlans,\n queryPublicPlans as publicQueryPublicPlans,\n typedQueryPublicPlans as publicTypedQueryPublicPlans,\n getPlan as publicGetPlan,\n listPlans as publicListPlans,\n getPlanStats as publicGetPlanStats,\n createPlan as publicCreatePlan,\n updatePlan as publicUpdatePlan,\n setPlanVisibility as publicSetPlanVisibility,\n makePlanPrimary as publicMakePlanPrimary,\n clearPrimary as publicClearPrimary,\n archivePlan as publicArchivePlan,\n} from './pricing-plans-v2-plan-plans.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n PlanQuery,\n PlansQueryBuilder,\n typedQueryPublicPlans as universalTypedQueryPublicPlans,\n} from './pricing-plans-v2-plan-plans.universal.js';\nimport { onPlanBuyerCanCancelUpdated as publicOnPlanBuyerCanCancelUpdated } from './pricing-plans-v2-plan-plans.public.js';\nimport { onPlanCreated as publicOnPlanCreated } from './pricing-plans-v2-plan-plans.public.js';\nimport { onPlanArchived as publicOnPlanArchived } from './pricing-plans-v2-plan-plans.public.js';\nimport { onPlanUpdated as publicOnPlanUpdated } from './pricing-plans-v2-plan-plans.public.js';\n\nfunction customQueryPublicPlans(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryPublicPlans(httpClient)(),\n typedQueryFunction: (query: PlanQuery) =>\n publicTypedQueryPublicPlans(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): PlansQueryBuilder;\n function overloadedQuery(\n query: PlanQuery\n ): ReturnType<typeof universalTypedQueryPublicPlans>;\n function overloadedQuery(query?: PlanQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const listPublicPlans: MaybeContext<\n BuildRESTFunction<typeof publicListPublicPlans> & typeof publicListPublicPlans\n> = /*#__PURE__*/ createRESTModule(publicListPublicPlans);\nexport const getPlan: MaybeContext<\n BuildRESTFunction<typeof publicGetPlan> & typeof publicGetPlan\n> = /*#__PURE__*/ createRESTModule(publicGetPlan);\nexport const listPlans: MaybeContext<\n BuildRESTFunction<typeof publicListPlans> & typeof publicListPlans\n> = /*#__PURE__*/ createRESTModule(publicListPlans);\nexport const getPlanStats: MaybeContext<\n BuildRESTFunction<typeof publicGetPlanStats> & typeof publicGetPlanStats\n> = /*#__PURE__*/ createRESTModule(publicGetPlanStats);\nexport const createPlan: MaybeContext<\n BuildRESTFunction<typeof publicCreatePlan> & typeof publicCreatePlan\n> = /*#__PURE__*/ createRESTModule(publicCreatePlan);\nexport const updatePlan: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePlan> & typeof publicUpdatePlan\n> = /*#__PURE__*/ createRESTModule(publicUpdatePlan);\nexport const setPlanVisibility: MaybeContext<\n BuildRESTFunction<typeof publicSetPlanVisibility> &\n typeof publicSetPlanVisibility\n> = /*#__PURE__*/ createRESTModule(publicSetPlanVisibility);\nexport const makePlanPrimary: MaybeContext<\n BuildRESTFunction<typeof publicMakePlanPrimary> & typeof publicMakePlanPrimary\n> = /*#__PURE__*/ createRESTModule(publicMakePlanPrimary);\nexport const clearPrimary: MaybeContext<\n BuildRESTFunction<typeof publicClearPrimary> & typeof publicClearPrimary\n> = /*#__PURE__*/ createRESTModule(publicClearPrimary);\nexport const archivePlan: MaybeContext<\n BuildRESTFunction<typeof publicArchivePlan> & typeof publicArchivePlan\n> = /*#__PURE__*/ createRESTModule(publicArchivePlan);\nexport const queryPublicPlans: MaybeContext<\n BuildRESTFunction<typeof customQueryPublicPlans> &\n typeof customQueryPublicPlans\n> = /*#__PURE__*/ createRESTModule(customQueryPublicPlans);\n/**\n * Triggered when a plan's `buyerCanCancel` field is updated.\n * @deprecated\n */\nexport const onPlanBuyerCanCancelUpdated: BuildEventDefinition<\n typeof publicOnPlanBuyerCanCancelUpdated\n> &\n typeof publicOnPlanBuyerCanCancelUpdated = createEventModule(\n publicOnPlanBuyerCanCancelUpdated\n);\n/**\n * Triggered when a pricing plan is created.\n */\nexport const onPlanCreated: BuildEventDefinition<typeof publicOnPlanCreated> &\n typeof publicOnPlanCreated = createEventModule(publicOnPlanCreated);\n/**\n * Triggered when a pricing plan is archived.\n * @deprecated\n */\nexport const onPlanArchived: BuildEventDefinition<typeof publicOnPlanArchived> &\n typeof publicOnPlanArchived = createEventModule(publicOnPlanArchived);\n/**\n * Triggered when a pricing plan is updated.\n * @deprecated\n */\nexport const onPlanUpdated: BuildEventDefinition<typeof publicOnPlanUpdated> &\n typeof publicOnPlanUpdated = createEventModule(publicOnPlanUpdated);\n\nexport {\n PeriodUnit,\n AppliedAt,\n SortOrder,\n ArchivedFilter,\n PublicFilter,\n WebhookIdentityType,\n} from './pricing-plans-v2-plan-plans.universal.js';\nexport {\n Plan,\n StringList,\n Pricing,\n PricingPricingModelOneOf,\n Recurrence,\n Duration,\n Money,\n FeeConfig,\n Fee,\n ListPublicPlansRequest,\n ListPublicPlansResponse,\n PublicPlan,\n PagingMetadataV2,\n Cursors,\n QueryPublicPlansRequest,\n QueryV2,\n Sorting,\n Paging,\n QueryPublicPlansResponse,\n GetPlanRequest,\n GetPlanResponse,\n ListPlansRequest,\n ListPlansResponse,\n GetPlanStatsRequest,\n GetPlanStatsResponse,\n CreatePlanRequest,\n CreatePlanResponse,\n UpdatePlanRequest,\n UpdatePlanResponse,\n BuyerCanCancelUpdated,\n SetPlanVisibilityRequest,\n SetPlanVisibilityResponse,\n MakePlanPrimaryRequest,\n MakePlanPrimaryResponse,\n ClearPrimaryRequest,\n ClearPrimaryResponse,\n ArchivePlanRequest,\n ArchivePlanResponse,\n PlanArchived,\n BulkArchivePlanRequest,\n BulkArchivePlanResponse,\n BulkPlanResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n ArrangePlansRequest,\n ArrangePlansResponse,\n CountPlansRequest,\n CountPlansResponse,\n GetPlansPremiumStatusRequest,\n GetPlansPremiumStatusResponse,\n SearchPlansRequest,\n SearchPlansResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n PlanBuyerCanCancelUpdatedEnvelope,\n PlanCreatedEnvelope,\n PlanArchivedEnvelope,\n PlanUpdatedEnvelope,\n ListPublicPlansOptions,\n PlansQueryResult,\n PlansQueryBuilder,\n PlanQuerySpec,\n ListPlansOptions,\n UpdatePlan,\n} from './pricing-plans-v2-plan-plans.universal.js';\nexport {\n PeriodUnitWithLiterals,\n AppliedAtWithLiterals,\n SortOrderWithLiterals,\n ArchivedFilterWithLiterals,\n PublicFilterWithLiterals,\n WebhookIdentityTypeWithLiterals,\n ListPublicPlansApplicationErrors,\n QueryPublicPlansApplicationErrors,\n QueryPublicPlansValidationErrors,\n GetPlanApplicationErrors,\n ListPlansApplicationErrors,\n ListPlansValidationErrors,\n GetPlanStatsApplicationErrors,\n CreatePlanApplicationErrors,\n CreatePlanValidationErrors,\n UpdatePlanApplicationErrors,\n UpdatePlanValidationErrors,\n SetPlanVisibilityApplicationErrors,\n MakePlanPrimaryApplicationErrors,\n ClearPrimaryApplicationErrors,\n ArchivePlanApplicationErrors,\n CommonQueryWithEntityContext,\n PlanQuery,\n} from './pricing-plans-v2-plan-plans.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,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U,EAAE,KAAK;AAAA,IAC/C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAAwB;AAC/C,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,aAEK,2DAAiBA,UAAe;AAC3C,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMX,oBAGK,2DAAiB,sBAAsB;AAKlD,IAAMY,mCAGgC;AAAA,EAC3C;AACF;AAIO,IAAMC,qBACkB,mDAAkB,aAAmB;AAK7D,IAAMC,sBACmB,mDAAkB,cAAoB;AAK/D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["archivePlan","clearPrimary","createPlan","getPlan","getPlanStats","listPlans","listPublicPlans","makePlanPrimary","onPlanArchived","onPlanBuyerCanCancelUpdated","onPlanCreated","onPlanUpdated","queryPublicPlans","setPlanVisibility","updatePlan","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","PeriodUnit","AppliedAt","SortOrder","ArchivedFilter","PublicFilter","WebhookIdentityType","listPublicPlans","sdkTransformError","queryPublicPlans","getPlan","listPlans","getPlanStats","createPlan","updatePlan","setPlanVisibility","makePlanPrimary","clearPrimary","archivePlan","listPublicPlans","queryPublicPlans","typedQueryPublicPlans","getPlan","listPlans","getPlanStats","createPlan","updatePlan","setPlanVisibility","makePlanPrimary","clearPrimary","archivePlan","import_rest_modules","queryPublicPlans","typedQueryPublicPlans","listPublicPlans","getPlan","listPlans","getPlanStats","createPlan","updatePlan","setPlanVisibility","makePlanPrimary","clearPrimary","archivePlan","onPlanBuyerCanCancelUpdated","onPlanCreated","onPlanArchived","onPlanUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/pricing-plans-v2-plan-plans.public.ts","../../src/pricing-plans-v2-plan-plans.universal.ts","../../src/pricing-plans-v2-plan-plans.http.ts","../../src/pricing-plans-v2-plan-plans.context.ts"],"sourcesContent":["export * from './src/pricing-plans-v2-plan-plans.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ArchivePlanApplicationErrors,\n ArchivePlanResponse,\n ClearPrimaryApplicationErrors,\n CreatePlanApplicationErrors,\n CreatePlanValidationErrors,\n GetPlanApplicationErrors,\n GetPlanStatsApplicationErrors,\n GetPlanStatsResponse,\n ListPlansApplicationErrors,\n ListPlansOptions,\n ListPlansResponse,\n ListPlansValidationErrors,\n ListPublicPlansApplicationErrors,\n ListPublicPlansOptions,\n ListPublicPlansResponse,\n MakePlanPrimaryApplicationErrors,\n MakePlanPrimaryResponse,\n Plan,\n PlanArchivedEnvelope,\n PlanBuyerCanCancelUpdatedEnvelope,\n PlanCreatedEnvelope,\n PlanQuery,\n PlanUpdatedEnvelope,\n PlansQueryBuilder,\n QueryPublicPlansApplicationErrors,\n QueryPublicPlansResponse,\n QueryPublicPlansValidationErrors,\n SetPlanVisibilityApplicationErrors,\n SetPlanVisibilityResponse,\n UpdatePlan,\n UpdatePlanApplicationErrors,\n UpdatePlanValidationErrors,\n archivePlan as universalArchivePlan,\n clearPrimary as universalClearPrimary,\n createPlan as universalCreatePlan,\n getPlan as universalGetPlan,\n getPlanStats as universalGetPlanStats,\n listPlans as universalListPlans,\n listPublicPlans as universalListPublicPlans,\n makePlanPrimary as universalMakePlanPrimary,\n queryPublicPlans as universalQueryPublicPlans,\n setPlanVisibility as universalSetPlanVisibility,\n typedQueryPublicPlans as universalTypedQueryPublicPlans,\n updatePlan as universalUpdatePlan,\n} from './pricing-plans-v2-plan-plans.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/pricing-plans' };\n\nexport function listPublicPlans(\n httpClient: HttpClient\n): ListPublicPlansSignature {\n return (options?: ListPublicPlansOptions) =>\n universalListPublicPlans(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListPublicPlansSignature {\n /**\n * Retrieves a list of up to 100 public pricing plans. Public plans are visible plans that are available to site visitors and can be purchased.\n * @param - Options for filtering and paging the list of public plans.\n * @deprecated\n */\n (options?: ListPublicPlansOptions): Promise<\n NonNullablePaths<\n ListPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: ListPublicPlansApplicationErrors;\n }\n >;\n}\n\nexport function queryPublicPlans(\n httpClient: HttpClient\n): QueryPublicPlansSignature {\n return () =>\n universalQueryPublicPlans(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPublicPlansSignature {\n /**\n * Creates a query to retrieve a list of public pricing plans.\n *\n *\n * The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.\n *\n * You can refine the query by chaining `PublicPlansQueryBuilder` methods onto the query. `PublicPlansQueryBuilder` methods enable you to sort, filter, and control the results that `queryPublicPlans()` returns.\n *\n * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:\n * - [`skip`](#plansquerybuilder/skip): `0`\n * - [`limit`](#plansquerybuilder/limit): `50`\n *\n * The methods that are chained to `queryPublicPlans()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the `_id` property in ascending order, the results are sorted first by the created date of the items and then, if there are multiple results with the same date, the items are sorted by `_id` in ascending order, per created date value.\n *\n * The following `PublicPlansQueryBuilder` methods are supported for the `queryPublicPlans()` method. For a full description of the Plans object, see the object returned for the [`items`](#plansqueryresult/items) property in [`PublicPlansQueryResult`](#plansqueryresult).\n * @deprecated\n */\n (): PlansQueryBuilder;\n}\n\nexport function typedQueryPublicPlans(\n httpClient: HttpClient\n): TypedQueryPublicPlansSignature {\n return (query: PlanQuery) =>\n universalTypedQueryPublicPlans(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPublicPlansSignature {\n /** @returns Fulfilled - The query definition used to run the query using the [`find()`](#find) method. */\n (query: PlanQuery): Promise<\n NonNullablePaths<\n QueryPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: QueryPublicPlansApplicationErrors;\n __validationErrorsType?: QueryPublicPlansValidationErrors;\n }\n >;\n}\n\nexport function getPlan(httpClient: HttpClient): GetPlanSignature {\n return (_id: string) =>\n universalGetPlan(\n _id,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPlanSignature {\n /**\n * Retrieves a pricing plan by ID.\n * @param - Plan ID.\n * @returns Pricing plan.\n * @deprecated\n */\n (_id: string): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: GetPlanApplicationErrors;\n }\n >;\n}\n\nexport function listPlans(httpClient: HttpClient): ListPlansSignature {\n return (options?: ListPlansOptions) =>\n universalListPlans(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListPlansSignature {\n /**\n * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).\n * @param - Options for filtering and paging the list of plans.\n * @deprecated\n */\n (options?: ListPlansOptions): Promise<\n NonNullablePaths<\n ListPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.archived`\n | `plans.${number}.primary`\n | `plans.${number}.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ListPlansApplicationErrors;\n __validationErrorsType?: ListPlansValidationErrors;\n }\n >;\n}\n\nexport function getPlanStats(httpClient: HttpClient): GetPlanStatsSignature {\n return () =>\n universalGetPlanStats(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPlanStatsSignature {\n /**\n * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.\n * @deprecated\n */\n (): Promise<\n NonNullablePaths<GetPlanStatsResponse, `totalPlans`, 2> & {\n __applicationErrorsType?: GetPlanStatsApplicationErrors;\n }\n >;\n}\n\nexport function createPlan(httpClient: HttpClient): CreatePlanSignature {\n return (\n plan: NonNullablePaths<\n Plan,\n | `name`\n | `pricing`\n | `pricing.singlePaymentForDuration.count`\n | `pricing.subscription.cycleCount`\n | `pricing.subscription.cycleDuration`\n | `pricing.subscription.cycleDuration.count`,\n 5\n >\n ) =>\n universalCreatePlan(\n plan,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreatePlanSignature {\n /**\n * Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:\n * - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.\n * - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.\n * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).\n * Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.\n * @param - Information for the plan being created.\n * @returns Created plan.\n * @deprecated\n */\n (\n plan: NonNullablePaths<\n Plan,\n | `name`\n | `pricing`\n | `pricing.singlePaymentForDuration.count`\n | `pricing.subscription.cycleCount`\n | `pricing.subscription.cycleDuration`\n | `pricing.subscription.cycleDuration.count`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: CreatePlanApplicationErrors;\n __validationErrorsType?: CreatePlanValidationErrors;\n }\n >;\n}\n\nexport function updatePlan(httpClient: HttpClient): UpdatePlanSignature {\n return (_id: string, plan: UpdatePlan) =>\n universalUpdatePlan(\n _id,\n plan,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdatePlanSignature {\n /**\n * Updates a pricing plan.\n * Updating a plan doesn't impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.\n * @param - ID of the plan to update.\n * @param - Options for updating the plan.\n * @returns Updated plan.\n * @deprecated\n */\n (_id: string, plan: UpdatePlan): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: UpdatePlanApplicationErrors;\n __validationErrorsType?: UpdatePlanValidationErrors;\n }\n >;\n}\n\nexport function setPlanVisibility(\n httpClient: HttpClient\n): SetPlanVisibilitySignature {\n return (_id: string, visible: boolean) =>\n universalSetPlanVisibility(\n _id,\n visible,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetPlanVisibilitySignature {\n /**\n * Sets visibility for pricing plans. Visible plans are considered public plans.\n * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.\n * As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and can't be made active again.)\n * Changing a plan’s visibility doesn't impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.\n * @param - Whether a plan is visible to members and site visitors. Updates the `public` field.\n * @param - The ID of the plan to either display or hide on the site page.\n * @param - Plan visibility options.\n * @deprecated\n */\n (_id: string, visible: boolean): Promise<\n NonNullablePaths<\n SetPlanVisibilityResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: SetPlanVisibilityApplicationErrors;\n }\n >;\n}\n\nexport function makePlanPrimary(\n httpClient: HttpClient\n): MakePlanPrimarySignature {\n return (_id: string) =>\n universalMakePlanPrimary(\n _id,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface MakePlanPrimarySignature {\n /**\n * Marks a pricing plan as the primary pricing plan. When viewing pricing plans on a site, the primary plan is highlighted with a customizable ribbon. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling Make Plan Primary causes the existing primary plan to lose its primary status.\n * @param - ID of the pricing plan to set as the primary plan.\n * @deprecated\n */\n (_id: string): Promise<\n NonNullablePaths<\n MakePlanPrimaryResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: MakePlanPrimaryApplicationErrors;\n }\n >;\n}\n\nexport function clearPrimary(httpClient: HttpClient): ClearPrimarySignature {\n return () =>\n universalClearPrimary(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ClearPrimarySignature {\n /**\n * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.\n * @deprecated\n */\n (): Promise<\n void & {\n __applicationErrorsType?: ClearPrimaryApplicationErrors;\n }\n >;\n}\n\nexport function archivePlan(httpClient: HttpClient): ArchivePlanSignature {\n return (_id: string) =>\n universalArchivePlan(\n _id,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ArchivePlanSignature {\n /**\n * Archives a single plan.\n * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.\n * This is because the plan's `public` property is automatically set to `false`.\n * Archived plans can't be purchased or reactivated.\n * Plan archiving doesn't impact existing orders made for the plan. All orders for the plan are still active and keep their perks, payment options, and terms.\n * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.\n * > **Note:** An attempt to archive an already-archived plan throws an error.\n * @param - ID of the active plan to archive.\n * @deprecated\n */\n (_id: string): Promise<\n NonNullablePaths<\n ArchivePlanResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ArchivePlanApplicationErrors;\n }\n >;\n}\n\nexport const onPlanBuyerCanCancelUpdated = EventDefinition(\n 'wix.pricing_plans.plan_buyer_can_cancel_updated',\n true,\n (event: PlanBuyerCanCancelUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.plan.createdDate' },\n { path: 'data.plan.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanBuyerCanCancelUpdatedEnvelope>();\nexport const onPlanCreated = EventDefinition(\n 'wix.pricing_plans.plan_created',\n true,\n (event: PlanCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanCreatedEnvelope>();\nexport const onPlanArchived = EventDefinition(\n 'wix.pricing_plans.plan_plan_archived',\n true,\n (event: PlanArchivedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.plan.createdDate' },\n { path: 'data.plan.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanArchivedEnvelope>();\nexport const onPlanUpdated = EventDefinition(\n 'wix.pricing_plans.plan_updated',\n true,\n (event: PlanUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PlanUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n ActionEvent,\n ApplicationError,\n AppliedAt,\n ArchivePlanRequest,\n ArchivePlanResponse,\n ArchivedFilter,\n ArrangePlansRequest,\n ArrangePlansResponse,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkArchivePlanRequest,\n BulkArchivePlanResponse,\n BulkPlanResult,\n BuyerCanCancelUpdated,\n ClearPrimaryRequest,\n ClearPrimaryResponse,\n CountPlansRequest,\n CountPlansResponse,\n CreatePlanRequest,\n CreatePlanResponse,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n Duration,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n Fee,\n FeeConfig,\n GetPlanRequest,\n GetPlanResponse,\n GetPlanStatsRequest,\n GetPlanStatsResponse,\n GetPlansPremiumStatusRequest,\n GetPlansPremiumStatusResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n ListPlansOptions,\n ListPlansRequest,\n ListPlansResponse,\n ListPublicPlansOptions,\n ListPublicPlansRequest,\n ListPublicPlansResponse,\n MakePlanPrimaryRequest,\n MakePlanPrimaryResponse,\n MessageEnvelope,\n Money,\n Paging,\n PagingMetadataV2,\n PeriodUnit,\n Plan,\n PlanArchived,\n PlanArchivedEnvelope,\n PlanBuyerCanCancelUpdatedEnvelope,\n PlanCreatedEnvelope,\n PlanQuerySpec,\n PlanUpdatedEnvelope,\n PlansQueryBuilder,\n PlansQueryResult,\n Pricing,\n PricingPricingModelOneOf,\n PublicFilter,\n PublicPlan,\n QueryPublicPlansRequest,\n QueryPublicPlansResponse,\n QueryV2,\n Recurrence,\n RestoreInfo,\n SearchPlansRequest,\n SearchPlansResponse,\n SetPlanVisibilityRequest,\n SetPlanVisibilityResponse,\n SortOrder,\n Sorting,\n StringList,\n UpdatePlan,\n UpdatePlanRequest,\n UpdatePlanResponse,\n WebhookIdentityType,\n} from './pricing-plans-v2-plan-plans.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPricingPlansV2Plan from './pricing-plans-v2-plan-plans.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** Information about the pricing plan. */\nexport interface Plan {\n /**\n * Plan ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Plan name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Plan description.\n * @maxLength 450\n */\n description?: string | null;\n /** List of text strings that promote what is included with this plan. For example, \"Plenty of parking\" or \"Free gift on your birthday.\" */\n perks?: StringList;\n /** Plan price, payment schedule, and expiration. */\n pricing?: Pricing;\n /** Whether the plan is public (visible to site visitors and members). */\n public?: boolean | null;\n /**\n * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.\n * @readonly\n */\n archived?: boolean;\n /**\n * Whether the plan is marked as primary.\n * @readonly\n */\n primary?: boolean;\n /**\n * Whether the plan has any orders (including pending and unpaid orders).\n * @readonly\n */\n hasOrders?: boolean;\n /**\n * Date plan was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date plan was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * URL-friendly version of plan name. Unique across all plans in the same site.\n * @minLength 1\n * @readonly\n * @format URL_SLUG\n */\n slug?: string | null;\n /**\n * Number of times the same buyer can purchase the plan. Currently limited to support:\n * - Empty value or a value of `0`, meaning no limitation.\n * - Value of `1`, meaning limited to 1 purchase per buyer.\n * @max 1\n */\n maxPurchasesPerBuyer?: number | null;\n /** Whether the buyer can start the plan at a later date. Defaults to false. */\n allowFutureStartDate?: boolean | null;\n /**\n * Whether the buyer is allowed to cancel their plan. Defaults to false.\n * If false, calling Request Cancellation returns an error.\n */\n buyerCanCancel?: boolean | null;\n /**\n * Any terms and conditions that apply to the plan. This information is displayed during checkout.\n * @maxLength 3000\n */\n termsAndConditions?: string | null;\n /**\n * ID of the form associated with the plan at checkout.\n *\n * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).\n * @format GUID\n */\n formId?: string | null;\n}\n\n/** This wrapper type exists to distinguish an empty string list from no list at all in update requests. */\nexport interface StringList {\n /**\n * @minLength 1\n * @maxLength 1400\n * @maxSize 500\n */\n values?: string[];\n}\n\n/** Plan pricing information. Includes the price of the plan and payment details. */\nexport interface Pricing extends PricingPricingModelOneOf {\n /** Pricing model indicating that the plan has recurring payments. This type of subscription is not a \"Wix subscription,\" which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */\n subscription?: Recurrence;\n /** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */\n singlePaymentForDuration?: Duration;\n /** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */\n singlePaymentUnlimited?: boolean | null;\n /** Amount for a single payment. For subscriptions, this is the amount to pay each payment cycle and it is required. For plans that are not recurring plans, it is the single payment amount for the whole subscription. */\n price?: Money;\n /**\n * Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. Set to `0` to remove the free trial.\n * @max 999\n */\n freeTrialDays?: number | null;\n}\n\n/** @oneof */\nexport interface PricingPricingModelOneOf {\n /** Pricing model indicating that the plan has recurring payments. This type of subscription is not a \"Wix subscription,\" which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and all pricing plan models. */\n subscription?: Recurrence;\n /** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */\n singlePaymentForDuration?: Duration;\n /** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */\n singlePaymentUnlimited?: boolean | null;\n}\n\n/** An object specifying how often and for how long payments recur (may be forever). */\nexport interface Recurrence {\n /**\n * Number of payment cycles the subscription is valid for.\n * `0` for unlimited plans or for plans that are valid until canceled.\n */\n cycleDuration?: Duration;\n /**\n * Length of a payment cycle. For example, 1 month to have monthly payments.\n * Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\n * Currently, only a value of `1` is supported.\n * @max 2000\n */\n cycleCount?: number | null;\n}\n\n/** A duration expressed in number of time units. */\nexport interface Duration {\n /**\n * Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.\n * @min 1\n */\n count?: number | null;\n /** Unit of time for the cycle duration. */\n unit?: PeriodUnitWithLiterals;\n}\n\nexport enum PeriodUnit {\n /** Not defined. */\n UNDEFINED = 'UNDEFINED',\n /** Time unit is a day. */\n DAY = 'DAY',\n /** Time unit is a week. */\n WEEK = 'WEEK',\n /** Time unit is a month. */\n MONTH = 'MONTH',\n /** Time unit is a year. */\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type PeriodUnitWithLiterals =\n | PeriodUnit\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface Money {\n /**\n * Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative.\n * @decimalValue options { lt:1000000000000, gte:0.000, maxScale:3 }\n */\n value?: string;\n /**\n * Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`.\n * @format CURRENCY\n */\n currency?: string;\n}\n\nexport interface FeeConfig {\n /** Fee configuration. */\n fee?: Fee;\n /** The time this fee will be charged. */\n appliedAt?: AppliedAtWithLiterals;\n}\n\nexport interface Fee {\n /**\n * Fee name\n * @minLength 1\n * @maxLength 40\n */\n name?: string;\n /**\n * Amount of fee to be charged\n * @decimalValue options { lt:1000000000000, gt:0.000, maxScale:3 }\n */\n amount?: string;\n}\n\nexport enum AppliedAt {\n UNKNOWN_CHARGE_EVENT = 'UNKNOWN_CHARGE_EVENT',\n /** Will charge the fee on the first payment. If the order has a free trial, it will charge after the free trial. */\n FIRST_PAYMENT = 'FIRST_PAYMENT',\n}\n\n/** @enumType */\nexport type AppliedAtWithLiterals =\n | AppliedAt\n | 'UNKNOWN_CHARGE_EVENT'\n | 'FIRST_PAYMENT';\n\nexport interface ListPublicPlansRequest {\n /**\n * Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */\n offset?: number | null;\n /**\n * IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\nexport interface ListPublicPlansResponse {\n /** List of public pricing plans. */\n plans?: PublicPlan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\n/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */\nexport interface PublicPlan {\n /**\n * Plan ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Plan name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Plan description.\n * @maxLength 450\n */\n description?: string | null;\n /** What is included with this plan (for example, 1 weekly entrance to a specific class). */\n perks?: StringList;\n /** Plan price, payment schedule, and expiration. */\n pricing?: Pricing;\n /** Whether the plan is marked as primary. */\n primary?: boolean;\n /** Date plan was created. */\n _createdDate?: Date | null;\n /** Date plan was last updated. */\n _updatedDate?: Date | null;\n /**\n * URL-friendly version of plan name. Unique across all plans in the same site.\n * @minLength 1\n */\n slug?: string | null;\n /** Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation. */\n maxPurchasesPerBuyer?: number | null;\n /** Whether the buyer can start the plan at a later date. Defaults to false. */\n allowFutureStartDate?: boolean | null;\n /** Whether the buyer is allowed to cancel their plan. Defaults to false. */\n buyerCanCancel?: boolean | null;\n /** Any terms and conditions that apply to the plan. This information is displayed during checkout. */\n termsAndConditions?: string | null;\n /**\n * ID of the form associated with the plan at checkout.\n *\n * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).\n * @format GUID\n */\n formId?: string | null;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface QueryPublicPlansRequest {\n /** Query options. */\n query?: QueryV2;\n}\n\nexport interface QueryV2 {\n /** A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans). */\n filter?: Record<string, any> | null;\n /** Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]. */\n sort?: Sorting[];\n /** Pointer to page of results using offset. Can't be used together with 'cursorPaging'. */\n paging?: Paging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryPublicPlansResponse {\n /** List of public pricing plans that match the specified query. */\n plans?: PublicPlan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface GetPlanRequest {\n /**\n * Plan ID.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface GetPlanResponse {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface ListPlansRequest {\n /** Archived filter. Defaults to `ACTIVE` (not archived) only. */\n archived?: ArchivedFilterWithLiterals;\n /** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */\n public?: PublicFilterWithLiterals;\n /**\n * Number of pricing plans to list. Defaults to `75`.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of pricing plans to skip. Defaults to `0`. */\n offset?: number | null;\n /**\n * IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\nexport enum ArchivedFilter {\n /** Returns all plans that are active. */\n ACTIVE = 'ACTIVE',\n /** Returns all plans that are archived. */\n ARCHIVED = 'ARCHIVED',\n /** Returns all plans that are active and archived. */\n ARCHIVED_AND_ACTIVE = 'ARCHIVED_AND_ACTIVE',\n}\n\n/** @enumType */\nexport type ArchivedFilterWithLiterals =\n | ArchivedFilter\n | 'ACTIVE'\n | 'ARCHIVED'\n | 'ARCHIVED_AND_ACTIVE';\n\nexport enum PublicFilter {\n /** Returns all public and hidden plans. */\n PUBLIC_AND_HIDDEN = 'PUBLIC_AND_HIDDEN',\n /** Returns only public plans. */\n PUBLIC = 'PUBLIC',\n /** Returns only hidden plans. */\n HIDDEN = 'HIDDEN',\n}\n\n/** @enumType */\nexport type PublicFilterWithLiterals =\n | PublicFilter\n | 'PUBLIC_AND_HIDDEN'\n | 'PUBLIC'\n | 'HIDDEN';\n\nexport interface ListPlansResponse {\n /** List of all public and hidden pricing plans. */\n plans?: Plan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface GetPlanStatsRequest {}\n\nexport interface GetPlanStatsResponse {\n /** Total number of plans created, including active plans (both public and hidden) and archived plans. */\n totalPlans?: number;\n}\n\nexport interface CreatePlanRequest {\n /** Plan details. */\n plan: Plan;\n}\n\nexport interface CreatePlanResponse {\n /** Created plan. */\n plan?: Plan;\n}\n\nexport interface UpdatePlanRequest {\n /** ID of the plan to update. */\n plan: Plan;\n}\n\nexport interface UpdatePlanResponse {\n /** Updated plan. */\n plan?: Plan;\n}\n\nexport interface BuyerCanCancelUpdated {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface SetPlanVisibilityRequest {\n /**\n * The ID of the plan to either display or hide on a site page.\n * @format GUID\n */\n _id: string;\n /** Whether a plan is visible to members and site visitors. Updates the `public` field. */\n visible: boolean;\n}\n\nexport interface SetPlanVisibilityResponse {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface MakePlanPrimaryRequest {\n /**\n * Pricing plan ID.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface MakePlanPrimaryResponse {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface ClearPrimaryRequest {}\n\nexport interface ClearPrimaryResponse {}\n\nexport interface ArchivePlanRequest {\n /**\n * ID of the active plan to archive.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface ArchivePlanResponse {\n /** Archived plan. */\n plan?: Plan;\n}\n\nexport interface PlanArchived {\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface BulkArchivePlanRequest {\n /**\n * List of Plan IDs to archive.\n * @format GUID\n * @minSize 1\n * @maxSize 100\n */\n ids?: string[];\n /** Set to `true` to return the `Plan` entity in the response. */\n returnFullEntity?: boolean;\n}\n\nexport interface BulkArchivePlanResponse {\n /** Plans to be archived. */\n results?: BulkPlanResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkPlanResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** Pricing plan. */\n plan?: Plan;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ArrangePlansRequest {\n /**\n * IDs of all non-archived plans in the order you want them arranged.\n * @format GUID\n * @minSize 1\n */\n ids?: string[];\n}\n\nexport interface ArrangePlansResponse {}\n\nexport interface CountPlansRequest {\n /** The filter. */\n filter?: Record<string, any> | null;\n /** If true, counts only visible plans (visible and not archived). If no value is specified, all plans are counted. */\n visibility?: boolean | null;\n}\n\nexport interface CountPlansResponse {\n /** Number of plans in the response. */\n count?: number;\n}\n\nexport interface GetPlansPremiumStatusRequest {}\n\nexport interface GetPlansPremiumStatusResponse {\n /** True if a site has non-free, non-template plans. */\n hasPaidPlans?: boolean;\n /** True if a site has plans that were created before Pricing Plans became a premium app. */\n hasOldPlans?: boolean;\n}\n\nexport interface SearchPlansRequest {\n /** Query options. */\n query?: QueryV2;\n /**\n * Search phrase for the plan name.\n * @maxLength 50\n */\n searchPhrase?: string | null;\n}\n\nexport interface SearchPlansResponse {\n /** List of pricing plans that match the specified filter and search phrase. */\n plans?: Plan[];\n /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type ListPublicPlansApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type QueryPublicPlansApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type QueryPublicPlansValidationErrors = {\n ruleName?: 'PAGING_LIMIT_OUT_OF_RANGE';\n};\n/** @docsIgnore */\nexport type GetPlanApplicationErrors =\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type ListPlansApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ListPlansValidationErrors =\n | {\n ruleName?: 'INVALID_ARCHIVE_FILTER';\n }\n | {\n ruleName?: 'INVALID_VISIBLE_FILTER';\n };\n/** @docsIgnore */\nexport type GetPlanStatsApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreatePlanApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreatePlanValidationErrors =\n | {\n ruleName?: 'PLAN_NAME_BLANK';\n }\n | {\n ruleName?: 'PLAN_FEE_NAME_BLANK';\n }\n | {\n ruleName?: 'PERIOD_AMOUNT_OUT_OF_RANGE';\n }\n | {\n ruleName?: 'RECURRING_PLAN_PAYMENT_PRICE_MISSING';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_DURATION_TOO_SHORT';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_DURATION_TOO_SHORT';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_FREE_TRIAL_UNSUPPORTED';\n }\n | {\n ruleName?: 'INVALID_SINGLE_PAYMENT_WITHOUT_DURATION';\n }\n | {\n ruleName?: 'invalid_duration_unit';\n }\n | {\n ruleName?: 'client_data_is_invalid';\n };\n/** @docsIgnore */\nexport type UpdatePlanApplicationErrors =\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdatePlanValidationErrors =\n | {\n ruleName?: 'MISSING_PLAN_ID';\n }\n | {\n ruleName?: 'PLAN_NAME_BLANK';\n }\n | {\n ruleName?: 'PLAN_FEE_NAME_BLANK';\n }\n | {\n ruleName?: 'PERIOD_AMOUNT_OUT_OF_RANGE';\n }\n | {\n ruleName?: 'RECURRING_PLAN_PAYMENT_PRICE_MISSING';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_DURATION_TOO_SHORT';\n }\n | {\n ruleName?: 'RECURRING_PLAN_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_CYCLE_COUNT_INVALID';\n }\n | {\n ruleName?: 'SINGLE_PAYMENT_FREE_TRIAL_UNSUPPORTED';\n }\n | {\n ruleName?: 'INVALID_SINGLE_PAYMENT_WITHOUT_DURATION';\n }\n | {\n ruleName?: 'INVALID_DURATION_UNIT';\n }\n | {\n ruleName?: 'update_not_supported';\n }\n | {\n ruleName?: 'invalid_period_amount';\n }\n | {\n ruleName?: 'price_missing';\n }\n | {\n ruleName?: 'duration_missing';\n }\n | {\n ruleName?: 'free_trial_not_supported';\n }\n | {\n ruleName?: 'client_data_is_invalid';\n };\n/** @docsIgnore */\nexport type SetPlanVisibilityApplicationErrors =\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'set_visibility_not_supported';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type MakePlanPrimaryApplicationErrors =\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'set_primary_not_supported';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type ClearPrimaryApplicationErrors = {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ArchivePlanApplicationErrors =\n | {\n code?: 'PRICING_PLANS_NOT_INSTALLED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'plan_not_found';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'already_archived';\n description?: string;\n data?: Record<string, any>;\n };\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\ninterface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface PlanBuyerCanCancelUpdatedEnvelope {\n data: BuyerCanCancelUpdated;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a plan's `buyerCanCancel` field is updated.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_buyer_can_cancel_updated\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug buyer_can_cancel_updated\n * @deprecated\n */\nexport declare function onPlanBuyerCanCancelUpdated(\n handler: (event: PlanBuyerCanCancelUpdatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PlanCreatedEnvelope {\n entity: Plan;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pricing plan is created.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_created\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug created\n */\nexport declare function onPlanCreated(\n handler: (event: PlanCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PlanArchivedEnvelope {\n data: PlanArchived;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pricing plan is archived.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_plan_archived\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug plan_archived\n * @deprecated\n */\nexport declare function onPlanArchived(\n handler: (event: PlanArchivedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PlanUpdatedEnvelope {\n entity: Plan;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pricing plan is updated.\n * @permissionScope Read Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Challenges\n * @permissionScopeId SCOPE.CHALLENGES.MANAGE\n * @permissionScope Manage Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS\n * @permissionId PRICING_PLANS.READ_PLANS\n * @webhook\n * @eventType wix.pricing_plans.plan_updated\n * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2\n * @slug updated\n * @deprecated\n * @replacedBy wix.pricing_plans.v3.plan_updated\n * @targetRemovalDate 2025-12-31\n */\nexport declare function onPlanUpdated(\n handler: (event: PlanUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a list of up to 100 public pricing plans. Public plans are visible plans that are available to site visitors and can be purchased.\n * @public\n * @param options - Options for filtering and paging the list of public plans.\n * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPublicPlans\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.QueryPlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function listPublicPlans(\n options?: ListPublicPlansOptions\n): Promise<\n NonNullablePaths<\n ListPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: ListPublicPlansApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n limit: options?.limit,\n offset: options?.offset,\n planIds: options?.planIds,\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.listPublicPlans(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: {\n limit: '$[0].limit',\n offset: '$[0].offset',\n planIds: '$[0].planIds',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListPublicPlansOptions {\n /**\n * Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */\n offset?: number | null;\n /**\n * IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\n/**\n * Creates a query to retrieve a list of public pricing plans.\n *\n *\n * The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.\n *\n * You can refine the query by chaining `PublicPlansQueryBuilder` methods onto the query. `PublicPlansQueryBuilder` methods enable you to sort, filter, and control the results that `queryPublicPlans()` returns.\n *\n * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:\n * - [`skip`](#plansquerybuilder/skip): `0`\n * - [`limit`](#plansquerybuilder/limit): `50`\n *\n * The methods that are chained to `queryPublicPlans()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the `_id` property in ascending order, the results are sorted first by the created date of the items and then, if there are multiple results with the same date, the items are sorted by `_id` in ascending order, per created date value.\n *\n * The following `PublicPlansQueryBuilder` methods are supported for the `queryPublicPlans()` method. For a full description of the Plans object, see the object returned for the [`items`](#plansqueryresult/items) property in [`PublicPlansQueryResult`](#plansqueryresult).\n * @public\n * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.QueryPlans\n * @targetRemovalDate 2025-12-31\n */\nexport function queryPublicPlans(): PlansQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Plan,\n 'OFFSET',\n QueryPublicPlansRequest,\n QueryPublicPlansResponse\n >({\n func: async (payload: QueryPublicPlansRequest) => {\n const reqOpts = ambassadorWixPricingPlansV2Plan.queryPublicPlans(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryPublicPlansRequest['query']) => {\n const args = [query, {}] as [QueryPublicPlansRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPublicPlansResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.plans,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'OFFSET',\n transformationPaths: {},\n });\n}\n\ninterface QueryOffsetResult {\n currentPage: number | undefined;\n totalPages: number | undefined;\n totalCount: number | undefined;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PlansQueryResult extends QueryOffsetResult {\n items: PublicPlan[];\n query: PlansQueryBuilder;\n next: () => Promise<PlansQueryResult>;\n prev: () => Promise<PlansQueryResult>;\n}\n\nexport interface PlansQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName: '_id' | 'slug',\n value: string\n ) => PlansQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any[]\n ) => PlansQueryBuilder;\n in: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: any\n ) => PlansQueryBuilder;\n exists: (\n propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug',\n value: boolean\n ) => PlansQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'\n >\n ) => PlansQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'\n >\n ) => PlansQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PlansQueryBuilder;\n /** @param skip - Number of items to skip in the query results before returning the results. */\n skip: (skip: number) => PlansQueryBuilder;\n find: () => Promise<PlansQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans\n * @requiredField query\n * @returns Fulfilled - The query definition used to run the query using the [`find()`](#find) method.\n */\nexport async function typedQueryPublicPlans(query: PlanQuery): Promise<\n NonNullablePaths<\n QueryPublicPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.primary`,\n 6\n > & {\n __applicationErrorsType?: QueryPublicPlansApplicationErrors;\n __validationErrorsType?: QueryPublicPlansValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.queryPublicPlans(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: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PlanQuerySpec extends QuerySpec {\n paging: 'offset';\n wql: [\n {\n fields: ['_createdDate', '_id', '_updatedDate', 'primary', 'slug'];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Plan, PlanQuerySpec>;\nexport type PlanQuery = {\n /** \n A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]. \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n Pointer to page of results using offset. Can't be used together with 'cursorPaging'. \n */\n paging?: {\n /** \n Number of items to load. \n */\n limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;\n /** \n Number of items to skip in the current sort order. \n */\n offset?:\n | NonNullable<CommonQueryWithEntityContext['paging']>['offset']\n | null;\n };\n};\n\n/**\n * Retrieves a pricing plan by ID.\n * @param _id - Plan ID.\n * @public\n * @requiredField _id\n * @permissionId PRICING_PLANS.READ_PLANS\n * @applicableIdentity APP\n * @returns Pricing plan.\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.GetPlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function getPlan(_id: string): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: GetPlanApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.getPlan(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).\n * @public\n * @param options - Options for filtering and paging the list of plans.\n * @permissionId PRICING_PLANS.READ_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPlans\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.SearchPlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function listPlans(options?: ListPlansOptions): Promise<\n NonNullablePaths<\n ListPlansResponse,\n | `plans`\n | `plans.${number}._id`\n | `plans.${number}.pricing.singlePaymentForDuration.unit`\n | `plans.${number}.pricing.price.value`\n | `plans.${number}.pricing.price.currency`\n | `plans.${number}.archived`\n | `plans.${number}.primary`\n | `plans.${number}.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ListPlansApplicationErrors;\n __validationErrorsType?: ListPlansValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n archived: options?.archived,\n public: options?.public,\n limit: options?.limit,\n offset: options?.offset,\n planIds: options?.planIds,\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.listPlans(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: {\n archived: '$[0].archived',\n public: '$[0].public',\n limit: '$[0].limit',\n offset: '$[0].offset',\n planIds: '$[0].planIds',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListPlansOptions {\n /** Archived filter. Defaults to `ACTIVE` (not archived) only. */\n archived?: ArchivedFilterWithLiterals;\n /** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */\n public?: PublicFilterWithLiterals;\n /**\n * Number of pricing plans to list. Defaults to `75`.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /** Number of pricing plans to skip. Defaults to `0`. */\n offset?: number | null;\n /**\n * IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs.\n * @format GUID\n * @maxSize 100\n */\n planIds?: string[];\n}\n\n/**\n * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.\n * @public\n * @permissionId PRICING_PLANS.READ_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlanStats\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.CountPlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function getPlanStats(): Promise<\n NonNullablePaths<GetPlanStatsResponse, `totalPlans`, 2> & {\n __applicationErrorsType?: GetPlanStatsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.getPlanStats(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: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:\n * - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.\n * - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.\n * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).\n * Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.\n * @public\n * @requiredField plan\n * @requiredField plan.name\n * @requiredField plan.pricing\n * @requiredField plan.pricing.pricingModel\n * @requiredField plan.pricing.pricingModel.singlePaymentForDuration.count\n * @requiredField plan.pricing.pricingModel.subscription.cycleCount\n * @requiredField plan.pricing.pricingModel.subscription.cycleDuration\n * @requiredField plan.pricing.pricingModel.subscription.cycleDuration.count\n * @param plan - Information for the plan being created.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @returns Created plan.\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.CreatePlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.CreatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function createPlan(\n plan: NonNullablePaths<\n Plan,\n | `name`\n | `pricing`\n | `pricing.singlePaymentForDuration.count`\n | `pricing.subscription.cycleCount`\n | `pricing.subscription.cycleDuration`\n | `pricing.subscription.cycleDuration.count`,\n 5\n >\n): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: CreatePlanApplicationErrors;\n __validationErrorsType?: CreatePlanValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ plan: plan });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.createPlan(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { plan: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['plan']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a pricing plan.\n * Updating a plan doesn't impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.\n * @public\n * @requiredField _id\n * @requiredField plan\n * @param _id - ID of the plan to update.\n * @param options - Options for updating the plan.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @returns Updated plan.\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.UpdatePlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function updatePlan(\n _id: string,\n plan: UpdatePlan\n): Promise<\n NonNullablePaths<\n Plan,\n | `_id`\n | `perks.values`\n | `pricing.subscription.cycleDuration.unit`\n | `pricing.price.value`\n | `pricing.price.currency`\n | `archived`\n | `primary`\n | `hasOrders`,\n 5\n > & {\n __applicationErrorsType?: UpdatePlanApplicationErrors;\n __validationErrorsType?: UpdatePlanValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n plan: { ...plan, id: _id },\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.updatePlan(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { plan: '$[1]' },\n explicitPathsToArguments: { 'plan.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'plan']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdatePlan {\n /**\n * Plan ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Plan name.\n * @minLength 1\n * @maxLength 50\n */\n name?: string | null;\n /**\n * Plan description.\n * @maxLength 450\n */\n description?: string | null;\n /** List of text strings that promote what is included with this plan. For example, \"Plenty of parking\" or \"Free gift on your birthday.\" */\n perks?: StringList;\n /** Plan price, payment schedule, and expiration. */\n pricing?: Pricing;\n /** Whether the plan is public (visible to site visitors and members). */\n public?: boolean | null;\n /**\n * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.\n * @readonly\n */\n archived?: boolean;\n /**\n * Whether the plan is marked as primary.\n * @readonly\n */\n primary?: boolean;\n /**\n * Whether the plan has any orders (including pending and unpaid orders).\n * @readonly\n */\n hasOrders?: boolean;\n /**\n * Date plan was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date plan was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * URL-friendly version of plan name. Unique across all plans in the same site.\n * @minLength 1\n * @readonly\n * @format URL_SLUG\n */\n slug?: string | null;\n /**\n * Number of times the same buyer can purchase the plan. Currently limited to support:\n * - Empty value or a value of `0`, meaning no limitation.\n * - Value of `1`, meaning limited to 1 purchase per buyer.\n * @max 1\n */\n maxPurchasesPerBuyer?: number | null;\n /** Whether the buyer can start the plan at a later date. Defaults to false. */\n allowFutureStartDate?: boolean | null;\n /**\n * Whether the buyer is allowed to cancel their plan. Defaults to false.\n * If false, calling Request Cancellation returns an error.\n */\n buyerCanCancel?: boolean | null;\n /**\n * Any terms and conditions that apply to the plan. This information is displayed during checkout.\n * @maxLength 3000\n */\n termsAndConditions?: string | null;\n /**\n * ID of the form associated with the plan at checkout.\n *\n * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).\n * @format GUID\n */\n formId?: string | null;\n}\n\n/**\n * Sets visibility for pricing plans. Visible plans are considered public plans.\n * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.\n * As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and can't be made active again.)\n * Changing a plan’s visibility doesn't impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.\n * @param visible - Whether a plan is visible to members and site visitors. Updates the `public` field.\n * @public\n * @requiredField _id\n * @requiredField visible\n * @param _id - The ID of the plan to either display or hide on the site page.\n * @param options - Plan visibility options.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.SetPlanVisibility\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function setPlanVisibility(\n _id: string,\n visible: boolean\n): Promise<\n NonNullablePaths<\n SetPlanVisibilityResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: SetPlanVisibilityApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n visible: visible,\n });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.setPlanVisibility(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: { id: '$[0]', visible: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'visible']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks a pricing plan as the primary pricing plan. When viewing pricing plans on a site, the primary plan is highlighted with a customizable ribbon. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling Make Plan Primary causes the existing primary plan to lose its primary status.\n * @public\n * @requiredField _id\n * @param _id - ID of the pricing plan to set as the primary plan.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.MakePlanPrimary\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function makePlanPrimary(_id: string): Promise<\n NonNullablePaths<\n MakePlanPrimaryResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: MakePlanPrimaryApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.makePlanPrimary(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: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.\n * @public\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ClearPrimary\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans\n * @targetRemovalDate 2025-12-31\n */\nexport async function clearPrimary(): Promise<\n void & {\n __applicationErrorsType?: ClearPrimaryApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.clearPrimary(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: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Archives a single plan.\n * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.\n * This is because the plan's `public` property is automatically set to `false`.\n * Archived plans can't be purchased or reactivated.\n * Plan archiving doesn't impact existing orders made for the plan. All orders for the plan are still active and keep their perks, payment options, and terms.\n * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.\n * > **Note:** An attempt to archive an already-archived plan throws an error.\n * @public\n * @requiredField _id\n * @param _id - ID of the active plan to archive.\n * @permissionId PRICING_PLANS.MANAGE_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ArchivePlan\n * @deprecated\n * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan\n * @targetRemovalDate 2025-12-31\n */\nexport async function archivePlan(_id: string): Promise<\n NonNullablePaths<\n ArchivePlanResponse,\n | `plan._id`\n | `plan.perks.values`\n | `plan.pricing.subscription.cycleDuration.unit`\n | `plan.pricing.price.value`\n | `plan.pricing.price.currency`\n | `plan.archived`\n | `plan.primary`\n | `plan.hasOrders`,\n 6\n > & {\n __applicationErrorsType?: ArchivePlanApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts = ambassadorWixPricingPlansV2Plan.archivePlan(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: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveComWixpressMembershipV2PlansPlansServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/plan-proxy',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n '*.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n _: [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'forums._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'forums.wixapps.net': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n {\n srcPath: '/_api/pricing-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/paid-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/pricing-plans/v2/plans',\n destPath: '/v2/plans',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_pricing-plans_plans';\n\n/**\n * Retrieves a list of up to 100 public pricing plans. Public plans are visible plans that are available to site visitors and can be purchased.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.QueryPlans(), and will be removed on 2025-12-31.\n */\nexport function listPublicPlans(payload: object): RequestOptionsFactory<any> {\n function __listPublicPlans({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.ListPublicPlans',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/public',\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: 'plans.createdDate' },\n { path: 'plans.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listPublicPlans;\n}\n\n/**\n * Creates a query to retrieve a list of public pricing plans.\n *\n *\n * The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.\n *\n * You can refine the query by chaining `PublicPlansQueryBuilder` methods onto the query. `PublicPlansQueryBuilder` methods enable you to sort, filter, and control the results that `queryPublicPlans()` returns.\n *\n * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:\n * - [`skip`](#plansquerybuilder/skip): `0`\n * - [`limit`](#plansquerybuilder/limit): `50`\n *\n * The methods that are chained to `queryPublicPlans()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the `_id` property in ascending order, the results are sorted first by the created date of the items and then, if there are multiple results with the same date, the items are sorted by `_id` in ascending order, per created date value.\n *\n * The following `PublicPlansQueryBuilder` methods are supported for the `queryPublicPlans()` method. For a full description of the Plans object, see the object returned for the [`items`](#plansqueryresult/items) property in [`PublicPlansQueryResult`](#plansqueryresult).\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.QueryPlans(), and will be removed on 2025-12-31.\n */\nexport function queryPublicPlans(payload: object): RequestOptionsFactory<any> {\n function __queryPublicPlans({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/public/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'plans.createdDate' },\n { path: 'plans.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPublicPlans;\n}\n\n/**\n * Retrieves a pricing plan by ID.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.GetPlan(), and will be removed on 2025-12-31.\n */\nexport function getPlan(payload: object): RequestOptionsFactory<any> {\n function __getPlan({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.GetPlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPlan;\n}\n\n/**\n * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.SearchPlans(), and will be removed on 2025-12-31.\n */\nexport function listPlans(payload: object): RequestOptionsFactory<any> {\n function __listPlans({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.ListPlans',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans',\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: 'plans.createdDate' },\n { path: 'plans.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listPlans;\n}\n\n/**\n * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.CountPlans(), and will be removed on 2025-12-31.\n */\nexport function getPlanStats(payload: object): RequestOptionsFactory<any> {\n function __getPlanStats({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.GetPlanStats',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/stats',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getPlanStats;\n}\n\n/**\n * Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:\n * - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.\n * - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.\n * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).\n * Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.CreatePlan(), and will be removed on 2025-12-31.\n */\nexport function createPlan(payload: object): RequestOptionsFactory<any> {\n function __createPlan({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.CreatePlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createPlan;\n}\n\n/**\n * Updates a pricing plan.\n * Updating a plan doesn't impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.UpdatePlan(), and will be removed on 2025-12-31.\n */\nexport function updatePlan(payload: object): RequestOptionsFactory<any> {\n function __updatePlan({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'PATCH' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.UpdatePlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{plan.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePlan;\n}\n\n/**\n * Sets visibility for pricing plans. Visible plans are considered public plans.\n * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.\n * As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and can't be made active again.)\n * Changing a plan’s visibility doesn't impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.UpdatePlan(), and will be removed on 2025-12-31.\n */\nexport function setPlanVisibility(payload: object): RequestOptionsFactory<any> {\n function __setPlanVisibility({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.SetPlanVisibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}/visibility',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setPlanVisibility;\n}\n\n/**\n * Marks a pricing plan as the primary pricing plan. When viewing pricing plans on a site, the primary plan is highlighted with a customizable ribbon. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling Make Plan Primary causes the existing primary plan to lose its primary status.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans(), and will be removed on 2025-12-31.\n */\nexport function makePlanPrimary(payload: object): RequestOptionsFactory<any> {\n function __makePlanPrimary({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.membership.v2.plans.PlansServiceV2.MakePlanPrimary',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}/make-primary',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __makePlanPrimary;\n}\n\n/**\n * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans(), and will be removed on 2025-12-31.\n */\nexport function clearPrimary(payload: object): RequestOptionsFactory<any> {\n function __clearPrimary({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.ClearPrimary',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/clear-primary',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __clearPrimary;\n}\n\n/**\n * Archives a single plan.\n * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.\n * This is because the plan's `public` property is automatically set to `false`.\n * Archived plans can't be purchased or reactivated.\n * Plan archiving doesn't impact existing orders made for the plan. All orders for the plan are still active and keep their perks, payment options, and terms.\n * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.\n * > **Note:** An attempt to archive an already-archived plan throws an error.\n * @deprecated It has been replaced with wix.pricing_plans.plans.v3.PlanService.UpdatePlan(), and will be removed on 2025-12-31.\n */\nexport function archivePlan(payload: object): RequestOptionsFactory<any> {\n function __archivePlan({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.v2.plan',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.membership.v2.plans.PlansServiceV2.ArchivePlan',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMembershipV2PlansPlansServiceV2Url({\n protoPath: '/v2/plans/{id}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archivePlan;\n}\n","import {\n listPublicPlans as publicListPublicPlans,\n queryPublicPlans as publicQueryPublicPlans,\n typedQueryPublicPlans as publicTypedQueryPublicPlans,\n getPlan as publicGetPlan,\n listPlans as publicListPlans,\n getPlanStats as publicGetPlanStats,\n createPlan as publicCreatePlan,\n updatePlan as publicUpdatePlan,\n setPlanVisibility as publicSetPlanVisibility,\n makePlanPrimary as publicMakePlanPrimary,\n clearPrimary as publicClearPrimary,\n archivePlan as publicArchivePlan,\n} from './pricing-plans-v2-plan-plans.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n PlanQuery,\n PlansQueryBuilder,\n typedQueryPublicPlans as universalTypedQueryPublicPlans,\n} from './pricing-plans-v2-plan-plans.universal.js';\nimport { onPlanBuyerCanCancelUpdated as publicOnPlanBuyerCanCancelUpdated } from './pricing-plans-v2-plan-plans.public.js';\nimport { onPlanCreated as publicOnPlanCreated } from './pricing-plans-v2-plan-plans.public.js';\nimport { onPlanArchived as publicOnPlanArchived } from './pricing-plans-v2-plan-plans.public.js';\nimport { onPlanUpdated as publicOnPlanUpdated } from './pricing-plans-v2-plan-plans.public.js';\n\nfunction customQueryPublicPlans(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryPublicPlans(httpClient)(),\n typedQueryFunction: (query: PlanQuery) =>\n publicTypedQueryPublicPlans(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): PlansQueryBuilder;\n function overloadedQuery(\n query: PlanQuery\n ): ReturnType<typeof universalTypedQueryPublicPlans>;\n function overloadedQuery(query?: PlanQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const listPublicPlans: MaybeContext<\n BuildRESTFunction<typeof publicListPublicPlans> & typeof publicListPublicPlans\n> = /*#__PURE__*/ createRESTModule(publicListPublicPlans);\nexport const getPlan: MaybeContext<\n BuildRESTFunction<typeof publicGetPlan> & typeof publicGetPlan\n> = /*#__PURE__*/ createRESTModule(publicGetPlan);\nexport const listPlans: MaybeContext<\n BuildRESTFunction<typeof publicListPlans> & typeof publicListPlans\n> = /*#__PURE__*/ createRESTModule(publicListPlans);\nexport const getPlanStats: MaybeContext<\n BuildRESTFunction<typeof publicGetPlanStats> & typeof publicGetPlanStats\n> = /*#__PURE__*/ createRESTModule(publicGetPlanStats);\nexport const createPlan: MaybeContext<\n BuildRESTFunction<typeof publicCreatePlan> & typeof publicCreatePlan\n> = /*#__PURE__*/ createRESTModule(publicCreatePlan);\nexport const updatePlan: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePlan> & typeof publicUpdatePlan\n> = /*#__PURE__*/ createRESTModule(publicUpdatePlan);\nexport const setPlanVisibility: MaybeContext<\n BuildRESTFunction<typeof publicSetPlanVisibility> &\n typeof publicSetPlanVisibility\n> = /*#__PURE__*/ createRESTModule(publicSetPlanVisibility);\nexport const makePlanPrimary: MaybeContext<\n BuildRESTFunction<typeof publicMakePlanPrimary> & typeof publicMakePlanPrimary\n> = /*#__PURE__*/ createRESTModule(publicMakePlanPrimary);\nexport const clearPrimary: MaybeContext<\n BuildRESTFunction<typeof publicClearPrimary> & typeof publicClearPrimary\n> = /*#__PURE__*/ createRESTModule(publicClearPrimary);\nexport const archivePlan: MaybeContext<\n BuildRESTFunction<typeof publicArchivePlan> & typeof publicArchivePlan\n> = /*#__PURE__*/ createRESTModule(publicArchivePlan);\nexport const queryPublicPlans: MaybeContext<\n BuildRESTFunction<typeof customQueryPublicPlans> &\n typeof customQueryPublicPlans\n> = /*#__PURE__*/ createRESTModule(customQueryPublicPlans);\n/**\n * Triggered when a plan's `buyerCanCancel` field is updated.\n * @deprecated\n */\nexport const onPlanBuyerCanCancelUpdated: BuildEventDefinition<\n typeof publicOnPlanBuyerCanCancelUpdated\n> &\n typeof publicOnPlanBuyerCanCancelUpdated = createEventModule(\n publicOnPlanBuyerCanCancelUpdated\n);\n/**\n * Triggered when a pricing plan is created.\n */\nexport const onPlanCreated: BuildEventDefinition<typeof publicOnPlanCreated> &\n typeof publicOnPlanCreated = createEventModule(publicOnPlanCreated);\n/**\n * Triggered when a pricing plan is archived.\n * @deprecated\n */\nexport const onPlanArchived: BuildEventDefinition<typeof publicOnPlanArchived> &\n typeof publicOnPlanArchived = createEventModule(publicOnPlanArchived);\n/**\n * Triggered when a pricing plan is updated.\n * @deprecated\n */\nexport const onPlanUpdated: BuildEventDefinition<typeof publicOnPlanUpdated> &\n typeof publicOnPlanUpdated = createEventModule(publicOnPlanUpdated);\n\nexport {\n PeriodUnit,\n AppliedAt,\n SortOrder,\n ArchivedFilter,\n PublicFilter,\n WebhookIdentityType,\n} from './pricing-plans-v2-plan-plans.universal.js';\nexport {\n Plan,\n StringList,\n Pricing,\n PricingPricingModelOneOf,\n Recurrence,\n Duration,\n Money,\n FeeConfig,\n Fee,\n ListPublicPlansRequest,\n ListPublicPlansResponse,\n PublicPlan,\n PagingMetadataV2,\n Cursors,\n QueryPublicPlansRequest,\n QueryV2,\n Sorting,\n Paging,\n QueryPublicPlansResponse,\n GetPlanRequest,\n GetPlanResponse,\n ListPlansRequest,\n ListPlansResponse,\n GetPlanStatsRequest,\n GetPlanStatsResponse,\n CreatePlanRequest,\n CreatePlanResponse,\n UpdatePlanRequest,\n UpdatePlanResponse,\n BuyerCanCancelUpdated,\n SetPlanVisibilityRequest,\n SetPlanVisibilityResponse,\n MakePlanPrimaryRequest,\n MakePlanPrimaryResponse,\n ClearPrimaryRequest,\n ClearPrimaryResponse,\n ArchivePlanRequest,\n ArchivePlanResponse,\n PlanArchived,\n BulkArchivePlanRequest,\n BulkArchivePlanResponse,\n BulkPlanResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n ArrangePlansRequest,\n ArrangePlansResponse,\n CountPlansRequest,\n CountPlansResponse,\n GetPlansPremiumStatusRequest,\n GetPlansPremiumStatusResponse,\n SearchPlansRequest,\n SearchPlansResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n PlanBuyerCanCancelUpdatedEnvelope,\n PlanCreatedEnvelope,\n PlanArchivedEnvelope,\n PlanUpdatedEnvelope,\n ListPublicPlansOptions,\n PlansQueryResult,\n PlansQueryBuilder,\n PlanQuerySpec,\n ListPlansOptions,\n UpdatePlan,\n} from './pricing-plans-v2-plan-plans.universal.js';\nexport {\n PeriodUnitWithLiterals,\n AppliedAtWithLiterals,\n SortOrderWithLiterals,\n ArchivedFilterWithLiterals,\n PublicFilterWithLiterals,\n WebhookIdentityTypeWithLiterals,\n ListPublicPlansApplicationErrors,\n QueryPublicPlansApplicationErrors,\n QueryPublicPlansValidationErrors,\n GetPlanApplicationErrors,\n ListPlansApplicationErrors,\n ListPlansValidationErrors,\n GetPlanStatsApplicationErrors,\n CreatePlanApplicationErrors,\n CreatePlanValidationErrors,\n UpdatePlanApplicationErrors,\n UpdatePlanValidationErrors,\n SetPlanVisibilityApplicationErrors,\n MakePlanPrimaryApplicationErrors,\n ClearPrimaryApplicationErrors,\n ArchivePlanApplicationErrors,\n CommonQueryWithEntityContext,\n PlanQuery,\n} from './pricing-plans-v2-plan-plans.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT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AAkC;AAOlC,iCAA0C;AAW1C,SAAS,uBAAuB,YAAwB;AACtD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,kBAAuB,UAAU,EAAE;AAAA,IAC/D,oBAAoB,CAAC,UACnBC,uBAA4B,UAAU,EAAE,KAAK;AAAA,IAC/C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAAwB;AAC/C,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,aAEK,2DAAiBA,UAAe;AAC3C,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMX,oBAGK,2DAAiB,sBAAsB;AAKlD,IAAMY,mCAGgC;AAAA,EAC3C;AACF;AAIO,IAAMC,qBACkB,mDAAkB,aAAmB;AAK7D,IAAMC,sBACmB,mDAAkB,cAAoB;AAK/D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["archivePlan","clearPrimary","createPlan","getPlan","getPlanStats","listPlans","listPublicPlans","makePlanPrimary","onPlanArchived","onPlanBuyerCanCancelUpdated","onPlanCreated","onPlanUpdated","queryPublicPlans","setPlanVisibility","updatePlan","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","PeriodUnit","AppliedAt","SortOrder","ArchivedFilter","PublicFilter","WebhookIdentityType","listPublicPlans","sdkTransformError","queryPublicPlans","getPlan","listPlans","getPlanStats","createPlan","updatePlan","setPlanVisibility","makePlanPrimary","clearPrimary","archivePlan","listPublicPlans","queryPublicPlans","typedQueryPublicPlans","getPlan","listPlans","getPlanStats","createPlan","updatePlan","setPlanVisibility","makePlanPrimary","clearPrimary","archivePlan","import_rest_modules","queryPublicPlans","typedQueryPublicPlans","listPublicPlans","getPlan","listPlans","getPlanStats","createPlan","updatePlan","setPlanVisibility","makePlanPrimary","clearPrimary","archivePlan","onPlanBuyerCanCancelUpdated","onPlanCreated","onPlanArchived","onPlanUpdated"]}