elioria-sst-x
    Preparing search index...

    Class SupabaseEsocialEventRepository

    Implements

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

    The db value.

    • Generated

      Executes countPendingByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<number>

      The function result.

      Objective: In module packages/db/src/repositories/esocial-event.repository.ts, run countPendingByTenant.

      Behavior: Async; accepts tenantId; returns a value; invokes this.db .select({ count: sql<number>count(*) }) .from(esoc.

    • Generated

      Returns the result of findByCompany.

      Parameters

      • tenantId: string

        The tenantId value.

      • companyId: string

        The companyId value.

      • OptionalunitId: string

        The unitId value.

      Returns Promise<EsocialEvent[]>

      The function result.

      Objective: In module packages/db/src/repositories/esocial-event.repository.ts, retrieve data through findByCompany.

      Behavior: Async; accepts tenantId and companyId and unitId; returns a value; invokes eq.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      Returns Promise<EsocialEvent | null>

      The function result.

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

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

    • Generated

      Returns the result of findByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<EsocialEvent[]>

      The function result.

      Objective: In module packages/db/src/repositories/esocial-event.repository.ts, retrieve data through findByTenant.

      Behavior: Async; accepts tenantId; returns a value; invokes this.db .select() .from(esocialEvents) .where(eq(esocialEven.

    • Generated

      Updates data through updateTransmission.

      Parameters

      • id: string

        The id value.

      • data: {
            errorMessage?: string | null;
            protocolNumber?: string | null;
            status: EsocialTransmissionStatus;
            transmittedAt?: Date | null;
            xsdErrors?: string[];
            xsdValid?: boolean;
        }

        The data value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/esocial-event.repository.ts, change data through updateTransmission.

      Behavior: Async; accepts id and data; returns a value; invokes this.db.update(esocialEvents).set({ transmissionStatus: data.