@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
@@ -2157,11 +2157,7 @@ interface Plan {
|
|
2157
2157
|
name?: string | null;
|
2158
2158
|
/** Plan description. */
|
2159
2159
|
description?: string | null;
|
2160
|
-
/**
|
2161
|
-
* List of text strings that promote what is included with this plan.
|
2162
|
-
*
|
2163
|
-
* For example, "Plenty of parking" or "Free gift on your birthday".
|
2164
|
-
*/
|
2160
|
+
/** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
|
2165
2161
|
perks?: StringList;
|
2166
2162
|
/** Plan price, payment schedule, and expiration. */
|
2167
2163
|
pricing?: Pricing;
|
@@ -2173,9 +2169,7 @@ interface Plan {
|
|
2173
2169
|
*/
|
2174
2170
|
archived?: boolean;
|
2175
2171
|
/**
|
2176
|
-
* Whether the plan is marked as primary.
|
2177
|
-
*
|
2178
|
-
* Default: `false`.
|
2172
|
+
* Whether the plan is marked as primary.
|
2179
2173
|
* @readonly
|
2180
2174
|
*/
|
2181
2175
|
primary?: boolean;
|
@@ -2205,23 +2199,17 @@ interface Plan {
|
|
2205
2199
|
* - Value of `1`, meaning limited to one purchase per buyer.
|
2206
2200
|
*/
|
2207
2201
|
maxPurchasesPerBuyer?: number | null;
|
2208
|
-
/**
|
2209
|
-
* Whether the buyer can start the plan at a later date.
|
2210
|
-
*
|
2211
|
-
* Default: `false`.
|
2212
|
-
*
|
2213
|
-
*/
|
2202
|
+
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
2214
2203
|
allowFutureStartDate?: boolean | null;
|
2215
|
-
/**
|
2216
|
-
* 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.
|
2217
|
-
*
|
2218
|
-
* Default: `true`.
|
2219
|
-
*
|
2220
|
-
*/
|
2204
|
+
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
2221
2205
|
buyerCanCancel?: boolean | null;
|
2222
2206
|
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
2223
2207
|
termsAndConditions?: string | null;
|
2224
|
-
/**
|
2208
|
+
/**
|
2209
|
+
* ID of the form associated with the plan at checkout.
|
2210
|
+
*
|
2211
|
+
* Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
|
2212
|
+
*/
|
2225
2213
|
formId?: string | null;
|
2226
2214
|
}
|
2227
2215
|
/** This wrapper type exist in order to distinguish an empty string list from no list at all in update requests. */
|
@@ -2230,19 +2218,15 @@ interface StringList {
|
|
2230
2218
|
}
|
2231
2219
|
/** Plan pricing information. Includes the price of the plan and payment details. */
|
2232
2220
|
interface Pricing extends PricingPricingModelOneOf {
|
2233
|
-
/**
|
2234
|
-
* Pricing model indicating that the plan has recurring payments.
|
2235
|
-
*
|
2236
|
-
* 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.
|
2237
|
-
*/
|
2221
|
+
/** Plan has recurring payments. */
|
2238
2222
|
subscription?: Recurrence;
|
2239
|
-
/**
|
2223
|
+
/** One time payment, plan is valid for the specified duration. */
|
2240
2224
|
singlePaymentForDuration?: Duration;
|
2241
|
-
/**
|
2225
|
+
/** One time payment, plan is valid until it is canceled. */
|
2242
2226
|
singlePaymentUnlimited?: boolean | null;
|
2243
|
-
/** Amount for a single payment
|
2227
|
+
/** Amount for a single payment (or the whole subscription if it's not a recurring plan) */
|
2244
2228
|
price?: Money;
|
2245
|
-
/** Free trial period for the plan in days.
|
2229
|
+
/** Free trial period for the plan in days. It’s available only for recurring plans. Set to 0 to remove free trial. */
|
2246
2230
|
freeTrialDays?: number | null;
|
2247
2231
|
}
|
2248
2232
|
/** @oneof */
|
@@ -2256,18 +2240,18 @@ interface PricingPricingModelOneOf {
|
|
2256
2240
|
}
|
2257
2241
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
2258
2242
|
interface Recurrence {
|
2259
|
-
/** Length of one payment cycle.
|
2243
|
+
/** Length of one payment cycle. */
|
2260
2244
|
cycleDuration?: Duration;
|
2261
2245
|
/**
|
2262
|
-
* Amount of payment cycles
|
2246
|
+
* Amount of payment cycles this subscription is valid for.
|
2263
2247
|
*
|
2264
|
-
* `0` for unlimited
|
2248
|
+
* `0` for unlimited or until-canceled.
|
2265
2249
|
*/
|
2266
2250
|
cycleCount?: number | null;
|
2267
2251
|
}
|
2268
2252
|
/** A duration expressed in number of time units. */
|
2269
2253
|
interface Duration {
|
2270
|
-
/**
|
2254
|
+
/** The amount of a duration `unit` in a single payment cycle. */
|
2271
2255
|
count?: number | null;
|
2272
2256
|
/** Unit of time for the cycle duration. */
|
2273
2257
|
unit?: PeriodUnit;
|
@@ -2280,12 +2264,9 @@ declare enum PeriodUnit {
|
|
2280
2264
|
YEAR = "YEAR"
|
2281
2265
|
}
|
2282
2266
|
interface Money {
|
2283
|
-
/** Monetary amount. Decimal string with a period as a decimal separator.
|
2267
|
+
/** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). */
|
2284
2268
|
value?: string;
|
2285
|
-
/**
|
2286
|
-
* Currency code. Three-letter currency code in
|
2287
|
-
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`.
|
2288
|
-
*/
|
2269
|
+
/** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
|
2289
2270
|
currency?: string;
|
2290
2271
|
}
|
2291
2272
|
declare enum AppliedAt {
|
@@ -2294,25 +2275,17 @@ declare enum AppliedAt {
|
|
2294
2275
|
FIRST_PAYMENT = "FIRST_PAYMENT"
|
2295
2276
|
}
|
2296
2277
|
interface ListPublicPlansRequest {
|
2297
|
-
/**
|
2298
|
-
* Number of pricing plans to list.
|
2299
|
-
*
|
2300
|
-
* Default: `75`.
|
2301
|
-
*/
|
2278
|
+
/** Number of items to list. Defaults to 75. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
2302
2279
|
limit?: number | null;
|
2303
|
-
/**
|
2304
|
-
* Number of pricing plans to skip.
|
2305
|
-
*
|
2306
|
-
* Default: `0`.
|
2307
|
-
*/
|
2280
|
+
/** Number of items to skip. Defaults to 0. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
2308
2281
|
offset?: number | null;
|
2309
|
-
/** IDs of
|
2282
|
+
/** IDs of plans to list. Non-existent IDs will be ignored and won't cause errors. You can pass a maximum of 100 IDs. */
|
2310
2283
|
planIds?: string[];
|
2311
2284
|
}
|
2312
2285
|
interface ListPublicPlansResponse {
|
2313
2286
|
/** List of public pricing plans. */
|
2314
2287
|
plans?: PublicPlan[];
|
2315
|
-
/**
|
2288
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
2316
2289
|
pagingMetadata?: PagingMetadataV2;
|
2317
2290
|
}
|
2318
2291
|
/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
|
@@ -2343,7 +2316,11 @@ interface PublicPlan {
|
|
2343
2316
|
buyerCanCancel?: boolean | null;
|
2344
2317
|
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
2345
2318
|
termsAndConditions?: string | null;
|
2346
|
-
/**
|
2319
|
+
/**
|
2320
|
+
* ID of the form associated with the plan at checkout.
|
2321
|
+
*
|
2322
|
+
* Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
|
2323
|
+
*/
|
2347
2324
|
formId?: string | null;
|
2348
2325
|
}
|
2349
2326
|
interface PagingMetadataV2 {
|
@@ -2403,36 +2380,19 @@ interface GetPlanRequest {
|
|
2403
2380
|
_id: string;
|
2404
2381
|
}
|
2405
2382
|
interface GetPlanResponse {
|
2406
|
-
/** Pricing plan
|
2383
|
+
/** Pricing plan. */
|
2407
2384
|
plan?: Plan;
|
2408
2385
|
}
|
2409
2386
|
interface ListPlansRequest {
|
2410
|
-
/**
|
2411
|
-
* Archived filter.
|
2412
|
-
*
|
2413
|
-
* Default: `ACTIVE` (not archived).
|
2414
|
-
*/
|
2387
|
+
/** Archived filter. Defaults to ACTIVE (not archived) only. */
|
2415
2388
|
archived?: ArchivedFilter;
|
2416
|
-
/**
|
2417
|
-
* Visibility filter.
|
2418
|
-
*
|
2419
|
-
* Default: `PUBLIC_AND_HIDDEN` (meaning, both public and hidden plans are listed).
|
2420
|
-
*
|
2421
|
-
*/
|
2389
|
+
/** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
|
2422
2390
|
public?: PublicFilter;
|
2423
|
-
/**
|
2424
|
-
* Number of pricing plans to list.
|
2425
|
-
*
|
2426
|
-
* Default: `75`.
|
2427
|
-
*/
|
2391
|
+
/** Number of pricing plans to list. Defaults to 75. */
|
2428
2392
|
limit?: number | null;
|
2429
|
-
/**
|
2430
|
-
* Number of pricing plans to skip.
|
2431
|
-
*
|
2432
|
-
* Default: `0`.
|
2433
|
-
*/
|
2393
|
+
/** Number of pricing plans to skip. Defaults to 0. */
|
2434
2394
|
offset?: number | null;
|
2435
|
-
/**
|
2395
|
+
/** Plan ID filter. Non-existent IDs are ignored, and won't cause errors. You can pass a maximum of 100 IDs. */
|
2436
2396
|
planIds?: string[];
|
2437
2397
|
}
|
2438
2398
|
declare enum ArchivedFilter {
|
@@ -2454,7 +2414,7 @@ declare enum PublicFilter {
|
|
2454
2414
|
interface ListPlansResponse {
|
2455
2415
|
/** List of all public and hidden pricing plans. */
|
2456
2416
|
plans?: Plan[];
|
2457
|
-
/**
|
2417
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
2458
2418
|
pagingMetadata?: PagingMetadataV2;
|
2459
2419
|
}
|
2460
2420
|
interface GetPlanStatsRequest {
|
@@ -2464,37 +2424,36 @@ interface GetPlanStatsResponse {
|
|
2464
2424
|
totalPlans?: number;
|
2465
2425
|
}
|
2466
2426
|
interface CreatePlanRequest {
|
2467
|
-
/**
|
2427
|
+
/** Plan info. */
|
2468
2428
|
plan: Plan;
|
2469
2429
|
}
|
2470
2430
|
interface CreatePlanResponse {
|
2471
|
-
/**
|
2431
|
+
/** Created plan. */
|
2472
2432
|
plan?: Plan;
|
2473
2433
|
}
|
2474
2434
|
interface UpdatePlanRequest {
|
2475
|
-
/** Plan info
|
2435
|
+
/** Plan info. */
|
2476
2436
|
plan: Plan;
|
2477
2437
|
}
|
2478
2438
|
interface UpdatePlanResponse {
|
2479
|
-
/** Updated plan
|
2439
|
+
/** Updated plan. */
|
2480
2440
|
plan?: Plan;
|
2481
2441
|
}
|
2482
2442
|
interface SetPlanVisibilityRequest {
|
2483
|
-
/**
|
2443
|
+
/** Plan ID. */
|
2484
2444
|
_id: string;
|
2485
|
-
/** Whether to
|
2445
|
+
/** Whether a plan is visible to members and site visitors. Updates the `public` field. */
|
2486
2446
|
visible: boolean;
|
2487
2447
|
}
|
2488
2448
|
interface SetPlanVisibilityResponse {
|
2489
|
-
/**
|
2449
|
+
/** Pricing plan. */
|
2490
2450
|
plan?: Plan;
|
2491
2451
|
}
|
2492
2452
|
interface MakePlanPrimaryRequest {
|
2493
|
-
/** ID of the pricing plan to set as the primary plan. */
|
2494
2453
|
_id: string;
|
2495
2454
|
}
|
2496
2455
|
interface MakePlanPrimaryResponse {
|
2497
|
-
/**
|
2456
|
+
/** Pricing plan. */
|
2498
2457
|
plan?: Plan;
|
2499
2458
|
}
|
2500
2459
|
interface ClearPrimaryRequest {
|
@@ -2506,7 +2465,7 @@ interface ArchivePlanRequest {
|
|
2506
2465
|
_id: string;
|
2507
2466
|
}
|
2508
2467
|
interface ArchivePlanResponse {
|
2509
|
-
/** Archived plan
|
2468
|
+
/** Archived plan. */
|
2510
2469
|
plan?: Plan;
|
2511
2470
|
}
|
2512
2471
|
interface StringListNonNullableFields {
|