Setup

This section will instruct you on the easiest way to add JavaScript SDK to your codebase.

Prerequisites

Before you begin installing and using the JavaScript SDK, you will need to ensure you have any one of the following package managers installed in your local environment.

You can use any one of these package managers to add the JavaScript SDK to your codebase.

Install the JavaScript SDK

To add the JavaScript SDK to your code base:

  1. You will need a suitable coding structure. You can either choose a suitable function type from the Functions component present in the Serverless service, or, since you are using Catalyst, you can choose a custom coding structure and import the SDK to it and host it on AppSail.
  2. You need to execute the following installation command in your CLI to install the required SDK. Since this is a modular SDK, you need to choose the respective installation command to access your required component.
Catalyst Service Component Install Command
Serverless Functions npm install @zcatalyst/functions
Circuits npm install @zcatalyst/circuit
CloudScale DataStore npm install @zcatalyst/datastore
NoSQL npm install @zcatalyst/nosql
Stratus npm install @zcatalyst/stratus
Cache npm install @zcatalyst/cache
Authentication npm install @zcatalyst/auth
Mail npm install @zcatalyst/mail
Push Notifications npm install @zcatalyst/push-notification
Connectors npm install @zcatalyst/connector
Zia Services All Components npm install @zcatalyst/zia
SmartBrowz All Components npm install @zcatalyst/smartbrowz
Job Scheduling All Components npm install @zcatalyst/job-scheduling
QuickML All Components npm install @zcatalyst/quickml
Pipelines All Components npm install @zcatalyst/pipelines

Regardless of the package you install, the following packages will be installed by default:

  • @zcatalyst/transport: This package is required to handle the requests.
  • @zcatalyst/utils: This package is required to manage the common utilities of the SDK packages.

Import the SDK to Your Codebase

To access the components and use the functionalities of the required components, you need to import them to your coding structure once you install them.

The following table contains the import statements for all the components. Based on your required component, add the import statement to your code, and you will be able to access the component.

Catalyst Service Component Import Command
Serverless Functions import {Functions} from ‘@zcatalyst/functions’;
Circuits import {Circuit} from ‘@zcatalyst/circuit’;
CloudScale DataStore import {Datastore} from ‘@zcatalyst/datastore’;
NoSQL import { NoSQL } from ‘@zcatalyst/nosql’;
Stratus import {Stratus, TransferManager} from ‘@zcatalyst/stratus’;
Cache import {Cache} from ‘@zcatalyst/cache’;
Authentication import {UserManagement} from ‘@zcatalyst/auth’;
Mail import {Mail} from ‘@zcatalyst/email’;
Push Notifications import {PushNotifications} from ‘@zcatalyst/push-notifications’;
Connectors import {Connectors} from ‘@zcatalyst/connector’;
Zia Services All Components import {Zia} from ‘@zcatalyst/zia’;
SmartBrowz All Components import {Smartbrowz} from ‘@zcatalyst/smartbrowz’;
Job Scheduling All Components import {JobScheduling} from ‘@zcatalyst/job-scheduling’;
QuickML All Components import {QuickML} from ‘@zcatalyst/quickml’;
Pipelines All Components import {Pipelines} from ‘@zcatalyst/pipelines’;

Info: Once, you've imported the required module, ensure that you have applied the required authentication configuration to use the SDK methods.

Last Updated 2026-07-02 14:51:41 +0530 IST