@afi-ai/platform-client
v1.0.5
Published
Thin TypeScript client for the AFI Platform API
Readme
@afi-ai/platform-client
Thin TypeScript fetch client for the AFI control plane.
cd clients/typescript && pnpm install && pnpm testimport { PlatformClient } from "@afi-ai/platform-client";
const client = new PlatformClient({
baseUrl: "http://localhost:8081",
getToken: () => process.env.AFI_TOKEN!,
});
const orgs = await client.listOrganizations();OpenAPI types are generated into src/schema.gen.ts via make openapi-gen.
Gateway signed requests
import { signHeaders } from "@afi-ai/platform-client";
const headers = {
"Content-Type": "application/json",
...signHeaders({
method: "POST",
url: "http://localhost:8080/v1/chat/completions",
body,
privateKeyPem,
keyId: "local-signer",
}),
};Release time: Jul 29 01:37 AM
