elioria-sst-x
    Preparing search index...

    Class SupabaseAiAssistanceAuditRepository

    Persistent AssistanceAudit backed by ai_assistance_audit table. Idempotent on requestId+tenantId (unique constraint).

    Implements

    Index
    clock: ClockPort
    db: PostgresJsDatabase<packages/db/src/schema> & {}

    The db value.

    • Generated

      Returns the result of findByRequestId.

      Parameters

      • requestId: string

        The requestId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<AssistanceAuditEntry | null>

      The function result.

      Objective: In module packages/db/src/repositories/ai-assistance-audit.repository.ts, retrieve data through findByRequestId.

      Behavior: Async; accepts requestId and tenantId; returns a value; invokes this.db .select() .from(aiAssistanceAudit) .where( and( eq(a.

    • Generated

      Returns the result of findLatestAcceptedByEntity.

      Parameters

      • entityType: string

        The entityType value.

      • entityId: string

        The entityId value.

      • capabilityId: string

        The capabilityId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<AssistanceAuditEntry | null>

      The function result.

      Objective: In module packages/db/src/repositories/ai-assistance-audit.repository.ts, retrieve data through findLatestAcceptedByEntity.

      Behavior: Async; accepts entityType and entityId and capabilityId and tenantId; returns a value; invokes this.db .select() .from(aiAssistanceAudit) .where( and( eq(a.

    • Generated

      Updates data through updateAcceptance.

      Parameters

      • requestId: string

        The requestId value.

      • accepted: boolean

        The accepted value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/ai-assistance-audit.repository.ts, change data through updateAcceptance.

      Behavior: Async; accepts requestId and accepted; returns a value; invokes this.db .update(aiAssistanceAudit) .set({ userAccepted: acce.

    • Generated

      Updates data through updateAcceptanceForTenant.

      Parameters

      • requestId: string

        The requestId value.

      • tenantId: string

        The tenantId value.

      • accepted: boolean

        The accepted value.

      Returns Promise<boolean>

      The function result.

      Objective: In module packages/db/src/repositories/ai-assistance-audit.repository.ts, change data through updateAcceptanceForTenant.

      Behavior: Async; accepts requestId and tenantId and accepted; returns a value; invokes this.db .update(aiAssistanceAudit) .set({ userAccepted: acce.