@wix/auto_sdk_pricing-plans_orders 1.0.64 → 1.0.66
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 +41 -12
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{pricing-plans-v2-order-orders.universal-BoSpvZn2.d.ts → index.typings.d.ts} +833 -1
- package/build/cjs/index.typings.js +1349 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +41 -12
- package/build/es/index.mjs.map +1 -1
- package/build/es/{pricing-plans-v2-order-orders.universal-BoSpvZn2.d.mts → index.typings.d.mts} +833 -1
- package/build/es/index.typings.mjs +1299 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +41 -12
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{pricing-plans-v2-order-orders.universal-C4vOetLA.d.ts → index.typings.d.ts} +833 -1
- package/build/internal/cjs/index.typings.js +1349 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +41 -12
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{pricing-plans-v2-order-orders.universal-C4vOetLA.d.mts → index.typings.d.mts} +833 -1
- package/build/internal/es/index.typings.mjs +1299 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { ManagementGetOrderOptions, GetOrderResponse, ManagementListOrdersOptions, ListOrdersResponse, CancellationEffectiveAtWithLiterals, MemberGetOrderOptions, Order, MemberListOrdersOptions, MemberListOrdersResponse, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderApplicationErrors, CreateOnlineOrderValidationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderApplicationErrors, CreateOfflineOrderValidationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewValidationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewValidationErrors, GetPricePreviewOptions, GetPricePreviewResponse, GetPricePreviewApplicationErrors, OrderAutoRenewCanceledEnvelope, OrderCanceledEnvelope, OrderCycleStartedEnvelope, OrderEndDatePostponedEnvelope, OrderEndedEnvelope, OrderMarkedAsPaidEnvelope, OrderPausedEnvelope, OrderPurchasedEnvelope, OrderResumedEnvelope, OrderStartedEnvelope, OrderUpdatedEnvelope, OrderCreatedEnvelope, OrderStartDateChangedEnvelope } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, ApplicationError, ApplyCouponRequest, ApplyCouponResponse, BaseEventMetadata, BulkActionMetadata, BulkOrderResult, BulkPauseOrderRequest, BulkPauseOrderResponse, BulkResumeOrderRequest, BulkResumeOrderResponse, Buyer, CancelOrderRequest, CancelOrderResponse, Cancellation, CancellationCause, 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, MemberGetOrderResponse, MemberListOrdersRequest, MessageEnvelope, OnBehalf, OrderAutoRenewCanceled, OrderCanceled, OrderCycle, OrderCycleStarted, OrderEndDatePostponed, OrderEnded, OrderMarkedAsPaid, OrderMethod, OrderPaused, OrderPurchased, OrderResumed, OrderStartDateChanged, OrderStarted, OrderStatus, OrderType, OrdersQueryOrdersRequest, OrdersQueryOrdersResponse, Paging, PagingMetadataV2, PauseOrderRequest, PauseOrderResponse, PausePeriod, PaymentStatus, PeriodUnit, PostponeEndDateRequest, PostponeEndDateResponse, Price, PriceDetails, PriceDetailsPricingModelOneOf, PriceDuration, PricingDetails, PricingDetailsPricingModelOneOf, QueryOrdersRequest, QueryOrdersResponse, QueryV2, QueryV2PagingMethodOneOf, ReasonNotSuspendable, Recurrence, RequestCancellationRequest, RequestCancellationResponse, RestoreInfo, ResumeOrderRequest, ResumeOrderResponse, Set, SetSubmissionRequest, SetSubmissionResponse, SortOrder, Sorting, SpannedPrice, Status, Tax, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
type OrderNonNullablePaths = `_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.subscription.cycleDuration.unit` | `pricing.prices` | `pricing.prices.${number}.duration.cycleFrom` | `pricing.prices.${number}.price.subtotal` | `pricing.prices.${number}.price.coupon.code` | `pricing.prices.${number}.price.coupon.amount` | `pricing.prices.${number}.price.coupon._id` | `pricing.prices.${number}.price.discount` | `pricing.prices.${number}.price.tax.name` | `pricing.prices.${number}.price.tax.includedInPrice` | `pricing.prices.${number}.price.tax.rate` | `pricing.prices.${number}.price.tax.amount` | `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`;
|
|
5
6
|
declare function managementGetOrder$1(httpClient: HttpClient): ManagementGetOrderSignature;
|
|
6
7
|
interface ManagementGetOrderSignature {
|
|
7
8
|
/**
|
|
@@ -9,7 +10,9 @@ interface ManagementGetOrderSignature {
|
|
|
9
10
|
* @param - Order ID.
|
|
10
11
|
* @param - Options to use when getting an order.
|
|
11
12
|
*/
|
|
12
|
-
(_id: string, options?: ManagementGetOrderOptions
|
|
13
|
+
(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<GetOrderResponse, {
|
|
14
|
+
[P in OrderNonNullablePaths]: `order.${P}`;
|
|
15
|
+
}[OrderNonNullablePaths]>>;
|
|
13
16
|
}
|
|
14
17
|
declare function managementListOrders$1(httpClient: HttpClient): ManagementListOrdersSignature;
|
|
15
18
|
interface ManagementListOrdersSignature {
|
|
@@ -20,7 +23,9 @@ interface ManagementListOrdersSignature {
|
|
|
20
23
|
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
21
24
|
* @param - Filtering, sorting, and pagination options.
|
|
22
25
|
*/
|
|
23
|
-
(options?: ManagementListOrdersOptions
|
|
26
|
+
(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, {
|
|
27
|
+
[P in OrderNonNullablePaths]: `orders.${number}.${P}`;
|
|
28
|
+
}[OrderNonNullablePaths]>>;
|
|
24
29
|
}
|
|
25
30
|
declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature;
|
|
26
31
|
interface PostponeEndDateSignature {
|
|
@@ -119,7 +124,7 @@ interface MemberGetOrderSignature {
|
|
|
119
124
|
* @param - Options for getting a logged-in member's order.
|
|
120
125
|
* @returns Requested order.
|
|
121
126
|
*/
|
|
122
|
-
(_id: string, options?: MemberGetOrderOptions
|
|
127
|
+
(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<Order, OrderNonNullablePaths>>;
|
|
123
128
|
}
|
|
124
129
|
declare function memberListOrders$1(httpClient: HttpClient): MemberListOrdersSignature;
|
|
125
130
|
interface MemberListOrdersSignature {
|
|
@@ -127,7 +132,9 @@ interface MemberListOrdersSignature {
|
|
|
127
132
|
* Retrieves a list of up to 100 pricing plan orders for currently logged-in member.
|
|
128
133
|
* @param - Filtering, sorting, and pagination options.
|
|
129
134
|
*/
|
|
130
|
-
(options?: MemberListOrdersOptions
|
|
135
|
+
(options?: MemberListOrdersOptions): Promise<NonNullablePaths<MemberListOrdersResponse, {
|
|
136
|
+
[P in OrderNonNullablePaths]: `orders.${number}.${P}`;
|
|
137
|
+
}[OrderNonNullablePaths]>>;
|
|
131
138
|
}
|
|
132
139
|
declare function requestCancellation$1(httpClient: HttpClient): RequestCancellationSignature;
|
|
133
140
|
interface RequestCancellationSignature {
|
|
@@ -156,7 +163,12 @@ interface CreateOnlineOrderSignature {
|
|
|
156
163
|
* When an online order is created, but payment hasn't been processed, its status is set to `DRAFT`. After the payment has been processed, if the start date is in the future the order's status is set to `PENDING`. Otherwise, it's set to `ACTIVE`.
|
|
157
164
|
* @param - Plan ID.
|
|
158
165
|
*/
|
|
159
|
-
(planId: string, options?: CreateOnlineOrderOptions
|
|
166
|
+
(planId: string, options?: NonNullablePaths<CreateOnlineOrderOptions, `onBehalf.memberId`>): Promise<NonNullablePaths<CreateOnlineOrderResponse, {
|
|
167
|
+
[P in OrderNonNullablePaths]: `order.${P}`;
|
|
168
|
+
}[OrderNonNullablePaths]> & {
|
|
169
|
+
__applicationErrorsType?: CreateOnlineOrderApplicationErrors;
|
|
170
|
+
__validationErrorsType?: CreateOnlineOrderValidationErrors;
|
|
171
|
+
}>;
|
|
160
172
|
}
|
|
161
173
|
declare function createOfflineOrder$1(httpClient: HttpClient): CreateOfflineOrderSignature;
|
|
162
174
|
interface CreateOfflineOrderSignature {
|
|
@@ -182,7 +194,12 @@ interface CreateOfflineOrderSignature {
|
|
|
182
194
|
* @param - ID of the member ordering the plan, from the Members API.
|
|
183
195
|
* @param - Options for creating an offline order.
|
|
184
196
|
*/
|
|
185
|
-
(planId: string, memberId: string, options?: CreateOfflineOrderOptions
|
|
197
|
+
(planId: string, memberId: string, options?: CreateOfflineOrderOptions): Promise<NonNullablePaths<CreateOfflineOrderResponse, {
|
|
198
|
+
[P in OrderNonNullablePaths]: `order.${P}`;
|
|
199
|
+
}[OrderNonNullablePaths]> & {
|
|
200
|
+
__applicationErrorsType?: CreateOfflineOrderApplicationErrors;
|
|
201
|
+
__validationErrorsType?: CreateOfflineOrderValidationErrors;
|
|
202
|
+
}>;
|
|
186
203
|
}
|
|
187
204
|
declare function getOnlineOrderPreview$1(httpClient: HttpClient): GetOnlineOrderPreviewSignature;
|
|
188
205
|
interface GetOnlineOrderPreviewSignature {
|
|
@@ -194,7 +211,12 @@ interface GetOnlineOrderPreviewSignature {
|
|
|
194
211
|
* This method must be called using the site member identity ([SDK](https://dev.wix.com/docs/sdk/articles/get-started/about-identities#site-member) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member)). Therefore, [Wix apps](https://dev.wix.com/docs/build-apps) can't currently call this method using REST.
|
|
195
212
|
* @param - Plan ID.
|
|
196
213
|
*/
|
|
197
|
-
(planId: string, options?: GetOnlineOrderPreviewOptions
|
|
214
|
+
(planId: string, options?: GetOnlineOrderPreviewOptions): Promise<NonNullablePaths<GetOnlineOrderPreviewResponse, {
|
|
215
|
+
[P in OrderNonNullablePaths]: `order.${P}`;
|
|
216
|
+
}[OrderNonNullablePaths] | `purchaseLimitExceeded`> & {
|
|
217
|
+
__applicationErrorsType?: GetOnlineOrderPreviewApplicationErrors;
|
|
218
|
+
__validationErrorsType?: GetOnlineOrderPreviewValidationErrors;
|
|
219
|
+
}>;
|
|
198
220
|
}
|
|
199
221
|
declare function getOfflineOrderPreview$1(httpClient: HttpClient): GetOfflineOrderPreviewSignature;
|
|
200
222
|
interface GetOfflineOrderPreviewSignature {
|
|
@@ -214,7 +236,12 @@ interface GetOfflineOrderPreviewSignature {
|
|
|
214
236
|
* @param - Options for previewing the offline order.
|
|
215
237
|
* @param - ID of the plan of the previewed order.
|
|
216
238
|
*/
|
|
217
|
-
(planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions
|
|
239
|
+
(planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions): Promise<NonNullablePaths<GetOfflineOrderPreviewResponse, {
|
|
240
|
+
[P in OrderNonNullablePaths]: `order.${P}`;
|
|
241
|
+
}[OrderNonNullablePaths] | `purchaseLimitExceeded`> & {
|
|
242
|
+
__applicationErrorsType?: GetOfflineOrderPreviewApplicationErrors;
|
|
243
|
+
__validationErrorsType?: GetOfflineOrderPreviewValidationErrors;
|
|
244
|
+
}>;
|
|
218
245
|
}
|
|
219
246
|
declare function getPricePreview$1(httpClient: HttpClient): GetPricePreviewSignature;
|
|
220
247
|
interface GetPricePreviewSignature {
|
|
@@ -230,7 +257,9 @@ interface GetPricePreviewSignature {
|
|
|
230
257
|
* @param - ID of plan to preview.
|
|
231
258
|
* @param - Options for getting a price preview.
|
|
232
259
|
*/
|
|
233
|
-
(planId: string, options?: GetPricePreviewOptions
|
|
260
|
+
(planId: string, options?: GetPricePreviewOptions): Promise<NonNullablePaths<GetPricePreviewResponse, `price.subscription.cycleDuration.unit` | `price.subtotal` | `price.discount` | `price.tax.name` | `price.tax.includedInPrice` | `price.tax.rate` | `price.tax.amount` | `price.total` | `price.planPrice` | `price.currency` | `price.coupon.code` | `price.coupon.amount` | `price.coupon._id` | `prices` | `prices.${number}.duration.cycleFrom` | `prices.${number}.price.subtotal` | `prices.${number}.price.coupon.code` | `prices.${number}.price.coupon.amount` | `prices.${number}.price.coupon._id` | `prices.${number}.price.discount` | `prices.${number}.price.tax.name` | `prices.${number}.price.tax.includedInPrice` | `prices.${number}.price.tax.rate` | `prices.${number}.price.tax.amount` | `prices.${number}.price.total` | `prices.${number}.price.currency` | `prices.${number}.price.proration`> & {
|
|
261
|
+
__applicationErrorsType?: GetPricePreviewApplicationErrors;
|
|
262
|
+
}>;
|
|
234
263
|
}
|
|
235
264
|
declare const onOrderAutoRenewCanceled$1: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
|
|
236
265
|
declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
|