npm.io
2.3.2 • Published 3 weeks ago

@scramjet/api-client

Licence
MIT
Version
2.3.2
Deps
5
Size
37 kB
Vulns
0
Weekly
0
Stars
71

@scramjet/api-client

Legacy v1 API client for Scramjet Transform Hub. Provides typed clients for interacting with Hub/STH, Manager, Instance, and Sequence APIs using the /api/v1 route tree.

When to use

Use @scramjet/api-client when maintaining existing integrations that target the v1 API. The v1 API remains supported for backwards compatibility.

For new integrations, prefer @scramjet/rest-api2 which provides the current v2 API contract with typed route definitions, fluent clients, and transport-agnostic usage.

Quick start

import { HostClient } from "@scramjet/api-client";
import { ManagerClient } from "@scramjet/api-client";

// Host client — connect directly to an STH instance
const host = new HostClient("http://localhost:8000/api/v1");

// Manager client — connect to a Manager
const manager = new ManagerClient("http://manager-host:8200/api/v1");

Stability

This package is stable and maintained for backwards compatibility. The v1 API route tree is not being extended with new features.

Legacy status

The v1 API client targets the /api/v1 route tree on STH and Manager. The HostClient, InstanceClient, and SequenceClient provide methods for lifecycle management, input/output streaming, and monitoring using the v1 API contract.

See the legacy v1 API client documentation for detailed v1 usage patterns.

See also

Install

npm install @scramjet/api-client

Import

import { /* ... */ } from "@scramjet/api-client";

Documentation

See the package docs for full documentation.