melhorias
This commit is contained in:
parent
7a1a1a4a24
commit
dcba11dbb8
6 changed files with 16 additions and 12 deletions
|
|
@ -13,6 +13,8 @@ import type { visoes_pilao, z_padroes } from "../visoes/listaDeVisoes"
|
|||
import type { tipo_pilao_api } from "./pilao-api.ts"
|
||||
import type { tipoConstrutorPilao, tipoRetornoSerieconsulta } from "./tipagem"
|
||||
|
||||
type nomesVisoes = keyof typeof visoes_pilao
|
||||
|
||||
class ClassPilao {
|
||||
#produto: string
|
||||
#conta: string
|
||||
|
|
@ -55,11 +57,11 @@ class ClassPilao {
|
|||
return this.#gerarUrl("deletar-registros")
|
||||
}
|
||||
|
||||
rotaConsultarSerie(tipoVisao: keyof typeof visoes_pilao | ":tipoVisao") {
|
||||
rotaConsultarSerie(tipoVisao: nomesVisoes | ":tipoVisao") {
|
||||
return this.#gerarUrl("consultar-serie", tipoVisao)
|
||||
}
|
||||
|
||||
rotaIframeSerie(tipoVisao: keyof typeof visoes_pilao | ":tipoVisao") {
|
||||
rotaIframeSerie(tipoVisao: nomesVisoes | ":tipoVisao") {
|
||||
const rota = `${PREFIXO_PILAO}/consultar-serie/${this.#produto}/${this.#conta}/${tipoVisao}`
|
||||
const url = `${this.baseUrlSite}${rota}`
|
||||
return { rota, url }
|
||||
|
|
@ -220,7 +222,7 @@ class ClassPilao {
|
|||
return respostaComuns.valor(true)
|
||||
}
|
||||
|
||||
serieConsultar<T extends keyof typeof visoes_pilao>(
|
||||
serieConsultar<T extends nomesVisoes>(
|
||||
tipoVisao: T,
|
||||
parametros: z.infer<(typeof visoes_pilao)[T]> & z.infer<typeof z_padroes>,
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue