2026-04-25 14:57:58 +00:00
2026-04-25 14:57:58 +00:00
2026-04-25 14:57:58 +00:00
2026-04-25 14:57:58 +00:00
2026-04-25 14:57:58 +00:00
2026-04-25 14:57:58 +00:00
2026-04-25 14:57:58 +00:00
2026-04-25 14:57:58 +00:00

@serve.zone/api

Type-safe API client for Cloudly and the serve.zone control plane.

Install

pnpm add @serve.zone/api

Usage

import { CloudlyApiClient } from '@serve.zone/api';

const client = new CloudlyApiClient({
  registerAs: 'api',
  cloudlyUrl: 'https://cloudly.example.com:443',
});

await client.start();

const identity = await client.getIdentityByToken('service-token', {
  tagConnection: true,
  statefullIdentity: true,
});

const clusterConfig = await client.getClusterConfigFromCloudlyByIdentity(identity);

Notes

  • The client uses TypedSocket for WebSocket RPC and TypedRequest for HTTP fallback in selected methods.
  • Shared contracts are provided by @serve.zone/interfaces.
S
Description
No description provided
Readme 154 KiB
Languages
TypeScript 100%