AccountDataModule · library/auth/src/repos/user-drafts.ts:9

UserDraftsRepo

component

No JSDoc comment in source yet.

API

@Component()
export class UserDraftsRepo implements UserDraftsStore {
  @Use() private readonly db!: Db;
  list(userId: string): StoredDraft[];
  apply(userId: string, writes: readonly DraftWrite[], bounds: { maxCount: number; maxChars: number }): void;
  deleteBySession(sessionId: string): void;
  deleteByProject(projectId: string): void;
  deleteByAgent(projectId: string, agentId: string): void;
}

Dependencies & Wiring

Extracted from class decorators
implementsinterfaces
@Userequires (1)
db: Db

Methods (5)

list

list(userId: string): StoredDraft[]
@paramuserIdstring
@returnsStoredDraft[]

apply

apply(userId: string, writes: readonly DraftWrite[], bounds: { maxCount: number; maxChars: number }): void
@paramuserIdstring
@paramwritesreadonly DraftWrite[]
@parambounds{ maxCount: number; maxChars: number }
@returnsvoid

deleteBySession

deleteBySession(sessionId: string): void
@paramsessionIdstring
@returnsvoid

deleteByProject

deleteByProject(projectId: string): void
@paramprojectIdstring
@returnsvoid

deleteByAgent

deleteByAgent(projectId: string, agentId: string): void
@paramprojectIdstring
@paramagentIdstring
@returnsvoid