@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.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +221 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +60 -1
- package/build/cjs/index.typings.js +212 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +47 -2
- package/build/cjs/meta.js +157 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +220 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +60 -1
- package/build/es/index.typings.mjs +211 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +47 -2
- package/build/es/meta.mjs +156 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +23 -3
- package/build/internal/cjs/index.js +221 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +90 -1
- package/build/internal/cjs/index.typings.js +212 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +47 -2
- package/build/internal/cjs/meta.js +157 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +23 -3
- package/build/internal/es/index.mjs +220 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +90 -1
- package/build/internal/es/index.typings.mjs +211 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +47 -2
- package/build/internal/es/meta.mjs +156 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { CreateDraftOrderResponse, CreateDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, AddLineItemsToDraftOrderApplicationErrors, LineItemChangeDetails, UpdateLineItemsResponse, UpdateLineItemsApplicationErrors, IdAndApplied, SetDiscountsResponse, SetDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteCustomDiscountsApplicationErrors, SetAdditionalFeesResponse, SetAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomAdditionalFeesApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetShippingInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetBuyerInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetRecipientInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBillingInfoApplicationErrors, GetDraftOrderResponse, GetDraftOrderApplicationErrors, GetOrderDraftabilityStatusResponse, CommitDraftOrderOptions, CommitDraftOrderResponse, CommitDraftOrderApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, CreateOrderFromDraftApplicationErrors, DeleteDraftOrderApplicationErrors, DraftOrdersQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsApplicationErrors, SetTaxExemptionOptions, SetTaxExemptionResponse, SetTaxExemptionApplicationErrors, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBusinessLocationApplicationErrors, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope } from './index.typings.js';
|
|
3
|
-
export { ActionEvent, Activity, ActivityContentOneOf, ActivityType, ActivityTypeWithLiterals, AddLineItemsToDraftOrderRequest, AdditionalFee, AdditionalFeeDetails, AdditionalFeeOption, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, AppliedDiscountDiscountTypeWithLiterals, AttributionSource, AttributionSourceWithLiterals, AuthorizedPaymentCaptured, AuthorizedPaymentCreated, AuthorizedPaymentVoided, Balance, BalanceSummary, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BusinessLocationChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, BuyerChangedDetails, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerInfo, BuyerInfoIdOneOf, CalculatedDraftOrder, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CatalogReference, CatalogReferenceLineItem, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargebackCreated, ChargebackReversed, Color, CommitDraftOrderRequest, Coupon, CreateCustomAdditionalFeesRequest, CreateCustomDiscountsRequest, CreateDraftOrderRequest, CreateEmptyDraftOrderRequest, CreateOrderFromDraftRequest, CreatedBy, CreatedByStringOneOf, CreditCardDetails, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomActivity, CustomField, CustomLineItem, DeleteCustomAdditionalFeesRequest, DeleteCustomDiscountsRequest, DeleteDraftOrderRequest, DeleteDraftOrderResponse, DeliveryLogistics, DeliveryTimeSlot, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, DescriptionLinesOverride, Details, DetailsKindOneOf, DigitalFile, DiscountDetails, DiscountOption, DiscountOptionDiscountAmountOneOf, DiscountReason, DiscountReasonWithLiterals, DiscountRule, DiscountRuleName, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DraftOrder, DraftOrderChangesApplied, DraftOrderCommitSettings, DraftOrdersQueryResult, EditingStatus, EditingStatusWithLiterals, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReceipt, FieldViolation, FileType, FileTypeWithLiterals, FocalPoint, FreeTrialPeriod, FulfillmentStatus, FulfillmentStatusWithLiterals, FulfillmentStatusesAggregate, FullAddressContactDetails, GetDraftOrderRequest, GetOrderDraftabilityStatusRequest, GiftCardPaymentRefund, IdentificationData, IdentificationDataIdOneOf, InventoryUpdate, ItemChangedDetails, ItemDetails, ItemDetailsChangeTypeOneOf, ItemModifier, ItemTaxFullDetails, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, ItemTypeItemTypeWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LineItemAmount, LineItemChanges, LineItemDescriptionLineChange, LineItemDiscount, LineItemExchangeData, LineItemModifiersChange, LineItemPriceChange, LineItemProductNameChange, LineItemQuantityChange, LineItemQuantityChangeType, LineItemQuantityChangeTypeWithLiterals, LineItemTaxBreakdown, LineItemTaxInfo, Location, LocationAndQuantity, ManagedAdditionalFee, ManagedDiscount, ManagedLineItem, MembershipPaymentRefund, MerchantComment, MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf, MessageEnvelope, ModifierGroup, ModifiersGroupsOverride, NewExchangeOrderCreated, NonDraftableReason, NonDraftableReasonWithLiterals, Order, OrderChange, OrderChangeValueOneOf, OrderCreateNotifications, OrderCreateSettings, OrderCreatedFromExchange, OrderLineItem, OrderRefunded, OrderStatus, OrderStatusWithLiterals, OrderTaxBreakdown, OrderTaxInfo, PaymentCanceled, PaymentCanceledPaymentDetailsOneOf, PaymentDeclined, PaymentDeclinedPaymentDetailsOneOf, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentPending, PaymentPendingPaymentDetailsOneOf, PaymentRefundFailed, PaymentRefunded, PaymentStatus, PaymentStatusWithLiterals, PhysicalProperties, PickupAddress, PickupDetails, PickupDetailsPickupMethod, PickupDetailsPickupMethodWithLiterals, PickupMethod, PickupMethodWithLiterals, PlainTextValue, Price, PriceDescription, PriceSummary, ProductName, QueryDraftOrdersRequest, QueryDraftOrdersResponse, ReceiptCreated, ReceiptCreatedReceiptInfoOneOf, ReceiptSent, ReceiptSentReceiptInfoOneOf, RecipientInfoChangedDetails, RecipientInfoDetails, RecipientInfoDetailsChangeTypeOneOf, RefundInitiated, RefundedAsStoreCredit, RefundedPayment, RefundedPaymentKindOneOf, RegularPayment, RegularPaymentPaymentMethodDetailsOneOf, RegularPaymentRefund, RestoreInfo, RuleType, RuleTypeWithLiterals, SavedPaymentMethod, SecuredMedia, SetAdditionalFeesRequest, SetBillingInfoRequest, SetBusinessLocationRequest, SetBuyerInfoRequest, SetDiscountsRequest, SetRecipientInfoRequest, SetShippingInfoRequest, SetTaxExemptionRequest, ShippingChangedDetails, ShippingDetails, ShippingDetailsChangeTypeOneOf, ShippingInformation, ShippingInformationChange, ShippingOption, ShippingPrice, ShippingRegion, SortOrder, SortOrderWithLiterals, Sorting, SourceType, SourceTypeWithLiterals, StreetAddress, SubscriptionDescription, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionInfo, SubscriptionSettings, SubscriptionTitle, SystemError, TagList, Tags, TaxDetails, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, TotalPriceChange, TranslatableString, TranslatedValue, UpdateExtendedFieldsRequest, UpdateLineItemsRequest, UpdateShippingInfoRequest, UpdateShippingInfoResponse, V1BalanceSummary, V1CreatedBy, V1CreatedByStringOneOf, V1DeliveryLogistics, V1DeliveryLogisticsAddressOneOf, V1DeliveryTimeSlot, V1PickupDetails, V1ShippingInformation, V1ShippingPrice, ValidationError, VatId, VatType, VatTypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals, WixReceipt } from './index.typings.js';
|
|
2
|
+
import { CreateDraftOrderResponse, CreateDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, AddLineItemsToDraftOrderApplicationErrors, LineItemChangeDetails, UpdateLineItemsResponse, UpdateLineItemsApplicationErrors, SetDepositOptions, SetDepositResponse, SetDepositApplicationErrors, IdAndApplied, SetDiscountsResponse, SetDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteCustomDiscountsApplicationErrors, SetAdditionalFeesResponse, SetAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomAdditionalFeesApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetShippingInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetBuyerInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetRecipientInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBillingInfoApplicationErrors, GetDraftOrderResponse, GetDraftOrderApplicationErrors, GetOrderDraftabilityStatusResponse, CommitDraftOrderOptions, CommitDraftOrderResponse, CommitDraftOrderApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, CreateOrderFromDraftApplicationErrors, DeleteDraftOrderApplicationErrors, DraftOrdersQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsApplicationErrors, SetTaxExemptionOptions, SetTaxExemptionResponse, SetTaxExemptionApplicationErrors, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBusinessLocationApplicationErrors, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, Activity, ActivityContentOneOf, ActivityType, ActivityTypeWithLiterals, AddLineItemsToDraftOrderRequest, AdditionalFee, AdditionalFeeDetails, AdditionalFeeOption, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, AppliedDiscountDiscountTypeWithLiterals, AttributionSource, AttributionSourceWithLiterals, AuthorizedPaymentCaptured, AuthorizedPaymentCreated, AuthorizedPaymentVoided, Balance, BalanceSummary, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BusinessLocationChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, BuyerChangedDetails, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerInfo, BuyerInfoIdOneOf, CalculatedDraftOrder, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CatalogReference, CatalogReferenceLineItem, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargebackCreated, ChargebackReversed, Color, CommitDraftOrderRequest, Coupon, CreateCustomAdditionalFeesRequest, CreateCustomDiscountsRequest, CreateDraftOrderRequest, CreateEmptyDraftOrderRequest, CreateOrderFromDraftRequest, CreatedBy, CreatedByStringOneOf, CreditCardDetails, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomActivity, CustomField, CustomLineItem, DeleteCustomAdditionalFeesRequest, DeleteCustomDiscountsRequest, DeleteDraftOrderRequest, DeleteDraftOrderResponse, DeliveryLogistics, DeliveryTimeSlot, DepositDetails, DepositDetailsDepositOneOf, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, DescriptionLinesOverride, Details, DetailsKindOneOf, DigitalFile, DiscountDetails, DiscountOption, DiscountOptionDiscountAmountOneOf, DiscountReason, DiscountReasonWithLiterals, DiscountRule, DiscountRuleName, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DraftOrder, DraftOrderChangesApplied, DraftOrderCommitSettings, DraftOrdersQueryResult, EditingStatus, EditingStatusWithLiterals, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReceipt, FieldViolation, FileType, FileTypeWithLiterals, FocalPoint, FreeTrialPeriod, FulfillmentStatus, FulfillmentStatusWithLiterals, FulfillmentStatusesAggregate, FullAddressContactDetails, GetDraftOrderRequest, GetOrderDraftabilityStatusRequest, GiftCardPaymentRefund, IdentificationData, IdentificationDataIdOneOf, InventoryUpdate, ItemChangedDetails, ItemDetails, ItemDetailsChangeTypeOneOf, ItemModifier, ItemTaxFullDetails, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, ItemTypeItemTypeWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LineItemAmount, LineItemChanges, LineItemDescriptionLineChange, LineItemDiscount, LineItemExchangeData, LineItemModifiersChange, LineItemPriceChange, LineItemProductNameChange, LineItemQuantityChange, LineItemQuantityChangeType, LineItemQuantityChangeTypeWithLiterals, LineItemTaxBreakdown, LineItemTaxInfo, Location, LocationAndQuantity, ManagedAdditionalFee, ManagedDiscount, ManagedLineItem, MembershipPaymentRefund, MerchantComment, MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf, MessageEnvelope, ModifierGroup, ModifiersGroupsOverride, NewExchangeOrderCreated, NonDraftableReason, NonDraftableReasonWithLiterals, Order, OrderChange, OrderChangeValueOneOf, OrderCreateNotifications, OrderCreateSettings, OrderCreatedFromExchange, OrderLineItem, OrderRefunded, OrderStatus, OrderStatusWithLiterals, OrderTaxBreakdown, OrderTaxInfo, PaymentCanceled, PaymentCanceledPaymentDetailsOneOf, PaymentDeclined, PaymentDeclinedPaymentDetailsOneOf, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentPending, PaymentPendingPaymentDetailsOneOf, PaymentRefundFailed, PaymentRefunded, PaymentStatus, PaymentStatusWithLiterals, PhysicalProperties, PickupAddress, PickupDetails, PickupDetailsPickupMethod, PickupDetailsPickupMethodWithLiterals, PickupMethod, PickupMethodWithLiterals, PlainTextValue, Price, PriceDescription, PriceSummary, ProductName, QueryDraftOrdersRequest, QueryDraftOrdersResponse, ReceiptCreated, ReceiptCreatedReceiptInfoOneOf, ReceiptSent, ReceiptSentReceiptInfoOneOf, RecipientInfoChangedDetails, RecipientInfoDetails, RecipientInfoDetailsChangeTypeOneOf, RefundInitiated, RefundedAsStoreCredit, RefundedPayment, RefundedPaymentKindOneOf, RegularPayment, RegularPaymentPaymentMethodDetailsOneOf, RegularPaymentRefund, RestoreInfo, RuleType, RuleTypeWithLiterals, SavedPaymentMethod, SecuredMedia, SetAdditionalFeesRequest, SetBillingInfoRequest, SetBusinessLocationRequest, SetBuyerInfoRequest, SetDepositRequest, SetDiscountsRequest, SetRecipientInfoRequest, SetShippingInfoRequest, SetTaxExemptionRequest, ShippingChangedDetails, ShippingDetails, ShippingDetailsChangeTypeOneOf, ShippingInformation, ShippingInformationChange, ShippingOption, ShippingPrice, ShippingRegion, SortOrder, SortOrderWithLiterals, Sorting, SourceType, SourceTypeWithLiterals, StreetAddress, SubscriptionDescription, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionInfo, SubscriptionSettings, SubscriptionTitle, SystemError, TagList, Tags, TaxDetails, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, TotalPriceChange, TranslatableString, TranslatedValue, UpdateExtendedFieldsRequest, UpdateLineItemsRequest, UpdateShippingInfoRequest, UpdateShippingInfoResponse, V1BalanceSummary, V1CreatedBy, V1CreatedByStringOneOf, V1DeliveryLogistics, V1DeliveryLogisticsAddressOneOf, V1DeliveryTimeSlot, V1PickupDetails, V1ShippingInformation, V1ShippingPrice, ValidationError, VatId, VatType, VatTypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals, WixReceipt } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createDraftOrder$1(httpClient: HttpClient): CreateDraftOrderSignature;
|
|
6
6
|
interface CreateDraftOrderSignature {
|
|
@@ -53,6 +53,24 @@ interface UpdateLineItemsSignature {
|
|
|
53
53
|
__applicationErrorsType?: UpdateLineItemsApplicationErrors;
|
|
54
54
|
}>;
|
|
55
55
|
}
|
|
56
|
+
/** @internal */
|
|
57
|
+
declare function setDeposit$1(httpClient: HttpClient): SetDepositSignature;
|
|
58
|
+
interface SetDepositSignature {
|
|
59
|
+
/**
|
|
60
|
+
* Sets deposit requirements on a draft order.
|
|
61
|
+
*
|
|
62
|
+
* Use this method to configure partial payment options where customers pay a portion upfront
|
|
63
|
+
* and the remainder at a later time. Deposits can be specified as a fixed amount or percentage.
|
|
64
|
+
* Feature supported only in create order flow and not in edit order flow.
|
|
65
|
+
*
|
|
66
|
+
* When applied, prevents order from becoming APPROVED until required amount is PAID.
|
|
67
|
+
* When unapplied, deposits will be cleared from draft order.
|
|
68
|
+
* @param - Draft order ID.
|
|
69
|
+
*/
|
|
70
|
+
(draftOrderId: string, options?: SetDepositOptions): Promise<NonNullablePaths<SetDepositResponse, `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> & {
|
|
71
|
+
__applicationErrorsType?: SetDepositApplicationErrors;
|
|
72
|
+
}>;
|
|
73
|
+
}
|
|
56
74
|
declare function setDiscounts$1(httpClient: HttpClient): SetDiscountsSignature;
|
|
57
75
|
interface SetDiscountsSignature {
|
|
58
76
|
/**
|
|
@@ -298,6 +316,8 @@ declare const createDraftOrder: MaybeContext<BuildRESTFunction<typeof createDraf
|
|
|
298
316
|
declare const createEmptyDraftOrder: MaybeContext<BuildRESTFunction<typeof createEmptyDraftOrder$1> & typeof createEmptyDraftOrder$1>;
|
|
299
317
|
declare const addLineItemsToDraftOrder: MaybeContext<BuildRESTFunction<typeof addLineItemsToDraftOrder$1> & typeof addLineItemsToDraftOrder$1>;
|
|
300
318
|
declare const updateLineItems: MaybeContext<BuildRESTFunction<typeof updateLineItems$1> & typeof updateLineItems$1>;
|
|
319
|
+
/** @internal */
|
|
320
|
+
declare const setDeposit: MaybeContext<BuildRESTFunction<typeof setDeposit$1> & typeof setDeposit$1>;
|
|
301
321
|
declare const setDiscounts: MaybeContext<BuildRESTFunction<typeof setDiscounts$1> & typeof setDiscounts$1>;
|
|
302
322
|
declare const createCustomDiscounts: MaybeContext<BuildRESTFunction<typeof createCustomDiscounts$1> & typeof createCustomDiscounts$1>;
|
|
303
323
|
declare const deleteCustomDiscounts: MaybeContext<BuildRESTFunction<typeof deleteCustomDiscounts$1> & typeof deleteCustomDiscounts$1>;
|
|
@@ -330,4 +350,4 @@ declare const onDraftOrderDeleted: BuildEventDefinition<typeof onDraftOrderDelet
|
|
|
330
350
|
*/
|
|
331
351
|
declare const onDraftOrderUpdated: BuildEventDefinition<typeof onDraftOrderUpdated$1> & typeof onDraftOrderUpdated$1;
|
|
332
352
|
|
|
333
|
-
export { AddLineItemsToDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, CommitDraftOrderApplicationErrors, CommitDraftOrderOptions, CommitDraftOrderResponse, CreateCustomAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateDraftOrderApplicationErrors, CreateDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateOrderFromDraftApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, DeleteCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteDraftOrderApplicationErrors, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, DraftOrdersQueryBuilder, GetDraftOrderApplicationErrors, GetDraftOrderResponse, GetOrderDraftabilityStatusResponse, IdAndApplied, LineItemChangeDetails, SetAdditionalFeesApplicationErrors, SetAdditionalFeesResponse, SetBillingInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBusinessLocationApplicationErrors, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBuyerInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetDiscountsApplicationErrors, SetDiscountsResponse, SetRecipientInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetShippingInfoApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetTaxExemptionApplicationErrors, SetTaxExemptionOptions, SetTaxExemptionResponse, UpdateExtendedFieldsApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateLineItemsApplicationErrors, UpdateLineItemsResponse, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, onDraftOrderCreated, onDraftOrderDeleted, onDraftOrderUpdated, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateExtendedFields, updateLineItems };
|
|
353
|
+
export { AddLineItemsToDraftOrderApplicationErrors, AddLineItemsToDraftOrderOptions, AddLineItemsToDraftOrderResponse, CommitDraftOrderApplicationErrors, CommitDraftOrderOptions, CommitDraftOrderResponse, CreateCustomAdditionalFeesApplicationErrors, CreateCustomAdditionalFeesOptions, CreateCustomAdditionalFeesResponse, CreateCustomDiscountsApplicationErrors, CreateCustomDiscountsOptions, CreateCustomDiscountsResponse, CreateDraftOrderApplicationErrors, CreateDraftOrderResponse, CreateEmptyDraftOrderApplicationErrors, CreateEmptyDraftOrderResponse, CreateOrderFromDraftApplicationErrors, CreateOrderFromDraftOptions, CreateOrderFromDraftResponse, DeleteCustomAdditionalFeesApplicationErrors, DeleteCustomAdditionalFeesResponse, DeleteCustomDiscountsApplicationErrors, DeleteCustomDiscountsResponse, DeleteDraftOrderApplicationErrors, DraftOrderCreatedEnvelope, DraftOrderDeletedEnvelope, DraftOrderUpdatedEnvelope, DraftOrdersQueryBuilder, GetDraftOrderApplicationErrors, GetDraftOrderResponse, GetOrderDraftabilityStatusResponse, IdAndApplied, LineItemChangeDetails, SetAdditionalFeesApplicationErrors, SetAdditionalFeesResponse, SetBillingInfoApplicationErrors, SetBillingInfoOptions, SetBillingInfoResponse, SetBusinessLocationApplicationErrors, SetBusinessLocationOptions, SetBusinessLocationResponse, SetBuyerInfoApplicationErrors, SetBuyerInfoOptions, SetBuyerInfoResponse, SetDepositApplicationErrors, SetDepositOptions, SetDepositResponse, SetDiscountsApplicationErrors, SetDiscountsResponse, SetRecipientInfoApplicationErrors, SetRecipientInfoOptions, SetRecipientInfoResponse, SetShippingInfoApplicationErrors, SetShippingInfoOptions, SetShippingInfoResponse, SetTaxExemptionApplicationErrors, SetTaxExemptionOptions, SetTaxExemptionResponse, UpdateExtendedFieldsApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateLineItemsApplicationErrors, UpdateLineItemsResponse, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, onDraftOrderCreated, onDraftOrderDeleted, onDraftOrderUpdated, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDeposit, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateExtendedFields, updateLineItems };
|
|
@@ -68,6 +68,7 @@ __export(index_exports, {
|
|
|
68
68
|
setBillingInfo: () => setBillingInfo4,
|
|
69
69
|
setBusinessLocation: () => setBusinessLocation4,
|
|
70
70
|
setBuyerInfo: () => setBuyerInfo4,
|
|
71
|
+
setDeposit: () => setDeposit4,
|
|
71
72
|
setDiscounts: () => setDiscounts4,
|
|
72
73
|
setRecipientInfo: () => setRecipientInfo4,
|
|
73
74
|
setShippingInfo: () => setShippingInfo4,
|
|
@@ -687,6 +688,143 @@ function updateLineItems(payload) {
|
|
|
687
688
|
}
|
|
688
689
|
return __updateLineItems;
|
|
689
690
|
}
|
|
691
|
+
function setDeposit(payload) {
|
|
692
|
+
function __setDeposit({ host }) {
|
|
693
|
+
const metadata = {
|
|
694
|
+
entityFqdn: "wix.ecom.v1.draft_order",
|
|
695
|
+
method: "POST",
|
|
696
|
+
methodFqn: "com.wix.ecom.orders.draft.v1.DraftOrders.SetDeposit",
|
|
697
|
+
packageName: PACKAGE_NAME,
|
|
698
|
+
migrationOptions: {
|
|
699
|
+
optInTransformResponse: true
|
|
700
|
+
},
|
|
701
|
+
url: resolveComWixEcomOrdersDraftV1DraftOrdersUrl({
|
|
702
|
+
protoPath: "/v1/draft-orders/{draftOrderId}/set-deposit",
|
|
703
|
+
data: payload,
|
|
704
|
+
host
|
|
705
|
+
}),
|
|
706
|
+
data: payload,
|
|
707
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
708
|
+
{
|
|
709
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
710
|
+
paths: [
|
|
711
|
+
{ path: "calculatedDraftOrder.draftOrder.createdDate" },
|
|
712
|
+
{ path: "calculatedDraftOrder.draftOrder.updatedDate" },
|
|
713
|
+
{
|
|
714
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.digitalFile.expirationDate"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliverByDate"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.from"
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.to"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliverByDate"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.to"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.from"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.to"
|
|
745
|
+
}
|
|
746
|
+
]
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
750
|
+
paths: [
|
|
751
|
+
{
|
|
752
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.x"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.y"
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.physicalProperties.weight"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.latitude"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.longitude"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.latitude"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.longitude"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.latitude"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.longitude"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.latitude"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.longitude"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.latitude"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.longitude"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.latitude"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.longitude"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.latitude"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.longitude"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
|
|
819
|
+
}
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
])
|
|
823
|
+
};
|
|
824
|
+
return metadata;
|
|
825
|
+
}
|
|
826
|
+
return __setDeposit;
|
|
827
|
+
}
|
|
690
828
|
function setDiscounts(payload) {
|
|
691
829
|
function __setDiscounts({ host }) {
|
|
692
830
|
const metadata = {
|
|
@@ -3691,6 +3829,79 @@ async function updateLineItems2(draftOrderId, lineItemChanges) {
|
|
|
3691
3829
|
throw transformedError;
|
|
3692
3830
|
}
|
|
3693
3831
|
}
|
|
3832
|
+
async function setDeposit2(draftOrderId, options) {
|
|
3833
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3834
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
3835
|
+
draftOrderId,
|
|
3836
|
+
depositDetails: options?.depositDetails
|
|
3837
|
+
});
|
|
3838
|
+
const reqOpts = setDeposit(payload);
|
|
3839
|
+
sideEffects?.onSiteCall?.();
|
|
3840
|
+
try {
|
|
3841
|
+
const result = await httpClient.request(reqOpts);
|
|
3842
|
+
sideEffects?.onSuccess?.(result);
|
|
3843
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
3844
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
3845
|
+
{
|
|
3846
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
3847
|
+
paths: [
|
|
3848
|
+
{
|
|
3849
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image"
|
|
3850
|
+
}
|
|
3851
|
+
]
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
3855
|
+
paths: [
|
|
3856
|
+
{
|
|
3857
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address"
|
|
3858
|
+
},
|
|
3859
|
+
{
|
|
3860
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address"
|
|
3861
|
+
},
|
|
3862
|
+
{
|
|
3863
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address"
|
|
3864
|
+
},
|
|
3865
|
+
{
|
|
3866
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address"
|
|
3867
|
+
},
|
|
3868
|
+
{ path: "calculatedDraftOrder.draftOrder.billingInfo.address" },
|
|
3869
|
+
{
|
|
3870
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address"
|
|
3871
|
+
},
|
|
3872
|
+
{
|
|
3873
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address"
|
|
3874
|
+
},
|
|
3875
|
+
{
|
|
3876
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address"
|
|
3877
|
+
},
|
|
3878
|
+
{
|
|
3879
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address"
|
|
3880
|
+
},
|
|
3881
|
+
{
|
|
3882
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address"
|
|
3883
|
+
}
|
|
3884
|
+
]
|
|
3885
|
+
}
|
|
3886
|
+
])
|
|
3887
|
+
);
|
|
3888
|
+
} catch (err) {
|
|
3889
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
3890
|
+
err,
|
|
3891
|
+
{
|
|
3892
|
+
spreadPathsToArguments: {},
|
|
3893
|
+
explicitPathsToArguments: {
|
|
3894
|
+
draftOrderId: "$[0]",
|
|
3895
|
+
depositDetails: "$[1].depositDetails"
|
|
3896
|
+
},
|
|
3897
|
+
singleArgumentUnchanged: false
|
|
3898
|
+
},
|
|
3899
|
+
["draftOrderId", "options"]
|
|
3900
|
+
);
|
|
3901
|
+
sideEffects?.onError?.(err);
|
|
3902
|
+
throw transformedError;
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3694
3905
|
async function setDiscounts2(draftOrderId, discounts) {
|
|
3695
3906
|
const { httpClient, sideEffects } = arguments[2];
|
|
3696
3907
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -5026,6 +5237,14 @@ function updateLineItems3(httpClient) {
|
|
|
5026
5237
|
{ httpClient }
|
|
5027
5238
|
);
|
|
5028
5239
|
}
|
|
5240
|
+
function setDeposit3(httpClient) {
|
|
5241
|
+
return (draftOrderId, options) => setDeposit2(
|
|
5242
|
+
draftOrderId,
|
|
5243
|
+
options,
|
|
5244
|
+
// @ts-ignore
|
|
5245
|
+
{ httpClient }
|
|
5246
|
+
);
|
|
5247
|
+
}
|
|
5029
5248
|
function setDiscounts3(httpClient) {
|
|
5030
5249
|
return (draftOrderId, discounts) => setDiscounts2(
|
|
5031
5250
|
draftOrderId,
|
|
@@ -5404,6 +5623,7 @@ var createDraftOrder4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModul
|
|
|
5404
5623
|
var createEmptyDraftOrder4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createEmptyDraftOrder3);
|
|
5405
5624
|
var addLineItemsToDraftOrder4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addLineItemsToDraftOrder3);
|
|
5406
5625
|
var updateLineItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateLineItems3);
|
|
5626
|
+
var setDeposit4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setDeposit3);
|
|
5407
5627
|
var setDiscounts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setDiscounts3);
|
|
5408
5628
|
var createCustomDiscounts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createCustomDiscounts3);
|
|
5409
5629
|
var deleteCustomDiscounts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteCustomDiscounts3);
|
|
@@ -5482,6 +5702,7 @@ var onDraftOrderUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
5482
5702
|
setBillingInfo,
|
|
5483
5703
|
setBusinessLocation,
|
|
5484
5704
|
setBuyerInfo,
|
|
5705
|
+
setDeposit,
|
|
5485
5706
|
setDiscounts,
|
|
5486
5707
|
setRecipientInfo,
|
|
5487
5708
|
setShippingInfo,
|