@gtmi/ramp-site-client
v0.0.3
Published
Type-safe SDK for the **RAMP site API** (`apps/site`, Next.js route handlers). 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,
Keywords
Readme
@gtmi/ramp-site-client
Type-safe SDK for the RAMP site API (apps/site, Next.js route handlers).
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-site-clientUsage
import { createRampSiteClient } from '@gtmi/ramp-site-client';
const client = createRampSiteClient({
baseUrl: process.env.RAMP_SITE_URL!,
getAuthToken: () => process.env.CR_SERVER_API_KEY!, // sent as `Authorization: Bearer …`
});Every operation accepts the client returned by createRampSiteClient. 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-site-client generatesrc/generated/ is committed and drift-checked in CI. Do not edit it by hand.
