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:
@@ -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) ----
|
||||
|
||||
Reference in New Issue
Block a user