@wix/pricing-plans 1.0.9 → 1.0.11

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.
Files changed (37) hide show
  1. package/build/cjs/src/pricing-plans-v2-order.public.d.ts +6 -6
  2. package/build/cjs/src/pricing-plans-v2-order.public.js +3 -3
  3. package/build/cjs/src/pricing-plans-v2-order.public.js.map +1 -1
  4. package/build/cjs/src/pricing-plans-v2-order.types.d.ts +3 -3
  5. package/build/cjs/src/pricing-plans-v2-order.universal.d.ts +21 -36
  6. package/build/cjs/src/pricing-plans-v2-order.universal.js +27 -13
  7. package/build/cjs/src/pricing-plans-v2-order.universal.js.map +1 -1
  8. package/build/cjs/src/pricing-plans-v2-plan.http.d.ts +5 -27
  9. package/build/cjs/src/pricing-plans-v2-plan.http.js +5 -27
  10. package/build/cjs/src/pricing-plans-v2-plan.http.js.map +1 -1
  11. package/build/cjs/src/pricing-plans-v2-plan.public.d.ts +8 -8
  12. package/build/cjs/src/pricing-plans-v2-plan.public.js +4 -4
  13. package/build/cjs/src/pricing-plans-v2-plan.public.js.map +1 -1
  14. package/build/cjs/src/pricing-plans-v2-plan.types.d.ts +3 -6
  15. package/build/cjs/src/pricing-plans-v2-plan.types.js.map +1 -1
  16. package/build/cjs/src/pricing-plans-v2-plan.universal.d.ts +154 -145
  17. package/build/cjs/src/pricing-plans-v2-plan.universal.js +80 -101
  18. package/build/cjs/src/pricing-plans-v2-plan.universal.js.map +1 -1
  19. package/build/es/src/pricing-plans-v2-order.public.d.ts +6 -6
  20. package/build/es/src/pricing-plans-v2-order.public.js +3 -3
  21. package/build/es/src/pricing-plans-v2-order.public.js.map +1 -1
  22. package/build/es/src/pricing-plans-v2-order.types.d.ts +3 -3
  23. package/build/es/src/pricing-plans-v2-order.universal.d.ts +21 -36
  24. package/build/es/src/pricing-plans-v2-order.universal.js +27 -13
  25. package/build/es/src/pricing-plans-v2-order.universal.js.map +1 -1
  26. package/build/es/src/pricing-plans-v2-plan.http.d.ts +5 -27
  27. package/build/es/src/pricing-plans-v2-plan.http.js +5 -27
  28. package/build/es/src/pricing-plans-v2-plan.http.js.map +1 -1
  29. package/build/es/src/pricing-plans-v2-plan.public.d.ts +8 -8
  30. package/build/es/src/pricing-plans-v2-plan.public.js +4 -4
  31. package/build/es/src/pricing-plans-v2-plan.public.js.map +1 -1
  32. package/build/es/src/pricing-plans-v2-plan.types.d.ts +3 -6
  33. package/build/es/src/pricing-plans-v2-plan.types.js.map +1 -1
  34. package/build/es/src/pricing-plans-v2-plan.universal.d.ts +154 -145
  35. package/build/es/src/pricing-plans-v2-plan.universal.js +81 -102
  36. package/build/es/src/pricing-plans-v2-plan.universal.js.map +1 -1
  37. package/package.json +2 -2
@@ -71,7 +71,7 @@ export interface Plan {
71
71
  */
72
72
  allowFutureStartDate?: boolean | null;
73
73
  /**
74
- * Whether the buyer is allowed to cancel their plan. If `false`, calling the `cancelOrder()` function returns an error.
74
+ * Whether the buyer is allowed to cancel their plan. If `false`, calling the [`cancelOrder()`](#cancelorder) function returns an error.
75
75
  *
76
76
  * Default: `false`.
77
77
  *
@@ -79,9 +79,6 @@ export interface Plan {
79
79
  buyerCanCancel?: boolean | null;
80
80
  /** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
81
81
  termsAndConditions?: string | null;
82
- clientData?: Record<string, string>;
83
- /** Reference to a form which is shown in checkout to gather additional data */
84
- formId?: string | null;
85
82
  }
86
83
  /** This wrapper type exist in order to distinguish an empty string list from no list at all in update requests. */
87
84
  export interface StringList {
@@ -169,7 +166,7 @@ export interface ListPublicPlansRequest {
169
166
  * Default: `0`.
170
167
  */
171
168
  offset?: number | null;
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. */
169
+ /** 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](#arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
173
170
  planIds?: string[];
174
171
  }
175
172
  export interface ListPublicPlansResponse {
@@ -206,6 +203,7 @@ export interface PublicPlan {
206
203
  buyerCanCancel?: boolean | null;
207
204
  /** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
208
205
  termsAndConditions?: string | null;
206
+ /** Reserved for internal use. */
209
207
  clientData?: Record<string, string>;
210
208
  /** Reference to a form which is shown in checkout to gather additional data */
211
209
  formId?: string | null;
@@ -299,7 +297,7 @@ export interface ListPlansRequest {
299
297
  * Default: `0`.
300
298
  */
301
299
  offset?: number | null;
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. */
300
+ /** 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](#arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
303
301
  planIds?: string[];
304
302
  }
305
303
  export declare enum ArchivedFilter {
@@ -340,7 +338,7 @@ export interface CreatePlanResponse {
340
338
  }
341
339
  export interface UpdatePlanRequest {
342
340
  /** Plan info to update. */
343
- plan?: Plan;
341
+ plan: Plan;
344
342
  fieldMask?: string[];
345
343
  }
346
344
  export interface UpdatePlanResponse {
@@ -351,7 +349,7 @@ export interface SetPlanVisibilityRequest {
351
349
  /** The ID of the plan to either display or hide on the site page. */
352
350
  _id: string;
353
351
  /** Whether to set the plan as visible. */
354
- visible?: boolean;
352
+ visible: boolean;
355
353
  }
356
354
  export interface SetPlanVisibilityResponse {
357
355
  /** Plan info. */
@@ -421,7 +419,7 @@ export interface BulkActionMetadata {
421
419
  }
422
420
  export interface ArrangePlansRequest {
423
421
  /** IDs of all non-archived plans in the order you want them arranged. */
424
- ids?: string[];
422
+ ids: string[];
425
423
  }
426
424
  export interface ArrangePlansResponse {
427
425
  }
@@ -430,10 +428,7 @@ export interface ArrangePlansResponse {
430
428
  *
431
429
  *
432
430
  * 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.
435
431
  * @public
436
- * @documentationMaturity preview
437
432
  * @param options - Options for filtering and paging the list of public plans.
438
433
  * @returns Fulfilled - List of public pricing plans.
439
434
  */
@@ -451,55 +446,95 @@ export interface ListPublicPlansOptions {
451
446
  * Default: `0`.
452
447
  */
453
448
  offset?: number | null;
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. */
449
+ /** 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](#arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
455
450
  planIds?: string[];
456
451
  }
457
452
  /**
458
453
  * Creates a query to retrieve a list of public pricing plans.
459
454
  *
460
455
  *
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.
456
+ * The `queryPublicPlans()` function builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#publicplansquerybuilder) object.
462
457
  *
463
- * The returned object contains the query definition which is typically used to run the query using the [`find()`]() function.
458
+ * The returned object contains the query definition which is typically used to run the query using the [`find()`](#find) function.
464
459
  *
465
460
  * 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
461
  *
467
462
  * `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`
463
+ * - [`skip`](#skip): `0`
464
+ * - [`limit`](#limit): `50`
470
465
  *
471
466
  * 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
467
  *
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).
474
- * @public
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.
477
- */
478
- export declare function queryPublicPlans(options?: QueryPublicPlansOptions): Promise<QueryPublicPlansResponse>;
479
- export interface QueryPublicPlansOptions {
480
- query?: QueryV2;
468
+ * 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`](#items) property in [`PublicPlansQueryResult`](#publicplansqueryresult).
469
+ * @public */
470
+ export declare function queryPublicPlans(): PlansQueryBuilder;
471
+ interface QueryOffsetResult {
472
+ currentPage: number;
473
+ totalPages: number;
474
+ totalCount: number;
475
+ hasNext: () => boolean;
476
+ hasPrev: () => boolean;
477
+ length: number;
478
+ pageSize: number;
479
+ }
480
+ export interface PlansQueryResult extends QueryOffsetResult {
481
+ items: PublicPlan[];
482
+ query: PlansQueryBuilder;
483
+ next: () => Promise<PlansQueryResult>;
484
+ prev: () => Promise<PlansQueryResult>;
485
+ }
486
+ export interface PlansQueryBuilder {
487
+ /** @param propertyName - Property whose value is compared with `value`.
488
+ * @param value - Value to compare against.
489
+ */
490
+ eq: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any) => PlansQueryBuilder;
491
+ /** @param propertyName - Property whose value is compared with `value`.
492
+ * @param value - Value to compare against.
493
+ */
494
+ ne: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any) => PlansQueryBuilder;
495
+ /** @param propertyName - Property whose value is compared with `value`.
496
+ * @param value - Value to compare against.
497
+ */
498
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => PlansQueryBuilder;
499
+ /** @param propertyName - Property whose value is compared with `value`.
500
+ * @param value - Value to compare against.
501
+ */
502
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => PlansQueryBuilder;
503
+ /** @param propertyName - Property whose value is compared with `string`.
504
+ * @param string - String to compare against. Case-insensitive.
505
+ */
506
+ startsWith: (propertyName: '_id' | 'slug', value: string) => PlansQueryBuilder;
507
+ /** @param propertyName - Property whose value is compared with `values`.
508
+ * @param values - List of values to compare against.
509
+ */
510
+ hasSome: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any[]) => PlansQueryBuilder;
511
+ in: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any) => PlansQueryBuilder;
512
+ exists: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: boolean) => PlansQueryBuilder;
513
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
514
+ ascending: (...propertyNames: Array<'_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'>) => PlansQueryBuilder;
515
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
516
+ descending: (...propertyNames: Array<'_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'>) => PlansQueryBuilder;
517
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
518
+ limit: (limit: number) => PlansQueryBuilder;
519
+ /** @param skip - Number of items to skip in the query results before returning the results. */
520
+ skip: (skip: number) => PlansQueryBuilder;
521
+ find: () => Promise<PlansQueryResult>;
481
522
  }
482
523
  /**
483
524
  * Retrieves a pricing plan by the specified ID.
484
525
  *
485
526
  * The `getPlan()` function returns a Promise that resolves to a plan whose ID matched the specified ID.
486
- *
487
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” permissions can use this function to get a plan.
488
527
  * @param _id - Plan ID.
489
528
  * @public
490
- * @documentationMaturity preview
491
529
  * @requiredField _id
492
530
  * @returns Fulfilled - The retrieved plan's information.
493
531
  */
494
- export declare function getPlan(_id: string): Promise<GetPlanResponse>;
532
+ export declare function getPlan(_id: string): Promise<Plan>;
495
533
  /**
496
534
  * Retrieves a list of pricing plans.
497
535
  *
498
536
  * The `listPlans()` function returns a Promise that resolves to a list of up to 100 pricing plans. This includes public, hidden, and archived plans.
499
- *
500
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” permissions can use this function to list plans.
501
537
  * @public
502
- * @documentationMaturity preview
503
538
  * @param options - Options for filtering and paging the list of plans.
504
539
  * @returns Fulfilled - List of plans that match the given criteria.
505
540
  */
@@ -534,7 +569,7 @@ export interface ListPlansOptions {
534
569
  * Default: `0`.
535
570
  */
536
571
  offset?: number | null;
537
- /** 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. */
572
+ /** 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](#arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
538
573
  planIds?: string[];
539
574
  }
540
575
  /**
@@ -544,10 +579,7 @@ export interface ListPlansOptions {
544
579
  * The `getPlanStats()` function returns a Promise that resolves to statistics about the plan on the site.
545
580
  *
546
581
  * Currently this function provides only the total number of pricing plans, including archived plans.
547
- *
548
- * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can get plan statistics.
549
582
  * @public
550
- * @documentationMaturity preview
551
583
  * @returns Fulfilled - Overall statistics about the pricing plans.
552
584
  */
553
585
  export declare function getPlanStats(): Promise<GetPlanStatsResponse>;
@@ -563,10 +595,7 @@ export declare function getPlanStats(): Promise<GetPlanStatsResponse>;
563
595
  * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).
564
596
  *
565
597
  * Pricing plans created by this function are available to the site owner in the Pricing Plans section in the Dashboard.
566
- *
567
- * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can create plans.
568
598
  * @public
569
- * @documentationMaturity preview
570
599
  * @requiredField plan
571
600
  * @requiredField plan.name
572
601
  * @requiredField plan.pricing
@@ -579,7 +608,7 @@ export declare function getPlanStats(): Promise<GetPlanStatsResponse>;
579
608
  *
580
609
  * Rejected - Error message.
581
610
  */
582
- export declare function createPlan(plan: Plan): Promise<CreatePlanResponse>;
611
+ export declare function createPlan(plan: Plan): Promise<Plan>;
583
612
  /**
584
613
  * Updates a pricing plan.
585
614
  *
@@ -587,93 +616,92 @@ export declare function createPlan(plan: Plan): Promise<CreatePlanResponse>;
587
616
  * The `updatePlan()` function returns a Promise that resolves to an updated plan.
588
617
  *
589
618
  * 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.
590
- *
591
- * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can update plans.
592
619
  * @public
593
- * @documentationMaturity preview
594
620
  * @requiredField _id
621
+ * @requiredField plan
595
622
  * @param _id - ID of the plan to update.
596
623
  * @param options - Options for updating the plan.
597
624
  * @returns Fulfilled - The updated plan.
598
625
  *
599
626
  * Rejected - Error message.
600
627
  */
601
- export declare function updatePlan(_id: string, options?: UpdatePlanOptions): Promise<UpdatePlanResponse>;
628
+ export declare function updatePlan(_id: string, plan: UpdatePlan, options?: UpdatePlanOptions): Promise<Plan>;
629
+ export interface UpdatePlan {
630
+ /**
631
+ * Plan ID.
632
+ * @readonly
633
+ */
634
+ _id?: string;
635
+ /** Plan name. */
636
+ name?: string | null;
637
+ /** Plan description. */
638
+ description?: string | null;
639
+ /**
640
+ * List of text strings that promote what is included with this plan.
641
+ *
642
+ * For example, "Plenty of parking" or "Free gift on your birthday".
643
+ */
644
+ perks?: StringList;
645
+ /** Plan price, payment schedule, and expiration. */
646
+ pricing?: Pricing;
647
+ /** Whether the plan is public (visible to site visitors and members). */
648
+ public?: boolean | null;
649
+ /**
650
+ * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.
651
+ * @readonly
652
+ */
653
+ archived?: boolean;
654
+ /**
655
+ * Whether the plan is marked as primary. If `true`, the plan is highlighted on the site with a custom ribbon.
656
+ *
657
+ * Default: `false`.
658
+ * @readonly
659
+ */
660
+ primary?: boolean;
661
+ /**
662
+ * Whether the plan has any orders (including pending and unpaid orders).
663
+ * @readonly
664
+ */
665
+ hasOrders?: boolean;
666
+ /**
667
+ * Date plan was created.
668
+ * @readonly
669
+ */
670
+ _createdDate?: Date;
671
+ /**
672
+ * Date plan was last updated.
673
+ * @readonly
674
+ */
675
+ _updatedDate?: Date;
676
+ /**
677
+ * URL-friendly version of plan name. Unique across all plans in the same site.
678
+ * @readonly
679
+ */
680
+ slug?: string | null;
681
+ /**
682
+ * Number of times the same buyer can purchase the plan. Currently limited to support:
683
+ * - Empty value or a value of `0`, meaning no limitation.
684
+ * - Value of `1`, meaning limited to one purchase per buyer.
685
+ */
686
+ maxPurchasesPerBuyer?: number | null;
687
+ /**
688
+ * Whether the buyer can start the plan at a later date.
689
+ *
690
+ * Default: `false`.
691
+ *
692
+ */
693
+ allowFutureStartDate?: boolean | null;
694
+ /**
695
+ * Whether the buyer is allowed to cancel their plan. If `false`, calling the [`cancelOrder()`](#cancelorder) function returns an error.
696
+ *
697
+ * Default: `false`.
698
+ *
699
+ */
700
+ buyerCanCancel?: boolean | null;
701
+ /** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
702
+ termsAndConditions?: string | null;
703
+ }
602
704
  export interface UpdatePlanOptions {
603
- /** Plan info to update. */
604
- plan: {
605
- /**
606
- * ID of the plan to update.
607
- * @readonly
608
- */
609
- _id?: string;
610
- /** Plan name. */
611
- name?: string | null;
612
- /** Plan description. */
613
- description?: string | null;
614
- /** List of text strings that promote the pricing plan. For example, "Plenty of parking" or "Free gift on your birthday". */
615
- perks?: StringList;
616
- /** Plan price, payment schedule, and expiration. */
617
- pricing?: Pricing;
618
- /** Whether the plan is public (visible to site visitors and members). */
619
- public?: boolean | null;
620
- /**
621
- * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.
622
- * @readonly
623
- */
624
- archived?: boolean;
625
- /**
626
- * Whether the plan is marked as primary. If `true`, the plan is highlighted on the site with a custom ribbon.
627
- *
628
- * Default: `false`.
629
- * @readonly
630
- */
631
- primary?: boolean;
632
- /**
633
- * Whether the plan has any orders (including pending and unpaid orders).
634
- * @readonly
635
- */
636
- hasOrders?: boolean;
637
- /**
638
- * Date plan was created.
639
- * @readonly
640
- */
641
- _createdDate?: Date;
642
- /**
643
- * Date plan was last updated.
644
- * @readonly
645
- */
646
- _updatedDate?: Date;
647
- /**
648
- * URL-friendly version of plan name. Unique across all plans in the same site.
649
- * @readonly
650
- */
651
- slug?: string | null;
652
- /**
653
- * Number of times the same buyer can purchase the plan. Currently limited to support:
654
- * - Empty value or a value of `0`, meaning no limitation.
655
- * - Value of `1`, meaning limited to one purchase per buyer.
656
- */
657
- maxPurchasesPerBuyer?: number | null;
658
- /**
659
- * Whether the buyer can start the plan at a later date.
660
- *
661
- * Default: `false`.
662
- */
663
- allowFutureStartDate?: boolean | null;
664
- /**
665
- * Whether the buyer is allowed to cancel their plan.
666
- *
667
- * Default: `false`.
668
- *
669
- */
670
- buyerCanCancel?: boolean | null;
671
- /** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
672
- termsAndConditions?: string | null;
673
- clientData?: Record<string, string>;
674
- /** Reference to a form which is shown in checkout to gather additional data */
675
- formId?: string | null;
676
- };
677
705
  fieldMask?: string[];
678
706
  }
679
707
  /**
@@ -688,22 +716,17 @@ export interface UpdatePlanOptions {
688
716
  * >**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.
689
717
  *
690
718
  * 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.
691
- *
692
- * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can change a plans visibility.
719
+ * @param visible - Whether to set the plan as visible.
693
720
  * @public
694
- * @documentationMaturity preview
695
721
  * @requiredField _id
722
+ * @requiredField visible
696
723
  * @param _id - The ID of the plan to either display or hide on the site page.
697
724
  * @param options - Plan visibility options.
698
725
  * @returns Fulfilled - The plan's information.
699
726
  *
700
727
  * Rejected - Error message.
701
728
  */
702
- export declare function setPlanVisibility(_id: string, options?: SetPlanVisibilityOptions): Promise<SetPlanVisibilityResponse>;
703
- export interface SetPlanVisibilityOptions {
704
- /** Whether to set the plan as visible. */
705
- visible?: boolean;
706
- }
729
+ export declare function setPlanVisibility(_id: string, visible: boolean): Promise<SetPlanVisibilityResponse>;
707
730
  /**
708
731
  * Marks a pricing plan as the primary pricing plan.
709
732
  *
@@ -713,10 +736,7 @@ export interface SetPlanVisibilityOptions {
713
736
  * 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.
714
737
  *
715
738
  * When viewing pricing plans on the site, the primary plan is highlighted with a customizable ribbon.
716
- *
717
- * 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.
718
739
  * @public
719
- * @documentationMaturity preview
720
740
  * @requiredField _id
721
741
  * @param _id - ID of the pricing plan to set as the primary plan.
722
742
  * @returns Fulfilled - The primary plan.
@@ -728,11 +748,7 @@ export declare function makePlanPrimary(_id: string): Promise<MakePlanPrimaryRes
728
748
  * The `clearPrimary()` function returns a Promise that is resolved when there are no pricing plans marked as `primary`.
729
749
  *
730
750
  * After clearing the primary plan, when viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
731
- *
732
- * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can clear the primary plan.
733
- * @public
734
- * @documentationMaturity preview
735
- */
751
+ * @public */
736
752
  export declare function clearPrimary(): Promise<void>;
737
753
  /**
738
754
  * Archives a single plan.
@@ -749,11 +765,8 @@ export declare function clearPrimary(): Promise<void>;
749
765
  *
750
766
  * Site owners can see archived plans in the Dashboard under **Pricing Plans -> Archived Plans**.
751
767
  *
752
- * Only users with "Manage Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can archive plans.
753
- *
754
768
  * >**Note:** An attempt to archive an already-archived plan throws an error.
755
769
  * @public
756
- * @documentationMaturity preview
757
770
  * @requiredField _id
758
771
  * @param _id - ID of the active plan to archive.
759
772
  * @returns Fulfilled - The archived plan.
@@ -769,14 +782,10 @@ export declare function archivePlan(_id: string): Promise<ArchivePlanResponse>;
769
782
  *
770
783
  * 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.
771
784
  *
772
- * Only users with "Managing Pricing Plans" [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can arrange plans.
773
- *
774
785
  * >**Note:** Make sure to provide *all* non-archived plan IDs to avoid unpredictable results.
786
+ * @param ids - IDs of all non-archived plans in the order you want them arranged.
775
787
  * @public
776
- * @documentationMaturity preview
788
+ * @requiredField ids
777
789
  */
778
- export declare function arrangePlans(options?: ArrangePlansOptions): Promise<void>;
779
- export interface ArrangePlansOptions {
780
- /** IDs of all non-archived plans in the order you want them arranged. */
781
- ids?: string[];
782
- }
790
+ export declare function arrangePlans(ids: string[]): Promise<void>;
791
+ export {};