feat(cli): add inkreach-teable plugin commands

plugin list: list registered plugins (id/name/status/runtimeType)
plugin register: register by URL (--name --url --positions)
plugin config list: list base configs (pluginId/tableId/enabled/form/write)
plugin config enable/disable: enable/disable per table or base-wide

Added 5 client methods: getPlugins, registerPlugin, listPluginConfigs,
upsertPluginConfig for CRUD.
This commit is contained in:
yeuimu
2026-08-06 09:03:04 +08:00
parent 584b75ba69
commit 0891bda134
6 changed files with 294 additions and 0 deletions
+14
View File
@@ -224,6 +224,20 @@ export class Client {
sql(baseId: string, sql: string) {
return this.call<unknown[]>('POST', `/api/base/${baseId}/sql`, { sql });
}
// ---- plugin ----
getPlugins() {
return this.call<unknown[]>('GET', '/api/plugin');
}
registerPlugin(body: Record<string, unknown>) {
return this.call<unknown>('POST', '/api/plugin', body);
}
listPluginConfigs(baseId: string) {
return this.call<unknown[]>('GET', `/api/base/${baseId}/plugin-config`);
}
upsertPluginConfig(baseId: string, pluginId: string, body: Record<string, unknown>) {
return this.call<unknown>('PUT', `/api/base/${baseId}/plugin-config/${pluginId}`, body);
}
}
// ---- shared types (mirror backend workflow_node / workflow_edge shapes) ----