@wix/auto_sdk_pricing-plans_plans 1.0.65 → 1.0.66

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.
@@ -905,6 +905,7 @@ interface PlanBuyerCanCancelUpdatedEnvelope {
905
905
  * @eventType wix.pricing_plans.plan_buyer_can_cancel_updated
906
906
  * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2
907
907
  * @slug buyer_can_cancel_updated
908
+ * @deprecated
908
909
  */
909
910
  declare function onPlanBuyerCanCancelUpdated(handler: (event: PlanBuyerCanCancelUpdatedEnvelope) => void | Promise<void>): void;
910
911
  interface PlanCreatedEnvelope {
@@ -959,6 +960,7 @@ interface PlanArchivedEnvelope {
959
960
  * @eventType wix.pricing_plans.plan_plan_archived
960
961
  * @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2
961
962
  * @slug plan_archived
963
+ * @deprecated
962
964
  */
963
965
  declare function onPlanArchived(handler: (event: PlanArchivedEnvelope) => void | Promise<void>): void;
964
966
  interface PlanUpdatedEnvelope {
@@ -991,12 +993,16 @@ declare function onPlanUpdated(handler: (event: PlanUpdatedEnvelope) => void | P
991
993
  type PlanNonNullablePaths = `_id` | `perks.values` | `pricing.subscription.cycleDuration.unit` | `pricing.price.value` | `pricing.price.currency` | `archived` | `primary` | `hasOrders`;
992
994
  /**
993
995
  * 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.
996
+ * Deprecated: use QueryPlans or SearchPlans with visibility set to PUBLIC and archived set to false in the filter.
994
997
  * @public
995
998
  * @param options - Options for filtering and paging the list of public plans.
996
999
  * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS
997
1000
  * @applicableIdentity APP
998
1001
  * @applicableIdentity VISITOR
999
1002
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPublicPlans
1003
+ * @deprecated
1004
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.QueryPlans
1005
+ * @targetRemovalDate 2025-12-31
1000
1006
  */
1001
1007
  declare function listPublicPlans(options?: ListPublicPlansOptions): Promise<NonNullablePaths<ListPublicPlansResponse, `plans` | `plans.${number}._id` | `plans.${number}.pricing.subscription.cycleDuration.unit` | `plans.${number}.pricing.price.value` | `plans.${number}.pricing.price.currency` | `plans.${number}.primary`> & {
1002
1008
  __applicationErrorsType?: ListPublicPlansApplicationErrors;
@@ -1039,6 +1045,9 @@ interface ListPublicPlansOptions {
1039
1045
  * @applicableIdentity APP
1040
1046
  * @applicableIdentity VISITOR
1041
1047
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans
1048
+ * @deprecated
1049
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.QueryPlans
1050
+ * @targetRemovalDate 2025-12-31
1042
1051
  */
1043
1052
  declare function queryPublicPlans(): PlansQueryBuilder;
1044
1053
  interface QueryOffsetResult {
@@ -1110,17 +1119,24 @@ interface PlansQueryBuilder {
1110
1119
  * @applicableIdentity APP
1111
1120
  * @returns Pricing plan.
1112
1121
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlan
1122
+ * @deprecated
1123
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.GetPlan
1124
+ * @targetRemovalDate 2025-12-31
1113
1125
  */
1114
1126
  declare function getPlan(_id: string): Promise<NonNullablePaths<Plan, PlanNonNullablePaths> & {
1115
1127
  __applicationErrorsType?: GetPlanApplicationErrors;
1116
1128
  }>;
1117
1129
  /**
1118
1130
  * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).
1131
+ * Deprecated: use QueryPlans or SearchPlans instead.
1119
1132
  * @public
1120
1133
  * @param options - Options for filtering and paging the list of plans.
1121
1134
  * @permissionId PRICING_PLANS.READ_PLANS
1122
1135
  * @applicableIdentity APP
1123
1136
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPlans
1137
+ * @deprecated
1138
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.SearchPlans
1139
+ * @targetRemovalDate 2025-12-31
1124
1140
  */
1125
1141
  declare function listPlans(options?: ListPlansOptions): Promise<NonNullablePaths<ListPlansResponse, {
1126
1142
  [P in PlanNonNullablePaths]: `plans.${number}.${P}`;
@@ -1150,10 +1166,14 @@ interface ListPlansOptions {
1150
1166
  }
1151
1167
  /**
1152
1168
  * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.
1169
+ * Deprecated: use CountPlans instead in order to retrieve the total number of pricing plans.
1153
1170
  * @public
1154
1171
  * @permissionId PRICING_PLANS.READ_PLANS
1155
1172
  * @applicableIdentity APP
1156
1173
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlanStats
1174
+ * @deprecated
1175
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.CountPlans
1176
+ * @targetRemovalDate 2025-12-31
1157
1177
  */
1158
1178
  declare function getPlanStats(): Promise<NonNullablePaths<GetPlanStatsResponse, `totalPlans`> & {
1159
1179
  __applicationErrorsType?: GetPlanStatsApplicationErrors;
@@ -1178,6 +1198,9 @@ declare function getPlanStats(): Promise<NonNullablePaths<GetPlanStatsResponse,
1178
1198
  * @applicableIdentity APP
1179
1199
  * @returns Created plan.
1180
1200
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.CreatePlan
1201
+ * @deprecated
1202
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.CreatePlan
1203
+ * @targetRemovalDate 2025-12-31
1181
1204
  */
1182
1205
  declare function createPlan(plan: NonNullablePaths<Plan, `name` | `pricing` | `pricing.singlePaymentForDuration.count` | `pricing.subscription.cycleCount` | `pricing.subscription.cycleDuration` | `pricing.subscription.cycleDuration.count`>): Promise<NonNullablePaths<Plan, PlanNonNullablePaths> & {
1183
1206
  __applicationErrorsType?: CreatePlanApplicationErrors;
@@ -1195,6 +1218,9 @@ declare function createPlan(plan: NonNullablePaths<Plan, `name` | `pricing` | `p
1195
1218
  * @applicableIdentity APP
1196
1219
  * @returns Updated plan.
1197
1220
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.UpdatePlan
1221
+ * @deprecated
1222
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan
1223
+ * @targetRemovalDate 2025-12-31
1198
1224
  */
1199
1225
  declare function updatePlan(_id: string, plan: UpdatePlan): Promise<NonNullablePaths<Plan, PlanNonNullablePaths> & {
1200
1226
  __applicationErrorsType?: UpdatePlanApplicationErrors;
@@ -1288,6 +1314,7 @@ interface UpdatePlan {
1288
1314
  * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.
1289
1315
  * 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.)
1290
1316
  * 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.
1317
+ * Deprecated: use UpdatePlan with visibility parameter in the request instead.
1291
1318
  * @param visible - Whether a plan is visible to members and site visitors. Updates the `public` field.
1292
1319
  * @public
1293
1320
  * @requiredField _id
@@ -1297,6 +1324,9 @@ interface UpdatePlan {
1297
1324
  * @permissionId PRICING_PLANS.MANAGE_PLANS
1298
1325
  * @applicableIdentity APP
1299
1326
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.SetPlanVisibility
1327
+ * @deprecated
1328
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan
1329
+ * @targetRemovalDate 2025-12-31
1300
1330
  */
1301
1331
  declare function setPlanVisibility(_id: string, visible: boolean): Promise<NonNullablePaths<SetPlanVisibilityResponse, {
1302
1332
  [P in PlanNonNullablePaths]: `plan.${P}`;
@@ -1305,12 +1335,18 @@ declare function setPlanVisibility(_id: string, visible: boolean): Promise<NonNu
1305
1335
  }>;
1306
1336
  /**
1307
1337
  * 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.
1338
+ * Deprecated: Use QueryPlans along with BulkUpdatePlans instead.
1339
+ * First, use QueryPlans with the primary set to true in the filter to retrieve existing plans and identify the primary ones.
1340
+ * Then, use BulkUpdatePlans to set the new plan as primary and remove the primary setting from the existing one.
1308
1341
  * @public
1309
1342
  * @requiredField _id
1310
1343
  * @param _id - ID of the pricing plan to set as the primary plan.
1311
1344
  * @permissionId PRICING_PLANS.MANAGE_PLANS
1312
1345
  * @applicableIdentity APP
1313
1346
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.MakePlanPrimary
1347
+ * @deprecated
1348
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans
1349
+ * @targetRemovalDate 2025-12-31
1314
1350
  */
1315
1351
  declare function makePlanPrimary(_id: string): Promise<NonNullablePaths<MakePlanPrimaryResponse, {
1316
1352
  [P in PlanNonNullablePaths]: `plan.${P}`;
@@ -1319,28 +1355,31 @@ declare function makePlanPrimary(_id: string): Promise<NonNullablePaths<MakePlan
1319
1355
  }>;
1320
1356
  /**
1321
1357
  * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.
1358
+ * Deprecated: Use QueryPlans along with BulkUpdatePlans instead.
1359
+ * First, use QueryPlans with the primary set to true in the filter to retrieve existing plans and identify the primary ones.
1360
+ * Then, use BulkUpdatePlans to remove the primary setting from all primary plans.
1322
1361
  * @public
1323
1362
  * @permissionId PRICING_PLANS.MANAGE_PLANS
1324
1363
  * @applicableIdentity APP
1325
1364
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ClearPrimary
1365
+ * @deprecated
1366
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans
1367
+ * @targetRemovalDate 2025-12-31
1326
1368
  */
1327
1369
  declare function clearPrimary(): Promise<void & {
1328
1370
  __applicationErrorsType?: ClearPrimaryApplicationErrors;
1329
1371
  }>;
1330
1372
  /**
1331
- * Archives a single plan.
1332
- * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.
1333
- * This is because the plan's `public` property is automatically set to `false`.
1334
- * Archived plans can't be purchased or reactivated.
1335
- * 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.
1336
- * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.
1337
- * > **Note:** An attempt to archive an already-archived plan throws an error.
1373
+ * Deprecated: Use UpdatePlan with archived set to true instead.
1338
1374
  * @public
1339
1375
  * @requiredField _id
1340
1376
  * @param _id - ID of the active plan to archive.
1341
1377
  * @permissionId PRICING_PLANS.MANAGE_PLANS
1342
1378
  * @applicableIdentity APP
1343
1379
  * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ArchivePlan
1380
+ * @deprecated
1381
+ * @replacedBy wix.pricing_plans.plans.v3.PlanService.UpdatePlan
1382
+ * @targetRemovalDate 2025-12-31
1344
1383
  */
1345
1384
  declare function archivePlan(_id: string): Promise<NonNullablePaths<ArchivePlanResponse, {
1346
1385
  [P in PlanNonNullablePaths]: `plan.${P}`;