@wix/auto_sdk_ecom_draft-orders 1.0.80 → 1.0.82
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 +8 -14
- package/build/cjs/index.js +76 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +58 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +8 -14
- package/build/es/index.mjs +76 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +57 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -14
- package/build/internal/cjs/index.js +76 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +58 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -14
- package/build/internal/es/index.mjs +76 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +57 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { CreateDraftOrderResponse, CreateDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, AddLineItemsToDraftOrderApplicationErrors, LineItemChangeDetails, UpdateLineItemsResponse, UpdateLineItemsApplicationErrors, IdAndApplied, SetDiscountsResponse, SetDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteCustomDiscountsApplicationErrors, SetAdditionalFeesResponse, SetAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomAdditionalFeesApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetShippingInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetBuyerInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetRecipientInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBillingInfoApplicationErrors, GetDraftOrderResponse, GetDraftOrderApplicationErrors, GetOrderDraftabilityStatusResponse, CommitDraftOrderOptions, CommitDraftOrderResponse, CommitDraftOrderApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, CreateOrderFromDraftApplicationErrors, DeleteDraftOrderApplicationErrors,
|
|
3
|
-
export { ActionEvent, Activity, ActivityContentOneOf, ActivityType, ActivityTypeWithLiterals, AddLineItemsToDraftOrderRequest, AdditionalFee, AdditionalFeeDetails, AdditionalFeeOption, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, AppliedDiscountDiscountTypeWithLiterals, AttributionSource, AttributionSourceWithLiterals, AuthorizedPaymentCaptured, AuthorizedPaymentCreated, AuthorizedPaymentVoided, Balance, BalanceSummary, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BusinessLocationChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, BuyerChangedDetails, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerInfo, BuyerInfoIdOneOf, CalculatedDraftOrder, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CatalogReference, CatalogReferenceLineItem, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargebackCreated, ChargebackReversed, Color, CommitDraftOrderRequest, Coupon, CreateCustomAdditionalFeesRequest, CreateCustomDiscountsRequest, CreateDraftOrderRequest, CreateEmptyDraftOrderRequest, CreateOrderFromDraftRequest, CreatedBy, CreatedByStringOneOf, CreditCardDetails, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { CreateDraftOrderResponse, CreateDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, AddLineItemsToDraftOrderApplicationErrors, LineItemChangeDetails, UpdateLineItemsResponse, UpdateLineItemsApplicationErrors, IdAndApplied, SetDiscountsResponse, SetDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteCustomDiscountsApplicationErrors, SetAdditionalFeesResponse, SetAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomAdditionalFeesApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetShippingInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetBuyerInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetRecipientInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBillingInfoApplicationErrors, GetDraftOrderResponse, GetDraftOrderApplicationErrors, GetOrderDraftabilityStatusResponse, CommitDraftOrderOptions, CommitDraftOrderResponse, CommitDraftOrderApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, CreateOrderFromDraftApplicationErrors, DeleteDraftOrderApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsApplicationErrors, SetTaxExemptionOptions, SetTaxExemptionResponse, SetTaxExemptionApplicationErrors, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBusinessLocationApplicationErrors, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, DraftOrdersQueryBuilder, CursorQuery, typedQueryDraftOrders } from './index.typings.mjs';
|
|
3
|
+
export { ActionEvent, Activity, ActivityContentOneOf, ActivityType, ActivityTypeWithLiterals, AddLineItemsToDraftOrderRequest, AdditionalFee, AdditionalFeeDetails, AdditionalFeeOption, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, AppliedDiscountDiscountTypeWithLiterals, AttributionSource, AttributionSourceWithLiterals, AuthorizedPaymentCaptured, AuthorizedPaymentCreated, AuthorizedPaymentVoided, Balance, BalanceSummary, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BusinessLocationChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, BuyerChangedDetails, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerInfo, BuyerInfoIdOneOf, CalculatedDraftOrder, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CatalogReference, CatalogReferenceLineItem, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargebackCreated, ChargebackReversed, Color, CommitDraftOrderRequest, Coupon, CreateCustomAdditionalFeesRequest, CreateCustomDiscountsRequest, CreateDraftOrderRequest, CreateEmptyDraftOrderRequest, CreateOrderFromDraftRequest, CreatedBy, CreatedByStringOneOf, CreditCardDetails, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, CustomActivity, CustomAllowedActions, CustomField, CustomLineItem, DeleteCustomAdditionalFeesRequest, DeleteCustomDiscountsRequest, DeleteDraftOrderRequest, DeleteDraftOrderResponse, DeliveryLogistics, DeliveryTimeSlot, DepositDetails, DepositDetailsDepositOneOf, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, DescriptionLinesOverride, Details, DetailsKindOneOf, DigitalFile, DiscountDetails, DiscountOption, DiscountOptionDiscountAmountOneOf, DiscountReason, DiscountReasonWithLiterals, DiscountRule, DiscountRuleName, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DraftOrder, DraftOrderChangesApplied, DraftOrderCommitSettings, DraftOrdersQueryResult, EditingStatus, EditingStatusWithLiterals, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReceipt, FieldViolation, FileType, FileTypeWithLiterals, FocalPoint, FreeTrialPeriod, FulfillmentStatus, FulfillmentStatusWithLiterals, FulfillmentStatusesAggregate, FullAddressContactDetails, GetDraftOrderRequest, GetOrderDraftabilityStatusRequest, GiftCardPaymentRefund, IdentificationData, IdentificationDataIdOneOf, InventoryUpdate, ItemChangedDetails, ItemDetails, ItemDetailsChangeTypeOneOf, ItemModifier, ItemTaxFullDetails, ItemType, ItemTypeItemTypeDataOneOf, ItemTypePreset, ItemTypePresetWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LineItemAmount, LineItemChanges, LineItemDescriptionLineChange, LineItemDiscount, LineItemExchangeData, LineItemModifiersChange, LineItemPriceChange, LineItemProductNameChange, LineItemQuantityChange, LineItemQuantityChangeType, LineItemQuantityChangeTypeWithLiterals, LineItemTaxBreakdown, LineItemTaxInfo, Location, LocationAndQuantity, ManagedAdditionalFee, ManagedDiscount, ManagedLineItem, MembershipPaymentRefund, MerchantComment, MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf, MessageEnvelope, ModifierGroup, ModifiersGroupsOverride, NewExchangeOrderCreated, NonDraftableReason, NonDraftableReasonWithLiterals, Order, OrderActionType, OrderActionTypeWithLiterals, OrderActivityTypeEnumActivityType, OrderActivityTypeEnumActivityTypeWithLiterals, OrderChange, OrderChangeValueOneOf, OrderCreateNotifications, OrderCreateSettings, OrderCreatedFromExchange, OrderLineItem, OrderRefunded, OrderSettings, OrderSettingsAllowedActionsOneOf, OrderStatus, OrderStatusWithLiterals, OrderTaxBreakdown, OrderTaxInfo, PaymentCanceled, PaymentCanceledPaymentDetailsOneOf, PaymentDeclined, PaymentDeclinedPaymentDetailsOneOf, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentPending, PaymentPendingPaymentDetailsOneOf, PaymentRefundFailed, PaymentRefunded, PaymentStatus, PaymentStatusWithLiterals, PhysicalProperties, PickupAddress, PickupDetails, PickupDetailsPickupMethod, PickupDetailsPickupMethodWithLiterals, PickupMethod, PickupMethodWithLiterals, PlainTextValue, Price, PriceDescription, PriceSummary, ProductName, QueryDraftOrdersRequest, QueryDraftOrdersResponse, ReceiptCreated, ReceiptCreatedReceiptInfoOneOf, ReceiptSent, ReceiptSentReceiptInfoOneOf, RecipientInfoChangedDetails, RecipientInfoDetails, RecipientInfoDetailsChangeTypeOneOf, RefundInitiated, RefundedAsStoreCredit, RefundedPayment, RefundedPaymentKindOneOf, RegularPayment, RegularPaymentPaymentMethodDetailsOneOf, RegularPaymentRefund, RestoreInfo, RuleType, RuleTypeWithLiterals, SavedPaymentMethod, SecuredMedia, SetAdditionalFeesRequest, SetBillingInfoRequest, SetBusinessLocationRequest, SetBuyerInfoRequest, SetDepositApplicationErrors, SetDepositOptions, SetDepositRequest, SetDepositResponse, SetDiscountsRequest, SetRecipientInfoRequest, SetShippingInfoRequest, SetTaxExemptionRequest, ShippingChangedDetails, ShippingDetails, ShippingDetailsChangeTypeOneOf, ShippingInformation, ShippingInformationChange, ShippingOption, ShippingPrice, ShippingRegion, SortOrder, SortOrderWithLiterals, Sorting, SourceType, SourceTypeWithLiterals, StreetAddress, SubscriptionDescription, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionInfo, SubscriptionSettings, SubscriptionTitle, SystemError, TagList, Tags, TaxDetails, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, TotalPriceChange, TranslatableString, TranslatedValue, UpdateExtendedFieldsRequest, UpdateLineItemsRequest, UpdateShippingInfoRequest, UpdateShippingInfoResponse, V1BalanceSummary, V1CreatedBy, V1CreatedByStringOneOf, V1DeliveryLogistics, V1DeliveryLogisticsAddressOneOf, V1DeliveryTimeSlot, V1PickupDetails, V1ShippingInformation, V1ShippingPrice, ValidationError, VatId, VatType, VatTypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals, WixReceipt } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createDraftOrder$1(httpClient: HttpClient): CreateDraftOrderSignature;
|
|
6
6
|
interface CreateDraftOrderSignature {
|
|
@@ -245,16 +245,6 @@ interface DeleteDraftOrderSignature {
|
|
|
245
245
|
__applicationErrorsType?: DeleteDraftOrderApplicationErrors;
|
|
246
246
|
}>;
|
|
247
247
|
}
|
|
248
|
-
declare function queryDraftOrders$1(httpClient: HttpClient): QueryDraftOrdersSignature;
|
|
249
|
-
interface QueryDraftOrdersSignature {
|
|
250
|
-
/**
|
|
251
|
-
* Retrieves a list of up to 100 draft orders, given the provided paging, filtering, and sorting.
|
|
252
|
-
*
|
|
253
|
-
* For field support, see [supported filters and sorting](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/draft-orders/supported-filters-and-sorting).
|
|
254
|
-
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
255
|
-
*/
|
|
256
|
-
(): DraftOrdersQueryBuilder;
|
|
257
|
-
}
|
|
258
248
|
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
259
249
|
interface UpdateExtendedFieldsSignature {
|
|
260
250
|
/**
|
|
@@ -294,6 +284,10 @@ declare const onDraftOrderCreated$1: EventDefinition<DraftOrderCreatedEnvelope,
|
|
|
294
284
|
declare const onDraftOrderDeleted$1: EventDefinition<DraftOrderDeletedEnvelope, "wix.ecom.v1.draft_order_deleted">;
|
|
295
285
|
declare const onDraftOrderUpdated$1: EventDefinition<DraftOrderUpdatedEnvelope, "wix.ecom.v1.draft_order_updated">;
|
|
296
286
|
|
|
287
|
+
declare function customQueryDraftOrders(httpClient: HttpClient): {
|
|
288
|
+
(): DraftOrdersQueryBuilder;
|
|
289
|
+
(query: CursorQuery): ReturnType<typeof typedQueryDraftOrders>;
|
|
290
|
+
};
|
|
297
291
|
declare const createDraftOrder: MaybeContext<BuildRESTFunction<typeof createDraftOrder$1> & typeof createDraftOrder$1>;
|
|
298
292
|
declare const createEmptyDraftOrder: MaybeContext<BuildRESTFunction<typeof createEmptyDraftOrder$1> & typeof createEmptyDraftOrder$1>;
|
|
299
293
|
declare const addLineItemsToDraftOrder: MaybeContext<BuildRESTFunction<typeof addLineItemsToDraftOrder$1> & typeof addLineItemsToDraftOrder$1>;
|
|
@@ -313,10 +307,10 @@ declare const getOrderDraftabilityStatus: MaybeContext<BuildRESTFunction<typeof
|
|
|
313
307
|
declare const commitDraftOrder: MaybeContext<BuildRESTFunction<typeof commitDraftOrder$1> & typeof commitDraftOrder$1>;
|
|
314
308
|
declare const createOrderFromDraft: MaybeContext<BuildRESTFunction<typeof createOrderFromDraft$1> & typeof createOrderFromDraft$1>;
|
|
315
309
|
declare const deleteDraftOrder: MaybeContext<BuildRESTFunction<typeof deleteDraftOrder$1> & typeof deleteDraftOrder$1>;
|
|
316
|
-
declare const queryDraftOrders: MaybeContext<BuildRESTFunction<typeof queryDraftOrders$1> & typeof queryDraftOrders$1>;
|
|
317
310
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
318
311
|
declare const setTaxExemption: MaybeContext<BuildRESTFunction<typeof setTaxExemption$1> & typeof setTaxExemption$1>;
|
|
319
312
|
declare const setBusinessLocation: MaybeContext<BuildRESTFunction<typeof setBusinessLocation$1> & typeof setBusinessLocation$1>;
|
|
313
|
+
declare const queryDraftOrders: MaybeContext<BuildRESTFunction<typeof customQueryDraftOrders> & typeof customQueryDraftOrders>;
|
|
320
314
|
/**
|
|
321
315
|
* Triggered when a draft order is created.
|
|
322
316
|
*/
|
|
@@ -330,4 +324,4 @@ declare const onDraftOrderDeleted: BuildEventDefinition<typeof onDraftOrderDelet
|
|
|
330
324
|
*/
|
|
331
325
|
declare const onDraftOrderUpdated: BuildEventDefinition<typeof onDraftOrderUpdated$1> & typeof onDraftOrderUpdated$1;
|
|
332
326
|
|
|
333
|
-
export { AddLineItemsToDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, CommitDraftOrderApplicationErrors, CommitDraftOrderOptions, CommitDraftOrderResponse, CreateCustomAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateDraftOrderApplicationErrors, CreateDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateOrderFromDraftApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, DeleteCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteDraftOrderApplicationErrors, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, DraftOrdersQueryBuilder, GetDraftOrderApplicationErrors, GetDraftOrderResponse, GetOrderDraftabilityStatusResponse, IdAndApplied, LineItemChangeDetails, SetAdditionalFeesApplicationErrors, SetAdditionalFeesResponse, SetBillingInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBusinessLocationApplicationErrors, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBuyerInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetDiscountsApplicationErrors, SetDiscountsResponse, SetRecipientInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetShippingInfoApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetTaxExemptionApplicationErrors, SetTaxExemptionOptions, SetTaxExemptionResponse, UpdateExtendedFieldsApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateLineItemsApplicationErrors, UpdateLineItemsResponse, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, onDraftOrderCreated, onDraftOrderDeleted, onDraftOrderUpdated, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateExtendedFields, updateLineItems };
|
|
327
|
+
export { AddLineItemsToDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, CommitDraftOrderApplicationErrors, CommitDraftOrderOptions, CommitDraftOrderResponse, CreateCustomAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateDraftOrderApplicationErrors, CreateDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateOrderFromDraftApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, CursorQuery, DeleteCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteDraftOrderApplicationErrors, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, DraftOrdersQueryBuilder, GetDraftOrderApplicationErrors, GetDraftOrderResponse, GetOrderDraftabilityStatusResponse, IdAndApplied, LineItemChangeDetails, SetAdditionalFeesApplicationErrors, SetAdditionalFeesResponse, SetBillingInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBusinessLocationApplicationErrors, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBuyerInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetDiscountsApplicationErrors, SetDiscountsResponse, SetRecipientInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetShippingInfoApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetTaxExemptionApplicationErrors, SetTaxExemptionOptions, SetTaxExemptionResponse, UpdateExtendedFieldsApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateLineItemsApplicationErrors, UpdateLineItemsResponse, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, onDraftOrderCreated, onDraftOrderDeleted, onDraftOrderUpdated, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateExtendedFields, updateLineItems };
|
package/build/es/index.mjs
CHANGED
|
@@ -4994,6 +4994,62 @@ function queryDraftOrders2() {
|
|
|
4994
4994
|
transformationPaths: {}
|
|
4995
4995
|
});
|
|
4996
4996
|
}
|
|
4997
|
+
async function typedQueryDraftOrders(query) {
|
|
4998
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
4999
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
5000
|
+
const reqOpts = queryDraftOrders(payload);
|
|
5001
|
+
sideEffects?.onSiteCall?.();
|
|
5002
|
+
try {
|
|
5003
|
+
const result = await httpClient.request(reqOpts);
|
|
5004
|
+
sideEffects?.onSuccess?.(result);
|
|
5005
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
5006
|
+
transformPaths2(result.data, [
|
|
5007
|
+
{
|
|
5008
|
+
transformFn: transformRESTImageToSDKImage,
|
|
5009
|
+
paths: [{ path: "draftOrders.lineItems.lineItem.image" }]
|
|
5010
|
+
},
|
|
5011
|
+
{
|
|
5012
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
5013
|
+
paths: [
|
|
5014
|
+
{
|
|
5015
|
+
path: "draftOrders.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address"
|
|
5016
|
+
},
|
|
5017
|
+
{
|
|
5018
|
+
path: "draftOrders.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address"
|
|
5019
|
+
},
|
|
5020
|
+
{
|
|
5021
|
+
path: "draftOrders.shippingInfo.shippingInfo.logistics.shippingDestination.address"
|
|
5022
|
+
},
|
|
5023
|
+
{
|
|
5024
|
+
path: "draftOrders.shippingInfo.shippingInfo.logistics.pickupDetails.address"
|
|
5025
|
+
},
|
|
5026
|
+
{ path: "draftOrders.billingInfo.address" },
|
|
5027
|
+
{
|
|
5028
|
+
path: "draftOrders.recipientInfo.changedDetails.recipientInfoBeforeChange.address"
|
|
5029
|
+
},
|
|
5030
|
+
{ path: "draftOrders.recipientInfo.recipientInfo.address" },
|
|
5031
|
+
{
|
|
5032
|
+
path: "draftOrders.billingDetails.changedDetails.billingInfoBeforeChange.address"
|
|
5033
|
+
},
|
|
5034
|
+
{ path: "draftOrders.billingDetails.billingInfo.address" }
|
|
5035
|
+
]
|
|
5036
|
+
}
|
|
5037
|
+
])
|
|
5038
|
+
);
|
|
5039
|
+
} catch (err) {
|
|
5040
|
+
const transformedError = sdkTransformError(
|
|
5041
|
+
err,
|
|
5042
|
+
{
|
|
5043
|
+
spreadPathsToArguments: {},
|
|
5044
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
5045
|
+
singleArgumentUnchanged: false
|
|
5046
|
+
},
|
|
5047
|
+
["query"]
|
|
5048
|
+
);
|
|
5049
|
+
sideEffects?.onError?.(err);
|
|
5050
|
+
throw transformedError;
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
4997
5053
|
async function updateExtendedFields2(_id, namespace, options) {
|
|
4998
5054
|
const { httpClient, sideEffects } = arguments[3];
|
|
4999
5055
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -5366,6 +5422,13 @@ function queryDraftOrders3(httpClient) {
|
|
|
5366
5422
|
{ httpClient }
|
|
5367
5423
|
);
|
|
5368
5424
|
}
|
|
5425
|
+
function typedQueryDraftOrders2(httpClient) {
|
|
5426
|
+
return (query) => typedQueryDraftOrders(
|
|
5427
|
+
query,
|
|
5428
|
+
// @ts-ignore
|
|
5429
|
+
{ httpClient }
|
|
5430
|
+
);
|
|
5431
|
+
}
|
|
5369
5432
|
function updateExtendedFields3(httpClient) {
|
|
5370
5433
|
return (_id, namespace, options) => updateExtendedFields2(
|
|
5371
5434
|
_id,
|
|
@@ -5617,6 +5680,18 @@ var onDraftOrderUpdated = EventDefinition(
|
|
|
5617
5680
|
// src/ecom-v1-draft-order-draft-orders.context.ts
|
|
5618
5681
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
5619
5682
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
5683
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
5684
|
+
function customQueryDraftOrders(httpClient) {
|
|
5685
|
+
const router = createQueryOverloadRouter({
|
|
5686
|
+
builderQueryFunction: () => queryDraftOrders3(httpClient)(),
|
|
5687
|
+
typedQueryFunction: (query) => typedQueryDraftOrders2(httpClient)(query),
|
|
5688
|
+
hasOptionsParameter: false
|
|
5689
|
+
});
|
|
5690
|
+
function overloadedQuery(query) {
|
|
5691
|
+
return router(...arguments);
|
|
5692
|
+
}
|
|
5693
|
+
return overloadedQuery;
|
|
5694
|
+
}
|
|
5620
5695
|
var createDraftOrder4 = /* @__PURE__ */ createRESTModule(createDraftOrder3);
|
|
5621
5696
|
var createEmptyDraftOrder4 = /* @__PURE__ */ createRESTModule(createEmptyDraftOrder3);
|
|
5622
5697
|
var addLineItemsToDraftOrder4 = /* @__PURE__ */ createRESTModule(addLineItemsToDraftOrder3);
|
|
@@ -5637,10 +5712,10 @@ var getOrderDraftabilityStatus4 = /* @__PURE__ */ createRESTModule(getOrderDraft
|
|
|
5637
5712
|
var commitDraftOrder4 = /* @__PURE__ */ createRESTModule(commitDraftOrder3);
|
|
5638
5713
|
var createOrderFromDraft4 = /* @__PURE__ */ createRESTModule(createOrderFromDraft3);
|
|
5639
5714
|
var deleteDraftOrder4 = /* @__PURE__ */ createRESTModule(deleteDraftOrder3);
|
|
5640
|
-
var queryDraftOrders4 = /* @__PURE__ */ createRESTModule(queryDraftOrders3);
|
|
5641
5715
|
var updateExtendedFields4 = /* @__PURE__ */ createRESTModule(updateExtendedFields3);
|
|
5642
5716
|
var setTaxExemption4 = /* @__PURE__ */ createRESTModule(setTaxExemption3);
|
|
5643
5717
|
var setBusinessLocation4 = /* @__PURE__ */ createRESTModule(setBusinessLocation3);
|
|
5718
|
+
var queryDraftOrders4 = /* @__PURE__ */ createRESTModule(customQueryDraftOrders);
|
|
5644
5719
|
var onDraftOrderCreated2 = createEventModule(
|
|
5645
5720
|
onDraftOrderCreated
|
|
5646
5721
|
);
|