No JSDoc comment in source yet.
API
@Component()
export class AgentApiRepo implements AgentApi {
@Use() private readonly db!: Db;
get(projectId: string, agentId: string): AgentApiRow | null;
set(projectId: string, agentId: string, patch: AgentApiPatch, at: string): AgentApiRow;
enabledAgents(projectId: string): string[];
listKeys(projectId: string, agentId: string): AgentApiKeyRow[];
insertKey(row: AgentApiKeyRow & { tokenHash: string }): void;
findKeyByHash(tokenHash: string): AgentApiKeyRow | null;
touchKey(keyId: string, at: string): void;
deleteKey(projectId: string, agentId: string, keyId: string): boolean;
deleteByAgent(projectId: string, agentId: string): void;
deleteByProject(projectId: string): void;
}Dependencies & Wiring
Extracted from class decoratorsMethods (10)
get
get(projectId: string, agentId: string): AgentApiRow | null@paramprojectId
string@paramagentId
string@returns
AgentApiRow | nullset
set(projectId: string, agentId: string, patch: AgentApiPatch, at: string): AgentApiRow@paramprojectId
string@paramagentId
string@parampatch
AgentApiPatch@paramat
string@returns
AgentApiRowenabledAgents
enabledAgents(projectId: string): string[]@paramprojectId
string@returns
string[]listKeys
listKeys(projectId: string, agentId: string): AgentApiKeyRow[]@paramprojectId
string@paramagentId
string@returns
AgentApiKeyRow[]insertKey
insertKey(row: AgentApiKeyRow & { tokenHash: string }): void@paramrow
AgentApiKeyRow & { tokenHash: string }@returns
voidfindKeyByHash
findKeyByHash(tokenHash: string): AgentApiKeyRow | null@paramtokenHash
string@returns
AgentApiKeyRow | nulltouchKey
touchKey(keyId: string, at: string): void@paramkeyId
string@paramat
string@returns
voiddeleteKey
deleteKey(projectId: string, agentId: string, keyId: string): boolean@paramprojectId
string@paramagentId
string@paramkeyId
string@returns
booleandeleteByAgent
deleteByAgent(projectId: string, agentId: string): void@paramprojectId
string@paramagentId
string@returns
voiddeleteByProject
deleteByProject(projectId: string): void@paramprojectId
string@returns
void