@wix/auto_sdk_ecom_checkout 1.0.63 → 1.0.65

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.
@@ -1,5 +1,5 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { CreateCheckoutOptions, Checkout, CreateCheckoutApplicationErrors, GetCheckoutByCartIdResponse, GetCheckoutURLResponse, UpdateCheckout, UpdateCheckoutOptions, UpdateCheckoutApplicationErrors, RemoveCouponResponse, RemoveGiftCardResponse, RemoveOverrideCheckoutUrlResponse, AddToCheckoutOptions, AddToCheckoutResponse, AddToCheckoutApplicationErrors, RemoveLineItemsResponse, CreateOrderOptions, CreateOrderResponse, CreateOrderApplicationErrors, RawHttpResponse, MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors, LineItemQuantityUpdate, UpdateLineItemsQuantityResponse, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutDeletedEnvelope, CheckoutUpdatedEnvelope } from './index.typings.js';
2
+ import { CreateCheckoutOptions, Checkout, CreateCheckoutApplicationErrors, GetCheckoutByCartIdResponse, GetCheckoutURLResponse, UpdateCheckout, UpdateCheckoutOptions, UpdateCheckoutApplicationErrors, RemoveCouponResponse, RemoveGiftCardResponse, RemoveOverrideCheckoutUrlResponse, AddToCheckoutOptions, AddToCheckoutResponse, AddToCheckoutApplicationErrors, RemoveLineItemsResponse, CreateOrderOptions, CreateOrderResponse, CreateOrderApplicationErrors, RawHttpResponse, MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors, MarkCheckoutAsCompletedOptions, LineItemQuantityUpdate, UpdateLineItemsQuantityResponse, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutDeletedEnvelope, CheckoutUpdatedEnvelope } from './index.typings.js';
3
3
  export { ActionEvent, AddToCheckoutRequest, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, Address, AddressAddressLine1OptionsOneOf, AddressLocation, AddressWithContact, AggregatedTaxBreakdown, ApiAddress, ApplicableLineItems, ApplicationError, AppliedCoupon, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BaseEventMetadata, BillingInfo, BuyerInfo, BuyerInfoIdOneOf, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, CatalogOverrideFields, CatalogReference, ChannelInfo, ChannelInfoChannelType, ChannelInfoChannelTypeWithLiterals, ChannelType, ChannelTypeWithLiterals, Charge, ChargeDetails, ChargeType, ChargeTypeWithLiterals, CheckoutMarkedAsCompleted, Color, CommonVatId, CommonVatType, CommonVatTypeWithLiterals, ConversionInfo, Coupon, CreateCheckoutRequest, CreateCheckoutResponse, CreateOrderAndChargeApplicationErrors, CreateOrderAndChargeOptions, CreateOrderAndChargeRequest, CreateOrderAndChargeResponse, CreateOrderAndChargeResponseIdOneOf, CreateOrderRequest, CreateOrderResponseIdOneOf, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomLineItem, CustomSettings, CustomTextFieldSelection, DeleteCheckoutRequest, DeleteCheckoutResponse, DeliveryAllocation, DeliveryLogistics, DeliveryTimeSlot, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountDiscountType, DiscountDiscountTypeWithLiterals, DiscountRule, DiscountRuleName, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DoublePaymentErrorData, DoublePaymentErrorDataIdOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReference, FallbackReason, FallbackReasonWithLiterals, FieldViolation, FileType, FileTypeWithLiterals, FocalPoint, FreeTrialPeriod, FullAddressContactDetails, FullName, GetCheckoutByCartIdRequest, GetCheckoutPaymentSettingsRequest, GetCheckoutPaymentSettingsResponse, GetCheckoutPaymentSettingsResponsePaymentOption, GetCheckoutPaymentSettingsResponsePaymentOptionWithLiterals, GetCheckoutRequest, GetCheckoutResponse, GetCheckoutURLRequest, GetCheckoutWithAllExtendedFieldsRequest, GetCheckoutWithAllExtendedFieldsResponse, GetWixCheckoutURLRequest, GetWixCheckoutURLResponse, GiftCard, Group, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, InvalidMembership, ItemAvailabilityInfo, ItemAvailabilityStatus, ItemAvailabilityStatusWithLiterals, ItemModifier, ItemTaxFullDetails, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, ItemTypeItemTypeWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LineItem, LineItemDiscount, LineItemType, LineItemTypeWithLiterals, ManualCalculationReason, ManualCalculationReasonWithLiterals, MarkCheckoutAsCompletedAndRedirectToUrlRequest, MarkCheckoutAsCompletedRequest, MarkCheckoutAsCompletedResponse, MediaItem, MediaItemType, MediaItemTypeWithLiterals, Membership, MembershipName, MembershipOptions, MembershipPaymentCredits, MerchantDiscount, MerchantDiscountInput, MessageEnvelope, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, OptionSelection, Other, OtherCharge, PaymentErrorResponseData, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PhysicalProperties, PickupAddress, PickupDetails, PickupMethod, PickupMethodWithLiterals, PlainTextValue, Policy, PriceDescription, PriceSummary, ProductDetails, ProductName, RateType, RateTypeWithLiterals, RedeemErrorData, Region, RemoveCouponRequest, RemoveGiftCardRequest, RemoveLineItemsRequest, RemoveOverrideCheckoutUrlRequest, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedCarrierServiceOption, SelectedCarrierServiceOptionOtherCharge, SelectedCarrierServiceOptionPrices, SelectedMembership, SelectedMemberships, ServiceProperties, Severity, SeverityWithLiterals, ShipmentDetails, ShippingCalculationErrorData, ShippingCalculationErrorDataShippingCalculationErrorOneOf, ShippingInfo, ShippingOption, ShippingPrice, ShippingRegion, StoreSettings, Street, StreetAddress, Subscription, SubscriptionCharges, SubscriptionCreated, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SuggestedFixWithLiterals, SystemError, Target, TargetLineItem, TargetTargetTypeOneOf, TaxBreakdown, TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf, TaxRateBreakdown, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, Title, Totals, TranslatableString, UpdateCheckoutRequest, UpdateCheckoutResponse, UpdateLineItemsQuantityRequest, UpdatedCheckoutMessage, V1BuyerInfo, V1CustomField, V1ItemModifier, V1LineItem, V1ModifierGroup, V1PickupDetails, V1ShippingInfo, V1ShippingInfoDetailsOneOf, V1SubscriptionOptionInfo, V1SubscriptionSettings, ValidationError, VatId, VatType, VatTypeWithLiterals, Violation, ViolationsList, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function createCheckout$1(httpClient: HttpClient): CreateCheckoutSignature;
@@ -166,7 +166,7 @@ interface MarkCheckoutAsCompletedSignature {
166
166
  * use this method to manually mark the checkout as completed.
167
167
  * @param - Checkout ID.
168
168
  */
169
- (_id: string): Promise<void>;
169
+ (_id: string, options?: MarkCheckoutAsCompletedOptions): Promise<void>;
170
170
  }
171
171
  declare function updateLineItemsQuantity$1(httpClient: HttpClient): UpdateLineItemsQuantitySignature;
172
172
  interface UpdateLineItemsQuantitySignature {
@@ -221,4 +221,4 @@ declare const onCheckoutDeleted: BuildEventDefinition<typeof onCheckoutDeleted$1
221
221
  */
222
222
  declare const onCheckoutUpdated: BuildEventDefinition<typeof onCheckoutUpdated$1> & typeof onCheckoutUpdated$1;
223
223
 
224
- export { AddToCheckoutApplicationErrors, AddToCheckoutOptions, AddToCheckoutResponse, Checkout, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutDeletedEnvelope, CheckoutUpdatedEnvelope, CreateCheckoutApplicationErrors, CreateCheckoutOptions, CreateOrderApplicationErrors, CreateOrderOptions, CreateOrderResponse, GetCheckoutByCartIdResponse, GetCheckoutURLResponse, LineItemQuantityUpdate, MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors, RawHttpResponse, RemoveCouponResponse, RemoveGiftCardResponse, RemoveLineItemsResponse, RemoveOverrideCheckoutUrlResponse, UpdateCheckout, UpdateCheckoutApplicationErrors, UpdateCheckoutOptions, UpdateLineItemsQuantityResponse, addToCheckout, createCheckout, createOrder, getCheckout, getCheckoutByCartId, getCheckoutUrl, markCheckoutAsCompleted, markCheckoutAsCompletedAndRedirectToUrl, onCheckoutCompleted, onCheckoutCreated, onCheckoutDeleted, onCheckoutUpdated, removeCoupon, removeGiftCard, removeLineItems, removeOverrideCheckoutUrl, updateCheckout, updateLineItemsQuantity };
224
+ export { AddToCheckoutApplicationErrors, AddToCheckoutOptions, AddToCheckoutResponse, Checkout, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutDeletedEnvelope, CheckoutUpdatedEnvelope, CreateCheckoutApplicationErrors, CreateCheckoutOptions, CreateOrderApplicationErrors, CreateOrderOptions, CreateOrderResponse, GetCheckoutByCartIdResponse, GetCheckoutURLResponse, LineItemQuantityUpdate, MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors, MarkCheckoutAsCompletedOptions, RawHttpResponse, RemoveCouponResponse, RemoveGiftCardResponse, RemoveLineItemsResponse, RemoveOverrideCheckoutUrlResponse, UpdateCheckout, UpdateCheckoutApplicationErrors, UpdateCheckoutOptions, UpdateLineItemsQuantityResponse, addToCheckout, createCheckout, createOrder, getCheckout, getCheckoutByCartId, getCheckoutUrl, markCheckoutAsCompleted, markCheckoutAsCompletedAndRedirectToUrl, onCheckoutCompleted, onCheckoutCreated, onCheckoutDeleted, onCheckoutUpdated, removeCoupon, removeGiftCard, removeLineItems, removeOverrideCheckoutUrl, updateCheckout, updateLineItemsQuantity };
@@ -1468,6 +1468,7 @@ var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
1468
1468
  ChannelType2["ETSY"] = "ETSY";
1469
1469
  ChannelType2["TIKTOK"] = "TIKTOK";
1470
1470
  ChannelType2["FAIRE_COM"] = "FAIRE_COM";
1471
+ ChannelType2["PAYPAL_AGENTIC_CHECKOUT"] = "PAYPAL_AGENTIC_CHECKOUT";
1471
1472
  return ChannelType2;
1472
1473
  })(ChannelType || {});
1473
1474
  var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
@@ -2262,9 +2263,12 @@ async function markCheckoutAsCompletedAndRedirectToUrl2(token) {
2262
2263
  throw transformedError;
2263
2264
  }
2264
2265
  }
2265
- async function markCheckoutAsCompleted2(_id) {
2266
- const { httpClient, sideEffects } = arguments[1];
2267
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
2266
+ async function markCheckoutAsCompleted2(_id, options) {
2267
+ const { httpClient, sideEffects } = arguments[2];
2268
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2269
+ id: _id,
2270
+ orderId: options?.orderId
2271
+ });
2268
2272
  const reqOpts = markCheckoutAsCompleted(payload);
2269
2273
  sideEffects?.onSiteCall?.();
2270
2274
  try {
@@ -2275,10 +2279,10 @@ async function markCheckoutAsCompleted2(_id) {
2275
2279
  err,
2276
2280
  {
2277
2281
  spreadPathsToArguments: {},
2278
- explicitPathsToArguments: { id: "$[0]" },
2282
+ explicitPathsToArguments: { id: "$[0]", orderId: "$[1].orderId" },
2279
2283
  singleArgumentUnchanged: false
2280
2284
  },
2281
- ["_id"]
2285
+ ["_id", "options"]
2282
2286
  );
2283
2287
  sideEffects?.onError?.(err);
2284
2288
  throw transformedError;
@@ -2467,8 +2471,9 @@ function markCheckoutAsCompletedAndRedirectToUrl3(httpClient) {
2467
2471
  );
2468
2472
  }
2469
2473
  function markCheckoutAsCompleted3(httpClient) {
2470
- return (_id) => markCheckoutAsCompleted2(
2474
+ return (_id, options) => markCheckoutAsCompleted2(
2471
2475
  _id,
2476
+ options,
2472
2477
  // @ts-ignore
2473
2478
  { httpClient }
2474
2479
  );