@wix/auto_sdk_ecom_draft-orders 1.0.34 → 1.0.35

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.
Files changed (134) hide show
  1. package/build/{es/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-CAxetX1U.d.mts} +571 -368
  2. package/build/{cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-CAxetX1U.d.ts} +571 -368
  3. package/build/index.d.mts +291 -0
  4. package/build/index.d.ts +291 -0
  5. package/build/index.js +5403 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +5326 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-CIHFdzik.d.mts} +746 -368
  10. package/build/internal/{es/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-CIHFdzik.d.ts} +746 -368
  11. package/build/internal/index.d.mts +291 -0
  12. package/build/internal/index.d.ts +291 -0
  13. package/build/internal/index.js +5403 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +5326 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +3140 -0
  18. package/build/internal/meta.d.ts +3140 -0
  19. package/build/internal/meta.js +3455 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +3406 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +3140 -0
  24. package/build/meta.d.ts +3140 -0
  25. package/build/meta.js +3455 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +3406 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -43
  40. package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +0 -75
  41. package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
  42. package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -131
  43. package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +0 -3097
  44. package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
  45. package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -63
  46. package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +0 -465
  47. package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -255
  49. package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +0 -385
  50. package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
  51. package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +0 -378
  52. package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
  53. package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -4726
  54. package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +0 -2453
  55. package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -43
  67. package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +0 -43
  68. package/build/es/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
  69. package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -131
  70. package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +0 -3071
  71. package/build/es/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
  72. package/build/es/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -63
  73. package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js +0 -416
  74. package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
  75. package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -255
  76. package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +0 -330
  77. package/build/es/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
  78. package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +0 -375
  79. package/build/es/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
  80. package/build/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -4726
  81. package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +0 -2403
  82. package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -43
  93. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +0 -75
  94. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
  95. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -131
  96. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +0 -3097
  97. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
  98. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -63
  99. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +0 -465
  100. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -255
  102. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +0 -385
  103. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
  104. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +0 -378
  105. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
  106. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -4901
  107. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +0 -2453
  108. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -43
  119. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +0 -43
  120. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
  121. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -131
  122. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +0 -3071
  123. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
  124. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -63
  125. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js +0 -416
  126. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
  127. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -255
  128. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +0 -330
  129. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
  130. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +0 -375
  131. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
  132. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -4901
  133. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +0 -2403
  134. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
@@ -0,0 +1,291 @@
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { C as CreateDraftOrderResponse, a as CreateEmptyDraftOrderResponse, A as AddLineItemsToDraftOrderOptions, b as AddLineItemsToDraftOrderResponse, L as LineItemChangeDetails, U as UpdateLineItemsResponse, I as IdAndApplied, S as SetDiscountsResponse, c as CreateCustomDiscountsOptions, d as CreateCustomDiscountsResponse, D as DeleteCustomDiscountsResponse, e as SetAdditionalFeesResponse, f as CreateCustomAdditionalFeesOptions, g as CreateCustomAdditionalFeesResponse, h as DeleteCustomAdditionalFeesResponse, i as SetShippingInfoOptions, j as SetShippingInfoResponse, k as SetBuyerInfoOptions, l as SetBuyerInfoResponse, m as SetRecipientInfoOptions, n as SetRecipientInfoResponse, o as SetBillingInfoOptions, p as SetBillingInfoResponse, G as GetDraftOrderResponse, q as GetOrderDraftabilityStatusResponse, r as CommitDraftOrderOptions, s as CommitDraftOrderResponse, t as CreateOrderFromDraftOptions, u as CreateOrderFromDraftResponse, v as DraftOrdersQueryBuilder, w as UpdateExtendedFieldsOptions, x as UpdateExtendedFieldsResponse, y as SetTaxExemptionOptions, z as SetTaxExemptionResponse, B as SetBusinessLocationOptions, E as SetBusinessLocationResponse, F as DraftOrderCreatedEnvelope, H as DraftOrderDeletedEnvelope, J as DraftOrderUpdatedEnvelope } from './ecom-v1-draft-order-draft-orders.universal-CIHFdzik.mjs';
3
+ export { dA as ActionEvent, cj as Activity, ck as ActivityContentOneOf, a8 as ActivityType, bW as AddLineItemsToDraftOrderRequest, b6 as AdditionalFee, b5 as AdditionalFeeDetails, c6 as AdditionalFeeOption, aU as Address, aW as AddressLocation, aT as AddressWithContact, Q as AdjustmentType, bP as ApplicationError, b9 as AppliedDiscount, ba as AppliedDiscountDiscountSourceOneOf, X as AppliedDiscountDiscountType, a9 as AttributionSource, cH as AuthorizedPaymentCaptured, cG as AuthorizedPaymentCreated, cI as AuthorizedPaymentVoided, bm as Balance, bl as BalanceSummary, dE as BaseEventMetadata, aE as BillingAdjustment, aF as BillingAdjustmentPriceSummary, bz as BillingChangedDetails, bx as BillingDetails, by as BillingDetailsChangeTypeOneOf, bD as BusinessLocationChangedDetails, bA as BusinessLocationDetails, bB as BusinessLocationDetailsChangeTypeOneOf, bw as BuyerChangedDetails, bu as BuyerDetails, bv as BuyerDetailsChangeTypeOneOf, b3 as BuyerInfo, b4 as BuyerInfoIdOneOf, bF as CalculatedDraftOrder, bL as CalculationErrors, bM as CalculationErrorsShippingCalculationErrorOneOf, bU as CarrierError, bT as CarrierErrors, ak as CatalogReference, bX as CatalogReferenceLineItem, d7 as ChannelInfo, aa as ChannelType, aq as Color, cg as CommitDraftOrderRequest, bb as Coupon, c5 as CreateCustomAdditionalFeesRequest, c0 as CreateCustomDiscountsRequest, bE as CreateDraftOrderRequest, bV as CreateEmptyDraftOrderRequest, dd as CreateOrderFromDraftRequest, bh as CreatedBy, bi as CreatedByStringOneOf, cW as CreditCardDetails, ci as CurrencyConversionDetails, dm as CursorPaging, dp as CursorPagingMetadata, dj as CursorQuery, dk as CursorQueryPagingMethodOneOf, dq as Cursors, cl as CustomActivity, d8 as CustomField, bY as CustomLineItem, c7 as DeleteCustomAdditionalFeesRequest, c3 as DeleteCustomDiscountsRequest, dg as DeleteDraftOrderRequest, dh as DeleteDraftOrderResponse, bH as DeliveryLogistics, bJ as DeliveryTimeSlot, al as DescriptionLine, an as DescriptionLineDescriptionLineValueOneOf, ao as DescriptionLineName, K as DescriptionLineType, am as DescriptionLineValueOneOf, bN as Details, bO as DetailsKindOneOf, ay as DigitalFile, b8 as DiscountDetails, c1 as DiscountOption, c2 as DiscountOptionDiscountAmountOneOf, Y as DiscountReason, be as DiscountRule, bf as DiscountRuleName, a2 as DiscountType, du as DomainEvent, dv as DomainEventBodyOneOf, ad as DraftOrder, cr as DraftOrderChangesApplied, bn as DraftOrderCommitSettings, dG as DraftOrdersQueryResult, Z as EditingStatus, dw as EntityCreatedEvent, dz as EntityDeletedEvent, dy as EntityUpdatedEvent, dF as EventMetadata, aJ as ExtendedFields, d2 as ExternalReceipt, bR as FieldViolation, a1 as FileType, ar as FocalPoint, aD as FreeTrialPeriod, a5 as FulfillmentStatus, da as FulfillmentStatusesAggregate, aX as FullAddressContactDetails, ce as GetDraftOrderRequest, cf as GetOrderDraftabilityStatusRequest, cN as GiftCardPaymentRefund, dC as IdentificationData, dD as IdentificationDataIdOneOf, bo as InventoryUpdate, aN as ItemChangedDetails, ae as ItemDetails, af as ItemDetailsChangeTypeOneOf, aM as ItemModifier, av as ItemTaxFullDetails, at as ItemType, M as ItemTypeItemType, au as ItemTypeItemTypeDataOneOf, N as JurisdictionType, cA as LineItemAmount, cu as LineItemChanges, bg as LineItemDiscount, cq as LineItemExchangeData, cw as LineItemPriceChange, cv as LineItemQuantityChange, a7 as LineItemQuantityChangeType, ax as LineItemTaxBreakdown, aw as LineItemTaxInfo, bC as Location, aG as LocationAndQuantity, cB as ManagedAdditionalFee, cy as ManagedDiscount, cx as ManagedLineItem, cO as MembershipPaymentRefund, cm as MerchantComment, bc as MerchantDiscount, bd as MerchantDiscountMerchantDiscountReasonOneOf, dB as MessageEnvelope, aK as ModifierGroup, cp as NewExchangeOrderCreated, a3 as NonDraftableReason, ch as Order, cs as OrderChange, ct as OrderChangeValueOneOf, df as OrderCreateNotifications, de as OrderCreateSettings, co as OrderCreatedFromExchange, ai as OrderLineItem, cn as OrderRefunded, a6 as OrderStatus, bt as OrderTaxBreakdown, bs as OrderTaxInfo, cX as PaymentCanceled, cY as PaymentCanceledPaymentDetailsOneOf, cZ as PaymentDeclined, c_ as PaymentDeclinedPaymentDetailsOneOf, P as PaymentOptionType, cS as PaymentPending, cT as PaymentPendingPaymentDetailsOneOf, cQ as PaymentRefundFailed, cP as PaymentRefunded, a4 as PaymentStatus, as as PhysicalProperties, a_ as PickupAddress, bI as PickupDetails, R as PickupDetailsPickupMethod, $ as PickupMethod, ap as PlainTextValue, ag as Price, ah as PriceDescription, bj as PriceSummary, aj as ProductName, di as QueryDraftOrdersRequest, dn as QueryDraftOrdersResponse, c$ as ReceiptCreated, d0 as ReceiptCreatedReceiptInfoOneOf, d3 as ReceiptSent, d4 as ReceiptSentReceiptInfoOneOf, br as RecipientInfoChangedDetails, bp as RecipientInfoDetails, bq as RecipientInfoDetailsChangeTypeOneOf, cJ as RefundInitiated, cR as RefundedAsStoreCredit, cK as RefundedPayment, cL as RefundedPaymentKindOneOf, cU as RegularPayment, cV as RegularPaymentPaymentMethodDetailsOneOf, cM as RegularPaymentRefund, dx as RestoreInfo, a0 as RuleType, cF as SavedPaymentMethod, bZ as SecuredMedia, c4 as SetAdditionalFeesRequest, cb as SetBillingInfoRequest, dt as SetBusinessLocationRequest, c9 as SetBuyerInfoRequest, b$ as SetDiscountsRequest, ca as SetRecipientInfoRequest, c8 as SetShippingInfoRequest, ds as SetTaxExemptionRequest, b2 as ShippingChangedDetails, aO as ShippingDetails, aP as ShippingDetailsChangeTypeOneOf, cE as ShippingInformation, cD as ShippingInformationChange, bG as ShippingOption, bK as ShippingPrice, b1 as ShippingRegion, ab as SortOrder, dl as Sorting, W as SourceType, aV as StreetAddress, aB as SubscriptionDescription, O as SubscriptionFrequency, az as SubscriptionInfo, aC as SubscriptionSettings, aA as SubscriptionTitle, bS as SystemError, dc as TagList, db as Tags, b7 as TaxDetails, bk as TaxSummary, aH as TaxableAddress, aI as TaxableAddressTaxableAddressDataOneOf, T as TaxableAddressType, cC as TotalPriceChange, aL as TranslatableString, cz as TranslatedValue, dr as UpdateExtendedFieldsRequest, b_ as UpdateLineItemsRequest, cc as UpdateShippingInfoRequest, cd as UpdateShippingInfoResponse, d9 as V1BalanceSummary, d5 as V1CreatedBy, d6 as V1CreatedByStringOneOf, aR as V1DeliveryLogistics, aS as V1DeliveryLogisticsAddressOneOf, a$ as V1DeliveryTimeSlot, aZ as V1PickupDetails, aQ as V1ShippingInformation, b0 as V1ShippingPrice, bQ as ValidationError, aY as VatId, V as VatType, ac as WebhookIdentityType, _ as WeightUnit, d1 as WixReceipt } from './ecom-v1-draft-order-draft-orders.universal-CIHFdzik.mjs';
4
+
5
+ declare function createDraftOrder$1(httpClient: HttpClient): CreateDraftOrderSignature;
6
+ interface CreateDraftOrderSignature {
7
+ /**
8
+ * Creates or retrieves a draft order based on the specified order ID.
9
+ *
10
+ * When passing the ID of an order that is already in draft, the existing draft order is returned.
11
+ * To complete a draft and update the original order, call Commit Draft Order.
12
+ * @param - ID of the order to create a draft for.
13
+ */
14
+ (orderId: string): Promise<CreateDraftOrderResponse>;
15
+ }
16
+ declare function createEmptyDraftOrder$1(httpClient: HttpClient): CreateEmptyDraftOrderSignature;
17
+ interface CreateEmptyDraftOrderSignature {
18
+ /**
19
+ * Creates an empty draft order.
20
+ *
21
+ * After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
22
+ */
23
+ (): Promise<CreateEmptyDraftOrderResponse>;
24
+ }
25
+ declare function addLineItemsToDraftOrder$1(httpClient: HttpClient): AddLineItemsToDraftOrderSignature;
26
+ interface AddLineItemsToDraftOrderSignature {
27
+ /**
28
+ * Adds catalog or custom line items to a draft order.
29
+ * @param - Draft order ID.
30
+ */
31
+ (draftOrderId: string, options?: AddLineItemsToDraftOrderOptions | undefined): Promise<AddLineItemsToDraftOrderResponse>;
32
+ }
33
+ declare function updateLineItems$1(httpClient: HttpClient): UpdateLineItemsSignature;
34
+ interface UpdateLineItemsSignature {
35
+ /**
36
+ * Updates a draft order's line items.
37
+ *
38
+ * You can update a line item's quantity, price, and description.
39
+ * > **Notes:**
40
+ * > + Specifying a quantity of `0` will remove the line item.
41
+ * > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
42
+ * > + 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)).
43
+ * @param - Draft order ID.
44
+ * @param - Details of changes to apply per line item.
45
+ */
46
+ (draftOrderId: string, lineItemChanges: LineItemChangeDetails[]): Promise<UpdateLineItemsResponse>;
47
+ }
48
+ declare function setDiscounts$1(httpClient: HttpClient): SetDiscountsSignature;
49
+ interface SetDiscountsSignature {
50
+ /**
51
+ * Applies or unapplies discounts on a draft order.
52
+ *
53
+ * Unapplied discounts are still part of the draft order, but do not affect balance.
54
+ * Existing discounts that are not passed in the request will keep their current state.
55
+ * @param - Draft order ID.
56
+ * @param - Discounts to set on the draft order.
57
+ *
58
+ * Any existing discounts that are not passed will not change.
59
+ */
60
+ (draftOrderId: string, discounts: IdAndApplied[]): Promise<SetDiscountsResponse>;
61
+ }
62
+ declare function createCustomDiscounts$1(httpClient: HttpClient): CreateCustomDiscountsSignature;
63
+ interface CreateCustomDiscountsSignature {
64
+ /**
65
+ * Creates custom discounts.
66
+ *
67
+ * Newly created discounts are unapplied by default.
68
+ * To apply them, use Set Discounts.
69
+ * @param - Draft order ID.
70
+ */
71
+ (draftOrderId: string, options?: CreateCustomDiscountsOptions | undefined): Promise<CreateCustomDiscountsResponse>;
72
+ }
73
+ declare function deleteCustomDiscounts$1(httpClient: HttpClient): DeleteCustomDiscountsSignature;
74
+ interface DeleteCustomDiscountsSignature {
75
+ /**
76
+ * Removes custom discounts from a draft order.
77
+ * @param - Draft order ID.
78
+ * @param - IDs of the discounts to remove from the draft order.
79
+ */
80
+ (draftOrderId: string, discountIds: string[]): Promise<DeleteCustomDiscountsResponse>;
81
+ }
82
+ declare function setAdditionalFees$1(httpClient: HttpClient): SetAdditionalFeesSignature;
83
+ interface SetAdditionalFeesSignature {
84
+ /**
85
+ * Applies or unapplies additional fees on a draft order.
86
+ *
87
+ * Additional fees that are not applied are still part of the draft order, but do not affect balance.
88
+ * Existing additional fees that are not passed in the request will keep their current state.
89
+ * @param - Draft order ID.
90
+ * @param - Additional fees to set on the draft order.
91
+ *
92
+ * Any existing additional fees that are not passed will not change.
93
+ */
94
+ (draftOrderId: string, additionalFees: IdAndApplied[]): Promise<SetAdditionalFeesResponse>;
95
+ }
96
+ declare function createCustomAdditionalFees$1(httpClient: HttpClient): CreateCustomAdditionalFeesSignature;
97
+ interface CreateCustomAdditionalFeesSignature {
98
+ /**
99
+ * Creates custom additional fees on a draft order.
100
+ *
101
+ * Newly created additional fees are not applied by default.
102
+ * To apply them, use Set Additional Fees.
103
+ * @param - Draft order ID.
104
+ */
105
+ (draftOrderId: string, options?: CreateCustomAdditionalFeesOptions | undefined): Promise<CreateCustomAdditionalFeesResponse>;
106
+ }
107
+ declare function deleteCustomAdditionalFees$1(httpClient: HttpClient): DeleteCustomAdditionalFeesSignature;
108
+ interface DeleteCustomAdditionalFeesSignature {
109
+ /**
110
+ * Removes custom additional fees from a draft order.
111
+ * @param - Draft order ID.
112
+ * @param - IDs of the additional fees to remove from the draft order.
113
+ */
114
+ (draftOrderId: string, customAdditionalFees: string[]): Promise<DeleteCustomAdditionalFeesResponse>;
115
+ }
116
+ declare function setShippingInfo$1(httpClient: HttpClient): SetShippingInfoSignature;
117
+ interface SetShippingInfoSignature {
118
+ /**
119
+ * Sets shipping information on a draft order.
120
+ * @param - Draft order ID.
121
+ */
122
+ (draftOrderId: string, options?: SetShippingInfoOptions | undefined): Promise<SetShippingInfoResponse>;
123
+ }
124
+ declare function setBuyerInfo$1(httpClient: HttpClient): SetBuyerInfoSignature;
125
+ interface SetBuyerInfoSignature {
126
+ /**
127
+ * Sets buyer info on a draft order.
128
+ * @param - Draft order ID.
129
+ */
130
+ (draftOrderId: string, options?: SetBuyerInfoOptions | undefined): Promise<SetBuyerInfoResponse>;
131
+ }
132
+ declare function setRecipientInfo$1(httpClient: HttpClient): SetRecipientInfoSignature;
133
+ interface SetRecipientInfoSignature {
134
+ /**
135
+ * Sets recipient info on a draft order.
136
+ * @param - Draft order ID.
137
+ */
138
+ (draftOrderId: string, options?: SetRecipientInfoOptions | undefined): Promise<SetRecipientInfoResponse>;
139
+ }
140
+ declare function setBillingInfo$1(httpClient: HttpClient): SetBillingInfoSignature;
141
+ interface SetBillingInfoSignature {
142
+ /**
143
+ * Sets billing info on a draft order.
144
+ * @param - Draft order ID.
145
+ */
146
+ (draftOrderId: string, options?: SetBillingInfoOptions | undefined): Promise<SetBillingInfoResponse>;
147
+ }
148
+ declare function getDraftOrder$1(httpClient: HttpClient): GetDraftOrderSignature;
149
+ interface GetDraftOrderSignature {
150
+ /**
151
+ * Retrieves a draft order.
152
+ *
153
+ * The retrieved draft order contains the latest calculations:
154
+ * + Line items, shipping details, and buyer information.
155
+ * + Tax details and price totals.
156
+ * + Automatic discounts and automatic additional fees, along with updated eligibility.
157
+ *
158
+ * > **Note:** When retrieving a committed draft order, it **is not recalculated**.
159
+ * @param - Draft order ID.
160
+ */
161
+ (draftOrderId: string): Promise<GetDraftOrderResponse>;
162
+ }
163
+ declare function getOrderDraftabilityStatus$1(httpClient: HttpClient): GetOrderDraftabilityStatusSignature;
164
+ interface GetOrderDraftabilityStatusSignature {
165
+ /**
166
+ * Checks whether a draft can be created for an order.
167
+ *
168
+ * If `orderDraftable` returns as `true`, the order can be used to create a draft order.
169
+ *
170
+ * If `orderDraftable` returns as `false`, refer to the `nonDraftableReasons` array in the response to understand why the order is not draftable.
171
+ * @param - Order ID.
172
+ */
173
+ (orderId: string): Promise<GetOrderDraftabilityStatusResponse>;
174
+ }
175
+ declare function commitDraftOrder$1(httpClient: HttpClient): CommitDraftOrderSignature;
176
+ interface CommitDraftOrderSignature {
177
+ /**
178
+ * Finalizes a draft order and applies its modifications to the associated order.
179
+ * You can also control which side-effects are executed on commit.
180
+ *
181
+ * > **Notes:**
182
+ * > + The draft order's status is set to `COMMITTED`.
183
+ * > + Commiting a draft order cannot be undone or reverted.
184
+ * > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
185
+ * @param - Draft order ID.
186
+ */
187
+ (draftOrderId: string, options?: CommitDraftOrderOptions | undefined): Promise<CommitDraftOrderResponse>;
188
+ }
189
+ declare function createOrderFromDraft$1(httpClient: HttpClient): CreateOrderFromDraftSignature;
190
+ interface CreateOrderFromDraftSignature {
191
+ /**
192
+ * Creates a new order from a draft, while specifying which side-effects are executed.
193
+ *
194
+ * > **Notes:**
195
+ * > + The draft order's status is set to `COMMITTED`.
196
+ * > + Commiting a draft order cannot be undone or reverted.
197
+ * > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
198
+ * @param - Draft order ID.
199
+ */
200
+ (draftOrderId: string, options?: CreateOrderFromDraftOptions | undefined): Promise<CreateOrderFromDraftResponse>;
201
+ }
202
+ declare function deleteDraftOrder$1(httpClient: HttpClient): DeleteDraftOrderSignature;
203
+ interface DeleteDraftOrderSignature {
204
+ /**
205
+ * Deletes a draft order along with all its pending changes.
206
+ *
207
+ * Draft orders with status 'COMMITTED' cannot be deleted.
208
+ * @param - Draft order ID.
209
+ */
210
+ (draftOrderId: string): Promise<void>;
211
+ }
212
+ declare function queryDraftOrders$1(httpClient: HttpClient): QueryDraftOrdersSignature;
213
+ interface QueryDraftOrdersSignature {
214
+ /**
215
+ * Retrieves a list of up to 100 draft orders, given the provided paging, filtering, and sorting.
216
+ *
217
+ * 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).
218
+ * To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
219
+ */
220
+ (): DraftOrdersQueryBuilder;
221
+ }
222
+ declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
223
+ interface UpdateExtendedFieldsSignature {
224
+ /**
225
+ * Updates extended fields on a draft order.
226
+ * @param - ID of the entity to update.
227
+ * @param - Identifier for the app whose extended fields are being updated.
228
+ */
229
+ (_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
230
+ }
231
+ declare function setTaxExemption$1(httpClient: HttpClient): SetTaxExemptionSignature;
232
+ interface SetTaxExemptionSignature {
233
+ /**
234
+ * Sets whether a draft order is tax-exempt.
235
+ *
236
+ * A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
237
+ * @param - Draft order ID.
238
+ */
239
+ (draftOrderId: string, options: SetTaxExemptionOptions): Promise<SetTaxExemptionResponse>;
240
+ }
241
+ declare function setBusinessLocation$1(httpClient: HttpClient): SetBusinessLocationSignature;
242
+ interface SetBusinessLocationSignature {
243
+ /**
244
+ * Sets business location on a draft order.
245
+ *
246
+ * 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.
247
+ * @param - Draft order ID.
248
+ */
249
+ (draftOrderId: string, options?: SetBusinessLocationOptions | undefined): Promise<SetBusinessLocationResponse>;
250
+ }
251
+ declare const onDraftOrderCreated$1: EventDefinition<DraftOrderCreatedEnvelope, "wix.ecom.v1.draft_order_created">;
252
+ declare const onDraftOrderDeleted$1: EventDefinition<DraftOrderDeletedEnvelope, "wix.ecom.v1.draft_order_deleted">;
253
+ declare const onDraftOrderUpdated$1: EventDefinition<DraftOrderUpdatedEnvelope, "wix.ecom.v1.draft_order_updated">;
254
+
255
+ declare const createDraftOrder: MaybeContext<BuildRESTFunction<typeof createDraftOrder$1> & typeof createDraftOrder$1>;
256
+ declare const createEmptyDraftOrder: MaybeContext<BuildRESTFunction<typeof createEmptyDraftOrder$1> & typeof createEmptyDraftOrder$1>;
257
+ declare const addLineItemsToDraftOrder: MaybeContext<BuildRESTFunction<typeof addLineItemsToDraftOrder$1> & typeof addLineItemsToDraftOrder$1>;
258
+ declare const updateLineItems: MaybeContext<BuildRESTFunction<typeof updateLineItems$1> & typeof updateLineItems$1>;
259
+ declare const setDiscounts: MaybeContext<BuildRESTFunction<typeof setDiscounts$1> & typeof setDiscounts$1>;
260
+ declare const createCustomDiscounts: MaybeContext<BuildRESTFunction<typeof createCustomDiscounts$1> & typeof createCustomDiscounts$1>;
261
+ declare const deleteCustomDiscounts: MaybeContext<BuildRESTFunction<typeof deleteCustomDiscounts$1> & typeof deleteCustomDiscounts$1>;
262
+ declare const setAdditionalFees: MaybeContext<BuildRESTFunction<typeof setAdditionalFees$1> & typeof setAdditionalFees$1>;
263
+ declare const createCustomAdditionalFees: MaybeContext<BuildRESTFunction<typeof createCustomAdditionalFees$1> & typeof createCustomAdditionalFees$1>;
264
+ declare const deleteCustomAdditionalFees: MaybeContext<BuildRESTFunction<typeof deleteCustomAdditionalFees$1> & typeof deleteCustomAdditionalFees$1>;
265
+ declare const setShippingInfo: MaybeContext<BuildRESTFunction<typeof setShippingInfo$1> & typeof setShippingInfo$1>;
266
+ declare const setBuyerInfo: MaybeContext<BuildRESTFunction<typeof setBuyerInfo$1> & typeof setBuyerInfo$1>;
267
+ declare const setRecipientInfo: MaybeContext<BuildRESTFunction<typeof setRecipientInfo$1> & typeof setRecipientInfo$1>;
268
+ declare const setBillingInfo: MaybeContext<BuildRESTFunction<typeof setBillingInfo$1> & typeof setBillingInfo$1>;
269
+ declare const getDraftOrder: MaybeContext<BuildRESTFunction<typeof getDraftOrder$1> & typeof getDraftOrder$1>;
270
+ declare const getOrderDraftabilityStatus: MaybeContext<BuildRESTFunction<typeof getOrderDraftabilityStatus$1> & typeof getOrderDraftabilityStatus$1>;
271
+ declare const commitDraftOrder: MaybeContext<BuildRESTFunction<typeof commitDraftOrder$1> & typeof commitDraftOrder$1>;
272
+ declare const createOrderFromDraft: MaybeContext<BuildRESTFunction<typeof createOrderFromDraft$1> & typeof createOrderFromDraft$1>;
273
+ declare const deleteDraftOrder: MaybeContext<BuildRESTFunction<typeof deleteDraftOrder$1> & typeof deleteDraftOrder$1>;
274
+ declare const queryDraftOrders: MaybeContext<BuildRESTFunction<typeof queryDraftOrders$1> & typeof queryDraftOrders$1>;
275
+ declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
276
+ declare const setTaxExemption: MaybeContext<BuildRESTFunction<typeof setTaxExemption$1> & typeof setTaxExemption$1>;
277
+ declare const setBusinessLocation: MaybeContext<BuildRESTFunction<typeof setBusinessLocation$1> & typeof setBusinessLocation$1>;
278
+ /**
279
+ * Triggered when a draft order is created.
280
+ */
281
+ declare const onDraftOrderCreated: BuildEventDefinition<typeof onDraftOrderCreated$1>;
282
+ /**
283
+ * Triggered when a draft order is deleted.
284
+ */
285
+ declare const onDraftOrderDeleted: BuildEventDefinition<typeof onDraftOrderDeleted$1>;
286
+ /**
287
+ * Triggered when a draft order is updated.
288
+ */
289
+ declare const onDraftOrderUpdated: BuildEventDefinition<typeof onDraftOrderUpdated$1>;
290
+
291
+ export { AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, CommitDraftOrderOptions, CommitDraftOrderResponse, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateDraftOrderResponse, CreateEmptyDraftOrderResponse, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, DeleteCustomAdditionalFeesResponse, DeleteCustomDiscountsResponse, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, DraftOrdersQueryBuilder, GetDraftOrderResponse, GetOrderDraftabilityStatusResponse, IdAndApplied, LineItemChangeDetails, SetAdditionalFeesResponse, SetBillingInfoOptions, SetBillingInfoResponse, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBuyerInfoOptions, SetBuyerInfoResponse, SetDiscountsResponse, SetRecipientInfoOptions, SetRecipientInfoResponse, SetShippingInfoOptions, SetShippingInfoResponse, SetTaxExemptionOptions, SetTaxExemptionResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, 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 };
@@ -0,0 +1,291 @@
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { C as CreateDraftOrderResponse, a as CreateEmptyDraftOrderResponse, A as AddLineItemsToDraftOrderOptions, b as AddLineItemsToDraftOrderResponse, L as LineItemChangeDetails, U as UpdateLineItemsResponse, I as IdAndApplied, S as SetDiscountsResponse, c as CreateCustomDiscountsOptions, d as CreateCustomDiscountsResponse, D as DeleteCustomDiscountsResponse, e as SetAdditionalFeesResponse, f as CreateCustomAdditionalFeesOptions, g as CreateCustomAdditionalFeesResponse, h as DeleteCustomAdditionalFeesResponse, i as SetShippingInfoOptions, j as SetShippingInfoResponse, k as SetBuyerInfoOptions, l as SetBuyerInfoResponse, m as SetRecipientInfoOptions, n as SetRecipientInfoResponse, o as SetBillingInfoOptions, p as SetBillingInfoResponse, G as GetDraftOrderResponse, q as GetOrderDraftabilityStatusResponse, r as CommitDraftOrderOptions, s as CommitDraftOrderResponse, t as CreateOrderFromDraftOptions, u as CreateOrderFromDraftResponse, v as DraftOrdersQueryBuilder, w as UpdateExtendedFieldsOptions, x as UpdateExtendedFieldsResponse, y as SetTaxExemptionOptions, z as SetTaxExemptionResponse, B as SetBusinessLocationOptions, E as SetBusinessLocationResponse, F as DraftOrderCreatedEnvelope, H as DraftOrderDeletedEnvelope, J as DraftOrderUpdatedEnvelope } from './ecom-v1-draft-order-draft-orders.universal-CIHFdzik.js';
3
+ export { dA as ActionEvent, cj as Activity, ck as ActivityContentOneOf, a8 as ActivityType, bW as AddLineItemsToDraftOrderRequest, b6 as AdditionalFee, b5 as AdditionalFeeDetails, c6 as AdditionalFeeOption, aU as Address, aW as AddressLocation, aT as AddressWithContact, Q as AdjustmentType, bP as ApplicationError, b9 as AppliedDiscount, ba as AppliedDiscountDiscountSourceOneOf, X as AppliedDiscountDiscountType, a9 as AttributionSource, cH as AuthorizedPaymentCaptured, cG as AuthorizedPaymentCreated, cI as AuthorizedPaymentVoided, bm as Balance, bl as BalanceSummary, dE as BaseEventMetadata, aE as BillingAdjustment, aF as BillingAdjustmentPriceSummary, bz as BillingChangedDetails, bx as BillingDetails, by as BillingDetailsChangeTypeOneOf, bD as BusinessLocationChangedDetails, bA as BusinessLocationDetails, bB as BusinessLocationDetailsChangeTypeOneOf, bw as BuyerChangedDetails, bu as BuyerDetails, bv as BuyerDetailsChangeTypeOneOf, b3 as BuyerInfo, b4 as BuyerInfoIdOneOf, bF as CalculatedDraftOrder, bL as CalculationErrors, bM as CalculationErrorsShippingCalculationErrorOneOf, bU as CarrierError, bT as CarrierErrors, ak as CatalogReference, bX as CatalogReferenceLineItem, d7 as ChannelInfo, aa as ChannelType, aq as Color, cg as CommitDraftOrderRequest, bb as Coupon, c5 as CreateCustomAdditionalFeesRequest, c0 as CreateCustomDiscountsRequest, bE as CreateDraftOrderRequest, bV as CreateEmptyDraftOrderRequest, dd as CreateOrderFromDraftRequest, bh as CreatedBy, bi as CreatedByStringOneOf, cW as CreditCardDetails, ci as CurrencyConversionDetails, dm as CursorPaging, dp as CursorPagingMetadata, dj as CursorQuery, dk as CursorQueryPagingMethodOneOf, dq as Cursors, cl as CustomActivity, d8 as CustomField, bY as CustomLineItem, c7 as DeleteCustomAdditionalFeesRequest, c3 as DeleteCustomDiscountsRequest, dg as DeleteDraftOrderRequest, dh as DeleteDraftOrderResponse, bH as DeliveryLogistics, bJ as DeliveryTimeSlot, al as DescriptionLine, an as DescriptionLineDescriptionLineValueOneOf, ao as DescriptionLineName, K as DescriptionLineType, am as DescriptionLineValueOneOf, bN as Details, bO as DetailsKindOneOf, ay as DigitalFile, b8 as DiscountDetails, c1 as DiscountOption, c2 as DiscountOptionDiscountAmountOneOf, Y as DiscountReason, be as DiscountRule, bf as DiscountRuleName, a2 as DiscountType, du as DomainEvent, dv as DomainEventBodyOneOf, ad as DraftOrder, cr as DraftOrderChangesApplied, bn as DraftOrderCommitSettings, dG as DraftOrdersQueryResult, Z as EditingStatus, dw as EntityCreatedEvent, dz as EntityDeletedEvent, dy as EntityUpdatedEvent, dF as EventMetadata, aJ as ExtendedFields, d2 as ExternalReceipt, bR as FieldViolation, a1 as FileType, ar as FocalPoint, aD as FreeTrialPeriod, a5 as FulfillmentStatus, da as FulfillmentStatusesAggregate, aX as FullAddressContactDetails, ce as GetDraftOrderRequest, cf as GetOrderDraftabilityStatusRequest, cN as GiftCardPaymentRefund, dC as IdentificationData, dD as IdentificationDataIdOneOf, bo as InventoryUpdate, aN as ItemChangedDetails, ae as ItemDetails, af as ItemDetailsChangeTypeOneOf, aM as ItemModifier, av as ItemTaxFullDetails, at as ItemType, M as ItemTypeItemType, au as ItemTypeItemTypeDataOneOf, N as JurisdictionType, cA as LineItemAmount, cu as LineItemChanges, bg as LineItemDiscount, cq as LineItemExchangeData, cw as LineItemPriceChange, cv as LineItemQuantityChange, a7 as LineItemQuantityChangeType, ax as LineItemTaxBreakdown, aw as LineItemTaxInfo, bC as Location, aG as LocationAndQuantity, cB as ManagedAdditionalFee, cy as ManagedDiscount, cx as ManagedLineItem, cO as MembershipPaymentRefund, cm as MerchantComment, bc as MerchantDiscount, bd as MerchantDiscountMerchantDiscountReasonOneOf, dB as MessageEnvelope, aK as ModifierGroup, cp as NewExchangeOrderCreated, a3 as NonDraftableReason, ch as Order, cs as OrderChange, ct as OrderChangeValueOneOf, df as OrderCreateNotifications, de as OrderCreateSettings, co as OrderCreatedFromExchange, ai as OrderLineItem, cn as OrderRefunded, a6 as OrderStatus, bt as OrderTaxBreakdown, bs as OrderTaxInfo, cX as PaymentCanceled, cY as PaymentCanceledPaymentDetailsOneOf, cZ as PaymentDeclined, c_ as PaymentDeclinedPaymentDetailsOneOf, P as PaymentOptionType, cS as PaymentPending, cT as PaymentPendingPaymentDetailsOneOf, cQ as PaymentRefundFailed, cP as PaymentRefunded, a4 as PaymentStatus, as as PhysicalProperties, a_ as PickupAddress, bI as PickupDetails, R as PickupDetailsPickupMethod, $ as PickupMethod, ap as PlainTextValue, ag as Price, ah as PriceDescription, bj as PriceSummary, aj as ProductName, di as QueryDraftOrdersRequest, dn as QueryDraftOrdersResponse, c$ as ReceiptCreated, d0 as ReceiptCreatedReceiptInfoOneOf, d3 as ReceiptSent, d4 as ReceiptSentReceiptInfoOneOf, br as RecipientInfoChangedDetails, bp as RecipientInfoDetails, bq as RecipientInfoDetailsChangeTypeOneOf, cJ as RefundInitiated, cR as RefundedAsStoreCredit, cK as RefundedPayment, cL as RefundedPaymentKindOneOf, cU as RegularPayment, cV as RegularPaymentPaymentMethodDetailsOneOf, cM as RegularPaymentRefund, dx as RestoreInfo, a0 as RuleType, cF as SavedPaymentMethod, bZ as SecuredMedia, c4 as SetAdditionalFeesRequest, cb as SetBillingInfoRequest, dt as SetBusinessLocationRequest, c9 as SetBuyerInfoRequest, b$ as SetDiscountsRequest, ca as SetRecipientInfoRequest, c8 as SetShippingInfoRequest, ds as SetTaxExemptionRequest, b2 as ShippingChangedDetails, aO as ShippingDetails, aP as ShippingDetailsChangeTypeOneOf, cE as ShippingInformation, cD as ShippingInformationChange, bG as ShippingOption, bK as ShippingPrice, b1 as ShippingRegion, ab as SortOrder, dl as Sorting, W as SourceType, aV as StreetAddress, aB as SubscriptionDescription, O as SubscriptionFrequency, az as SubscriptionInfo, aC as SubscriptionSettings, aA as SubscriptionTitle, bS as SystemError, dc as TagList, db as Tags, b7 as TaxDetails, bk as TaxSummary, aH as TaxableAddress, aI as TaxableAddressTaxableAddressDataOneOf, T as TaxableAddressType, cC as TotalPriceChange, aL as TranslatableString, cz as TranslatedValue, dr as UpdateExtendedFieldsRequest, b_ as UpdateLineItemsRequest, cc as UpdateShippingInfoRequest, cd as UpdateShippingInfoResponse, d9 as V1BalanceSummary, d5 as V1CreatedBy, d6 as V1CreatedByStringOneOf, aR as V1DeliveryLogistics, aS as V1DeliveryLogisticsAddressOneOf, a$ as V1DeliveryTimeSlot, aZ as V1PickupDetails, aQ as V1ShippingInformation, b0 as V1ShippingPrice, bQ as ValidationError, aY as VatId, V as VatType, ac as WebhookIdentityType, _ as WeightUnit, d1 as WixReceipt } from './ecom-v1-draft-order-draft-orders.universal-CIHFdzik.js';
4
+
5
+ declare function createDraftOrder$1(httpClient: HttpClient): CreateDraftOrderSignature;
6
+ interface CreateDraftOrderSignature {
7
+ /**
8
+ * Creates or retrieves a draft order based on the specified order ID.
9
+ *
10
+ * When passing the ID of an order that is already in draft, the existing draft order is returned.
11
+ * To complete a draft and update the original order, call Commit Draft Order.
12
+ * @param - ID of the order to create a draft for.
13
+ */
14
+ (orderId: string): Promise<CreateDraftOrderResponse>;
15
+ }
16
+ declare function createEmptyDraftOrder$1(httpClient: HttpClient): CreateEmptyDraftOrderSignature;
17
+ interface CreateEmptyDraftOrderSignature {
18
+ /**
19
+ * Creates an empty draft order.
20
+ *
21
+ * After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
22
+ */
23
+ (): Promise<CreateEmptyDraftOrderResponse>;
24
+ }
25
+ declare function addLineItemsToDraftOrder$1(httpClient: HttpClient): AddLineItemsToDraftOrderSignature;
26
+ interface AddLineItemsToDraftOrderSignature {
27
+ /**
28
+ * Adds catalog or custom line items to a draft order.
29
+ * @param - Draft order ID.
30
+ */
31
+ (draftOrderId: string, options?: AddLineItemsToDraftOrderOptions | undefined): Promise<AddLineItemsToDraftOrderResponse>;
32
+ }
33
+ declare function updateLineItems$1(httpClient: HttpClient): UpdateLineItemsSignature;
34
+ interface UpdateLineItemsSignature {
35
+ /**
36
+ * Updates a draft order's line items.
37
+ *
38
+ * You can update a line item's quantity, price, and description.
39
+ * > **Notes:**
40
+ * > + Specifying a quantity of `0` will remove the line item.
41
+ * > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
42
+ * > + 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)).
43
+ * @param - Draft order ID.
44
+ * @param - Details of changes to apply per line item.
45
+ */
46
+ (draftOrderId: string, lineItemChanges: LineItemChangeDetails[]): Promise<UpdateLineItemsResponse>;
47
+ }
48
+ declare function setDiscounts$1(httpClient: HttpClient): SetDiscountsSignature;
49
+ interface SetDiscountsSignature {
50
+ /**
51
+ * Applies or unapplies discounts on a draft order.
52
+ *
53
+ * Unapplied discounts are still part of the draft order, but do not affect balance.
54
+ * Existing discounts that are not passed in the request will keep their current state.
55
+ * @param - Draft order ID.
56
+ * @param - Discounts to set on the draft order.
57
+ *
58
+ * Any existing discounts that are not passed will not change.
59
+ */
60
+ (draftOrderId: string, discounts: IdAndApplied[]): Promise<SetDiscountsResponse>;
61
+ }
62
+ declare function createCustomDiscounts$1(httpClient: HttpClient): CreateCustomDiscountsSignature;
63
+ interface CreateCustomDiscountsSignature {
64
+ /**
65
+ * Creates custom discounts.
66
+ *
67
+ * Newly created discounts are unapplied by default.
68
+ * To apply them, use Set Discounts.
69
+ * @param - Draft order ID.
70
+ */
71
+ (draftOrderId: string, options?: CreateCustomDiscountsOptions | undefined): Promise<CreateCustomDiscountsResponse>;
72
+ }
73
+ declare function deleteCustomDiscounts$1(httpClient: HttpClient): DeleteCustomDiscountsSignature;
74
+ interface DeleteCustomDiscountsSignature {
75
+ /**
76
+ * Removes custom discounts from a draft order.
77
+ * @param - Draft order ID.
78
+ * @param - IDs of the discounts to remove from the draft order.
79
+ */
80
+ (draftOrderId: string, discountIds: string[]): Promise<DeleteCustomDiscountsResponse>;
81
+ }
82
+ declare function setAdditionalFees$1(httpClient: HttpClient): SetAdditionalFeesSignature;
83
+ interface SetAdditionalFeesSignature {
84
+ /**
85
+ * Applies or unapplies additional fees on a draft order.
86
+ *
87
+ * Additional fees that are not applied are still part of the draft order, but do not affect balance.
88
+ * Existing additional fees that are not passed in the request will keep their current state.
89
+ * @param - Draft order ID.
90
+ * @param - Additional fees to set on the draft order.
91
+ *
92
+ * Any existing additional fees that are not passed will not change.
93
+ */
94
+ (draftOrderId: string, additionalFees: IdAndApplied[]): Promise<SetAdditionalFeesResponse>;
95
+ }
96
+ declare function createCustomAdditionalFees$1(httpClient: HttpClient): CreateCustomAdditionalFeesSignature;
97
+ interface CreateCustomAdditionalFeesSignature {
98
+ /**
99
+ * Creates custom additional fees on a draft order.
100
+ *
101
+ * Newly created additional fees are not applied by default.
102
+ * To apply them, use Set Additional Fees.
103
+ * @param - Draft order ID.
104
+ */
105
+ (draftOrderId: string, options?: CreateCustomAdditionalFeesOptions | undefined): Promise<CreateCustomAdditionalFeesResponse>;
106
+ }
107
+ declare function deleteCustomAdditionalFees$1(httpClient: HttpClient): DeleteCustomAdditionalFeesSignature;
108
+ interface DeleteCustomAdditionalFeesSignature {
109
+ /**
110
+ * Removes custom additional fees from a draft order.
111
+ * @param - Draft order ID.
112
+ * @param - IDs of the additional fees to remove from the draft order.
113
+ */
114
+ (draftOrderId: string, customAdditionalFees: string[]): Promise<DeleteCustomAdditionalFeesResponse>;
115
+ }
116
+ declare function setShippingInfo$1(httpClient: HttpClient): SetShippingInfoSignature;
117
+ interface SetShippingInfoSignature {
118
+ /**
119
+ * Sets shipping information on a draft order.
120
+ * @param - Draft order ID.
121
+ */
122
+ (draftOrderId: string, options?: SetShippingInfoOptions | undefined): Promise<SetShippingInfoResponse>;
123
+ }
124
+ declare function setBuyerInfo$1(httpClient: HttpClient): SetBuyerInfoSignature;
125
+ interface SetBuyerInfoSignature {
126
+ /**
127
+ * Sets buyer info on a draft order.
128
+ * @param - Draft order ID.
129
+ */
130
+ (draftOrderId: string, options?: SetBuyerInfoOptions | undefined): Promise<SetBuyerInfoResponse>;
131
+ }
132
+ declare function setRecipientInfo$1(httpClient: HttpClient): SetRecipientInfoSignature;
133
+ interface SetRecipientInfoSignature {
134
+ /**
135
+ * Sets recipient info on a draft order.
136
+ * @param - Draft order ID.
137
+ */
138
+ (draftOrderId: string, options?: SetRecipientInfoOptions | undefined): Promise<SetRecipientInfoResponse>;
139
+ }
140
+ declare function setBillingInfo$1(httpClient: HttpClient): SetBillingInfoSignature;
141
+ interface SetBillingInfoSignature {
142
+ /**
143
+ * Sets billing info on a draft order.
144
+ * @param - Draft order ID.
145
+ */
146
+ (draftOrderId: string, options?: SetBillingInfoOptions | undefined): Promise<SetBillingInfoResponse>;
147
+ }
148
+ declare function getDraftOrder$1(httpClient: HttpClient): GetDraftOrderSignature;
149
+ interface GetDraftOrderSignature {
150
+ /**
151
+ * Retrieves a draft order.
152
+ *
153
+ * The retrieved draft order contains the latest calculations:
154
+ * + Line items, shipping details, and buyer information.
155
+ * + Tax details and price totals.
156
+ * + Automatic discounts and automatic additional fees, along with updated eligibility.
157
+ *
158
+ * > **Note:** When retrieving a committed draft order, it **is not recalculated**.
159
+ * @param - Draft order ID.
160
+ */
161
+ (draftOrderId: string): Promise<GetDraftOrderResponse>;
162
+ }
163
+ declare function getOrderDraftabilityStatus$1(httpClient: HttpClient): GetOrderDraftabilityStatusSignature;
164
+ interface GetOrderDraftabilityStatusSignature {
165
+ /**
166
+ * Checks whether a draft can be created for an order.
167
+ *
168
+ * If `orderDraftable` returns as `true`, the order can be used to create a draft order.
169
+ *
170
+ * If `orderDraftable` returns as `false`, refer to the `nonDraftableReasons` array in the response to understand why the order is not draftable.
171
+ * @param - Order ID.
172
+ */
173
+ (orderId: string): Promise<GetOrderDraftabilityStatusResponse>;
174
+ }
175
+ declare function commitDraftOrder$1(httpClient: HttpClient): CommitDraftOrderSignature;
176
+ interface CommitDraftOrderSignature {
177
+ /**
178
+ * Finalizes a draft order and applies its modifications to the associated order.
179
+ * You can also control which side-effects are executed on commit.
180
+ *
181
+ * > **Notes:**
182
+ * > + The draft order's status is set to `COMMITTED`.
183
+ * > + Commiting a draft order cannot be undone or reverted.
184
+ * > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
185
+ * @param - Draft order ID.
186
+ */
187
+ (draftOrderId: string, options?: CommitDraftOrderOptions | undefined): Promise<CommitDraftOrderResponse>;
188
+ }
189
+ declare function createOrderFromDraft$1(httpClient: HttpClient): CreateOrderFromDraftSignature;
190
+ interface CreateOrderFromDraftSignature {
191
+ /**
192
+ * Creates a new order from a draft, while specifying which side-effects are executed.
193
+ *
194
+ * > **Notes:**
195
+ * > + The draft order's status is set to `COMMITTED`.
196
+ * > + Commiting a draft order cannot be undone or reverted.
197
+ * > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
198
+ * @param - Draft order ID.
199
+ */
200
+ (draftOrderId: string, options?: CreateOrderFromDraftOptions | undefined): Promise<CreateOrderFromDraftResponse>;
201
+ }
202
+ declare function deleteDraftOrder$1(httpClient: HttpClient): DeleteDraftOrderSignature;
203
+ interface DeleteDraftOrderSignature {
204
+ /**
205
+ * Deletes a draft order along with all its pending changes.
206
+ *
207
+ * Draft orders with status 'COMMITTED' cannot be deleted.
208
+ * @param - Draft order ID.
209
+ */
210
+ (draftOrderId: string): Promise<void>;
211
+ }
212
+ declare function queryDraftOrders$1(httpClient: HttpClient): QueryDraftOrdersSignature;
213
+ interface QueryDraftOrdersSignature {
214
+ /**
215
+ * Retrieves a list of up to 100 draft orders, given the provided paging, filtering, and sorting.
216
+ *
217
+ * 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).
218
+ * To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
219
+ */
220
+ (): DraftOrdersQueryBuilder;
221
+ }
222
+ declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
223
+ interface UpdateExtendedFieldsSignature {
224
+ /**
225
+ * Updates extended fields on a draft order.
226
+ * @param - ID of the entity to update.
227
+ * @param - Identifier for the app whose extended fields are being updated.
228
+ */
229
+ (_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
230
+ }
231
+ declare function setTaxExemption$1(httpClient: HttpClient): SetTaxExemptionSignature;
232
+ interface SetTaxExemptionSignature {
233
+ /**
234
+ * Sets whether a draft order is tax-exempt.
235
+ *
236
+ * A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
237
+ * @param - Draft order ID.
238
+ */
239
+ (draftOrderId: string, options: SetTaxExemptionOptions): Promise<SetTaxExemptionResponse>;
240
+ }
241
+ declare function setBusinessLocation$1(httpClient: HttpClient): SetBusinessLocationSignature;
242
+ interface SetBusinessLocationSignature {
243
+ /**
244
+ * Sets business location on a draft order.
245
+ *
246
+ * 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.
247
+ * @param - Draft order ID.
248
+ */
249
+ (draftOrderId: string, options?: SetBusinessLocationOptions | undefined): Promise<SetBusinessLocationResponse>;
250
+ }
251
+ declare const onDraftOrderCreated$1: EventDefinition<DraftOrderCreatedEnvelope, "wix.ecom.v1.draft_order_created">;
252
+ declare const onDraftOrderDeleted$1: EventDefinition<DraftOrderDeletedEnvelope, "wix.ecom.v1.draft_order_deleted">;
253
+ declare const onDraftOrderUpdated$1: EventDefinition<DraftOrderUpdatedEnvelope, "wix.ecom.v1.draft_order_updated">;
254
+
255
+ declare const createDraftOrder: MaybeContext<BuildRESTFunction<typeof createDraftOrder$1> & typeof createDraftOrder$1>;
256
+ declare const createEmptyDraftOrder: MaybeContext<BuildRESTFunction<typeof createEmptyDraftOrder$1> & typeof createEmptyDraftOrder$1>;
257
+ declare const addLineItemsToDraftOrder: MaybeContext<BuildRESTFunction<typeof addLineItemsToDraftOrder$1> & typeof addLineItemsToDraftOrder$1>;
258
+ declare const updateLineItems: MaybeContext<BuildRESTFunction<typeof updateLineItems$1> & typeof updateLineItems$1>;
259
+ declare const setDiscounts: MaybeContext<BuildRESTFunction<typeof setDiscounts$1> & typeof setDiscounts$1>;
260
+ declare const createCustomDiscounts: MaybeContext<BuildRESTFunction<typeof createCustomDiscounts$1> & typeof createCustomDiscounts$1>;
261
+ declare const deleteCustomDiscounts: MaybeContext<BuildRESTFunction<typeof deleteCustomDiscounts$1> & typeof deleteCustomDiscounts$1>;
262
+ declare const setAdditionalFees: MaybeContext<BuildRESTFunction<typeof setAdditionalFees$1> & typeof setAdditionalFees$1>;
263
+ declare const createCustomAdditionalFees: MaybeContext<BuildRESTFunction<typeof createCustomAdditionalFees$1> & typeof createCustomAdditionalFees$1>;
264
+ declare const deleteCustomAdditionalFees: MaybeContext<BuildRESTFunction<typeof deleteCustomAdditionalFees$1> & typeof deleteCustomAdditionalFees$1>;
265
+ declare const setShippingInfo: MaybeContext<BuildRESTFunction<typeof setShippingInfo$1> & typeof setShippingInfo$1>;
266
+ declare const setBuyerInfo: MaybeContext<BuildRESTFunction<typeof setBuyerInfo$1> & typeof setBuyerInfo$1>;
267
+ declare const setRecipientInfo: MaybeContext<BuildRESTFunction<typeof setRecipientInfo$1> & typeof setRecipientInfo$1>;
268
+ declare const setBillingInfo: MaybeContext<BuildRESTFunction<typeof setBillingInfo$1> & typeof setBillingInfo$1>;
269
+ declare const getDraftOrder: MaybeContext<BuildRESTFunction<typeof getDraftOrder$1> & typeof getDraftOrder$1>;
270
+ declare const getOrderDraftabilityStatus: MaybeContext<BuildRESTFunction<typeof getOrderDraftabilityStatus$1> & typeof getOrderDraftabilityStatus$1>;
271
+ declare const commitDraftOrder: MaybeContext<BuildRESTFunction<typeof commitDraftOrder$1> & typeof commitDraftOrder$1>;
272
+ declare const createOrderFromDraft: MaybeContext<BuildRESTFunction<typeof createOrderFromDraft$1> & typeof createOrderFromDraft$1>;
273
+ declare const deleteDraftOrder: MaybeContext<BuildRESTFunction<typeof deleteDraftOrder$1> & typeof deleteDraftOrder$1>;
274
+ declare const queryDraftOrders: MaybeContext<BuildRESTFunction<typeof queryDraftOrders$1> & typeof queryDraftOrders$1>;
275
+ declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
276
+ declare const setTaxExemption: MaybeContext<BuildRESTFunction<typeof setTaxExemption$1> & typeof setTaxExemption$1>;
277
+ declare const setBusinessLocation: MaybeContext<BuildRESTFunction<typeof setBusinessLocation$1> & typeof setBusinessLocation$1>;
278
+ /**
279
+ * Triggered when a draft order is created.
280
+ */
281
+ declare const onDraftOrderCreated: BuildEventDefinition<typeof onDraftOrderCreated$1>;
282
+ /**
283
+ * Triggered when a draft order is deleted.
284
+ */
285
+ declare const onDraftOrderDeleted: BuildEventDefinition<typeof onDraftOrderDeleted$1>;
286
+ /**
287
+ * Triggered when a draft order is updated.
288
+ */
289
+ declare const onDraftOrderUpdated: BuildEventDefinition<typeof onDraftOrderUpdated$1>;
290
+
291
+ export { AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, CommitDraftOrderOptions, CommitDraftOrderResponse, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateDraftOrderResponse, CreateEmptyDraftOrderResponse, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, DeleteCustomAdditionalFeesResponse, DeleteCustomDiscountsResponse, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, DraftOrdersQueryBuilder, GetDraftOrderResponse, GetOrderDraftabilityStatusResponse, IdAndApplied, LineItemChangeDetails, SetAdditionalFeesResponse, SetBillingInfoOptions, SetBillingInfoResponse, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBuyerInfoOptions, SetBuyerInfoResponse, SetDiscountsResponse, SetRecipientInfoOptions, SetRecipientInfoResponse, SetShippingInfoOptions, SetShippingInfoResponse, SetTaxExemptionOptions, SetTaxExemptionResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, 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 };