TypeScript types and a Fetch API client generated from the Pulsate OpenAPI schema.
The source package is published as @pulsate/exp-api-types on JSR and as
@pulsate-dev/exp-api-types on npm.
deno add jsr:@pulsate/exp-api-typesnpm install @pulsate-dev/exp-api-typesimport { client, getV0TimelinePublic } from "@pulsate-dev/exp-api-types";
client.setConfig({
baseUrl: "https://demo.pulsate.dev",
});
const { data, error } = await getV0TimelinePublic();
if (error) {
throw error;
}
console.log(data[0]?.content);import type { GetPublicTimelineResponse } from "@pulsate-dev/exp-api-types";
type TimelineProps = {
timeline: GetPublicTimelineResponse;
};
export function Timeline({ timeline }: TimelineProps) {
return timeline.map((note) => note.content);
}Requirements: Deno 2.
deno task builddeno task build fetches the OpenAPI schema from the fixed
@pulsate-dev/api-schema version in deno.json, generates src/, and does not
require a locally copied schema file. OpenAPI descriptions are emitted as JSDoc
comments in generated types and operation functions.
To update the schema, explicitly change the @pulsate-dev/api-schema version in
deno.json and package.json, then regenerate the types and lockfile.
The npm package is generated with dnt.
deno task build-npmPush a v<version> tag matching deno.json's version. GitHub Actions
verifies generated types, publishes @pulsate/exp-api-types to JSR, then
publishes @pulsate-dev/exp-api-types to npm.
Copyright (C) 2025 Pulsate Project
Licensed under Apache 2.0 license