# @quantcdn/quant-client

> OpenAPI client for @quantcdn/quant-client

Latest version **4.21.1** (published 2026-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @quantcdn/quant-client
pnpm add @quantcdn/quant-client
yarn add @quantcdn/quant-client
bun add @quantcdn/quant-client
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.21.1 |
| Published | 2026-07-16 |
| First published | 2023-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1 |
| Author | QuantCDN |
| Maintainers | stooit, steveworley |
| Keywords | @quantcdn/quant-client, axios, cdn, edge, openapi-client, openapi-generator, quant, quantcdn, quantcloud, typescript |

## Links

- npm: https://www.npmjs.com/package/@quantcdn/quant-client
- Repository: https://github.com/quantcdn/quant-ts-client
- Homepage: https://github.com/quantcdn/quant-ts-client#readme
- Issues: https://github.com/quantcdn/quant-ts-client/issues
- npm.io page: https://npm.io/package/@quantcdn/quant-client

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.16.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 4.21.1 (latest) — 2026-07-16
- 4.21.0 — 2026-07-16
- 4.19.0 — 2026-06-12
- 4.15.4 — 2026-04-06
- 4.12.2 — 2026-03-30
- 4.12.1 — 2026-03-30
- 4.12.0 — 2026-03-05
- 4.11.1 — 2026-03-03
- 4.11.0 — 2026-03-01
- 4.10.0 — 2026-02-12
- 4.9.0 — 2026-01-28
- 4.8.0 — 2026-01-27
- 4.4.0 — 2025-11-25
- 4.3.0 — 2025-11-14
- 4.2.1 — 2025-10-31
- … 22 more at https://npm.io/package/@quantcdn/quant-client/versions

## README

# Quant TypeScript Client

A comprehensive TypeScript client for the Quant API, providing access to all Quant Cloud services including applications, environments, containers, cron jobs, and more.

## Installation

```bash
npm install quant-ts-client
```

## Usage

```typescript
import { EnvironmentsApi, Configuration } from 'quant-ts-client';

// Create a configuration with your API key
const config = new Configuration({
  apiKey: 'YOUR_API_KEY',
  basePath: 'https://dashboard.quantcdn.io'
});

// Initialize an API instance
const environmentsApi = new EnvironmentsApi(config.basePath);
environmentsApi.setDefaultAuthentication({ 
  applyToRequest: (requestOptions) => {
    if (requestOptions && requestOptions.headers) {
      requestOptions.headers["Authorization"] = `Bearer ${config.apiKey}`;
    }
  }
});

// Example: List all environments for an application
environmentsApi.listEnvironments('your-org-id', 'your-app-id')
  .then(response => {
    console.log(response.body);
  })
  .catch(error => {
    console.error(error);
  });
```

## Available APIs

The client provides access to the following API endpoints:

### Core Services
- `ApplicationsApi` - Manage applications
- `EnvironmentsApi` - Manage environments
- `ContainersApi` - Manage containers
- `CommandsApi` - Execute commands
- `ComposeApi` - Docker Compose and container definitions

### Scheduling & Automation
- `CronApi` - Manage cron jobs
- `CrawlersApi` - Web crawler management
- `CrawlerSchedulesApi` - Crawler scheduling

### Data & Storage
- `VariablesApi` - Environment variables
- `VolumesApi` - Volume management
- `KVApi` - Key-value storage
- `BackupManagementApi` - Backup operations

### Security & Access
- `SSHAccessApi` - SSH access management
- `OrganizationsApi` - Organization management
- `ProjectsApi` - Project management

### Rules & Traffic Management
- `RulesApi` - Unified rules management (auth, redirects, proxies, headers, etc.)

### Infrastructure & Performance
- `DomainsApi` - Domain management
- `HeadersApi` - Custom headers
- `PurgeApi` - Cache purging
- `ScalingPolicyApi` - Auto-scaling policies

### AI & Advanced Features
- `AIServicesApi` - AI services integration

## Examples

### Working with Applications

```typescript
import { ApplicationsApi } from 'quant-ts-client';

const appsApi = new ApplicationsApi(config.basePath);
appsApi.setDefaultAuthentication(auth);

// List all applications
const apps = await appsApi.listApplications('your-org-id');

// Create a new application
const newApp = await appsApi.createApplication('your-org-id', {
  name: 'my-app',
  description: 'My new application'
});
```

### Managing Environments

```typescript
import { EnvironmentsApi } from 'quant-ts-client';

const envsApi = new EnvironmentsApi(config.basePath);
envsApi.setDefaultAuthentication(auth);

// Create an environment
const env = await envsApi.createEnvironment('org-id', 'app-id', {
  name: 'production'
});

// Get environment logs
const logs = await envsApi.getEnvironmentLogs('org-id', 'app-id', 'env-id');
```

### Working with Cron Jobs

```typescript
import { CronApi } from 'quant-ts-client';

const cronApi = new CronApi(config.basePath);
cronApi.setDefaultAuthentication(auth);

// Create a cron job
const cronJob = await cronApi.createCronJob('org-id', 'app-id', 'env-id', {
  name: 'daily-backup',
  schedule: '0 2 * * *',
  command: 'backup-database'
});
```

## Development

### Prerequisites

- Node.js 16+ 
- TypeScript 4.9+

### Building the package

```bash
npm install
npm run build
```

### Testing locally

To test the package locally in another project:

```bash
# In the SDK directory
npm run build
npm link

# In your project directory
npm link quant-ts-client
```

### Publishing the package

```bash
npm publish
```

## TypeScript Support

This package includes full TypeScript definitions and is built with TypeScript 4.9+. All API methods, request/response types, and configuration options are fully typed.

## Error Handling

The client includes comprehensive error handling with typed error responses:

```typescript
try {
  const response = await environmentsApi.getEnvironment('org', 'app', 'env');
} catch (error) {
  if (error instanceof HttpError) {
    console.error(`HTTP ${error.statusCode}: ${error.message}`);
  } else {
    console.error('Unexpected error:', error);
  }
}
```

## License

MIT

---
_Source: https://npm.io/package/@quantcdn/quant-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
