melhorias
This commit is contained in:
parent
7a1a1a4a24
commit
dcba11dbb8
6 changed files with 16 additions and 12 deletions
|
|
@ -297,6 +297,7 @@ type tipoRetornoSerieconsulta<T extends keyof typeof visoes_pilao> = {
|
||||||
|
|
||||||
/** Drive completo do piilão de dados */
|
/** Drive completo do piilão de dados */
|
||||||
|
|
||||||
|
type nomesVisoes = keyof typeof visoes_pilao;
|
||||||
declare class ClassPilao {
|
declare class ClassPilao {
|
||||||
#private;
|
#private;
|
||||||
constructor({ conta, produto, emDesenvolvimento, ver_log, }: tipoConstrutorPilao & {
|
constructor({ conta, produto, emDesenvolvimento, ver_log, }: tipoConstrutorPilao & {
|
||||||
|
|
@ -311,11 +312,11 @@ declare class ClassPilao {
|
||||||
rota: string;
|
rota: string;
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
rotaConsultarSerie(tipoVisao: keyof typeof visoes_pilao | ":tipoVisao"): {
|
rotaConsultarSerie(tipoVisao: nomesVisoes | ":tipoVisao"): {
|
||||||
rota: string;
|
rota: string;
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
rotaIframeSerie(tipoVisao: keyof typeof visoes_pilao | ":tipoVisao"): {
|
rotaIframeSerie(tipoVisao: nomesVisoes | ":tipoVisao"): {
|
||||||
rota: string;
|
rota: string;
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
|
|
@ -331,7 +332,7 @@ declare class ClassPilao {
|
||||||
adicionarCodigoParaDeletar(tabela: string, ...codigos: z.infer<typeof zp_deletar_registros>["codigos"]): this;
|
adicionarCodigoParaDeletar(tabela: string, ...codigos: z.infer<typeof zp_deletar_registros>["codigos"]): this;
|
||||||
private processarRegistros;
|
private processarRegistros;
|
||||||
salvarRegistros(): Promise<tipoResposta<true>>;
|
salvarRegistros(): Promise<tipoResposta<true>>;
|
||||||
serieConsultar<T extends keyof typeof visoes_pilao>(tipoVisao: T, parametros: z.infer<(typeof visoes_pilao)[T]> & z.infer<typeof z_padroes>): {
|
serieConsultar<T extends nomesVisoes>(tipoVisao: T, parametros: z.infer<(typeof visoes_pilao)[T]> & z.infer<typeof z_padroes>): {
|
||||||
dados: () => Promise<tipoResposta<tipoRetornoSerieconsulta<T>>>;
|
dados: () => Promise<tipoResposta<tipoRetornoSerieconsulta<T>>>;
|
||||||
url: () => string;
|
url: () => string;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
7
dist-require/index.d.ts
vendored
7
dist-require/index.d.ts
vendored
|
|
@ -297,6 +297,7 @@ type tipoRetornoSerieconsulta<T extends keyof typeof visoes_pilao> = {
|
||||||
|
|
||||||
/** Drive completo do piilão de dados */
|
/** Drive completo do piilão de dados */
|
||||||
|
|
||||||
|
type nomesVisoes = keyof typeof visoes_pilao;
|
||||||
declare class ClassPilao {
|
declare class ClassPilao {
|
||||||
#private;
|
#private;
|
||||||
constructor({ conta, produto, emDesenvolvimento, ver_log, }: tipoConstrutorPilao & {
|
constructor({ conta, produto, emDesenvolvimento, ver_log, }: tipoConstrutorPilao & {
|
||||||
|
|
@ -311,11 +312,11 @@ declare class ClassPilao {
|
||||||
rota: string;
|
rota: string;
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
rotaConsultarSerie(tipoVisao: keyof typeof visoes_pilao | ":tipoVisao"): {
|
rotaConsultarSerie(tipoVisao: nomesVisoes | ":tipoVisao"): {
|
||||||
rota: string;
|
rota: string;
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
rotaIframeSerie(tipoVisao: keyof typeof visoes_pilao | ":tipoVisao"): {
|
rotaIframeSerie(tipoVisao: nomesVisoes | ":tipoVisao"): {
|
||||||
rota: string;
|
rota: string;
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
|
|
@ -331,7 +332,7 @@ declare class ClassPilao {
|
||||||
adicionarCodigoParaDeletar(tabela: string, ...codigos: z.infer<typeof zp_deletar_registros>["codigos"]): this;
|
adicionarCodigoParaDeletar(tabela: string, ...codigos: z.infer<typeof zp_deletar_registros>["codigos"]): this;
|
||||||
private processarRegistros;
|
private processarRegistros;
|
||||||
salvarRegistros(): Promise<tipoResposta<true>>;
|
salvarRegistros(): Promise<tipoResposta<true>>;
|
||||||
serieConsultar<T extends keyof typeof visoes_pilao>(tipoVisao: T, parametros: z.infer<(typeof visoes_pilao)[T]> & z.infer<typeof z_padroes>): {
|
serieConsultar<T extends nomesVisoes>(tipoVisao: T, parametros: z.infer<(typeof visoes_pilao)[T]> & z.infer<typeof z_padroes>): {
|
||||||
dados: () => Promise<tipoResposta<tipoRetornoSerieconsulta<T>>>;
|
dados: () => Promise<tipoResposta<tipoRetornoSerieconsulta<T>>>;
|
||||||
url: () => string;
|
url: () => string;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "p-drives",
|
"name": "p-drives",
|
||||||
"version": "0.194.0",
|
"version": "0.195.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ import type { visoes_pilao, z_padroes } from "../visoes/listaDeVisoes"
|
||||||
import type { tipo_pilao_api } from "./pilao-api.ts"
|
import type { tipo_pilao_api } from "./pilao-api.ts"
|
||||||
import type { tipoConstrutorPilao, tipoRetornoSerieconsulta } from "./tipagem"
|
import type { tipoConstrutorPilao, tipoRetornoSerieconsulta } from "./tipagem"
|
||||||
|
|
||||||
|
type nomesVisoes = keyof typeof visoes_pilao
|
||||||
|
|
||||||
class ClassPilao {
|
class ClassPilao {
|
||||||
#produto: string
|
#produto: string
|
||||||
#conta: string
|
#conta: string
|
||||||
|
|
@ -55,11 +57,11 @@ class ClassPilao {
|
||||||
return this.#gerarUrl("deletar-registros")
|
return this.#gerarUrl("deletar-registros")
|
||||||
}
|
}
|
||||||
|
|
||||||
rotaConsultarSerie(tipoVisao: keyof typeof visoes_pilao | ":tipoVisao") {
|
rotaConsultarSerie(tipoVisao: nomesVisoes | ":tipoVisao") {
|
||||||
return this.#gerarUrl("consultar-serie", 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 rota = `${PREFIXO_PILAO}/consultar-serie/${this.#produto}/${this.#conta}/${tipoVisao}`
|
||||||
const url = `${this.baseUrlSite}${rota}`
|
const url = `${this.baseUrlSite}${rota}`
|
||||||
return { rota, url }
|
return { rota, url }
|
||||||
|
|
@ -220,7 +222,7 @@ class ClassPilao {
|
||||||
return respostaComuns.valor(true)
|
return respostaComuns.valor(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
serieConsultar<T extends keyof typeof visoes_pilao>(
|
serieConsultar<T extends nomesVisoes>(
|
||||||
tipoVisao: T,
|
tipoVisao: T,
|
||||||
parametros: z.infer<(typeof visoes_pilao)[T]> & z.infer<typeof z_padroes>,
|
parametros: z.infer<(typeof visoes_pilao)[T]> & z.infer<typeof z_padroes>,
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue