TypeScript Core SDK for Contentstack - A foundational library providing core modules and utilities for Contentstack TypeScript SDKs.
Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. Read More.
This package contains core modules and utilities used by the Contentstack TypeScript Delivery SDK. It provides essential functionality including HTTP client configuration, error handling, request management, parameter serialization, and retry policies.
- HTTP Client: Configurable Axios-based HTTP client with support for custom adapters
- Error Handling: Comprehensive error classes for API and Contentstack-specific errors
- Request Management: Request handling with interceptors and custom error callbacks
- Parameter Serialization: Custom parameter serialization for API requests
- Retry Policies: Built-in retry logic for handling rate limits and transient errors
- TypeScript Support: Full TypeScript definitions included
- Multiple Build Formats: Supports CommonJS, ESM, UMD, and TypeScript declarations
This package is an internal dependency used by Contentstack TypeScript SDKs. End users should not install this package directly. Instead, install the appropriate Contentstack SDK (e.g., Contentstack TypeScript Delivery SDK), which will automatically include this package as a dependency.
If you are developing or maintaining a Contentstack SDK and need to use this core package directly, you can install it as a dependency:
npm install @contentstack/coreThen import the modules:
import {
httpClient,
// ... other exports
} from '@contentstack/core';- Node.js version 4.4.7 or later
Clone the repository and install dependencies:
git clone https://github.com/contentstack/contentstack-js-core.git
cd contentstack-js-core
npm installBuild all output formats (CommonJS, ESM, UMD, and TypeScript declarations):
npm run buildBuild specific formats:
npm run build # Build all
npm run build:cjs # CommonJS
npm run build:esm # ES Modules
npm run build:umd # UMD
npm run build:types # TypeScript declarationsRun unit tests:
npm run testRun linting:
npm run lintCreate a package tarball:
npm run packageClean build artifacts:
npm run cleanThis project is licensed under the MIT License. See the LICENSE.txt file for details.
For issues and feature requests, please visit the GitHub Issues page.
Copyright (c) 2016-2025 Contentstack. All rights reserved.
