elioria-sst-x
    Preparing search index...

    Class SupabaseInvestigationTimelineEventRepository

    Implements

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

    The db value.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InvestigationTimelineEvent | 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(investigationTimelineEvents) .where(.

    • Generated

      Returns the result of findByInvestigation.

      Parameters

      • investigationId: string

        The investigationId value.

      • tenantId: string

        The tenantId value.

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

        The query value.

      Returns Promise<PagedResult<InvestigationTimelineEvent>>

      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 getLinkedEvidence.

      Parameters

      • timelineEventId: string

        The timelineEventId 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 getLinkedEvidence.

      Behavior: Async; accepts timelineEventId and tenantId; returns a value; invokes this.db .select() .from(investigationTimelineEvidenceLinks) .

    • Generated

      Executes linkEvidence.

      Parameters

      • tenantId: string

        The tenantId value.

      • timelineEventId: string

        The timelineEventId value.

      • evidenceId: string

        The evidenceId value.

      Returns Promise<TimelineEvidenceLink>

      The function result.

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

      Behavior: Async; accepts tenantId and timelineEventId and evidenceId; returns a value; invokes this.db .insert(investigationTimelineEvidenceLinks) .values(.

    • Generated

      Executes remove.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • removedBy: string

        The removedBy 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 remove.

      Behavior: Async; accepts id and tenantId and removedBy and reason and now; returns a value; invokes this.db .update(investigationTimelineEvents) .set({ removedA.

    • Generated

      Executes unlinkEvidence.

      Parameters

      • tenantId: string

        The tenantId value.

      • timelineEventId: string

        The timelineEventId value.

      • evidenceId: string

        The evidenceId value.

      Returns Promise<void>

      The function result.

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

      Behavior: Async; accepts tenantId and timelineEventId and evidenceId; returns a value; invokes this.db .delete(investigationTimelineEvidenceLinks) .where.

    • Generated

      Executes update.

      Parameters

      Returns Promise<InvestigationTimelineEvent>

      The function result.

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

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db .update(investigationTimelineEvents) .set(data as Re; may throw.

      When the function cannot complete normally.