@wix/pricing-plans 1.0.106 → 1.0.107
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.
- package/package.json +3 -3
- package/type-bundles/context.bundle.d.ts +87 -233
- package/type-bundles/index.bundle.d.ts +87 -233
- package/type-bundles/meta.bundle.d.ts +45 -86
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wix/pricing-plans",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.107",
|
4
4
|
"publishConfig": {
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
6
6
|
"access": "public"
|
@@ -22,7 +22,7 @@
|
|
22
22
|
],
|
23
23
|
"dependencies": {
|
24
24
|
"@wix/pricing-plans_orders": "1.0.49",
|
25
|
-
"@wix/pricing-plans_plans": "1.0.
|
25
|
+
"@wix/pricing-plans_plans": "1.0.49"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"glob": "^10.4.1",
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"fqdn": ""
|
48
48
|
}
|
49
49
|
},
|
50
|
-
"falconPackageHash": "
|
50
|
+
"falconPackageHash": "711f75048a0f3d070099b8467db45b775f38a9fbaa1bfa92dd61390a"
|
51
51
|
}
|
@@ -2677,11 +2677,7 @@ interface Plan {
|
|
2677
2677
|
name?: string | null;
|
2678
2678
|
/** Plan description. */
|
2679
2679
|
description?: string | null;
|
2680
|
-
/**
|
2681
|
-
* List of text strings that promote what is included with this plan.
|
2682
|
-
*
|
2683
|
-
* For example, "Plenty of parking" or "Free gift on your birthday".
|
2684
|
-
*/
|
2680
|
+
/** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
|
2685
2681
|
perks?: StringList;
|
2686
2682
|
/** Plan price, payment schedule, and expiration. */
|
2687
2683
|
pricing?: Pricing;
|
@@ -2693,9 +2689,7 @@ interface Plan {
|
|
2693
2689
|
*/
|
2694
2690
|
archived?: boolean;
|
2695
2691
|
/**
|
2696
|
-
* Whether the plan is marked as primary.
|
2697
|
-
*
|
2698
|
-
* Default: `false`.
|
2692
|
+
* Whether the plan is marked as primary.
|
2699
2693
|
* @readonly
|
2700
2694
|
*/
|
2701
2695
|
primary?: boolean;
|
@@ -2725,23 +2719,17 @@ interface Plan {
|
|
2725
2719
|
* - Value of `1`, meaning limited to one purchase per buyer.
|
2726
2720
|
*/
|
2727
2721
|
maxPurchasesPerBuyer?: number | null;
|
2728
|
-
/**
|
2729
|
-
* Whether the buyer can start the plan at a later date.
|
2730
|
-
*
|
2731
|
-
* Default: `false`.
|
2732
|
-
*
|
2733
|
-
*/
|
2722
|
+
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
2734
2723
|
allowFutureStartDate?: boolean | null;
|
2735
|
-
/**
|
2736
|
-
* Whether the buyer is allowed to cancel their plan. If `false`, calling the [`requestCancellation()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/requestcancellation) function returns an error.
|
2737
|
-
*
|
2738
|
-
* Default: `true`.
|
2739
|
-
*
|
2740
|
-
*/
|
2724
|
+
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
2741
2725
|
buyerCanCancel?: boolean | null;
|
2742
2726
|
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
2743
2727
|
termsAndConditions?: string | null;
|
2744
|
-
/**
|
2728
|
+
/**
|
2729
|
+
* ID of the form associated with the plan at checkout.
|
2730
|
+
*
|
2731
|
+
* Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
|
2732
|
+
*/
|
2745
2733
|
formId?: string | null;
|
2746
2734
|
}
|
2747
2735
|
/** This wrapper type exist in order to distinguish an empty string list from no list at all in update requests. */
|
@@ -2750,19 +2738,15 @@ interface StringList {
|
|
2750
2738
|
}
|
2751
2739
|
/** Plan pricing information. Includes the price of the plan and payment details. */
|
2752
2740
|
interface Pricing extends PricingPricingModelOneOf {
|
2753
|
-
/**
|
2754
|
-
* Pricing model indicating that the plan has recurring payments.
|
2755
|
-
*
|
2756
|
-
* 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.
|
2757
|
-
*/
|
2741
|
+
/** Plan has recurring payments. */
|
2758
2742
|
subscription?: Recurrence;
|
2759
|
-
/**
|
2743
|
+
/** One time payment, plan is valid for the specified duration. */
|
2760
2744
|
singlePaymentForDuration?: Duration;
|
2761
|
-
/**
|
2745
|
+
/** One time payment, plan is valid until it is canceled. */
|
2762
2746
|
singlePaymentUnlimited?: boolean | null;
|
2763
|
-
/** Amount for a single payment
|
2747
|
+
/** Amount for a single payment (or the whole subscription if it's not a recurring plan) */
|
2764
2748
|
price?: Money;
|
2765
|
-
/** Free trial period for the plan in days.
|
2749
|
+
/** Free trial period for the plan in days. It’s available only for recurring plans. Set to 0 to remove free trial. */
|
2766
2750
|
freeTrialDays?: number | null;
|
2767
2751
|
}
|
2768
2752
|
/** @oneof */
|
@@ -2776,18 +2760,18 @@ interface PricingPricingModelOneOf {
|
|
2776
2760
|
}
|
2777
2761
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
2778
2762
|
interface Recurrence {
|
2779
|
-
/** Length of one payment cycle.
|
2763
|
+
/** Length of one payment cycle. */
|
2780
2764
|
cycleDuration?: Duration;
|
2781
2765
|
/**
|
2782
|
-
* Amount of payment cycles
|
2766
|
+
* Amount of payment cycles this subscription is valid for.
|
2783
2767
|
*
|
2784
|
-
* `0` for unlimited
|
2768
|
+
* `0` for unlimited or until-canceled.
|
2785
2769
|
*/
|
2786
2770
|
cycleCount?: number | null;
|
2787
2771
|
}
|
2788
2772
|
/** A duration expressed in number of time units. */
|
2789
2773
|
interface Duration {
|
2790
|
-
/**
|
2774
|
+
/** The amount of a duration `unit` in a single payment cycle. */
|
2791
2775
|
count?: number | null;
|
2792
2776
|
/** Unit of time for the cycle duration. */
|
2793
2777
|
unit?: PeriodUnit;
|
@@ -2800,12 +2784,9 @@ declare enum PeriodUnit {
|
|
2800
2784
|
YEAR = "YEAR"
|
2801
2785
|
}
|
2802
2786
|
interface Money {
|
2803
|
-
/** Monetary amount. Decimal string with a period as a decimal separator.
|
2787
|
+
/** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). */
|
2804
2788
|
value?: string;
|
2805
|
-
/**
|
2806
|
-
* Currency code. Three-letter currency code in
|
2807
|
-
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`.
|
2808
|
-
*/
|
2789
|
+
/** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
|
2809
2790
|
currency?: string;
|
2810
2791
|
}
|
2811
2792
|
interface FeeConfig {
|
@@ -2826,25 +2807,17 @@ declare enum AppliedAt {
|
|
2826
2807
|
FIRST_PAYMENT = "FIRST_PAYMENT"
|
2827
2808
|
}
|
2828
2809
|
interface ListPublicPlansRequest {
|
2829
|
-
/**
|
2830
|
-
* Number of pricing plans to list.
|
2831
|
-
*
|
2832
|
-
* Default: `75`.
|
2833
|
-
*/
|
2810
|
+
/** Number of items to list. Defaults to 75. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
2834
2811
|
limit?: number | null;
|
2835
|
-
/**
|
2836
|
-
* Number of pricing plans to skip.
|
2837
|
-
*
|
2838
|
-
* Default: `0`.
|
2839
|
-
*/
|
2812
|
+
/** Number of items to skip. Defaults to 0. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
2840
2813
|
offset?: number | null;
|
2841
|
-
/** IDs of
|
2814
|
+
/** IDs of plans to list. Non-existent IDs will be ignored and won't cause errors. You can pass a maximum of 100 IDs. */
|
2842
2815
|
planIds?: string[];
|
2843
2816
|
}
|
2844
2817
|
interface ListPublicPlansResponse {
|
2845
2818
|
/** List of public pricing plans. */
|
2846
2819
|
plans?: PublicPlan[];
|
2847
|
-
/**
|
2820
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
2848
2821
|
pagingMetadata?: PagingMetadataV2;
|
2849
2822
|
}
|
2850
2823
|
/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
|
@@ -2875,7 +2848,11 @@ interface PublicPlan {
|
|
2875
2848
|
buyerCanCancel?: boolean | null;
|
2876
2849
|
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
2877
2850
|
termsAndConditions?: string | null;
|
2878
|
-
/**
|
2851
|
+
/**
|
2852
|
+
* ID of the form associated with the plan at checkout.
|
2853
|
+
*
|
2854
|
+
* Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
|
2855
|
+
*/
|
2879
2856
|
formId?: string | null;
|
2880
2857
|
}
|
2881
2858
|
interface PagingMetadataV2 {
|
@@ -2935,36 +2912,19 @@ interface GetPlanRequest {
|
|
2935
2912
|
_id: string;
|
2936
2913
|
}
|
2937
2914
|
interface GetPlanResponse {
|
2938
|
-
/** Pricing plan
|
2915
|
+
/** Pricing plan. */
|
2939
2916
|
plan?: Plan;
|
2940
2917
|
}
|
2941
2918
|
interface ListPlansRequest {
|
2942
|
-
/**
|
2943
|
-
* Archived filter.
|
2944
|
-
*
|
2945
|
-
* Default: `ACTIVE` (not archived).
|
2946
|
-
*/
|
2919
|
+
/** Archived filter. Defaults to ACTIVE (not archived) only. */
|
2947
2920
|
archived?: ArchivedFilter;
|
2948
|
-
/**
|
2949
|
-
* Visibility filter.
|
2950
|
-
*
|
2951
|
-
* Default: `PUBLIC_AND_HIDDEN` (meaning, both public and hidden plans are listed).
|
2952
|
-
*
|
2953
|
-
*/
|
2921
|
+
/** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
|
2954
2922
|
public?: PublicFilter;
|
2955
|
-
/**
|
2956
|
-
* Number of pricing plans to list.
|
2957
|
-
*
|
2958
|
-
* Default: `75`.
|
2959
|
-
*/
|
2923
|
+
/** Number of pricing plans to list. Defaults to 75. */
|
2960
2924
|
limit?: number | null;
|
2961
|
-
/**
|
2962
|
-
* Number of pricing plans to skip.
|
2963
|
-
*
|
2964
|
-
* Default: `0`.
|
2965
|
-
*/
|
2925
|
+
/** Number of pricing plans to skip. Defaults to 0. */
|
2966
2926
|
offset?: number | null;
|
2967
|
-
/**
|
2927
|
+
/** Plan ID filter. Non-existent IDs are ignored, and won't cause errors. You can pass a maximum of 100 IDs. */
|
2968
2928
|
planIds?: string[];
|
2969
2929
|
}
|
2970
2930
|
declare enum ArchivedFilter {
|
@@ -2986,7 +2946,7 @@ declare enum PublicFilter {
|
|
2986
2946
|
interface ListPlansResponse {
|
2987
2947
|
/** List of all public and hidden pricing plans. */
|
2988
2948
|
plans?: Plan[];
|
2989
|
-
/**
|
2949
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
2990
2950
|
pagingMetadata?: PagingMetadataV2;
|
2991
2951
|
}
|
2992
2952
|
interface GetPlanStatsRequest {
|
@@ -2996,19 +2956,19 @@ interface GetPlanStatsResponse {
|
|
2996
2956
|
totalPlans?: number;
|
2997
2957
|
}
|
2998
2958
|
interface CreatePlanRequest {
|
2999
|
-
/**
|
2959
|
+
/** Plan info. */
|
3000
2960
|
plan: Plan;
|
3001
2961
|
}
|
3002
2962
|
interface CreatePlanResponse {
|
3003
|
-
/**
|
2963
|
+
/** Created plan. */
|
3004
2964
|
plan?: Plan;
|
3005
2965
|
}
|
3006
2966
|
interface UpdatePlanRequest {
|
3007
|
-
/** Plan info
|
2967
|
+
/** Plan info. */
|
3008
2968
|
plan: Plan;
|
3009
2969
|
}
|
3010
2970
|
interface UpdatePlanResponse {
|
3011
|
-
/** Updated plan
|
2971
|
+
/** Updated plan. */
|
3012
2972
|
plan?: Plan;
|
3013
2973
|
}
|
3014
2974
|
interface BuyerCanCancelUpdated {
|
@@ -3016,21 +2976,20 @@ interface BuyerCanCancelUpdated {
|
|
3016
2976
|
plan?: Plan;
|
3017
2977
|
}
|
3018
2978
|
interface SetPlanVisibilityRequest {
|
3019
|
-
/**
|
2979
|
+
/** Plan ID. */
|
3020
2980
|
_id: string;
|
3021
|
-
/** Whether to
|
2981
|
+
/** Whether a plan is visible to members and site visitors. Updates the `public` field. */
|
3022
2982
|
visible: boolean;
|
3023
2983
|
}
|
3024
2984
|
interface SetPlanVisibilityResponse {
|
3025
|
-
/**
|
2985
|
+
/** Pricing plan. */
|
3026
2986
|
plan?: Plan;
|
3027
2987
|
}
|
3028
2988
|
interface MakePlanPrimaryRequest {
|
3029
|
-
/** ID of the pricing plan to set as the primary plan. */
|
3030
2989
|
_id: string;
|
3031
2990
|
}
|
3032
2991
|
interface MakePlanPrimaryResponse {
|
3033
|
-
/**
|
2992
|
+
/** Pricing plan. */
|
3034
2993
|
plan?: Plan;
|
3035
2994
|
}
|
3036
2995
|
interface ClearPrimaryRequest {
|
@@ -3042,7 +3001,7 @@ interface ArchivePlanRequest {
|
|
3042
3001
|
_id: string;
|
3043
3002
|
}
|
3044
3003
|
interface ArchivePlanResponse {
|
3045
|
-
/** Archived plan
|
3004
|
+
/** Archived plan. */
|
3046
3005
|
plan?: Plan;
|
3047
3006
|
}
|
3048
3007
|
interface PlanArchived {
|
@@ -3094,7 +3053,7 @@ interface BulkActionMetadata {
|
|
3094
3053
|
undetailedFailures?: number;
|
3095
3054
|
}
|
3096
3055
|
interface ArrangePlansRequest {
|
3097
|
-
/**
|
3056
|
+
/** List of plan IDs. */
|
3098
3057
|
ids?: string[];
|
3099
3058
|
}
|
3100
3059
|
interface ArrangePlansResponse {
|
@@ -3373,19 +3332,11 @@ interface PlanUpdatedEnvelope {
|
|
3373
3332
|
metadata: EventMetadata;
|
3374
3333
|
}
|
3375
3334
|
interface ListPublicPlansOptions {
|
3376
|
-
/**
|
3377
|
-
* Number of pricing plans to list.
|
3378
|
-
*
|
3379
|
-
* Default: `75`.
|
3380
|
-
*/
|
3335
|
+
/** Number of items to list. Defaults to 75. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
3381
3336
|
limit?: number | null;
|
3382
|
-
/**
|
3383
|
-
* Number of pricing plans to skip.
|
3384
|
-
*
|
3385
|
-
* Default: `0`.
|
3386
|
-
*/
|
3337
|
+
/** Number of items to skip. Defaults to 0. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
3387
3338
|
offset?: number | null;
|
3388
|
-
/** IDs of
|
3339
|
+
/** IDs of plans to list. Non-existent IDs will be ignored and won't cause errors. You can pass a maximum of 100 IDs. */
|
3389
3340
|
planIds?: string[];
|
3390
3341
|
}
|
3391
3342
|
interface QueryOffsetResult {
|
@@ -3449,32 +3400,15 @@ interface PlansQueryBuilder {
|
|
3449
3400
|
find: () => Promise<PlansQueryResult>;
|
3450
3401
|
}
|
3451
3402
|
interface ListPlansOptions {
|
3452
|
-
/**
|
3453
|
-
* Archived filter.
|
3454
|
-
*
|
3455
|
-
* Default: `ACTIVE` (not archived).
|
3456
|
-
*/
|
3403
|
+
/** Archived filter. Defaults to ACTIVE (not archived) only. */
|
3457
3404
|
archived?: ArchivedFilter;
|
3458
|
-
/**
|
3459
|
-
* Visibility filter.
|
3460
|
-
*
|
3461
|
-
* Default: `PUBLIC_AND_HIDDEN` (meaning, both public and hidden plans are listed).
|
3462
|
-
*
|
3463
|
-
*/
|
3405
|
+
/** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
|
3464
3406
|
public?: PublicFilter;
|
3465
|
-
/**
|
3466
|
-
* Number of pricing plans to list.
|
3467
|
-
*
|
3468
|
-
* Default: `75`.
|
3469
|
-
*/
|
3407
|
+
/** Number of pricing plans to list. Defaults to 75. */
|
3470
3408
|
limit?: number | null;
|
3471
|
-
/**
|
3472
|
-
* Number of pricing plans to skip.
|
3473
|
-
*
|
3474
|
-
* Default: `0`.
|
3475
|
-
*/
|
3409
|
+
/** Number of pricing plans to skip. Defaults to 0. */
|
3476
3410
|
offset?: number | null;
|
3477
|
-
/**
|
3411
|
+
/** Plan ID filter. Non-existent IDs are ignored, and won't cause errors. You can pass a maximum of 100 IDs. */
|
3478
3412
|
planIds?: string[];
|
3479
3413
|
}
|
3480
3414
|
interface UpdatePlan {
|
@@ -3487,11 +3421,7 @@ interface UpdatePlan {
|
|
3487
3421
|
name?: string | null;
|
3488
3422
|
/** Plan description. */
|
3489
3423
|
description?: string | null;
|
3490
|
-
/**
|
3491
|
-
* List of text strings that promote what is included with this plan.
|
3492
|
-
*
|
3493
|
-
* For example, "Plenty of parking" or "Free gift on your birthday".
|
3494
|
-
*/
|
3424
|
+
/** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
|
3495
3425
|
perks?: StringList;
|
3496
3426
|
/** Plan price, payment schedule, and expiration. */
|
3497
3427
|
pricing?: Pricing;
|
@@ -3503,9 +3433,7 @@ interface UpdatePlan {
|
|
3503
3433
|
*/
|
3504
3434
|
archived?: boolean;
|
3505
3435
|
/**
|
3506
|
-
* Whether the plan is marked as primary.
|
3507
|
-
*
|
3508
|
-
* Default: `false`.
|
3436
|
+
* Whether the plan is marked as primary.
|
3509
3437
|
* @readonly
|
3510
3438
|
*/
|
3511
3439
|
primary?: boolean;
|
@@ -3535,35 +3463,25 @@ interface UpdatePlan {
|
|
3535
3463
|
* - Value of `1`, meaning limited to one purchase per buyer.
|
3536
3464
|
*/
|
3537
3465
|
maxPurchasesPerBuyer?: number | null;
|
3538
|
-
/**
|
3539
|
-
* Whether the buyer can start the plan at a later date.
|
3540
|
-
*
|
3541
|
-
* Default: `false`.
|
3542
|
-
*
|
3543
|
-
*/
|
3466
|
+
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
3544
3467
|
allowFutureStartDate?: boolean | null;
|
3545
|
-
/**
|
3546
|
-
* Whether the buyer is allowed to cancel their plan. If `false`, calling the [`requestCancellation()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/requestcancellation) function returns an error.
|
3547
|
-
*
|
3548
|
-
* Default: `true`.
|
3549
|
-
*
|
3550
|
-
*/
|
3468
|
+
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
3551
3469
|
buyerCanCancel?: boolean | null;
|
3552
3470
|
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
3553
3471
|
termsAndConditions?: string | null;
|
3554
|
-
/**
|
3472
|
+
/**
|
3473
|
+
* ID of the form associated with the plan at checkout.
|
3474
|
+
*
|
3475
|
+
* Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
|
3476
|
+
*/
|
3555
3477
|
formId?: string | null;
|
3556
3478
|
}
|
3557
3479
|
|
3558
3480
|
declare function listPublicPlans$1(httpClient: HttpClient): ListPublicPlansSignature;
|
3559
3481
|
interface ListPublicPlansSignature {
|
3560
3482
|
/**
|
3561
|
-
* Retrieves a list of public pricing plans.
|
3562
|
-
*
|
3563
|
-
*
|
3564
|
-
* 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.
|
3483
|
+
* Retrieves a list of up to 100 public pricing plans.
|
3565
3484
|
* @param - Options for filtering and paging the list of public plans.
|
3566
|
-
* @returns Fulfilled - List of public pricing plans.
|
3567
3485
|
*/
|
3568
3486
|
(options?: ListPublicPlansOptions | undefined): Promise<ListPublicPlansResponse & ListPublicPlansResponseNonNullableFields>;
|
3569
3487
|
}
|
@@ -3573,54 +3491,43 @@ interface QueryPublicPlansSignature {
|
|
3573
3491
|
* Creates a query to retrieve a list of public pricing plans.
|
3574
3492
|
*
|
3575
3493
|
*
|
3576
|
-
* The `queryPublicPlans()`
|
3494
|
+
* The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.
|
3577
3495
|
*
|
3578
|
-
* The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find)
|
3496
|
+
* The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.
|
3579
3497
|
*
|
3580
|
-
* You can refine the query by chaining `PublicPlansQueryBuilder`
|
3498
|
+
* 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.
|
3581
3499
|
*
|
3582
3500
|
* `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:
|
3583
3501
|
* - [`skip`](#plansquerybuilder/skip): `0`
|
3584
3502
|
* - [`limit`](#plansquerybuilder/limit): `50`
|
3585
3503
|
*
|
3586
|
-
* The
|
3504
|
+
* 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.
|
3587
3505
|
*
|
3588
|
-
* The following `PublicPlansQueryBuilder`
|
3506
|
+
* 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).
|
3589
3507
|
*/
|
3590
3508
|
(): PlansQueryBuilder;
|
3591
3509
|
}
|
3592
3510
|
declare function getPlan$1(httpClient: HttpClient): GetPlanSignature;
|
3593
3511
|
interface GetPlanSignature {
|
3594
3512
|
/**
|
3595
|
-
* Retrieves a pricing plan by
|
3596
|
-
*
|
3597
|
-
* The `getPlan()` function returns a Promise that resolves to a plan whose ID matched the specified ID.
|
3513
|
+
* Retrieves a pricing plan by ID.
|
3598
3514
|
* @param - Plan ID.
|
3599
|
-
* @returns
|
3515
|
+
* @returns Pricing plan.
|
3600
3516
|
*/
|
3601
3517
|
(_id: string): Promise<Plan & PlanNonNullableFields>;
|
3602
3518
|
}
|
3603
3519
|
declare function listPlans$1(httpClient: HttpClient): ListPlansSignature;
|
3604
3520
|
interface ListPlansSignature {
|
3605
3521
|
/**
|
3606
|
-
* Retrieves a list of pricing plans.
|
3607
|
-
*
|
3608
|
-
* The `listPlans()` function returns a Promise that resolves to a list of up to 100 pricing plans. This includes public, hidden, and archived plans.
|
3522
|
+
* Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).
|
3609
3523
|
* @param - Options for filtering and paging the list of plans.
|
3610
|
-
* @returns Fulfilled - List of plans that match the given criteria.
|
3611
3524
|
*/
|
3612
3525
|
(options?: ListPlansOptions | undefined): Promise<ListPlansResponse & ListPlansResponseNonNullableFields>;
|
3613
3526
|
}
|
3614
3527
|
declare function getPlanStats$1(httpClient: HttpClient): GetPlanStatsSignature;
|
3615
3528
|
interface GetPlanStatsSignature {
|
3616
3529
|
/**
|
3617
|
-
*
|
3618
|
-
*
|
3619
|
-
*
|
3620
|
-
* The `getPlanStats()` function returns a Promise that resolves to statistics about the plan on the site.
|
3621
|
-
*
|
3622
|
-
* Currently this function provides only the total number of pricing plans, including archived plans.
|
3623
|
-
* @returns Fulfilled - Overall statistics about the pricing plans.
|
3530
|
+
* Gets statistics about the pricing plans. Currently providing only the total number of pricing plans.
|
3624
3531
|
*/
|
3625
3532
|
(): Promise<GetPlanStatsResponse & GetPlanStatsResponseNonNullableFields>;
|
3626
3533
|
}
|
@@ -3628,20 +3535,8 @@ declare function createPlan$1(httpClient: HttpClient): CreatePlanSignature;
|
|
3628
3535
|
interface CreatePlanSignature {
|
3629
3536
|
/**
|
3630
3537
|
* Creates a pricing plan.
|
3631
|
-
*
|
3632
|
-
*
|
3633
|
-
* The `createPlan()` function returns a Promise that resolves to a newly-created pricing plan after is has successfully been created.
|
3634
|
-
*
|
3635
|
-
* The passed `plan` object must contain a [pricing model](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans/pricing-models). A pricing model can be one of the following:
|
3636
|
-
* - **A subscription**: A subscription with recurring payment and how often the plan occurs. Subscriptions can have free trial days.
|
3637
|
-
* - **A plan that does not renew**: A single payment for a specific duration that doesn't renew.
|
3638
|
-
* - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).
|
3639
|
-
*
|
3640
|
-
* Pricing plans created by this function are available to the site owner in the Pricing Plans section in the Dashboard.
|
3641
3538
|
* @param - Information for the plan being created.
|
3642
|
-
* @returns
|
3643
|
-
*
|
3644
|
-
* Rejected - Error message.
|
3539
|
+
* @returns Created plan.
|
3645
3540
|
*/
|
3646
3541
|
(plan: Plan): Promise<Plan & PlanNonNullableFields>;
|
3647
3542
|
}
|
@@ -3649,66 +3544,38 @@ declare function updatePlan$1(httpClient: HttpClient): UpdatePlanSignature;
|
|
3649
3544
|
interface UpdatePlanSignature {
|
3650
3545
|
/**
|
3651
3546
|
* Updates a pricing plan.
|
3652
|
-
*
|
3653
|
-
*
|
3654
|
-
* The `updatePlan()` function returns a Promise that resolves to an updated plan.
|
3655
|
-
*
|
3656
|
-
* 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.
|
3547
|
+
* 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.
|
3657
3548
|
* @param - ID of the plan to update.
|
3658
3549
|
* @param - Options for updating the plan.
|
3659
|
-
* @returns
|
3660
|
-
*
|
3661
|
-
* Rejected - Error message.
|
3550
|
+
* @returns Updated plan.
|
3662
3551
|
*/
|
3663
3552
|
(_id: string, plan: UpdatePlan): Promise<Plan & PlanNonNullableFields>;
|
3664
3553
|
}
|
3665
3554
|
declare function setPlanVisibility$1(httpClient: HttpClient): SetPlanVisibilitySignature;
|
3666
3555
|
interface SetPlanVisibilitySignature {
|
3667
3556
|
/**
|
3668
|
-
* Sets visibility for
|
3669
|
-
*
|
3670
|
-
*
|
3671
|
-
*
|
3672
|
-
*
|
3673
|
-
*
|
3674
|
-
* 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).
|
3675
|
-
*
|
3676
|
-
* >**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.
|
3677
|
-
*
|
3678
|
-
* 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.
|
3679
|
-
* @param - Whether to set the plan as visible.
|
3557
|
+
* Sets visibility for pricing plans. Visible plans are considered public plans.
|
3558
|
+
* By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors cannot choose them.
|
3559
|
+
* 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.)
|
3560
|
+
* 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.
|
3561
|
+
* @param - Whether a plan is visible to members and site visitors. Updates the `public` field.
|
3680
3562
|
* @param - The ID of the plan to either display or hide on the site page.
|
3681
3563
|
* @param - Plan visibility options.
|
3682
|
-
* @returns Fulfilled - The plan's information.
|
3683
|
-
*
|
3684
|
-
* Rejected - Error message.
|
3685
3564
|
*/
|
3686
3565
|
(_id: string, visible: boolean): Promise<SetPlanVisibilityResponse & SetPlanVisibilityResponseNonNullableFields>;
|
3687
3566
|
}
|
3688
3567
|
declare function makePlanPrimary$1(httpClient: HttpClient): MakePlanPrimarySignature;
|
3689
3568
|
interface MakePlanPrimarySignature {
|
3690
3569
|
/**
|
3691
|
-
* Marks a pricing plan as the primary pricing plan.
|
3692
|
-
*
|
3693
|
-
*
|
3694
|
-
* The `makePlanPrimary()` function returns a Promise that resolves to the now primary pricing plan.
|
3695
|
-
*
|
3696
|
-
* 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.
|
3697
|
-
*
|
3698
|
-
* When viewing pricing plans on the site, the primary plan is highlighted with a customizable ribbon.
|
3570
|
+
* 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.
|
3699
3571
|
* @param - ID of the pricing plan to set as the primary plan.
|
3700
|
-
* @returns Fulfilled - The primary plan.
|
3701
3572
|
*/
|
3702
3573
|
(_id: string): Promise<MakePlanPrimaryResponse & MakePlanPrimaryResponseNonNullableFields>;
|
3703
3574
|
}
|
3704
3575
|
declare function clearPrimary$1(httpClient: HttpClient): ClearPrimarySignature;
|
3705
3576
|
interface ClearPrimarySignature {
|
3706
3577
|
/**
|
3707
|
-
* Sets all pricing plans
|
3708
|
-
*
|
3709
|
-
* The `clearPrimary()` function returns a Promise that is resolved when there are no pricing plans marked as `primary`.
|
3710
|
-
*
|
3711
|
-
* After clearing the primary plan, when viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
|
3578
|
+
* Sets all pricing plans as not primary. When viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
|
3712
3579
|
*/
|
3713
3580
|
(): Promise<void>;
|
3714
3581
|
}
|
@@ -3716,24 +3583,11 @@ declare function archivePlan$1(httpClient: HttpClient): ArchivePlanSignature;
|
|
3716
3583
|
interface ArchivePlanSignature {
|
3717
3584
|
/**
|
3718
3585
|
* Archives a single plan.
|
3719
|
-
*
|
3720
|
-
*
|
3721
|
-
*
|
3722
|
-
*
|
3723
|
-
* When a plan is archived, the plan
|
3724
|
-
* - Is no longer available for display or selection by visitors. This is because the plan's `public` property is automatically set to `false`.
|
3725
|
-
* - Cannot be purchased.
|
3726
|
-
* - Cannot be "un-archived", meaning the plan cannot be made active again.
|
3727
|
-
*
|
3728
|
-
* 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.
|
3729
|
-
*
|
3730
|
-
* Site owners can see archived plans in the Dashboard under **Pricing Plans -> Archived Plans**.
|
3731
|
-
*
|
3732
|
-
* >**Note:** An attempt to archive an already-archived plan throws an error.
|
3586
|
+
* 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.
|
3587
|
+
* An archived plan cannot be made active again.
|
3588
|
+
* Plan archiving does not impact existing orders made for the plan. All orders for the plan are still active and keep their perks.
|
3589
|
+
* Site owners can see archived plans in the Dashboard under Pricing Plans -> Archived Plans.
|
3733
3590
|
* @param - ID of the active plan to archive.
|
3734
|
-
* @returns Fulfilled - The archived plan.
|
3735
|
-
*
|
3736
|
-
* Rejected - Error message.
|
3737
3591
|
*/
|
3738
3592
|
(_id: string): Promise<ArchivePlanResponse & ArchivePlanResponseNonNullableFields>;
|
3739
3593
|
}
|