mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-04 19:28:46 +01:00
Integrate connection pools with the native connector workflow
Declare pooled connectors through plugin metadata and use the existing catalog, setup header, account page, and sidebar. Select only saved connections, preserve ordered membership, and keep optional runtime and usage settings in Advanced. Route ordinary removal through pin-preserving pool archival. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
6ed022757d
commit
a913ebe4f4
26 files changed
+533
-98
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import type { AiConnectionPool, AiConnectionPoolConfig, AiConnectionUsage } from "@paperclipai/shared";
|
||||
import { api } from "./client";
|
||||
export type PoolInspection = Record<string, { reason: string; checkedAt: string | null; usage?: AiConnectionUsage }>;
|
||||
export const aiConnectionPoolsApi = {
|
||||
list: (companyId: string) => api.get<AiConnectionPool[]>(`/companies/${companyId}/ai-connection-pools`),
|
||||
save: (companyId: string, body: { pluginKey: string; id?: string; expectedRevision?: number; config: AiConnectionPoolConfig }) => api.post<AiConnectionPool>(`/companies/${companyId}/ai-connection-pools`, body),
|
||||
inspect: (companyId: string, id: string) => api.get<PoolInspection>(`/companies/${companyId}/ai-connection-pools/${id}/inspection`),
|
||||
remove: (companyId: string, id: string, expectedRevision: number) => api.delete(`/companies/${companyId}/ai-connection-pools/${id}`, { expectedRevision }),
|
||||
};
|
||||
Reference in new issue
Block a user