open-index/open-npm huggingface dataset:
npm package: @redoc/sdk
Description: JavaScript SDK for Redoc API integration
Latest version: 1.0.0

# Redoc SDK

A TypeScript/JavaScript SDK for integrating with the Redoc API.

## Installation

```bash
npm install @redoc/sdk
```

## Usage

```typescript
import { RedocClient } from '@redoc/sdk';

// Initialize the client
const client = new RedocClient({
  baseURL: 'https://api.redoc.com',
  apiKey: 'your-api-key'
});

// Use the CRM API
const crmApi = client.crm;
const newClient = await crmApi.createClient({
  name: 'John Doe',
  email: 'john@example.com'
});

// Use the Document API
const documentApi = client.documents;
const documents = await documentApi.listDocuments({
  status: 'active'
});
```

## Features

- Full TypeScript support
- CRM client management
- Document management
- Built-in error handling
- Automatic request/response type checking

## API Documentation

### CRM API

- `createClient(clientData: ClientType): Promise<ClientResponse>`
- `updateClient(clientId: number, clientData: Partial<ClientType>): Promise<ClientResponse>`
- `deleteClient(clientId: number): Promise<{ success: boolean; message: string }>`

### Document API

- `createDocument(documentData: DocumentType): Promise<DocumentResponse>`
- `getDocument(documentId: number): Promise<DocumentResponse>`
- `updateDocument(documentId: number, documentData: Partial<DocumentType>): Promise<DocumentResponse>`
- `deleteDocument(documentId: number): Promise<{ success: boolean; message: string }>`
- `listDocuments(filters?: DocumentFilters): Promise<DocumentResponse[]>`

## License

MIT