.
This commit is contained in:
parent
d8a5a12387
commit
b799294b0e
24 changed files with 90 additions and 70 deletions
3
dist-import/pilao-de-dados/_variaveis.d.ts
vendored
3
dist-import/pilao-de-dados/_variaveis.d.ts
vendored
|
|
@ -12,7 +12,8 @@ export declare const zp_produto_conta: z.ZodObject<{
|
|||
produto: string;
|
||||
conta: string;
|
||||
}>;
|
||||
export declare const tiposColunas: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>;
|
||||
export declare const tiposColunasBasedados: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>;
|
||||
export declare const tiposSeriesAgregacoes: z.ZodEnum<["contagem", "somatoria"]>;
|
||||
export declare const validarColuna: {
|
||||
texto: z.ZodNullable<z.ZodString>;
|
||||
numero: z.ZodNullable<z.ZodNumber>;
|
||||
|
|
|
|||
|
|
@ -14,13 +14,14 @@ export const zp_produto_conta = z.object({
|
|||
produto: z.string(),
|
||||
conta: z.string(),
|
||||
});
|
||||
export const tiposColunas = z.enum([
|
||||
export const tiposColunasBasedados = z.enum([
|
||||
"texto",
|
||||
"numero",
|
||||
"confirmacao",
|
||||
"lista_texto",
|
||||
"lista_numero",
|
||||
]);
|
||||
export const tiposSeriesAgregacoes = z.enum(["contagem", "somatoria"]);
|
||||
export const validarColuna = {
|
||||
texto: z.string().nullable(),
|
||||
numero: z.number().nullable(),
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
};
|
||||
import { respostaComuns } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { PREFIXO } from "./_variaveis";
|
||||
import { PREFIXO, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||
//consultar compilação
|
||||
export const zp_consultar_serie = z.object({
|
||||
identificador: z.string(),
|
||||
|
|
@ -18,7 +18,7 @@ export const consultar_serie = ({ emDesenvolvimento, parametros: { identificador
|
|||
const dados = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const url = new URL(`${emDesenvolvimento
|
||||
? "http://127.0.0.1:5080"
|
||||
: "https://carro-de-boi.idz.one"}${`${PREFIXO}/consultar-serie/${produto}/${conta}`}`);
|
||||
: "https://carro-de-boi.idz.one"}${`${PREFIXO}/${tiposSeriesAgregacoes.enum.contagem}/${produto}/${conta}`}`);
|
||||
const resp = yield fetch(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
|
|
|
|||
26
dist-import/pilao-de-dados/index.d.ts
vendored
26
dist-import/pilao-de-dados/index.d.ts
vendored
|
|
@ -1,5 +1,5 @@
|
|||
import { tiposColunas } from "./_variaveis";
|
||||
export { tiposColunas };
|
||||
import { tiposSeriesAgregacoes } from "./_variaveis";
|
||||
export { tiposSeriesAgregacoes };
|
||||
export declare const pPilao: {
|
||||
registrar_base_dados: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }: {
|
||||
emDesenvolvimento?: boolean | null | undefined;
|
||||
|
|
@ -11,7 +11,7 @@ export declare const pPilao: {
|
|||
tabela: string;
|
||||
colunas: {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}[];
|
||||
};
|
||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||
|
|
@ -19,25 +19,25 @@ export declare const pPilao: {
|
|||
tabela: import("zod").ZodString;
|
||||
colunas: import("zod").ZodArray<import("zod").ZodObject<{
|
||||
coluna: import("zod").ZodString;
|
||||
tipo: import("zod").ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>;
|
||||
tipo: import("zod").ZodEnum<["contagem", "somatoria"]>;
|
||||
}, "strip", import("zod").ZodTypeAny, {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}, {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}>, "many">;
|
||||
}, "strip", import("zod").ZodTypeAny, {
|
||||
tabela: string;
|
||||
colunas: {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}[];
|
||||
}, {
|
||||
tabela: string;
|
||||
colunas: {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}[];
|
||||
}>;
|
||||
enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
||||
|
|
@ -72,7 +72,7 @@ export declare const pPilao: {
|
|||
identificador: string;
|
||||
colanuEixoX: string;
|
||||
colunaAgrupamento: string;
|
||||
agregacao: "contagem";
|
||||
agregacao: "contagem" | "somatoria";
|
||||
};
|
||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||
zp_registrar_serie: import("zod").ZodObject<{
|
||||
|
|
@ -80,19 +80,19 @@ export declare const pPilao: {
|
|||
identificador: import("zod").ZodString;
|
||||
colanuEixoX: import("zod").ZodString;
|
||||
colunaAgrupamento: import("zod").ZodString;
|
||||
agregacao: import("zod").ZodEnum<["contagem"]>;
|
||||
agregacao: import("zod").ZodEnum<["contagem", "somatoria"]>;
|
||||
}, "strip", import("zod").ZodTypeAny, {
|
||||
tabela: string;
|
||||
identificador: string;
|
||||
colanuEixoX: string;
|
||||
colunaAgrupamento: string;
|
||||
agregacao: "contagem";
|
||||
agregacao: "contagem" | "somatoria";
|
||||
}, {
|
||||
tabela: string;
|
||||
identificador: string;
|
||||
colanuEixoX: string;
|
||||
colunaAgrupamento: string;
|
||||
agregacao: "contagem";
|
||||
agregacao: "contagem" | "somatoria";
|
||||
}>;
|
||||
consultar_serie: ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }: {
|
||||
emDesenvolvimento?: boolean | null | undefined;
|
||||
|
|
@ -112,7 +112,7 @@ export declare const pPilao: {
|
|||
identificador: string;
|
||||
colanuEixoX: string;
|
||||
colunaAgrupamento: string;
|
||||
agregacao: "contagem";
|
||||
agregacao: "contagem" | "somatoria";
|
||||
};
|
||||
}>>;
|
||||
url: () => string;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { tiposColunas, validarZ, zp_produto_conta } from "./_variaveis";
|
||||
import { tiposSeriesAgregacoes, validarZ, zp_produto_conta } from "./_variaveis";
|
||||
import { consultar_serie, zp_consultar_serie } from "./consultar_serie";
|
||||
import { enviar_registros, zp_enviar_registros } from "./enviar_registros";
|
||||
import { registrar_base_dados, zp_registrar_base_dados, } from "./registrar_base_dados";
|
||||
import { registrar_serie, zp_registrar_serie } from "./registrar_serie";
|
||||
export { tiposColunas };
|
||||
export { tiposSeriesAgregacoes };
|
||||
export const pPilao = {
|
||||
registrar_base_dados,
|
||||
zp_registrar_base_dados,
|
||||
|
|
|
|||
|
|
@ -6,25 +6,25 @@ 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"]>;
|
||||
tipo: z.ZodEnum<["contagem", "somatoria"]>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}, {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}>, "many">;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
tabela: string;
|
||||
colunas: {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}[];
|
||||
}, {
|
||||
tabela: string;
|
||||
colunas: {
|
||||
coluna: string;
|
||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
||||
tipo: "contagem" | "somatoria";
|
||||
}[];
|
||||
}>;
|
||||
export declare const registrar_base_dados: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }: {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
};
|
||||
import { respostaComuns } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { PREFIXO, tiposColunas } from "./_variaveis";
|
||||
import { PREFIXO, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||
/** Faz o registro de uma nova base de dados configurado a estrutura de colunas */
|
||||
export const zp_registrar_base_dados = z.object({
|
||||
tabela: z.string(),
|
||||
colunas: z.array(z.object({
|
||||
coluna: z.string(),
|
||||
tipo: tiposColunas,
|
||||
tipo: tiposSeriesAgregacoes,
|
||||
})),
|
||||
});
|
||||
export const registrar_base_dados = ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
|
|
|
|||
|
|
@ -6,19 +6,19 @@ export declare const zp_registrar_serie: z.ZodObject<{
|
|||
identificador: z.ZodString;
|
||||
colanuEixoX: z.ZodString;
|
||||
colunaAgrupamento: z.ZodString;
|
||||
agregacao: z.ZodEnum<["contagem"]>;
|
||||
agregacao: z.ZodEnum<["contagem", "somatoria"]>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
tabela: string;
|
||||
identificador: string;
|
||||
colanuEixoX: string;
|
||||
colunaAgrupamento: string;
|
||||
agregacao: "contagem";
|
||||
agregacao: "contagem" | "somatoria";
|
||||
}, {
|
||||
tabela: string;
|
||||
identificador: string;
|
||||
colanuEixoX: string;
|
||||
colunaAgrupamento: string;
|
||||
agregacao: "contagem";
|
||||
agregacao: "contagem" | "somatoria";
|
||||
}>;
|
||||
export declare const registrar_serie: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }: {
|
||||
emDesenvolvimento?: boolean | undefined | null;
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
};
|
||||
import { respostaComuns } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { PREFIXO } from "./_variaveis";
|
||||
import { PREFIXO, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||
//registrar serie
|
||||
export const zp_registrar_serie = z.object({
|
||||
tabela: z.string(),
|
||||
identificador: z.string(),
|
||||
colanuEixoX: z.string(),
|
||||
colunaAgrupamento: z.string(),
|
||||
agregacao: z.enum(["contagem"]),
|
||||
agregacao: tiposSeriesAgregacoes,
|
||||
});
|
||||
export const registrar_serie = ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const url = new URL(`${emDesenvolvimento
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue