60 lines
2.3 KiB
TypeScript
60 lines
2.3 KiB
TypeScript
import type { tipoResposta } from "p-respostas";
|
|
import { z } from "zod";
|
|
import { type zp_produto_conta } from "./_variaveis";
|
|
export declare const zp_registrar_base_dados: z.ZodObject<{
|
|
tabela: z.ZodString;
|
|
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;
|
|
colunas: {
|
|
coluna: string;
|
|
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
|
}[];
|
|
}, {
|
|
tabela: string;
|
|
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.ZodRecord<z.ZodString, z.ZodObject<{
|
|
valor: z.ZodAny;
|
|
tipo: z.ZodNullable<z.ZodOptional<z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>>>;
|
|
}, "strip", z.ZodTypeAny, {
|
|
valor?: any;
|
|
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
|
|
}, {
|
|
valor?: any;
|
|
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
|
|
}>>, "many">;
|
|
}, "strip", z.ZodTypeAny, {
|
|
tabela: string;
|
|
registros: Record<string, {
|
|
valor?: any;
|
|
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
|
|
}>[];
|
|
}, {
|
|
tabela: string;
|
|
registros: Record<string, {
|
|
valor?: any;
|
|
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
|
|
}>[];
|
|
}>;
|
|
export declare const enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
|
emDesenvolvimento?: boolean | undefined | null;
|
|
/** Identificação do cliente */
|
|
cliente: z.infer<typeof zp_produto_conta>;
|
|
/** Parametros da função */
|
|
parametros: z.infer<typeof zp_enviar_registros>;
|
|
}) => Promise<tipoResposta<true>>;
|