@wix/auto_sdk_ecom_draft-orders 1.0.66 → 1.0.68

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 (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +221 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +60 -1
  5. package/build/cjs/index.typings.js +212 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +47 -2
  8. package/build/cjs/meta.js +157 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +220 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +60 -1
  14. package/build/es/index.typings.mjs +211 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +47 -2
  17. package/build/es/meta.mjs +156 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +23 -3
  20. package/build/internal/cjs/index.js +221 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +90 -1
  23. package/build/internal/cjs/index.typings.js +212 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +47 -2
  26. package/build/internal/cjs/meta.js +157 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +23 -3
  29. package/build/internal/es/index.mjs +220 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +90 -1
  32. package/build/internal/es/index.typings.mjs +211 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +47 -2
  35. package/build/internal/es/meta.mjs +156 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1707,6 +1707,32 @@ interface BusinessLocationChangedDetails {
1707
1707
  /** Business location before draft. */
1708
1708
  businessLocationBeforeChange?: Location;
1709
1709
  }
1710
+ interface DepositDetails extends DepositDetailsDepositOneOf {
1711
+ /** Deposit value as a monetary amount. */
1712
+ amount?: Price;
1713
+ /**
1714
+ * Deposit amount defined as a percentage of the total order value.
1715
+ * @format DECIMAL_VALUE
1716
+ * @decimalValue options { gte:0, lte:100, maxScale:2 }
1717
+ */
1718
+ percentage?: string | null;
1719
+ /**
1720
+ * Price summary with deposit.
1721
+ * @readonly
1722
+ */
1723
+ priceSummary?: PriceSummary;
1724
+ }
1725
+ /** @oneof */
1726
+ interface DepositDetailsDepositOneOf {
1727
+ /** Deposit value as a monetary amount. */
1728
+ amount?: Price;
1729
+ /**
1730
+ * Deposit amount defined as a percentage of the total order value.
1731
+ * @format DECIMAL_VALUE
1732
+ * @decimalValue options { gte:0, lte:100, maxScale:2 }
1733
+ */
1734
+ percentage?: string | null;
1735
+ }
1710
1736
  interface CreateDraftOrderRequest {
1711
1737
  /**
1712
1738
  * ID of the order to create a draft for.
@@ -2113,6 +2139,22 @@ interface UpdateLineItemsResponse {
2113
2139
  /** Draft order calculated with the latest changes. */
2114
2140
  calculatedDraftOrder?: CalculatedDraftOrder;
2115
2141
  }
2142
+ interface SetDepositRequest {
2143
+ /**
2144
+ * Draft order ID.
2145
+ * @format GUID
2146
+ */
2147
+ draftOrderId: string;
2148
+ /**
2149
+ * Deposit to set on the draft order.
2150
+ * Leave it as empty to remove deposit settings.
2151
+ */
2152
+ depositDetails?: DepositDetails;
2153
+ }
2154
+ interface SetDepositResponse {
2155
+ /** Draft order calculated with the latest changes. */
2156
+ calculatedDraftOrder?: CalculatedDraftOrder;
2157
+ }
2116
2158
  interface SetDiscountsRequest {
2117
2159
  /**
2118
2160
  * Draft order ID.
@@ -4248,6 +4290,16 @@ type UpdateLineItemsApplicationErrors = {
4248
4290
  data?: Record<string, any>;
4249
4291
  };
4250
4292
  /** @docsIgnore */
4293
+ type SetDepositApplicationErrors = {
4294
+ code?: 'DRAFT_ORDER_DOES_NOT_EXIST';
4295
+ description?: string;
4296
+ data?: Record<string, any>;
4297
+ } | {
4298
+ code?: 'DEPOSIT_AMOUNT_EXCEEDS_ORDER_TOTALS';
4299
+ description?: string;
4300
+ data?: Record<string, any>;
4301
+ };
4302
+ /** @docsIgnore */
4251
4303
  type SetDiscountsApplicationErrors = {
4252
4304
  code?: 'DRAFT_ORDER_DOES_NOT_EXIST';
4253
4305
  description?: string;
@@ -4598,6 +4650,13 @@ interface AddLineItemsToDraftOrderOptions {
4598
4650
  declare function updateLineItems(draftOrderId: string, lineItemChanges: NonNullablePaths<LineItemChangeDetails, `lineItemId`, 2>[]): Promise<NonNullablePaths<UpdateLineItemsResponse, `calculatedDraftOrder.draftOrder.lineItems` | `calculatedDraftOrder.draftOrder.lineItems.${number}.added` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceBeforeChange.amount` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceBeforeChange.formattedAmount` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceDescriptionBeforeChange.original` | `calculatedDraftOrder.draftOrder.lineItems.${number}.removed` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem._id` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.productName.original` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.catalogReference.catalogItemId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.catalogReference.appId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.quantity` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.physicalProperties.shippable` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.itemType.preset` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.itemType.custom` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.paymentOption` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxDetails.taxRate` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxInfo.taxIncludedInPrice` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.digitalFile.fileId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.subscriptionInfo.cycleNumber` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.subscriptionInfo.subscriptionOptionTitle` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxableAddress.addressType` | `calculatedDraftOrder.draftOrder.shippingInfo.added` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.title` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.number` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.name` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId._id` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId.type` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.draftOrder.shippingInfo.removed` | `calculatedDraftOrder.draftOrder.buyerInfo.visitorId` | `calculatedDraftOrder.draftOrder.buyerInfo.memberId` | `calculatedDraftOrder.draftOrder.additionalFees` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.additionalFee.name` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.additionalFee._id` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.taxDetails.taxable` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.source` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.applied` | `calculatedDraftOrder.draftOrder.discounts` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon._id` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon.code` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon.name` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.merchantDiscount.discountReason` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.discountRule._id` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.discountType` | `calculatedDraftOrder.draftOrder.discounts.${number}.source` | `calculatedDraftOrder.draftOrder.discounts.${number}.applied` | `calculatedDraftOrder.draftOrder.createdBy.userId` | `calculatedDraftOrder.draftOrder.createdBy.appId` | `calculatedDraftOrder.draftOrder.status` | `calculatedDraftOrder.draftOrder.weightUnit` | `calculatedDraftOrder.draftOrder.balanceSummary.balance.amount` | `calculatedDraftOrder.draftOrder.balanceSummary.balance.formattedAmount` | `calculatedDraftOrder.draftOrder.commitSettings.updateInventory` | `calculatedDraftOrder.draftOrder.commitSettings.updateInventory.${number}.lineItemId` | `calculatedDraftOrder.draftOrder.recipientInfo.added` | `calculatedDraftOrder.draftOrder.recipientInfo.removed` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.taxName` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.taxType` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.jurisdiction` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.jurisdictionType` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.rate` | `calculatedDraftOrder.draftOrder.buyerDetails.added` | `calculatedDraftOrder.draftOrder.buyerDetails.removed` | `calculatedDraftOrder.draftOrder.billingDetails.added` | `calculatedDraftOrder.draftOrder.billingDetails.removed` | `calculatedDraftOrder.draftOrder.businessLocationDetails.added` | `calculatedDraftOrder.draftOrder.businessLocationDetails.changedDetails.businessLocationBeforeChange._id` | `calculatedDraftOrder.draftOrder.businessLocationDetails.changedDetails.businessLocationBeforeChange.name` | `calculatedDraftOrder.draftOrder.businessLocationDetails.removed` | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`, 11> & {
4599
4651
  __applicationErrorsType?: UpdateLineItemsApplicationErrors;
4600
4652
  }>;
4653
+ interface SetDepositOptions {
4654
+ /**
4655
+ * Deposit to set on the draft order.
4656
+ * Leave it as empty to remove deposit settings.
4657
+ */
4658
+ depositDetails?: DepositDetails;
4659
+ }
4601
4660
  /**
4602
4661
  * Applies or unapplies discounts on a draft order.
4603
4662
  *
@@ -5082,4 +5141,4 @@ interface SetBusinessLocationOptions {
5082
5141
  businessLocation?: Location;
5083
5142
  }
5084
5143
 
5085
- export { type ActionEvent, type Activity, type ActivityContentOneOf, ActivityType, type ActivityTypeWithLiterals, type AddLineItemsToDraftOrderApplicationErrors, type AddLineItemsToDraftOrderOptions, type AddLineItemsToDraftOrderRequest, type AddLineItemsToDraftOrderResponse, type AdditionalFee, type AdditionalFeeDetails, type AdditionalFeeOption, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, type AppliedDiscountDiscountTypeWithLiterals, AttributionSource, type AttributionSourceWithLiterals, type AuthorizedPaymentCaptured, type AuthorizedPaymentCreated, type AuthorizedPaymentVoided, type Balance, type BalanceSummary, type BaseEventMetadata, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BillingChangedDetails, type BillingDetails, type BillingDetailsChangeTypeOneOf, type BusinessLocationChangedDetails, type BusinessLocationDetails, type BusinessLocationDetailsChangeTypeOneOf, type BuyerChangedDetails, type BuyerDetails, type BuyerDetailsChangeTypeOneOf, type BuyerInfo, type BuyerInfoIdOneOf, type CalculatedDraftOrder, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type CatalogReference, type CatalogReferenceLineItem, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, type ChargebackCreated, type ChargebackReversed, type Color, type CommitDraftOrderApplicationErrors, type CommitDraftOrderOptions, type CommitDraftOrderRequest, type CommitDraftOrderResponse, type Coupon, type CreateCustomAdditionalFeesApplicationErrors, type CreateCustomAdditionalFeesOptions, type CreateCustomAdditionalFeesRequest, type CreateCustomAdditionalFeesResponse, type CreateCustomDiscountsApplicationErrors, type CreateCustomDiscountsOptions, type CreateCustomDiscountsRequest, type CreateCustomDiscountsResponse, type CreateDraftOrderApplicationErrors, type CreateDraftOrderRequest, type CreateDraftOrderResponse, type CreateEmptyDraftOrderApplicationErrors, type CreateEmptyDraftOrderRequest, type CreateEmptyDraftOrderResponse, type CreateOrderFromDraftApplicationErrors, type CreateOrderFromDraftOptions, type CreateOrderFromDraftRequest, type CreateOrderFromDraftResponse, type CreatedBy, type CreatedByStringOneOf, type CreditCardDetails, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomActivity, type CustomField, type CustomLineItem, type DeleteCustomAdditionalFeesApplicationErrors, type DeleteCustomAdditionalFeesRequest, type DeleteCustomAdditionalFeesResponse, type DeleteCustomDiscountsApplicationErrors, type DeleteCustomDiscountsRequest, type DeleteCustomDiscountsResponse, type DeleteDraftOrderApplicationErrors, type DeleteDraftOrderRequest, type DeleteDraftOrderResponse, type DeliveryLogistics, type DeliveryTimeSlot, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DescriptionLinesOverride, type Details, type DetailsKindOneOf, type DigitalFile, type DiscountDetails, type DiscountOption, type DiscountOptionDiscountAmountOneOf, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DraftOrder, type DraftOrderChangesApplied, type DraftOrderCommitSettings, type DraftOrderCreatedEnvelope, type DraftOrderDeletedEnvelope, type DraftOrderUpdatedEnvelope, type DraftOrdersQueryBuilder, type DraftOrdersQueryResult, EditingStatus, type EditingStatusWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type ExternalReceipt, type FieldViolation, FileType, type FileTypeWithLiterals, type FocalPoint, type FreeTrialPeriod, FulfillmentStatus, type FulfillmentStatusWithLiterals, type FulfillmentStatusesAggregate, type FullAddressContactDetails, type GetDraftOrderApplicationErrors, type GetDraftOrderRequest, type GetDraftOrderResponse, type GetOrderDraftabilityStatusRequest, type GetOrderDraftabilityStatusResponse, type GiftCardPaymentRefund, type IdAndApplied, type IdentificationData, type IdentificationDataIdOneOf, type InventoryUpdate, type ItemChangedDetails, type ItemDetails, type ItemDetailsChangeTypeOneOf, type ItemModifier, type ItemTaxFullDetails, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemAmount, type LineItemChangeDetails, type LineItemChanges, type LineItemDescriptionLineChange, type LineItemDiscount, type LineItemExchangeData, type LineItemModifiersChange, type LineItemPriceChange, type LineItemProductNameChange, type LineItemQuantityChange, LineItemQuantityChangeType, type LineItemQuantityChangeTypeWithLiterals, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type ManagedAdditionalFee, type ManagedDiscount, type ManagedLineItem, type MembershipPaymentRefund, type MerchantComment, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type ModifiersGroupsOverride, type NewExchangeOrderCreated, NonDraftableReason, type NonDraftableReasonWithLiterals, type Order, type OrderChange, type OrderChangeValueOneOf, type OrderCreateNotifications, type OrderCreateSettings, type OrderCreatedFromExchange, type OrderLineItem, type OrderRefunded, OrderStatus, type OrderStatusWithLiterals, type OrderTaxBreakdown, type OrderTaxInfo, type PaymentCanceled, type PaymentCanceledPaymentDetailsOneOf, type PaymentDeclined, type PaymentDeclinedPaymentDetailsOneOf, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentPending, type PaymentPendingPaymentDetailsOneOf, type PaymentRefundFailed, type PaymentRefunded, PaymentStatus, type PaymentStatusWithLiterals, type PhysicalProperties, type PickupAddress, type PickupDetails, PickupDetailsPickupMethod, type PickupDetailsPickupMethodWithLiterals, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type Price, type PriceDescription, type PriceSummary, type ProductName, type QueryDraftOrdersRequest, type QueryDraftOrdersResponse, type ReceiptCreated, type ReceiptCreatedReceiptInfoOneOf, type ReceiptSent, type ReceiptSentReceiptInfoOneOf, type RecipientInfoChangedDetails, type RecipientInfoDetails, type RecipientInfoDetailsChangeTypeOneOf, type RefundInitiated, type RefundedAsStoreCredit, type RefundedPayment, type RefundedPaymentKindOneOf, type RegularPayment, type RegularPaymentPaymentMethodDetailsOneOf, type RegularPaymentRefund, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type SavedPaymentMethod, type SecuredMedia, type SetAdditionalFeesApplicationErrors, type SetAdditionalFeesRequest, type SetAdditionalFeesResponse, type SetBillingInfoApplicationErrors, type SetBillingInfoOptions, type SetBillingInfoRequest, type SetBillingInfoResponse, type SetBusinessLocationApplicationErrors, type SetBusinessLocationOptions, type SetBusinessLocationRequest, type SetBusinessLocationResponse, type SetBuyerInfoApplicationErrors, type SetBuyerInfoOptions, type SetBuyerInfoRequest, type SetBuyerInfoResponse, type SetDiscountsApplicationErrors, type SetDiscountsRequest, type SetDiscountsResponse, type SetRecipientInfoApplicationErrors, type SetRecipientInfoOptions, type SetRecipientInfoRequest, type SetRecipientInfoResponse, type SetShippingInfoApplicationErrors, type SetShippingInfoOptions, type SetShippingInfoRequest, type SetShippingInfoResponse, type SetTaxExemptionApplicationErrors, type SetTaxExemptionOptions, type SetTaxExemptionRequest, type SetTaxExemptionResponse, type ShippingChangedDetails, type ShippingDetails, type ShippingDetailsChangeTypeOneOf, type ShippingInformation, type ShippingInformationChange, type ShippingOption, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, SourceType, type SourceTypeWithLiterals, type StreetAddress, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, type SubscriptionTitle, type SystemError, type TagList, type Tags, type TaxDetails, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TotalPriceChange, type TranslatableString, type TranslatedValue, type UpdateExtendedFieldsApplicationErrors, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateLineItemsApplicationErrors, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type UpdateShippingInfoRequest, type UpdateShippingInfoResponse, type V1BalanceSummary, type V1CreatedBy, type V1CreatedByStringOneOf, type V1DeliveryLogistics, type V1DeliveryLogisticsAddressOneOf, type V1DeliveryTimeSlot, type V1PickupDetails, type V1ShippingInformation, type V1ShippingPrice, type ValidationError, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, type WixReceipt, 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 };
5144
+ export { type ActionEvent, type Activity, type ActivityContentOneOf, ActivityType, type ActivityTypeWithLiterals, type AddLineItemsToDraftOrderApplicationErrors, type AddLineItemsToDraftOrderOptions, type AddLineItemsToDraftOrderRequest, type AddLineItemsToDraftOrderResponse, type AdditionalFee, type AdditionalFeeDetails, type AdditionalFeeOption, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, type AppliedDiscountDiscountTypeWithLiterals, AttributionSource, type AttributionSourceWithLiterals, type AuthorizedPaymentCaptured, type AuthorizedPaymentCreated, type AuthorizedPaymentVoided, type Balance, type BalanceSummary, type BaseEventMetadata, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BillingChangedDetails, type BillingDetails, type BillingDetailsChangeTypeOneOf, type BusinessLocationChangedDetails, type BusinessLocationDetails, type BusinessLocationDetailsChangeTypeOneOf, type BuyerChangedDetails, type BuyerDetails, type BuyerDetailsChangeTypeOneOf, type BuyerInfo, type BuyerInfoIdOneOf, type CalculatedDraftOrder, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type CatalogReference, type CatalogReferenceLineItem, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, type ChargebackCreated, type ChargebackReversed, type Color, type CommitDraftOrderApplicationErrors, type CommitDraftOrderOptions, type CommitDraftOrderRequest, type CommitDraftOrderResponse, type Coupon, type CreateCustomAdditionalFeesApplicationErrors, type CreateCustomAdditionalFeesOptions, type CreateCustomAdditionalFeesRequest, type CreateCustomAdditionalFeesResponse, type CreateCustomDiscountsApplicationErrors, type CreateCustomDiscountsOptions, type CreateCustomDiscountsRequest, type CreateCustomDiscountsResponse, type CreateDraftOrderApplicationErrors, type CreateDraftOrderRequest, type CreateDraftOrderResponse, type CreateEmptyDraftOrderApplicationErrors, type CreateEmptyDraftOrderRequest, type CreateEmptyDraftOrderResponse, type CreateOrderFromDraftApplicationErrors, type CreateOrderFromDraftOptions, type CreateOrderFromDraftRequest, type CreateOrderFromDraftResponse, type CreatedBy, type CreatedByStringOneOf, type CreditCardDetails, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomActivity, type CustomField, type CustomLineItem, type DeleteCustomAdditionalFeesApplicationErrors, type DeleteCustomAdditionalFeesRequest, type DeleteCustomAdditionalFeesResponse, type DeleteCustomDiscountsApplicationErrors, type DeleteCustomDiscountsRequest, type DeleteCustomDiscountsResponse, type DeleteDraftOrderApplicationErrors, type DeleteDraftOrderRequest, type DeleteDraftOrderResponse, type DeliveryLogistics, type DeliveryTimeSlot, type DepositDetails, type DepositDetailsDepositOneOf, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DescriptionLinesOverride, type Details, type DetailsKindOneOf, type DigitalFile, type DiscountDetails, type DiscountOption, type DiscountOptionDiscountAmountOneOf, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DraftOrder, type DraftOrderChangesApplied, type DraftOrderCommitSettings, type DraftOrderCreatedEnvelope, type DraftOrderDeletedEnvelope, type DraftOrderUpdatedEnvelope, type DraftOrdersQueryBuilder, type DraftOrdersQueryResult, EditingStatus, type EditingStatusWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type ExternalReceipt, type FieldViolation, FileType, type FileTypeWithLiterals, type FocalPoint, type FreeTrialPeriod, FulfillmentStatus, type FulfillmentStatusWithLiterals, type FulfillmentStatusesAggregate, type FullAddressContactDetails, type GetDraftOrderApplicationErrors, type GetDraftOrderRequest, type GetDraftOrderResponse, type GetOrderDraftabilityStatusRequest, type GetOrderDraftabilityStatusResponse, type GiftCardPaymentRefund, type IdAndApplied, type IdentificationData, type IdentificationDataIdOneOf, type InventoryUpdate, type ItemChangedDetails, type ItemDetails, type ItemDetailsChangeTypeOneOf, type ItemModifier, type ItemTaxFullDetails, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemAmount, type LineItemChangeDetails, type LineItemChanges, type LineItemDescriptionLineChange, type LineItemDiscount, type LineItemExchangeData, type LineItemModifiersChange, type LineItemPriceChange, type LineItemProductNameChange, type LineItemQuantityChange, LineItemQuantityChangeType, type LineItemQuantityChangeTypeWithLiterals, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type ManagedAdditionalFee, type ManagedDiscount, type ManagedLineItem, type MembershipPaymentRefund, type MerchantComment, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type ModifiersGroupsOverride, type NewExchangeOrderCreated, NonDraftableReason, type NonDraftableReasonWithLiterals, type Order, type OrderChange, type OrderChangeValueOneOf, type OrderCreateNotifications, type OrderCreateSettings, type OrderCreatedFromExchange, type OrderLineItem, type OrderRefunded, OrderStatus, type OrderStatusWithLiterals, type OrderTaxBreakdown, type OrderTaxInfo, type PaymentCanceled, type PaymentCanceledPaymentDetailsOneOf, type PaymentDeclined, type PaymentDeclinedPaymentDetailsOneOf, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentPending, type PaymentPendingPaymentDetailsOneOf, type PaymentRefundFailed, type PaymentRefunded, PaymentStatus, type PaymentStatusWithLiterals, type PhysicalProperties, type PickupAddress, type PickupDetails, PickupDetailsPickupMethod, type PickupDetailsPickupMethodWithLiterals, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type Price, type PriceDescription, type PriceSummary, type ProductName, type QueryDraftOrdersRequest, type QueryDraftOrdersResponse, type ReceiptCreated, type ReceiptCreatedReceiptInfoOneOf, type ReceiptSent, type ReceiptSentReceiptInfoOneOf, type RecipientInfoChangedDetails, type RecipientInfoDetails, type RecipientInfoDetailsChangeTypeOneOf, type RefundInitiated, type RefundedAsStoreCredit, type RefundedPayment, type RefundedPaymentKindOneOf, type RegularPayment, type RegularPaymentPaymentMethodDetailsOneOf, type RegularPaymentRefund, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type SavedPaymentMethod, type SecuredMedia, type SetAdditionalFeesApplicationErrors, type SetAdditionalFeesRequest, type SetAdditionalFeesResponse, type SetBillingInfoApplicationErrors, type SetBillingInfoOptions, type SetBillingInfoRequest, type SetBillingInfoResponse, type SetBusinessLocationApplicationErrors, type SetBusinessLocationOptions, type SetBusinessLocationRequest, type SetBusinessLocationResponse, type SetBuyerInfoApplicationErrors, type SetBuyerInfoOptions, type SetBuyerInfoRequest, type SetBuyerInfoResponse, type SetDepositApplicationErrors, type SetDepositOptions, type SetDepositRequest, type SetDepositResponse, type SetDiscountsApplicationErrors, type SetDiscountsRequest, type SetDiscountsResponse, type SetRecipientInfoApplicationErrors, type SetRecipientInfoOptions, type SetRecipientInfoRequest, type SetRecipientInfoResponse, type SetShippingInfoApplicationErrors, type SetShippingInfoOptions, type SetShippingInfoRequest, type SetShippingInfoResponse, type SetTaxExemptionApplicationErrors, type SetTaxExemptionOptions, type SetTaxExemptionRequest, type SetTaxExemptionResponse, type ShippingChangedDetails, type ShippingDetails, type ShippingDetailsChangeTypeOneOf, type ShippingInformation, type ShippingInformationChange, type ShippingOption, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, SourceType, type SourceTypeWithLiterals, type StreetAddress, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, type SubscriptionTitle, type SystemError, type TagList, type Tags, type TaxDetails, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TotalPriceChange, type TranslatableString, type TranslatedValue, type UpdateExtendedFieldsApplicationErrors, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateLineItemsApplicationErrors, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type UpdateShippingInfoRequest, type UpdateShippingInfoResponse, type V1BalanceSummary, type V1CreatedBy, type V1CreatedByStringOneOf, type V1DeliveryLogistics, type V1DeliveryLogisticsAddressOneOf, type V1DeliveryTimeSlot, type V1PickupDetails, type V1ShippingInformation, type V1ShippingPrice, type ValidationError, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, type WixReceipt, 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 };
@@ -602,6 +602,143 @@ function updateLineItems(payload) {
602
602
  }
603
603
  return __updateLineItems;
604
604
  }
605
+ function setDeposit(payload) {
606
+ function __setDeposit({ host }) {
607
+ const metadata = {
608
+ entityFqdn: "wix.ecom.v1.draft_order",
609
+ method: "POST",
610
+ methodFqn: "com.wix.ecom.orders.draft.v1.DraftOrders.SetDeposit",
611
+ packageName: PACKAGE_NAME,
612
+ migrationOptions: {
613
+ optInTransformResponse: true
614
+ },
615
+ url: resolveComWixEcomOrdersDraftV1DraftOrdersUrl({
616
+ protoPath: "/v1/draft-orders/{draftOrderId}/set-deposit",
617
+ data: payload,
618
+ host
619
+ }),
620
+ data: payload,
621
+ transformResponse: (payload2) => transformPaths(payload2, [
622
+ {
623
+ transformFn: transformRESTTimestampToSDKTimestamp,
624
+ paths: [
625
+ { path: "calculatedDraftOrder.draftOrder.createdDate" },
626
+ { path: "calculatedDraftOrder.draftOrder.updatedDate" },
627
+ {
628
+ path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
629
+ },
630
+ {
631
+ path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.digitalFile.expirationDate"
632
+ },
633
+ {
634
+ path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
635
+ },
636
+ {
637
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliverByDate"
638
+ },
639
+ {
640
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.from"
641
+ },
642
+ {
643
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.to"
644
+ },
645
+ {
646
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliverByDate"
647
+ },
648
+ {
649
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.from"
650
+ },
651
+ {
652
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.to"
653
+ },
654
+ {
655
+ path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.from"
656
+ },
657
+ {
658
+ path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.to"
659
+ }
660
+ ]
661
+ },
662
+ {
663
+ transformFn: transformRESTFloatToSDKFloat,
664
+ paths: [
665
+ {
666
+ path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.x"
667
+ },
668
+ {
669
+ path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.y"
670
+ },
671
+ {
672
+ path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.physicalProperties.weight"
673
+ },
674
+ {
675
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.latitude"
676
+ },
677
+ {
678
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.longitude"
679
+ },
680
+ {
681
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.latitude"
682
+ },
683
+ {
684
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.longitude"
685
+ },
686
+ {
687
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
688
+ },
689
+ {
690
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
691
+ },
692
+ {
693
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
694
+ },
695
+ {
696
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
697
+ },
698
+ {
699
+ path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.latitude"
700
+ },
701
+ {
702
+ path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.longitude"
703
+ },
704
+ {
705
+ path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.latitude"
706
+ },
707
+ {
708
+ path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.longitude"
709
+ },
710
+ {
711
+ path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.latitude"
712
+ },
713
+ {
714
+ path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.longitude"
715
+ },
716
+ {
717
+ path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.latitude"
718
+ },
719
+ {
720
+ path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.longitude"
721
+ },
722
+ {
723
+ path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.latitude"
724
+ },
725
+ {
726
+ path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.longitude"
727
+ },
728
+ {
729
+ path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
730
+ },
731
+ {
732
+ path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
733
+ }
734
+ ]
735
+ }
736
+ ])
737
+ };
738
+ return metadata;
739
+ }
740
+ return __setDeposit;
741
+ }
605
742
  function setDiscounts(payload) {
606
743
  function __setDiscounts({ host }) {
607
744
  const metadata = {
@@ -3606,6 +3743,79 @@ async function updateLineItems2(draftOrderId, lineItemChanges) {
3606
3743
  throw transformedError;
3607
3744
  }
3608
3745
  }
3746
+ async function setDeposit2(draftOrderId, options) {
3747
+ const { httpClient, sideEffects } = arguments[2];
3748
+ const payload = renameKeysFromSDKRequestToRESTRequest({
3749
+ draftOrderId,
3750
+ depositDetails: options?.depositDetails
3751
+ });
3752
+ const reqOpts = setDeposit(payload);
3753
+ sideEffects?.onSiteCall?.();
3754
+ try {
3755
+ const result = await httpClient.request(reqOpts);
3756
+ sideEffects?.onSuccess?.(result);
3757
+ return renameKeysFromRESTResponseToSDKResponse(
3758
+ transformPaths2(result.data, [
3759
+ {
3760
+ transformFn: transformRESTImageToSDKImage,
3761
+ paths: [
3762
+ {
3763
+ path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image"
3764
+ }
3765
+ ]
3766
+ },
3767
+ {
3768
+ transformFn: transformRESTAddressToSDKAddress,
3769
+ paths: [
3770
+ {
3771
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address"
3772
+ },
3773
+ {
3774
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address"
3775
+ },
3776
+ {
3777
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address"
3778
+ },
3779
+ {
3780
+ path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address"
3781
+ },
3782
+ { path: "calculatedDraftOrder.draftOrder.billingInfo.address" },
3783
+ {
3784
+ path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address"
3785
+ },
3786
+ {
3787
+ path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address"
3788
+ },
3789
+ {
3790
+ path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address"
3791
+ },
3792
+ {
3793
+ path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address"
3794
+ },
3795
+ {
3796
+ path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address"
3797
+ }
3798
+ ]
3799
+ }
3800
+ ])
3801
+ );
3802
+ } catch (err) {
3803
+ const transformedError = sdkTransformError(
3804
+ err,
3805
+ {
3806
+ spreadPathsToArguments: {},
3807
+ explicitPathsToArguments: {
3808
+ draftOrderId: "$[0]",
3809
+ depositDetails: "$[1].depositDetails"
3810
+ },
3811
+ singleArgumentUnchanged: false
3812
+ },
3813
+ ["draftOrderId", "options"]
3814
+ );
3815
+ sideEffects?.onError?.(err);
3816
+ throw transformedError;
3817
+ }
3818
+ }
3609
3819
  async function setDiscounts2(draftOrderId, discounts) {
3610
3820
  const { httpClient, sideEffects } = arguments[2];
3611
3821
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -4956,6 +5166,7 @@ export {
4956
5166
  setBillingInfo2 as setBillingInfo,
4957
5167
  setBusinessLocation2 as setBusinessLocation,
4958
5168
  setBuyerInfo2 as setBuyerInfo,
5169
+ setDeposit2 as setDeposit,
4959
5170
  setDiscounts2 as setDiscounts,
4960
5171
  setRecipientInfo2 as setRecipientInfo,
4961
5172
  setShippingInfo2 as setShippingInfo,