@trillboards/types
v0.1.0
Published
Shared spec-derived wire types for the Trillboards DOOH Partner API — the single source of the generated OpenAPI type surface, re-exported for every Trillboards SDK.
Maintainers
Readme
@trillboards/types
Shared wire types for the Trillboards DOOH Partner API — the single source of the generated OpenAPI type surface, re-exported for every Trillboards SDK.
npm install @trillboards/typesWhat this is
These are the spec-derived TypeScript types generated from the merged partner
OpenAPI contract (trillboard-api/docs/openapi/merged/partner-api.json). They are
emitted and drift-guarded in exactly one place —
@trillboards/api-client's
./generated subpath — and re-exported here verbatim.
The point is de-duplication: every Trillboards JS SDK
(@trillboards/ctv-measurement, @trillboards/edge-core, …) imports the same
on-the-wire shapes from one package, instead of each SDK redefining them
locally or reaching into the client SDK directly. There is no second copy to
drift — the generated file in @trillboards/api-client is the single source of
truth, and this package is a stable, client-runtime-free import surface over it.
This is a re-export, not a client wrapper: it adds zero runtime behavior. The
only runtime value it carries through is the generatedTypes registry const (the
spec's schema/operation name lists). The HTTP client, authentication, retries, and
webhook verification all live in @trillboards/api-client.
Usage
// Wire shapes for a partner heartbeat payload
import type {
PartnerDeviceHeartbeatBody,
BleScanResultData,
WifiScanResult,
} from '@trillboards/types';
// The generated registry (schema + operation name lists)
import { generatedTypes } from '@trillboards/types';
console.log(generatedTypes.schemaCount, generatedTypes.operationCount);Advanced callers who want the full raw schema namespace can still import it directly from the client's subpath:
import type * as Generated from '@trillboards/api-client/generated';Versioning
The type surface tracks the partner API contract. Breaking wire-shape changes are
released as semver-major bumps of @trillboards/api-client; this package pins a
compatible @trillboards/api-client range and re-exports whatever it ships.
License
MIT
