@wix/auto_sdk_pricing-plans_plans 1.0.2 → 1.0.3

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 (21) hide show
  1. package/build/cjs/src/pricing-plans-v2-plan-plans.types.d.ts +170 -37
  2. package/build/cjs/src/pricing-plans-v2-plan-plans.types.js.map +1 -1
  3. package/build/cjs/src/pricing-plans-v2-plan-plans.universal.d.ts +238 -46
  4. package/build/cjs/src/pricing-plans-v2-plan-plans.universal.js +14 -0
  5. package/build/cjs/src/pricing-plans-v2-plan-plans.universal.js.map +1 -1
  6. package/build/es/src/pricing-plans-v2-plan-plans.types.d.ts +170 -37
  7. package/build/es/src/pricing-plans-v2-plan-plans.types.js.map +1 -1
  8. package/build/es/src/pricing-plans-v2-plan-plans.universal.d.ts +238 -46
  9. package/build/es/src/pricing-plans-v2-plan-plans.universal.js +14 -0
  10. package/build/es/src/pricing-plans-v2-plan-plans.universal.js.map +1 -1
  11. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.types.d.ts +170 -37
  12. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.types.js.map +1 -1
  13. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.d.ts +238 -46
  14. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.js +14 -0
  15. package/build/internal/cjs/src/pricing-plans-v2-plan-plans.universal.js.map +1 -1
  16. package/build/internal/es/src/pricing-plans-v2-plan-plans.types.d.ts +170 -37
  17. package/build/internal/es/src/pricing-plans-v2-plan-plans.types.js.map +1 -1
  18. package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.d.ts +238 -46
  19. package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.js +14 -0
  20. package/build/internal/es/src/pricing-plans-v2-plan-plans.universal.js.map +1 -1
  21. package/package.json +2 -2
@@ -2,12 +2,20 @@
2
2
  export interface Plan {
3
3
  /**
4
4
  * Plan ID.
5
+ * @format GUID
5
6
  * @readonly
6
7
  */
7
8
  id?: string;
8
- /** Plan name. */
9
+ /**
10
+ * Plan name.
11
+ * @minLength 1
12
+ * @maxLength 50
13
+ */
9
14
  name?: string | null;
10
- /** Plan description. */
15
+ /**
16
+ * Plan description.
17
+ * @maxLength 450
18
+ */
11
19
  description?: string | null;
12
20
  /** List of text strings that promote what is included with this plan. For example, "Plenty of parking" or "Free gift on your birthday." */
13
21
  perks?: StringList;
@@ -42,13 +50,16 @@ export interface Plan {
42
50
  updatedDate?: Date | null;
43
51
  /**
44
52
  * URL-friendly version of plan name. Unique across all plans in the same site.
53
+ * @minLength 1
45
54
  * @readonly
55
+ * @format URL_SLUG
46
56
  */
47
57
  slug?: string | null;
48
58
  /**
49
59
  * Number of times the same buyer can purchase the plan. Currently limited to support:
50
60
  * - Empty value or a value of `0`, meaning no limitation.
51
61
  * - Value of `1`, meaning limited to 1 purchase per buyer.
62
+ * @max 1
52
63
  */
53
64
  maxPurchasesPerBuyer?: number | null;
54
65
  /** Whether the buyer can start the plan at a later date. Defaults to false. */
@@ -58,17 +69,26 @@ export interface Plan {
58
69
  * If false, calling Request Cancellation returns an error.
59
70
  */
60
71
  buyerCanCancel?: boolean | null;
61
- /** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
72
+ /**
73
+ * Any terms and conditions that apply to the plan. This information is displayed during checkout.
74
+ * @maxLength 3000
75
+ */
62
76
  termsAndConditions?: string | null;
63
77
  /**
64
78
  * ID of the form associated with the plan at checkout.
65
79
  *
66
80
  * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
81
+ * @format GUID
67
82
  */
68
83
  formId?: string | null;
69
84
  }
70
85
  /** This wrapper type exists to distinguish an empty string list from no list at all in update requests. */
71
86
  export interface StringList {
87
+ /**
88
+ * @minLength 1
89
+ * @maxLength 1400
90
+ * @maxSize 500
91
+ */
72
92
  values?: string[];
73
93
  }
74
94
  /** Plan pricing information. Includes the price of the plan and payment details. */
@@ -81,7 +101,10 @@ export interface Pricing extends PricingPricingModelOneOf {
81
101
  singlePaymentUnlimited?: boolean | null;
82
102
  /** 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
103
  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. */
104
+ /**
105
+ * 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.
106
+ * @max 999
107
+ */
85
108
  freeTrialDays?: number | null;
86
109
  }
87
110
  /** @oneof */
@@ -104,12 +127,16 @@ export interface Recurrence {
104
127
  * Length of a payment cycle. For example, 1 month to have monthly payments.
105
128
  * Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
106
129
  * Currently, only a value of `1` is supported.
130
+ * @max 2000
107
131
  */
108
132
  cycleCount?: number | null;
109
133
  }
110
134
  /** A duration expressed in number of time units. */
111
135
  export interface Duration {
112
- /** Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
136
+ /**
137
+ * Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.
138
+ * @min 1
139
+ */
113
140
  count?: number | null;
114
141
  /** Unit of time for the cycle duration. */
115
142
  unit?: PeriodUnit;
@@ -127,9 +154,15 @@ export declare enum PeriodUnit {
127
154
  YEAR = "YEAR"
128
155
  }
129
156
  export interface Money {
130
- /** Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative. */
157
+ /**
158
+ * Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Can't be negative.
159
+ * @decimalValue options { lt:1000000000000, gte:0.000, maxScale:3 }
160
+ */
131
161
  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'`. */
162
+ /**
163
+ * Currency code. Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`.
164
+ * @format CURRENCY
165
+ */
133
166
  currency?: string;
134
167
  }
135
168
  export interface FeeConfig {
@@ -139,9 +172,16 @@ export interface FeeConfig {
139
172
  appliedAt?: AppliedAt;
140
173
  }
141
174
  export interface Fee {
142
- /** Fee name */
175
+ /**
176
+ * Fee name
177
+ * @minLength 1
178
+ * @maxLength 40
179
+ */
143
180
  name?: string;
144
- /** Amount of fee to be charged */
181
+ /**
182
+ * Amount of fee to be charged
183
+ * @decimalValue options { lt:1000000000000, gt:0.000, maxScale:3 }
184
+ */
145
185
  amount?: string;
146
186
  }
147
187
  export declare enum AppliedAt {
@@ -150,11 +190,19 @@ export declare enum AppliedAt {
150
190
  FIRST_PAYMENT = "FIRST_PAYMENT"
151
191
  }
152
192
  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)). */
193
+ /**
194
+ * 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)).
195
+ * @min 1
196
+ * @max 100
197
+ */
154
198
  limit?: number | null;
155
199
  /** 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
200
  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. */
201
+ /**
202
+ * IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.
203
+ * @format GUID
204
+ * @maxSize 100
205
+ */
158
206
  planIds?: string[];
159
207
  }
160
208
  export interface ListPublicPlansResponse {
@@ -165,11 +213,21 @@ export interface ListPublicPlansResponse {
165
213
  }
166
214
  /** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
167
215
  export interface PublicPlan {
168
- /** Plan ID. */
216
+ /**
217
+ * Plan ID.
218
+ * @format GUID
219
+ */
169
220
  id?: string;
170
- /** Plan name. */
221
+ /**
222
+ * Plan name.
223
+ * @minLength 1
224
+ * @maxLength 50
225
+ */
171
226
  name?: string | null;
172
- /** Plan description. */
227
+ /**
228
+ * Plan description.
229
+ * @maxLength 450
230
+ */
173
231
  description?: string | null;
174
232
  /** What is included with this plan (for example, 1 weekly entrance to a specific class). */
175
233
  perks?: StringList;
@@ -181,7 +239,10 @@ export interface PublicPlan {
181
239
  createdDate?: Date | null;
182
240
  /** Date plan was last updated. */
183
241
  updatedDate?: Date | null;
184
- /** URL-friendly version of plan name. Unique across all plans in the same site. */
242
+ /**
243
+ * URL-friendly version of plan name. Unique across all plans in the same site.
244
+ * @minLength 1
245
+ */
185
246
  slug?: string | null;
186
247
  /** Number of times the same buyer can purchase the plan. An empty value or a value of 0 means no limitation. */
187
248
  maxPurchasesPerBuyer?: number | null;
@@ -195,6 +256,7 @@ export interface PublicPlan {
195
256
  * ID of the form associated with the plan at checkout.
196
257
  *
197
258
  * Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
259
+ * @format GUID
198
260
  */
199
261
  formId?: string | null;
200
262
  }
@@ -211,9 +273,15 @@ export interface PagingMetadataV2 {
211
273
  cursors?: Cursors;
212
274
  }
213
275
  export interface Cursors {
214
- /** Cursor string pointing to the next page in the list of results. */
276
+ /**
277
+ * Cursor string pointing to the next page in the list of results.
278
+ * @maxLength 16000
279
+ */
215
280
  next?: string | null;
216
- /** Cursor pointing to the previous page in the list of results. */
281
+ /**
282
+ * Cursor pointing to the previous page in the list of results.
283
+ * @maxLength 16000
284
+ */
217
285
  prev?: string | null;
218
286
  }
219
287
  export interface QueryPublicPlansRequest {
@@ -229,7 +297,10 @@ export interface QueryV2 {
229
297
  paging?: Paging;
230
298
  }
231
299
  export interface Sorting {
232
- /** Name of the field to sort by. */
300
+ /**
301
+ * Name of the field to sort by.
302
+ * @maxLength 512
303
+ */
233
304
  fieldName?: string;
234
305
  /** Sort order. */
235
306
  order?: SortOrder;
@@ -251,7 +322,10 @@ export interface QueryPublicPlansResponse {
251
322
  pagingMetadata?: PagingMetadataV2;
252
323
  }
253
324
  export interface GetPlanRequest {
254
- /** Plan ID. */
325
+ /**
326
+ * Plan ID.
327
+ * @format GUID
328
+ */
255
329
  id: string;
256
330
  }
257
331
  export interface GetPlanResponse {
@@ -263,11 +337,19 @@ export interface ListPlansRequest {
263
337
  archived?: ArchivedFilter;
264
338
  /** Visibility filter. Defaults to `PUBLIC_AND_HIDDEN` (meaning, both are listed). */
265
339
  public?: PublicFilter;
266
- /** Number of pricing plans to list. Defaults to `75`. */
340
+ /**
341
+ * Number of pricing plans to list. Defaults to `75`.
342
+ * @min 1
343
+ * @max 100
344
+ */
267
345
  limit?: number | null;
268
346
  /** Number of pricing plans to skip. Defaults to `0`. */
269
347
  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. */
348
+ /**
349
+ * 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.
350
+ * @format GUID
351
+ * @maxSize 100
352
+ */
271
353
  planIds?: string[];
272
354
  }
273
355
  export declare enum ArchivedFilter {
@@ -319,7 +401,10 @@ export interface BuyerCanCancelUpdated {
319
401
  plan?: Plan;
320
402
  }
321
403
  export interface SetPlanVisibilityRequest {
322
- /** The ID of the plan to either display or hide on a site page. */
404
+ /**
405
+ * The ID of the plan to either display or hide on a site page.
406
+ * @format GUID
407
+ */
323
408
  id: string;
324
409
  /** Whether a plan is visible to members and site visitors. Updates the `public` field. */
325
410
  visible: boolean;
@@ -329,7 +414,10 @@ export interface SetPlanVisibilityResponse {
329
414
  plan?: Plan;
330
415
  }
331
416
  export interface MakePlanPrimaryRequest {
332
- /** Pricing plan ID. */
417
+ /**
418
+ * Pricing plan ID.
419
+ * @format GUID
420
+ */
333
421
  id: string;
334
422
  }
335
423
  export interface MakePlanPrimaryResponse {
@@ -341,7 +429,10 @@ export interface ClearPrimaryRequest {
341
429
  export interface ClearPrimaryResponse {
342
430
  }
343
431
  export interface ArchivePlanRequest {
344
- /** ID of the active plan to archive. */
432
+ /**
433
+ * ID of the active plan to archive.
434
+ * @format GUID
435
+ */
345
436
  id: string;
346
437
  }
347
438
  export interface ArchivePlanResponse {
@@ -353,7 +444,12 @@ export interface PlanArchived {
353
444
  plan?: Plan;
354
445
  }
355
446
  export interface BulkArchivePlanRequest {
356
- /** List of Plan IDs to archive. */
447
+ /**
448
+ * List of Plan IDs to archive.
449
+ * @format GUID
450
+ * @minSize 1
451
+ * @maxSize 100
452
+ */
357
453
  ids?: string[];
358
454
  /** Set to `true` to return the `Plan` entity in the response. */
359
455
  returnFullEntity?: boolean;
@@ -397,7 +493,11 @@ export interface BulkActionMetadata {
397
493
  undetailedFailures?: number;
398
494
  }
399
495
  export interface ArrangePlansRequest {
400
- /** IDs of all non-archived plans in the order you want them arranged. */
496
+ /**
497
+ * IDs of all non-archived plans in the order you want them arranged.
498
+ * @format GUID
499
+ * @minSize 1
500
+ */
401
501
  ids?: string[];
402
502
  }
403
503
  export interface ArrangePlansResponse {
@@ -423,7 +523,10 @@ export interface GetPlansPremiumStatusResponse {
423
523
  export interface SearchPlansRequest {
424
524
  /** Query options. */
425
525
  query?: QueryV2;
426
- /** Search phrase for the plan name. */
526
+ /**
527
+ * Search phrase for the plan name.
528
+ * @maxLength 50
529
+ */
427
530
  searchPhrase?: string | null;
428
531
  }
429
532
  export interface SearchPlansResponse {
@@ -505,9 +608,15 @@ export interface ActionEvent {
505
608
  bodyAsJson?: string;
506
609
  }
507
610
  export interface MessageEnvelope {
508
- /** App instance ID. */
611
+ /**
612
+ * App instance ID.
613
+ * @format GUID
614
+ */
509
615
  instanceId?: string | null;
510
- /** Event type. */
616
+ /**
617
+ * Event type.
618
+ * @maxLength 150
619
+ */
511
620
  eventType?: string;
512
621
  /** The identification type and identity data. */
513
622
  identity?: IdentificationData;
@@ -515,26 +624,50 @@ export interface MessageEnvelope {
515
624
  data?: string;
516
625
  }
517
626
  export interface IdentificationData extends IdentificationDataIdOneOf {
518
- /** ID of a site visitor that has not logged in to the site. */
627
+ /**
628
+ * ID of a site visitor that has not logged in to the site.
629
+ * @format GUID
630
+ */
519
631
  anonymousVisitorId?: string;
520
- /** ID of a site visitor that has logged in to the site. */
632
+ /**
633
+ * ID of a site visitor that has logged in to the site.
634
+ * @format GUID
635
+ */
521
636
  memberId?: string;
522
- /** ID of a Wix user (site owner, contributor, etc.). */
637
+ /**
638
+ * ID of a Wix user (site owner, contributor, etc.).
639
+ * @format GUID
640
+ */
523
641
  wixUserId?: string;
524
- /** ID of an app. */
642
+ /**
643
+ * ID of an app.
644
+ * @format GUID
645
+ */
525
646
  appId?: string;
526
647
  /** @readonly */
527
648
  identityType?: WebhookIdentityType;
528
649
  }
529
650
  /** @oneof */
530
651
  export interface IdentificationDataIdOneOf {
531
- /** ID of a site visitor that has not logged in to the site. */
652
+ /**
653
+ * ID of a site visitor that has not logged in to the site.
654
+ * @format GUID
655
+ */
532
656
  anonymousVisitorId?: string;
533
- /** ID of a site visitor that has logged in to the site. */
657
+ /**
658
+ * ID of a site visitor that has logged in to the site.
659
+ * @format GUID
660
+ */
534
661
  memberId?: string;
535
- /** ID of a Wix user (site owner, contributor, etc.). */
662
+ /**
663
+ * ID of a Wix user (site owner, contributor, etc.).
664
+ * @format GUID
665
+ */
536
666
  wixUserId?: string;
537
- /** ID of an app. */
667
+ /**
668
+ * ID of an app.
669
+ * @format GUID
670
+ */
538
671
  appId?: string;
539
672
  }
540
673
  export declare enum WebhookIdentityType {
@@ -1 +1 @@
1
- {"version":3,"file":"pricing-plans-v2-plan-plans.types.js","sourceRoot":"","sources":["../../../src/pricing-plans-v2-plan-plans.types.ts"],"names":[],"mappings":";;;AA0HA,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,mBAAmB;IACnB,qCAAuB,CAAA;IACvB,0BAA0B;IAC1B,yBAAW,CAAA;IACX,2BAA2B;IAC3B,2BAAa,CAAA;IACb,4BAA4B;IAC5B,6BAAe,CAAA;IACf,2BAA2B;IAC3B,2BAAa,CAAA;AACf,CAAC,EAXW,UAAU,0BAAV,UAAU,QAWrB;AAuBD,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,0DAA6C,CAAA;IAC7C,oHAAoH;IACpH,4CAA+B,CAAA;AACjC,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AA+FD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAuCD,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,yCAAyC;IACzC,mCAAiB,CAAA;IACjB,2CAA2C;IAC3C,uCAAqB,CAAA;IACrB,sDAAsD;IACtD,6DAA2C,CAAA;AAC7C,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAED,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,2CAA2C;IAC3C,uDAAuC,CAAA;IACvC,iCAAiC;IACjC,iCAAiB,CAAA;IACjB,iCAAiC;IACjC,iCAAiB,CAAA;AACnB,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AAiSD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
1
+ {"version":3,"file":"pricing-plans-v2-plan-plans.types.js","sourceRoot":"","sources":["../../../src/pricing-plans-v2-plan-plans.types.ts"],"names":[],"mappings":";;;AAqJA,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,mBAAmB;IACnB,qCAAuB,CAAA;IACvB,0BAA0B;IAC1B,yBAAW,CAAA;IACX,2BAA2B;IAC3B,2BAAa,CAAA;IACb,4BAA4B;IAC5B,6BAAe,CAAA;IACf,2BAA2B;IAC3B,2BAAa,CAAA;AACf,CAAC,EAXW,UAAU,0BAAV,UAAU,QAWrB;AAoCD,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,0DAA6C,CAAA;IAC7C,oHAAoH;IACpH,4CAA+B,CAAA;AACjC,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AA8HD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAkDD,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,yCAAyC;IACzC,mCAAiB,CAAA;IACjB,2CAA2C;IAC3C,uCAAqB,CAAA;IACrB,sDAAsD;IACtD,6DAA2C,CAAA;AAC7C,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAED,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,2CAA2C;IAC3C,uDAAuC,CAAA;IACvC,iCAAiC;IACjC,iCAAiB,CAAA;IACjB,iCAAiC;IACjC,iCAAiB,CAAA;AACnB,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AAoVD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}