@wix/auto_sdk_pricing-plans_orders 1.0.113 → 1.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +155 -155
- package/build/cjs/index.js +452 -452
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +498 -498
- package/build/cjs/index.typings.js +323 -323
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +268 -268
- package/build/cjs/meta.js +334 -334
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +30 -30
- package/build/cjs/schemas.js +59 -59
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +155 -155
- package/build/es/index.mjs +452 -452
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +498 -498
- package/build/es/index.typings.mjs +323 -323
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +268 -268
- package/build/es/meta.mjs +334 -334
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +30 -30
- package/build/es/schemas.mjs +59 -59
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +155 -155
- package/build/internal/cjs/index.js +452 -452
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +498 -498
- package/build/internal/cjs/index.typings.js +323 -323
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +268 -268
- package/build/internal/cjs/meta.js +334 -334
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +30 -30
- package/build/internal/cjs/schemas.js +59 -59
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +155 -155
- package/build/internal/es/index.mjs +452 -452
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +498 -498
- package/build/internal/es/index.typings.mjs +323 -323
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +268 -268
- package/build/internal/es/meta.mjs +334 -334
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +30 -30
- package/build/internal/es/schemas.mjs +59 -59
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,116 +1,41 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export { AccountInfo, AccountInfoMetadata, ActionEvent, ApplicationError, ApplyCouponRequest, ApplyCouponResponse, BaseEventMetadata, BulkActionMetadata, BulkOrderResult, BulkPauseOrderRequest, BulkPauseOrderResponse, BulkResumeOrderRequest, BulkResumeOrderResponse, Buyer, CancelOrderRequest, CancelOrderResponse, Cancellation, CancellationCause, CancellationCauseWithLiterals, CancellationEffectiveAt, Captcha, ChangeStartDateRequest, ChangeStartDateResponse, Coupon, CouponsError, CreateExternalOrderRequest, CreateExternalOrderResponse, CreateGuestOnlineOrderRequest, CreateGuestOnlineOrderResponse, CreateOfflineOrderRequest, CreateOnlineOrderRequest, CurrentCycle, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, Duration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Fee, FormData, GetAvailableOrderActionsRequest, GetAvailableOrderActionsResponse, GetGuestOnlineOrderPreviewRequest, GetGuestOnlineOrderPreviewResponse, GetOfflineOrderPreviewRequest, GetOnlineOrderPreviewRequest, GetOrderRequest, GetOrdersStatsRequest, GetOrdersStatsResponse, GetPricePreviewRequest, Guest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, ListOrdersRequest, MarkAsPaidRequest, MarkAsPaidResponse, MemberGetOrderRequest,
|
|
2
|
+
import { MemberGetOrderOptions, MemberGetOrderResponse, MemberListOrdersOptions, MemberListOrdersResponse, CancellationEffectiveAtWithLiterals, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderApplicationErrors, CreateOnlineOrderValidationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderApplicationErrors, CreateOfflineOrderValidationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewValidationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewValidationErrors, GetPricePreviewOptions, GetPricePreviewResponse, GetPricePreviewApplicationErrors, ManagementGetOrderOptions, Order, ManagementListOrdersOptions, ListOrdersResponse, OrderCanceledEnvelope, OrderCreatedEnvelope, OrderStartDateChangedEnvelope, OrderUpdatedEnvelope, OrderAutoRenewCanceledEnvelope, OrderCycleStartedEnvelope, OrderEndDatePostponedEnvelope, OrderEndedEnvelope, OrderMarkedAsPaidEnvelope, OrderPausedEnvelope, OrderPurchasedEnvelope, OrderResumedEnvelope, OrderStartedEnvelope } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, ApplicationError, ApplyCouponRequest, ApplyCouponResponse, BaseEventMetadata, BulkActionMetadata, BulkOrderResult, BulkPauseOrderRequest, BulkPauseOrderResponse, BulkResumeOrderRequest, BulkResumeOrderResponse, Buyer, CancelOrderRequest, CancelOrderResponse, Cancellation, CancellationCause, CancellationCauseWithLiterals, CancellationEffectiveAt, Captcha, ChangeStartDateRequest, ChangeStartDateResponse, Coupon, CouponsError, CreateExternalOrderRequest, CreateExternalOrderResponse, CreateGuestOnlineOrderRequest, CreateGuestOnlineOrderResponse, CreateOfflineOrderRequest, CreateOnlineOrderRequest, CurrentCycle, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, Duration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Fee, FormData, GetAvailableOrderActionsRequest, GetAvailableOrderActionsResponse, GetGuestOnlineOrderPreviewRequest, GetGuestOnlineOrderPreviewResponse, GetOfflineOrderPreviewRequest, GetOnlineOrderPreviewRequest, GetOrderRequest, GetOrderResponse, GetOrdersStatsRequest, GetOrdersStatsResponse, GetPricePreviewRequest, Guest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, ListOrdersRequest, MarkAsPaidRequest, MarkAsPaidResponse, MemberGetOrderRequest, MemberListOrdersRequest, MessageEnvelope, OnBehalf, OrderAutoRenewCanceled, OrderCanceled, OrderCycle, OrderCycleStarted, OrderEndDatePostponed, OrderEnded, OrderMarkedAsPaid, OrderMethod, OrderMethodWithLiterals, OrderPaused, OrderPurchased, OrderResumed, OrderStartDateChanged, OrderStarted, OrderStatus, OrderStatusWithLiterals, OrderType, OrderTypeWithLiterals, OrdersQueryOrdersRequest, OrdersQueryOrdersResponse, Paging, PagingMetadataV2, PauseOrderRequest, PauseOrderResponse, PausePeriod, PaymentStatus, PaymentStatusWithLiterals, PeriodUnit, PeriodUnitWithLiterals, PostponeEndDateRequest, PostponeEndDateResponse, Price, PriceDetails, PriceDetailsPricingModelOneOf, PriceDuration, PricingDetails, PricingDetailsPricingModelOneOf, QueryOrdersRequest, QueryOrdersResponse, QueryV2, QueryV2PagingMethodOneOf, ReasonNotSuspendable, ReasonNotSuspendableWithLiterals, Recurrence, RequestCancellationRequest, RequestCancellationResponse, RestoreInfo, ResumeOrderRequest, ResumeOrderResponse, Set, SetSubmissionRequest, SetSubmissionResponse, SetWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, SpannedPrice, Status, StatusWithLiterals, Tax, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
declare function
|
|
6
|
-
interface
|
|
5
|
+
declare function memberGetOrder$1(httpClient: HttpClient): MemberGetOrderSignature;
|
|
6
|
+
interface MemberGetOrderSignature {
|
|
7
7
|
/**
|
|
8
|
-
* Retrieves an order by ID.
|
|
8
|
+
* Retrieves an order for the currently logged-in member by ID.
|
|
9
9
|
* @param - Order ID.
|
|
10
|
-
* @param - Options
|
|
10
|
+
* @param - Options for getting a logged-in member's order.
|
|
11
11
|
*/
|
|
12
|
-
(_id: string, options?:
|
|
12
|
+
(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<MemberGetOrderResponse, `order._id` | `order.planId` | `order.subscriptionId` | `order.buyer.memberId` | `order.buyer.contactId` | `order.priceDetails.subscription.cycleDuration.unit` | `order.priceDetails.subtotal` | `order.priceDetails.discount` | `order.priceDetails.tax.name` | `order.priceDetails.tax.includedInPrice` | `order.priceDetails.tax.rate` | `order.priceDetails.tax.amount` | `order.priceDetails.total` | `order.priceDetails.planPrice` | `order.priceDetails.currency` | `order.priceDetails.coupon.code` | `order.priceDetails.coupon.amount` | `order.priceDetails.coupon._id` | `order.pricing.prices` | `order.pricing.prices.${number}.duration.cycleFrom` | `order.pricing.prices.${number}.price.subtotal` | `order.pricing.prices.${number}.price.discount` | `order.pricing.prices.${number}.price.total` | `order.pricing.prices.${number}.price.currency` | `order.pricing.prices.${number}.price.proration` | `order.type` | `order.status` | `order.cancellation.cause` | `order.cancellation.effectiveAt` | `order.lastPaymentStatus` | `order.pausePeriods` | `order.pausePeriods.${number}.status` | `order.currentCycle.index` | `order.planName` | `order.planDescription` | `order.planPrice`, 7>>;
|
|
13
13
|
}
|
|
14
|
-
declare function
|
|
15
|
-
interface
|
|
14
|
+
declare function memberListOrders$1(httpClient: HttpClient): MemberListOrdersSignature;
|
|
15
|
+
interface MemberListOrdersSignature {
|
|
16
16
|
/**
|
|
17
|
-
* Retrieves a list of up to
|
|
18
|
-
*
|
|
19
|
-
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
20
|
-
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
17
|
+
* Retrieves a list of up to 100 pricing plan orders for currently logged-in member.
|
|
21
18
|
* @param - Filtering, sorting, and pagination options.
|
|
22
19
|
*/
|
|
23
|
-
(options?:
|
|
24
|
-
}
|
|
25
|
-
declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature;
|
|
26
|
-
interface PostponeEndDateSignature {
|
|
27
|
-
/**
|
|
28
|
-
* Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
|
|
29
|
-
*
|
|
30
|
-
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
31
|
-
* Can't postpone an order with `status`: `PAUSED`.
|
|
32
|
-
* @param - Order ID.
|
|
33
|
-
* @param - New end date and time.
|
|
34
|
-
*
|
|
35
|
-
* Must be later than the current end date and time.
|
|
36
|
-
* @param - Options for postponing the end date of an order.
|
|
37
|
-
*/
|
|
38
|
-
(_id: string, endDate: Date): Promise<void>;
|
|
20
|
+
(options?: MemberListOrdersOptions): Promise<NonNullablePaths<MemberListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
|
|
39
21
|
}
|
|
40
|
-
declare function
|
|
41
|
-
interface
|
|
22
|
+
declare function requestCancellation$1(httpClient: HttpClient): RequestCancellationSignature;
|
|
23
|
+
interface RequestCancellationSignature {
|
|
42
24
|
/**
|
|
43
|
-
* Cancels an
|
|
44
|
-
*
|
|
45
|
-
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
46
|
-
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
25
|
+
* Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately.
|
|
47
26
|
*
|
|
48
|
-
*
|
|
27
|
+
* 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.
|
|
49
28
|
*
|
|
50
|
-
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
51
|
-
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
52
|
-
* of the free trial period.
|
|
29
|
+
* Canceling during the free trial period: When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period.
|
|
53
30
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
57
|
-
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
58
|
-
* Then, the subscription ends and the buyer is not billed.
|
|
31
|
+
* >**Note:**
|
|
32
|
+
* >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
59
33
|
* @param - Order ID.
|
|
60
|
-
* @param -
|
|
61
|
-
* @param - Options for
|
|
34
|
+
* @param - Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately.
|
|
35
|
+
* @param - Options for requesting a cancellation.
|
|
62
36
|
*/
|
|
63
37
|
(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
64
38
|
}
|
|
65
|
-
declare function markAsPaid$1(httpClient: HttpClient): MarkAsPaidSignature;
|
|
66
|
-
interface MarkAsPaidSignature {
|
|
67
|
-
/**
|
|
68
|
-
* Marks an offline order as paid.
|
|
69
|
-
* > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
|
|
70
|
-
*
|
|
71
|
-
* Marking an offline order as paid causes the following changes:
|
|
72
|
-
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
73
|
-
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
74
|
-
*
|
|
75
|
-
* An error occurs if you attempt to:
|
|
76
|
-
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
77
|
-
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
78
|
-
* @param - Order ID.
|
|
79
|
-
*/
|
|
80
|
-
(_id: string): Promise<void>;
|
|
81
|
-
}
|
|
82
|
-
declare function pauseOrder$1(httpClient: HttpClient): PauseOrderSignature;
|
|
83
|
-
interface PauseOrderSignature {
|
|
84
|
-
/**
|
|
85
|
-
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
86
|
-
*
|
|
87
|
-
* Only orders with `status`: `ACTIVE` can be paused.
|
|
88
|
-
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
89
|
-
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
90
|
-
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
91
|
-
*
|
|
92
|
-
* To resume a paused order, call Resume Order.
|
|
93
|
-
* @param - Order ID.
|
|
94
|
-
*/
|
|
95
|
-
(_id: string): Promise<void>;
|
|
96
|
-
}
|
|
97
|
-
declare function resumeOrder$1(httpClient: HttpClient): ResumeOrderSignature;
|
|
98
|
-
interface ResumeOrderSignature {
|
|
99
|
-
/**
|
|
100
|
-
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
101
|
-
*
|
|
102
|
-
* Resuming an order causes the following changes:
|
|
103
|
-
* - The order status changes to `"ACTIVE"`.
|
|
104
|
-
* - The `pausePeriods` array is updated.
|
|
105
|
-
* - The `endDate` for the order is adjusted to include the pause period.
|
|
106
|
-
* - For orders with recurring payments, the payment schedule is restarted.
|
|
107
|
-
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
108
|
-
*
|
|
109
|
-
* To pause an order, call Pause Order.
|
|
110
|
-
* @param - Order ID.
|
|
111
|
-
*/
|
|
112
|
-
(_id: string): Promise<void>;
|
|
113
|
-
}
|
|
114
39
|
declare function createOnlineOrder$1(httpClient: HttpClient): CreateOnlineOrderSignature;
|
|
115
40
|
interface CreateOnlineOrderSignature {
|
|
116
41
|
/**
|
|
@@ -211,43 +136,121 @@ interface GetPricePreviewSignature {
|
|
|
211
136
|
__applicationErrorsType?: GetPricePreviewApplicationErrors;
|
|
212
137
|
}>;
|
|
213
138
|
}
|
|
214
|
-
declare function
|
|
215
|
-
interface
|
|
139
|
+
declare function managementGetOrder$1(httpClient: HttpClient): ManagementGetOrderSignature;
|
|
140
|
+
interface ManagementGetOrderSignature {
|
|
216
141
|
/**
|
|
217
|
-
* Retrieves an order
|
|
142
|
+
* Retrieves an order by ID.
|
|
218
143
|
* @param - Order ID.
|
|
219
|
-
* @param - Options
|
|
220
|
-
* @returns
|
|
144
|
+
* @param - Options to use when getting an order.
|
|
145
|
+
* @returns Order.
|
|
221
146
|
*/
|
|
222
|
-
(_id: string, options?:
|
|
147
|
+
(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<Order, `_id` | `planId` | `subscriptionId` | `buyer.memberId` | `buyer.contactId` | `priceDetails.subscription.cycleDuration.unit` | `priceDetails.subtotal` | `priceDetails.discount` | `priceDetails.tax.name` | `priceDetails.tax.includedInPrice` | `priceDetails.tax.rate` | `priceDetails.tax.amount` | `priceDetails.total` | `priceDetails.planPrice` | `priceDetails.currency` | `priceDetails.coupon.code` | `priceDetails.coupon.amount` | `priceDetails.coupon._id` | `pricing.prices` | `pricing.prices.${number}.duration.cycleFrom` | `pricing.prices.${number}.price.subtotal` | `pricing.prices.${number}.price.discount` | `pricing.prices.${number}.price.total` | `pricing.prices.${number}.price.currency` | `pricing.prices.${number}.price.proration` | `type` | `status` | `cancellation.cause` | `cancellation.effectiveAt` | `lastPaymentStatus` | `pausePeriods` | `pausePeriods.${number}.status` | `currentCycle.index` | `planName` | `planDescription` | `planPrice`, 6>>;
|
|
223
148
|
}
|
|
224
|
-
declare function
|
|
225
|
-
interface
|
|
149
|
+
declare function managementListOrders$1(httpClient: HttpClient): ManagementListOrdersSignature;
|
|
150
|
+
interface ManagementListOrdersSignature {
|
|
226
151
|
/**
|
|
227
|
-
* Retrieves a list of up to
|
|
152
|
+
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
153
|
+
*
|
|
154
|
+
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
155
|
+
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
228
156
|
* @param - Filtering, sorting, and pagination options.
|
|
229
157
|
*/
|
|
230
|
-
(options?:
|
|
158
|
+
(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
|
|
231
159
|
}
|
|
232
|
-
declare function
|
|
233
|
-
interface
|
|
160
|
+
declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature;
|
|
161
|
+
interface PostponeEndDateSignature {
|
|
234
162
|
/**
|
|
235
|
-
*
|
|
163
|
+
* Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
|
|
236
164
|
*
|
|
237
|
-
*
|
|
165
|
+
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
166
|
+
* Can't postpone an order with `status`: `PAUSED`.
|
|
167
|
+
* @param - Order ID.
|
|
168
|
+
* @param - New end date and time.
|
|
238
169
|
*
|
|
239
|
-
*
|
|
170
|
+
* Must be later than the current end date and time.
|
|
171
|
+
* @param - Options for postponing the end date of an order.
|
|
172
|
+
*/
|
|
173
|
+
(_id: string, endDate: Date): Promise<void>;
|
|
174
|
+
}
|
|
175
|
+
declare function cancelOrder$1(httpClient: HttpClient): CancelOrderSignature;
|
|
176
|
+
interface CancelOrderSignature {
|
|
177
|
+
/**
|
|
178
|
+
* Cancels an existing order.
|
|
240
179
|
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
180
|
+
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
181
|
+
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
182
|
+
*
|
|
183
|
+
* #### Canceling during the free trial period.
|
|
184
|
+
*
|
|
185
|
+
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
186
|
+
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
187
|
+
* of the free trial period.
|
|
188
|
+
*
|
|
189
|
+
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
190
|
+
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
191
|
+
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
192
|
+
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
193
|
+
* Then, the subscription ends and the buyer is not billed.
|
|
243
194
|
* @param - Order ID.
|
|
244
|
-
* @param -
|
|
245
|
-
* @param - Options for
|
|
195
|
+
* @param - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
196
|
+
* @param - Options for canceling orders.
|
|
246
197
|
*/
|
|
247
198
|
(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
248
199
|
}
|
|
249
|
-
declare
|
|
200
|
+
declare function markAsPaid$1(httpClient: HttpClient): MarkAsPaidSignature;
|
|
201
|
+
interface MarkAsPaidSignature {
|
|
202
|
+
/**
|
|
203
|
+
* Marks an offline order as paid.
|
|
204
|
+
* > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
|
|
205
|
+
*
|
|
206
|
+
* Marking an offline order as paid causes the following changes:
|
|
207
|
+
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
208
|
+
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
209
|
+
*
|
|
210
|
+
* An error occurs if you attempt to:
|
|
211
|
+
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
212
|
+
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
213
|
+
* @param - Order ID.
|
|
214
|
+
*/
|
|
215
|
+
(_id: string): Promise<void>;
|
|
216
|
+
}
|
|
217
|
+
declare function pauseOrder$1(httpClient: HttpClient): PauseOrderSignature;
|
|
218
|
+
interface PauseOrderSignature {
|
|
219
|
+
/**
|
|
220
|
+
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
221
|
+
*
|
|
222
|
+
* Only orders with `status`: `ACTIVE` can be paused.
|
|
223
|
+
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
224
|
+
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
225
|
+
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
226
|
+
*
|
|
227
|
+
* To resume a paused order, call Resume Order.
|
|
228
|
+
* @param - Order ID.
|
|
229
|
+
*/
|
|
230
|
+
(_id: string): Promise<void>;
|
|
231
|
+
}
|
|
232
|
+
declare function resumeOrder$1(httpClient: HttpClient): ResumeOrderSignature;
|
|
233
|
+
interface ResumeOrderSignature {
|
|
234
|
+
/**
|
|
235
|
+
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
236
|
+
*
|
|
237
|
+
* Resuming an order causes the following changes:
|
|
238
|
+
* - The order status changes to `"ACTIVE"`.
|
|
239
|
+
* - The `pausePeriods` array is updated.
|
|
240
|
+
* - The `endDate` for the order is adjusted to include the pause period.
|
|
241
|
+
* - For orders with recurring payments, the payment schedule is restarted.
|
|
242
|
+
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
243
|
+
*
|
|
244
|
+
* To pause an order, call Pause Order.
|
|
245
|
+
* @param - Order ID.
|
|
246
|
+
*/
|
|
247
|
+
(_id: string): Promise<void>;
|
|
248
|
+
}
|
|
250
249
|
declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
|
|
250
|
+
declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
|
|
251
|
+
declare const onOrderStartDateChanged$1: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
|
|
252
|
+
declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
|
|
253
|
+
declare const onOrderAutoRenewCanceled$1: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
|
|
251
254
|
declare const onOrderCycleStarted$1: EventDefinition<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
|
|
252
255
|
declare const onOrderEndDatePostponed$1: EventDefinition<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
|
|
253
256
|
declare const onOrderEnded$1: EventDefinition<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
|
|
@@ -256,10 +259,15 @@ declare const onOrderPaused$1: EventDefinition<OrderPausedEnvelope, "wix.pricing
|
|
|
256
259
|
declare const onOrderPurchased$1: EventDefinition<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
|
|
257
260
|
declare const onOrderResumed$1: EventDefinition<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
|
|
258
261
|
declare const onOrderStarted$1: EventDefinition<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
|
|
259
|
-
declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
|
|
260
|
-
declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
|
|
261
|
-
declare const onOrderStartDateChanged$1: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
|
|
262
262
|
|
|
263
|
+
declare const memberGetOrder: MaybeContext<BuildRESTFunction<typeof memberGetOrder$1> & typeof memberGetOrder$1>;
|
|
264
|
+
declare const memberListOrders: MaybeContext<BuildRESTFunction<typeof memberListOrders$1> & typeof memberListOrders$1>;
|
|
265
|
+
declare const requestCancellation: MaybeContext<BuildRESTFunction<typeof requestCancellation$1> & typeof requestCancellation$1>;
|
|
266
|
+
declare const createOnlineOrder: MaybeContext<BuildRESTFunction<typeof createOnlineOrder$1> & typeof createOnlineOrder$1>;
|
|
267
|
+
declare const createOfflineOrder: MaybeContext<BuildRESTFunction<typeof createOfflineOrder$1> & typeof createOfflineOrder$1>;
|
|
268
|
+
declare const getOnlineOrderPreview: MaybeContext<BuildRESTFunction<typeof getOnlineOrderPreview$1> & typeof getOnlineOrderPreview$1>;
|
|
269
|
+
declare const getOfflineOrderPreview: MaybeContext<BuildRESTFunction<typeof getOfflineOrderPreview$1> & typeof getOfflineOrderPreview$1>;
|
|
270
|
+
declare const getPricePreview: MaybeContext<BuildRESTFunction<typeof getPricePreview$1> & typeof getPricePreview$1>;
|
|
263
271
|
declare const managementGetOrder: MaybeContext<BuildRESTFunction<typeof managementGetOrder$1> & typeof managementGetOrder$1>;
|
|
264
272
|
declare const managementListOrders: MaybeContext<BuildRESTFunction<typeof managementListOrders$1> & typeof managementListOrders$1>;
|
|
265
273
|
declare const postponeEndDate: MaybeContext<BuildRESTFunction<typeof postponeEndDate$1> & typeof postponeEndDate$1>;
|
|
@@ -267,22 +275,6 @@ declare const cancelOrder: MaybeContext<BuildRESTFunction<typeof cancelOrder$1>
|
|
|
267
275
|
declare const markAsPaid: MaybeContext<BuildRESTFunction<typeof markAsPaid$1> & typeof markAsPaid$1>;
|
|
268
276
|
declare const pauseOrder: MaybeContext<BuildRESTFunction<typeof pauseOrder$1> & typeof pauseOrder$1>;
|
|
269
277
|
declare const resumeOrder: MaybeContext<BuildRESTFunction<typeof resumeOrder$1> & typeof resumeOrder$1>;
|
|
270
|
-
declare const createOnlineOrder: MaybeContext<BuildRESTFunction<typeof createOnlineOrder$1> & typeof createOnlineOrder$1>;
|
|
271
|
-
declare const createOfflineOrder: MaybeContext<BuildRESTFunction<typeof createOfflineOrder$1> & typeof createOfflineOrder$1>;
|
|
272
|
-
declare const getOnlineOrderPreview: MaybeContext<BuildRESTFunction<typeof getOnlineOrderPreview$1> & typeof getOnlineOrderPreview$1>;
|
|
273
|
-
declare const getOfflineOrderPreview: MaybeContext<BuildRESTFunction<typeof getOfflineOrderPreview$1> & typeof getOfflineOrderPreview$1>;
|
|
274
|
-
declare const getPricePreview: MaybeContext<BuildRESTFunction<typeof getPricePreview$1> & typeof getPricePreview$1>;
|
|
275
|
-
declare const memberGetOrder: MaybeContext<BuildRESTFunction<typeof memberGetOrder$1> & typeof memberGetOrder$1>;
|
|
276
|
-
declare const memberListOrders: MaybeContext<BuildRESTFunction<typeof memberListOrders$1> & typeof memberListOrders$1>;
|
|
277
|
-
declare const requestCancellation: MaybeContext<BuildRESTFunction<typeof requestCancellation$1> & typeof requestCancellation$1>;
|
|
278
|
-
/**
|
|
279
|
-
* Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
|
|
280
|
-
*
|
|
281
|
-
* This webhook is *not* triggered in the following scenarios:
|
|
282
|
-
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
|
|
283
|
-
* + When an order expires at the end of the current payment cycle because it was canceled and `effectiveAt` was set to `NEXT_PAYMENT_DATE`. Instead, at the time of expiration, Order Canceled and Order Ended are triggered.
|
|
284
|
-
*/
|
|
285
|
-
declare const onOrderAutoRenewCanceled: BuildEventDefinition<typeof onOrderAutoRenewCanceled$1> & typeof onOrderAutoRenewCanceled$1;
|
|
286
278
|
/**
|
|
287
279
|
* Triggered when an order is canceled.
|
|
288
280
|
*
|
|
@@ -291,6 +283,34 @@ declare const onOrderAutoRenewCanceled: BuildEventDefinition<typeof onOrderAutoR
|
|
|
291
283
|
* + If the order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`, the webhook is triggered at the end of the current payment cycle. In this case, the Order Auto Renew Canceled Webhook is triggered immediately.
|
|
292
284
|
*/
|
|
293
285
|
declare const onOrderCanceled: BuildEventDefinition<typeof onOrderCanceled$1> & typeof onOrderCanceled$1;
|
|
286
|
+
/**
|
|
287
|
+
* Triggered when an order is created.
|
|
288
|
+
*/
|
|
289
|
+
declare const onOrderCreated: BuildEventDefinition<typeof onOrderCreated$1> & typeof onOrderCreated$1;
|
|
290
|
+
/**
|
|
291
|
+
* Triggered when an order's `startDate` is changed.
|
|
292
|
+
*/
|
|
293
|
+
declare const onOrderStartDateChanged: BuildEventDefinition<typeof onOrderStartDateChanged$1> & typeof onOrderStartDateChanged$1;
|
|
294
|
+
/**
|
|
295
|
+
* Triggered for any of the following update events:
|
|
296
|
+
*
|
|
297
|
+
* + Order is paid for. Order Purchased is also triggered.
|
|
298
|
+
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
299
|
+
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
300
|
+
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
301
|
+
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
302
|
+
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
303
|
+
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
304
|
+
*/
|
|
305
|
+
declare const onOrderUpdated: BuildEventDefinition<typeof onOrderUpdated$1> & typeof onOrderUpdated$1;
|
|
306
|
+
/**
|
|
307
|
+
* Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
|
|
308
|
+
*
|
|
309
|
+
* This webhook is *not* triggered in the following scenarios:
|
|
310
|
+
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
|
|
311
|
+
* + When an order expires at the end of the current payment cycle because it was canceled and `effectiveAt` was set to `NEXT_PAYMENT_DATE`. Instead, at the time of expiration, Order Canceled and Order Ended are triggered.
|
|
312
|
+
*/
|
|
313
|
+
declare const onOrderAutoRenewCanceled: BuildEventDefinition<typeof onOrderAutoRenewCanceled$1> & typeof onOrderAutoRenewCanceled$1;
|
|
294
314
|
/**
|
|
295
315
|
* Triggered at the start of a new payment cycle for an existing order.
|
|
296
316
|
*
|
|
@@ -333,25 +353,5 @@ declare const onOrderResumed: BuildEventDefinition<typeof onOrderResumed$1> & ty
|
|
|
333
353
|
* Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
|
|
334
354
|
*/
|
|
335
355
|
declare const onOrderStarted: BuildEventDefinition<typeof onOrderStarted$1> & typeof onOrderStarted$1;
|
|
336
|
-
/**
|
|
337
|
-
* Triggered for any of the following update events:
|
|
338
|
-
*
|
|
339
|
-
* + Order is paid for. Order Purchased is also triggered.
|
|
340
|
-
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
341
|
-
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
342
|
-
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
343
|
-
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
344
|
-
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
345
|
-
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
346
|
-
*/
|
|
347
|
-
declare const onOrderUpdated: BuildEventDefinition<typeof onOrderUpdated$1> & typeof onOrderUpdated$1;
|
|
348
|
-
/**
|
|
349
|
-
* Triggered when an order is created.
|
|
350
|
-
*/
|
|
351
|
-
declare const onOrderCreated: BuildEventDefinition<typeof onOrderCreated$1> & typeof onOrderCreated$1;
|
|
352
|
-
/**
|
|
353
|
-
* Triggered when an order's `startDate` is changed.
|
|
354
|
-
*/
|
|
355
|
-
declare const onOrderStartDateChanged: BuildEventDefinition<typeof onOrderStartDateChanged$1> & typeof onOrderStartDateChanged$1;
|
|
356
356
|
|
|
357
|
-
export { CancellationEffectiveAtWithLiterals, CreateOfflineOrderApplicationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderValidationErrors, CreateOnlineOrderApplicationErrors, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderValidationErrors, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewValidationErrors, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewValidationErrors,
|
|
357
|
+
export { CancellationEffectiveAtWithLiterals, CreateOfflineOrderApplicationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderValidationErrors, CreateOnlineOrderApplicationErrors, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderValidationErrors, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewValidationErrors, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewValidationErrors, GetPricePreviewApplicationErrors, GetPricePreviewOptions, GetPricePreviewResponse, ListOrdersResponse, ManagementGetOrderOptions, ManagementListOrdersOptions, MemberGetOrderOptions, MemberGetOrderResponse, MemberListOrdersOptions, MemberListOrdersResponse, Order, OrderAutoRenewCanceledEnvelope, OrderCanceledEnvelope, OrderCreatedEnvelope, OrderCycleStartedEnvelope, OrderEndDatePostponedEnvelope, OrderEndedEnvelope, OrderMarkedAsPaidEnvelope, OrderPausedEnvelope, OrderPurchasedEnvelope, OrderResumedEnvelope, OrderStartDateChangedEnvelope, OrderStartedEnvelope, OrderUpdatedEnvelope, cancelOrder, createOfflineOrder, createOnlineOrder, getOfflineOrderPreview, getOnlineOrderPreview, getPricePreview, managementGetOrder, managementListOrders, markAsPaid, memberGetOrder, memberListOrders, onOrderAutoRenewCanceled, onOrderCanceled, onOrderCreated, onOrderCycleStarted, onOrderEndDatePostponed, onOrderEnded, onOrderMarkedAsPaid, onOrderPaused, onOrderPurchased, onOrderResumed, onOrderStartDateChanged, onOrderStarted, onOrderUpdated, pauseOrder, postponeEndDate, requestCancellation, resumeOrder };
|