@wix/auto_sdk_ecom_current-cart 1.0.132 → 1.0.134

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.
@@ -8,7 +8,7 @@ interface GetCurrentCartSignature {
8
8
  * Retrieves the current site visitor's cart.
9
9
  *
10
10
  * >**Note:**
11
- * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
11
+ * >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities).
12
12
  * @returns Current session's active cart.
13
13
  */
14
14
  (): Promise<NonNullablePaths<Cart, `lineItems` | `lineItems.${number}.quantity` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.productName.original` | `lineItems.${number}.price.amount` | `lineItems.${number}.price.convertedAmount` | `lineItems.${number}.price.formattedAmount` | `lineItems.${number}.price.formattedConvertedAmount` | `lineItems.${number}.availability.status` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `lineItems.${number}.subscriptionOptionInfo.title.original` | `lineItems.${number}.subscriptionOptionInfo.description.original` | `lineItems.${number}.paymentOption` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.selectedMembership._id` | `lineItems.${number}.selectedMembership.appId` | `lineItems.${number}.customLineItem` | `lineItems.${number}.priceUndetermined` | `lineItems.${number}.fixedQuantity` | `lineItems.${number}.catalogOverrideFields.paymentOption.value` | `lineItems.${number}.savePaymentMethod` | `lineItems.${number}.taxableAddress.addressType` | `lineItems.${number}.membersOnly` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `buyerInfo.userId` | `currency` | `conversionCurrency` | `weightUnit` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `contactInfo.address.streetAddress.number` | `contactInfo.address.streetAddress.name` | `contactInfo.contactDetails.vatId._id` | `contactInfo.contactDetails.vatId.type` | `selectedShippingOption.code` | `paymentCurrency`, 6>>;
@@ -20,7 +20,7 @@ interface UpdateCurrentCartSignature {
20
20
  *
21
21
  * >**Notes:**
22
22
  * >+ When adding catalog line items, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
23
- * >+ This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
23
+ * >+ This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities).
24
24
  * >+ After a cart is updated, call [Refresh Cart](https://dev.wix.com/docs/sdk/frontend-modules/ecom/refresh-cart) to update the cart's UI elements and trigger the Cart Updated event.
25
25
  * @param - Current cart update options.
26
26
  * @returns Updated Cart.
@@ -34,7 +34,7 @@ interface AddToCurrentCartSignature {
34
34
  *
35
35
  * >**Notes:**
36
36
  * >+ When adding catalog line items, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
37
- * >+ This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
37
+ * >+ This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities).
38
38
  * >+ After a cart is updated, call [Refresh Cart](https://dev.wix.com/docs/sdk/frontend-modules/ecom/refresh-cart) to update the cart's UI elements and trigger the Cart Updated event.
39
39
  * @param - Items to be added to the current cart.
40
40
  */
@@ -134,8 +134,8 @@ function resolveComWixEcomCartApiV1CurrentCartServiceUrl(opts) {
134
134
  return resolveUrl(Object.assign(opts, { domainToMappings }));
135
135
  }
136
136
  var PACKAGE_NAME = "@wix/auto_sdk_ecom_current-cart";
137
- function getCurrentCart(payload) {
138
- function __getCurrentCart({ host }) {
137
+ function currentCartGetCurrentCart(payload) {
138
+ function __currentCartGetCurrentCart({ host }) {
139
139
  const metadata = {
140
140
  entityFqdn: "wix.ecom.v1.cart",
141
141
  method: "GET",
@@ -181,7 +181,7 @@ function getCurrentCart(payload) {
181
181
  };
182
182
  return metadata;
183
183
  }
184
- return __getCurrentCart;
184
+ return __currentCartGetCurrentCart;
185
185
  }
186
186
  function updateCurrentCart(payload) {
187
187
  function __updateCurrentCart({ host }) {
@@ -860,10 +860,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
860
860
  WebhookIdentityType2["APP"] = "APP";
861
861
  return WebhookIdentityType2;
862
862
  })(WebhookIdentityType || {});
863
- async function getCurrentCart2() {
863
+ async function getCurrentCart() {
864
864
  const { httpClient, sideEffects } = arguments[0];
865
865
  const payload = renameKeysFromSDKRequestToRESTRequest({});
866
- const reqOpts = getCurrentCart(payload);
866
+ const reqOpts = currentCartGetCurrentCart(payload);
867
867
  sideEffects?.onSiteCall?.();
868
868
  try {
869
869
  const result = await httpClient.request(reqOpts);
@@ -1312,8 +1312,8 @@ async function deleteCurrentCart2() {
1312
1312
  }
1313
1313
 
1314
1314
  // src/ecom-v1-cart-current-cart.public.ts
1315
- function getCurrentCart3(httpClient) {
1316
- return () => getCurrentCart2(
1315
+ function getCurrentCart2(httpClient) {
1316
+ return () => getCurrentCart(
1317
1317
  // @ts-ignore
1318
1318
  { httpClient }
1319
1319
  );
@@ -1532,7 +1532,7 @@ var onCartCreated = EventDefinition(
1532
1532
  // src/ecom-v1-cart-current-cart.context.ts
1533
1533
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1534
1534
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1535
- var getCurrentCart4 = /* @__PURE__ */ createRESTModule(getCurrentCart3);
1535
+ var getCurrentCart3 = /* @__PURE__ */ createRESTModule(getCurrentCart2);
1536
1536
  var updateCurrentCart4 = /* @__PURE__ */ createRESTModule(updateCurrentCart3);
1537
1537
  var addToCurrentCart4 = /* @__PURE__ */ createRESTModule(addToCurrentCart3);
1538
1538
  var removeLineItemsFromCurrentCart4 = /* @__PURE__ */ createRESTModule(removeLineItemsFromCurrentCart3);
@@ -1576,7 +1576,7 @@ export {
1576
1576
  createCheckoutFromCurrentCart4 as createCheckoutFromCurrentCart,
1577
1577
  deleteCurrentCart4 as deleteCurrentCart,
1578
1578
  estimateCurrentCartTotals4 as estimateCurrentCartTotals,
1579
- getCurrentCart4 as getCurrentCart,
1579
+ getCurrentCart3 as getCurrentCart,
1580
1580
  onCartCreated2 as onCartCreated,
1581
1581
  onCartDeleted2 as onCartDeleted,
1582
1582
  onCartUpdated2 as onCartUpdated,