The Coline App SDK: apps, tools, file types and surfaces that run inside Coline workspaces, and public websites with Coline Sites. TypeScript, with an in-memory test workspace. MIT.
TypeScript SDK for building apps on Coline and integrating with Coline over API.
ColineApiClient
High-level wrapper for common Coline platform operations.createAppPlatformClient
Raw generated OpenAPI client for the current app-platform surface.ColineApp
Manifest/file type/app-definition builder for app authors.openapi/app-platform-v1.jsonsrc/generated/app-platform-v1.tsFrom the repo root:
pnpm sdk:generate:openapi
Or from the package:
pnpm --filter @colineapp/sdk generate:openapi
import { ColineApiClient } from "@colineapp/sdk";
const coline = new ColineApiClient({
baseUrl: "https://coline.app",
apiKey: process.env["COLINE_API_KEY"],
});
const apps = await coline.listApps();
console.log(apps.apps);
Use the generated client if you want spec-driven methods directly:
import { createAppPlatformClient } from "@colineapp/sdk";
const client = createAppPlatformClient({
baseUrl: "https://coline.app",
apiKey: process.env["COLINE_API_KEY"],
});
const { data, error } = await client.GET("/api/v1/apps");
if (error) throw error;
console.log(data.data.apps);
import { ColineApiClient } from "@colineapp/sdk";
const client = new ColineApiClient({
baseUrl: "https://coline.app",
apiKey: process.env["COLINE_API_KEY"],
});
await client.registerApp({
version: "0.1.0",
manifest: {
key: "com.example.notes",
name: "Example Notes",
permissions: ["app.home.read", "files.read", "files.write"],
notificationChannels: [],
hosting: {
mode: "external",
baseUrl: "https://notes.example.com",
},
},
fileTypes: [
{
typeKey: "com.example.notes.note",
name: "Note",
storage: "coline_document",
indexable: true,
homeRenderMode: "cached",
},
],
});