build
This commit is contained in:
parent
64ab623007
commit
9c9570388f
7 changed files with 30 additions and 19 deletions
|
|
@ -10,7 +10,7 @@ import type { zp_enviar_registros } from "../_enviar_registros"
|
|||
import { PREFIXO_PILAO, type zp_deletar_registros } from "../variaveis"
|
||||
import type { visoes } from "../visoes"
|
||||
import type { tipo_pilao_api } from "./pilao-api.ts"
|
||||
import type { tipoConstrutorPilao } from "./tipagem"
|
||||
import type { tipoConstrutorPilao, tipoRetornoSerirconsulta } from "./tipagem"
|
||||
|
||||
class ClassPilao {
|
||||
#produto: string
|
||||
|
|
@ -206,11 +206,7 @@ class ClassPilao {
|
|||
parametros: z.infer<(typeof visoes)[T]>,
|
||||
) {
|
||||
const dados = async (): Promise<
|
||||
tipoResposta<{
|
||||
registros: any[]
|
||||
legenda: string
|
||||
serie: z.infer<(typeof visoes)[T]>
|
||||
}>
|
||||
tipoResposta<tipoRetornoSerirconsulta<T>>
|
||||
> => {
|
||||
const url = this.rotaConsultarSerie(tipoVisao).url
|
||||
const resp = await crossFetch(url.toString(), {
|
||||
|
|
|
|||
|
|
@ -1 +1,10 @@
|
|||
import type { z } from "zod"
|
||||
import type { visoes } from "../visoes"
|
||||
|
||||
export type tipoConstrutorPilao = { produto: string; conta: string }
|
||||
|
||||
export type tipoRetornoSerirconsulta<T extends keyof typeof visoes> = {
|
||||
registros: any[]
|
||||
legenda: string
|
||||
serie: z.infer<(typeof visoes)[T]>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue