elioria-sst-x
    Preparing search index...

    Implements

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

    The db value.

    • Generated

      Returns the result of findAll.

      Returns Promise<Company[]>

      The function result.

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

      Behavior: Async; returns a value; invokes this.db .select() .from(companies) .orderBy.

    • Generated

      Returns the result of findAllByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<Company[]>

      The function result.

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

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

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      Returns Promise<Company | null>

      The function result.

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

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

    • Generated

      Returns the result of findByIds.

      Parameters

      • ids: string[]

        The ids value.

      Returns Promise<Company[]>

      The function result.

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

      Behavior: Async; accepts ids; returns a value; invokes this.db .select() .from(companies) .where.

    • Generated

      Returns the result of findByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<Company | null>

      The function result.

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

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

    • Generated

      Executes update.

      Parameters

      • id: string

        The id value.

      • data: Partial<
            {
                bairro: string;
                cep: string;
                cnaePrincipal: string;
                cnaePrincipalDescricao: string;
                cnaesSecundarios: { codigo: string; descricao: string }[];
                cnpj: string;
                complemento: string;
                grauRisco: number;
                lastCnpjLookupAt: string;
                logoUrl: string;
                logradouro: string;
                municipio: string;
                nomeFantasia: string;
                numero: string;
                razaoSocial: string;
                responsavelLegal: string;
                telefone: string;
                uf: string;
            },
        >

        The data value.

      Returns Promise<Company | null>

      The function result.

      Objective: In module packages/db/src/repositories/company.repository.ts, run update.

      Behavior: Async; accepts id and data; returns a value; invokes this.db .update(companies) .set(row) .where(eq(companies.id,.