z_validar_colunna_base_dados

This commit is contained in:
Luiz H. R. Silva 2024-06-18 14:23:18 -03:00
parent 4d5de45443
commit f6f39d2d86
21 changed files with 221 additions and 300 deletions

View file

@ -1,15 +1,60 @@
import type { tipoResposta } from "p-respostas";
import { z } from "zod";
import { type zp_produto_conta } from "./_variaveis";
export declare const zp_enviar_registros: z.ZodObject<{
export declare const zp_registrar_base_dados: z.ZodObject<{
tabela: z.ZodString;
registros: z.ZodArray<z.ZodAny, "many">;
colunas: z.ZodArray<z.ZodObject<{
coluna: z.ZodString;
tipo: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>;
}, "strip", z.ZodTypeAny, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
}, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
}>, "many">;
}, "strip", z.ZodTypeAny, {
tabela: string;
registros: any[];
colunas: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
}[];
}, {
tabela: string;
registros: any[];
colunas: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
}[];
}>;
export declare const zp_enviar_registros: z.ZodObject<{
tabela: z.ZodString;
registros: z.ZodArray<z.ZodObject<{
coluna: z.ZodString;
valor: z.ZodAny;
tipo: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>;
}, "strip", z.ZodTypeAny, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
valor?: any;
}, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
valor?: any;
}>, "many">;
}, "strip", z.ZodTypeAny, {
tabela: string;
registros: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
valor?: any;
}[];
}, {
tabela: string;
registros: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
valor?: any;
}[];
}>;
export declare const enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
emDesenvolvimento?: boolean | undefined | null;