.
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
|
||||
|
|
|
|||
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;
|
||||
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>;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
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 zod_1 = require("zod");
|
||||
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(),
|
||||
conta: zod_1.z.string(),
|
||||
});
|
||||
exports.tiposColunas = zod_1.z.enum([
|
||||
exports.tiposColunasBasedados = zod_1.z.enum([
|
||||
"texto",
|
||||
"numero",
|
||||
"confirmacao",
|
||||
"lista_texto",
|
||||
"lista_numero",
|
||||
]);
|
||||
exports.tiposSeriesAgregacoes = zod_1.z.enum(["contagem", "somatoria"]);
|
||||
exports.validarColuna = {
|
||||
texto: zod_1.z.string().nullable(),
|
||||
numero: zod_1.z.number().nullable(),
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ var consultar_serie = function (_a) {
|
|||
case 0:
|
||||
url = new URL("".concat(emDesenvolvimento
|
||||
? "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(), {
|
||||
method: "POST",
|
||||
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";
|
||||
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,8 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.pPilao = exports.tiposColunas = void 0;
|
||||
exports.pPilao = exports.tiposSeriesAgregacoes = void 0;
|
||||
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 enviar_registros_1 = require("./enviar_registros");
|
||||
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;
|
||||
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 }, }: {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ exports.zp_registrar_base_dados = zod_1.z.object({
|
|||
tabela: zod_1.z.string(),
|
||||
colunas: zod_1.z.array(zod_1.z.object({
|
||||
coluna: zod_1.z.string(),
|
||||
tipo: _variaveis_1.tiposColunas,
|
||||
tipo: _variaveis_1.tiposSeriesAgregacoes,
|
||||
})),
|
||||
});
|
||||
var registrar_base_dados = function (_a) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ exports.zp_registrar_serie = zod_1.z.object({
|
|||
identificador: zod_1.z.string(),
|
||||
colanuEixoX: 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 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",
|
||||
"version": "0.57.0",
|
||||
"version": "0.60.0",
|
||||
"description": "",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export const zp_produto_conta = z.object({
|
|||
conta: z.string(),
|
||||
})
|
||||
|
||||
export const tiposColunas = z.enum([
|
||||
export const tiposColunasBasedados = z.enum([
|
||||
"texto",
|
||||
"numero",
|
||||
"confirmacao",
|
||||
|
|
@ -34,6 +34,8 @@ export const tiposColunas = z.enum([
|
|||
"lista_numero",
|
||||
])
|
||||
|
||||
export const tiposSeriesAgregacoes = z.enum(["contagem", "somatoria"])
|
||||
|
||||
export const validarColuna = {
|
||||
texto: z.string().nullable(),
|
||||
numero: z.number().nullable(),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import type { tipoResposta } from "p-respostas"
|
||||
import { respostaComuns } from "p-respostas"
|
||||
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"
|
||||
|
||||
//consultar compilação
|
||||
|
|
@ -33,7 +37,9 @@ export const consultar_serie = ({
|
|||
emDesenvolvimento
|
||||
? "http://127.0.0.1:5080"
|
||||
: "https://carro-de-boi.idz.one"
|
||||
}${`${PREFIXO}/consultar-serie/${produto}/${conta}`}`,
|
||||
}${`${PREFIXO}/${
|
||||
tiposSeriesAgregacoes.enum.contagem
|
||||
}/${produto}/${conta}`}`,
|
||||
)
|
||||
|
||||
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 { enviar_registros, zp_enviar_registros } from "./enviar_registros"
|
||||
import {
|
||||
|
|
@ -7,7 +7,7 @@ import {
|
|||
} from "./registrar_base_dados"
|
||||
import { registrar_serie, zp_registrar_serie } from "./registrar_serie"
|
||||
|
||||
export { tiposColunas }
|
||||
export { tiposSeriesAgregacoes }
|
||||
|
||||
export const pPilao = {
|
||||
registrar_base_dados,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import type { tipoResposta } from "p-respostas"
|
||||
import { respostaComuns } from "p-respostas"
|
||||
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 */
|
||||
|
||||
|
|
@ -10,7 +14,7 @@ export const zp_registrar_base_dados = z.object({
|
|||
colunas: z.array(
|
||||
z.object({
|
||||
coluna: z.string(),
|
||||
tipo: tiposColunas,
|
||||
tipo: tiposSeriesAgregacoes,
|
||||
}),
|
||||
),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import { respostaComuns, type tipoResposta } from "p-respostas"
|
||||
import { z } from "zod"
|
||||
|
||||
import { PREFIXO, type zp_produto_conta } from "./_variaveis"
|
||||
import {
|
||||
PREFIXO,
|
||||
tiposSeriesAgregacoes,
|
||||
type zp_produto_conta,
|
||||
} from "./_variaveis"
|
||||
|
||||
//registrar serie
|
||||
|
||||
|
|
@ -10,7 +14,7 @@ export const zp_registrar_serie = z.object({
|
|||
identificador: z.string(),
|
||||
colanuEixoX: z.string(),
|
||||
colunaAgrupamento: z.string(),
|
||||
agregacao: z.enum(["contagem"]),
|
||||
agregacao: tiposSeriesAgregacoes,
|
||||
})
|
||||
|
||||
export const registrar_serie = async ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue