elioria-sst-x
    Preparing search index...

    Class SupabaseInvestigationEvidenceRepository

    Implements

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

    The db value.

    • Generated

      Executes archive.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • archivedBy: string

        The archivedBy value.

      • Optionalreason: string

        The reason value.

      • Optionalnow: Date

        The now value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, run archive.

      Behavior: Async; accepts id and tenantId and archivedBy and reason and now; returns a value; invokes this.findById; may throw.

      When the function cannot complete normally.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InvestigationEvidence | null>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, retrieve data through findById.

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

    • Generated

      Returns the result of findByInvestigation.

      Parameters

      • investigationId: string

        The investigationId value.

      • tenantId: string

        The tenantId value.

      • Optionalquery: { includeArchived?: boolean; page?: number; pageSize?: number }

        The query value.

      Returns Promise<PagedResult<InvestigationEvidence>>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, retrieve data through findByInvestigation.

      Behavior: Async; accepts investigationId and tenantId and query; returns a value; invokes eq.

    • Generated

      Returns the result of findByStorageKeyPrefix.

      Parameters

      • prefix: string

        The prefix value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InvestigationEvidence[]>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, retrieve data through findByStorageKeyPrefix.

      Behavior: Async; accepts prefix and tenantId; returns a value; invokes this.db .select() .from(investigationEvidence) .where.

    • Generated

      Returns the result of findPendingUploads.

      Parameters

      • tenantId: string

        The tenantId value.

      • cutoffDate: Date

        The cutoffDate value.

      Returns Promise<InvestigationEvidence[]>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, retrieve data through findPendingUploads.

      Behavior: Async; accepts tenantId and cutoffDate; returns a value; invokes this.db .select() .from(investigationEvidence) .where.

    • Generated

      Updates data through updateGovernance.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • data: {
            legalHold: boolean;
            legalHoldAt: Date;
            legalHoldBy: string;
            legalHoldReason?: string | null;
            retentionUntil?: string | null;
        }

        The data value.

      Returns Promise<InvestigationEvidence>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, change data through updateGovernance.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db.update(investigationEvidence).set({ retentionUntil: ; may throw.

      When the function cannot complete normally.

    • Generated

      Updates data through updateMetadata.

      Parameters

      Returns Promise<InvestigationEvidence>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, change data through updateMetadata.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db .update(investigationEvidence) .set(data as Record<s; may throw.

      When the function cannot complete normally.

    • Generated

      Updates data through updateUploadStatus.

      Parameters

      Returns Promise<InvestigationEvidence>

      The function result.

      Objective: In module packages/db/src/repositories/investigacao-v2.repository.ts, change data through updateUploadStatus.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db .update(investigationEvidence) .set(setData) .where(; may throw.

      When the function cannot complete normally.