@wix/pricing-plans 1.0.3 → 1.0.5

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.
@@ -15,7 +15,11 @@ export interface Plan {
15
15
  name?: string | null;
16
16
  /** Plan description. */
17
17
  description?: string | null;
18
- /** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
18
+ /**
19
+ * List of text strings that promote what is included with this plan.
20
+ *
21
+ * For example, "Plenty of parking" or "Free gift on your birthday".
22
+ */
19
23
  perks?: StringList;
20
24
  /** Plan price, payment schedule, and expiration. */
21
25
  pricing?: Pricing;
@@ -27,7 +31,9 @@ export interface Plan {
27
31
  */
28
32
  archived?: boolean;
29
33
  /**
30
- * Whether the plan is marked as primary.
34
+ * Whether the plan is marked as primary. If `true`, the plan is highlighted on the site with a custom ribbon.
35
+ *
36
+ * Default: `false`.
31
37
  * @readonly
32
38
  */
33
39
  primary?: boolean;
@@ -57,9 +63,19 @@ export interface Plan {
57
63
  * - Value of `1`, meaning limited to one purchase per buyer.
58
64
  */
59
65
  maxPurchasesPerBuyer?: number | null;
60
- /** Whether the buyer can start the plan at a later date. Defaults to false. */
66
+ /**
67
+ * Whether the buyer can start the plan at a later date.
68
+ *
69
+ * Default: `false`.
70
+ *
71
+ */
61
72
  allowFutureStartDate?: boolean | null;
62
- /** Whether the buyer is allowed to cancel their plan. Defaults to false. */
73
+ /**
74
+ * Whether the buyer is allowed to cancel their plan. If `false`, calling the `cancelOrder()` function returns an error.
75
+ *
76
+ * Default: `false`.
77
+ *
78
+ */
63
79
  buyerCanCancel?: boolean | null;
64
80
  /** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
65
81
  termsAndConditions?: string | null;
@@ -74,15 +90,19 @@ export interface StringList {
74
90
  }
75
91
  /** Plan pricing information. Includes the price of the plan and payment details. */
76
92
  export interface Pricing extends PricingPricingModelOneOf {
77
- /** Amount for a single payment (or the whole subscription if it's not a recurring plan) */
93
+ /** 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. */
78
94
  price?: Money;
79
- /** Free trial period for the plan in days. It’s available only for recurring plans. Set to 0 to remove free trial. */
95
+ /** 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. */
80
96
  freeTrialDays?: number | null;
81
- /** Plan has recurring payments. */
97
+ /**
98
+ * Pricing model indicating that the plan has recurring payments.
99
+ *
100
+ * Note: 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.
101
+ */
82
102
  subscription?: Recurrence;
83
- /** One time payment, plan is valid for the specified duration. */
103
+ /** 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. */
84
104
  singlePaymentForDuration?: Duration;
85
- /** One time payment, plan is valid until it is canceled. */
105
+ /** Pricing model indicating the plan is paid in one single payment. The plan is valid until canceled. */
86
106
  singlePaymentUnlimited?: boolean | null;
87
107
  }
88
108
  /** @oneof */
@@ -96,24 +116,25 @@ export interface PricingPricingModelOneOf {
96
116
  }
97
117
  /** An object specifying how often and for how long payments recur (may be forever). */
98
118
  export interface Recurrence {
99
- /** Length of one payment cycle. */
119
+ /** Length of one payment cycle. For example, 1 month to have monthly payments. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. Currently, only a value of `1` is supported. */
100
120
  cycleDuration?: Duration;
101
121
  /**
102
- * Amount of payment cycles this subscription is valid for.
122
+ * Amount of payment cycles the subscription is valid for.
103
123
  *
104
- * `0` for unlimited or until-canceled.
124
+ * `0` for unlimited plans or for plans that are valid until canceled.
105
125
  */
106
126
  cycleCount?: number | null;
107
127
  }
108
128
  /** A duration expressed in number of time units. */
109
129
  export interface Duration {
130
+ /** Number of days days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
131
+ count?: number | null;
110
132
  /**
111
- * The amount of a duration `unit` in a single payment cycle.
133
+ * Unit of time for the cycle duration.
134
+ *
135
+ * Supported values: `"DAY"`, `"WEEK"`, `"MONTH"`, `"YEAR"`.
112
136
  *
113
- * Currently limited to support only `1`.
114
137
  */
115
- count?: number | null;
116
- /** Unit of time for the cycle duration. */
117
138
  unit?: PeriodUnit;
118
139
  }
119
140
  export declare enum PeriodUnit {
@@ -124,26 +145,37 @@ export declare enum PeriodUnit {
124
145
  YEAR = "YEAR"
125
146
  }
126
147
  export interface Money {
127
- /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). */
148
+ /** Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Cannot be a negative value. */
128
149
  value?: string;
129
- /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
150
+ /**
151
+ * Currency code. Three-letter currency code in
152
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`.
153
+ */
130
154
  currency?: string;
131
155
  }
132
156
  export interface BuyerCanCancelUpdated {
133
157
  plan?: Plan;
134
158
  }
135
159
  export interface ListPublicPlansRequest {
136
- /** Number of items to list. Defaults to 75. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
160
+ /**
161
+ * Number of pricing plans to list.
162
+ *
163
+ * Default: `75`.
164
+ */
137
165
  limit?: number | null;
138
- /** Number of items to skip. Defaults to 0. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
166
+ /**
167
+ * Number of pricing plans to skip.
168
+ *
169
+ * Default: `0`.
170
+ */
139
171
  offset?: number | null;
140
- /** IDs of plans to list. Non-existent IDs will be ignored and won't cause errors. You can pass a maximum of 100 IDs. */
172
+ /** IDs of public plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public are listed according to the [order](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
141
173
  planIds?: string[];
142
174
  }
143
175
  export interface ListPublicPlansResponse {
144
176
  /** List of public pricing plans. */
145
177
  plans?: PublicPlan[];
146
- /** Object containing paging-related data (number of plans returned, offset). */
178
+ /** Details on the paged set of public pricing plans returned. */
147
179
  pagingMetadata?: PagingMetadataV2;
148
180
  }
149
181
  /** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
@@ -234,19 +266,40 @@ export interface GetPlanRequest {
234
266
  _id: string;
235
267
  }
236
268
  export interface GetPlanResponse {
237
- /** Pricing plan. */
269
+ /** Pricing plan info. */
238
270
  plan?: Plan;
239
271
  }
240
272
  export interface ListPlansRequest {
241
- /** Archived filter. Defaults to ACTIVE (not archived) only. */
273
+ /**
274
+ * Archived filter.
275
+ *
276
+ * Supported values: `"ACTIVE"`, `"ARCHIVED"`, `"ARCHIVED_AND_ACTIVE"`.
277
+ *
278
+ * Default: `"ACTIVE"` (not archived).
279
+ */
242
280
  archived?: ArchivedFilter;
243
- /** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
281
+ /**
282
+ * Visibility filter.
283
+ *
284
+ * Supported values: `"PUBLIC_AND_HIDDEN"`, `"PUBLIC"`, `"HIDDEN"`.
285
+ *
286
+ * Default: `"PUBLIC_AND_HIDDEN"` (meaning, both public and hidden plans are listed).
287
+ *
288
+ */
244
289
  public?: PublicFilter;
245
- /** Number of pricing plans to list. Defaults to 75. */
290
+ /**
291
+ * Number of pricing plans to list.
292
+ *
293
+ * Default: `75`.
294
+ */
246
295
  limit?: number | null;
247
- /** Number of pricing plans to skip. Defaults to 0. */
296
+ /**
297
+ * Number of pricing plans to skip.
298
+ *
299
+ * Default: `0`.
300
+ */
248
301
  offset?: number | null;
249
- /** Plan ID filter. Non-existent IDs are ignored, and won't cause errors. You can pass a maximum of 100 IDs. */
302
+ /** 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 (based on `options`) are listed according to the [order](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
250
303
  planIds?: string[];
251
304
  }
252
305
  export declare enum ArchivedFilter {
@@ -268,7 +321,7 @@ export declare enum PublicFilter {
268
321
  export interface ListPlansResponse {
269
322
  /** List of all public and hidden pricing plans. */
270
323
  plans?: Plan[];
271
- /** Object containing paging-related data (number of plans returned, offset). */
324
+ /** Details on the paged set of pricing plans returned. */
272
325
  pagingMetadata?: PagingMetadataV2;
273
326
  }
274
327
  export interface GetPlanStatsRequest {
@@ -278,29 +331,38 @@ export interface GetPlanStatsResponse {
278
331
  totalPlans?: number;
279
332
  }
280
333
  export interface CreatePlanRequest {
334
+ /** Information for the plan being created. */
281
335
  plan: Plan;
282
336
  }
283
337
  export interface CreatePlanResponse {
338
+ /** Plan info. */
284
339
  plan?: Plan;
285
340
  }
286
341
  export interface UpdatePlanRequest {
342
+ /** Plan info to update. */
287
343
  plan?: Plan;
288
344
  fieldMask?: string[];
289
345
  }
290
346
  export interface UpdatePlanResponse {
347
+ /** Updated plan info. */
291
348
  plan?: Plan;
292
349
  }
293
350
  export interface SetPlanVisibilityRequest {
351
+ /** The ID of the plan to either display or hide on the site page. */
294
352
  _id: string;
353
+ /** Whether to set the plan as visible. */
295
354
  visible?: boolean;
296
355
  }
297
356
  export interface SetPlanVisibilityResponse {
357
+ /** Plan info. */
298
358
  plan?: Plan;
299
359
  }
300
360
  export interface MakePlanPrimaryRequest {
361
+ /** ID of the pricing plan to set as the primary plan. */
301
362
  _id: string;
302
363
  }
303
364
  export interface MakePlanPrimaryResponse {
365
+ /** Primary plan info. */
304
366
  plan?: Plan;
305
367
  }
306
368
  export interface ClearPrimaryRequest {
@@ -311,6 +373,7 @@ export interface ArchivePlanRequest {
311
373
  _id: string;
312
374
  }
313
375
  export interface ArchivePlanResponse {
376
+ /** Archived plan info. */
314
377
  plan?: Plan;
315
378
  }
316
379
  export interface PlanArchived {
@@ -357,92 +420,192 @@ export interface BulkActionMetadata {
357
420
  undetailedFailures?: number;
358
421
  }
359
422
  export interface ArrangePlansRequest {
423
+ /** IDs of all non-archived plans in the order you want them arranged. */
360
424
  ids?: string[];
361
425
  }
362
426
  export interface ArrangePlansResponse {
363
427
  }
364
428
  /**
365
- * Retrieves a list of up to 100 public pricing plans.
429
+ * Retrieves a list of public pricing plans.
430
+ *
431
+ *
432
+ * The `listPublicPlans()` function returns a Promise that resolves to a list of up to 100 public pricing plans. Public plans are visible plans that site visitors can see on the site and purchase.
433
+ *
434
+ * You do not need "Manage Pricing Plans" permissions to list public plans.
366
435
  * @public
367
436
  * @documentationMaturity preview
437
+ * @param options - Options for filtering and paging the list of public plans.
438
+ * @returns Fulfilled - List of public pricing plans.
368
439
  */
369
440
  export declare function listPublicPlans(options?: ListPublicPlansOptions): Promise<ListPublicPlansResponse>;
370
441
  export interface ListPublicPlansOptions {
371
- /** Number of items to list. Defaults to 75. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
442
+ /**
443
+ * Number of pricing plans to list.
444
+ *
445
+ * Default: `75`.
446
+ */
372
447
  limit?: number | null;
373
- /** Number of items to skip. Defaults to 0. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
448
+ /**
449
+ * Number of pricing plans to skip.
450
+ *
451
+ * Default: `0`.
452
+ */
374
453
  offset?: number | null;
375
- /** IDs of plans to list. Non-existent IDs will be ignored and won't cause errors. You can pass a maximum of 100 IDs. */
454
+ /** IDs of public plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public are listed according to the [order](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
376
455
  planIds?: string[];
377
456
  }
378
457
  /**
379
- * Retrieves a list of up to 1,000 public pricing plans, given the provided pagination, [sorting, and filtering](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort).
458
+ * Creates a query to retrieve a list of public pricing plans.
459
+ *
460
+ *
461
+ * The `queryPublicPlans()` function builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/publicplansquerybuilder) object.
462
+ *
463
+ * The returned object contains the query definition which is typically used to run the query using the [`find()`]() function.
464
+ *
465
+ * You can refine the query by chaining `PublicPlansQueryBuilder` functions onto the query. `PublicPlansQueryBuilder` functions enable you to sort, filter, and control the results that `queryPublicPlans()` returns.
466
+ *
467
+ * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:
468
+ * - [`skip`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/publicplansquerybuilder/skip): `0`
469
+ * - [`limit`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/publicplansquerybuilder/limit): `50`
470
+ *
471
+ * The functions 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.
472
+ *
473
+ * The following `PublicPlansQueryBuilder` functions are supported for the `queryPublicPlans()` function. For a full description of the Plans object, see the object returned for the [`items`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/publicplansqueryresult/items) property in [`PublicPlansQueryResult`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/publicplansqueryresult).
380
474
  * @public
381
475
  * @documentationMaturity preview
476
+ * @returns Fulfilled - The query definition used to run the query using the [`find()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/publicplansquerybuilder/find) function.
382
477
  */
383
478
  export declare function queryPublicPlans(options?: QueryPublicPlansOptions): Promise<QueryPublicPlansResponse>;
384
479
  export interface QueryPublicPlansOptions {
385
480
  query?: QueryV2;
386
481
  }
387
482
  /**
388
- * Retrieves a pricing plan by ID.
483
+ * Retrieves a pricing plan by the specified ID.
484
+ *
485
+ *
486
+ * The `getPlan()` function returns a Promise that resolves to a plan whose ID matched the specified ID.
487
+ *
488
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can get plans.
389
489
  * @param _id - Plan ID.
390
490
  * @public
391
491
  * @documentationMaturity preview
392
492
  * @requiredField _id
493
+ * @returns Fulfilled - The retrieved plan's information.
393
494
  */
394
495
  export declare function getPlan(_id: string): Promise<GetPlanResponse>;
395
496
  /**
396
- * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).
497
+ * Retrieves a list of pricing plans.
498
+ *
499
+ *
500
+ * The `listPlans()` function returns a Promise that resolves to a list of up to 100 pricing plans. This includes public, hidden, and archived plans.
501
+ *
502
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can use this function to list plans.
397
503
  * @public
398
504
  * @documentationMaturity preview
505
+ * @param options - Options for filtering and paging the list of plans.
506
+ * @returns Fulfilled - List of plans that match the given criteria.
399
507
  */
400
508
  export declare function listPlans(options?: ListPlansOptions): Promise<ListPlansResponse>;
401
509
  export interface ListPlansOptions {
402
- /** Archived filter. Defaults to ACTIVE (not archived) only. */
510
+ /**
511
+ * Archived filter.
512
+ *
513
+ * Supported values: `"ACTIVE"`, `"ARCHIVED"`, `"ARCHIVED_AND_ACTIVE"`.
514
+ *
515
+ * Default: `"ACTIVE"` (not archived).
516
+ */
403
517
  archived?: ArchivedFilter;
404
- /** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
518
+ /**
519
+ * Visibility filter.
520
+ *
521
+ * Supported values: `"PUBLIC_AND_HIDDEN"`, `"PUBLIC"`, `"HIDDEN"`.
522
+ *
523
+ * Default: `"PUBLIC_AND_HIDDEN"` (meaning, both public and hidden plans are listed).
524
+ *
525
+ */
405
526
  public?: PublicFilter;
406
- /** Number of pricing plans to list. Defaults to 75. */
527
+ /**
528
+ * Number of pricing plans to list.
529
+ *
530
+ * Default: `75`.
531
+ */
407
532
  limit?: number | null;
408
- /** Number of pricing plans to skip. Defaults to 0. */
533
+ /**
534
+ * Number of pricing plans to skip.
535
+ *
536
+ * Default: `0`.
537
+ */
409
538
  offset?: number | null;
410
- /** Plan ID filter. Non-existent IDs are ignored, and won't cause errors. You can pass a maximum of 100 IDs. */
539
+ /** 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 (based on `options`) are listed according to the [order](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
411
540
  planIds?: string[];
412
541
  }
413
542
  /**
414
- * Gets statistics about the pricing plans. Currently providing only the total number of pricing plans.
543
+ * Retrieves statistics about the pricing plans.
544
+ *
545
+ *
546
+ * The `getPlanStats()` function returns a Promise that resolves to statistics about the plan on the site.
547
+ *
548
+ * Currently this function provides only the total number of pricing plans, including archived plans.
549
+ *
550
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can get plan statistics.
415
551
  * @public
416
552
  * @documentationMaturity preview
553
+ * @returns Fulfilled - Overall statistics about the pricing plans.
417
554
  */
418
555
  export declare function getPlanStats(): Promise<GetPlanStatsResponse>;
419
556
  /**
420
557
  * Creates a pricing plan.
558
+ *
559
+ *
560
+ * The `createPlan()` function returns a Promise that resolves to a newly-created pricing plan after is has successfully been created.
561
+ *
562
+ * The passed `plan` object must contain a [pricing model](#link to intro). A pricing model can be one of the following:
563
+ * - **A subscription**: A subscription with recurring payment and how often the plan occurs. Subscriptions can have free trial days.
564
+ * - **A plan that does not renew**: A single payment for a specific duration that doesn't renew.
565
+ * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).
566
+ *
567
+ * Pricing plans created by this function are available to the site owner in the Pricing Plans section in the Dashboard.
568
+ *
569
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can create plans.
421
570
  * @public
422
571
  * @documentationMaturity preview
423
572
  * @requiredField plan
424
573
  * @requiredField plan.name
425
574
  * @requiredField plan.pricing
426
- * @requiredField plan.pricing
427
575
  * @requiredField plan.pricing.singlePaymentForDuration.count
428
576
  * @requiredField plan.pricing.subscription.cycleCount
429
577
  * @requiredField plan.pricing.subscription.cycleDuration
430
578
  * @requiredField plan.pricing.subscription.cycleDuration.count
579
+ * @param plan - Information for the plan being created.
580
+ * @returns Fulfilled - The created plan.
581
+ *
582
+ * Rejected - Error message.
431
583
  */
432
584
  export declare function createPlan(plan: Plan): Promise<CreatePlanResponse>;
433
585
  /**
434
586
  * Updates a pricing plan.
435
- * Updating a plan does not impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.
436
- * @param _id - Plan ID.
587
+ *
588
+ *
589
+ * The `updatePlan()` function returns a Promise that resolves to an updated plan.
590
+ *
591
+ * Updating a plan does not impact existing purchases made for the plan. All purchases keep the details of the original plan that was active at the time of the purchase.
592
+ *
593
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can update plans.
437
594
  * @public
438
595
  * @documentationMaturity preview
439
596
  * @requiredField _id
597
+ * @param _id - ID of the plan to update.
598
+ * @param options - Options for updating the plan.
599
+ * @returns Fulfilled - The updated plan.
600
+ *
601
+ * Rejected - Error message.
440
602
  */
441
603
  export declare function updatePlan(_id: string, options?: UpdatePlanOptions): Promise<UpdatePlanResponse>;
442
604
  export interface UpdatePlanOptions {
605
+ /** Plan info to update. */
443
606
  plan: {
444
607
  /**
445
- * Plan ID.
608
+ * ID of the plan to update.
446
609
  * @readonly
447
610
  */
448
611
  _id?: string;
@@ -450,7 +613,7 @@ export interface UpdatePlanOptions {
450
613
  name?: string | null;
451
614
  /** Plan description. */
452
615
  description?: string | null;
453
- /** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
616
+ /** List of text strings that promote the pricing plan. For example, "Plenty of parking" or "Free gift on your birthday". */
454
617
  perks?: StringList;
455
618
  /** Plan price, payment schedule, and expiration. */
456
619
  pricing?: Pricing;
@@ -462,7 +625,9 @@ export interface UpdatePlanOptions {
462
625
  */
463
626
  archived?: boolean;
464
627
  /**
465
- * Whether the plan is marked as primary.
628
+ * Whether the plan is marked as primary. If `true`, the plan is highlighted on the site with a custom ribbon.
629
+ *
630
+ * Default: `false`.
466
631
  * @readonly
467
632
  */
468
633
  primary?: boolean;
@@ -492,9 +657,18 @@ export interface UpdatePlanOptions {
492
657
  * - Value of `1`, meaning limited to one purchase per buyer.
493
658
  */
494
659
  maxPurchasesPerBuyer?: number | null;
495
- /** Whether the buyer can start the plan at a later date. Defaults to false. */
660
+ /**
661
+ * Whether the buyer can start the plan at a later date.
662
+ *
663
+ * Default: `false`.
664
+ */
496
665
  allowFutureStartDate?: boolean | null;
497
- /** Whether the buyer is allowed to cancel their plan. Defaults to false. */
666
+ /**
667
+ * Whether the buyer is allowed to cancel their plan.
668
+ *
669
+ * Default: `false`.
670
+ *
671
+ */
498
672
  buyerCanCancel?: boolean | null;
499
673
  /** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
500
674
  termsAndConditions?: string | null;
@@ -505,50 +679,106 @@ export interface UpdatePlanOptions {
505
679
  fieldMask?: string[];
506
680
  }
507
681
  /**
508
- * Sets visibility for pricing plans. Visible plans are considered public plans.
509
- * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors cannot choose them.
510
- * 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 cannot be made active again.)
511
- * Changing a plan’s visibility does not impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.
682
+ * Sets visibility for non-archived pricing plans.
683
+ *
684
+ * The `setPlanVisibility()` functions returns a Promise that resolves to a pricing plan when its visibility has successfully been set.
685
+ *
686
+ * By default, pricing plans are public, meaning they are visible. [Plans can be hidden](https://support.wix.com/en/article/pricing-plans-removing-a-plan-from-your-site#hiding-plans) so that site members and visitors cannot see or choose them.
687
+ *
688
+ * 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).
689
+ *
690
+ * >**Note:** An archived plan always remains archived and cannot be made active again. When archiving a plan, its `public` property is automatically set to `false` so that it is hidden.
691
+ *
692
+ * Changing a plan's visibility does not impact existing orders for the plan. All orders for hidden plans are still active and keep their terms and payment options.
693
+ *
694
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can change a plans visibility.
512
695
  * @public
513
696
  * @documentationMaturity preview
514
697
  * @requiredField _id
698
+ * @param _id - The ID of the plan to either display or hide on the site page.
699
+ * @param options - Plan visibility options.
700
+ * @returns Fulfilled - The plan's information.
701
+ *
702
+ * Rejected - Error message.
515
703
  */
516
704
  export declare function setPlanVisibility(_id: string, options?: SetPlanVisibilityOptions): Promise<SetPlanVisibilityResponse>;
517
705
  export interface SetPlanVisibilityOptions {
706
+ /** Whether to set the plan as visible. */
518
707
  visible?: boolean;
519
708
  }
520
709
  /**
521
- * Marks a pricing plan as the primary pricing plan. When viewing pricing plans on the site, the primary plan is highlighted with a customizable ribbon.
710
+ * Marks a pricing plan as the primary pricing plan.
711
+ *
712
+ *
713
+ * The `makePlanPrimary()` function returns a Promise that resolves to the now primary pricing plan.
714
+ *
715
+ * 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 `makePlanPrimary()` causes the existing primary plan to lose its primary status.
716
+ *
717
+ * When viewing pricing plans on the site, the primary plan is highlighted with a customizable ribbon.
718
+ *
719
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can mark a plan as a primary plan.
522
720
  * @public
523
721
  * @documentationMaturity preview
524
722
  * @requiredField _id
723
+ * @param _id - ID of the pricing plan to set as the primary plan.
724
+ * @returns Fulfilled - The primary plan.
525
725
  */
526
726
  export declare function makePlanPrimary(_id: string): Promise<MakePlanPrimaryResponse>;
527
727
  /**
528
- * Sets all pricing plans as not primary. When viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
728
+ * Sets all pricing plans to no longer be primary.
729
+ *
730
+ * The `clearPrimary()` function returns a Promise that is resolved when there are no pricing plans marked as `primary`.
731
+ *
732
+ * After clearing the primary plan, when viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
733
+ *
734
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can clear the primary plan.
529
735
  * @public
530
736
  * @documentationMaturity preview
531
737
  */
532
738
  export declare function clearPrimary(): Promise<void>;
533
739
  /**
534
740
  * Archives a single plan.
535
- * When a plan is archived, it is no longer visible as a public plan that can be chosen by site members or visitors. Archived plans cannot be purchased.
536
- * An archived plan cannot be made active again.
537
- * Plan archiving does not impact existing orders made for the plan. All orders for the plan are still active and keep their perks.
538
- * Site owners can see archived plans in the Dashboard under Pricing Plans -> Archived Plans.
741
+ *
742
+ *
743
+ * The `archivePlan()` function returns a Promise that resolves to the newly-archived plan.
744
+ *
745
+ * When a plan is archived, the plan
746
+ * - Is no longer available for display or selection by visitors. This is because the plan's `public` property is automatically set to `false`.
747
+ * - Cannot be purchased.
748
+ * - Cannot be "un-archived", meaning the plan cannot be made active again.
749
+ *
750
+ * Plan archiving does not impact existing purchases made for the plan. All purchases for the plan are still active and keep their payment options and terms.
751
+ *
752
+ * Site owners can see archived plans in the Dashboard under **Pricing Plans -> Archived Plans**.
753
+ *
754
+ * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can archive plans.
755
+ *
756
+ * >**Note:** An attempt to archive an already-archived plan throws an error.
539
757
  * @public
540
758
  * @documentationMaturity preview
541
759
  * @requiredField _id
760
+ * @param _id - ID of the active plan to archive.
761
+ * @returns Fulfilled - The archived plan.
762
+ *
763
+ * Rejected - Error message.
542
764
  */
543
765
  export declare function archivePlan(_id: string): Promise<ArchivePlanResponse>;
544
766
  /**
545
- * Changes the display order of the plans on the site. To rearrange the order of the plans, provide a list of plan IDs in the desired order.
546
- * Include all public and hidden plans in the list you provide.
547
- * Make sure to provide all non-archived plan IDs to avoid unpredictable results
767
+ * Changes the display order of the pricing plans on the site page and in the Dashboard.
768
+ *
769
+ *
770
+ * The `arrangePlans()` function returns a Promise that resolves when the plans are rearranged on the site page and in the Dashboard.
771
+ *
772
+ * To rearrange the order of the plans, provide a list of the IDs for all non-archived plans in the desired order, including hidden plans.
773
+ *
774
+ * Only users with "Managing Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can arrange plans.
775
+ *
776
+ * >**Note:** Make sure to provide *all* non-archived plan IDs to avoid unpredictable results.
548
777
  * @public
549
778
  * @documentationMaturity preview
550
779
  */
551
780
  export declare function arrangePlans(options?: ArrangePlansOptions): Promise<void>;
552
781
  export interface ArrangePlansOptions {
782
+ /** IDs of all non-archived plans in the order you want them arranged. */
553
783
  ids?: string[];
554
784
  }