Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@playbookmedia/backend-node-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Vector Backend Node SDK
Official Node.js SDK for interacting with the Vector API
Overview
This package provides a TypeScript/JavaScript client SDK for interacting with Vector's backend services. It's part of the Vector protobuf definitions repository which contains API definitions, SDKs, and related tooling for Vector's microservices architecture.
Features
- Full TypeScript support with comprehensive type definitions
- Promise-based API
- Automatic request/response handling
- Built-in error handling and retry logic
- Semantic versioning and releases
- Comprehensive test coverage
- Modern ES6+ codebase
Installation
npm install @playbookmedia/backend-node-sdk
Or with yarn:
yarn add @playbookmedia/backend-node-sdk
Requirements
- Node.js >= 12.0
- npm or yarn package manager
Quick Start
import { VectorClient } from '@playbookmedia/backend-node-sdk';
// Initialize the client
const client = new VectorClient({
// Add your configuration options here
});
// Example usage
async function example() {
try {
const response = await client.someEndpoint();
console.log(response);
} catch (error) {
console.error('Error:', error);
}
}
Development
Setup
- Clone the repository
- Install dependencies:
npm install
Available Scripts
npm run build
- Builds the package using TypeScriptnpm run clean
- Removes build artifactsnpm run test
- Runs tests with Jestnpm run lint
- Lints code using ESLintnpm run format
- Formats code using Prettiernpm run typecheck
- Runs TypeScript type checkingnpm run semantic-release
- Handles semantic versioning and releases
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes using conventional commits (
npm run cm
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Project Structure
├── src/ # Source code
├── lib/ # Compiled JavaScript
├── tests/ # Test files
└── types/ # TypeScript type definitions
Documentation
For detailed API documentation and examples, please visit our documentation site.
License
MIT © [Vector Engineering]