.
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;
|
produto: string;
|
||||||
conta: 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: {
|
export declare const validarColuna: {
|
||||||
texto: z.ZodNullable<z.ZodString>;
|
texto: z.ZodNullable<z.ZodString>;
|
||||||
numero: z.ZodNullable<z.ZodNumber>;
|
numero: z.ZodNullable<z.ZodNumber>;
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,14 @@ export const zp_produto_conta = z.object({
|
||||||
produto: z.string(),
|
produto: z.string(),
|
||||||
conta: z.string(),
|
conta: z.string(),
|
||||||
});
|
});
|
||||||
export const tiposColunas = z.enum([
|
export const tiposColunasBasedados = z.enum([
|
||||||
"texto",
|
"texto",
|
||||||
"numero",
|
"numero",
|
||||||
"confirmacao",
|
"confirmacao",
|
||||||
"lista_texto",
|
"lista_texto",
|
||||||
"lista_numero",
|
"lista_numero",
|
||||||
]);
|
]);
|
||||||
|
export const tiposSeriesAgregacoes = z.enum(["contagem", "somatoria"]);
|
||||||
export const validarColuna = {
|
export const validarColuna = {
|
||||||
texto: z.string().nullable(),
|
texto: z.string().nullable(),
|
||||||
numero: z.number().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 { respostaComuns } from "p-respostas";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { PREFIXO } from "./_variaveis";
|
import { PREFIXO, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||||
//consultar compilação
|
//consultar compilação
|
||||||
export const zp_consultar_serie = z.object({
|
export const zp_consultar_serie = z.object({
|
||||||
identificador: z.string(),
|
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 dados = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const url = new URL(`${emDesenvolvimento
|
const url = new URL(`${emDesenvolvimento
|
||||||
? "http://127.0.0.1:5080"
|
? "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(), {
|
const resp = yield fetch(url.toString(), {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
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";
|
import { tiposSeriesAgregacoes } from "./_variaveis";
|
||||||
export { tiposColunas };
|
export { tiposSeriesAgregacoes };
|
||||||
export declare const pPilao: {
|
export declare const pPilao: {
|
||||||
registrar_base_dados: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }: {
|
registrar_base_dados: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }: {
|
||||||
emDesenvolvimento?: boolean | null | undefined;
|
emDesenvolvimento?: boolean | null | undefined;
|
||||||
|
|
@ -11,7 +11,7 @@ export declare const pPilao: {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
colunas: {
|
colunas: {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||||
|
|
@ -19,25 +19,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"]>;
|
tipo: import("zod").ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", import("zod").ZodTypeAny, {
|
}, "strip", import("zod").ZodTypeAny, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}>, "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";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
colunas: {
|
colunas: {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
}>;
|
}>;
|
||||||
enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
||||||
|
|
@ -72,7 +72,7 @@ export declare const pPilao: {
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
};
|
};
|
||||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||||
zp_registrar_serie: import("zod").ZodObject<{
|
zp_registrar_serie: import("zod").ZodObject<{
|
||||||
|
|
@ -80,19 +80,19 @@ export declare const pPilao: {
|
||||||
identificador: import("zod").ZodString;
|
identificador: import("zod").ZodString;
|
||||||
colanuEixoX: import("zod").ZodString;
|
colanuEixoX: import("zod").ZodString;
|
||||||
colunaAgrupamento: import("zod").ZodString;
|
colunaAgrupamento: import("zod").ZodString;
|
||||||
agregacao: import("zod").ZodEnum<["contagem"]>;
|
agregacao: import("zod").ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", import("zod").ZodTypeAny, {
|
}, "strip", import("zod").ZodTypeAny, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}>;
|
}>;
|
||||||
consultar_serie: ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }: {
|
consultar_serie: ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }: {
|
||||||
emDesenvolvimento?: boolean | null | undefined;
|
emDesenvolvimento?: boolean | null | undefined;
|
||||||
|
|
@ -112,7 +112,7 @@ export declare const pPilao: {
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
};
|
};
|
||||||
}>>;
|
}>>;
|
||||||
url: () => string;
|
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 { consultar_serie, zp_consultar_serie } from "./consultar_serie";
|
||||||
import { enviar_registros, zp_enviar_registros } from "./enviar_registros";
|
import { enviar_registros, zp_enviar_registros } from "./enviar_registros";
|
||||||
import { registrar_base_dados, zp_registrar_base_dados, } from "./registrar_base_dados";
|
import { registrar_base_dados, zp_registrar_base_dados, } from "./registrar_base_dados";
|
||||||
import { registrar_serie, zp_registrar_serie } from "./registrar_serie";
|
import { registrar_serie, zp_registrar_serie } from "./registrar_serie";
|
||||||
export { tiposColunas };
|
export { tiposSeriesAgregacoes };
|
||||||
export const pPilao = {
|
export const pPilao = {
|
||||||
registrar_base_dados,
|
registrar_base_dados,
|
||||||
zp_registrar_base_dados,
|
zp_registrar_base_dados,
|
||||||
|
|
|
||||||
|
|
@ -6,25 +6,25 @@ 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"]>;
|
tipo: z.ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", z.ZodTypeAny, {
|
}, "strip", z.ZodTypeAny, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}>, "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";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
colunas: {
|
colunas: {
|
||||||
coluna: string;
|
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 }, }: {
|
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 { respostaComuns } from "p-respostas";
|
||||||
import { z } from "zod";
|
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 */
|
/** Faz o registro de uma nova base de dados configurado a estrutura de colunas */
|
||||||
export const zp_registrar_base_dados = z.object({
|
export const zp_registrar_base_dados = z.object({
|
||||||
tabela: z.string(),
|
tabela: z.string(),
|
||||||
colunas: z.array(z.object({
|
colunas: z.array(z.object({
|
||||||
coluna: z.string(),
|
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* () {
|
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;
|
identificador: z.ZodString;
|
||||||
colanuEixoX: z.ZodString;
|
colanuEixoX: z.ZodString;
|
||||||
colunaAgrupamento: z.ZodString;
|
colunaAgrupamento: z.ZodString;
|
||||||
agregacao: z.ZodEnum<["contagem"]>;
|
agregacao: z.ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", z.ZodTypeAny, {
|
}, "strip", z.ZodTypeAny, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}>;
|
}>;
|
||||||
export declare const registrar_serie: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }: {
|
export declare const registrar_serie: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }: {
|
||||||
emDesenvolvimento?: boolean | undefined | null;
|
emDesenvolvimento?: boolean | undefined | null;
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||||
};
|
};
|
||||||
import { respostaComuns } from "p-respostas";
|
import { respostaComuns } from "p-respostas";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { PREFIXO } from "./_variaveis";
|
import { PREFIXO, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||||
//registrar serie
|
//registrar serie
|
||||||
export const zp_registrar_serie = z.object({
|
export const zp_registrar_serie = z.object({
|
||||||
tabela: z.string(),
|
tabela: z.string(),
|
||||||
identificador: z.string(),
|
identificador: z.string(),
|
||||||
colanuEixoX: z.string(),
|
colanuEixoX: z.string(),
|
||||||
colunaAgrupamento: 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* () {
|
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
|
const url = new URL(`${emDesenvolvimento
|
||||||
|
|
|
||||||
3
dist-require/pilao-de-dados/_variaveis.d.ts
vendored
3
dist-require/pilao-de-dados/_variaveis.d.ts
vendored
|
|
@ -12,7 +12,8 @@ export declare const zp_produto_conta: z.ZodObject<{
|
||||||
produto: string;
|
produto: string;
|
||||||
conta: 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: {
|
export declare const validarColuna: {
|
||||||
texto: z.ZodNullable<z.ZodString>;
|
texto: z.ZodNullable<z.ZodString>;
|
||||||
numero: z.ZodNullable<z.ZodNumber>;
|
numero: z.ZodNullable<z.ZodNumber>;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.validarColuna = exports.tiposColunas = exports.zp_produto_conta = exports.validarZ = exports.PREFIXO = exports.zAmbiente = void 0;
|
exports.validarColuna = exports.tiposSeriesAgregacoes = exports.tiposColunasBasedados = exports.zp_produto_conta = exports.validarZ = exports.PREFIXO = exports.zAmbiente = void 0;
|
||||||
var p_respostas_1 = require("p-respostas");
|
var p_respostas_1 = require("p-respostas");
|
||||||
var zod_1 = require("zod");
|
var zod_1 = require("zod");
|
||||||
exports.zAmbiente = zod_1.z.enum(["desenvolvimento", "producao"]);
|
exports.zAmbiente = zod_1.z.enum(["desenvolvimento", "producao"]);
|
||||||
|
|
@ -18,13 +18,14 @@ exports.zp_produto_conta = zod_1.z.object({
|
||||||
produto: zod_1.z.string(),
|
produto: zod_1.z.string(),
|
||||||
conta: zod_1.z.string(),
|
conta: zod_1.z.string(),
|
||||||
});
|
});
|
||||||
exports.tiposColunas = zod_1.z.enum([
|
exports.tiposColunasBasedados = zod_1.z.enum([
|
||||||
"texto",
|
"texto",
|
||||||
"numero",
|
"numero",
|
||||||
"confirmacao",
|
"confirmacao",
|
||||||
"lista_texto",
|
"lista_texto",
|
||||||
"lista_numero",
|
"lista_numero",
|
||||||
]);
|
]);
|
||||||
|
exports.tiposSeriesAgregacoes = zod_1.z.enum(["contagem", "somatoria"]);
|
||||||
exports.validarColuna = {
|
exports.validarColuna = {
|
||||||
texto: zod_1.z.string().nullable(),
|
texto: zod_1.z.string().nullable(),
|
||||||
numero: zod_1.z.number().nullable(),
|
numero: zod_1.z.number().nullable(),
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ var consultar_serie = function (_a) {
|
||||||
case 0:
|
case 0:
|
||||||
url = new URL("".concat(emDesenvolvimento
|
url = new URL("".concat(emDesenvolvimento
|
||||||
? "http://127.0.0.1:5080"
|
? "http://127.0.0.1:5080"
|
||||||
: "https://carro-de-boi.idz.one").concat("".concat(_variaveis_1.PREFIXO, "/consultar-serie/").concat(produto, "/").concat(conta)));
|
: "https://carro-de-boi.idz.one").concat("".concat(_variaveis_1.PREFIXO, "/").concat(_variaveis_1.tiposSeriesAgregacoes.enum.contagem, "/").concat(produto, "/").concat(conta)));
|
||||||
return [4 /*yield*/, fetch(url.toString(), {
|
return [4 /*yield*/, fetch(url.toString(), {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
|
|
||||||
26
dist-require/pilao-de-dados/index.d.ts
vendored
26
dist-require/pilao-de-dados/index.d.ts
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
import { tiposColunas } from "./_variaveis";
|
import { tiposSeriesAgregacoes } from "./_variaveis";
|
||||||
export { tiposColunas };
|
export { tiposSeriesAgregacoes };
|
||||||
export declare const pPilao: {
|
export declare const pPilao: {
|
||||||
registrar_base_dados: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }: {
|
registrar_base_dados: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }: {
|
||||||
emDesenvolvimento?: boolean | null | undefined;
|
emDesenvolvimento?: boolean | null | undefined;
|
||||||
|
|
@ -11,7 +11,7 @@ export declare const pPilao: {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
colunas: {
|
colunas: {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||||
|
|
@ -19,25 +19,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"]>;
|
tipo: import("zod").ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", import("zod").ZodTypeAny, {
|
}, "strip", import("zod").ZodTypeAny, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}>, "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";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
colunas: {
|
colunas: {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
}>;
|
}>;
|
||||||
enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
|
||||||
|
|
@ -72,7 +72,7 @@ export declare const pPilao: {
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
};
|
};
|
||||||
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
}) => Promise<import("p-respostas").tipoResposta<true>>;
|
||||||
zp_registrar_serie: import("zod").ZodObject<{
|
zp_registrar_serie: import("zod").ZodObject<{
|
||||||
|
|
@ -80,19 +80,19 @@ export declare const pPilao: {
|
||||||
identificador: import("zod").ZodString;
|
identificador: import("zod").ZodString;
|
||||||
colanuEixoX: import("zod").ZodString;
|
colanuEixoX: import("zod").ZodString;
|
||||||
colunaAgrupamento: import("zod").ZodString;
|
colunaAgrupamento: import("zod").ZodString;
|
||||||
agregacao: import("zod").ZodEnum<["contagem"]>;
|
agregacao: import("zod").ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", import("zod").ZodTypeAny, {
|
}, "strip", import("zod").ZodTypeAny, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}>;
|
}>;
|
||||||
consultar_serie: ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }: {
|
consultar_serie: ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }: {
|
||||||
emDesenvolvimento?: boolean | null | undefined;
|
emDesenvolvimento?: boolean | null | undefined;
|
||||||
|
|
@ -112,7 +112,7 @@ export declare const pPilao: {
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
};
|
};
|
||||||
}>>;
|
}>>;
|
||||||
url: () => string;
|
url: () => string;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.pPilao = exports.tiposColunas = void 0;
|
exports.pPilao = exports.tiposSeriesAgregacoes = void 0;
|
||||||
var _variaveis_1 = require("./_variaveis");
|
var _variaveis_1 = require("./_variaveis");
|
||||||
Object.defineProperty(exports, "tiposColunas", { enumerable: true, get: function () { return _variaveis_1.tiposColunas; } });
|
Object.defineProperty(exports, "tiposSeriesAgregacoes", { enumerable: true, get: function () { return _variaveis_1.tiposSeriesAgregacoes; } });
|
||||||
var consultar_serie_1 = require("./consultar_serie");
|
var consultar_serie_1 = require("./consultar_serie");
|
||||||
var enviar_registros_1 = require("./enviar_registros");
|
var enviar_registros_1 = require("./enviar_registros");
|
||||||
var registrar_base_dados_1 = require("./registrar_base_dados");
|
var registrar_base_dados_1 = require("./registrar_base_dados");
|
||||||
|
|
|
||||||
|
|
@ -6,25 +6,25 @@ 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"]>;
|
tipo: z.ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", z.ZodTypeAny, {
|
}, "strip", z.ZodTypeAny, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
|
tipo: "contagem" | "somatoria";
|
||||||
}>, "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";
|
tipo: "contagem" | "somatoria";
|
||||||
}[];
|
}[];
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
colunas: {
|
colunas: {
|
||||||
coluna: string;
|
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 }, }: {
|
export declare const registrar_base_dados: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { colunas, tabela }, }: {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ exports.zp_registrar_base_dados = zod_1.z.object({
|
||||||
tabela: zod_1.z.string(),
|
tabela: zod_1.z.string(),
|
||||||
colunas: zod_1.z.array(zod_1.z.object({
|
colunas: zod_1.z.array(zod_1.z.object({
|
||||||
coluna: zod_1.z.string(),
|
coluna: zod_1.z.string(),
|
||||||
tipo: _variaveis_1.tiposColunas,
|
tipo: _variaveis_1.tiposSeriesAgregacoes,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
var registrar_base_dados = function (_a) {
|
var registrar_base_dados = function (_a) {
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,19 @@ export declare const zp_registrar_serie: z.ZodObject<{
|
||||||
identificador: z.ZodString;
|
identificador: z.ZodString;
|
||||||
colanuEixoX: z.ZodString;
|
colanuEixoX: z.ZodString;
|
||||||
colunaAgrupamento: z.ZodString;
|
colunaAgrupamento: z.ZodString;
|
||||||
agregacao: z.ZodEnum<["contagem"]>;
|
agregacao: z.ZodEnum<["contagem", "somatoria"]>;
|
||||||
}, "strip", z.ZodTypeAny, {
|
}, "strip", z.ZodTypeAny, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}, {
|
}, {
|
||||||
tabela: string;
|
tabela: string;
|
||||||
identificador: string;
|
identificador: string;
|
||||||
colanuEixoX: string;
|
colanuEixoX: string;
|
||||||
colunaAgrupamento: string;
|
colunaAgrupamento: string;
|
||||||
agregacao: "contagem";
|
agregacao: "contagem" | "somatoria";
|
||||||
}>;
|
}>;
|
||||||
export declare const registrar_serie: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }: {
|
export declare const registrar_serie: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }: {
|
||||||
emDesenvolvimento?: boolean | undefined | null;
|
emDesenvolvimento?: boolean | undefined | null;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ exports.zp_registrar_serie = zod_1.z.object({
|
||||||
identificador: zod_1.z.string(),
|
identificador: zod_1.z.string(),
|
||||||
colanuEixoX: zod_1.z.string(),
|
colanuEixoX: zod_1.z.string(),
|
||||||
colunaAgrupamento: zod_1.z.string(),
|
colunaAgrupamento: zod_1.z.string(),
|
||||||
agregacao: zod_1.z.enum(["contagem"]),
|
agregacao: _variaveis_1.tiposSeriesAgregacoes,
|
||||||
});
|
});
|
||||||
var registrar_serie = function (_a) {
|
var registrar_serie = function (_a) {
|
||||||
var emDesenvolvimento = _a.emDesenvolvimento, _b = _a.cliente, conta = _b.conta, produto = _b.produto, _c = _a.parametros, agregacao = _c.agregacao, colanuEixoX = _c.colanuEixoX, colunaAgrupamento = _c.colunaAgrupamento, identificador = _c.identificador, tabela = _c.tabela;
|
var emDesenvolvimento = _a.emDesenvolvimento, _b = _a.cliente, conta = _b.conta, produto = _b.produto, _c = _a.parametros, agregacao = _c.agregacao, colanuEixoX = _c.colanuEixoX, colunaAgrupamento = _c.colunaAgrupamento, identificador = _c.identificador, tabela = _c.tabela;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "p-drives",
|
"name": "p-drives",
|
||||||
"version": "0.57.0",
|
"version": "0.60.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export const zp_produto_conta = z.object({
|
||||||
conta: z.string(),
|
conta: z.string(),
|
||||||
})
|
})
|
||||||
|
|
||||||
export const tiposColunas = z.enum([
|
export const tiposColunasBasedados = z.enum([
|
||||||
"texto",
|
"texto",
|
||||||
"numero",
|
"numero",
|
||||||
"confirmacao",
|
"confirmacao",
|
||||||
|
|
@ -34,6 +34,8 @@ export const tiposColunas = z.enum([
|
||||||
"lista_numero",
|
"lista_numero",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
export const tiposSeriesAgregacoes = z.enum(["contagem", "somatoria"])
|
||||||
|
|
||||||
export const validarColuna = {
|
export const validarColuna = {
|
||||||
texto: z.string().nullable(),
|
texto: z.string().nullable(),
|
||||||
numero: z.number().nullable(),
|
numero: z.number().nullable(),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
import type { tipoResposta } from "p-respostas"
|
import type { tipoResposta } from "p-respostas"
|
||||||
import { respostaComuns } from "p-respostas"
|
import { respostaComuns } from "p-respostas"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
import { PREFIXO, type zp_produto_conta } from "./_variaveis"
|
import {
|
||||||
|
PREFIXO,
|
||||||
|
tiposSeriesAgregacoes,
|
||||||
|
type zp_produto_conta,
|
||||||
|
} from "./_variaveis"
|
||||||
import type { zp_registrar_serie } from "./registrar_serie"
|
import type { zp_registrar_serie } from "./registrar_serie"
|
||||||
|
|
||||||
//consultar compilação
|
//consultar compilação
|
||||||
|
|
@ -33,7 +37,9 @@ export const consultar_serie = ({
|
||||||
emDesenvolvimento
|
emDesenvolvimento
|
||||||
? "http://127.0.0.1:5080"
|
? "http://127.0.0.1:5080"
|
||||||
: "https://carro-de-boi.idz.one"
|
: "https://carro-de-boi.idz.one"
|
||||||
}${`${PREFIXO}/consultar-serie/${produto}/${conta}`}`,
|
}${`${PREFIXO}/${
|
||||||
|
tiposSeriesAgregacoes.enum.contagem
|
||||||
|
}/${produto}/${conta}`}`,
|
||||||
)
|
)
|
||||||
|
|
||||||
const resp = await fetch(url.toString(), {
|
const resp = await fetch(url.toString(), {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
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 { consultar_serie, zp_consultar_serie } from "./consultar_serie"
|
||||||
import { enviar_registros, zp_enviar_registros } from "./enviar_registros"
|
import { enviar_registros, zp_enviar_registros } from "./enviar_registros"
|
||||||
import {
|
import {
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
} from "./registrar_base_dados"
|
} from "./registrar_base_dados"
|
||||||
import { registrar_serie, zp_registrar_serie } from "./registrar_serie"
|
import { registrar_serie, zp_registrar_serie } from "./registrar_serie"
|
||||||
|
|
||||||
export { tiposColunas }
|
export { tiposSeriesAgregacoes }
|
||||||
|
|
||||||
export const pPilao = {
|
export const pPilao = {
|
||||||
registrar_base_dados,
|
registrar_base_dados,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
import type { tipoResposta } from "p-respostas"
|
import type { tipoResposta } from "p-respostas"
|
||||||
import { respostaComuns } from "p-respostas"
|
import { respostaComuns } from "p-respostas"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
import { PREFIXO, tiposColunas, type zp_produto_conta } from "./_variaveis"
|
import {
|
||||||
|
PREFIXO,
|
||||||
|
tiposSeriesAgregacoes,
|
||||||
|
type zp_produto_conta,
|
||||||
|
} from "./_variaveis"
|
||||||
|
|
||||||
/** Faz o registro de uma nova base de dados configurado a estrutura de colunas */
|
/** Faz o registro de uma nova base de dados configurado a estrutura de colunas */
|
||||||
|
|
||||||
|
|
@ -10,7 +14,7 @@ export const zp_registrar_base_dados = z.object({
|
||||||
colunas: z.array(
|
colunas: z.array(
|
||||||
z.object({
|
z.object({
|
||||||
coluna: z.string(),
|
coluna: z.string(),
|
||||||
tipo: tiposColunas,
|
tipo: tiposSeriesAgregacoes,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
import { respostaComuns, type tipoResposta } from "p-respostas"
|
import { respostaComuns, type tipoResposta } from "p-respostas"
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
import { PREFIXO, type zp_produto_conta } from "./_variaveis"
|
import {
|
||||||
|
PREFIXO,
|
||||||
|
tiposSeriesAgregacoes,
|
||||||
|
type zp_produto_conta,
|
||||||
|
} from "./_variaveis"
|
||||||
|
|
||||||
//registrar serie
|
//registrar serie
|
||||||
|
|
||||||
|
|
@ -10,7 +14,7 @@ export const zp_registrar_serie = z.object({
|
||||||
identificador: z.string(),
|
identificador: z.string(),
|
||||||
colanuEixoX: z.string(),
|
colanuEixoX: z.string(),
|
||||||
colunaAgrupamento: z.string(),
|
colunaAgrupamento: z.string(),
|
||||||
agregacao: z.enum(["contagem"]),
|
agregacao: tiposSeriesAgregacoes,
|
||||||
})
|
})
|
||||||
|
|
||||||
export const registrar_serie = async ({
|
export const registrar_serie = async ({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue