Skip to content

Installation

Terminal window
npm install @agamya/bigship-sdk
  • Node.js >= 18 (CI tests Node 20 and 22)
  • TypeScript >= 5.0 (optional but recommended)

The SDK is written in TypeScript with strict: true. No special tsconfig.json changes are needed — it works with any TypeScript project.

Set your Bigship credentials:

Terminal window
export BIGSHIP_USER_NAME=your-email@example.com
export BIGSHIP_PASSWORD=your-password
export BIGSHIP_ACCESS_KEY=your-access-key
export BIGSHIP_BASE_URL=https://api.bigship.in

Or use a .env file with dotenv:

import 'dotenv/config';
import { BigshipClient } from '@agamya/bigship-sdk';
const client = new BigshipClient({
baseURL: process.env.BIGSHIP_BASE_URL!,
userName: process.env.BIGSHIP_USER_NAME!,
password: process.env.BIGSHIP_PASSWORD!,
accessKey: process.env.BIGSHIP_ACCESS_KEY!,
});

The SDK exposes subpath imports for targeted access:

// Main entry point — all exports
import { BigshipClient } from '@agamya/bigship-sdk';
// Error classes only
import { BigshipError, isBigshipAuthError } from '@agamya/bigship-sdk/errors';
// Core types and schemas
import { BigshipConfig, AddSingleOrderRequestSchema } from '@agamya/bigship-sdk/core';
// Utility functions
import { BigshipUtils } from '@agamya/bigship-sdk/utils';