Installation
Install
Section titled “Install”npm install @agamya/bigship-sdkRequirements
Section titled “Requirements”- Node.js >= 18 (CI tests Node 20 and 22)
- TypeScript >= 5.0 (optional but recommended)
TypeScript Configuration
Section titled “TypeScript Configuration”The SDK is written in TypeScript with strict: true. No special tsconfig.json changes are needed — it works with any TypeScript project.
Environment Variables
Section titled “Environment Variables”Set your Bigship credentials:
export BIGSHIP_USER_NAME=your-email@example.comexport BIGSHIP_PASSWORD=your-passwordexport BIGSHIP_ACCESS_KEY=your-access-keyexport BIGSHIP_BASE_URL=https://api.bigship.inOr 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!,});Subpath Imports
Section titled “Subpath Imports”The SDK exposes subpath imports for targeted access:
// Main entry point — all exportsimport { BigshipClient } from '@agamya/bigship-sdk';
// Error classes onlyimport { BigshipError, isBigshipAuthError } from '@agamya/bigship-sdk/errors';
// Core types and schemasimport { BigshipConfig, AddSingleOrderRequestSchema } from '@agamya/bigship-sdk/core';
// Utility functionsimport { BigshipUtils } from '@agamya/bigship-sdk/utils';