@wix/auto_sdk_pricing-plans_orders 1.0.65 → 1.0.67
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 +34 -19
- package/build/cjs/index.js.map +1 -1
- package/build/es/index.d.mts +34 -19
- package/build/es/index.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +34 -19
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/es/index.d.mts +34 -19
- package/build/internal/es/index.mjs.map +1 -1
- package/package.json +3 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
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
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,9 +163,11 @@ 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
|
|
160
|
-
|
|
161
|
-
|
|
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;
|
|
162
171
|
}>;
|
|
163
172
|
}
|
|
164
173
|
declare function createOfflineOrder$1(httpClient: HttpClient): CreateOfflineOrderSignature;
|
|
@@ -185,9 +194,11 @@ interface CreateOfflineOrderSignature {
|
|
|
185
194
|
* @param - ID of the member ordering the plan, from the Members API.
|
|
186
195
|
* @param - Options for creating an offline order.
|
|
187
196
|
*/
|
|
188
|
-
(planId: string, memberId: string, options?: CreateOfflineOrderOptions
|
|
189
|
-
|
|
190
|
-
|
|
197
|
+
(planId: string, memberId: string, options?: CreateOfflineOrderOptions): Promise<NonNullablePaths<CreateOfflineOrderResponse, {
|
|
198
|
+
[P in OrderNonNullablePaths]: `order.${P}`;
|
|
199
|
+
}[OrderNonNullablePaths]> & {
|
|
200
|
+
__applicationErrorsType?: CreateOfflineOrderApplicationErrors;
|
|
201
|
+
__validationErrorsType?: CreateOfflineOrderValidationErrors;
|
|
191
202
|
}>;
|
|
192
203
|
}
|
|
193
204
|
declare function getOnlineOrderPreview$1(httpClient: HttpClient): GetOnlineOrderPreviewSignature;
|
|
@@ -200,9 +211,11 @@ interface GetOnlineOrderPreviewSignature {
|
|
|
200
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.
|
|
201
212
|
* @param - Plan ID.
|
|
202
213
|
*/
|
|
203
|
-
(planId: string, options?: GetOnlineOrderPreviewOptions
|
|
204
|
-
|
|
205
|
-
|
|
214
|
+
(planId: string, options?: GetOnlineOrderPreviewOptions): Promise<NonNullablePaths<GetOnlineOrderPreviewResponse, {
|
|
215
|
+
[P in OrderNonNullablePaths]: `order.${P}`;
|
|
216
|
+
}[OrderNonNullablePaths] | `purchaseLimitExceeded`> & {
|
|
217
|
+
__applicationErrorsType?: GetOnlineOrderPreviewApplicationErrors;
|
|
218
|
+
__validationErrorsType?: GetOnlineOrderPreviewValidationErrors;
|
|
206
219
|
}>;
|
|
207
220
|
}
|
|
208
221
|
declare function getOfflineOrderPreview$1(httpClient: HttpClient): GetOfflineOrderPreviewSignature;
|
|
@@ -223,9 +236,11 @@ interface GetOfflineOrderPreviewSignature {
|
|
|
223
236
|
* @param - Options for previewing the offline order.
|
|
224
237
|
* @param - ID of the plan of the previewed order.
|
|
225
238
|
*/
|
|
226
|
-
(planId: string, memberId: string, options?: GetOfflineOrderPreviewOptions
|
|
227
|
-
|
|
228
|
-
|
|
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;
|
|
229
244
|
}>;
|
|
230
245
|
}
|
|
231
246
|
declare function getPricePreview$1(httpClient: HttpClient): GetPricePreviewSignature;
|
|
@@ -242,8 +257,8 @@ interface GetPricePreviewSignature {
|
|
|
242
257
|
* @param - ID of plan to preview.
|
|
243
258
|
* @param - Options for getting a price preview.
|
|
244
259
|
*/
|
|
245
|
-
(planId: string, options?: GetPricePreviewOptions
|
|
246
|
-
__applicationErrorsType?: GetPricePreviewApplicationErrors
|
|
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;
|
|
247
262
|
}>;
|
|
248
263
|
}
|
|
249
264
|
declare const onOrderAutoRenewCanceled$1: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
|