This commit is contained in:
Luiz H. R. Silva 2024-06-19 17:47:48 -03:00
parent a6205f1ab6
commit e580643abc
40 changed files with 329 additions and 507 deletions

View file

@ -4,10 +4,8 @@ import type { zAmbiente } from "../ts/ambiente";
type tipoPostCodigoContaSite = {
site: string;
};
export declare const codigoContaSite: ({ ambiente, post, buscar, }: {
export declare const codigoContaSite: ({ ambiente, post, }: {
ambiente: z.infer<typeof zAmbiente>;
post: tipoPostCodigoContaSite;
/** função que conecta com a API */
buscar: (url: string, post: tipoPostCodigoContaSite) => Promise<tipoResposta<string>>;
}) => Promise<tipoResposta<string>>;
export {};

View file

@ -9,10 +9,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
import { respostaComuns } from "p-respostas";
import { urlAutenticacao } from "./_urlAutenticacao";
export const codigoContaSite = ({ ambiente, post, buscar, }) => __awaiter(void 0, void 0, void 0, function* () {
import node_fetch from "cross-fetch";
export const codigoContaSite = ({ ambiente, post, }) => __awaiter(void 0, void 0, void 0, function* () {
const url = `${urlAutenticacao(ambiente)}/api/codigo_prefeitura_site`;
try {
const resp = yield buscar(url, post).catch((e) => respostaComuns.erro(`erro ao buscar código do site: ${e}`));
const resp = yield node_fetch(url, {
method: "POST",
body: JSON.stringify(post),
headers: { "Content-Type": "application/json" },
})
.then((r) => r.json())
.catch((e) => respostaComuns.erro("Erro ao enviar registros", [e.message]))
.then((r) => r);
return resp;
}
catch (e) {

View file

@ -9,10 +9,7 @@ export type tipoUsuarioExterno = {
codigo_conta: string;
chave_produto: string;
};
export declare const usuarios_quipo_governo: ({ token_produto, ambiente, buscar, }: {
export declare const usuarios_quipo_governo: ({ token_produto, ambiente, }: {
ambiente: z.infer<typeof zAmbiente>;
token_produto: string;
buscar: (url: string, headers: {
[k: string]: string;
}) => Promise<tipoResposta<tipoUsuarioExterno[]>>;
}) => Promise<tipoResposta<tipoUsuarioExterno[]>>;

View file

@ -7,14 +7,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import node_fetch from "cross-fetch";
import { respostaComuns } from "p-respostas";
import { urlAutenticacao } from "./_urlAutenticacao";
export const usuarios_quipo_governo = ({ token_produto, ambiente, buscar, }) => __awaiter(void 0, void 0, void 0, function* () {
export const usuarios_quipo_governo = ({ token_produto, ambiente, }) => __awaiter(void 0, void 0, void 0, function* () {
const url = `${urlAutenticacao(ambiente)}/api/usuarios_quipo_governo`;
if (!token_produto)
return respostaComuns.erro("token_produto não informado");
const headers = {
token: token_produto,
};
return buscar(url, headers).catch((e) => respostaComuns.erro(`erro ao buscar usuários quipo governo: ${e}`));
return node_fetch(url, {
headers,
})
.then((r) => r.json())
.catch((e) => respostaComuns.erro("Erro ao buscar usuários quipo governo", [e.message]))
.then((r) => r);
});

View file

@ -1,14 +1,11 @@
import type { tipoResposta } from "p-respostas";
type tipoPostValidarTokem = {
token: string;
};
import type { z } from "zod";
import type { zAmbiente } from "../ts/ambiente";
/** faz a validação do token */
export declare const validarToken: ({ ambiente, post, buscar, }: {
export declare const validarToken: ({ ambiente, post, }: {
ambiente: z.infer<typeof zAmbiente>;
post: tipoPostValidarTokem;
/** função que conecta com a API */
buscar: (url: string, post: tipoPostValidarTokem) => Promise<tipoResposta<any>>;
}) => Promise<"valido" | "erro">;
export {};

View file

@ -8,11 +8,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
import { urlAutenticacao } from "./_urlAutenticacao";
import node_fetch from "cross-fetch";
/** faz a validação do token */
export const validarToken = ({ ambiente, post, buscar, }) => __awaiter(void 0, void 0, void 0, function* () {
export const validarToken = ({ ambiente, post, }) => __awaiter(void 0, void 0, void 0, function* () {
const url = `${urlAutenticacao(ambiente)}/api/validar_token`;
try {
const resposta = yield buscar(url, post)
const resposta = yield node_fetch(url, {
method: "POST",
body: JSON.stringify(post),
headers: { "Content-Type": "application/json" },
})
.then((r) => r.json())
.then((r) => r)
.then((resposta) => resposta.eCerto ? "valido" : "erro")
.catch(() => "erro");
return resposta;

View file

@ -2,30 +2,21 @@ import { type tipoUsuarioExterno } from "./_usuarios_quipo_governo";
export type { tipoUsuarioExterno };
/** todas as rotas de comunicação com autenticador partem dessa variável */
export declare const pAutenticacao: {
validarToken: ({ ambiente, post, buscar, }: {
validarToken: ({ ambiente, post, }: {
ambiente: "desenvolvimento" | "producao";
post: {
token: string;
};
buscar: (url: string, post: {
token: string;
}) => Promise<import("p-respostas").tipoResposta<any>>;
}) => Promise<"valido" | "erro">;
urlAutenticacao: (ambiente: "desenvolvimento" | "producao") => string;
codigoContaSite: ({ ambiente, post, buscar, }: {
codigoContaSite: ({ ambiente, post, }: {
ambiente: "desenvolvimento" | "producao";
post: {
site: string;
};
buscar: (url: string, post: {
site: string;
}) => Promise<import("p-respostas").tipoResposta<string>>;
}) => Promise<import("p-respostas").tipoResposta<string>>;
usuarios_quipo_governo: ({ token_produto, ambiente, buscar, }: {
usuarios_quipo_governo: ({ token_produto, ambiente, }: {
ambiente: "desenvolvimento" | "producao";
token_produto: string;
buscar: (url: string, headers: {
[k: string]: string;
}) => Promise<import("p-respostas").tipoResposta<tipoUsuarioExterno[]>>;
}) => Promise<import("p-respostas").tipoResposta<tipoUsuarioExterno[]>>;
};

View file

@ -12,7 +12,7 @@ export declare const zp_produto_conta: z.ZodObject<{
produto: string;
conta: string;
}>;
export declare const z_tipo_coluna_base_dados: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>;
export declare const z_tipo_coluna_base_dados: z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>;
export declare const tiposSeriesAgregacoes: z.ZodEnum<["contagem", "somatoria"]>;
export declare const z_validar_colunna_base_dados: {
texto: z.ZodNullable<z.ZodString>;

View file

@ -20,6 +20,8 @@ export const z_tipo_coluna_base_dados = z.enum([
"confirmacao",
"lista_texto",
"lista_numero",
"data",
"mes",
]);
export const tiposSeriesAgregacoes = z.enum(["contagem", "somatoria"]);
export const z_validar_colunna_base_dados = {

View file

@ -5,50 +5,50 @@ 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<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>;
}, "strip", z.ZodTypeAny, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}>, "many">;
}, "strip", z.ZodTypeAny, {
tabela: string;
colunas: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}[];
}, {
tabela: string;
colunas: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}[];
}>;
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"]>>>;
tipo: z.ZodNullable<z.ZodOptional<z.ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>>>;
}, "strip", z.ZodTypeAny, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}>>, "many">;
}, "strip", z.ZodTypeAny, {
tabela: string;
registros: Record<string, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}>[];
}, {
tabela: string;
registros: Record<string, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}>[];
}>;
export declare const enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {

View file

@ -5,25 +5,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<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>;
}, "strip", import("zod").ZodTypeAny, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}, {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}>, "many">;
}, "strip", import("zod").ZodTypeAny, {
tabela: string;
colunas: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}[];
}, {
tabela: string;
colunas: {
coluna: string;
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero";
tipo: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes";
}[];
}>;
enviar_registros: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { registros, tabela }, }: {
@ -36,7 +36,7 @@ export declare const pPilao: {
tabela: string;
registros: Record<string, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}>[];
};
}) => Promise<import("p-respostas").tipoResposta<true>>;
@ -44,28 +44,44 @@ export declare const pPilao: {
tabela: import("zod").ZodString;
registros: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
valor: import("zod").ZodAny;
tipo: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero"]>>>;
tipo: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodEnum<["texto", "numero", "confirmacao", "lista_texto", "lista_numero", "data", "mes"]>>>;
}, "strip", import("zod").ZodTypeAny, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}>>, "many">;
}, "strip", import("zod").ZodTypeAny, {
tabela: string;
registros: Record<string, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}>[];
}, {
tabela: string;
registros: Record<string, {
valor?: any;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | null | undefined;
tipo?: "texto" | "numero" | "confirmacao" | "lista_texto" | "lista_numero" | "data" | "mes" | null | undefined;
}>[];
}>;
serie_registrar: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }: {
zp_serie_registrar: import("zod").ZodObject<{
tabela: import("zod").ZodString;
colanuEixoX: import("zod").ZodString;
colunaAgrupamento: import("zod").ZodString;
agregacao: import("zod").ZodEnum<["contagem", "somatoria"]>;
}, "strip", import("zod").ZodTypeAny, {
tabela: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}, {
tabela: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}>;
serie_consultar: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, tabela }, }: {
emDesenvolvimento?: boolean | null | undefined;
cliente: {
produto: string;
@ -73,47 +89,16 @@ export declare const pPilao: {
};
parametros: {
tabela: string;
identificador: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
};
}) => Promise<import("p-respostas").tipoResposta<true>>;
zp_serie_registrar: import("zod").ZodObject<{
tabela: import("zod").ZodString;
identificador: import("zod").ZodString;
colanuEixoX: import("zod").ZodString;
colunaAgrupamento: import("zod").ZodString;
agregacao: import("zod").ZodEnum<["contagem", "somatoria"]>;
}, "strip", import("zod").ZodTypeAny, {
tabela: string;
identificador: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}, {
tabela: string;
identificador: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}>;
serie_consultar: ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }: {
emDesenvolvimento?: boolean | null | undefined;
cliente: {
produto: string;
conta: string;
};
parametros: {
identificador: string;
};
}) => {
dados: () => Promise<import("p-respostas").tipoResposta<{
registros: any[];
legenda: string;
serie: {
tabela: string;
identificador: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
@ -121,13 +106,6 @@ export declare const pPilao: {
}>>;
url: () => string;
};
zp_serie_consultar: import("zod").ZodObject<{
identificador: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
identificador: string;
}, {
identificador: string;
}>;
zp_produto_conta: import("zod").ZodObject<{
produto: import("zod").ZodString;
conta: import("zod").ZodString;

View file

@ -1,17 +1,14 @@
import { tiposSeriesAgregacoes, validarZ, zp_produto_conta } from "./_variaveis";
import { deletar_registros, zp_deletar_registros } from "./deletar_registros";
import { enviar_registros, zp_enviar_registros, zp_registrar_base_dados, } from "./enviar_registros";
import { serie_consultar, zp_serie_consultar } from "./serie_consultar";
import { serie_registrar, zp_serie_registrar } from "./serie_registrar";
import { serie_consultar, zp_serie_registrar } from "./serie_consultar";
export { tiposSeriesAgregacoes };
export const pPilao = {
zp_registrar_base_dados,
enviar_registros,
zp_enviar_registros,
serie_registrar,
zp_serie_registrar,
serie_consultar,
zp_serie_consultar,
zp_produto_conta,
validarZ,
deletar_registros,

View file

@ -1,19 +1,27 @@
import type { tipoResposta } from "p-respostas";
import { z } from "zod";
import { type zp_produto_conta } from "./_variaveis";
import type { zp_serie_registrar } from "./serie_registrar";
export declare const zp_serie_consultar: z.ZodObject<{
identificador: z.ZodString;
export declare const zp_serie_registrar: z.ZodObject<{
tabela: z.ZodString;
colanuEixoX: z.ZodString;
colunaAgrupamento: z.ZodString;
agregacao: z.ZodEnum<["contagem", "somatoria"]>;
}, "strip", z.ZodTypeAny, {
identificador: string;
tabela: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}, {
identificador: string;
tabela: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}>;
export declare const serie_consultar: ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }: {
export declare const serie_consultar: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, tabela }, }: {
emDesenvolvimento?: boolean | undefined | null;
/** Identificação do cliente */
cliente: z.infer<typeof zp_produto_conta>;
parametros: z.infer<typeof zp_serie_consultar>;
parametros: z.infer<typeof zp_serie_registrar>;
}) => {
dados: () => Promise<tipoResposta<{
registros: any[];

View file

@ -11,17 +11,22 @@ import node_fetch from "cross-fetch";
import { respostaComuns } from "p-respostas";
import { z } from "zod";
import { PREFIXO, baseUrlPilao, tiposSeriesAgregacoes, } from "./_variaveis";
//consultar compilação
export const zp_serie_consultar = z.object({
identificador: z.string(),
export const zp_serie_registrar = z.object({
tabela: z.string(),
colanuEixoX: z.string(),
colunaAgrupamento: z.string(),
agregacao: tiposSeriesAgregacoes,
});
export const serie_consultar = ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }) => {
export const serie_consultar = ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, tabela }, }) => {
const dados = () => __awaiter(void 0, void 0, void 0, function* () {
const url = new URL(`${baseUrlPilao(emDesenvolvimento)}${`${PREFIXO}/${tiposSeriesAgregacoes.enum.contagem}/${produto}/${conta}`}`);
const resp = yield node_fetch(url.toString(), {
method: "POST",
body: JSON.stringify({
identificador,
agregacao,
colanuEixoX,
colunaAgrupamento,
tabela,
}),
headers: { "Content-Type": "application/json" },
})
@ -31,12 +36,20 @@ export const serie_consultar = ({ emDesenvolvimento, parametros: { identificador
return resp;
});
const url = () => {
const pr = {
produto,
conta,
agregacao,
colanuEixoX,
colunaAgrupamento,
tabela,
};
const vUrl = new URL(`${emDesenvolvimento
? "http://127.0.0.1:5081"
: "https://carro-de-boi.idz.one"}${PREFIXO}/${tiposSeriesAgregacoes.enum.contagem}`);
vUrl.searchParams.append("produto", produto);
vUrl.searchParams.append("conta", conta);
vUrl.searchParams.append("identificador", identificador);
for (const [k, v] of Object.entries(pr)) {
vUrl.searchParams.append(k, JSON.stringify(v));
}
return vUrl.href;
};
return {

View file

@ -1,29 +0,0 @@
import { type tipoResposta } from "p-respostas";
import { z } from "zod";
import { type zp_produto_conta } from "./_variaveis";
export declare const zp_serie_registrar: z.ZodObject<{
tabela: z.ZodString;
identificador: z.ZodString;
colanuEixoX: z.ZodString;
colunaAgrupamento: z.ZodString;
agregacao: z.ZodEnum<["contagem", "somatoria"]>;
}, "strip", z.ZodTypeAny, {
tabela: string;
identificador: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}, {
tabela: string;
identificador: string;
colanuEixoX: string;
colunaAgrupamento: string;
agregacao: "contagem" | "somatoria";
}>;
export declare const serie_registrar: ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, 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_serie_registrar>;
}) => Promise<tipoResposta<true>>;

View file

@ -1,40 +0,0 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import node_fetch from "cross-fetch";
import { respostaComuns } from "p-respostas";
import { z } from "zod";
import { PREFIXO, baseUrlPilao, tiposSeriesAgregacoes, } from "./_variaveis";
//registrar serie
export const zp_serie_registrar = z.object({
tabela: z.string(),
identificador: z.string(),
colanuEixoX: z.string(),
colunaAgrupamento: z.string(),
agregacao: tiposSeriesAgregacoes,
});
export const serie_registrar = ({ emDesenvolvimento, cliente: { conta, produto }, parametros: { agregacao, colanuEixoX, colunaAgrupamento, identificador, tabela, }, }) => __awaiter(void 0, void 0, void 0, function* () {
const url = new URL(`${baseUrlPilao(emDesenvolvimento)}${`${PREFIXO}/${Object.keys({ serie_registrar })[0]}/${produto}/${conta}`}`);
const resp = yield node_fetch(url.toString(), {
method: "POST",
body: JSON.stringify({
tabela,
agregacao,
emDesenvolvimento,
colanuEixoX,
colunaAgrupamento,
identificador,
}),
headers: { "Content-Type": "application/json" },
})
.then((r) => r.json())
.catch((e) => respostaComuns.erro("Erro ao enviar registros", [e.message]))
.then((r) => r);
return resp;
});