@wix/auto_sdk_ecom_draft-orders 1.0.23 → 1.0.25
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/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +457 -136
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +457 -136
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +459 -137
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +459 -137
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { createDraftOrder as publicCreateDraftOrder, createEmptyDraftOrder as publicCreateEmptyDraftOrder, addLineItemsToDraftOrder as publicAddLineItemsToDraftOrder, updateLineItems as publicUpdateLineItems, setDiscounts as publicSetDiscounts, createCustomDiscounts as publicCreateCustomDiscounts, deleteCustomDiscounts as publicDeleteCustomDiscounts, setAdditionalFees as publicSetAdditionalFees, createCustomAdditionalFees as publicCreateCustomAdditionalFees, deleteCustomAdditionalFees as publicDeleteCustomAdditionalFees, setShippingInfo as publicSetShippingInfo, setBuyerInfo as publicSetBuyerInfo, setRecipientInfo as publicSetRecipientInfo, setBillingInfo as publicSetBillingInfo, getDraftOrder as publicGetDraftOrder, getOrderDraftabilityStatus as publicGetOrderDraftabilityStatus, commitDraftOrder as publicCommitDraftOrder, createOrderFromDraft as publicCreateOrderFromDraft, deleteDraftOrder as publicDeleteDraftOrder, queryDraftOrders as publicQueryDraftOrders, updateExtendedFields as publicUpdateExtendedFields, setTaxExemption as publicSetTaxExemption, setBusinessLocation as publicSetBusinessLocation } from './ecom-v1-draft-order-draft-orders.public.js';
|
|
2
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
2
3
|
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
4
|
+
import { onDraftOrderCreated as publicOnDraftOrderCreated } from './ecom-v1-draft-order-draft-orders.public.js';
|
|
5
|
+
import { onDraftOrderDeleted as publicOnDraftOrderDeleted } from './ecom-v1-draft-order-draft-orders.public.js';
|
|
6
|
+
import { onDraftOrderUpdated as publicOnDraftOrderUpdated } from './ecom-v1-draft-order-draft-orders.public.js';
|
|
3
7
|
export declare const createDraftOrder: MaybeContext<BuildRESTFunction<typeof publicCreateDraftOrder> & typeof publicCreateDraftOrder>;
|
|
4
8
|
export declare const createEmptyDraftOrder: MaybeContext<BuildRESTFunction<typeof publicCreateEmptyDraftOrder> & typeof publicCreateEmptyDraftOrder>;
|
|
5
9
|
export declare const addLineItemsToDraftOrder: MaybeContext<BuildRESTFunction<typeof publicAddLineItemsToDraftOrder> & typeof publicAddLineItemsToDraftOrder>;
|
|
@@ -23,5 +27,17 @@ export declare const queryDraftOrders: MaybeContext<BuildRESTFunction<typeof pub
|
|
|
23
27
|
export declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof publicUpdateExtendedFields> & typeof publicUpdateExtendedFields>;
|
|
24
28
|
export declare const setTaxExemption: MaybeContext<BuildRESTFunction<typeof publicSetTaxExemption> & typeof publicSetTaxExemption>;
|
|
25
29
|
export declare const setBusinessLocation: MaybeContext<BuildRESTFunction<typeof publicSetBusinessLocation> & typeof publicSetBusinessLocation>;
|
|
30
|
+
/**
|
|
31
|
+
* Triggered when a draft order is created.
|
|
32
|
+
*/
|
|
33
|
+
export declare const onDraftOrderCreated: ReturnType<typeof createEventModule<typeof publicOnDraftOrderCreated>>;
|
|
34
|
+
/**
|
|
35
|
+
* Triggered when a draft order is deleted.
|
|
36
|
+
*/
|
|
37
|
+
export declare const onDraftOrderDeleted: ReturnType<typeof createEventModule<typeof publicOnDraftOrderDeleted>>;
|
|
38
|
+
/**
|
|
39
|
+
* Triggered when a draft order is updated.
|
|
40
|
+
*/
|
|
41
|
+
export declare const onDraftOrderUpdated: ReturnType<typeof createEventModule<typeof publicOnDraftOrderUpdated>>;
|
|
26
42
|
export { DescriptionLineType, ItemTypeItemType, PaymentOptionType, JurisdictionType, SubscriptionFrequency, AdjustmentType, TaxableAddressType, VatType, PickupDetailsPickupMethod, SourceType, AppliedDiscountDiscountType, DiscountReason, EditingStatus, WeightUnit, PickupMethod, RuleType, FileType, DiscountType, NonDraftableReason, PaymentStatus, FulfillmentStatus, OrderStatus, LineItemQuantityChangeType, ActivityType, AttributionSource, ChannelType, SortOrder, WebhookIdentityType, } from './ecom-v1-draft-order-draft-orders.universal.js';
|
|
27
|
-
export { DraftOrder, ItemDetails, ItemDetailsChangeTypeOneOf, Price, PriceDescription, OrderLineItem, ProductName, CatalogReference, DescriptionLine, DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, PlainTextValue, Color, FocalPoint, PhysicalProperties, ItemType, ItemTypeItemTypeDataOneOf, ItemTaxFullDetails, LineItemTaxInfo, LineItemTaxBreakdown, DigitalFile, SubscriptionInfo, SubscriptionTitle, SubscriptionDescription, SubscriptionSettings, FreeTrialPeriod, BillingAdjustment, BillingAdjustmentPriceSummary, LocationAndQuantity, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, ExtendedFields, ItemChangedDetails, ShippingDetails, ShippingDetailsChangeTypeOneOf, V1ShippingInformation, V1DeliveryLogistics, V1DeliveryLogisticsAddressOneOf, AddressWithContact, Address, StreetAddress, AddressLocation, FullAddressContactDetails, VatId, V1PickupDetails, PickupAddress, V1DeliveryTimeSlot, V1ShippingPrice, ShippingRegion, ShippingChangedDetails, BuyerInfo, BuyerInfoIdOneOf, AdditionalFeeDetails, AdditionalFee, TaxDetails, DiscountDetails, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, Coupon, MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf, DiscountRule, DiscountRuleName, LineItemDiscount, CreatedBy, CreatedByStringOneOf, PriceSummary, TaxSummary, BalanceSummary, Balance, DraftOrderCommitSettings, InventoryUpdate, RecipientInfoDetails, RecipientInfoDetailsChangeTypeOneOf, RecipientInfoChangedDetails, OrderTaxInfo, OrderTaxBreakdown, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BillingChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, Location, BusinessLocationChangedDetails, CreateDraftOrderRequest, CreateDraftOrderResponse, CalculatedDraftOrder, ShippingOption, DeliveryLogistics, PickupDetails, DeliveryTimeSlot, ShippingPrice, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Details, DetailsKindOneOf, ApplicationError, ValidationError, FieldViolation, SystemError, CarrierErrors, CarrierError, CreateEmptyDraftOrderRequest, CreateEmptyDraftOrderResponse, AddLineItemsToDraftOrderRequest, CatalogReferenceLineItem, CustomLineItem, SecuredMedia, AddLineItemsToDraftOrderResponse, UpdateLineItemsRequest, LineItemChangeDetails, UpdateLineItemsResponse, SetDiscountsRequest, IdAndApplied, SetDiscountsResponse, CreateCustomDiscountsRequest, DiscountOption, DiscountOptionDiscountAmountOneOf, CreateCustomDiscountsResponse, DeleteCustomDiscountsRequest, DeleteCustomDiscountsResponse, SetAdditionalFeesRequest, SetAdditionalFeesResponse, CreateCustomAdditionalFeesRequest, AdditionalFeeOption, CreateCustomAdditionalFeesResponse, DeleteCustomAdditionalFeesRequest, DeleteCustomAdditionalFeesResponse, SetShippingInfoRequest, SetShippingInfoResponse, SetBuyerInfoRequest, SetBuyerInfoResponse, SetRecipientInfoRequest, SetRecipientInfoResponse, SetBillingInfoRequest, SetBillingInfoResponse, UpdateShippingInfoRequest, UpdateShippingInfoResponse, GetDraftOrderRequest, GetDraftOrderResponse, GetOrderDraftabilityStatusRequest, GetOrderDraftabilityStatusResponse, CommitDraftOrderRequest, CommitDraftOrderResponse, Order, CurrencyConversionDetails, Activity, ActivityContentOneOf, CustomActivity, MerchantComment, OrderRefunded, OrderCreatedFromExchange, NewExchangeOrderCreated, LineItemExchangeData, DraftOrderChangesApplied, OrderChange, OrderChangeValueOneOf, LineItemChanges, LineItemQuantityChange, LineItemPriceChange, ManagedLineItem, ManagedDiscount, TranslatedValue, LineItemAmount, ManagedAdditionalFee, TotalPriceChange, ShippingInformationChange, ShippingInformation, SavedPaymentMethod, AuthorizedPaymentCreated, AuthorizedPaymentCaptured, AuthorizedPaymentVoided, RefundInitiated, RefundedPayment, RefundedPaymentKindOneOf, RegularPaymentRefund, GiftCardPaymentRefund, MembershipPaymentRefund, PaymentRefunded, PaymentRefundFailed, RefundedAsStoreCredit, PaymentPending, PaymentPendingPaymentDetailsOneOf, RegularPayment, RegularPaymentPaymentMethodDetailsOneOf, CreditCardDetails, PaymentCanceled, PaymentCanceledPaymentDetailsOneOf, PaymentDeclined, PaymentDeclinedPaymentDetailsOneOf, ReceiptCreated, ReceiptCreatedReceiptInfoOneOf, WixReceipt, ExternalReceipt, ReceiptSent, ReceiptSentReceiptInfoOneOf, V1CreatedBy, V1CreatedByStringOneOf, ChannelInfo, CustomField, V1BalanceSummary, FulfillmentStatusesAggregate, Tags, TagList, CreateOrderFromDraftRequest, OrderCreateSettings, OrderCreateNotifications, CreateOrderFromDraftResponse, DeleteDraftOrderRequest, DeleteDraftOrderResponse, QueryDraftOrdersRequest, CursorQuery, CursorQueryPagingMethodOneOf, Sorting, CursorPaging, QueryDraftOrdersResponse, CursorPagingMetadata, Cursors, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, SetTaxExemptionRequest, SetTaxExemptionResponse, SetBusinessLocationRequest, SetBusinessLocationResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, RestoreInfo, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, AddLineItemsToDraftOrderOptions, CreateCustomDiscountsOptions, CreateCustomAdditionalFeesOptions, SetShippingInfoOptions, SetBuyerInfoOptions, SetRecipientInfoOptions, SetBillingInfoOptions, CommitDraftOrderOptions, CreateOrderFromDraftOptions, DraftOrdersQueryResult, DraftOrdersQueryBuilder, UpdateExtendedFieldsOptions, SetTaxExemptionOptions, SetBusinessLocationOptions, } from './ecom-v1-draft-order-draft-orders.universal.js';
|
|
43
|
+
export { DraftOrder, ItemDetails, ItemDetailsChangeTypeOneOf, Price, PriceDescription, OrderLineItem, ProductName, CatalogReference, DescriptionLine, DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, PlainTextValue, Color, FocalPoint, PhysicalProperties, ItemType, ItemTypeItemTypeDataOneOf, ItemTaxFullDetails, LineItemTaxInfo, LineItemTaxBreakdown, DigitalFile, SubscriptionInfo, SubscriptionTitle, SubscriptionDescription, SubscriptionSettings, FreeTrialPeriod, BillingAdjustment, BillingAdjustmentPriceSummary, LocationAndQuantity, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, ExtendedFields, ModifierGroup, TranslatableString, ItemModifier, ItemChangedDetails, ShippingDetails, ShippingDetailsChangeTypeOneOf, V1ShippingInformation, V1DeliveryLogistics, V1DeliveryLogisticsAddressOneOf, AddressWithContact, Address, StreetAddress, AddressLocation, FullAddressContactDetails, VatId, V1PickupDetails, PickupAddress, V1DeliveryTimeSlot, V1ShippingPrice, ShippingRegion, ShippingChangedDetails, BuyerInfo, BuyerInfoIdOneOf, AdditionalFeeDetails, AdditionalFee, TaxDetails, DiscountDetails, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, Coupon, MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf, DiscountRule, DiscountRuleName, LineItemDiscount, CreatedBy, CreatedByStringOneOf, PriceSummary, TaxSummary, BalanceSummary, Balance, DraftOrderCommitSettings, InventoryUpdate, RecipientInfoDetails, RecipientInfoDetailsChangeTypeOneOf, RecipientInfoChangedDetails, OrderTaxInfo, OrderTaxBreakdown, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BillingChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, Location, BusinessLocationChangedDetails, CreateDraftOrderRequest, CreateDraftOrderResponse, CalculatedDraftOrder, ShippingOption, DeliveryLogistics, PickupDetails, DeliveryTimeSlot, ShippingPrice, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Details, DetailsKindOneOf, ApplicationError, ValidationError, FieldViolation, SystemError, CarrierErrors, CarrierError, CreateEmptyDraftOrderRequest, CreateEmptyDraftOrderResponse, AddLineItemsToDraftOrderRequest, CatalogReferenceLineItem, CustomLineItem, SecuredMedia, AddLineItemsToDraftOrderResponse, UpdateLineItemsRequest, LineItemChangeDetails, UpdateLineItemsResponse, SetDiscountsRequest, IdAndApplied, SetDiscountsResponse, CreateCustomDiscountsRequest, DiscountOption, DiscountOptionDiscountAmountOneOf, CreateCustomDiscountsResponse, DeleteCustomDiscountsRequest, DeleteCustomDiscountsResponse, SetAdditionalFeesRequest, SetAdditionalFeesResponse, CreateCustomAdditionalFeesRequest, AdditionalFeeOption, CreateCustomAdditionalFeesResponse, DeleteCustomAdditionalFeesRequest, DeleteCustomAdditionalFeesResponse, SetShippingInfoRequest, SetShippingInfoResponse, SetBuyerInfoRequest, SetBuyerInfoResponse, SetRecipientInfoRequest, SetRecipientInfoResponse, SetBillingInfoRequest, SetBillingInfoResponse, UpdateShippingInfoRequest, UpdateShippingInfoResponse, GetDraftOrderRequest, GetDraftOrderResponse, GetOrderDraftabilityStatusRequest, GetOrderDraftabilityStatusResponse, CommitDraftOrderRequest, CommitDraftOrderResponse, Order, CurrencyConversionDetails, Activity, ActivityContentOneOf, CustomActivity, MerchantComment, OrderRefunded, OrderCreatedFromExchange, NewExchangeOrderCreated, LineItemExchangeData, DraftOrderChangesApplied, OrderChange, OrderChangeValueOneOf, LineItemChanges, LineItemQuantityChange, LineItemPriceChange, ManagedLineItem, ManagedDiscount, TranslatedValue, LineItemAmount, ManagedAdditionalFee, TotalPriceChange, ShippingInformationChange, ShippingInformation, SavedPaymentMethod, AuthorizedPaymentCreated, AuthorizedPaymentCaptured, AuthorizedPaymentVoided, RefundInitiated, RefundedPayment, RefundedPaymentKindOneOf, RegularPaymentRefund, GiftCardPaymentRefund, MembershipPaymentRefund, PaymentRefunded, PaymentRefundFailed, RefundedAsStoreCredit, PaymentPending, PaymentPendingPaymentDetailsOneOf, RegularPayment, RegularPaymentPaymentMethodDetailsOneOf, CreditCardDetails, PaymentCanceled, PaymentCanceledPaymentDetailsOneOf, PaymentDeclined, PaymentDeclinedPaymentDetailsOneOf, ReceiptCreated, ReceiptCreatedReceiptInfoOneOf, WixReceipt, ExternalReceipt, ReceiptSent, ReceiptSentReceiptInfoOneOf, V1CreatedBy, V1CreatedByStringOneOf, ChannelInfo, CustomField, V1BalanceSummary, FulfillmentStatusesAggregate, Tags, TagList, CreateOrderFromDraftRequest, OrderCreateSettings, OrderCreateNotifications, CreateOrderFromDraftResponse, DeleteDraftOrderRequest, DeleteDraftOrderResponse, QueryDraftOrdersRequest, CursorQuery, CursorQueryPagingMethodOneOf, Sorting, CursorPaging, QueryDraftOrdersResponse, CursorPagingMetadata, Cursors, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, SetTaxExemptionRequest, SetTaxExemptionResponse, SetBusinessLocationRequest, SetBusinessLocationResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, RestoreInfo, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, BaseEventMetadata, EventMetadata, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, AddLineItemsToDraftOrderOptions, CreateCustomDiscountsOptions, CreateCustomAdditionalFeesOptions, SetShippingInfoOptions, SetBuyerInfoOptions, SetRecipientInfoOptions, SetBillingInfoOptions, CommitDraftOrderOptions, CreateOrderFromDraftOptions, DraftOrdersQueryResult, DraftOrdersQueryBuilder, UpdateExtendedFieldsOptions, SetTaxExemptionOptions, SetBusinessLocationOptions, } from './ecom-v1-draft-order-draft-orders.universal.js';
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.WebhookIdentityType = void 0;
|
|
3
|
+
exports.ActivityType = exports.LineItemQuantityChangeType = exports.OrderStatus = exports.FulfillmentStatus = exports.PaymentStatus = exports.NonDraftableReason = exports.DiscountType = exports.FileType = exports.RuleType = exports.PickupMethod = exports.WeightUnit = exports.EditingStatus = exports.DiscountReason = exports.AppliedDiscountDiscountType = exports.SourceType = exports.PickupDetailsPickupMethod = exports.VatType = exports.TaxableAddressType = exports.AdjustmentType = exports.SubscriptionFrequency = exports.JurisdictionType = exports.PaymentOptionType = exports.ItemTypeItemType = exports.DescriptionLineType = exports.onDraftOrderUpdated = exports.onDraftOrderDeleted = exports.onDraftOrderCreated = exports.setBusinessLocation = exports.setTaxExemption = exports.updateExtendedFields = exports.queryDraftOrders = exports.deleteDraftOrder = exports.createOrderFromDraft = exports.commitDraftOrder = exports.getOrderDraftabilityStatus = exports.getDraftOrder = exports.setBillingInfo = exports.setRecipientInfo = exports.setBuyerInfo = exports.setShippingInfo = exports.deleteCustomAdditionalFees = exports.createCustomAdditionalFees = exports.setAdditionalFees = exports.deleteCustomDiscounts = exports.createCustomDiscounts = exports.setDiscounts = exports.updateLineItems = exports.addLineItemsToDraftOrder = exports.createEmptyDraftOrder = exports.createDraftOrder = void 0;
|
|
4
|
+
exports.WebhookIdentityType = exports.SortOrder = exports.ChannelType = exports.AttributionSource = void 0;
|
|
5
5
|
const ecom_v1_draft_order_draft_orders_public_js_1 = require("./ecom-v1-draft-order-draft-orders.public.js");
|
|
6
6
|
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
7
|
+
const event_definition_modules_1 = require("@wix/sdk-runtime/event-definition-modules");
|
|
8
|
+
const ecom_v1_draft_order_draft_orders_public_js_2 = require("./ecom-v1-draft-order-draft-orders.public.js");
|
|
9
|
+
const ecom_v1_draft_order_draft_orders_public_js_3 = require("./ecom-v1-draft-order-draft-orders.public.js");
|
|
10
|
+
const ecom_v1_draft_order_draft_orders_public_js_4 = require("./ecom-v1-draft-order-draft-orders.public.js");
|
|
7
11
|
exports.createDraftOrder = (0, rest_modules_1.createRESTModule)(ecom_v1_draft_order_draft_orders_public_js_1.createDraftOrder);
|
|
8
12
|
exports.createEmptyDraftOrder = (0, rest_modules_1.createRESTModule)(ecom_v1_draft_order_draft_orders_public_js_1.createEmptyDraftOrder);
|
|
9
13
|
exports.addLineItemsToDraftOrder = (0, rest_modules_1.createRESTModule)(ecom_v1_draft_order_draft_orders_public_js_1.addLineItemsToDraftOrder);
|
|
@@ -27,6 +31,18 @@ exports.queryDraftOrders = (0, rest_modules_1.createRESTModule)(ecom_v1_draft_or
|
|
|
27
31
|
exports.updateExtendedFields = (0, rest_modules_1.createRESTModule)(ecom_v1_draft_order_draft_orders_public_js_1.updateExtendedFields);
|
|
28
32
|
exports.setTaxExemption = (0, rest_modules_1.createRESTModule)(ecom_v1_draft_order_draft_orders_public_js_1.setTaxExemption);
|
|
29
33
|
exports.setBusinessLocation = (0, rest_modules_1.createRESTModule)(ecom_v1_draft_order_draft_orders_public_js_1.setBusinessLocation);
|
|
34
|
+
/**
|
|
35
|
+
* Triggered when a draft order is created.
|
|
36
|
+
*/
|
|
37
|
+
exports.onDraftOrderCreated = (0, event_definition_modules_1.createEventModule)(ecom_v1_draft_order_draft_orders_public_js_2.onDraftOrderCreated);
|
|
38
|
+
/**
|
|
39
|
+
* Triggered when a draft order is deleted.
|
|
40
|
+
*/
|
|
41
|
+
exports.onDraftOrderDeleted = (0, event_definition_modules_1.createEventModule)(ecom_v1_draft_order_draft_orders_public_js_3.onDraftOrderDeleted);
|
|
42
|
+
/**
|
|
43
|
+
* Triggered when a draft order is updated.
|
|
44
|
+
*/
|
|
45
|
+
exports.onDraftOrderUpdated = (0, event_definition_modules_1.createEventModule)(ecom_v1_draft_order_draft_orders_public_js_4.onDraftOrderUpdated);
|
|
30
46
|
var ecom_v1_draft_order_draft_orders_universal_js_1 = require("./ecom-v1-draft-order-draft-orders.universal.js");
|
|
31
47
|
Object.defineProperty(exports, "DescriptionLineType", { enumerable: true, get: function () { return ecom_v1_draft_order_draft_orders_universal_js_1.DescriptionLineType; } });
|
|
32
48
|
Object.defineProperty(exports, "ItemTypeItemType", { enumerable: true, get: function () { return ecom_v1_draft_order_draft_orders_universal_js_1.ItemTypeItemType; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecom-v1-draft-order-draft-orders.context.js","sourceRoot":"","sources":["../../../src/ecom-v1-draft-order-draft-orders.context.ts"],"names":[],"mappings":";;;;AAAA,6GAwBsD;AACtD,gEAAiE;
|
|
1
|
+
{"version":3,"file":"ecom-v1-draft-order-draft-orders.context.js","sourceRoot":"","sources":["../../../src/ecom-v1-draft-order-draft-orders.context.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,56 +1,60 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
2
|
/**
|
|
3
|
-
* Creates or
|
|
3
|
+
* Creates or retrieves a draft order based on the specified order ID.
|
|
4
4
|
*
|
|
5
|
-
* When passing the ID of an order that is already in draft, the existing draft order
|
|
6
|
-
* To complete a draft and update the order, call Commit Draft Order
|
|
5
|
+
* When passing the ID of an order that is already in draft, the existing draft order is returned.
|
|
6
|
+
* To complete a draft and update the original order, call Commit Draft Order.
|
|
7
7
|
*/
|
|
8
8
|
export declare function createDraftOrder(payload: object): RequestOptionsFactory<any>;
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Creates an empty draft order.
|
|
11
|
+
*
|
|
12
|
+
* After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
|
|
13
|
+
*/
|
|
10
14
|
export declare function createEmptyDraftOrder(payload: object): RequestOptionsFactory<any>;
|
|
11
|
-
/** Adds line items to a draft order. */
|
|
15
|
+
/** Adds catalog or custom line items to a draft order. */
|
|
12
16
|
export declare function addLineItemsToDraftOrder(payload: object): RequestOptionsFactory<any>;
|
|
13
17
|
/**
|
|
14
18
|
* Updates a draft order's line items.
|
|
15
19
|
*
|
|
16
|
-
*
|
|
20
|
+
* You can update a line item's quantity, price, and description.
|
|
17
21
|
* > **Notes:**
|
|
18
|
-
* > +
|
|
22
|
+
* > + Specifying a quantity of `0` will remove the line item.
|
|
19
23
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
20
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
24
|
+
* > + Quantity cannot be decreased for fulfilled line items. To retrieve fulfillment information, specify the order ID when calling List Fulfillments For Single Order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/order-fulfillments/list-fulfillments-for-single-order) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/order-fulfillments/list-fulfillments-for-single-order)).
|
|
21
25
|
*/
|
|
22
26
|
export declare function updateLineItems(payload: object): RequestOptionsFactory<any>;
|
|
23
27
|
/**
|
|
24
28
|
* Applies or unapplies discounts on a draft order.
|
|
25
29
|
*
|
|
26
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
27
|
-
* Existing discounts
|
|
30
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
31
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
28
32
|
*/
|
|
29
33
|
export declare function setDiscounts(payload: object): RequestOptionsFactory<any>;
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Creates custom discounts.
|
|
32
36
|
*
|
|
33
|
-
* Newly
|
|
34
|
-
* To apply them, use Set Discounts
|
|
37
|
+
* Newly created discounts are unapplied by default.
|
|
38
|
+
* To apply them, use Set Discounts.
|
|
35
39
|
*/
|
|
36
40
|
export declare function createCustomDiscounts(payload: object): RequestOptionsFactory<any>;
|
|
37
|
-
/**
|
|
41
|
+
/** Removes custom discounts from a draft order. */
|
|
38
42
|
export declare function deleteCustomDiscounts(payload: object): RequestOptionsFactory<any>;
|
|
39
43
|
/**
|
|
40
44
|
* Applies or unapplies additional fees on a draft order.
|
|
41
45
|
*
|
|
42
|
-
*
|
|
43
|
-
* Existing additional fees
|
|
46
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
47
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
44
48
|
*/
|
|
45
49
|
export declare function setAdditionalFees(payload: object): RequestOptionsFactory<any>;
|
|
46
50
|
/**
|
|
47
51
|
* Creates custom additional fees on a draft order.
|
|
48
52
|
*
|
|
49
|
-
* Newly
|
|
50
|
-
* To apply them, use Set Additional Fees
|
|
53
|
+
* Newly created additional fees are not applied by default.
|
|
54
|
+
* To apply them, use Set Additional Fees.
|
|
51
55
|
*/
|
|
52
56
|
export declare function createCustomAdditionalFees(payload: object): RequestOptionsFactory<any>;
|
|
53
|
-
/**
|
|
57
|
+
/** Removes custom additional fees from a draft order. */
|
|
54
58
|
export declare function deleteCustomAdditionalFees(payload: object): RequestOptionsFactory<any>;
|
|
55
59
|
/** Sets shipping information on a draft order. */
|
|
56
60
|
export declare function setShippingInfo(payload: object): RequestOptionsFactory<any>;
|
|
@@ -61,34 +65,41 @@ export declare function setRecipientInfo(payload: object): RequestOptionsFactory
|
|
|
61
65
|
/** Sets billing info on a draft order. */
|
|
62
66
|
export declare function setBillingInfo(payload: object): RequestOptionsFactory<any>;
|
|
63
67
|
/**
|
|
64
|
-
*
|
|
68
|
+
* Retrieves a draft order.
|
|
69
|
+
*
|
|
70
|
+
* The retrieved draft order contains the latest calculations:
|
|
71
|
+
* + Line items, shipping details, and buyer information.
|
|
72
|
+
* + Tax details and price totals.
|
|
73
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
65
74
|
*
|
|
66
|
-
*
|
|
67
|
-
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
68
|
-
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
69
|
-
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
75
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
70
76
|
*/
|
|
71
77
|
export declare function getDraftOrder(payload: object): RequestOptionsFactory<any>;
|
|
72
|
-
/** Checks whether a draft can be created for
|
|
78
|
+
/** Checks whether a draft can be created for an order. */
|
|
73
79
|
export declare function getOrderDraftabilityStatus(payload: object): RequestOptionsFactory<any>;
|
|
74
80
|
/**
|
|
75
|
-
*
|
|
81
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
82
|
+
* You can also control which side-effects are executed on commit.
|
|
76
83
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
84
|
+
* > **Notes:**
|
|
85
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
86
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
87
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
79
88
|
*/
|
|
80
89
|
export declare function commitDraftOrder(payload: object): RequestOptionsFactory<any>;
|
|
81
90
|
/**
|
|
82
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
91
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
83
92
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
93
|
+
* > **Notes:**
|
|
94
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
95
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
96
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
86
97
|
*/
|
|
87
98
|
export declare function createOrderFromDraft(payload: object): RequestOptionsFactory<any>;
|
|
88
99
|
/**
|
|
89
100
|
* Deletes a draft order along with all its pending changes.
|
|
90
101
|
*
|
|
91
|
-
* Draft orders
|
|
102
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
92
103
|
*/
|
|
93
104
|
export declare function deleteDraftOrder(payload: object): RequestOptionsFactory<any>;
|
|
94
105
|
/**
|
|
@@ -101,12 +112,21 @@ export declare function deleteDraftOrder(payload: object): RequestOptionsFactory
|
|
|
101
112
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
102
113
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
103
114
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
115
|
+
*
|
|
104
116
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
105
117
|
*/
|
|
106
118
|
export declare function queryDraftOrders(payload: object): RequestOptionsFactory<any>;
|
|
107
119
|
/** Updates extended fields on a draft order. */
|
|
108
120
|
export declare function updateExtendedFields(payload: object): RequestOptionsFactory<any>;
|
|
109
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Sets whether a draft order is tax-exempt.
|
|
123
|
+
*
|
|
124
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
125
|
+
*/
|
|
110
126
|
export declare function setTaxExemption(payload: object): RequestOptionsFactory<any>;
|
|
111
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* Sets business location on a draft order.
|
|
129
|
+
*
|
|
130
|
+
* When committed, the order will become associated to a specific business location. This affects who can see and manage this order, and how it is calculated in reports.
|
|
131
|
+
*/
|
|
112
132
|
export declare function setBusinessLocation(payload: object): RequestOptionsFactory<any>;
|
|
@@ -35,10 +35,10 @@ function resolveComWixEcomOrdersDraftV1DraftOrdersUrl(opts) {
|
|
|
35
35
|
}
|
|
36
36
|
const PACKAGE_NAME = '@wix/auto_sdk_ecom_draft-orders';
|
|
37
37
|
/**
|
|
38
|
-
* Creates or
|
|
38
|
+
* Creates or retrieves a draft order based on the specified order ID.
|
|
39
39
|
*
|
|
40
|
-
* When passing the ID of an order that is already in draft, the existing draft order
|
|
41
|
-
* To complete a draft and update the order, call Commit Draft Order
|
|
40
|
+
* When passing the ID of an order that is already in draft, the existing draft order is returned.
|
|
41
|
+
* To complete a draft and update the original order, call Commit Draft Order.
|
|
42
42
|
*/
|
|
43
43
|
function createDraftOrder(payload) {
|
|
44
44
|
function __createDraftOrder({ host }) {
|
|
@@ -175,7 +175,11 @@ function createDraftOrder(payload) {
|
|
|
175
175
|
return __createDraftOrder;
|
|
176
176
|
}
|
|
177
177
|
exports.createDraftOrder = createDraftOrder;
|
|
178
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* Creates an empty draft order.
|
|
180
|
+
*
|
|
181
|
+
* After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
|
|
182
|
+
*/
|
|
179
183
|
function createEmptyDraftOrder(payload) {
|
|
180
184
|
function __createEmptyDraftOrder({ host }) {
|
|
181
185
|
const metadata = {
|
|
@@ -311,7 +315,7 @@ function createEmptyDraftOrder(payload) {
|
|
|
311
315
|
return __createEmptyDraftOrder;
|
|
312
316
|
}
|
|
313
317
|
exports.createEmptyDraftOrder = createEmptyDraftOrder;
|
|
314
|
-
/** Adds line items to a draft order. */
|
|
318
|
+
/** Adds catalog or custom line items to a draft order. */
|
|
315
319
|
function addLineItemsToDraftOrder(payload) {
|
|
316
320
|
function __addLineItemsToDraftOrder({ host }) {
|
|
317
321
|
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
@@ -464,11 +468,11 @@ exports.addLineItemsToDraftOrder = addLineItemsToDraftOrder;
|
|
|
464
468
|
/**
|
|
465
469
|
* Updates a draft order's line items.
|
|
466
470
|
*
|
|
467
|
-
*
|
|
471
|
+
* You can update a line item's quantity, price, and description.
|
|
468
472
|
* > **Notes:**
|
|
469
|
-
* > +
|
|
473
|
+
* > + Specifying a quantity of `0` will remove the line item.
|
|
470
474
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
471
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
475
|
+
* > + Quantity cannot be decreased for fulfilled line items. To retrieve fulfillment information, specify the order ID when calling List Fulfillments For Single Order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/order-fulfillments/list-fulfillments-for-single-order) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/order-fulfillments/list-fulfillments-for-single-order)).
|
|
472
476
|
*/
|
|
473
477
|
function updateLineItems(payload) {
|
|
474
478
|
function __updateLineItems({ host }) {
|
|
@@ -608,8 +612,8 @@ exports.updateLineItems = updateLineItems;
|
|
|
608
612
|
/**
|
|
609
613
|
* Applies or unapplies discounts on a draft order.
|
|
610
614
|
*
|
|
611
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
612
|
-
* Existing discounts
|
|
615
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
616
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
613
617
|
*/
|
|
614
618
|
function setDiscounts(payload) {
|
|
615
619
|
function __setDiscounts({ host }) {
|
|
@@ -747,10 +751,10 @@ function setDiscounts(payload) {
|
|
|
747
751
|
}
|
|
748
752
|
exports.setDiscounts = setDiscounts;
|
|
749
753
|
/**
|
|
750
|
-
*
|
|
754
|
+
* Creates custom discounts.
|
|
751
755
|
*
|
|
752
|
-
* Newly
|
|
753
|
-
* To apply them, use Set Discounts
|
|
756
|
+
* Newly created discounts are unapplied by default.
|
|
757
|
+
* To apply them, use Set Discounts.
|
|
754
758
|
*/
|
|
755
759
|
function createCustomDiscounts(payload) {
|
|
756
760
|
function __createCustomDiscounts({ host }) {
|
|
@@ -887,7 +891,7 @@ function createCustomDiscounts(payload) {
|
|
|
887
891
|
return __createCustomDiscounts;
|
|
888
892
|
}
|
|
889
893
|
exports.createCustomDiscounts = createCustomDiscounts;
|
|
890
|
-
/**
|
|
894
|
+
/** Removes custom discounts from a draft order. */
|
|
891
895
|
function deleteCustomDiscounts(payload) {
|
|
892
896
|
function __deleteCustomDiscounts({ host }) {
|
|
893
897
|
const metadata = {
|
|
@@ -1026,8 +1030,8 @@ exports.deleteCustomDiscounts = deleteCustomDiscounts;
|
|
|
1026
1030
|
/**
|
|
1027
1031
|
* Applies or unapplies additional fees on a draft order.
|
|
1028
1032
|
*
|
|
1029
|
-
*
|
|
1030
|
-
* Existing additional fees
|
|
1033
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
1034
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
1031
1035
|
*/
|
|
1032
1036
|
function setAdditionalFees(payload) {
|
|
1033
1037
|
function __setAdditionalFees({ host }) {
|
|
@@ -1167,8 +1171,8 @@ exports.setAdditionalFees = setAdditionalFees;
|
|
|
1167
1171
|
/**
|
|
1168
1172
|
* Creates custom additional fees on a draft order.
|
|
1169
1173
|
*
|
|
1170
|
-
* Newly
|
|
1171
|
-
* To apply them, use Set Additional Fees
|
|
1174
|
+
* Newly created additional fees are not applied by default.
|
|
1175
|
+
* To apply them, use Set Additional Fees.
|
|
1172
1176
|
*/
|
|
1173
1177
|
function createCustomAdditionalFees(payload) {
|
|
1174
1178
|
function __createCustomAdditionalFees({ host }) {
|
|
@@ -1305,7 +1309,7 @@ function createCustomAdditionalFees(payload) {
|
|
|
1305
1309
|
return __createCustomAdditionalFees;
|
|
1306
1310
|
}
|
|
1307
1311
|
exports.createCustomAdditionalFees = createCustomAdditionalFees;
|
|
1308
|
-
/**
|
|
1312
|
+
/** Removes custom additional fees from a draft order. */
|
|
1309
1313
|
function deleteCustomAdditionalFees(payload) {
|
|
1310
1314
|
function __deleteCustomAdditionalFees({ host }) {
|
|
1311
1315
|
const metadata = {
|
|
@@ -2031,12 +2035,14 @@ function setBillingInfo(payload) {
|
|
|
2031
2035
|
}
|
|
2032
2036
|
exports.setBillingInfo = setBillingInfo;
|
|
2033
2037
|
/**
|
|
2034
|
-
*
|
|
2038
|
+
* Retrieves a draft order.
|
|
2039
|
+
*
|
|
2040
|
+
* The retrieved draft order contains the latest calculations:
|
|
2041
|
+
* + Line items, shipping details, and buyer information.
|
|
2042
|
+
* + Tax details and price totals.
|
|
2043
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
2035
2044
|
*
|
|
2036
|
-
*
|
|
2037
|
-
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
2038
|
-
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
2039
|
-
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
2045
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
2040
2046
|
*/
|
|
2041
2047
|
function getDraftOrder(payload) {
|
|
2042
2048
|
function __getDraftOrder({ host }) {
|
|
@@ -2184,7 +2190,7 @@ function getDraftOrder(payload) {
|
|
|
2184
2190
|
return __getDraftOrder;
|
|
2185
2191
|
}
|
|
2186
2192
|
exports.getDraftOrder = getDraftOrder;
|
|
2187
|
-
/** Checks whether a draft can be created for
|
|
2193
|
+
/** Checks whether a draft can be created for an order. */
|
|
2188
2194
|
function getOrderDraftabilityStatus(payload) {
|
|
2189
2195
|
function __getOrderDraftabilityStatus({ host }) {
|
|
2190
2196
|
const metadata = {
|
|
@@ -2205,10 +2211,13 @@ function getOrderDraftabilityStatus(payload) {
|
|
|
2205
2211
|
}
|
|
2206
2212
|
exports.getOrderDraftabilityStatus = getOrderDraftabilityStatus;
|
|
2207
2213
|
/**
|
|
2208
|
-
*
|
|
2214
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
2215
|
+
* You can also control which side-effects are executed on commit.
|
|
2209
2216
|
*
|
|
2210
|
-
*
|
|
2211
|
-
*
|
|
2217
|
+
* > **Notes:**
|
|
2218
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
2219
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
2220
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
2212
2221
|
*/
|
|
2213
2222
|
function commitDraftOrder(payload) {
|
|
2214
2223
|
function __commitDraftOrder({ host }) {
|
|
@@ -2375,10 +2384,12 @@ function commitDraftOrder(payload) {
|
|
|
2375
2384
|
}
|
|
2376
2385
|
exports.commitDraftOrder = commitDraftOrder;
|
|
2377
2386
|
/**
|
|
2378
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
2387
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
2379
2388
|
*
|
|
2380
|
-
*
|
|
2381
|
-
*
|
|
2389
|
+
* > **Notes:**
|
|
2390
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
2391
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
2392
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
2382
2393
|
*/
|
|
2383
2394
|
function createOrderFromDraft(payload) {
|
|
2384
2395
|
function __createOrderFromDraft({ host }) {
|
|
@@ -2541,7 +2552,7 @@ exports.createOrderFromDraft = createOrderFromDraft;
|
|
|
2541
2552
|
/**
|
|
2542
2553
|
* Deletes a draft order along with all its pending changes.
|
|
2543
2554
|
*
|
|
2544
|
-
* Draft orders
|
|
2555
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
2545
2556
|
*/
|
|
2546
2557
|
function deleteDraftOrder(payload) {
|
|
2547
2558
|
function __deleteDraftOrder({ host }) {
|
|
@@ -2572,6 +2583,7 @@ exports.deleteDraftOrder = deleteDraftOrder;
|
|
|
2572
2583
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
2573
2584
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
2574
2585
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
2586
|
+
*
|
|
2575
2587
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
2576
2588
|
*/
|
|
2577
2589
|
function queryDraftOrders(payload) {
|
|
@@ -2803,7 +2815,11 @@ function updateExtendedFields(payload) {
|
|
|
2803
2815
|
return __updateExtendedFields;
|
|
2804
2816
|
}
|
|
2805
2817
|
exports.updateExtendedFields = updateExtendedFields;
|
|
2806
|
-
/**
|
|
2818
|
+
/**
|
|
2819
|
+
* Sets whether a draft order is tax-exempt.
|
|
2820
|
+
*
|
|
2821
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
2822
|
+
*/
|
|
2807
2823
|
function setTaxExemption(payload) {
|
|
2808
2824
|
function __setTaxExemption({ host }) {
|
|
2809
2825
|
const metadata = {
|
|
@@ -2939,7 +2955,11 @@ function setTaxExemption(payload) {
|
|
|
2939
2955
|
return __setTaxExemption;
|
|
2940
2956
|
}
|
|
2941
2957
|
exports.setTaxExemption = setTaxExemption;
|
|
2942
|
-
/**
|
|
2958
|
+
/**
|
|
2959
|
+
* Sets business location on a draft order.
|
|
2960
|
+
*
|
|
2961
|
+
* When committed, the order will become associated to a specific business location. This affects who can see and manage this order, and how it is calculated in reports.
|
|
2962
|
+
*/
|
|
2943
2963
|
function setBusinessLocation(payload) {
|
|
2944
2964
|
function __setBusinessLocation({ host }) {
|
|
2945
2965
|
const metadata = {
|