Vue Storefront is now Alokai! Learn More
@vsf-enterprise/bigcommerce-sdk

@vsf-enterprise/bigcommerce-sdk

5.0.0ri:link

Major Changesri:link

  • CHANGED Guarantee compatibility with @alokai/connect package.
  • CHANGED Updated the package for compatibility with Node.js 22.

Key Updates:ri:link

  • Upgraded to the latest version of Node.js 22
  • Updated CI pipelines to use Node.js 22 for consistency.
  • Updated .nvmrc or .node-version files to specify Node.js version 22.14.
  • Upgraded @types/node to version ^22.13.17 for compatibility with the latest Node.js features.

Recommendations:ri:link

  • Use Node.js version 22.14.0 or higher for optimal performance, security, and compatibility.
  • While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested. CHANGED Replaced core dependencies with a new @alokai/connect package. @vue-storefront/middleware, @vue-storefront/sdk, vue-storefront/logger, vue-storefront/unified-data-model, @vue-storefront/multistore were replaced with @alokai/connect. The replacement preserves the same functionality and interface as the original packages. To read more about the @alokai/connect package, please refer to the documentation.

Minor Changesri:link

  • CHANGED Update axios version to "^1.7.9"

Patch Changesri:link

  • Updated dependencies:
    • @vsf-enterprise/bigcommerce-types@3.0.0
    • @alokai/connect@1.0.0

5.0.0-rc.5ri:link

Patch Changesri:link

  • Updated dependencies:
    • @alokai/connect@1.0.0-rc.4

5.0.0-rc.4ri:link

Major Changesri:link

  • CHANGED Updated the package for compatibility with Node.js 22.

Key Updates:ri:link

  • Upgraded to the latest version of Node.js 22
  • Updated CI pipelines to use Node.js 22 for consistency.
  • Updated .nvmrc or .node-version files to specify Node.js version 22.14.
  • Upgraded @types/node to version ^22.13.17 for compatibility with the latest Node.js features.

Recommendations:ri:link

  • Use Node.js version 22.14.0 or higher for optimal performance, security, and compatibility.
  • While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested.

Patch Changesri:link

  • Updated dependencies:
    • @vsf-enterprise/bigcommerce-types@3.0.0-rc.1
    • @alokai/connect@1.0.0-rc.3

5.0.0-rc.3ri:link

Minor Changesri:link

  • CHANGED Update axios version to "^1.7.9"

Patch Changesri:link

  • Updated dependencies:
    • @alokai/connect@1.0.0-rc.2

5.0.0-rc.2ri:link

Patch Changesri:link

  • Updated dependencies:
    • @alokai/connect@1.0.0-rc.1

5.0.0-rc.1ri:link

Major Changesri:link

Update packages to work with connect rc version

Patch Changesri:link

  • Updated dependencies:
    • @vsf-enterprise/bigcommerce-types@3.0.0-rc.0
    • @alokai/connect@1.0.0-rc.0

5.0.0-rc.0ri:link

Major Changesri:link

CHANGED Replaced core dependencies with a new @alokai/connect package. @vue-storefront/middleware, @vue-storefront/sdk, vue-storefront/logger, vue-storefront/unified-data-model were replaced with @alokai/connect. The replacement preserves the same functionality and interface as the original packages. To read more about the @alokai/connect package, please refer to the documentation. You will also find a migration guide in the documentation.

4.1.2ri:link

Patch Changesri:link

  • FIX Update BigCommerce SDK methods documentation links. Now they point to the correct API reference.

4.1.1ri:link

Patch Changesri:link

  • CHANGED the version of @vue-storefront/sdk-axios-request-sender package to ^2.0.0.

4.1.0ri:link

Minor Changesri:link

  • ADDED The response of the getProductById endpoint of the Bigcommerce integration will now include the correct values for the following response fields (if the product is a pre-order product):
  • preorder_release_date
  • preorder_message
  • is_preorder_only

Before this change, the data returned in those fields was always unpopulated, as if the product was not a pre-order product - even if it in fact was a pre-order product in the Bigcommerce backend.

import { sdk } from "~/sdk.config.ts";
const product = await sdk.getProductById({ entityId: 77 });
console.log(product.data.preorder_release_date); // now includes populated pre-order data

Patch Changesri:link

  • Updated dependencies:
    • @vsf-enterprise/bigcommerce-types@2.1.0

4.0.2ri:link

Patch Changesri:link

  • CHANGED Updated @vue-storefront/middleware version to 4.1.0.

4.0.1ri:link

Patch Changesri:link

Update axios to ^0.28.0 to mitigate security vulnerability CVE-2023-45857

4.0.0ri:link

Major Changesri:link

  • CHANGED Changed minimum Node version from 16 to 18. The condition that was forcing the Node version to be lower than 19 is also removed.

Patch Changesri:link

  • Updated dependencies:
    • @vsf-enterprise/bigcommerce-types@2.0.0

3.1.1ri:link

Patch Changesri:link

  • CHANGED Deprecated the BigCommerceModuleType interface. It is no longer necessary to use this type. It's going to be removed in the next major version after Oct 1, 2024.
import { initSDK, buildModule } from "@vue-storefront/sdk";
- import { bigcommerceModule, SAPCCModuleType } from "@vue-storefront/sapcc-sdk";
+ import { bigcommerceModule } from "@vue-storefront/sapcc-sdk";

const sdkConfig = {
-  bigcommerce: buildModule<BigCommerceModuleType>(bigcommerceModule, {
+  bigcommerce: buildModule(bigcommerceModule, {
    apiUrl: "http://localhost:8181/bigcommerce",
  }),
};

export const sdk = initSDK(sdkConfig);
  • CHANGED bigcommerceModule has been deprecated. Use middlewareModule instead. It's going to be removed in the next major version after Apr 1, 2025.
- import { initSDK, buildModule } from '@vue-storefront/sdk';
- import { bigcommerceModule } from '@vsf-enterprise/bigcommerce-sdk'
+ import { initSDK, buildModule, middlewareModule } from '@vue-storefront/sdk';
+ import { Endpoints as BigcommerceEndpoints } from '@vsf-enterprise/bigcommerce-api';

const sdkConfig = {
  bigcommerce:
    buildModule(
-      bigcommerceModule,
+      middlewareModule<BigcommerceEndpoints>,
      {
        apiUrl: 'http://localhost:8181/bigcommerce',
        ssrApiUrl: 'http://localhost:8181/bigcommerce'
      }
    )
};

export const sdk = initSDK(sdkConfig);

Updating your bigcommerceModule to this version should not disrupt your existing code; however, switching to middlewareModule will require certain modifications. To migrate:

  • Use wishlistId: number instead of { wishlistId: number } in the deleteWishlist method.
- await sdk.bigcommerce.deleteWishlist({ wishlistId: 1 });
+ await sdk.bigcommerce.deleteWishlist(1);

3.1.0ri:link

Minor Changesri:link

  • cefe8e6: Add 'getCategoryTreeGql' method to fetch category tree from BigCommerce via GraphQL. The response is enriched with a 'productCount' field that contains the number of products in each category comparing to the REST getCategoryTree method.

Patch Changesri:link

  • Updated dependencies cefe8e6
    • @vsf-enterprise/bigcommerce-types@1.5.0

3.0.0ri:link

Major Changesri:link

  • 93ebb8f: Added possibility to send cookie-independent requests via SDK to integration's GET endpoints in order to cache their response

    Migration guideri:link


    In this version, we had to introduce tiny breaking changes to give possibility of sending cookie independent requests to the GET endpoints. Signature of following SDK methods changed:
    getCategoryTree

    From:
    async function getCategoryTree(
      options?: MethodOptions,
    ): Promise<GetCategoryTreeResponse>;
    

    To:
    async function getCategoryTree(
      props?: GetCategoryTreeParameters,
      options?: MethodOptions,
    ): Promise<GetCategoryTreeResponse>;
    
    getSite

    From:
    async function getSite(options?: MethodOptions): Promise<GetSiteResponse>;
    

    To:
    async function getSite(
      props?: GetSiteParameters,
      options?: MethodOptions,
    ): Promise<GetSiteResponse>;
    
    getStoreMeta

    From:
    async function getStoreMeta(
      options?: MethodOptions,
    ): Promise<GetStoreMetaResponse>;
    

    To:
    async function getStoreMeta(
      props?: GetStoreMetaParameters,
      options?: MethodOptions,
    ): Promise<GetStoreMetaResponse>;
    

    Make sure to update calls of aforementioned methods in your codebase if you use options parameter in some of them. If not, then probably it won't be neccesary to make any changes.

Patch Changesri:link

  • Updated dependencies 93ebb8f
    • @vsf-enterprise/bigcommerce-types@1.4.0

2.0.0ri:link

Major Changesri:link

  • Implemented @vue-storefront/sdk-axios-request-sender package in all SDK methods. Also, getCategory, getChannel, getCurrencies, getCustomers, getFilters, getProductById, getProductReview, getProductReviewCollection, getProducts, getProductsById, getProductsWithFilter, getSite, getStoreMeta methods now send GET instead of POST requests to Alokai's Server Middleware.

1.3.0ri:link

Minor Changesri:link

  • Added "deleteCoupon" Endpoint Functionality:
    • Introduced a new API endpoint in the api package to facilitate coupon deletion.
    • Implemented a corresponding client method in the SDK package for seamless interaction.
    • Expanded the types package with necessary data structures to support this feature.

Patch Changesri:link

  • Updated dependencies [bdfe3b3]:
    • @vsf-enterprise/bigcommerce-types@1.3.0

1.2.0ri:link

Minor Changesri:link

  • Added "addCoupon" Endpoint Functionality:
  • Introduced a new API endpoint in the api package to facilitate coupon addition.
  • Implemented a corresponding client method in the SDK package for seamless interaction.
  • Expanded the types package with necessary data structures to support this feature.

Patch Changesri:link

  • Updated dependencies [d5150d2]:
    • @vsf-enterprise/bigcommerce-types@1.2.0

1.1.1ri:link

Patch Changesri:link

  • chore: updateCustomer add customer settings global login

1.1.0ri:link

Minor Changesri:link

  • add node18 (>= 16 < 19) support

1.0.0ri:link

Patch Changesri:link

  • Update vsf package versions to stable versions

1.0.0-rc.0ri:link

Minor Changesri:link

  • new sdk method - getAllWishlists
  • updateCustomer sdk method
  • getFilters - sdk method
  • Updating the documentation for the BigCommerce SDK, minor changes and corrections done across a number of doc files
  • updateFormFields sdk method
  • getCustomerAddress sdk method
  • getOrders sdk method
  • getStoreMeta sdk method
  • removing unused type in UpdateAddressParameters and introducing new createCustomerAddress sdk method
  • getProductsById sdk method
  • getProductById and getOrdersWithDetails sdk methods for the BigCommerce integration
  • getOrderProducts and getOrderShippingAddresses sdk methods
  • removeCartItem sdk method
  • fixed JS error in the updateCustomerAddress endpoint where destructuring was made on a variable that can be undefined. added a new updateCustomerAddress method for the sdk
  • createCustomer sdk method
  • removeWishlistItem new sdk method
  • bigcommerce-types - removed redundant customer_id property in the CreateAddressParameters, bigcommerce-sdk - added createCustomerAddress method"
  • getOrderByCart - sdk method
  • Applied the fix to disable the redirect to the unexisting route account.php, update login method to return customer token, added login and updateCart methods to the SDK
  • adding new sdk method - createWishlist
  • getProductReview - new sdk method
  • getCustomerSettings sdk method
  • getCurrencies sdk method
  • getCustomers sdk method
  • getProductsWithFilter sdk method
  • validateCredentials - new sdk method
  • deleteCustomerAddress - sdk method
  • introduced new method for the SDK - addWishlistItems
  • added new sdk method - createProductReview
  • getChannel sdk method
  • api package: fixed issue with unauthenticated users being able to create new carts for existing users, performLogin now returns a user token; sdk package: cart methods and integration tests
  • new loginCustomerGql method for the sdk
  • updateCartItem sdk method

Patch Changesri:link

  • Updated the generated documentation for the BigCommerce, formatted and added the entire documentation for the sdk. Changed SDK methods from arrow functions to function declarations.
  • Updated dependencies
    • @vsf-enterprise/bigcommerce-types@1.0.0