This commit is contained in:
Luiz H. R. Silva 2024-07-10 12:24:48 -03:00
parent a01879d461
commit ff1ad317db
6 changed files with 35 additions and 25 deletions

View file

@ -5,50 +5,50 @@ export declare const zp_registrar_base_dados: z.ZodObject<{
tabela: z.ZodString; tabela: z.ZodString;
colunas: z.ZodArray<z.ZodObject<{ colunas: z.ZodArray<z.ZodObject<{
coluna: z.ZodString; coluna: z.ZodString;
tipo: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>; tipo: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "lista_mes", "lista_data", "mes", "data"]>;
}, "strip", z.ZodTypeAny, { }, "strip", z.ZodTypeAny, {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}, { }, {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}>, "many">; }>, "many">;
}, "strip", z.ZodTypeAny, { }, "strip", z.ZodTypeAny, {
tabela: string; tabela: string;
colunas: { colunas: {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}[]; }[];
}, { }, {
tabela: string; tabela: string;
colunas: { colunas: {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}[]; }[];
}>; }>;
export declare const zp_enviar_registros: z.ZodObject<{ export declare const zp_enviar_registros: z.ZodObject<{
tabela: z.ZodString; tabela: z.ZodString;
registros: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{ registros: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
valor: z.ZodAny; valor: z.ZodAny;
tipo: z.ZodNullable<z.ZodOptional<z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>>>; tipo: z.ZodNullable<z.ZodOptional<z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "lista_mes", "lista_data", "mes", "data"]>>>;
}, "strip", z.ZodTypeAny, { }, "strip", z.ZodTypeAny, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}, { }, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}>>, "many">; }>>, "many">;
}, "strip", z.ZodTypeAny, { }, "strip", z.ZodTypeAny, {
tabela: string; tabela: string;
registros: Record<string, { registros: Record<string, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}>[]; }>[];
}, { }, {
tabela: string; tabela: string;
registros: Record<string, { registros: Record<string, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}>[]; }>[];
}>; }>;
export declare const enviar_registros: ({ conta, produto, emDesenvolvimento }: z.infer<typeof zp_produto_conta>) => ({ registros: registros_entrada, tabela, }: z.infer<typeof zp_enviar_registros>) => Promise<tipoResposta<true>>; export declare const enviar_registros: ({ conta, produto, emDesenvolvimento }: z.infer<typeof zp_produto_conta>) => ({ registros: registros_entrada, tabela, }: z.infer<typeof zp_enviar_registros>) => Promise<tipoResposta<true>>;

View file

@ -266,25 +266,25 @@ export declare const pPilao: {
tabela: import("zod").ZodString; tabela: import("zod").ZodString;
colunas: import("zod").ZodArray<import("zod").ZodObject<{ colunas: import("zod").ZodArray<import("zod").ZodObject<{
coluna: import("zod").ZodString; coluna: import("zod").ZodString;
tipo: import("zod").ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>; tipo: import("zod").ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "lista_mes", "lista_data", "mes", "data"]>;
}, "strip", import("zod").ZodTypeAny, { }, "strip", import("zod").ZodTypeAny, {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}, { }, {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}>, "many">; }>, "many">;
}, "strip", import("zod").ZodTypeAny, { }, "strip", import("zod").ZodTypeAny, {
tabela: string; tabela: string;
colunas: { colunas: {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}[]; }[];
}, { }, {
tabela: string; tabela: string;
colunas: { colunas: {
coluna: string; coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes"; tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data";
}[]; }[];
}>; }>;
enviar_registros: ({ conta, produto, emDesenvolvimento }: import("zod").TypeOf<typeof zp_produto_conta>) => ({ registros: registros_entrada, tabela, }: import("zod").TypeOf<typeof zp_enviar_registros>) => Promise<import("p-respostas").tipoResposta<true>>; enviar_registros: ({ conta, produto, emDesenvolvimento }: import("zod").TypeOf<typeof zp_produto_conta>) => ({ registros: registros_entrada, tabela, }: import("zod").TypeOf<typeof zp_enviar_registros>) => Promise<import("p-respostas").tipoResposta<true>>;
@ -292,25 +292,25 @@ export declare const pPilao: {
tabela: import("zod").ZodString; tabela: import("zod").ZodString;
registros: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{ registros: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
valor: import("zod").ZodAny; valor: import("zod").ZodAny;
tipo: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>>>; tipo: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "lista_mes", "lista_data", "mes", "data"]>>>;
}, "strip", import("zod").ZodTypeAny, { }, "strip", import("zod").ZodTypeAny, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}, { }, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}>>, "many">; }>>, "many">;
}, "strip", import("zod").ZodTypeAny, { }, "strip", import("zod").ZodTypeAny, {
tabela: string; tabela: string;
registros: Record<string, { registros: Record<string, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}>[]; }>[];
}, { }, {
tabela: string; tabela: string;
registros: Record<string, { registros: Record<string, {
valor?: any; valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined; tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "lista_mes" | "lista_data" | "mes" | "data" | null | undefined;
}>[]; }>[];
}>; }>;
serie_consultar: (cliente: import("zod").TypeOf<typeof zp_produto_conta>) => <T extends keyof typeof visoes>(tipoVisao: T, parametros: import("zod").TypeOf<(typeof visoes)[T]>) => { serie_consultar: (cliente: import("zod").TypeOf<typeof zp_produto_conta>) => <T extends keyof typeof visoes>(tipoVisao: T, parametros: import("zod").TypeOf<(typeof visoes)[T]>) => {
@ -353,8 +353,10 @@ export declare const pPilao: {
confirmacao: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[]; confirmacao: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
lista_texto: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[]; lista_texto: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
lista_numero: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[]; lista_numero: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
data: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[]; lista_mes: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
lista_data: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
mes: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[]; mes: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
data: ("=" | "!=" | ">" | "<" | ">=" | "<=" | "∩")[];
}; };
z_filtro: import("zod").ZodObject<{ z_filtro: import("zod").ZodObject<{
coluna: import("zod").ZodString; coluna: import("zod").ZodString;

View file

@ -15,7 +15,7 @@ export declare const zp_produto_conta: z.ZodObject<{
produto: string; produto: string;
emDesenvolvimento?: boolean | undefined; emDesenvolvimento?: boolean | undefined;
}>; }>;
export declare const z_tipo_coluna_base_dados: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>; export declare const z_tipo_coluna_base_dados: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "lista_mes", "lista_data", "mes", "data"]>;
export declare const operadores_pilao: z.ZodEnum<["=", "!=", ">", "<", ">=", "<=", "∩"]>; export declare const operadores_pilao: z.ZodEnum<["=", "!=", ">", "<", ">=", "<=", "∩"]>;
export declare const operadores_permitidos_por_tipo: { export declare const operadores_permitidos_por_tipo: {
[key in z.infer<typeof z_tipo_coluna_base_dados>]: z.infer<typeof operadores_pilao>[]; [key in z.infer<typeof z_tipo_coluna_base_dados>]: z.infer<typeof operadores_pilao>[];

View file

@ -20,8 +20,10 @@ export const z_tipo_coluna_base_dados = z.enum([
"confirmacao", "confirmacao",
"lista_texto", "lista_texto",
"lista_numero", "lista_numero",
"data", "lista_mes",
"lista_data",
"mes", "mes",
"data",
]); ]);
export const operadores_pilao = z.enum(["=", "!=", ">", "<", ">=", "<=", "∩"]); export const operadores_pilao = z.enum(["=", "!=", ">", "<", ">=", "<=", "∩"]);
export const operadores_permitidos_por_tipo = { export const operadores_permitidos_por_tipo = {
@ -29,6 +31,8 @@ export const operadores_permitidos_por_tipo = {
data: ["=", "!=", ">", "<", ">=", "<="], data: ["=", "!=", ">", "<", ">=", "<="],
lista_numero: ["∩"], lista_numero: ["∩"],
lista_texto: ["∩"], lista_texto: ["∩"],
lista_mes: ["∩"],
lista_data: ["∩"],
mes: ["=", "!=", ">", "<", ">=", "<="], mes: ["=", "!=", ">", "<", ">=", "<="],
numero: ["=", "!=", ">", "<", ">=", "<="], numero: ["=", "!=", ">", "<", ">=", "<="],
texto: ["=", "!="], texto: ["=", "!="],

View file

@ -1,6 +1,6 @@
{ {
"name": "p-drives", "name": "p-drives",
"version": "0.133.0", "version": "0.134.0",
"description": "", "description": "",
"main": "src/index.ts", "main": "src/index.ts",
"exports": { "exports": {

View file

@ -32,8 +32,10 @@ export const z_tipo_coluna_base_dados = z.enum([
"confirmacao", "confirmacao",
"lista_texto", "lista_texto",
"lista_numero", "lista_numero",
"data", "lista_mes",
"lista_data",
"mes", "mes",
"data",
]) ])
export const operadores_pilao = z.enum(["=", "!=", ">", "<", ">=", "<=", "∩"]) export const operadores_pilao = z.enum(["=", "!=", ">", "<", ">=", "<=", "∩"])
@ -47,6 +49,8 @@ export const operadores_permitidos_por_tipo: {
data: ["=", "!=", ">", "<", ">=", "<="], data: ["=", "!=", ">", "<", ">=", "<="],
lista_numero: ["∩"], lista_numero: ["∩"],
lista_texto: ["∩"], lista_texto: ["∩"],
lista_mes: ["∩"],
lista_data: ["∩"],
mes: ["=", "!=", ">", "<", ">=", "<="], mes: ["=", "!=", ">", "<", ">=", "<="],
numero: ["=", "!=", ">", "<", ">=", "<="], numero: ["=", "!=", ">", "<", ">=", "<="],
texto: ["=", "!="], texto: ["=", "!="],