elioria-sst-x
    Preparing search index...

    Class SupabaseCipaDocumentoRepository

    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.

      • data: { archivedBy: string; archiveReason: string }

        The data value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, run archive.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db.update(cipaDocumentos).set({ archivedAt: new Date(),.

    • Generated

      Executes delete.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, run delete.

      Behavior: Async; accepts id and tenantId; returns a value; may throw.

      When the function cannot complete normally.

    • Generated

      Returns the result of findByElection.

      Parameters

      • electionId: string

        The electionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaDocumento[]>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByElection.

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

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaDocumento | null>

      The function result.

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

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

    • Generated

      Returns the result of findByMandate.

      Parameters

      • mandateId: string

        The mandateId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaDocumento[]>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByMandate.

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

    • Generated

      Updates data through setLegalHold.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • data: { enabled: boolean; reason: string; userId: string }

        The data value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, change data through setLegalHold.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db.update(cipaDocumentos).set({ legalHold: data.enabled.