@playbookmedia/backend-node-sdk
v1.26.2-patch-2
Published
Vector Backend Node SDK for interacting with the Vector API
Maintainers
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-sdkOr with yarn:
yarn add @playbookmedia/backend-node-sdkRequirements
- 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 installAvailable 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 definitionsDocumentation
For detailed API documentation and examples, please visit our documentation site.
License
MIT © [Vector Engineering]
