feat: update .gitignore, remove unused API interfaces, and add local dev scripts for bootstrap and seeding connections

This commit is contained in:
2026-07-13 23:13:16 +08:00
parent b1ddf32238
commit 3ae0cc3e60
8 changed files with 166 additions and 204 deletions
-37
View File
@@ -145,27 +145,6 @@ export interface SessionSummary {
updatedAt: string;
}
export interface OrgModelRow {
id: string;
modelId: string;
label: string;
toolCapable: boolean;
sortKey: string;
createdAt: string;
updatedAt: string;
}
export interface OrgRoleRow {
id: string;
roleId: string;
label: string;
defaultModelId: string | null;
systemPrompt: string | null;
tools: string[] | null;
createdAt: string;
updatedAt: string;
}
export interface ProviderConnection {
organizationId: string;
providerId: string;
@@ -269,22 +248,6 @@ export const api = {
return get(`${orgBase(slug)}/usage${qs ? `?${qs}` : ''}`) as Promise<UsageReport>;
},
models: (slug: string) => get(`${orgBase(slug)}/models`) as Promise<{ models: OrgModelRow[] }>,
createModel: (slug: string, body: { modelId: string; label: string; toolCapable?: boolean; sortKey?: string }) =>
post(`${orgBase(slug)}/models`, body) as Promise<OrgModelRow>,
updateModel: (slug: string, id: string, body: { label?: string; toolCapable?: boolean; sortKey?: string; modelId?: string }) =>
patch(`${orgBase(slug)}/models/${id}`, body) as Promise<OrgModelRow>,
deleteModel: (slug: string, id: string) =>
del(`${orgBase(slug)}/models/${id}`),
roles: (slug: string) => get(`${orgBase(slug)}/roles`) as Promise<{ roles: OrgRoleRow[] }>,
createRole: (slug: string, body: { roleId: string; label: string; defaultModelId?: string | null; systemPrompt?: string | null; tools?: string[] | null }) =>
post(`${orgBase(slug)}/roles`, body) as Promise<OrgRoleRow>,
updateRole: (slug: string, id: string, body: { label?: string; defaultModelId?: string | null; systemPrompt?: string | null; tools?: string[] | null; roleId?: string }) =>
patch(`${orgBase(slug)}/roles/${id}`, body) as Promise<OrgRoleRow>,
deleteRole: (slug: string, id: string) =>
del(`${orgBase(slug)}/roles/${id}`),
provider: (slug: string) => get(`${orgBase(slug)}/provider-connection`) as Promise<ProviderConnection>,
setProvider: (slug: string, body: { mode: string; providerId?: string; baseUrl?: string | null; authToken?: string | null }) =>
put(`${orgBase(slug)}/provider-connection`, body) as Promise<ProviderConnection>