@wix/auto_sdk_pricing-plans_plans 1.0.58 → 1.0.60
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/build/{cjs/src/pricing-plans-v2-plan-plans.public.d.ts → index.d.mts} +49 -21
- package/build/{internal/cjs/src/pricing-plans-v2-plan-plans.public.d.ts → index.d.ts} +49 -21
- package/build/index.js +965 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +921 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/pricing-plans-v2-plan-plans.public.d.ts → index.d.mts} +49 -21
- package/build/{es/src/pricing-plans-v2-plan-plans.public.d.ts → internal/index.d.ts} +49 -21
- package/build/internal/index.js +965 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +921 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{es/src/pricing-plans-v2-plan-plans.types.d.ts → internal/meta.d.mts} +79 -305
- package/build/internal/{cjs/src/pricing-plans-v2-plan-plans.types.d.ts → meta.d.ts} +79 -305
- package/build/internal/meta.js +635 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +598 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/internal/{cjs/src/pricing-plans-v2-plan-plans.universal.d.ts → pricing-plans-v2-plan-plans.universal-DwvmTikd.d.mts} +88 -429
- package/build/internal/{es/src/pricing-plans-v2-plan-plans.universal.d.ts → pricing-plans-v2-plan-plans.universal-DwvmTikd.d.ts} +88 -429
- package/build/{internal/es/src/pricing-plans-v2-plan-plans.types.d.ts → meta.d.mts} +79 -305
- package/build/{cjs/src/pricing-plans-v2-plan-plans.types.d.ts → meta.d.ts} +79 -305
- package/build/meta.js +635 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +598 -0
- package/build/meta.mjs.map +1 -0
- package/build/{cjs/src/pricing-plans-v2-plan-plans.universal.d.ts → pricing-plans-v2-plan-plans.universal-DwvmTikd.d.mts} +88 -429
- package/build/{es/src/pricing-plans-v2-plan-plans.universal.d.ts → pricing-plans-v2-plan-plans.universal-DwvmTikd.d.ts} +88 -429
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/pricing-plans-v2-plan-plans.context.d.ts +0 -36
- package/build/cjs/src/pricing-plans-v2-plan-plans.context.js +0 -45
- package/build/cjs/src/pricing-plans-v2-plan-plans.context.js.map +0 -1
- package/build/cjs/src/pricing-plans-v2-plan-plans.http.d.ts +0 -62
- package/build/cjs/src/pricing-plans-v2-plan-plans.http.js +0 -448
- package/build/cjs/src/pricing-plans-v2-plan-plans.http.js.map +0 -1
- package/build/cjs/src/pricing-plans-v2-plan-plans.meta.d.ts +0 -33
- package/build/cjs/src/pricing-plans-v2-plan-plans.meta.js +0 -237
- package/build/cjs/src/pricing-plans-v2-plan-plans.meta.js.map +0 -1
- package/build/cjs/src/pricing-plans-v2-plan-plans.public.js +0 -123
- package/build/cjs/src/pricing-plans-v2-plan-plans.public.js.map +0 -1
- package/build/cjs/src/pricing-plans-v2-plan-plans.types.js +0 -54
- package/build/cjs/src/pricing-plans-v2-plan-plans.types.js.map +0 -1
- package/build/cjs/src/pricing-plans-v2-plan-plans.universal.js +0 -608
- package/build/cjs/src/pricing-plans-v2-plan-plans.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/pricing-plans-v2-plan-plans.context.d.ts +0 -36
- package/build/es/src/pricing-plans-v2-plan-plans.context.js +0 -36
- package/build/es/src/pricing-plans-v2-plan-plans.context.js.map +0 -1
- package/build/es/src/pricing-plans-v2-plan-plans.http.d.ts +0 -62
- package/build/es/src/pricing-plans-v2-plan-plans.http.js +0 -434
- package/build/es/src/pricing-plans-v2-plan-plans.http.js.map +0 -1
- package/build/es/src/pricing-plans-v2-plan-plans.meta.d.ts +0 -33
- package/build/es/src/pricing-plans-v2-plan-plans.meta.js +0 -200
- package/build/es/src/pricing-plans-v2-plan-plans.meta.js.map +0 -1
- package/build/es/src/pricing-plans-v2-plan-plans.public.js +0 -103
- package/build/es/src/pricing-plans-v2-plan-plans.public.js.map +0 -1
- package/build/es/src/pricing-plans-v2-plan-plans.types.js +0 -51
- package/build/es/src/pricing-plans-v2-plan-plans.types.js.map +0 -1
- package/build/es/src/pricing-plans-v2-plan-plans.universal.js +0 -571
- package/build/es/src/pricing-plans-v2-plan-plans.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.context.d.ts +0 -36
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.context.js +0 -45
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.context.js.map +0 -1
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.http.d.ts +0 -62
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.http.js +0 -448
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.http.js.map +0 -1
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.meta.d.ts +0 -33
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.meta.js +0 -237
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.meta.js.map +0 -1
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.public.js +0 -123
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.public.js.map +0 -1
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.types.js +0 -54
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.types.js.map +0 -1
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.js +0 -608
- package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/pricing-plans-v2-plan-plans.context.d.ts +0 -36
- package/build/internal/es/src/pricing-plans-v2-plan-plans.context.js +0 -36
- package/build/internal/es/src/pricing-plans-v2-plan-plans.context.js.map +0 -1
- package/build/internal/es/src/pricing-plans-v2-plan-plans.http.d.ts +0 -62
- package/build/internal/es/src/pricing-plans-v2-plan-plans.http.js +0 -434
- package/build/internal/es/src/pricing-plans-v2-plan-plans.http.js.map +0 -1
- package/build/internal/es/src/pricing-plans-v2-plan-plans.meta.d.ts +0 -33
- package/build/internal/es/src/pricing-plans-v2-plan-plans.meta.js +0 -200
- package/build/internal/es/src/pricing-plans-v2-plan-plans.meta.js.map +0 -1
- package/build/internal/es/src/pricing-plans-v2-plan-plans.public.js +0 -103
- package/build/internal/es/src/pricing-plans-v2-plan-plans.public.js.map +0 -1
- package/build/internal/es/src/pricing-plans-v2-plan-plans.types.js +0 -51
- package/build/internal/es/src/pricing-plans-v2-plan-plans.types.js.map +0 -1
- package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.js +0 -571
- package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
1
|
/** Information about the pricing plan. */
|
|
3
|
-
|
|
2
|
+
interface Plan {
|
|
4
3
|
/**
|
|
5
4
|
* Plan ID.
|
|
6
5
|
* @format GUID
|
|
@@ -84,7 +83,7 @@ export interface Plan {
|
|
|
84
83
|
formId?: string | null;
|
|
85
84
|
}
|
|
86
85
|
/** This wrapper type exists to distinguish an empty string list from no list at all in update requests. */
|
|
87
|
-
|
|
86
|
+
interface StringList {
|
|
88
87
|
/**
|
|
89
88
|
* @minLength 1
|
|
90
89
|
* @maxLength 1400
|
|
@@ -93,7 +92,7 @@ export interface StringList {
|
|
|
93
92
|
values?: string[];
|
|
94
93
|
}
|
|
95
94
|
/** Plan pricing information. Includes the price of the plan and payment details. */
|
|
96
|
-
|
|
95
|
+
interface Pricing extends PricingPricingModelOneOf {
|
|
97
96
|
/** Pricing model indicating that the plan has recurring payments. 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. */
|
|
98
97
|
subscription?: Recurrence;
|
|
99
98
|
/** 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. */
|
|
@@ -109,7 +108,7 @@ export interface Pricing extends PricingPricingModelOneOf {
|
|
|
109
108
|
freeTrialDays?: number | null;
|
|
110
109
|
}
|
|
111
110
|
/** @oneof */
|
|
112
|
-
|
|
111
|
+
interface PricingPricingModelOneOf {
|
|
113
112
|
/** Pricing model indicating that the plan has recurring payments. 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. */
|
|
114
113
|
subscription?: Recurrence;
|
|
115
114
|
/** 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. */
|
|
@@ -118,7 +117,7 @@ export interface PricingPricingModelOneOf {
|
|
|
118
117
|
singlePaymentUnlimited?: boolean | null;
|
|
119
118
|
}
|
|
120
119
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
|
121
|
-
|
|
120
|
+
interface Recurrence {
|
|
122
121
|
/**
|
|
123
122
|
* Number of payment cycles the subscription is valid for.
|
|
124
123
|
* `0` for unlimited plans or for plans that are valid until canceled.
|
|
@@ -133,7 +132,7 @@ export interface Recurrence {
|
|
|
133
132
|
cycleCount?: number | null;
|
|
134
133
|
}
|
|
135
134
|
/** A duration expressed in number of time units. */
|
|
136
|
-
|
|
135
|
+
interface Duration {
|
|
137
136
|
/**
|
|
138
137
|
* Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.
|
|
139
138
|
* @min 1
|
|
@@ -142,7 +141,7 @@ export interface Duration {
|
|
|
142
141
|
/** Unit of time for the cycle duration. */
|
|
143
142
|
unit?: PeriodUnitWithLiterals;
|
|
144
143
|
}
|
|
145
|
-
|
|
144
|
+
declare enum PeriodUnit {
|
|
146
145
|
/** Not defined. */
|
|
147
146
|
UNDEFINED = "UNDEFINED",
|
|
148
147
|
/** Time unit is a day. */
|
|
@@ -155,8 +154,8 @@ export declare enum PeriodUnit {
|
|
|
155
154
|
YEAR = "YEAR"
|
|
156
155
|
}
|
|
157
156
|
/** @enumType */
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
type PeriodUnitWithLiterals = PeriodUnit | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
158
|
+
interface Money {
|
|
160
159
|
/**
|
|
161
160
|
* Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative.
|
|
162
161
|
* @decimalValue options { lt:1000000000000, gte:0.000, maxScale:3 }
|
|
@@ -168,13 +167,13 @@ export interface Money {
|
|
|
168
167
|
*/
|
|
169
168
|
currency?: string;
|
|
170
169
|
}
|
|
171
|
-
|
|
170
|
+
interface FeeConfig {
|
|
172
171
|
/** Fee configuration. */
|
|
173
172
|
fee?: Fee;
|
|
174
173
|
/** The time this fee will be charged. */
|
|
175
174
|
appliedAt?: AppliedAtWithLiterals;
|
|
176
175
|
}
|
|
177
|
-
|
|
176
|
+
interface Fee {
|
|
178
177
|
/**
|
|
179
178
|
* Fee name
|
|
180
179
|
* @minLength 1
|
|
@@ -187,14 +186,14 @@ export interface Fee {
|
|
|
187
186
|
*/
|
|
188
187
|
amount?: string;
|
|
189
188
|
}
|
|
190
|
-
|
|
189
|
+
declare enum AppliedAt {
|
|
191
190
|
UNKNOWN_CHARGE_EVENT = "UNKNOWN_CHARGE_EVENT",
|
|
192
191
|
/** Will charge the fee on the first payment. If the order has a free trial, it will charge after the free trial. */
|
|
193
192
|
FIRST_PAYMENT = "FIRST_PAYMENT"
|
|
194
193
|
}
|
|
195
194
|
/** @enumType */
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
type AppliedAtWithLiterals = AppliedAt | 'UNKNOWN_CHARGE_EVENT' | 'FIRST_PAYMENT';
|
|
196
|
+
interface ListPublicPlansRequest {
|
|
198
197
|
/**
|
|
199
198
|
* Number of items to list. Defaults to `75`. See limits ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)).
|
|
200
199
|
* @min 1
|
|
@@ -210,14 +209,14 @@ export interface ListPublicPlansRequest {
|
|
|
210
209
|
*/
|
|
211
210
|
planIds?: string[];
|
|
212
211
|
}
|
|
213
|
-
|
|
212
|
+
interface ListPublicPlansResponse {
|
|
214
213
|
/** List of public pricing plans. */
|
|
215
214
|
plans?: PublicPlan[];
|
|
216
215
|
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
|
217
216
|
pagingMetadata?: PagingMetadataV2;
|
|
218
217
|
}
|
|
219
218
|
/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
|
|
220
|
-
|
|
219
|
+
interface PublicPlan {
|
|
221
220
|
/**
|
|
222
221
|
* Plan ID.
|
|
223
222
|
* @format GUID
|
|
@@ -265,7 +264,7 @@ export interface PublicPlan {
|
|
|
265
264
|
*/
|
|
266
265
|
formId?: string | null;
|
|
267
266
|
}
|
|
268
|
-
|
|
267
|
+
interface PagingMetadataV2 {
|
|
269
268
|
/** Number of items returned in the response. */
|
|
270
269
|
count?: number | null;
|
|
271
270
|
/** Offset that was requested. */
|
|
@@ -277,7 +276,7 @@ export interface PagingMetadataV2 {
|
|
|
277
276
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
278
277
|
cursors?: Cursors;
|
|
279
278
|
}
|
|
280
|
-
|
|
279
|
+
interface Cursors {
|
|
281
280
|
/**
|
|
282
281
|
* Cursor string pointing to the next page in the list of results.
|
|
283
282
|
* @maxLength 16000
|
|
@@ -289,11 +288,11 @@ export interface Cursors {
|
|
|
289
288
|
*/
|
|
290
289
|
prev?: string | null;
|
|
291
290
|
}
|
|
292
|
-
|
|
291
|
+
interface QueryPublicPlansRequest {
|
|
293
292
|
/** Query options. */
|
|
294
293
|
query?: QueryV2;
|
|
295
294
|
}
|
|
296
|
-
|
|
295
|
+
interface QueryV2 {
|
|
297
296
|
/** A filter object. See supported fields and operators ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/query-public-plans) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans)). */
|
|
298
297
|
filter?: Record<string, any> | null;
|
|
299
298
|
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]. */
|
|
@@ -301,7 +300,7 @@ export interface QueryV2 {
|
|
|
301
300
|
/** Pointer to page of results using offset. Can't be used together with 'cursorPaging'. */
|
|
302
301
|
paging?: Paging;
|
|
303
302
|
}
|
|
304
|
-
|
|
303
|
+
interface Sorting {
|
|
305
304
|
/**
|
|
306
305
|
* Name of the field to sort by.
|
|
307
306
|
* @maxLength 512
|
|
@@ -310,36 +309,36 @@ export interface Sorting {
|
|
|
310
309
|
/** Sort order. */
|
|
311
310
|
order?: SortOrderWithLiterals;
|
|
312
311
|
}
|
|
313
|
-
|
|
312
|
+
declare enum SortOrder {
|
|
314
313
|
ASC = "ASC",
|
|
315
314
|
DESC = "DESC"
|
|
316
315
|
}
|
|
317
316
|
/** @enumType */
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
318
|
+
interface Paging {
|
|
320
319
|
/** Number of items to load. */
|
|
321
320
|
limit?: number | null;
|
|
322
321
|
/** Number of items to skip in the current sort order. */
|
|
323
322
|
offset?: number | null;
|
|
324
323
|
}
|
|
325
|
-
|
|
324
|
+
interface QueryPublicPlansResponse {
|
|
326
325
|
/** List of public pricing plans that match the specified query. */
|
|
327
326
|
plans?: PublicPlan[];
|
|
328
327
|
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
|
329
328
|
pagingMetadata?: PagingMetadataV2;
|
|
330
329
|
}
|
|
331
|
-
|
|
330
|
+
interface GetPlanRequest {
|
|
332
331
|
/**
|
|
333
332
|
* Plan ID.
|
|
334
333
|
* @format GUID
|
|
335
334
|
*/
|
|
336
335
|
_id: string;
|
|
337
336
|
}
|
|
338
|
-
|
|
337
|
+
interface GetPlanResponse {
|
|
339
338
|
/** Pricing plan. */
|
|
340
339
|
plan?: Plan;
|
|
341
340
|
}
|
|
342
|
-
|
|
341
|
+
interface ListPlansRequest {
|
|
343
342
|
/** Archived filter. Defaults to `ACTIVE` (not archived) only. */
|
|
344
343
|
archived?: ArchivedFilterWithLiterals;
|
|
345
344
|
/** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */
|
|
@@ -359,7 +358,7 @@ export interface ListPlansRequest {
|
|
|
359
358
|
*/
|
|
360
359
|
planIds?: string[];
|
|
361
360
|
}
|
|
362
|
-
|
|
361
|
+
declare enum ArchivedFilter {
|
|
363
362
|
/** Returns all plans that are active. */
|
|
364
363
|
ACTIVE = "ACTIVE",
|
|
365
364
|
/** Returns all plans that are archived. */
|
|
@@ -368,8 +367,8 @@ export declare enum ArchivedFilter {
|
|
|
368
367
|
ARCHIVED_AND_ACTIVE = "ARCHIVED_AND_ACTIVE"
|
|
369
368
|
}
|
|
370
369
|
/** @enumType */
|
|
371
|
-
|
|
372
|
-
|
|
370
|
+
type ArchivedFilterWithLiterals = ArchivedFilter | 'ACTIVE' | 'ARCHIVED' | 'ARCHIVED_AND_ACTIVE';
|
|
371
|
+
declare enum PublicFilter {
|
|
373
372
|
/** Returns all public and hidden plans. */
|
|
374
373
|
PUBLIC_AND_HIDDEN = "PUBLIC_AND_HIDDEN",
|
|
375
374
|
/** Returns only public plans. */
|
|
@@ -378,40 +377,40 @@ export declare enum PublicFilter {
|
|
|
378
377
|
HIDDEN = "HIDDEN"
|
|
379
378
|
}
|
|
380
379
|
/** @enumType */
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
type PublicFilterWithLiterals = PublicFilter | 'PUBLIC_AND_HIDDEN' | 'PUBLIC' | 'HIDDEN';
|
|
381
|
+
interface ListPlansResponse {
|
|
383
382
|
/** List of all public and hidden pricing plans. */
|
|
384
383
|
plans?: Plan[];
|
|
385
384
|
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
|
386
385
|
pagingMetadata?: PagingMetadataV2;
|
|
387
386
|
}
|
|
388
|
-
|
|
387
|
+
interface GetPlanStatsRequest {
|
|
389
388
|
}
|
|
390
|
-
|
|
389
|
+
interface GetPlanStatsResponse {
|
|
391
390
|
/** Total number of plans created, including active plans (both public and hidden) and archived plans. */
|
|
392
391
|
totalPlans?: number;
|
|
393
392
|
}
|
|
394
|
-
|
|
393
|
+
interface CreatePlanRequest {
|
|
395
394
|
/** Plan details. */
|
|
396
395
|
plan: Plan;
|
|
397
396
|
}
|
|
398
|
-
|
|
397
|
+
interface CreatePlanResponse {
|
|
399
398
|
/** Created plan. */
|
|
400
399
|
plan?: Plan;
|
|
401
400
|
}
|
|
402
|
-
|
|
401
|
+
interface UpdatePlanRequest {
|
|
403
402
|
/** ID of the plan to update. */
|
|
404
403
|
plan: Plan;
|
|
405
404
|
}
|
|
406
|
-
|
|
405
|
+
interface UpdatePlanResponse {
|
|
407
406
|
/** Updated plan. */
|
|
408
407
|
plan?: Plan;
|
|
409
408
|
}
|
|
410
|
-
|
|
409
|
+
interface BuyerCanCancelUpdated {
|
|
411
410
|
/** Pricing plan. */
|
|
412
411
|
plan?: Plan;
|
|
413
412
|
}
|
|
414
|
-
|
|
413
|
+
interface SetPlanVisibilityRequest {
|
|
415
414
|
/**
|
|
416
415
|
* The ID of the plan to either display or hide on a site page.
|
|
417
416
|
* @format GUID
|
|
@@ -420,41 +419,41 @@ export interface SetPlanVisibilityRequest {
|
|
|
420
419
|
/** Whether a plan is visible to members and site visitors. Updates the `public` field. */
|
|
421
420
|
visible: boolean;
|
|
422
421
|
}
|
|
423
|
-
|
|
422
|
+
interface SetPlanVisibilityResponse {
|
|
424
423
|
/** Pricing plan. */
|
|
425
424
|
plan?: Plan;
|
|
426
425
|
}
|
|
427
|
-
|
|
426
|
+
interface MakePlanPrimaryRequest {
|
|
428
427
|
/**
|
|
429
428
|
* Pricing plan ID.
|
|
430
429
|
* @format GUID
|
|
431
430
|
*/
|
|
432
431
|
_id: string;
|
|
433
432
|
}
|
|
434
|
-
|
|
433
|
+
interface MakePlanPrimaryResponse {
|
|
435
434
|
/** Pricing plan. */
|
|
436
435
|
plan?: Plan;
|
|
437
436
|
}
|
|
438
|
-
|
|
437
|
+
interface ClearPrimaryRequest {
|
|
439
438
|
}
|
|
440
|
-
|
|
439
|
+
interface ClearPrimaryResponse {
|
|
441
440
|
}
|
|
442
|
-
|
|
441
|
+
interface ArchivePlanRequest {
|
|
443
442
|
/**
|
|
444
443
|
* ID of the active plan to archive.
|
|
445
444
|
* @format GUID
|
|
446
445
|
*/
|
|
447
446
|
_id: string;
|
|
448
447
|
}
|
|
449
|
-
|
|
448
|
+
interface ArchivePlanResponse {
|
|
450
449
|
/** Archived plan. */
|
|
451
450
|
plan?: Plan;
|
|
452
451
|
}
|
|
453
|
-
|
|
452
|
+
interface PlanArchived {
|
|
454
453
|
/** Pricing plan. */
|
|
455
454
|
plan?: Plan;
|
|
456
455
|
}
|
|
457
|
-
|
|
456
|
+
interface BulkArchivePlanRequest {
|
|
458
457
|
/**
|
|
459
458
|
* List of Plan IDs to archive.
|
|
460
459
|
* @format GUID
|
|
@@ -465,19 +464,19 @@ export interface BulkArchivePlanRequest {
|
|
|
465
464
|
/** Set to `true` to return the `Plan` entity in the response. */
|
|
466
465
|
returnFullEntity?: boolean;
|
|
467
466
|
}
|
|
468
|
-
|
|
467
|
+
interface BulkArchivePlanResponse {
|
|
469
468
|
/** Plans to be archived. */
|
|
470
469
|
results?: BulkPlanResult[];
|
|
471
470
|
/** Bulk action metadata. */
|
|
472
471
|
bulkActionMetadata?: BulkActionMetadata;
|
|
473
472
|
}
|
|
474
|
-
|
|
473
|
+
interface BulkPlanResult {
|
|
475
474
|
/** Item metadata. */
|
|
476
475
|
itemMetadata?: ItemMetadata;
|
|
477
476
|
/** Pricing plan. */
|
|
478
477
|
plan?: Plan;
|
|
479
478
|
}
|
|
480
|
-
|
|
479
|
+
interface ItemMetadata {
|
|
481
480
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
482
481
|
_id?: string | null;
|
|
483
482
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
@@ -487,7 +486,7 @@ export interface ItemMetadata {
|
|
|
487
486
|
/** Details about the error in case of failure. */
|
|
488
487
|
error?: ApplicationError;
|
|
489
488
|
}
|
|
490
|
-
|
|
489
|
+
interface ApplicationError {
|
|
491
490
|
/** Error code. */
|
|
492
491
|
code?: string;
|
|
493
492
|
/** Description of the error. */
|
|
@@ -495,7 +494,7 @@ export interface ApplicationError {
|
|
|
495
494
|
/** Data related to the error. */
|
|
496
495
|
data?: Record<string, any> | null;
|
|
497
496
|
}
|
|
498
|
-
|
|
497
|
+
interface BulkActionMetadata {
|
|
499
498
|
/** Number of items that were successfully processed. */
|
|
500
499
|
totalSuccesses?: number;
|
|
501
500
|
/** Number of items that couldn't be processed. */
|
|
@@ -503,7 +502,7 @@ export interface BulkActionMetadata {
|
|
|
503
502
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
504
503
|
undetailedFailures?: number;
|
|
505
504
|
}
|
|
506
|
-
|
|
505
|
+
interface ArrangePlansRequest {
|
|
507
506
|
/**
|
|
508
507
|
* IDs of all non-archived plans in the order you want them arranged.
|
|
509
508
|
* @format GUID
|
|
@@ -511,27 +510,27 @@ export interface ArrangePlansRequest {
|
|
|
511
510
|
*/
|
|
512
511
|
ids?: string[];
|
|
513
512
|
}
|
|
514
|
-
|
|
513
|
+
interface ArrangePlansResponse {
|
|
515
514
|
}
|
|
516
|
-
|
|
515
|
+
interface CountPlansRequest {
|
|
517
516
|
/** The filter. */
|
|
518
517
|
filter?: Record<string, any> | null;
|
|
519
518
|
/** If true, counts only visible plans (visible and not archived). If no value is specified, all plans are counted. */
|
|
520
519
|
visibility?: boolean | null;
|
|
521
520
|
}
|
|
522
|
-
|
|
521
|
+
interface CountPlansResponse {
|
|
523
522
|
/** Number of plans in the response. */
|
|
524
523
|
count?: number;
|
|
525
524
|
}
|
|
526
|
-
|
|
525
|
+
interface GetPlansPremiumStatusRequest {
|
|
527
526
|
}
|
|
528
|
-
|
|
527
|
+
interface GetPlansPremiumStatusResponse {
|
|
529
528
|
/** True if a site has non-free, non-template plans. */
|
|
530
529
|
hasPaidPlans?: boolean;
|
|
531
530
|
/** True if a site has plans that were created before Pricing Plans became a premium app. */
|
|
532
531
|
hasOldPlans?: boolean;
|
|
533
532
|
}
|
|
534
|
-
|
|
533
|
+
interface SearchPlansRequest {
|
|
535
534
|
/** Query options. */
|
|
536
535
|
query?: QueryV2;
|
|
537
536
|
/**
|
|
@@ -540,13 +539,13 @@ export interface SearchPlansRequest {
|
|
|
540
539
|
*/
|
|
541
540
|
searchPhrase?: string | null;
|
|
542
541
|
}
|
|
543
|
-
|
|
542
|
+
interface SearchPlansResponse {
|
|
544
543
|
/** List of pricing plans that match the specified filter and search phrase. */
|
|
545
544
|
plans?: Plan[];
|
|
546
545
|
/** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
|
|
547
546
|
pagingMetadata?: PagingMetadataV2;
|
|
548
547
|
}
|
|
549
|
-
|
|
548
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
550
549
|
createdEvent?: EntityCreatedEvent;
|
|
551
550
|
updatedEvent?: EntityUpdatedEvent;
|
|
552
551
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -581,19 +580,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
581
580
|
entityEventSequence?: string | null;
|
|
582
581
|
}
|
|
583
582
|
/** @oneof */
|
|
584
|
-
|
|
583
|
+
interface DomainEventBodyOneOf {
|
|
585
584
|
createdEvent?: EntityCreatedEvent;
|
|
586
585
|
updatedEvent?: EntityUpdatedEvent;
|
|
587
586
|
deletedEvent?: EntityDeletedEvent;
|
|
588
587
|
actionEvent?: ActionEvent;
|
|
589
588
|
}
|
|
590
|
-
|
|
589
|
+
interface EntityCreatedEvent {
|
|
591
590
|
entity?: string;
|
|
592
591
|
}
|
|
593
|
-
|
|
592
|
+
interface RestoreInfo {
|
|
594
593
|
deletedDate?: Date | null;
|
|
595
594
|
}
|
|
596
|
-
|
|
595
|
+
interface EntityUpdatedEvent {
|
|
597
596
|
/**
|
|
598
597
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
599
598
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -601,14 +600,14 @@ export interface EntityUpdatedEvent {
|
|
|
601
600
|
*/
|
|
602
601
|
currentEntity?: string;
|
|
603
602
|
}
|
|
604
|
-
|
|
603
|
+
interface EntityDeletedEvent {
|
|
605
604
|
/** Entity that was deleted. */
|
|
606
605
|
deletedEntity?: string | null;
|
|
607
606
|
}
|
|
608
|
-
|
|
607
|
+
interface ActionEvent {
|
|
609
608
|
body?: string;
|
|
610
609
|
}
|
|
611
|
-
|
|
610
|
+
interface MessageEnvelope {
|
|
612
611
|
/**
|
|
613
612
|
* App instance ID.
|
|
614
613
|
* @format GUID
|
|
@@ -624,7 +623,7 @@ export interface MessageEnvelope {
|
|
|
624
623
|
/** Stringify payload. */
|
|
625
624
|
data?: string;
|
|
626
625
|
}
|
|
627
|
-
|
|
626
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
628
627
|
/**
|
|
629
628
|
* ID of a site visitor that has not logged in to the site.
|
|
630
629
|
* @format GUID
|
|
@@ -649,7 +648,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
649
648
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
650
649
|
}
|
|
651
650
|
/** @oneof */
|
|
652
|
-
|
|
651
|
+
interface IdentificationDataIdOneOf {
|
|
653
652
|
/**
|
|
654
653
|
* ID of a site visitor that has not logged in to the site.
|
|
655
654
|
* @format GUID
|
|
@@ -671,7 +670,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
671
670
|
*/
|
|
672
671
|
appId?: string;
|
|
673
672
|
}
|
|
674
|
-
|
|
673
|
+
declare enum WebhookIdentityType {
|
|
675
674
|
UNKNOWN = "UNKNOWN",
|
|
676
675
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
677
676
|
MEMBER = "MEMBER",
|
|
@@ -679,8 +678,8 @@ export declare enum WebhookIdentityType {
|
|
|
679
678
|
APP = "APP"
|
|
680
679
|
}
|
|
681
680
|
/** @enumType */
|
|
682
|
-
|
|
683
|
-
|
|
681
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
682
|
+
interface BaseEventMetadata {
|
|
684
683
|
/**
|
|
685
684
|
* App instance ID.
|
|
686
685
|
* @format GUID
|
|
@@ -694,7 +693,7 @@ export interface BaseEventMetadata {
|
|
|
694
693
|
/** The identification type and identity data. */
|
|
695
694
|
identity?: IdentificationData;
|
|
696
695
|
}
|
|
697
|
-
|
|
696
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
698
697
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
699
698
|
_id?: string;
|
|
700
699
|
/**
|
|
@@ -724,144 +723,23 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
724
723
|
*/
|
|
725
724
|
entityEventSequence?: string | null;
|
|
726
725
|
}
|
|
727
|
-
|
|
726
|
+
interface PlanBuyerCanCancelUpdatedEnvelope {
|
|
728
727
|
data: BuyerCanCancelUpdated;
|
|
729
728
|
metadata: EventMetadata;
|
|
730
729
|
}
|
|
731
|
-
|
|
732
|
-
* Triggered when a plan's `buyerCanCancel` field is updated.
|
|
733
|
-
* @permissionScope Read Pricing Plans
|
|
734
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
735
|
-
* @permissionScope Manage Stores
|
|
736
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
737
|
-
* @permissionScope Manage Events
|
|
738
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
739
|
-
* @permissionScope Manage Challenges
|
|
740
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
741
|
-
* @permissionScope Manage Blog
|
|
742
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
743
|
-
* @permissionScope Manage Pricing Plans
|
|
744
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
745
|
-
* @permissionId PRICING_PLANS.READ_PLANS
|
|
746
|
-
* @webhook
|
|
747
|
-
* @eventType wix.pricing_plans.plan_buyer_can_cancel_updated
|
|
748
|
-
* @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2
|
|
749
|
-
* @slug buyer_can_cancel_updated
|
|
750
|
-
*/
|
|
751
|
-
export declare function onPlanBuyerCanCancelUpdated(handler: (event: PlanBuyerCanCancelUpdatedEnvelope) => void | Promise<void>): void;
|
|
752
|
-
export interface PlanCreatedEnvelope {
|
|
730
|
+
interface PlanCreatedEnvelope {
|
|
753
731
|
entity: Plan;
|
|
754
732
|
metadata: EventMetadata;
|
|
755
733
|
}
|
|
756
|
-
|
|
757
|
-
* Triggered when a pricing plan is created.
|
|
758
|
-
* @permissionScope Read Pricing Plans
|
|
759
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
760
|
-
* @permissionScope Manage Stores
|
|
761
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
762
|
-
* @permissionScope Manage Events
|
|
763
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
764
|
-
* @permissionScope Manage Challenges
|
|
765
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
766
|
-
* @permissionScope Manage Blog
|
|
767
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
768
|
-
* @permissionScope Manage Pricing Plans
|
|
769
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
770
|
-
* @permissionId PRICING_PLANS.READ_PLANS
|
|
771
|
-
* @webhook
|
|
772
|
-
* @eventType wix.pricing_plans.plan_created
|
|
773
|
-
* @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2
|
|
774
|
-
* @slug created
|
|
775
|
-
*/
|
|
776
|
-
export declare function onPlanCreated(handler: (event: PlanCreatedEnvelope) => void | Promise<void>): void;
|
|
777
|
-
export interface PlanArchivedEnvelope {
|
|
734
|
+
interface PlanArchivedEnvelope {
|
|
778
735
|
data: PlanArchived;
|
|
779
736
|
metadata: EventMetadata;
|
|
780
737
|
}
|
|
781
|
-
|
|
782
|
-
* Triggered when a pricing plan is archived.
|
|
783
|
-
* @permissionScope Read Pricing Plans
|
|
784
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
785
|
-
* @permissionScope Manage Stores
|
|
786
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
787
|
-
* @permissionScope Manage Events
|
|
788
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
789
|
-
* @permissionScope Manage Challenges
|
|
790
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
791
|
-
* @permissionScope Manage Blog
|
|
792
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
793
|
-
* @permissionScope Manage Pricing Plans
|
|
794
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
795
|
-
* @permissionId PRICING_PLANS.READ_PLANS
|
|
796
|
-
* @webhook
|
|
797
|
-
* @eventType wix.pricing_plans.plan_plan_archived
|
|
798
|
-
* @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2
|
|
799
|
-
* @slug plan_archived
|
|
800
|
-
*/
|
|
801
|
-
export declare function onPlanArchived(handler: (event: PlanArchivedEnvelope) => void | Promise<void>): void;
|
|
802
|
-
export interface PlanUpdatedEnvelope {
|
|
738
|
+
interface PlanUpdatedEnvelope {
|
|
803
739
|
entity: Plan;
|
|
804
740
|
metadata: EventMetadata;
|
|
805
741
|
}
|
|
806
|
-
|
|
807
|
-
* Triggered when a pricing plan is updated.
|
|
808
|
-
* @permissionScope Read Pricing Plans
|
|
809
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
810
|
-
* @permissionScope Manage Stores
|
|
811
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
812
|
-
* @permissionScope Manage Events
|
|
813
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
814
|
-
* @permissionScope Manage Challenges
|
|
815
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
816
|
-
* @permissionScope Manage Blog
|
|
817
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
818
|
-
* @permissionScope Manage Pricing Plans
|
|
819
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
820
|
-
* @permissionId PRICING_PLANS.READ_PLANS
|
|
821
|
-
* @webhook
|
|
822
|
-
* @eventType wix.pricing_plans.plan_updated
|
|
823
|
-
* @serviceIdentifier com.wixpress.membership.v2.plans.PlansServiceV2
|
|
824
|
-
* @slug updated
|
|
825
|
-
*/
|
|
826
|
-
export declare function onPlanUpdated(handler: (event: PlanUpdatedEnvelope) => void | Promise<void>): void;
|
|
827
|
-
type PlanNonNullablePaths = `_id` | `perks.values` | `pricing.subscription.cycleDuration.unit` | `pricing.price.value` | `pricing.price.currency` | `archived` | `primary` | `hasOrders`;
|
|
828
|
-
/**
|
|
829
|
-
* Retrieves a list of up to 100 public pricing plans. Public plans are visible plans that are available to site visitors and can be purchased.
|
|
830
|
-
* @public
|
|
831
|
-
* @param options - Options for filtering and paging the list of public plans.
|
|
832
|
-
* @permissionId PRICING_PLANS.READ_PUBLIC_PLANS
|
|
833
|
-
* @permissionScope Read Pricing Plans
|
|
834
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
835
|
-
* @permissionScope Manage Stores
|
|
836
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
837
|
-
* @permissionScope Manage Orders
|
|
838
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
839
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
840
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
841
|
-
* @permissionScope Read Orders
|
|
842
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
843
|
-
* @permissionScope Manage Events
|
|
844
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
845
|
-
* @permissionScope Manage Challenges
|
|
846
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
847
|
-
* @permissionScope Manage Portfolio
|
|
848
|
-
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
849
|
-
* @permissionScope Manage Blog
|
|
850
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
851
|
-
* @permissionScope Access Verticals by Automations
|
|
852
|
-
* @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
|
|
853
|
-
* @permissionScope Manage Pricing Plans
|
|
854
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
855
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
856
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
857
|
-
* @permissionScope Set Up Automations
|
|
858
|
-
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
859
|
-
* @applicableIdentity APP
|
|
860
|
-
* @applicableIdentity VISITOR
|
|
861
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPublicPlans
|
|
862
|
-
*/
|
|
863
|
-
export declare function listPublicPlans(options?: ListPublicPlansOptions): Promise<NonNullablePaths<ListPublicPlansResponse, `plans` | `plans.${number}._id` | `plans.${number}.pricing.subscription.cycleDuration.unit` | `plans.${number}.pricing.price.value` | `plans.${number}.pricing.price.currency` | `plans.${number}.primary`>>;
|
|
864
|
-
export interface ListPublicPlansOptions {
|
|
742
|
+
interface ListPublicPlansOptions {
|
|
865
743
|
/**
|
|
866
744
|
* Number of items to list. Defaults to `75`. See limits ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)).
|
|
867
745
|
* @min 1
|
|
@@ -877,56 +755,6 @@ export interface ListPublicPlansOptions {
|
|
|
877
755
|
*/
|
|
878
756
|
planIds?: string[];
|
|
879
757
|
}
|
|
880
|
-
/**
|
|
881
|
-
* Creates a query to retrieve a list of public pricing plans.
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
* The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.
|
|
885
|
-
*
|
|
886
|
-
* The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.
|
|
887
|
-
*
|
|
888
|
-
* 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.
|
|
889
|
-
*
|
|
890
|
-
* `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:
|
|
891
|
-
* - [`skip`](#plansquerybuilder/skip): `0`
|
|
892
|
-
* - [`limit`](#plansquerybuilder/limit): `50`
|
|
893
|
-
*
|
|
894
|
-
* 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.
|
|
895
|
-
*
|
|
896
|
-
* 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).
|
|
897
|
-
* @public
|
|
898
|
-
* @permissionScope Read Pricing Plans
|
|
899
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
900
|
-
* @permissionScope Manage Stores
|
|
901
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
902
|
-
* @permissionScope Manage Orders
|
|
903
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
904
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
905
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
906
|
-
* @permissionScope Read Orders
|
|
907
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
908
|
-
* @permissionScope Manage Events
|
|
909
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
910
|
-
* @permissionScope Manage Challenges
|
|
911
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
912
|
-
* @permissionScope Manage Portfolio
|
|
913
|
-
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
914
|
-
* @permissionScope Manage Blog
|
|
915
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
916
|
-
* @permissionScope Access Verticals by Automations
|
|
917
|
-
* @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
|
|
918
|
-
* @permissionScope Manage Pricing Plans
|
|
919
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
920
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
921
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
922
|
-
* @permissionScope Set Up Automations
|
|
923
|
-
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
924
|
-
* @permissionId PRICING_PLANS.READ_PUBLIC_PLANS
|
|
925
|
-
* @applicableIdentity APP
|
|
926
|
-
* @applicableIdentity VISITOR
|
|
927
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans
|
|
928
|
-
*/
|
|
929
|
-
export declare function queryPublicPlans(): PlansQueryBuilder;
|
|
930
758
|
interface QueryOffsetResult {
|
|
931
759
|
currentPage: number | undefined;
|
|
932
760
|
totalPages: number | undefined;
|
|
@@ -936,13 +764,13 @@ interface QueryOffsetResult {
|
|
|
936
764
|
length: number;
|
|
937
765
|
pageSize: number;
|
|
938
766
|
}
|
|
939
|
-
|
|
767
|
+
interface PlansQueryResult extends QueryOffsetResult {
|
|
940
768
|
items: PublicPlan[];
|
|
941
769
|
query: PlansQueryBuilder;
|
|
942
770
|
next: () => Promise<PlansQueryResult>;
|
|
943
771
|
prev: () => Promise<PlansQueryResult>;
|
|
944
772
|
}
|
|
945
|
-
|
|
773
|
+
interface PlansQueryBuilder {
|
|
946
774
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
947
775
|
* @param value - Value to compare against.
|
|
948
776
|
*/
|
|
@@ -987,53 +815,7 @@ export interface PlansQueryBuilder {
|
|
|
987
815
|
skip: (skip: number) => PlansQueryBuilder;
|
|
988
816
|
find: () => Promise<PlansQueryResult>;
|
|
989
817
|
}
|
|
990
|
-
|
|
991
|
-
* Retrieves a pricing plan by ID.
|
|
992
|
-
* @param _id - Plan ID.
|
|
993
|
-
* @public
|
|
994
|
-
* @requiredField _id
|
|
995
|
-
* @permissionId PRICING_PLANS.READ_PLANS
|
|
996
|
-
* @permissionScope Read Pricing Plans
|
|
997
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
998
|
-
* @permissionScope Manage Stores
|
|
999
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1000
|
-
* @permissionScope Manage Events
|
|
1001
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1002
|
-
* @permissionScope Manage Challenges
|
|
1003
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1004
|
-
* @permissionScope Manage Blog
|
|
1005
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
1006
|
-
* @permissionScope Manage Pricing Plans
|
|
1007
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1008
|
-
* @applicableIdentity APP
|
|
1009
|
-
* @returns Pricing plan.
|
|
1010
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlan
|
|
1011
|
-
*/
|
|
1012
|
-
export declare function getPlan(_id: string): Promise<NonNullablePaths<Plan, PlanNonNullablePaths>>;
|
|
1013
|
-
/**
|
|
1014
|
-
* Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).
|
|
1015
|
-
* @public
|
|
1016
|
-
* @param options - Options for filtering and paging the list of plans.
|
|
1017
|
-
* @permissionId PRICING_PLANS.READ_PLANS
|
|
1018
|
-
* @permissionScope Read Pricing Plans
|
|
1019
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
1020
|
-
* @permissionScope Manage Stores
|
|
1021
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1022
|
-
* @permissionScope Manage Events
|
|
1023
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1024
|
-
* @permissionScope Manage Challenges
|
|
1025
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1026
|
-
* @permissionScope Manage Blog
|
|
1027
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
1028
|
-
* @permissionScope Manage Pricing Plans
|
|
1029
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1030
|
-
* @applicableIdentity APP
|
|
1031
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPlans
|
|
1032
|
-
*/
|
|
1033
|
-
export declare function listPlans(options?: ListPlansOptions): Promise<NonNullablePaths<ListPlansResponse, {
|
|
1034
|
-
[P in PlanNonNullablePaths]: `plans.${number}.${P}`;
|
|
1035
|
-
}[PlanNonNullablePaths]>>;
|
|
1036
|
-
export interface ListPlansOptions {
|
|
818
|
+
interface ListPlansOptions {
|
|
1037
819
|
/** Archived filter. Defaults to `ACTIVE` (not archived) only. */
|
|
1038
820
|
archived?: ArchivedFilterWithLiterals;
|
|
1039
821
|
/** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */
|
|
@@ -1053,67 +835,7 @@ export interface ListPlansOptions {
|
|
|
1053
835
|
*/
|
|
1054
836
|
planIds?: string[];
|
|
1055
837
|
}
|
|
1056
|
-
|
|
1057
|
-
* Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.
|
|
1058
|
-
* @public
|
|
1059
|
-
* @permissionId PRICING_PLANS.READ_PLANS
|
|
1060
|
-
* @permissionScope Read Pricing Plans
|
|
1061
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
|
|
1062
|
-
* @permissionScope Manage Stores
|
|
1063
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1064
|
-
* @permissionScope Manage Events
|
|
1065
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1066
|
-
* @permissionScope Manage Challenges
|
|
1067
|
-
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1068
|
-
* @permissionScope Manage Blog
|
|
1069
|
-
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
1070
|
-
* @permissionScope Manage Pricing Plans
|
|
1071
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1072
|
-
* @applicableIdentity APP
|
|
1073
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlanStats
|
|
1074
|
-
*/
|
|
1075
|
-
export declare function getPlanStats(): Promise<NonNullablePaths<GetPlanStatsResponse, `totalPlans`>>;
|
|
1076
|
-
/**
|
|
1077
|
-
* Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:
|
|
1078
|
-
* - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.
|
|
1079
|
-
* - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.
|
|
1080
|
-
* - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).
|
|
1081
|
-
* Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.
|
|
1082
|
-
* @public
|
|
1083
|
-
* @requiredField plan
|
|
1084
|
-
* @requiredField plan.name
|
|
1085
|
-
* @requiredField plan.pricing
|
|
1086
|
-
* @requiredField plan.pricing.pricingModel
|
|
1087
|
-
* @requiredField plan.pricing.pricingModel.singlePaymentForDuration.count
|
|
1088
|
-
* @requiredField plan.pricing.pricingModel.subscription.cycleCount
|
|
1089
|
-
* @requiredField plan.pricing.pricingModel.subscription.cycleDuration
|
|
1090
|
-
* @requiredField plan.pricing.pricingModel.subscription.cycleDuration.count
|
|
1091
|
-
* @param plan - Information for the plan being created.
|
|
1092
|
-
* @permissionId PRICING_PLANS.MANAGE_PLANS
|
|
1093
|
-
* @permissionScope Manage Pricing Plans
|
|
1094
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1095
|
-
* @applicableIdentity APP
|
|
1096
|
-
* @returns Created plan.
|
|
1097
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.CreatePlan
|
|
1098
|
-
*/
|
|
1099
|
-
export declare function createPlan(plan: NonNullablePaths<Plan, `name` | `pricing` | `pricing.singlePaymentForDuration.count` | `pricing.subscription.cycleCount` | `pricing.subscription.cycleDuration` | `pricing.subscription.cycleDuration.count`>): Promise<NonNullablePaths<Plan, PlanNonNullablePaths>>;
|
|
1100
|
-
/**
|
|
1101
|
-
* Updates a pricing plan.
|
|
1102
|
-
* Updating a plan doesn't impact existing orders made for the plan. All orders keep the details of the original plan that was active at the time of purchase.
|
|
1103
|
-
* @public
|
|
1104
|
-
* @requiredField _id
|
|
1105
|
-
* @requiredField plan
|
|
1106
|
-
* @param _id - ID of the plan to update.
|
|
1107
|
-
* @param options - Options for updating the plan.
|
|
1108
|
-
* @permissionId PRICING_PLANS.MANAGE_PLANS
|
|
1109
|
-
* @permissionScope Manage Pricing Plans
|
|
1110
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1111
|
-
* @applicableIdentity APP
|
|
1112
|
-
* @returns Updated plan.
|
|
1113
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.UpdatePlan
|
|
1114
|
-
*/
|
|
1115
|
-
export declare function updatePlan(_id: string, plan: UpdatePlan): Promise<NonNullablePaths<Plan, PlanNonNullablePaths>>;
|
|
1116
|
-
export interface UpdatePlan {
|
|
838
|
+
interface UpdatePlan {
|
|
1117
839
|
/**
|
|
1118
840
|
* Plan ID.
|
|
1119
841
|
* @format GUID
|
|
@@ -1196,68 +918,5 @@ export interface UpdatePlan {
|
|
|
1196
918
|
*/
|
|
1197
919
|
formId?: string | null;
|
|
1198
920
|
}
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
* By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.
|
|
1202
|
-
* As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible). (An archived plan always remains archived and can't be made active again.)
|
|
1203
|
-
* Changing a plan’s visibility doesn't impact existing orders for the plan. All orders for hidden plans are still active and keep their perks.
|
|
1204
|
-
* @param visible - Whether a plan is visible to members and site visitors. Updates the `public` field.
|
|
1205
|
-
* @public
|
|
1206
|
-
* @requiredField _id
|
|
1207
|
-
* @requiredField visible
|
|
1208
|
-
* @param _id - The ID of the plan to either display or hide on the site page.
|
|
1209
|
-
* @param options - Plan visibility options.
|
|
1210
|
-
* @permissionId PRICING_PLANS.MANAGE_PLANS
|
|
1211
|
-
* @permissionScope Manage Pricing Plans
|
|
1212
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1213
|
-
* @applicableIdentity APP
|
|
1214
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.SetPlanVisibility
|
|
1215
|
-
*/
|
|
1216
|
-
export declare function setPlanVisibility(_id: string, visible: boolean): Promise<NonNullablePaths<SetPlanVisibilityResponse, {
|
|
1217
|
-
[P in PlanNonNullablePaths]: `plan.${P}`;
|
|
1218
|
-
}[PlanNonNullablePaths]>>;
|
|
1219
|
-
/**
|
|
1220
|
-
* Marks a pricing plan as the primary pricing plan. When viewing pricing plans on a site, the primary plan is highlighted with a customizable ribbon. Only a single plan can be marked as a primary plan at any given time. If there is an existing plan marked as primary, calling Make Plan Primary causes the existing primary plan to lose its primary status.
|
|
1221
|
-
* @public
|
|
1222
|
-
* @requiredField _id
|
|
1223
|
-
* @param _id - ID of the pricing plan to set as the primary plan.
|
|
1224
|
-
* @permissionId PRICING_PLANS.MANAGE_PLANS
|
|
1225
|
-
* @permissionScope Manage Pricing Plans
|
|
1226
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1227
|
-
* @applicableIdentity APP
|
|
1228
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.MakePlanPrimary
|
|
1229
|
-
*/
|
|
1230
|
-
export declare function makePlanPrimary(_id: string): Promise<NonNullablePaths<MakePlanPrimaryResponse, {
|
|
1231
|
-
[P in PlanNonNullablePaths]: `plan.${P}`;
|
|
1232
|
-
}[PlanNonNullablePaths]>>;
|
|
1233
|
-
/**
|
|
1234
|
-
* Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.
|
|
1235
|
-
* @public
|
|
1236
|
-
* @permissionId PRICING_PLANS.MANAGE_PLANS
|
|
1237
|
-
* @permissionScope Manage Pricing Plans
|
|
1238
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1239
|
-
* @applicableIdentity APP
|
|
1240
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ClearPrimary
|
|
1241
|
-
*/
|
|
1242
|
-
export declare function clearPrimary(): Promise<void>;
|
|
1243
|
-
/**
|
|
1244
|
-
* Archives a single plan.
|
|
1245
|
-
* When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.
|
|
1246
|
-
* This is because the plan's `public` property is automatically set to `false`.
|
|
1247
|
-
* Archived plans can't be purchased or reactivated.
|
|
1248
|
-
* Plan archiving doesn't impact existing orders made for the plan. All orders for the plan are still active and keep their perks, payment options, and terms.
|
|
1249
|
-
* Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.
|
|
1250
|
-
* > **Note:** An attempt to archive an already-archived plan throws an error.
|
|
1251
|
-
* @public
|
|
1252
|
-
* @requiredField _id
|
|
1253
|
-
* @param _id - ID of the active plan to archive.
|
|
1254
|
-
* @permissionId PRICING_PLANS.MANAGE_PLANS
|
|
1255
|
-
* @permissionScope Manage Pricing Plans
|
|
1256
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1257
|
-
* @applicableIdentity APP
|
|
1258
|
-
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ArchivePlan
|
|
1259
|
-
*/
|
|
1260
|
-
export declare function archivePlan(_id: string): Promise<NonNullablePaths<ArchivePlanResponse, {
|
|
1261
|
-
[P in PlanNonNullablePaths]: `plan.${P}`;
|
|
1262
|
-
}[PlanNonNullablePaths]>>;
|
|
1263
|
-
export {};
|
|
921
|
+
|
|
922
|
+
export { type BulkArchivePlanRequest as $, type ArchivePlanResponse as A, type GetPlanResponse as B, type Cursors as C, type Duration as D, type ListPlansRequest as E, type FeeConfig as F, type GetPlanStatsResponse as G, type GetPlanStatsRequest as H, type CreatePlanRequest as I, type CreatePlanResponse as J, type UpdatePlanRequest as K, type ListPublicPlansOptions as L, type MakePlanPrimaryResponse as M, type UpdatePlanResponse as N, type BuyerCanCancelUpdated as O, type PlansQueryBuilder as P, type QueryPublicPlansRequest as Q, type Recurrence as R, type SetPlanVisibilityResponse as S, type SetPlanVisibilityRequest as T, type UpdatePlan as U, type MakePlanPrimaryRequest as V, WebhookIdentityType as W, type ClearPrimaryRequest as X, type ClearPrimaryResponse as Y, type ArchivePlanRequest as Z, type PlanArchived as _, type ListPublicPlansResponse as a, type BulkArchivePlanResponse as a0, type BulkPlanResult as a1, type ItemMetadata as a2, type ApplicationError as a3, type BulkActionMetadata as a4, type ArrangePlansRequest as a5, type ArrangePlansResponse as a6, type CountPlansRequest as a7, type CountPlansResponse as a8, type GetPlansPremiumStatusRequest as a9, type GetPlansPremiumStatusResponse as aa, type SearchPlansRequest as ab, type SearchPlansResponse as ac, type DomainEvent as ad, type DomainEventBodyOneOf as ae, type EntityCreatedEvent as af, type RestoreInfo as ag, type EntityUpdatedEvent as ah, type EntityDeletedEvent as ai, type ActionEvent as aj, type MessageEnvelope as ak, type IdentificationData as al, type IdentificationDataIdOneOf as am, type BaseEventMetadata as an, type EventMetadata as ao, type PlansQueryResult as ap, type Plan as b, type ListPlansOptions as c, type ListPlansResponse as d, type PlanBuyerCanCancelUpdatedEnvelope as e, type PlanCreatedEnvelope as f, type PlanArchivedEnvelope as g, type PlanUpdatedEnvelope as h, PeriodUnit as i, AppliedAt as j, SortOrder as k, ArchivedFilter as l, PublicFilter as m, type StringList as n, type Pricing as o, type PricingPricingModelOneOf as p, type Money as q, type Fee as r, type ListPublicPlansRequest as s, type PublicPlan as t, type PagingMetadataV2 as u, type QueryV2 as v, type Sorting as w, type Paging as x, type QueryPublicPlansResponse as y, type GetPlanRequest as z };
|