@wix/pricing-plans 1.0.11 → 1.0.13

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.
@@ -18,7 +18,7 @@ export interface Order {
18
18
  */
19
19
  _id?: string;
20
20
  /**
21
- * ID of the plan purchased with the order. See [Plans for more information about pricing plans](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/introduction).
21
+ * ID of the plan purchased with the order. See [Plans for more information about pricing plans](pricing-plans/plans)
22
22
  * @readonly
23
23
  */
24
24
  planId?: string;
@@ -51,9 +51,9 @@ export interface Order {
51
51
  */
52
52
  priceDetails?: PriceDetails;
53
53
  /**
54
- * Order pricing model, price, and payment schedule.
54
+ * Pricing model, price, and payment schedule for the order.
55
55
  *
56
- * [Learn more about pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models).
56
+ * [Learn more about pricing models](pricing-plans/plans)
57
57
  * @readonly
58
58
  */
59
59
  pricing?: PricingDetails;
@@ -69,9 +69,9 @@ export interface Order {
69
69
  * + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
70
70
  * + `PENDING`: Order has been purchased and its start date is set in the future.
71
71
  * + `ACTIVE`: Order has been processed. The plan is available for use.
72
- * + `PAUSED`: Order, and use of the plan, is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder). The order, and use of the plan, can be [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
72
+ * + `PAUSED`: Order, and use of the plan, is [paused](#pauseorder). The order, and use of the plan, can be [resumed](#resumeorder).
73
73
  * + `ENDED`: Order has completed its duration and is no longer available for use.
74
- * + `CANCELED`: Order has been [canceled](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/cancelorder).
74
+ * + `CANCELED`: Order has been [canceled](#cancelorder).
75
75
  * @readonly
76
76
  */
77
77
  status?: OrderStatus;
@@ -111,8 +111,8 @@ export interface Order {
111
111
  /**
112
112
  * Current end date and time for the ordered plan.
113
113
  *
114
- * `endDate` may be updated over the course of an order. If the order is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder),
115
- * it will have a later `endDate` once it [resumes](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder). `endDate` may also be [postponed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/postponeenddate).
114
+ * `endDate` may be updated over the course of an order. If the order is [paused](#pauseorder),
115
+ * it will have a later `endDate` once it [resumes](#resumeorder). `endDate` may also be [postponed](#postponeenddate).
116
116
  *
117
117
  * Omitted if the order is valid until canceled and still `ACTIVE`.
118
118
  * @readonly
@@ -172,12 +172,12 @@ export interface Order {
172
172
  }
173
173
  export interface Buyer {
174
174
  /**
175
- * Member ID for a buyer. Learn more about [`wix-members-backend`](https://www.wix.com/velo/reference/wix-members-backend/introduction).
175
+ * Member ID for a buyer.
176
176
  * @readonly
177
177
  */
178
178
  memberId?: string;
179
179
  /**
180
- * Contact ID for a buyer. Learn more about [Contacts in `wix-crm-backend`](https://www.wix.com/velo/reference/wix-crm-backend/contacts/introduction).
180
+ * Contact ID for a buyer.
181
181
  * @readonly
182
182
  */
183
183
  contactId?: string;
@@ -435,8 +435,8 @@ export declare enum PaymentStatus {
435
435
  export interface PausePeriod {
436
436
  /**
437
437
  * Status of the pause period. Supported values:
438
- * + `ACTIVE`: Status while the order is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder).
439
- * + `ENDED`: Status when the order is [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
438
+ * + `ACTIVE`: Status while the order is [paused](#pauseorder).
439
+ * + `ENDED`: Status when the order is [resumed](#resumeorder).
440
440
  */
441
441
  status?: Status;
442
442
  /** Start date and time of the pause period. */
@@ -534,6 +534,7 @@ export interface MemberListOrdersRequest {
534
534
  offset?: number | null;
535
535
  /** Sorting direction (defaults to ASC) and field to sort by. [See available fields here](https://dev.wix.com/api/rest/pricing-plans/pricing-plans/order-v2/filter-and-sort). */
536
536
  sorting?: Sorting;
537
+ fieldSet?: Set;
537
538
  }
538
539
  export interface Sorting {
539
540
  /** Name of the field to sort by. */
@@ -716,7 +717,7 @@ export interface CreateGuestOnlineOrderResponse {
716
717
  order?: Order;
717
718
  }
718
719
  export interface CreateOfflineOrderRequest {
719
- /** ID of the plan being ordered. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans). */
720
+ /** ID of the plan being ordered. See [Plans for more information about plan IDs](pricing-plans/plans). */
720
721
  planId: string;
721
722
  /** ID of the member ordering the plan. */
722
723
  memberId: string;
@@ -927,6 +928,8 @@ export interface ListOrdersRequest {
927
928
  * Default: `DESC`
928
929
  */
929
930
  sorting?: Sorting;
931
+ /** Parameter to define amount of fields to return. FULL returns each order's submission data. Supported values: UNKNOWN_SET, BASIC, FULL */
932
+ fieldSet?: Set;
930
933
  }
931
934
  export interface ListOrdersResponse {
932
935
  /** List of orders. */
@@ -1001,7 +1004,13 @@ export interface OrderEndDatePostponed {
1001
1004
  export interface CancelOrderRequest {
1002
1005
  /** Order ID. */
1003
1006
  _id: string;
1004
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1007
+ /**
1008
+ * When the order is canceled.
1009
+ *
1010
+ * One time orders can only be canceled immediately. Supported values:
1011
+ * - `"IMMEDIATELY"`: The order is canceled immediately.
1012
+ * - `"NEXT_PAYMENT_DATE"`: The order is canceled at the next payment date.
1013
+ */
1005
1014
  effectiveAt: CancellationEffectiveAt;
1006
1015
  }
1007
1016
  export interface CancelOrderResponse {
@@ -1089,10 +1098,9 @@ export interface BulkResumeOrderResponse {
1089
1098
  /**
1090
1099
  * Gets an order by ID for the currently logged-in member.
1091
1100
  *
1092
- * The `getCurrentMemberOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
1101
+ * The `memberGetOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
1093
1102
  * @param _id - Order ID.
1094
1103
  * @public
1095
- * @documentationMaturity preview
1096
1104
  * @requiredField _id
1097
1105
  * @param options - Options for getting a logged-in member's order.
1098
1106
  */
@@ -1105,7 +1113,6 @@ export interface MemberGetOrderOptions {
1105
1113
  *
1106
1114
  * The `memberListOrders()` function returns a Promise that resolves to a list of up to 100 pricing plan orders.
1107
1115
  * @public
1108
- * @documentationMaturity preview
1109
1116
  * @param options - Filtering, sorting, and pagination options.
1110
1117
  */
1111
1118
  export declare function memberListOrders(options?: MemberListOrdersOptions): Promise<MemberListOrdersResponse>;
@@ -1119,9 +1126,9 @@ export interface MemberListOrdersOptions {
1119
1126
  * + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
1120
1127
  * + `PENDING`: Order has been purchased and its start date is set in the future.
1121
1128
  * + `ACTIVE`: Order has been processed. The plan is available for use.
1122
- * + `PAUSED`: Order, and use of the plan, is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder). The order, and use of the plan, can be [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
1129
+ * + `PAUSED`: Order, and use of the plan, is [paused](#pauseorder). The order, and use of the plan, can be [resumed](#resumeorder).
1123
1130
  * + `ENDED`: Order has completed its duration and is no longer available for use.
1124
- * + `CANCELED`: Order has been [canceled](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/cancelorder).
1131
+ * + `CANCELED`: Order has been [canceled](#cancelorder).
1125
1132
  */
1126
1133
  orderStatuses?: OrderStatus[];
1127
1134
  /**
@@ -1168,6 +1175,7 @@ export interface MemberListOrdersOptions {
1168
1175
  * Default: `ASC`
1169
1176
  */
1170
1177
  sorting?: Sorting;
1178
+ fieldSet?: Set;
1171
1179
  }
1172
1180
  /**
1173
1181
  * Starts the process of canceling an order.
@@ -1177,9 +1185,8 @@ export interface MemberListOrdersOptions {
1177
1185
  *
1178
1186
  * For orders with recurring payments, a cancellation can be set to occur either immediately or at the next payment date. For orders with one-time payments, a cancellation occurs immediately after the request is processed.
1179
1187
  *
1180
- * Requesting an order cancellation starts the cancellation process. The event is triggered immediately and the function's promise is fulfilled. However, there may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
1188
+ * Requesting an order cancellation starts the cancellation process. There may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
1181
1189
  *
1182
- * The [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handler runs when a cancellation is requested. The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when the cancellation is completed.
1183
1190
  * @param _id - Order ID.
1184
1191
  * @param effectiveAt - Whether to cancel the order immediately or at the next payment date.
1185
1192
  * One-time payment orders can only be canceled immediately.
@@ -1188,7 +1195,6 @@ export interface MemberListOrdersOptions {
1188
1195
  * - `"IMMEDIATELY"`: Indicates that the order should be canceled immediately.
1189
1196
  * - `"NEXT_PAYMENT_DATE"`: Indicates that the order be canceled at the next payment date.
1190
1197
  * @public
1191
- * @documentationMaturity preview
1192
1198
  * @requiredField _id
1193
1199
  * @requiredField effectiveAt
1194
1200
  * @param options - Options for requesting a cancellation.
@@ -1202,7 +1208,7 @@ export declare function requestCancellation(_id: string, effectiveAt: Cancellati
1202
1208
  *
1203
1209
  * Payment of an offline order is handled in 1 of 2 ways.
1204
1210
  * - When creating the order, select `true` in the `paid` request parameter.
1205
- * - After creation, with the [`markAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/markaspaid) function.
1211
+ * - After creation, with the [`markAsPaid()`](#markaspaid) function.
1206
1212
  *
1207
1213
  * When creating a non-free offline order:
1208
1214
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
@@ -1211,22 +1217,21 @@ export declare function requestCancellation(_id: string, effectiveAt: Cancellati
1211
1217
  * When creating a free offline order:
1212
1218
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
1213
1219
  * - The order's last payment status is set to `"NOT_APPLICABLE"`.
1214
- *
1215
- * The [`onOrderCreated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercreated) event handler runs when an offline order is created.
1216
- *
1217
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can create offline orders.
1218
- * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
1219
1220
  * @public
1220
- * @documentationMaturity preview
1221
1221
  * @requiredField options
1222
1222
  * @requiredField options.memberId
1223
1223
  * @requiredField planId
1224
1224
  * @param options - Options for creating an offline order.
1225
+ * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](pricing-plans/plans)
1225
1226
  * @returns Fulfilled - The order of the plan.
1226
1227
  */
1227
1228
  export declare function createOfflineOrder(planId: string, options: CreateOfflineOrderOptions): Promise<CreateOfflineOrderResponse>;
1228
1229
  export interface CreateOfflineOrderOptions {
1229
- /** ID of the member ordering the plan. */
1230
+ /**
1231
+ * ID of the member ordering the plan.
1232
+ * This field is required when creating an offline order.
1233
+ *
1234
+ */
1230
1235
  memberId: string;
1231
1236
  /**
1232
1237
  * Start date and time for the ordered plan.
@@ -1254,21 +1259,21 @@ export interface CreateOfflineOrderOptions {
1254
1259
  *
1255
1260
  * If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, `tax` previews as `null`.
1256
1261
  *
1257
- * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getpricepreview) function.
1258
- *
1259
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get offline order previews.
1260
- * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
1262
+ * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](#getpricepreview) function.
1261
1263
  * @public
1262
- * @documentationMaturity preview
1263
1264
  * @requiredField options
1264
1265
  * @requiredField options.memberId
1265
1266
  * @requiredField planId
1266
1267
  * @param options - Options for previewing the offline order.
1268
+ * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](pricing-plans/plans)
1267
1269
  * @returns Fulfilled - A preview of the order.
1268
1270
  */
1269
1271
  export declare function getOfflineOrderPreview(planId: string, options: GetOfflineOrderPreviewOptions): Promise<GetOfflineOrderPreviewResponse>;
1270
1272
  export interface GetOfflineOrderPreviewOptions {
1271
- /** Member ID for the buyer who might order the plan offline. */
1273
+ /**
1274
+ * Member ID for the buyer who might order the plan offline.
1275
+ * This field is required to get an offline order preview.
1276
+ */
1272
1277
  memberId: string;
1273
1278
  /**
1274
1279
  * Start date and time for plan of the previewed order.
@@ -1284,12 +1289,11 @@ export interface GetOfflineOrderPreviewOptions {
1284
1289
  *
1285
1290
  * The `getPricePreview()` function returns a Promise that resolves to a temporary preview of the order's price.
1286
1291
  *
1287
- * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
1292
+ * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
1288
1293
  *
1289
- * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getofflineorderpreview).
1294
+ * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](#getofflineorderpreview).
1290
1295
  * @param planId - ID of plan to preview.
1291
1296
  * @public
1292
- * @documentationMaturity preview
1293
1297
  * @requiredField planId
1294
1298
  * @param options - Options for getting a price preview.
1295
1299
  * @returns Fulfilled - A preview of the pricing for the order.
@@ -1303,11 +1307,8 @@ export interface GetPricePreviewOptions {
1303
1307
  * Retrieves an order by ID.
1304
1308
  *
1305
1309
  * The `managementGetOrder()` function returns a Promise that resolves to information about the specified order.
1306
- *
1307
- * >**Note:** Only users with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get orders.
1308
1310
  * @param _id - Order ID.
1309
1311
  * @public
1310
- * @documentationMaturity preview
1311
1312
  * @requiredField _id
1312
1313
  * @param options - Options to use when getting an order.
1313
1314
  * @returns Order.
@@ -1321,11 +1322,8 @@ export interface ManagementGetOrderOptions {
1321
1322
  *
1322
1323
  * The `managementListOrders()` function returns a Promise that resolves to a list of up to 50 pricing plan orders. You can specify options for filtering, sorting, and paginating the results.
1323
1324
  *
1324
- * This function returns the orders on the site. To list orders for the currently logged-in member, use [`listMemberOrders()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/memberlistorders).
1325
- *
1326
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can list orders.
1325
+ * This function returns the orders on the site. To list orders for the currently logged-in member, use [`memberListOrders()`](#memberlistorders).
1327
1326
  * @public
1328
- * @documentationMaturity preview
1329
1327
  * @param options - Filtering, sorting, and pagination options.
1330
1328
  */
1331
1329
  export declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<ListOrdersResponse>;
@@ -1341,9 +1339,9 @@ export interface ManagementListOrdersOptions {
1341
1339
  * + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
1342
1340
  * + `PENDING`: Order has been purchased and its start date is set in the future.
1343
1341
  * + `ACTIVE`: Order has been processed. The plan is available for use.
1344
- * + `PAUSED`: Order, and use of the plan, is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder). The order, and use of the plan, can be [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
1342
+ * + `PAUSED`: Order, and use of the plan, is [paused](#pauseorder). The order, and use of the plan, can be [resumed](#resumeorder).
1345
1343
  * + `ENDED`: Order has completed its duration and is no longer available for use.
1346
- * + `CANCELED`: Order has been [canceled](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/cancelorder).
1344
+ * + `CANCELED`: Order has been [canceled](#cancelorder).
1347
1345
  */
1348
1346
  orderStatuses?: OrderStatus[];
1349
1347
  /**
@@ -1374,6 +1372,8 @@ export interface ManagementListOrdersOptions {
1374
1372
  * Default: `DESC`
1375
1373
  */
1376
1374
  sorting?: Sorting;
1375
+ /** Parameter to define amount of fields to return. FULL returns each order's submission data. Supported values: UNKNOWN_SET, BASIC, FULL */
1376
+ fieldSet?: Set;
1377
1377
  }
1378
1378
  /**
1379
1379
  * Extends the duration of a pricing plan order by postponing the order's `endDate`.
@@ -1386,16 +1386,11 @@ export interface ManagementListOrdersOptions {
1386
1386
  *
1387
1387
  * Postponing an order causes the following changes:
1388
1388
  * - The `endDate` for the order is adjusted to the new end date.
1389
- * The `onOrderEndDatePostponed()` and `onOrderUpdated()` event handlers run when an order's end date is postponed or made earlier.
1390
- *
1391
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can postpone the end date of an order.
1392
- *
1393
1389
  * @param _id - Order ID.
1394
1390
  * @param endDate - New end date and time.
1395
1391
  *
1396
1392
  * Must be later than the current end date and time.
1397
1393
  * @public
1398
- * @documentationMaturity preview
1399
1394
  * @requiredField _id
1400
1395
  * @requiredField endDate
1401
1396
  * @param options - Options for postponing the end date of an order.
@@ -1413,7 +1408,6 @@ export declare function postponeEndDate(_id: string, endDate: Date): Promise<voi
1413
1408
  * For orders with one-time payments, a cancellation occurs `IMMEDIATELY`.
1414
1409
  *
1415
1410
  * Canceling an order changes the order status to `"CANCELED"`.
1416
- * The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when an order is canceled.
1417
1411
  *
1418
1412
  * #### Canceling during the free trial period.
1419
1413
  *
@@ -1424,16 +1418,13 @@ export declare function postponeEndDate(_id: string, endDate: Date): Promise<voi
1424
1418
  * Canceling `IMMEDIATELY` will end the subscription for the buyer
1425
1419
  * immediately, even during the free trial period and the buyer won't be billed.
1426
1420
  * Canceling at the `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period. Then, the subscription ends and the buyer is not billed.
1427
- *
1428
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only users with the "Manage Pricing Plans" and "Manage Subscription" permissions can cancel orders.
1429
- *
1430
- *
1431
- *
1432
- *
1433
1421
  * @param _id - Order ID.
1434
- * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
1422
+ * @param effectiveAt - When the order is canceled.
1423
+ *
1424
+ * One time orders can only be canceled immediately. Supported values:
1425
+ * - `"IMMEDIATELY"`: The order is canceled immediately.
1426
+ * - `"NEXT_PAYMENT_DATE"`: The order is canceled at the next payment date.
1435
1427
  * @public
1436
- * @documentationMaturity preview
1437
1428
  * @requiredField _id
1438
1429
  * @requiredField effectiveAt
1439
1430
  * @param options - Options for canceling orders.
@@ -1456,13 +1447,8 @@ export declare function cancelOrder(_id: string, effectiveAt: CancellationEffect
1456
1447
  * An error occurs if you attempt to:
1457
1448
  * - Mark an already-paid, offline order as paid. You cannot make an offline order as paid twice.
1458
1449
  * - Mark an online order as paid. The `markAsPaid()` function is supported for offline orders only.
1459
- *
1460
- * The [`onOrderMarkedAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordermarkedaspaid) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an offline order is marked as paid.
1461
- *
1462
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can mark offline orders as paid.
1463
1450
  * @param _id - Order ID.
1464
1451
  * @public
1465
- * @documentationMaturity preview
1466
1452
  * @requiredField _id
1467
1453
  * @returns Fulfilled - When the order is marked as paid.
1468
1454
  */
@@ -1480,14 +1466,9 @@ export declare function markAsPaid(_id: string): Promise<void>;
1480
1466
  *
1481
1467
  * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
1482
1468
  *
1483
- * The [`onOrderPaused()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderpaused) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is paused.
1484
- *
1485
- * Paused orders can be continued with the [`resumeOrder()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder) function.
1486
- *
1487
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can pause orders.
1469
+ * Paused orders can be continued with the [`resumeOrder()`](#resumeorder) function.
1488
1470
  * @param _id - Order ID.
1489
1471
  * @public
1490
- * @documentationMaturity preview
1491
1472
  * @requiredField _id
1492
1473
  * @returns Fulfilled - When the order is paused.
1493
1474
  */
@@ -1503,14 +1484,9 @@ export declare function pauseOrder(_id: string): Promise<void>;
1503
1484
  * - The order status changes to `"ACTIVE"`.
1504
1485
  * - The `pausePeriods` array is updated.
1505
1486
  * - The `endDate` for the order is adjusted to include the pause period.
1506
- * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use.)
1507
- *
1508
- * The [`onOrderResumed()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderresumed) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is resumed.
1509
- *
1510
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can resume orders.
1487
+ * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
1511
1488
  * @param _id - Order ID.
1512
1489
  * @public
1513
- * @documentationMaturity preview
1514
1490
  * @requiredField _id
1515
1491
  * @returns Fulfilled - When the order is resumed.
1516
1492
  */
@@ -182,10 +182,9 @@ const _resumeOrderResponse = {};
182
182
  /**
183
183
  * Gets an order by ID for the currently logged-in member.
184
184
  *
185
- * The `getCurrentMemberOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
185
+ * The `memberGetOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
186
186
  * @param _id - Order ID.
187
187
  * @public
188
- * @documentationMaturity preview
189
188
  * @requiredField _id
190
189
  * @param options - Options for getting a logged-in member's order.
191
190
  */
@@ -238,7 +237,6 @@ export function memberGetOrder(_id, options) {
238
237
  *
239
238
  * The `memberListOrders()` function returns a Promise that resolves to a list of up to 100 pricing plan orders.
240
239
  * @public
241
- * @documentationMaturity preview
242
240
  * @param options - Filtering, sorting, and pagination options.
243
241
  */
244
242
  export function memberListOrders(options) {
@@ -252,6 +250,7 @@ export function memberListOrders(options) {
252
250
  limit: '$[0].limit',
253
251
  offset: '$[0].offset',
254
252
  sorting: '$[0].sorting',
253
+ fieldSet: '$[0].fieldSet',
255
254
  };
256
255
  const responseTransformation = '$';
257
256
  // @ts-ignore
@@ -300,9 +299,8 @@ export function memberListOrders(options) {
300
299
  *
301
300
  * For orders with recurring payments, a cancellation can be set to occur either immediately or at the next payment date. For orders with one-time payments, a cancellation occurs immediately after the request is processed.
302
301
  *
303
- * Requesting an order cancellation starts the cancellation process. The event is triggered immediately and the function's promise is fulfilled. However, there may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
302
+ * Requesting an order cancellation starts the cancellation process. There may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
304
303
  *
305
- * The [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handler runs when a cancellation is requested. The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when the cancellation is completed.
306
304
  * @param _id - Order ID.
307
305
  * @param effectiveAt - Whether to cancel the order immediately or at the next payment date.
308
306
  * One-time payment orders can only be canceled immediately.
@@ -311,7 +309,6 @@ export function memberListOrders(options) {
311
309
  * - `"IMMEDIATELY"`: Indicates that the order should be canceled immediately.
312
310
  * - `"NEXT_PAYMENT_DATE"`: Indicates that the order be canceled at the next payment date.
313
311
  * @public
314
- * @documentationMaturity preview
315
312
  * @requiredField _id
316
313
  * @requiredField effectiveAt
317
314
  * @param options - Options for requesting a cancellation.
@@ -368,7 +365,7 @@ export function requestCancellation(_id, effectiveAt) {
368
365
  *
369
366
  * Payment of an offline order is handled in 1 of 2 ways.
370
367
  * - When creating the order, select `true` in the `paid` request parameter.
371
- * - After creation, with the [`markAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/markaspaid) function.
368
+ * - After creation, with the [`markAsPaid()`](#markaspaid) function.
372
369
  *
373
370
  * When creating a non-free offline order:
374
371
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
@@ -377,17 +374,12 @@ export function requestCancellation(_id, effectiveAt) {
377
374
  * When creating a free offline order:
378
375
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
379
376
  * - The order's last payment status is set to `"NOT_APPLICABLE"`.
380
- *
381
- * The [`onOrderCreated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercreated) event handler runs when an offline order is created.
382
- *
383
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can create offline orders.
384
- * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
385
377
  * @public
386
- * @documentationMaturity preview
387
378
  * @requiredField options
388
379
  * @requiredField options.memberId
389
380
  * @requiredField planId
390
381
  * @param options - Options for creating an offline order.
382
+ * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](pricing-plans/plans)
391
383
  * @returns Fulfilled - The order of the plan.
392
384
  */
393
385
  export function createOfflineOrder(planId, options) {
@@ -450,16 +442,13 @@ export function createOfflineOrder(planId, options) {
450
442
  *
451
443
  * If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, `tax` previews as `null`.
452
444
  *
453
- * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getpricepreview) function.
454
- *
455
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get offline order previews.
456
- * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
445
+ * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](#getpricepreview) function.
457
446
  * @public
458
- * @documentationMaturity preview
459
447
  * @requiredField options
460
448
  * @requiredField options.memberId
461
449
  * @requiredField planId
462
450
  * @param options - Options for previewing the offline order.
451
+ * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](pricing-plans/plans)
463
452
  * @returns Fulfilled - A preview of the order.
464
453
  */
465
454
  export function getOfflineOrderPreview(planId, options) {
@@ -516,12 +505,11 @@ export function getOfflineOrderPreview(planId, options) {
516
505
  *
517
506
  * The `getPricePreview()` function returns a Promise that resolves to a temporary preview of the order's price.
518
507
  *
519
- * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
508
+ * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
520
509
  *
521
- * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getofflineorderpreview).
510
+ * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](#getofflineorderpreview).
522
511
  * @param planId - ID of plan to preview.
523
512
  * @public
524
- * @documentationMaturity preview
525
513
  * @requiredField planId
526
514
  * @param options - Options for getting a price preview.
527
515
  * @returns Fulfilled - A preview of the pricing for the order.
@@ -577,11 +565,8 @@ export function getPricePreview(planId, options) {
577
565
  * Retrieves an order by ID.
578
566
  *
579
567
  * The `managementGetOrder()` function returns a Promise that resolves to information about the specified order.
580
- *
581
- * >**Note:** Only users with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get orders.
582
568
  * @param _id - Order ID.
583
569
  * @public
584
- * @documentationMaturity preview
585
570
  * @requiredField _id
586
571
  * @param options - Options to use when getting an order.
587
572
  * @returns Order.
@@ -635,11 +620,8 @@ export function managementGetOrder(_id, options) {
635
620
  *
636
621
  * The `managementListOrders()` function returns a Promise that resolves to a list of up to 50 pricing plan orders. You can specify options for filtering, sorting, and paginating the results.
637
622
  *
638
- * This function returns the orders on the site. To list orders for the currently logged-in member, use [`listMemberOrders()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/memberlistorders).
639
- *
640
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can list orders.
623
+ * This function returns the orders on the site. To list orders for the currently logged-in member, use [`memberListOrders()`](#memberlistorders).
641
624
  * @public
642
- * @documentationMaturity preview
643
625
  * @param options - Filtering, sorting, and pagination options.
644
626
  */
645
627
  export function managementListOrders(options) {
@@ -654,6 +636,7 @@ export function managementListOrders(options) {
654
636
  limit: '$[0].limit',
655
637
  offset: '$[0].offset',
656
638
  sorting: '$[0].sorting',
639
+ fieldSet: '$[0].fieldSet',
657
640
  };
658
641
  const responseTransformation = '$';
659
642
  // @ts-ignore
@@ -705,16 +688,11 @@ export function managementListOrders(options) {
705
688
  *
706
689
  * Postponing an order causes the following changes:
707
690
  * - The `endDate` for the order is adjusted to the new end date.
708
- * The `onOrderEndDatePostponed()` and `onOrderUpdated()` event handlers run when an order's end date is postponed or made earlier.
709
- *
710
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can postpone the end date of an order.
711
- *
712
691
  * @param _id - Order ID.
713
692
  * @param endDate - New end date and time.
714
693
  *
715
694
  * Must be later than the current end date and time.
716
695
  * @public
717
- * @documentationMaturity preview
718
696
  * @requiredField _id
719
697
  * @requiredField endDate
720
698
  * @param options - Options for postponing the end date of an order.
@@ -775,7 +753,6 @@ export function postponeEndDate(_id, endDate) {
775
753
  * For orders with one-time payments, a cancellation occurs `IMMEDIATELY`.
776
754
  *
777
755
  * Canceling an order changes the order status to `"CANCELED"`.
778
- * The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when an order is canceled.
779
756
  *
780
757
  * #### Canceling during the free trial period.
781
758
  *
@@ -786,16 +763,13 @@ export function postponeEndDate(_id, endDate) {
786
763
  * Canceling `IMMEDIATELY` will end the subscription for the buyer
787
764
  * immediately, even during the free trial period and the buyer won't be billed.
788
765
  * Canceling at the `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period. Then, the subscription ends and the buyer is not billed.
789
- *
790
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only users with the "Manage Pricing Plans" and "Manage Subscription" permissions can cancel orders.
791
- *
792
- *
793
- *
794
- *
795
766
  * @param _id - Order ID.
796
- * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
767
+ * @param effectiveAt - When the order is canceled.
768
+ *
769
+ * One time orders can only be canceled immediately. Supported values:
770
+ * - `"IMMEDIATELY"`: The order is canceled immediately.
771
+ * - `"NEXT_PAYMENT_DATE"`: The order is canceled at the next payment date.
797
772
  * @public
798
- * @documentationMaturity preview
799
773
  * @requiredField _id
800
774
  * @requiredField effectiveAt
801
775
  * @param options - Options for canceling orders.
@@ -861,13 +835,8 @@ export function cancelOrder(_id, effectiveAt) {
861
835
  * An error occurs if you attempt to:
862
836
  * - Mark an already-paid, offline order as paid. You cannot make an offline order as paid twice.
863
837
  * - Mark an online order as paid. The `markAsPaid()` function is supported for offline orders only.
864
- *
865
- * The [`onOrderMarkedAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordermarkedaspaid) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an offline order is marked as paid.
866
- *
867
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can mark offline orders as paid.
868
838
  * @param _id - Order ID.
869
839
  * @public
870
- * @documentationMaturity preview
871
840
  * @requiredField _id
872
841
  * @returns Fulfilled - When the order is marked as paid.
873
842
  */
@@ -927,14 +896,9 @@ export function markAsPaid(_id) {
927
896
  *
928
897
  * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
929
898
  *
930
- * The [`onOrderPaused()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderpaused) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is paused.
931
- *
932
- * Paused orders can be continued with the [`resumeOrder()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder) function.
933
- *
934
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can pause orders.
899
+ * Paused orders can be continued with the [`resumeOrder()`](#resumeorder) function.
935
900
  * @param _id - Order ID.
936
901
  * @public
937
- * @documentationMaturity preview
938
902
  * @requiredField _id
939
903
  * @returns Fulfilled - When the order is paused.
940
904
  */
@@ -992,14 +956,9 @@ export function pauseOrder(_id) {
992
956
  * - The order status changes to `"ACTIVE"`.
993
957
  * - The `pausePeriods` array is updated.
994
958
  * - The `endDate` for the order is adjusted to include the pause period.
995
- * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use.)
996
- *
997
- * The [`onOrderResumed()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderresumed) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is resumed.
998
- *
999
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can resume orders.
959
+ * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
1000
960
  * @param _id - Order ID.
1001
961
  * @public
1002
- * @documentationMaturity preview
1003
962
  * @requiredField _id
1004
963
  * @returns Fulfilled - When the order is resumed.
1005
964
  */