The Construct SDK is a TypeScript library for building custom spaces, plugins, and integrations.
Quick Start
bun add construct-sdkDefining a Space
import { defineSpace } from 'construct-sdk'
import { z } from 'zod/v4'
export default defineSpace({
name: 'analytics',
schema: z.object({ dashboardId: z.string() }),
setup(ctx) {
ctx.on('dashboard:refresh', async () => {
const data = await ctx.fetch('/api/metrics')
ctx.ui.update({ metrics: data })
})
}
})