@wix/auto_sdk_pricing-plans_plans 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/pricing-plans-v2-plan-plans.context.d.ts +36 -0
  11. package/build/cjs/src/pricing-plans-v2-plan-plans.context.js +45 -0
  12. package/build/cjs/src/pricing-plans-v2-plan-plans.context.js.map +1 -0
  13. package/build/cjs/src/pricing-plans-v2-plan-plans.http.d.ts +62 -0
  14. package/build/cjs/src/pricing-plans-v2-plan-plans.http.js +448 -0
  15. package/build/cjs/src/pricing-plans-v2-plan-plans.http.js.map +1 -0
  16. package/build/cjs/src/pricing-plans-v2-plan-plans.meta.d.ts +33 -0
  17. package/build/cjs/src/pricing-plans-v2-plan-plans.meta.js +237 -0
  18. package/build/cjs/src/pricing-plans-v2-plan-plans.meta.js.map +1 -0
  19. package/build/cjs/src/pricing-plans-v2-plan-plans.public.d.ts +130 -0
  20. package/build/cjs/src/pricing-plans-v2-plan-plans.public.js +123 -0
  21. package/build/cjs/src/pricing-plans-v2-plan-plans.public.js.map +1 -0
  22. package/build/cjs/src/pricing-plans-v2-plan-plans.types.d.ts +618 -0
  23. package/build/cjs/src/pricing-plans-v2-plan-plans.types.js +54 -0
  24. package/build/cjs/src/pricing-plans-v2-plan-plans.types.js.map +1 -0
  25. package/build/cjs/src/pricing-plans-v2-plan-plans.universal.d.ts +1069 -0
  26. package/build/cjs/src/pricing-plans-v2-plan-plans.universal.js +557 -0
  27. package/build/cjs/src/pricing-plans-v2-plan-plans.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/pricing-plans-v2-plan-plans.context.d.ts +36 -0
  39. package/build/es/src/pricing-plans-v2-plan-plans.context.js +36 -0
  40. package/build/es/src/pricing-plans-v2-plan-plans.context.js.map +1 -0
  41. package/build/es/src/pricing-plans-v2-plan-plans.http.d.ts +62 -0
  42. package/build/es/src/pricing-plans-v2-plan-plans.http.js +434 -0
  43. package/build/es/src/pricing-plans-v2-plan-plans.http.js.map +1 -0
  44. package/build/es/src/pricing-plans-v2-plan-plans.meta.d.ts +33 -0
  45. package/build/es/src/pricing-plans-v2-plan-plans.meta.js +200 -0
  46. package/build/es/src/pricing-plans-v2-plan-plans.meta.js.map +1 -0
  47. package/build/es/src/pricing-plans-v2-plan-plans.public.d.ts +130 -0
  48. package/build/es/src/pricing-plans-v2-plan-plans.public.js +103 -0
  49. package/build/es/src/pricing-plans-v2-plan-plans.public.js.map +1 -0
  50. package/build/es/src/pricing-plans-v2-plan-plans.types.d.ts +618 -0
  51. package/build/es/src/pricing-plans-v2-plan-plans.types.js +51 -0
  52. package/build/es/src/pricing-plans-v2-plan-plans.types.js.map +1 -0
  53. package/build/es/src/pricing-plans-v2-plan-plans.universal.d.ts +1069 -0
  54. package/build/es/src/pricing-plans-v2-plan-plans.universal.js +520 -0
  55. package/build/es/src/pricing-plans-v2-plan-plans.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.context.d.ts +36 -0
  66. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.context.js +45 -0
  67. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.context.js.map +1 -0
  68. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.http.d.ts +62 -0
  69. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.http.js +448 -0
  70. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.http.js.map +1 -0
  71. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.meta.d.ts +33 -0
  72. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.meta.js +237 -0
  73. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.meta.js.map +1 -0
  74. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.public.d.ts +130 -0
  75. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.public.js +123 -0
  76. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.public.js.map +1 -0
  77. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.types.d.ts +618 -0
  78. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.types.js +54 -0
  79. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.types.js.map +1 -0
  80. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.d.ts +1069 -0
  81. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.js +557 -0
  82. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/pricing-plans-v2-plan-plans.context.d.ts +36 -0
  93. package/build/internal/es/src/pricing-plans-v2-plan-plans.context.js +36 -0
  94. package/build/internal/es/src/pricing-plans-v2-plan-plans.context.js.map +1 -0
  95. package/build/internal/es/src/pricing-plans-v2-plan-plans.http.d.ts +62 -0
  96. package/build/internal/es/src/pricing-plans-v2-plan-plans.http.js +434 -0
  97. package/build/internal/es/src/pricing-plans-v2-plan-plans.http.js.map +1 -0
  98. package/build/internal/es/src/pricing-plans-v2-plan-plans.meta.d.ts +33 -0
  99. package/build/internal/es/src/pricing-plans-v2-plan-plans.meta.js +200 -0
  100. package/build/internal/es/src/pricing-plans-v2-plan-plans.meta.js.map +1 -0
  101. package/build/internal/es/src/pricing-plans-v2-plan-plans.public.d.ts +130 -0
  102. package/build/internal/es/src/pricing-plans-v2-plan-plans.public.js +103 -0
  103. package/build/internal/es/src/pricing-plans-v2-plan-plans.public.js.map +1 -0
  104. package/build/internal/es/src/pricing-plans-v2-plan-plans.types.d.ts +618 -0
  105. package/build/internal/es/src/pricing-plans-v2-plan-plans.types.js +51 -0
  106. package/build/internal/es/src/pricing-plans-v2-plan-plans.types.js.map +1 -0
  107. package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.d.ts +1069 -0
  108. package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.js +520 -0
  109. package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1069 @@
1
+ /** Information about the pricing plan. */
2
+ export interface Plan {
3
+ /**
4
+ * Plan ID.
5
+ * @readonly
6
+ */
7
+ _id?: string;
8
+ /** Plan name. */
9
+ name?: string | null;
10
+ /** Plan description. */
11
+ description?: string | null;
12
+ /** List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday." */
13
+ perks?: StringList;
14
+ /** Plan price, payment schedule, and expiration. */
15
+ pricing?: Pricing;
16
+ /** Whether the plan is public (visible to site visitors and members). */
17
+ public?: boolean | null;
18
+ /**
19
+ * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.
20
+ * @readonly
21
+ */
22
+ archived?: boolean;
23
+ /**
24
+ * Whether the plan is marked as primary.
25
+ * @readonly
26
+ */
27
+ primary?: boolean;
28
+ /**
29
+ * Whether the plan has any orders (including pending and unpaid orders).
30
+ * @readonly
31
+ */
32
+ hasOrders?: boolean;
33
+ /**
34
+ * Date plan was created.
35
+ * @readonly
36
+ */
37
+ _createdDate?: Date | null;
38
+ /**
39
+ * Date plan was last updated.
40
+ * @readonly
41
+ */
42
+ _updatedDate?: Date | null;
43
+ /**
44
+ * URL-friendly version of plan name. Unique across all plans in the same site.
45
+ * @readonly
46
+ */
47
+ slug?: string | null;
48
+ /**
49
+ * Number of times the same buyer can purchase the plan. Currently limited to support:
50
+ * - Empty value or a value of `0`, meaning no limitation.
51
+ * - Value of `1`, meaning limited to 1 purchase per buyer.
52
+ */
53
+ maxPurchasesPerBuyer?: number | null;
54
+ /** Whether the buyer can start the plan at a later date. Defaults to false. */
55
+ allowFutureStartDate?: boolean | null;
56
+ /**
57
+ * Whether the buyer is allowed to cancel their plan. Defaults to false.
58
+ * If false, calling Request Cancellation returns an error.
59
+ */
60
+ buyerCanCancel?: boolean | null;
61
+ /** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
62
+ termsAndConditions?: string | null;
63
+ /**
64
+ * ID of the form associated with the plan at checkout.
65
+ *
66
+ * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
67
+ */
68
+ formId?: string | null;
69
+ }
70
+ /** This wrapper type exists to distinguish an empty string list from no list at all in update requests. */
71
+ export interface StringList {
72
+ values?: string[];
73
+ }
74
+ /** Plan pricing information. Includes the price of the plan and payment details. */
75
+ export interface Pricing extends PricingPricingModelOneOf {
76
+ /** 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. */
77
+ subscription?: Recurrence;
78
+ /** 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. */
79
+ singlePaymentForDuration?: Duration;
80
+ /** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */
81
+ singlePaymentUnlimited?: boolean | null;
82
+ /** Amount for a single payment. For subscriptions, this is the amount to pay each payment cycle and it is required. For plans that are not recurring plans, it is the single payment amount for the whole subscription. */
83
+ price?: Money;
84
+ /** Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. Set to `0` to remove the free trial. */
85
+ freeTrialDays?: number | null;
86
+ }
87
+ /** @oneof */
88
+ export interface PricingPricingModelOneOf {
89
+ /** 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. */
90
+ subscription?: Recurrence;
91
+ /** 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. */
92
+ singlePaymentForDuration?: Duration;
93
+ /** Pricing model indicating the plan is paid in a single payment. The plan is valid until canceled. */
94
+ singlePaymentUnlimited?: boolean | null;
95
+ }
96
+ /** An object specifying how often and for how long payments recur (may be forever). */
97
+ export interface Recurrence {
98
+ /**
99
+ * Number of payment cycles the subscription is valid for.
100
+ * `0` for unlimited plans or for plans that are valid until canceled.
101
+ */
102
+ cycleDuration?: Duration;
103
+ /**
104
+ * Length of a payment cycle. For example, 1 month to have monthly payments.
105
+ * Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
106
+ * Currently, only a value of `1` is supported.
107
+ */
108
+ cycleCount?: number | null;
109
+ }
110
+ /** A duration expressed in number of time units. */
111
+ export interface Duration {
112
+ /** Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
113
+ count?: number | null;
114
+ /** Unit of time for the cycle duration. */
115
+ unit?: PeriodUnit;
116
+ }
117
+ export declare enum PeriodUnit {
118
+ /** Not defined. */
119
+ UNDEFINED = "UNDEFINED",
120
+ /** Time unit is a day. */
121
+ DAY = "DAY",
122
+ /** Time unit is a week. */
123
+ WEEK = "WEEK",
124
+ /** Time unit is a month. */
125
+ MONTH = "MONTH",
126
+ /** Time unit is a year. */
127
+ YEAR = "YEAR"
128
+ }
129
+ export interface Money {
130
+ /** Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative. */
131
+ value?: string;
132
+ /** Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`. */
133
+ currency?: string;
134
+ }
135
+ export interface FeeConfig {
136
+ /** Fee configuration. */
137
+ fee?: Fee;
138
+ /** The time this fee will be charged. */
139
+ appliedAt?: AppliedAt;
140
+ }
141
+ export interface Fee {
142
+ /** Fee name */
143
+ name?: string;
144
+ /** Amount of fee to be charged */
145
+ amount?: string;
146
+ }
147
+ export declare enum AppliedAt {
148
+ UNKNOWN_CHARGE_EVENT = "UNKNOWN_CHARGE_EVENT",
149
+ /** Will charge the fee on the first payment. If the order has a free trial, it will charge after the free trial. */
150
+ FIRST_PAYMENT = "FIRST_PAYMENT"
151
+ }
152
+ export interface ListPublicPlansRequest {
153
+ /** 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)). */
154
+ limit?: number | null;
155
+ /** Number of items to skip. Defaults to `0`. See paging ([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)). */
156
+ offset?: number | null;
157
+ /** IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs. */
158
+ planIds?: string[];
159
+ }
160
+ export interface ListPublicPlansResponse {
161
+ /** List of public pricing plans. */
162
+ plans?: PublicPlan[];
163
+ /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
164
+ pagingMetadata?: PagingMetadataV2;
165
+ }
166
+ /** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
167
+ export interface PublicPlan {
168
+ /** Plan ID. */
169
+ _id?: string;
170
+ /** Plan name. */
171
+ name?: string | null;
172
+ /** Plan description. */
173
+ description?: string | null;
174
+ /** What is included with this plan (for example, 1 weekly entrance to a specific class). */
175
+ perks?: StringList;
176
+ /** Plan price, payment schedule, and expiration. */
177
+ pricing?: Pricing;
178
+ /** Whether the plan is marked as primary. */
179
+ primary?: boolean;
180
+ /** Date plan was created. */
181
+ _createdDate?: Date | null;
182
+ /** Date plan was last updated. */
183
+ _updatedDate?: Date | null;
184
+ /** URL-friendly version of plan name. Unique across all plans in the same site. */
185
+ slug?: string | null;
186
+ /** Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation. */
187
+ maxPurchasesPerBuyer?: number | null;
188
+ /** Whether the buyer can start the plan at a later date. Defaults to false. */
189
+ allowFutureStartDate?: boolean | null;
190
+ /** Whether the buyer is allowed to cancel their plan. Defaults to false. */
191
+ buyerCanCancel?: boolean | null;
192
+ /** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
193
+ termsAndConditions?: string | null;
194
+ /**
195
+ * ID of the form associated with the plan at checkout.
196
+ *
197
+ * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
198
+ */
199
+ formId?: string | null;
200
+ }
201
+ export interface PagingMetadataV2 {
202
+ /** Number of items returned in the response. */
203
+ count?: number | null;
204
+ /** Offset that was requested. */
205
+ offset?: number | null;
206
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
207
+ total?: number | null;
208
+ /** Flag that indicates the server failed to calculate the `total` field. */
209
+ tooManyToCount?: boolean | null;
210
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
211
+ cursors?: Cursors;
212
+ }
213
+ export interface Cursors {
214
+ /** Cursor string pointing to the next page in the list of results. */
215
+ next?: string | null;
216
+ /** Cursor pointing to the previous page in the list of results. */
217
+ prev?: string | null;
218
+ }
219
+ export interface QueryPublicPlansRequest {
220
+ /** Query options. */
221
+ query?: QueryV2;
222
+ }
223
+ export interface QueryV2 {
224
+ /** 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)). */
225
+ filter?: Record<string, any> | null;
226
+ /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]. */
227
+ sort?: Sorting[];
228
+ /** Pointer to page of results using offset. Can't be used together with 'cursorPaging'. */
229
+ paging?: Paging;
230
+ }
231
+ export interface Sorting {
232
+ /** Name of the field to sort by. */
233
+ fieldName?: string;
234
+ /** Sort order. */
235
+ order?: SortOrder;
236
+ }
237
+ export declare enum SortOrder {
238
+ ASC = "ASC",
239
+ DESC = "DESC"
240
+ }
241
+ export interface Paging {
242
+ /** Number of items to load. */
243
+ limit?: number | null;
244
+ /** Number of items to skip in the current sort order. */
245
+ offset?: number | null;
246
+ }
247
+ export interface QueryPublicPlansResponse {
248
+ /** List of public pricing plans that match the specified query. */
249
+ plans?: PublicPlan[];
250
+ /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
251
+ pagingMetadata?: PagingMetadataV2;
252
+ }
253
+ export interface GetPlanRequest {
254
+ /** Plan ID. */
255
+ _id: string;
256
+ }
257
+ export interface GetPlanResponse {
258
+ /** Pricing plan. */
259
+ plan?: Plan;
260
+ }
261
+ export interface ListPlansRequest {
262
+ /** Archived filter. Defaults to `ACTIVE` (not archived) only. */
263
+ archived?: ArchivedFilter;
264
+ /** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */
265
+ public?: PublicFilter;
266
+ /** Number of pricing plans to list. Defaults to `75`. */
267
+ limit?: number | null;
268
+ /** Number of pricing plans to skip. Defaults to `0`. */
269
+ offset?: number | null;
270
+ /** IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs. */
271
+ planIds?: string[];
272
+ }
273
+ export declare enum ArchivedFilter {
274
+ /** Returns all plans that are active. */
275
+ ACTIVE = "ACTIVE",
276
+ /** Returns all plans that are archived. */
277
+ ARCHIVED = "ARCHIVED",
278
+ /** Returns all plans that are active and archived. */
279
+ ARCHIVED_AND_ACTIVE = "ARCHIVED_AND_ACTIVE"
280
+ }
281
+ export declare enum PublicFilter {
282
+ /** Returns all public and hidden plans. */
283
+ PUBLIC_AND_HIDDEN = "PUBLIC_AND_HIDDEN",
284
+ /** Returns only public plans. */
285
+ PUBLIC = "PUBLIC",
286
+ /** Returns only hidden plans. */
287
+ HIDDEN = "HIDDEN"
288
+ }
289
+ export interface ListPlansResponse {
290
+ /** List of all public and hidden pricing plans. */
291
+ plans?: Plan[];
292
+ /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
293
+ pagingMetadata?: PagingMetadataV2;
294
+ }
295
+ export interface GetPlanStatsRequest {
296
+ }
297
+ export interface GetPlanStatsResponse {
298
+ /** Total number of plans created, including active plans (both public and hidden) and archived plans. */
299
+ totalPlans?: number;
300
+ }
301
+ export interface CreatePlanRequest {
302
+ /** Plan details. */
303
+ plan: Plan;
304
+ }
305
+ export interface CreatePlanResponse {
306
+ /** Created plan. */
307
+ plan?: Plan;
308
+ }
309
+ export interface UpdatePlanRequest {
310
+ /** ID of the plan to update. */
311
+ plan: Plan;
312
+ }
313
+ export interface UpdatePlanResponse {
314
+ /** Updated plan. */
315
+ plan?: Plan;
316
+ }
317
+ export interface BuyerCanCancelUpdated {
318
+ /** Pricing plan. */
319
+ plan?: Plan;
320
+ }
321
+ export interface SetPlanVisibilityRequest {
322
+ /** The ID of the plan to either display or hide on a site page. */
323
+ _id: string;
324
+ /** Whether a plan is visible to members and site visitors. Updates the `public` field. */
325
+ visible: boolean;
326
+ }
327
+ export interface SetPlanVisibilityResponse {
328
+ /** Pricing plan. */
329
+ plan?: Plan;
330
+ }
331
+ export interface MakePlanPrimaryRequest {
332
+ /** Pricing plan ID. */
333
+ _id: string;
334
+ }
335
+ export interface MakePlanPrimaryResponse {
336
+ /** Pricing plan. */
337
+ plan?: Plan;
338
+ }
339
+ export interface ClearPrimaryRequest {
340
+ }
341
+ export interface ClearPrimaryResponse {
342
+ }
343
+ export interface ArchivePlanRequest {
344
+ /** ID of the active plan to archive. */
345
+ _id: string;
346
+ }
347
+ export interface ArchivePlanResponse {
348
+ /** Archived plan. */
349
+ plan?: Plan;
350
+ }
351
+ export interface PlanArchived {
352
+ /** Pricing plan. */
353
+ plan?: Plan;
354
+ }
355
+ export interface BulkArchivePlanRequest {
356
+ /** List of Plan IDs to archive. */
357
+ ids?: string[];
358
+ /** Set to `true` to return the `Plan` entity in the response. */
359
+ returnFullEntity?: boolean;
360
+ }
361
+ export interface BulkArchivePlanResponse {
362
+ /** Plans to be archived. */
363
+ results?: BulkPlanResult[];
364
+ /** Bulk action metadata. */
365
+ bulkActionMetadata?: BulkActionMetadata;
366
+ }
367
+ export interface BulkPlanResult {
368
+ /** Item metadata. */
369
+ itemMetadata?: ItemMetadata;
370
+ /** Pricing plan. */
371
+ plan?: Plan;
372
+ }
373
+ export interface ItemMetadata {
374
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
375
+ _id?: string | null;
376
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
377
+ originalIndex?: number;
378
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
379
+ success?: boolean;
380
+ /** Details about the error in case of failure. */
381
+ error?: ApplicationError;
382
+ }
383
+ export interface ApplicationError {
384
+ /** Error code. */
385
+ code?: string;
386
+ /** Description of the error. */
387
+ description?: string;
388
+ /** Data related to the error. */
389
+ data?: Record<string, any> | null;
390
+ }
391
+ export interface BulkActionMetadata {
392
+ /** Number of items that were successfully processed. */
393
+ totalSuccesses?: number;
394
+ /** Number of items that couldn't be processed. */
395
+ totalFailures?: number;
396
+ /** Number of failures without details because detailed failure threshold was exceeded. */
397
+ undetailedFailures?: number;
398
+ }
399
+ export interface ArrangePlansRequest {
400
+ /** IDs of all non-archived plans in the order you want them arranged. */
401
+ ids?: string[];
402
+ }
403
+ export interface ArrangePlansResponse {
404
+ }
405
+ export interface CountPlansRequest {
406
+ /** The filter. */
407
+ filter?: Record<string, any> | null;
408
+ /** If true, counts only visible plans (visible and not archived). If no value is specified, all plans are counted. */
409
+ visibility?: boolean | null;
410
+ }
411
+ export interface CountPlansResponse {
412
+ /** Number of plans in the response. */
413
+ count?: number;
414
+ }
415
+ export interface GetPlansPremiumStatusRequest {
416
+ }
417
+ export interface GetPlansPremiumStatusResponse {
418
+ /** True if a site has non-free, non-template plans. */
419
+ hasPaidPlans?: boolean;
420
+ /** True if a site has plans that were created before Pricing Plans became a premium app. */
421
+ hasOldPlans?: boolean;
422
+ }
423
+ export interface SearchPlansRequest {
424
+ /** Query options. */
425
+ query?: QueryV2;
426
+ /** Search phrase for the plan name. */
427
+ searchPhrase?: string | null;
428
+ }
429
+ export interface SearchPlansResponse {
430
+ /** List of pricing plans that match the specified filter and search phrase. */
431
+ plans?: Plan[];
432
+ /** Object containing paging-related data (such as the number of plans returned, the offset, and so on). */
433
+ pagingMetadata?: PagingMetadataV2;
434
+ }
435
+ export interface DomainEvent extends DomainEventBodyOneOf {
436
+ createdEvent?: EntityCreatedEvent;
437
+ updatedEvent?: EntityUpdatedEvent;
438
+ deletedEvent?: EntityDeletedEvent;
439
+ actionEvent?: ActionEvent;
440
+ /**
441
+ * Unique event ID.
442
+ * Allows clients to ignore duplicate webhooks.
443
+ */
444
+ _id?: string;
445
+ /**
446
+ * Assumes actions are also always typed to an entity_type
447
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
448
+ */
449
+ entityFqdn?: string;
450
+ /**
451
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
452
+ * This is although the created/updated/deleted notion is duplication of the oneof types
453
+ * Example: created/updated/deleted/started/completed/email_opened
454
+ */
455
+ slug?: string;
456
+ /** ID of the entity associated with the event. */
457
+ entityId?: string;
458
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
459
+ eventTime?: Date | null;
460
+ /**
461
+ * Whether the event was triggered as a result of a privacy regulation application
462
+ * (for example, GDPR).
463
+ */
464
+ triggeredByAnonymizeRequest?: boolean | null;
465
+ /** If present, indicates the action that triggered the event. */
466
+ originatedFrom?: string | null;
467
+ /**
468
+ * A sequence number defining the order of updates to the underlying entity.
469
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
470
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
471
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
472
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
473
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
474
+ */
475
+ entityEventSequence?: string | null;
476
+ }
477
+ /** @oneof */
478
+ export interface DomainEventBodyOneOf {
479
+ createdEvent?: EntityCreatedEvent;
480
+ updatedEvent?: EntityUpdatedEvent;
481
+ deletedEvent?: EntityDeletedEvent;
482
+ actionEvent?: ActionEvent;
483
+ }
484
+ export interface EntityCreatedEvent {
485
+ entity?: string;
486
+ }
487
+ export interface RestoreInfo {
488
+ deletedDate?: Date | null;
489
+ }
490
+ export interface EntityUpdatedEvent {
491
+ /**
492
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
493
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
494
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
495
+ */
496
+ currentEntity?: string;
497
+ }
498
+ export interface EntityDeletedEvent {
499
+ /** Entity that was deleted */
500
+ deletedEntity?: string | null;
501
+ }
502
+ export interface ActionEvent {
503
+ body?: string;
504
+ }
505
+ export interface MessageEnvelope {
506
+ /** App instance ID. */
507
+ instanceId?: string | null;
508
+ /** Event type. */
509
+ eventType?: string;
510
+ /** The identification type and identity data. */
511
+ identity?: IdentificationData;
512
+ /** Stringify payload. */
513
+ data?: string;
514
+ }
515
+ export interface IdentificationData extends IdentificationDataIdOneOf {
516
+ /** ID of a site visitor that has not logged in to the site. */
517
+ anonymousVisitorId?: string;
518
+ /** ID of a site visitor that has logged in to the site. */
519
+ memberId?: string;
520
+ /** ID of a Wix user (site owner, contributor, etc.). */
521
+ wixUserId?: string;
522
+ /** ID of an app. */
523
+ appId?: string;
524
+ /** @readonly */
525
+ identityType?: WebhookIdentityType;
526
+ }
527
+ /** @oneof */
528
+ export interface IdentificationDataIdOneOf {
529
+ /** ID of a site visitor that has not logged in to the site. */
530
+ anonymousVisitorId?: string;
531
+ /** ID of a site visitor that has logged in to the site. */
532
+ memberId?: string;
533
+ /** ID of a Wix user (site owner, contributor, etc.). */
534
+ wixUserId?: string;
535
+ /** ID of an app. */
536
+ appId?: string;
537
+ }
538
+ export declare enum WebhookIdentityType {
539
+ UNKNOWN = "UNKNOWN",
540
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
541
+ MEMBER = "MEMBER",
542
+ WIX_USER = "WIX_USER",
543
+ APP = "APP"
544
+ }
545
+ interface StringListNonNullableFields {
546
+ values: string[];
547
+ }
548
+ interface DurationNonNullableFields {
549
+ unit: PeriodUnit;
550
+ }
551
+ interface RecurrenceNonNullableFields {
552
+ cycleDuration?: DurationNonNullableFields;
553
+ }
554
+ interface MoneyNonNullableFields {
555
+ value: string;
556
+ currency: string;
557
+ }
558
+ interface FeeNonNullableFields {
559
+ name: string;
560
+ amount: string;
561
+ }
562
+ interface FeeConfigNonNullableFields {
563
+ fee?: FeeNonNullableFields;
564
+ appliedAt: AppliedAt;
565
+ }
566
+ interface PricingNonNullableFields {
567
+ subscription?: RecurrenceNonNullableFields;
568
+ singlePaymentForDuration?: DurationNonNullableFields;
569
+ price?: MoneyNonNullableFields;
570
+ feeConfigs: FeeConfigNonNullableFields[];
571
+ }
572
+ interface PublicPlanNonNullableFields {
573
+ _id: string;
574
+ perks?: StringListNonNullableFields;
575
+ pricing?: PricingNonNullableFields;
576
+ primary: boolean;
577
+ }
578
+ export interface ListPublicPlansResponseNonNullableFields {
579
+ plans: PublicPlanNonNullableFields[];
580
+ }
581
+ export interface QueryPublicPlansResponseNonNullableFields {
582
+ plans: PublicPlanNonNullableFields[];
583
+ }
584
+ export interface PlanNonNullableFields {
585
+ _id: string;
586
+ perks?: StringListNonNullableFields;
587
+ pricing?: PricingNonNullableFields;
588
+ archived: boolean;
589
+ primary: boolean;
590
+ hasOrders: boolean;
591
+ }
592
+ export interface GetPlanResponseNonNullableFields {
593
+ plan?: PlanNonNullableFields;
594
+ }
595
+ export interface ListPlansResponseNonNullableFields {
596
+ plans: PlanNonNullableFields[];
597
+ }
598
+ export interface GetPlanStatsResponseNonNullableFields {
599
+ totalPlans: number;
600
+ }
601
+ export interface CreatePlanResponseNonNullableFields {
602
+ plan?: PlanNonNullableFields;
603
+ }
604
+ export interface UpdatePlanResponseNonNullableFields {
605
+ plan?: PlanNonNullableFields;
606
+ }
607
+ export interface SetPlanVisibilityResponseNonNullableFields {
608
+ plan?: PlanNonNullableFields;
609
+ }
610
+ export interface MakePlanPrimaryResponseNonNullableFields {
611
+ plan?: PlanNonNullableFields;
612
+ }
613
+ export interface ArchivePlanResponseNonNullableFields {
614
+ plan?: PlanNonNullableFields;
615
+ }
616
+ export interface BaseEventMetadata {
617
+ /** App instance ID. */
618
+ instanceId?: string | null;
619
+ /** Event type. */
620
+ eventType?: string;
621
+ /** The identification type and identity data. */
622
+ identity?: IdentificationData;
623
+ }
624
+ export interface EventMetadata extends BaseEventMetadata {
625
+ /**
626
+ * Unique event ID.
627
+ * Allows clients to ignore duplicate webhooks.
628
+ */
629
+ _id?: string;
630
+ /**
631
+ * Assumes actions are also always typed to an entity_type
632
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
633
+ */
634
+ entityFqdn?: string;
635
+ /**
636
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
637
+ * This is although the created/updated/deleted notion is duplication of the oneof types
638
+ * Example: created/updated/deleted/started/completed/email_opened
639
+ */
640
+ slug?: string;
641
+ /** ID of the entity associated with the event. */
642
+ entityId?: string;
643
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
644
+ eventTime?: Date | null;
645
+ /**
646
+ * Whether the event was triggered as a result of a privacy regulation application
647
+ * (for example, GDPR).
648
+ */
649
+ triggeredByAnonymizeRequest?: boolean | null;
650
+ /** If present, indicates the action that triggered the event. */
651
+ originatedFrom?: string | null;
652
+ /**
653
+ * A sequence number defining the order of updates to the underlying entity.
654
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
655
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
656
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
657
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
658
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
659
+ */
660
+ entityEventSequence?: string | null;
661
+ }
662
+ export interface PlanBuyerCanCancelUpdatedEnvelope {
663
+ data: BuyerCanCancelUpdated;
664
+ metadata: EventMetadata;
665
+ }
666
+ /**
667
+ * Triggered when a plan's `buyerCanCancel` field is updated.
668
+ * @permissionScope Read Pricing Plans
669
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
670
+ * @permissionScope Manage Pricing Plans
671
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
672
+ * @permissionId PRICING_PLANS.READ_PLANS
673
+ * @webhook
674
+ * @eventType wix.pricing_plans.plan_buyer_can_cancel_updated
675
+ */
676
+ export declare function onPlanBuyerCanCancelUpdated(handler: (event: PlanBuyerCanCancelUpdatedEnvelope) => void | Promise<void>): void;
677
+ export interface PlanCreatedEnvelope {
678
+ entity: Plan;
679
+ metadata: EventMetadata;
680
+ }
681
+ /**
682
+ * Triggered when a pricing plan is created.
683
+ * @permissionScope Read Pricing Plans
684
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
685
+ * @permissionScope Manage Pricing Plans
686
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
687
+ * @permissionId PRICING_PLANS.READ_PLANS
688
+ * @webhook
689
+ * @eventType wix.pricing_plans.plan_created
690
+ */
691
+ export declare function onPlanCreated(handler: (event: PlanCreatedEnvelope) => void | Promise<void>): void;
692
+ export interface PlanArchivedEnvelope {
693
+ data: PlanArchived;
694
+ metadata: EventMetadata;
695
+ }
696
+ /**
697
+ * Triggered when a pricing plan is archived.
698
+ * @permissionScope Read Pricing Plans
699
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
700
+ * @permissionScope Manage Pricing Plans
701
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
702
+ * @permissionId PRICING_PLANS.READ_PLANS
703
+ * @webhook
704
+ * @eventType wix.pricing_plans.plan_plan_archived
705
+ */
706
+ export declare function onPlanArchived(handler: (event: PlanArchivedEnvelope) => void | Promise<void>): void;
707
+ export interface PlanUpdatedEnvelope {
708
+ entity: Plan;
709
+ metadata: EventMetadata;
710
+ }
711
+ /**
712
+ * Triggered when a pricing plan is updated.
713
+ * @permissionScope Read Pricing Plans
714
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
715
+ * @permissionScope Manage Pricing Plans
716
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
717
+ * @permissionId PRICING_PLANS.READ_PLANS
718
+ * @webhook
719
+ * @eventType wix.pricing_plans.plan_updated
720
+ */
721
+ export declare function onPlanUpdated(handler: (event: PlanUpdatedEnvelope) => void | Promise<void>): void;
722
+ /**
723
+ * 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.
724
+ * @public
725
+ * @param options - Options for filtering and paging the list of public plans.
726
+ * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS
727
+ * @permissionScope Read Pricing Plans
728
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
729
+ * @permissionScope Manage Orders
730
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
731
+ * @permissionScope Manage Bookings Services and Settings
732
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
733
+ * @permissionScope Read Orders
734
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
735
+ * @permissionScope Manage Portfolio
736
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
737
+ * @permissionScope Manage Pricing Plans
738
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
739
+ * @permissionScope Manage Restaurants - all permissions
740
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
741
+ * @applicableIdentity APP
742
+ * @applicableIdentity VISITOR
743
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPublicPlans
744
+ */
745
+ export declare function listPublicPlans(options?: ListPublicPlansOptions): Promise<ListPublicPlansResponse & ListPublicPlansResponseNonNullableFields>;
746
+ export interface ListPublicPlansOptions {
747
+ /** 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)). */
748
+ limit?: number | null;
749
+ /** Number of items to skip. Defaults to `0`. See paging ([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)). */
750
+ offset?: number | null;
751
+ /** IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs. */
752
+ planIds?: string[];
753
+ }
754
+ /**
755
+ * Creates a query to retrieve a list of public pricing plans.
756
+ *
757
+ *
758
+ * The `queryPublicPlans()` method builds a query to retrieve a list of up to 1,000 public plans and returns a [`PublicPlansQueryBuilder`](#plansquerybuilder) object.
759
+ *
760
+ * The returned object contains the query definition which is typically used to run the query using the [`find()`](#plansquerybuilder/find) method.
761
+ *
762
+ * 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.
763
+ *
764
+ * `queryPublicPlans()` runs with the following `PublicPlansQueryBuilder` defaults that you can override:
765
+ * - [`skip`](#plansquerybuilder/skip): `0`
766
+ * - [`limit`](#plansquerybuilder/limit): `50`
767
+ *
768
+ * 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.
769
+ *
770
+ * 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).
771
+ * @public
772
+ * @permissionScope Read Pricing Plans
773
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
774
+ * @permissionScope Manage Orders
775
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
776
+ * @permissionScope Manage Bookings Services and Settings
777
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
778
+ * @permissionScope Read Orders
779
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
780
+ * @permissionScope Manage Portfolio
781
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
782
+ * @permissionScope Manage Pricing Plans
783
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
784
+ * @permissionScope Manage Restaurants - all permissions
785
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
786
+ * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS
787
+ * @applicableIdentity APP
788
+ * @applicableIdentity VISITOR
789
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans
790
+ */
791
+ export declare function queryPublicPlans(): PlansQueryBuilder;
792
+ interface QueryOffsetResult {
793
+ currentPage: number | undefined;
794
+ totalPages: number | undefined;
795
+ totalCount: number | undefined;
796
+ hasNext: () => boolean;
797
+ hasPrev: () => boolean;
798
+ length: number;
799
+ pageSize: number;
800
+ }
801
+ export interface PlansQueryResult extends QueryOffsetResult {
802
+ items: PublicPlan[];
803
+ query: PlansQueryBuilder;
804
+ next: () => Promise<PlansQueryResult>;
805
+ prev: () => Promise<PlansQueryResult>;
806
+ }
807
+ export interface PlansQueryBuilder {
808
+ /** @param propertyName - Property whose value is compared with `value`.
809
+ * @param value - Value to compare against.
810
+ */
811
+ eq: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any) => PlansQueryBuilder;
812
+ /** @param propertyName - Property whose value is compared with `value`.
813
+ * @param value - Value to compare against.
814
+ */
815
+ ne: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any) => PlansQueryBuilder;
816
+ /** @param propertyName - Property whose value is compared with `value`.
817
+ * @param value - Value to compare against.
818
+ */
819
+ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => PlansQueryBuilder;
820
+ /** @param propertyName - Property whose value is compared with `value`.
821
+ * @param value - Value to compare against.
822
+ */
823
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => PlansQueryBuilder;
824
+ /** @param propertyName - Property whose value is compared with `value`.
825
+ * @param value - Value to compare against.
826
+ */
827
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => PlansQueryBuilder;
828
+ /** @param propertyName - Property whose value is compared with `value`.
829
+ * @param value - Value to compare against.
830
+ */
831
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => PlansQueryBuilder;
832
+ /** @param propertyName - Property whose value is compared with `string`.
833
+ * @param string - String to compare against. Case-insensitive.
834
+ */
835
+ startsWith: (propertyName: '_id' | 'slug', value: string) => PlansQueryBuilder;
836
+ /** @param propertyName - Property whose value is compared with `values`.
837
+ * @param values - List of values to compare against.
838
+ */
839
+ hasSome: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any[]) => PlansQueryBuilder;
840
+ in: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any) => PlansQueryBuilder;
841
+ exists: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: boolean) => PlansQueryBuilder;
842
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
843
+ ascending: (...propertyNames: Array<'_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'>) => PlansQueryBuilder;
844
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
845
+ descending: (...propertyNames: Array<'_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug'>) => PlansQueryBuilder;
846
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
847
+ limit: (limit: number) => PlansQueryBuilder;
848
+ /** @param skip - Number of items to skip in the query results before returning the results. */
849
+ skip: (skip: number) => PlansQueryBuilder;
850
+ find: () => Promise<PlansQueryResult>;
851
+ }
852
+ /**
853
+ * Retrieves a pricing plan by ID.
854
+ * @param _id - Plan ID.
855
+ * @public
856
+ * @requiredField _id
857
+ * @permissionId PRICING_PLANS.READ_PLANS
858
+ * @permissionScope Read Pricing Plans
859
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
860
+ * @permissionScope Manage Pricing Plans
861
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
862
+ * @applicableIdentity APP
863
+ * @returns Pricing plan.
864
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlan
865
+ */
866
+ export declare function getPlan(_id: string): Promise<Plan & PlanNonNullableFields>;
867
+ /**
868
+ * Retrieves a list of up to 100 pricing plans (including public, hidden, and archived plans).
869
+ * @public
870
+ * @param options - Options for filtering and paging the list of plans.
871
+ * @permissionId PRICING_PLANS.READ_PLANS
872
+ * @permissionScope Read Pricing Plans
873
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
874
+ * @permissionScope Manage Pricing Plans
875
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
876
+ * @applicableIdentity APP
877
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ListPlans
878
+ */
879
+ export declare function listPlans(options?: ListPlansOptions): Promise<ListPlansResponse & ListPlansResponseNonNullableFields>;
880
+ export interface ListPlansOptions {
881
+ /** Archived filter. Defaults to `ACTIVE` (not archived) only. */
882
+ archived?: ArchivedFilter;
883
+ /** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */
884
+ public?: PublicFilter;
885
+ /** Number of pricing plans to list. Defaults to `75`. */
886
+ limit?: number | null;
887
+ /** Number of pricing plans to skip. Defaults to `0`. */
888
+ offset?: number | null;
889
+ /** IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans are listed according to the order displayed in a site's dashboard (which you can set with Arrange Plans). You can specify a maximum of 100 IDs. */
890
+ planIds?: string[];
891
+ }
892
+ /**
893
+ * Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans.
894
+ * @public
895
+ * @permissionId PRICING_PLANS.READ_PLANS
896
+ * @permissionScope Read Pricing Plans
897
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-PLANS
898
+ * @permissionScope Manage Pricing Plans
899
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
900
+ * @applicableIdentity APP
901
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.GetPlanStats
902
+ */
903
+ export declare function getPlanStats(): Promise<GetPlanStatsResponse & GetPlanStatsResponseNonNullableFields>;
904
+ /**
905
+ * Creates a pricing plan. The specified `plan` object must contain a pricing model. A pricing model can be 1 of the following:
906
+ * - **A subscription**: A subscription with recurring payments and how often the plan occurs. Subscriptions can have free trial days.
907
+ * - **A plan that doesn't renew**: A single payment for a specific duration that doesn't renew.
908
+ * - **An unlimited plan**: A single payment for an unlimited amount of time (until canceled).
909
+ * Pricing plans are available to the Wix user in the Pricing Plans section in a site's dashboard.
910
+ * @public
911
+ * @requiredField plan
912
+ * @requiredField plan.name
913
+ * @requiredField plan.pricing
914
+ * @requiredField plan.pricing.singlePaymentForDuration.count
915
+ * @requiredField plan.pricing.subscription.cycleCount
916
+ * @requiredField plan.pricing.subscription.cycleDuration
917
+ * @requiredField plan.pricing.subscription.cycleDuration.count
918
+ * @param plan - Information for the plan being created.
919
+ * @permissionId PRICING_PLANS.MANAGE_PLANS
920
+ * @permissionScope Manage Pricing Plans
921
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
922
+ * @applicableIdentity APP
923
+ * @returns Created plan.
924
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.CreatePlan
925
+ */
926
+ export declare function createPlan(plan: Plan): Promise<Plan & PlanNonNullableFields>;
927
+ /**
928
+ * Updates a pricing plan.
929
+ * 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.
930
+ * @public
931
+ * @requiredField _id
932
+ * @requiredField plan
933
+ * @param _id - ID of the plan to update.
934
+ * @param options - Options for updating the plan.
935
+ * @permissionId PRICING_PLANS.MANAGE_PLANS
936
+ * @permissionScope Manage Pricing Plans
937
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
938
+ * @applicableIdentity APP
939
+ * @returns Updated plan.
940
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.UpdatePlan
941
+ */
942
+ export declare function updatePlan(_id: string, plan: UpdatePlan): Promise<Plan & PlanNonNullableFields>;
943
+ export interface UpdatePlan {
944
+ /**
945
+ * Plan ID.
946
+ * @readonly
947
+ */
948
+ _id?: string;
949
+ /** Plan name. */
950
+ name?: string | null;
951
+ /** Plan description. */
952
+ description?: string | null;
953
+ /** List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday." */
954
+ perks?: StringList;
955
+ /** Plan price, payment schedule, and expiration. */
956
+ pricing?: Pricing;
957
+ /** Whether the plan is public (visible to site visitors and members). */
958
+ public?: boolean | null;
959
+ /**
960
+ * Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.
961
+ * @readonly
962
+ */
963
+ archived?: boolean;
964
+ /**
965
+ * Whether the plan is marked as primary.
966
+ * @readonly
967
+ */
968
+ primary?: boolean;
969
+ /**
970
+ * Whether the plan has any orders (including pending and unpaid orders).
971
+ * @readonly
972
+ */
973
+ hasOrders?: boolean;
974
+ /**
975
+ * Date plan was created.
976
+ * @readonly
977
+ */
978
+ _createdDate?: Date | null;
979
+ /**
980
+ * Date plan was last updated.
981
+ * @readonly
982
+ */
983
+ _updatedDate?: Date | null;
984
+ /**
985
+ * URL-friendly version of plan name. Unique across all plans in the same site.
986
+ * @readonly
987
+ */
988
+ slug?: string | null;
989
+ /**
990
+ * Number of times the same buyer can purchase the plan. Currently limited to support:
991
+ * - Empty value or a value of `0`, meaning no limitation.
992
+ * - Value of `1`, meaning limited to 1 purchase per buyer.
993
+ */
994
+ maxPurchasesPerBuyer?: number | null;
995
+ /** Whether the buyer can start the plan at a later date. Defaults to false. */
996
+ allowFutureStartDate?: boolean | null;
997
+ /**
998
+ * Whether the buyer is allowed to cancel their plan. Defaults to false.
999
+ * If false, calling Request Cancellation returns an error.
1000
+ */
1001
+ buyerCanCancel?: boolean | null;
1002
+ /** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
1003
+ termsAndConditions?: string | null;
1004
+ /**
1005
+ * ID of the form associated with the plan at checkout.
1006
+ *
1007
+ * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
1008
+ */
1009
+ formId?: string | null;
1010
+ }
1011
+ /**
1012
+ * Sets visibility for pricing plans. Visible plans are considered public plans.
1013
+ * By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors can't choose them.
1014
+ * 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.)
1015
+ * 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.
1016
+ * @param visible - Whether a plan is visible to members and site visitors. Updates the `public` field.
1017
+ * @public
1018
+ * @requiredField _id
1019
+ * @requiredField visible
1020
+ * @param _id - The ID of the plan to either display or hide on the site page.
1021
+ * @param options - Plan visibility options.
1022
+ * @permissionId PRICING_PLANS.MANAGE_PLANS
1023
+ * @permissionScope Manage Pricing Plans
1024
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
1025
+ * @applicableIdentity APP
1026
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.SetPlanVisibility
1027
+ */
1028
+ export declare function setPlanVisibility(_id: string, visible: boolean): Promise<SetPlanVisibilityResponse & SetPlanVisibilityResponseNonNullableFields>;
1029
+ /**
1030
+ * 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.
1031
+ * @public
1032
+ * @requiredField _id
1033
+ * @param _id - ID of the pricing plan to set as the primary plan.
1034
+ * @permissionId PRICING_PLANS.MANAGE_PLANS
1035
+ * @permissionScope Manage Pricing Plans
1036
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
1037
+ * @applicableIdentity APP
1038
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.MakePlanPrimary
1039
+ */
1040
+ export declare function makePlanPrimary(_id: string): Promise<MakePlanPrimaryResponse & MakePlanPrimaryResponseNonNullableFields>;
1041
+ /**
1042
+ * Sets all pricing plans as not primary. When viewing pricing plans on a site, no plan is highlighted with a customizable ribbon.
1043
+ * @public
1044
+ * @permissionId PRICING_PLANS.MANAGE_PLANS
1045
+ * @permissionScope Manage Pricing Plans
1046
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
1047
+ * @applicableIdentity APP
1048
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ClearPrimary
1049
+ */
1050
+ export declare function clearPrimary(): Promise<void>;
1051
+ /**
1052
+ * Archives a single plan.
1053
+ * When a plan is archived, it's no longer visible as a public plan that can be chosen by site members or visitors.
1054
+ * This is because the plan's `public` property is automatically set to `false`.
1055
+ * Archived plans can't be purchased or reactivated.
1056
+ * 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.
1057
+ * Wix users can see archived plans in a site's dashboard under **Pricing Plans -> Archived Plans**.
1058
+ * > **Note:** An attempt to archive an already-archived plan throws an error.
1059
+ * @public
1060
+ * @requiredField _id
1061
+ * @param _id - ID of the active plan to archive.
1062
+ * @permissionId PRICING_PLANS.MANAGE_PLANS
1063
+ * @permissionScope Manage Pricing Plans
1064
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
1065
+ * @applicableIdentity APP
1066
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.ArchivePlan
1067
+ */
1068
+ export declare function archivePlan(_id: string): Promise<ArchivePlanResponse & ArchivePlanResponseNonNullableFields>;
1069
+ export {};