@gtmi/ramp-agent-client
v0.0.2
Published
Type-safe SDK for the **RAMP Agent server** (`apps/agent`). Auto-generated from the app's committed OpenAPI spec with [`@hey-api/openapi-ts`](https://heyapi.dev), shipping tree-shakeable per-operation functions, request/response types, and runtime [zod](h
Keywords
Readme
@gtmi/ramp-agent-client
Type-safe SDK for the RAMP Agent server (apps/agent). Auto-generated from
the app's committed OpenAPI spec with
@hey-api/openapi-ts, shipping tree-shakeable
per-operation functions, request/response types, and runtime
zod schemas.
Install
pnpm add @gtmi/ramp-agent-clientUsage
import { createRampAgentClient } from '@gtmi/ramp-agent-client';
const client = createRampAgentClient({
baseUrl: process.env.RAMP_AGENT_URL!,
getAuthToken: () => process.env.CR_SERVER_API_KEY!, // sent as `Authorization: Bearer …`
});Every operation accepts the client returned by createRampAgentClient.
Without getAuthToken, no Authorization header is sent.
Generated zod schemas are exported under schemas.
A note on response types
Request inputs are fully typed and zod-validated. Response types are only as
rich as the OpenAPI spec's response schemas, which are sparse today. As handler
@response JSDoc lands, regenerating this SDK upgrades the response types with
no API change here.
Regenerating
pnpm --filter @gtmi/ramp-agent-client generatesrc/generated/ is committed and drift-checked in CI. Do not edit it by hand.
