@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.mjs';
|
|
3
|
-
export { ActionEvent, Activity, ActivityContentOneOf, ActivityType, ActivityTypeWithLiterals, AddLineItemsToDraftOrderRequest, AdditionalFee, AdditionalFeeDetails, AdditionalFeeOption, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, AppliedDiscountDiscountTypeWithLiterals, AttributionSource, AttributionSourceWithLiterals, AuthorizedPaymentCaptured, AuthorizedPaymentCreated, AuthorizedPaymentVoided, Balance, BalanceSummary, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BusinessLocationChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, BuyerChangedDetails, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerInfo, BuyerInfoIdOneOf, CalculatedDraftOrder, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CatalogReference, CatalogReferenceLineItem, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargebackCreated, ChargebackReversed, Color, CommitDraftOrderRequest, Coupon, CreateCustomAdditionalFeesRequest, CreateCustomDiscountsRequest, CreateDraftOrderRequest, CreateEmptyDraftOrderRequest, CreateOrderFromDraftRequest, CreatedBy, CreatedByStringOneOf, CreditCardDetails, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata, 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.mjs';
|
|
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.mjs';
|
|
3
|
+
export { ActionEvent, Activity, ActivityContentOneOf, ActivityType, ActivityTypeWithLiterals, AddLineItemsToDraftOrderRequest, AdditionalFee, AdditionalFeeDetails, AdditionalFeeOption, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, AppliedDiscountDiscountTypeWithLiterals, AttributionSource, AttributionSourceWithLiterals, AuthorizedPaymentCaptured, AuthorizedPaymentCreated, AuthorizedPaymentVoided, Balance, BalanceSummary, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingChangedDetails, BillingDetails, BillingDetailsChangeTypeOneOf, BusinessLocationChangedDetails, BusinessLocationDetails, BusinessLocationDetailsChangeTypeOneOf, BuyerChangedDetails, BuyerDetails, BuyerDetailsChangeTypeOneOf, BuyerInfo, BuyerInfoIdOneOf, CalculatedDraftOrder, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, CarrierError, CarrierErrors, CatalogReference, CatalogReferenceLineItem, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargebackCreated, ChargebackReversed, Color, CommitDraftOrderRequest, Coupon, CreateCustomAdditionalFeesRequest, CreateCustomDiscountsRequest, CreateDraftOrderRequest, CreateEmptyDraftOrderRequest, CreateOrderFromDraftRequest, CreatedBy, CreatedByStringOneOf, CreditCardDetails, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata, 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.mjs';
|
|
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 };
|
|
@@ -611,6 +611,143 @@ function updateLineItems(payload) {
|
|
|
611
611
|
}
|
|
612
612
|
return __updateLineItems;
|
|
613
613
|
}
|
|
614
|
+
function setDeposit(payload) {
|
|
615
|
+
function __setDeposit({ host }) {
|
|
616
|
+
const metadata = {
|
|
617
|
+
entityFqdn: "wix.ecom.v1.draft_order",
|
|
618
|
+
method: "POST",
|
|
619
|
+
methodFqn: "com.wix.ecom.orders.draft.v1.DraftOrders.SetDeposit",
|
|
620
|
+
packageName: PACKAGE_NAME,
|
|
621
|
+
migrationOptions: {
|
|
622
|
+
optInTransformResponse: true
|
|
623
|
+
},
|
|
624
|
+
url: resolveComWixEcomOrdersDraftV1DraftOrdersUrl({
|
|
625
|
+
protoPath: "/v1/draft-orders/{draftOrderId}/set-deposit",
|
|
626
|
+
data: payload,
|
|
627
|
+
host
|
|
628
|
+
}),
|
|
629
|
+
data: payload,
|
|
630
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
631
|
+
{
|
|
632
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
633
|
+
paths: [
|
|
634
|
+
{ path: "calculatedDraftOrder.draftOrder.createdDate" },
|
|
635
|
+
{ path: "calculatedDraftOrder.draftOrder.updatedDate" },
|
|
636
|
+
{
|
|
637
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.digitalFile.expirationDate"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliverByDate"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.from"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.to"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliverByDate"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.to"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.from"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.to"
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
673
|
+
paths: [
|
|
674
|
+
{
|
|
675
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.x"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.y"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.physicalProperties.weight"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.latitude"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.longitude"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.latitude"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.longitude"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.latitude"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.longitude"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.latitude"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.longitude"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.latitude"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.longitude"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.latitude"
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.longitude"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.latitude"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.longitude"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
|
|
742
|
+
}
|
|
743
|
+
]
|
|
744
|
+
}
|
|
745
|
+
])
|
|
746
|
+
};
|
|
747
|
+
return metadata;
|
|
748
|
+
}
|
|
749
|
+
return __setDeposit;
|
|
750
|
+
}
|
|
614
751
|
function setDiscounts(payload) {
|
|
615
752
|
function __setDiscounts({ host }) {
|
|
616
753
|
const metadata = {
|
|
@@ -3615,6 +3752,79 @@ async function updateLineItems2(draftOrderId, lineItemChanges) {
|
|
|
3615
3752
|
throw transformedError;
|
|
3616
3753
|
}
|
|
3617
3754
|
}
|
|
3755
|
+
async function setDeposit2(draftOrderId, options) {
|
|
3756
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3757
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3758
|
+
draftOrderId,
|
|
3759
|
+
depositDetails: options?.depositDetails
|
|
3760
|
+
});
|
|
3761
|
+
const reqOpts = setDeposit(payload);
|
|
3762
|
+
sideEffects?.onSiteCall?.();
|
|
3763
|
+
try {
|
|
3764
|
+
const result = await httpClient.request(reqOpts);
|
|
3765
|
+
sideEffects?.onSuccess?.(result);
|
|
3766
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3767
|
+
transformPaths2(result.data, [
|
|
3768
|
+
{
|
|
3769
|
+
transformFn: transformRESTImageToSDKImage,
|
|
3770
|
+
paths: [
|
|
3771
|
+
{
|
|
3772
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image"
|
|
3773
|
+
}
|
|
3774
|
+
]
|
|
3775
|
+
},
|
|
3776
|
+
{
|
|
3777
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3778
|
+
paths: [
|
|
3779
|
+
{
|
|
3780
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address"
|
|
3781
|
+
},
|
|
3782
|
+
{
|
|
3783
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address"
|
|
3784
|
+
},
|
|
3785
|
+
{
|
|
3786
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address"
|
|
3787
|
+
},
|
|
3788
|
+
{
|
|
3789
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address"
|
|
3790
|
+
},
|
|
3791
|
+
{ path: "calculatedDraftOrder.draftOrder.billingInfo.address" },
|
|
3792
|
+
{
|
|
3793
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address"
|
|
3794
|
+
},
|
|
3795
|
+
{
|
|
3796
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address"
|
|
3797
|
+
},
|
|
3798
|
+
{
|
|
3799
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address"
|
|
3800
|
+
},
|
|
3801
|
+
{
|
|
3802
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address"
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address"
|
|
3806
|
+
}
|
|
3807
|
+
]
|
|
3808
|
+
}
|
|
3809
|
+
])
|
|
3810
|
+
);
|
|
3811
|
+
} catch (err) {
|
|
3812
|
+
const transformedError = sdkTransformError(
|
|
3813
|
+
err,
|
|
3814
|
+
{
|
|
3815
|
+
spreadPathsToArguments: {},
|
|
3816
|
+
explicitPathsToArguments: {
|
|
3817
|
+
draftOrderId: "$[0]",
|
|
3818
|
+
depositDetails: "$[1].depositDetails"
|
|
3819
|
+
},
|
|
3820
|
+
singleArgumentUnchanged: false
|
|
3821
|
+
},
|
|
3822
|
+
["draftOrderId", "options"]
|
|
3823
|
+
);
|
|
3824
|
+
sideEffects?.onError?.(err);
|
|
3825
|
+
throw transformedError;
|
|
3826
|
+
}
|
|
3827
|
+
}
|
|
3618
3828
|
async function setDiscounts2(draftOrderId, discounts) {
|
|
3619
3829
|
const { httpClient, sideEffects } = arguments[2];
|
|
3620
3830
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -4950,6 +5160,14 @@ function updateLineItems3(httpClient) {
|
|
|
4950
5160
|
{ httpClient }
|
|
4951
5161
|
);
|
|
4952
5162
|
}
|
|
5163
|
+
function setDeposit3(httpClient) {
|
|
5164
|
+
return (draftOrderId, options) => setDeposit2(
|
|
5165
|
+
draftOrderId,
|
|
5166
|
+
options,
|
|
5167
|
+
// @ts-ignore
|
|
5168
|
+
{ httpClient }
|
|
5169
|
+
);
|
|
5170
|
+
}
|
|
4953
5171
|
function setDiscounts3(httpClient) {
|
|
4954
5172
|
return (draftOrderId, discounts) => setDiscounts2(
|
|
4955
5173
|
draftOrderId,
|
|
@@ -5328,6 +5546,7 @@ var createDraftOrder4 = /* @__PURE__ */ createRESTModule(createDraftOrder3);
|
|
|
5328
5546
|
var createEmptyDraftOrder4 = /* @__PURE__ */ createRESTModule(createEmptyDraftOrder3);
|
|
5329
5547
|
var addLineItemsToDraftOrder4 = /* @__PURE__ */ createRESTModule(addLineItemsToDraftOrder3);
|
|
5330
5548
|
var updateLineItems4 = /* @__PURE__ */ createRESTModule(updateLineItems3);
|
|
5549
|
+
var setDeposit4 = /* @__PURE__ */ createRESTModule(setDeposit3);
|
|
5331
5550
|
var setDiscounts4 = /* @__PURE__ */ createRESTModule(setDiscounts3);
|
|
5332
5551
|
var createCustomDiscounts4 = /* @__PURE__ */ createRESTModule(createCustomDiscounts3);
|
|
5333
5552
|
var deleteCustomDiscounts4 = /* @__PURE__ */ createRESTModule(deleteCustomDiscounts3);
|
|
@@ -5405,6 +5624,7 @@ export {
|
|
|
5405
5624
|
setBillingInfo4 as setBillingInfo,
|
|
5406
5625
|
setBusinessLocation4 as setBusinessLocation,
|
|
5407
5626
|
setBuyerInfo4 as setBuyerInfo,
|
|
5627
|
+
setDeposit4 as setDeposit,
|
|
5408
5628
|
setDiscounts4 as setDiscounts,
|
|
5409
5629
|
setRecipientInfo4 as setRecipientInfo,
|
|
5410
5630
|
setShippingInfo4 as setShippingInfo,
|