cosmemilton-acbr-node 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +330 -60
- package/dist/cli.js.map +3 -3
- package/dist/index.cjs +320 -46
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +317 -46
- package/dist/index.js.map +4 -4
- package/dist/runtime.cjs +254 -35
- package/dist/runtime.cjs.map +3 -3
- package/dist/runtime.js +251 -34
- package/dist/runtime.js.map +3 -3
- package/dist/types/generated/acbr/index.d.ts +15 -1
- package/dist/types/generated/acbr/models.d.ts +32 -0
- package/dist/types/src/diagnostics.d.ts +8 -0
- package/dist/types/src/generator.d.ts +1 -0
- package/dist/types/src/index.d.ts +13 -0
- package/dist/types/src/runtime.d.ts +1 -0
- package/dist/types/src/types.d.ts +34 -1
- package/docs/API.md +90 -32
- package/docs/CI.md +6 -0
- package/docs/VALIDACAO.md +3 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -33,6 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
ACBR_CONTRACT: () => ACBR_CONTRACT,
|
|
34
34
|
CONTRACT_HASH: () => CONTRACT_HASH,
|
|
35
35
|
ErroAcbrNode: () => ErroAcbrNode,
|
|
36
|
+
ErroValidacaoModelo: () => ErroValidacaoModelo,
|
|
36
37
|
PROTOCOL_VERSION: () => PROTOCOL_VERSION,
|
|
37
38
|
SOURCE_REVISION: () => SOURCE_REVISION,
|
|
38
39
|
TACBrProcessoEmissao: () => TACBrProcessoEmissao,
|
|
@@ -240,6 +241,8 @@ __export(index_exports, {
|
|
|
240
241
|
TveicProd: () => TveicProd,
|
|
241
242
|
TveicTransp: () => TveicTransp,
|
|
242
243
|
criarEmissor: () => criarEmissor2,
|
|
244
|
+
diagnosticarErro: () => diagnosticarErro2,
|
|
245
|
+
diagnosticarResultado: () => diagnosticarResultado,
|
|
243
246
|
validateModel: () => validateModel,
|
|
244
247
|
validateTNFe: () => validateTNFe
|
|
245
248
|
});
|
|
@@ -253,16 +256,149 @@ var import_node_module = require("node:module");
|
|
|
253
256
|
var import_node_crypto = require("node:crypto");
|
|
254
257
|
var import_node_util = require("node:util");
|
|
255
258
|
|
|
259
|
+
// src/diagnostics.ts
|
|
260
|
+
var ETAPAS = /* @__PURE__ */ new Set(["configuracao", "documento", "runtime", "geracao", "validacao", "assinatura", "transmissao", "consulta", "cancelamento", "carta_correcao", "inutilizacao", "operacao", "limpeza"]);
|
|
261
|
+
var CAMPOS = /* @__PURE__ */ new Set(["cnpj", "uf", "modelo", "ambiente", "contrato", "certificado", "certificado.senha", "certificado.pfx", "certificado.arquivo", "csc", "csc.id", "csc.valor", "timeoutMs", "limiteFila", "limiteBytes", "runtimeDirectory", "documento", "xml", "consulta", "chave", "recibo", "cancelamento", "protocolo", "justificativa", "cartaCorrecao", "correcao", "sequenciaEvento", "inutilizacao", "ano", "serie", "numeroInicial", "numeroFinal", "operacao", "signal"]);
|
|
262
|
+
var CATALOGO = {
|
|
263
|
+
CONFIGURACAO_INVALIDA: ["configuracao", "A configura\xE7\xE3o cont\xE9m um campo inv\xE1lido.", "Confira o campo indicado e seu tipo antes de continuar."],
|
|
264
|
+
CONTRATO_INVALIDO: ["configuracao", "O contrato do cliente \xE9 inv\xE1lido.", "Use o contrato gerado junto com o cliente."],
|
|
265
|
+
CERTIFICADO_INVALIDO: ["configuracao", "O certificado A1 ou sua configura\xE7\xE3o \xE9 inv\xE1lido.", "Confira formato e validade do A1, pfx ou arquivo e a senha digitada, sem registrar esses dados."],
|
|
266
|
+
CERTIFICADO_DIVERGENTE: ["assinatura", "O certificado n\xE3o corresponde \xE0 raiz CNPJ do emitente.", "Confira o CNPJ configurado e selecione o A1 correspondente ao emitente."],
|
|
267
|
+
DEPENDENCIA_AUSENTE: ["runtime", "Uma depend\xEAncia do motor fiscal n\xE3o est\xE1 dispon\xEDvel.", "Reinstale o runtime completo da plataforma; confira a disponibilidade do OpenSSL distribu\xEDdo."],
|
|
268
|
+
SCHEMAS_AUSENTES: ["runtime", "Os schemas fiscais n\xE3o est\xE3o dispon\xEDveis.", "Reinstale o runtime completo da plataforma."],
|
|
269
|
+
SERVICOS_AUSENTES: ["runtime", "A configura\xE7\xE3o dos servi\xE7os fiscais n\xE3o est\xE1 dispon\xEDvel.", "Reinstale o runtime completo da plataforma."],
|
|
270
|
+
CSC_AUSENTE: ["configuracao", "A opera\xE7\xE3o de NFC-e exige CSC.", "Informe id e valor do CSC na configura\xE7\xE3o sem registrar seu conte\xFAdo."],
|
|
271
|
+
IDENTIDADE_DIVERGENTE: ["documento", "A identidade fiscal n\xE3o corresponde \xE0 configura\xE7\xE3o ou ao retorno.", "Confira emitente, UF, modelo, ambiente e chave do documento antes de continuar."],
|
|
272
|
+
XML_SCHEMA_INVALIDO: ["validacao", "O XML n\xE3o atende aos schemas fiscais.", "Confira os campos obrigat\xF3rios e os tributos; a valida\xE7\xE3o de XML assinado deve ocorrer ap\xF3s a assinatura."],
|
|
273
|
+
ASSINATURA_INVALIDA: ["assinatura", "A assinatura do XML n\xE3o foi validada.", "Confira o A1 correspondente e use o XML assinado sem altera\xE7\xF5es."],
|
|
274
|
+
XML_NAO_ASSINADO: ["assinatura", "A opera\xE7\xE3o exige XML previamente assinado.", "Conclua a assinatura e a valida\xE7\xE3o antes de transmitir."],
|
|
275
|
+
XML_ALTERADO: ["assinatura", "O XML assinado foi alterado.", "Use exatamente o XML assinado e persistido; n\xE3o edite seu conte\xFAdo."],
|
|
276
|
+
RETORNO_INVALIDO: ["transmissao", "A identidade ou o protocolo do retorno fiscal \xE9 inv\xE1lido.", "Consulte a situa\xE7\xE3o fiscal antes de decidir repetir a opera\xE7\xE3o."],
|
|
277
|
+
OPERACAO_FISCAL_FALHOU: ["operacao", "O motor n\xE3o conseguiu concluir a etapa fiscal.", "Confira a configura\xE7\xE3o da etapa, os dados do XML e as depend\xEAncias do runtime."],
|
|
278
|
+
TLS_SERVIDOR_INVALIDO: ["transmissao", "A verifica\xE7\xE3o TLS do servi\xE7o fiscal falhou.", "Confira o servi\xE7o e a cadeia de confian\xE7a; mantenha a verifica\xE7\xE3o TLS habilitada."],
|
|
279
|
+
CSC_INVALIDO: ["configuracao", "A configura\xE7\xE3o do CSC \xE9 inv\xE1lida.", "Confira id e valor do CSC sem registrar seu conte\xFAdo."],
|
|
280
|
+
PLATAFORMA_NAO_SUPORTADA: ["runtime", "A plataforma n\xE3o \xE9 suportada.", "Execute em Windows ou Linux x64 com Node.js 22.12 ou superior."],
|
|
281
|
+
RUNTIME_AUSENTE: ["runtime", "O motor fiscal n\xE3o foi encontrado.", "Instale o runtime da plataforma incluindo depend\xEAncias opcionais."],
|
|
282
|
+
RUNTIME_INVALIDO: ["runtime", "O runtime fiscal \xE9 inv\xE1lido.", "Use um runtime distribu\xEDdo e compat\xEDvel com a plataforma."],
|
|
283
|
+
RUNTIME_INCOMPLETO: ["runtime", "Falta um arquivo do runtime fiscal.", "Reinstale o runtime da plataforma."],
|
|
284
|
+
RUNTIME_ALTERADO: ["runtime", "A integridade do runtime fiscal n\xE3o foi confirmada.", "Reinstale o runtime; n\xE3o desative a verifica\xE7\xE3o dos hashes."],
|
|
285
|
+
CONTRATO_DIVERGENTE: ["runtime", "Cliente e motor usam contratos diferentes.", "Use vers\xF5es compat\xEDveis ou regenere e recompile ambos."],
|
|
286
|
+
DOCUMENTO_INVALIDO: ["documento", "O documento cont\xE9m dados incompat\xEDveis com o modelo.", "Valide os campos e tipos do documento antes de gerar o XML."],
|
|
287
|
+
OPERACAO_INVALIDA: ["operacao", "Os par\xE2metros da opera\xE7\xE3o s\xE3o inv\xE1lidos.", "Informe um objeto com os campos exigidos pela opera\xE7\xE3o."],
|
|
288
|
+
OPERACAO_CANCELADA: ["operacao", "A opera\xE7\xE3o foi cancelada.", "Confira o estado do envio antes de decidir continuar."],
|
|
289
|
+
TIMEOUT_MOTOR: ["runtime", "O motor excedeu o tempo de espera.", "Confira o estado do envio antes de repetir a opera\xE7\xE3o."],
|
|
290
|
+
EMISSOR_FECHADO: ["operacao", "O emissor foi encerrado.", "Crie um novo emissor para continuar."],
|
|
291
|
+
FALHA_INICIAR_MOTOR: ["runtime", "N\xE3o foi poss\xEDvel iniciar o motor fiscal.", "Confira a instala\xE7\xE3o e as permiss\xF5es de execu\xE7\xE3o do runtime."],
|
|
292
|
+
FALHA_PIPE: ["runtime", "A comunica\xE7\xE3o com o motor foi interrompida.", "Confira a instala\xE7\xE3o e o estado do envio antes de continuar."],
|
|
293
|
+
RESPOSTA_EXCESSIVA: ["runtime", "A resposta do motor excedeu o limite.", "Confira o tamanho da opera\xE7\xE3o e a vers\xE3o do runtime."],
|
|
294
|
+
RESPOSTA_INVALIDA: ["runtime", "O motor devolveu uma resposta inv\xE1lida.", "Confira a compatibilidade do runtime e o estado do envio."],
|
|
295
|
+
FALHA_MOTOR: ["runtime", "O motor encerrou sem uma resposta fiscal v\xE1lida.", "Confira a instala\xE7\xE3o e o estado do envio antes de continuar."],
|
|
296
|
+
CERTIFICADO_AUSENTE: ["configuracao", "O certificado A1 n\xE3o est\xE1 dispon\xEDvel para esta opera\xE7\xE3o.", "Configure um A1 acess\xEDvel e sua senha sem registrar esses dados."],
|
|
297
|
+
CERTIFICADO_EXCESSIVO: ["configuracao", "O certificado excede o limite de tamanho.", "Use um arquivo A1 de at\xE9 2 MiB."],
|
|
298
|
+
REQUISICAO_INVALIDA: ["operacao", "Os dados n\xE3o puderam ser serializados ou excedem o limite.", "Use dados JSON e reduza o tamanho da opera\xE7\xE3o."],
|
|
299
|
+
FILA_CHEIA: ["operacao", "A fila fiscal est\xE1 cheia.", "Aguarde a opera\xE7\xE3o atual terminar antes de iniciar outra."],
|
|
300
|
+
XML_INVALIDO: ["documento", "O XML est\xE1 vazio, tem tipo inv\xE1lido ou excede o limite.", "Informe o XML como texto UTF-8 de at\xE9 2 MiB."],
|
|
301
|
+
CHAVE_INVALIDA: ["documento", "A chave fiscal tem formato inv\xE1lido.", "Informe a chave como texto com 44 d\xEDgitos."],
|
|
302
|
+
RECIBO_INVALIDO: ["documento", "O recibo tem formato inv\xE1lido.", "Informe o recibo como texto com 15 d\xEDgitos."],
|
|
303
|
+
JUSTIFICATIVA_INVALIDA: ["documento", "A justificativa tem tamanho inv\xE1lido.", "Informe uma justificativa com 15 a 255 caracteres."],
|
|
304
|
+
PROTOCOLO_INVALIDO: ["documento", "O protocolo tem formato inv\xE1lido.", "Informe o protocolo como texto com 15 d\xEDgitos."],
|
|
305
|
+
OPERACAO_NAO_SUPORTADA: ["operacao", "A opera\xE7\xE3o n\xE3o \xE9 suportada para este modelo.", "Carta de corre\xE7\xE3o exige NF-e modelo 55."],
|
|
306
|
+
CORRECAO_INVALIDA: ["documento", "Os dados da carta de corre\xE7\xE3o s\xE3o inv\xE1lidos.", "Confira a corre\xE7\xE3o de 15 a 1000 caracteres e a sequ\xEAncia de 1 a 20."],
|
|
307
|
+
INUTILIZACAO_INVALIDA: ["documento", "A faixa de inutiliza\xE7\xE3o \xE9 inv\xE1lida.", "Confira ano, s\xE9rie e n\xFAmeros inicial e final."],
|
|
308
|
+
FALHA_LOCAL: ["operacao", "N\xE3o foi poss\xEDvel concluir a opera\xE7\xE3o local.", "Confira a etapa e os tipos dos dados; n\xE3o registre o erro bruto."]
|
|
309
|
+
};
|
|
310
|
+
function etapaDaOperacao(comando) {
|
|
311
|
+
return { gerarXml: "geracao", validar: "validacao", assinar: "assinatura", transmitir: "transmissao", consultar: "consulta", cancelar: "cancelamento", cartaCorrecao: "carta_correcao", inutilizar: "inutilizacao" }[comando] ?? "operacao";
|
|
312
|
+
}
|
|
313
|
+
function criarDiagnosticoErro(codigo, desconhecido = false, detalhes = {}) {
|
|
314
|
+
const safeCode = Object.hasOwn(CATALOGO, codigo) ? codigo : "FALHA_LOCAL";
|
|
315
|
+
const [defaultStage, mensagem, defaultAction] = CATALOGO[safeCode];
|
|
316
|
+
const etapa = detalhes.etapa && ETAPAS.has(detalhes.etapa) ? detalhes.etapa : defaultStage;
|
|
317
|
+
const campo = detalhes.campo && CAMPOS.has(detalhes.campo) ? detalhes.campo : void 0;
|
|
318
|
+
const acoesConfig = { cnpj: "Informe o CNPJ como texto com 14 d\xEDgitos.", uf: "Informe a sigla da UF em letras mai\xFAsculas, por exemplo PE.", modelo: "Informe o n\xFAmero 55 para NF-e ou 65 para NFC-e, sem aspas.", ambiente: "Informe o n\xFAmero 2 para homologa\xE7\xE3o ou 1 para produ\xE7\xE3o, sem aspas.", timeoutMs: "Informe um n\xFAmero inteiro de 1 a 120000 milissegundos.", limiteFila: "Informe um n\xFAmero inteiro de 0 a 1000.", limiteBytes: "Informe um n\xFAmero inteiro de 256 a 8388608 bytes.", runtimeDirectory: "Informe o diret\xF3rio do runtime como texto n\xE3o vazio." };
|
|
319
|
+
const acao = safeCode === "CONFIGURACAO_INVALIDA" && campo && Object.hasOwn(acoesConfig, campo) ? acoesConfig[campo] : defaultAction;
|
|
320
|
+
const causa = Object.freeze({ codigo: safeCode, etapa, ...campo ? { campo } : {} });
|
|
321
|
+
return Object.freeze({
|
|
322
|
+
codigo: safeCode,
|
|
323
|
+
etapa,
|
|
324
|
+
...campo ? { campo } : {},
|
|
325
|
+
mensagem,
|
|
326
|
+
acao: desconhecido ? "Consulte a situa\xE7\xE3o fiscal antes de repetir. O envio pode ter ocorrido; n\xE3o retransmita automaticamente." : acao,
|
|
327
|
+
statusEnvio: desconhecido ? "resultado_incerto" : "nao_enviado",
|
|
328
|
+
causa
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
function diagnosticarErro(erro) {
|
|
332
|
+
return erro instanceof ErroAcbrNode ? erro.diagnostico : criarDiagnosticoErro("FALHA_LOCAL", true);
|
|
333
|
+
}
|
|
334
|
+
function adicionarDiagnosticoLimpeza(diagnostico) {
|
|
335
|
+
const acao = diagnostico.statusEnvio === "resultado_incerto" ? "Encerre esta aplica\xE7\xE3o antes de iniciar outro motor e consulte a situa\xE7\xE3o fiscal antes de repetir qualquer envio." : "Encerre esta aplica\xE7\xE3o antes de iniciar outro motor. As pr\xF3ximas opera\xE7\xF5es deste emissor foram bloqueadas.";
|
|
336
|
+
const limpeza = Object.freeze({ codigo: "ENCERRAMENTO_MOTOR_NAO_CONFIRMADO", etapa: "limpeza", mensagem: "N\xE3o foi poss\xEDvel confirmar o encerramento do motor fiscal.", acao });
|
|
337
|
+
return Object.freeze({ ...diagnostico, acao, limpeza });
|
|
338
|
+
}
|
|
339
|
+
function diagnosticarResultado(resultado, comando) {
|
|
340
|
+
const etapa = etapaDaOperacao(comando);
|
|
341
|
+
if (!resultado || typeof resultado !== "object") return criarDiagnosticoErro("FALHA_LOCAL", true, { etapa });
|
|
342
|
+
if (resultado.envioIniciado !== void 0 && typeof resultado.envioIniciado !== "boolean") return criarDiagnosticoErro("RESPOSTA_INVALIDA", true, { etapa });
|
|
343
|
+
let statusEnvio = "resultado_incerto", codigo = "RESULTADO_INCERTO";
|
|
344
|
+
let mensagem = "A situa\xE7\xE3o fiscal ainda n\xE3o foi confirmada.";
|
|
345
|
+
let acao = "Consulte a situa\xE7\xE3o fiscal antes de repetir. N\xE3o retransmita automaticamente.";
|
|
346
|
+
const local = comando === "gerarXml" && resultado.estado === "XML_GERADO" || comando === "validar" && resultado.estado === "VALIDADO" || comando === "assinar" && resultado.estado === "ASSINADO";
|
|
347
|
+
const semEvento = resultado.envioIniciado === false || resultado.envioIniciado === void 0;
|
|
348
|
+
const protocolo = typeof resultado.protocolo === "string" && /^\d{15}$/.test(resultado.protocolo);
|
|
349
|
+
const chave = typeof resultado.chave === "string" && /^\d{44}$/.test(resultado.chave);
|
|
350
|
+
const autorizacao = (comando === "transmitir" || comando === "consultar") && resultado.estado === "AUTORIZADO" && [100, 150].includes(resultado.cStat) && protocolo && chave && (comando === "consultar" || resultado.envioIniciado !== false);
|
|
351
|
+
const evento = comando === "cancelar" && resultado.estado === "CANCELADO" && [135, 136].includes(resultado.cStat) && chave || comando === "cartaCorrecao" && resultado.estado === "EVENTO_REGISTRADO" && resultado.cStat === 135 && chave || comando === "inutilizar" && resultado.estado === "INUTILIZADO" && resultado.cStat === 102;
|
|
352
|
+
if (local && resultado.sucesso === true && semEvento) {
|
|
353
|
+
statusEnvio = "nao_enviado";
|
|
354
|
+
codigo = "ETAPA_LOCAL_CONCLUIDA";
|
|
355
|
+
mensagem = "A etapa local foi conclu\xEDda; esta opera\xE7\xE3o n\xE3o transmitiu a nota.";
|
|
356
|
+
acao = "Confira o resultado antes de seguir para a pr\xF3xima etapa.";
|
|
357
|
+
} else if (resultado.sucesso === true && (autorizacao || evento && protocolo && resultado.envioIniciado !== false)) {
|
|
358
|
+
statusEnvio = "autorizado";
|
|
359
|
+
codigo = "OPERACAO_CONFIRMADA";
|
|
360
|
+
mensagem = { AUTORIZADO: "A nota foi autorizada.", CANCELADO: "O cancelamento foi confirmado.", EVENTO_REGISTRADO: "O evento foi registrado.", INUTILIZADO: "A faixa foi inutilizada." }[resultado.estado];
|
|
361
|
+
acao = "Guarde o resultado fiscal. N\xE3o repita esta opera\xE7\xE3o.";
|
|
362
|
+
} else if (resultado.sucesso === false && (comando === "consultar" || resultado.envioIniciado !== false) && ["transmitir", "consultar", "cancelar", "cartaCorrecao", "inutilizar"].includes(comando) && Number.isInteger(resultado.cStat) && Number(resultado.cStat) > 0 && Number(resultado.cStat) <= 9999 && (resultado.estado === "DENEGADO" && [110, 301, 302].includes(resultado.cStat) || resultado.estado === "REJEITADO" && ![100, 150, 110, 301, 302, 101, 151, 155, 103, 104, 105, 108, 109, 204, 539, 573, 135, 136, 102, 217].includes(resultado.cStat))) {
|
|
363
|
+
statusEnvio = "rejeitado";
|
|
364
|
+
codigo = resultado.estado === "DENEGADO" ? "NOTA_DENEGADA" : "OPERACAO_REJEITADA";
|
|
365
|
+
mensagem = resultado.estado === "DENEGADO" ? "A nota foi denegada." : "A opera\xE7\xE3o foi rejeitada.";
|
|
366
|
+
acao = resultado.estado === "DENEGADO" ? "Consulte a situa\xE7\xE3o fiscal e a orienta\xE7\xE3o respons\xE1vel antes de usar a numera\xE7\xE3o." : "Confira o cStat e revise os dados antes de decidir uma nova tentativa.";
|
|
367
|
+
} else if (resultado.estado === "ERRO" && resultado.envioIniciado === false) {
|
|
368
|
+
if (typeof resultado.codigo === "string" && Object.hasOwn(CATALOGO, resultado.codigo)) return criarDiagnosticoErro(resultado.codigo, false, { etapa });
|
|
369
|
+
statusEnvio = "nao_enviado";
|
|
370
|
+
codigo = "FALHA_ANTES_ENVIO";
|
|
371
|
+
mensagem = "O motor informou falha antes de iniciar o envio desta opera\xE7\xE3o.";
|
|
372
|
+
acao = "Revise a configura\xE7\xE3o e os dados antes de continuar.";
|
|
373
|
+
}
|
|
374
|
+
const cStat = Number.isInteger(resultado.cStat) && Number(resultado.cStat) > 0 && Number(resultado.cStat) <= 9999 ? resultado.cStat : void 0;
|
|
375
|
+
return Object.freeze({ codigo, etapa, mensagem, acao, statusEnvio, ...cStat !== void 0 ? { cStat } : {} });
|
|
376
|
+
}
|
|
377
|
+
|
|
256
378
|
// src/types.ts
|
|
257
379
|
var PROTOCOL_VERSION = 1;
|
|
258
380
|
var ErroAcbrNode = class extends Error {
|
|
259
|
-
constructor(codigo, mensagem, resultadoDesconhecido = false, xmlBase64) {
|
|
381
|
+
constructor(codigo, mensagem, resultadoDesconhecido = false, xmlBase64, detalhes) {
|
|
260
382
|
super(mensagem);
|
|
261
383
|
this.codigo = codigo;
|
|
262
384
|
this.resultadoDesconhecido = resultadoDesconhecido;
|
|
263
385
|
this.xmlBase64 = xmlBase64;
|
|
386
|
+
this.#diagnostico = criarDiagnosticoErro(codigo, resultadoDesconhecido, detalhes);
|
|
387
|
+
Object.defineProperty(this, "xmlBase64", { value: xmlBase64, enumerable: false });
|
|
388
|
+
Object.defineProperty(this, "cause", { value: this.diagnostico.causa, enumerable: false });
|
|
264
389
|
}
|
|
265
390
|
name = "ErroAcbrNode";
|
|
391
|
+
#diagnostico;
|
|
392
|
+
get diagnostico() {
|
|
393
|
+
return this.#diagnostico;
|
|
394
|
+
}
|
|
395
|
+
/** Acrescenta apenas o aviso estático de limpeza, preservando o erro da operação. */
|
|
396
|
+
anotarFalhaLimpeza() {
|
|
397
|
+
this.#diagnostico = adicionarDiagnosticoLimpeza(this.#diagnostico);
|
|
398
|
+
}
|
|
399
|
+
toJSON() {
|
|
400
|
+
return this.diagnostico;
|
|
401
|
+
}
|
|
266
402
|
};
|
|
267
403
|
|
|
268
404
|
// src/runtime.ts
|
|
@@ -270,9 +406,10 @@ var import_meta = {};
|
|
|
270
406
|
var STATES = /* @__PURE__ */ new Set(["DENEGADO", "XML_GERADO", "VALIDADO", "ASSINADO", "AUTORIZADO", "REJEITADO", "PENDENTE", "INDETERMINADO", "CONSULTADO", "CANCELADO", "EVENTO_REGISTRADO", "INUTILIZADO", "ERRO"]);
|
|
271
407
|
var UFS = new Set("AC AL AP AM BA CE DF ES GO MA MT MS MG PA PB PR PE PI RJ RN RS RO RR SC SP SE TO".split(" "));
|
|
272
408
|
var MAX_BYTES = 8 * 1024 * 1024;
|
|
409
|
+
var MAX_TEARDOWN_MS = 1e3;
|
|
273
410
|
var plain = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
274
411
|
var validContract = (v) => plain(v) && Number.isInteger(v.sourceRevision) && Number(v.sourceRevision) > 0 && typeof v.contractHash === "string" && /^[a-f0-9]{64}$/.test(v.contractHash);
|
|
275
|
-
var fail = (code, message, req, unknown = false) => new ErroAcbrNode(code, message, unknown, req?.comando === "transmitir" ? req.xmlBase64 : void 0);
|
|
412
|
+
var fail = (code, message, req, unknown = false, detalhes) => new ErroAcbrNode(code, message, unknown, req?.comando === "transmitir" ? req.xmlBase64 : void 0, { ...req ? { etapa: etapaDaOperacao(req.comando) } : {}, ...detalhes });
|
|
276
413
|
function confined(root, relative) {
|
|
277
414
|
const file = import_node_path.default.resolve(root, relative), part = import_node_path.default.relative(root, file);
|
|
278
415
|
if (!relative || import_node_path.default.isAbsolute(relative) || part === ".." || part.startsWith(".." + import_node_path.default.sep)) throw fail("RUNTIME_INVALIDO", "Caminho inv\xE1lido no runtime.");
|
|
@@ -315,26 +452,48 @@ async function resolveRuntime(directory, contract) {
|
|
|
315
452
|
return { directory: root, executable: confined(root, m.executable) };
|
|
316
453
|
}
|
|
317
454
|
function criarEmissor(options) {
|
|
318
|
-
|
|
455
|
+
const configFail = (campo) => fail("CONFIGURACAO_INVALIDA", "Informe campos e tipos v\xE1lidos na configura\xE7\xE3o.", void 0, false, { etapa: "configuracao", campo });
|
|
456
|
+
if (!plain(options)) throw configFail();
|
|
457
|
+
if (typeof options.cnpj !== "string" || !/^\d{14}$/.test(options.cnpj)) throw configFail("cnpj");
|
|
458
|
+
if (typeof options.uf !== "string" || !UFS.has(options.uf)) throw configFail("uf");
|
|
459
|
+
if (![55, 65].includes(options.modelo)) throw configFail("modelo");
|
|
460
|
+
if (![1, 2].includes(options.ambiente)) throw configFail("ambiente");
|
|
319
461
|
if (!validContract(options.contrato)) throw fail("CONTRATO_INVALIDO", "Contrato gerado inv\xE1lido.");
|
|
320
462
|
const cert = options.certificado;
|
|
321
|
-
if (cert && (typeof cert.senha !== "string" || !!cert.pfx === !!cert.arquivo || cert.pfx && !(cert.pfx instanceof Uint8Array))) throw fail("CERTIFICADO_INVALIDO", "Informe A1 em pfx ou arquivo e sua senha.");
|
|
322
|
-
if (options.csc && (!/^\d{1,6}$/.test(options.csc.id) || typeof options.csc.valor !== "string" || !options.csc.valor || options.csc.valor.length > 256)) throw fail("CSC_INVALIDO", "CSC inv\xE1lido.");
|
|
463
|
+
if (cert !== void 0 && (!plain(cert) || typeof cert.senha !== "string" || !!cert.pfx === !!cert.arquivo || cert.pfx !== void 0 && !(cert.pfx instanceof Uint8Array) || cert.arquivo !== void 0 && (typeof cert.arquivo !== "string" || !cert.arquivo))) throw fail("CERTIFICADO_INVALIDO", "Informe A1 em pfx ou arquivo e sua senha.", void 0, false, { campo: "certificado" });
|
|
464
|
+
if (options.csc !== void 0 && (!plain(options.csc) || typeof options.csc.id !== "string" || !/^\d{1,6}$/.test(options.csc.id) || typeof options.csc.valor !== "string" || !options.csc.valor || options.csc.valor.length > 256)) throw fail("CSC_INVALIDO", "CSC inv\xE1lido.", void 0, false, { campo: "csc" });
|
|
465
|
+
if (options.runtimeDirectory !== void 0 && (typeof options.runtimeDirectory !== "string" || !options.runtimeDirectory)) throw configFail("runtimeDirectory");
|
|
466
|
+
if (options.validaDocumento !== void 0 && typeof options.validaDocumento !== "function" || options.criaProcesso !== void 0 && typeof options.criaProcesso !== "function") throw configFail();
|
|
323
467
|
const cfg = { cnpj: options.cnpj, uf: options.uf, modelo: options.modelo, ambiente: options.ambiente, csc: options.csc ? { ...options.csc } : void 0 };
|
|
324
468
|
const certificate = cert ? { ...cert, pfx: cert.pfx ? Buffer.from(cert.pfx) : void 0 } : void 0;
|
|
325
469
|
const contract = { ...options.contrato };
|
|
326
470
|
const timeout = options.timeoutMs ?? 12e4, capacity = options.limiteFila ?? 32, bytesLimit = options.limiteBytes ?? MAX_BYTES;
|
|
327
|
-
if (!Number.isInteger(timeout) || timeout < 1 || timeout > 12e4
|
|
471
|
+
if (!Number.isInteger(timeout) || timeout < 1 || timeout > 12e4) throw configFail("timeoutMs");
|
|
472
|
+
if (!Number.isInteger(capacity) || capacity < 0 || capacity > 1e3) throw configFail("limiteFila");
|
|
473
|
+
if (!Number.isInteger(bytesLimit) || bytesLimit < 256 || bytesLimit > MAX_BYTES) throw configFail("limiteBytes");
|
|
328
474
|
const launch = options.criaProcesso ?? ((exe, args, config) => (0, import_node_child_process.spawn)(exe, args, { ...config, stdio: ["pipe", "pipe", "pipe"] }));
|
|
329
|
-
let runtimePromise, closed = false, current;
|
|
475
|
+
let runtimePromise, closed = false, teardownFailed = false, current;
|
|
330
476
|
const queue = [];
|
|
477
|
+
const closedError = () => {
|
|
478
|
+
const error = fail("EMISSOR_FECHADO", "Emissor encerrado.");
|
|
479
|
+
if (teardownFailed) error.anotarFalhaLimpeza();
|
|
480
|
+
return error;
|
|
481
|
+
};
|
|
482
|
+
const rejectQueue = () => {
|
|
483
|
+
for (const item of queue.splice(0)) {
|
|
484
|
+
item.signal?.removeEventListener("abort", item.abort);
|
|
485
|
+
item.bytes.fill(0);
|
|
486
|
+
item.reject(closedError());
|
|
487
|
+
}
|
|
488
|
+
};
|
|
331
489
|
async function execute(item) {
|
|
332
490
|
if (closed || item.signal?.aborted) throw fail("OPERACAO_CANCELADA", "Opera\xE7\xE3o cancelada antes da execu\xE7\xE3o.");
|
|
333
491
|
const runtime = await (runtimePromise ??= resolveRuntime(options.runtimeDirectory, contract));
|
|
334
492
|
if (closed || item.signal?.aborted) throw fail("OPERACAO_CANCELADA", "Opera\xE7\xE3o cancelada antes da execu\xE7\xE3o.");
|
|
335
|
-
await new Promise((done) => {
|
|
493
|
+
return await new Promise((done, rejectExecution) => {
|
|
336
494
|
let stopError;
|
|
337
495
|
let child, finished = false, started = false, sending = false, total = 0, rest = Buffer.alloc(0), result;
|
|
496
|
+
let teardownTimer;
|
|
338
497
|
let finishCurrent;
|
|
339
498
|
const doneCurrent = new Promise((r) => {
|
|
340
499
|
finishCurrent = r;
|
|
@@ -344,18 +503,54 @@ function criarEmissor(options) {
|
|
|
344
503
|
if (finished) return;
|
|
345
504
|
finished = true;
|
|
346
505
|
clearTimeout(timer);
|
|
506
|
+
clearTimeout(teardownTimer);
|
|
347
507
|
item.signal?.removeEventListener("abort", abort);
|
|
348
508
|
item.bytes.fill(0);
|
|
349
509
|
if (current?.done === doneCurrent) current = void 0;
|
|
350
510
|
finishCurrent();
|
|
351
|
-
error ?
|
|
352
|
-
|
|
511
|
+
error ? rejectExecution(error) : done(result);
|
|
512
|
+
};
|
|
513
|
+
const detachOwnedChild = () => {
|
|
514
|
+
for (const pipe of [child?.stdin, child?.stdout, child?.stderr]) {
|
|
515
|
+
try {
|
|
516
|
+
pipe?.destroy();
|
|
517
|
+
} catch {
|
|
518
|
+
}
|
|
519
|
+
try {
|
|
520
|
+
pipe?.unref?.();
|
|
521
|
+
} catch {
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
try {
|
|
525
|
+
child?.unref();
|
|
526
|
+
} catch {
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
const teardownFallback = () => {
|
|
530
|
+
if (finished) return;
|
|
531
|
+
stopError ??= fail("FALHA_MOTOR", "O motor n\xE3o foi encerrado.", item.req, uncertain());
|
|
532
|
+
stopError.anotarFalhaLimpeza();
|
|
533
|
+
teardownFailed = true;
|
|
534
|
+
closed = true;
|
|
535
|
+
rejectQueue();
|
|
536
|
+
certificate?.pfx?.fill(0);
|
|
537
|
+
finish(stopError);
|
|
538
|
+
detachOwnedChild();
|
|
353
539
|
};
|
|
354
540
|
const stop = (code, message) => {
|
|
355
541
|
if (finished || stopError) return;
|
|
356
542
|
stopError = fail(code, message, item.req, uncertain());
|
|
357
|
-
if (child?.pid)
|
|
358
|
-
|
|
543
|
+
if (!child?.pid) {
|
|
544
|
+
finish(stopError);
|
|
545
|
+
detachOwnedChild();
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
teardownTimer = setTimeout(teardownFallback, MAX_TEARDOWN_MS);
|
|
549
|
+
try {
|
|
550
|
+
if (child.kill("SIGKILL") !== true) teardownFallback();
|
|
551
|
+
} catch {
|
|
552
|
+
teardownFallback();
|
|
553
|
+
}
|
|
359
554
|
};
|
|
360
555
|
const abort = () => stop("OPERACAO_CANCELADA", "Opera\xE7\xE3o cancelada; confira a situa\xE7\xE3o fiscal quando o envio foi iniciado.");
|
|
361
556
|
const timer = setTimeout(() => stop("TIMEOUT_MOTOR", "O motor excedeu o prazo; consulte a situa\xE7\xE3o antes de transmitir novamente."), timeout);
|
|
@@ -382,8 +577,17 @@ function criarEmissor(options) {
|
|
|
382
577
|
child.on("spawn", () => {
|
|
383
578
|
started = true;
|
|
384
579
|
});
|
|
385
|
-
child.on("error", () =>
|
|
580
|
+
child.on("error", () => {
|
|
581
|
+
if (finished) return;
|
|
582
|
+
if (stopError) {
|
|
583
|
+
teardownFallback();
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
stop("FALHA_INICIAR_MOTOR", "N\xE3o foi poss\xEDvel iniciar o motor.");
|
|
587
|
+
});
|
|
386
588
|
child.stdin.on("error", () => stop("FALHA_PIPE", "N\xE3o foi poss\xEDvel comunicar com o motor."));
|
|
589
|
+
child.stdout.on("error", () => stop("FALHA_PIPE", "N\xE3o foi poss\xEDvel comunicar com o motor."));
|
|
590
|
+
child.stderr.on("error", () => stop("FALHA_PIPE", "N\xE3o foi poss\xEDvel comunicar com o motor."));
|
|
387
591
|
child.stderr.on("data", () => {
|
|
388
592
|
});
|
|
389
593
|
child.stdout.on("data", (chunk) => {
|
|
@@ -409,7 +613,9 @@ function criarEmissor(options) {
|
|
|
409
613
|
if (result || frame.versao !== 1 || frame.sourceRevision !== contract.sourceRevision || frame.contractHash !== contract.contractHash || typeof frame.sucesso !== "boolean" || !STATES.has(String(frame.estado))) throw Error();
|
|
410
614
|
if (frame.xmlBase64 !== void 0 && (typeof frame.xmlBase64 !== "string" || !frame.xmlBase64.length || Buffer.from(frame.xmlBase64, "base64").toString("base64") !== frame.xmlBase64)) throw Error();
|
|
411
615
|
if (frame.cStat !== void 0 && (!Number.isInteger(frame.cStat) || Number(frame.cStat) < 1 || Number(frame.cStat) > 9999)) throw Error();
|
|
412
|
-
|
|
616
|
+
if (frame.envioIniciado !== void 0 && typeof frame.envioIniciado !== "boolean" || sending && frame.envioIniciado === false) throw Error();
|
|
617
|
+
const fiscal = frame;
|
|
618
|
+
result = { ...fiscal, diagnostico: diagnosticarResultado(sending ? { ...fiscal, envioIniciado: true } : fiscal, item.req.comando) };
|
|
413
619
|
} catch {
|
|
414
620
|
stop("RESPOSTA_INVALIDA", "O motor retornou uma resposta inv\xE1lida.");
|
|
415
621
|
return;
|
|
@@ -440,7 +646,8 @@ function criarEmissor(options) {
|
|
|
440
646
|
busy = true;
|
|
441
647
|
item.signal?.removeEventListener("abort", item.abort);
|
|
442
648
|
try {
|
|
443
|
-
await execute(item);
|
|
649
|
+
const result = await execute(item);
|
|
650
|
+
item.resolve(result);
|
|
444
651
|
} catch (e) {
|
|
445
652
|
item.bytes.fill(0);
|
|
446
653
|
item.reject(e);
|
|
@@ -450,7 +657,11 @@ function criarEmissor(options) {
|
|
|
450
657
|
}
|
|
451
658
|
}
|
|
452
659
|
async function request(command, data, operation = {}) {
|
|
453
|
-
|
|
660
|
+
const rawOperation = operation;
|
|
661
|
+
if (!plain(rawOperation)) throw fail("OPERACAO_INVALIDA", "Informe op\xE7\xF5es v\xE1lidas para a opera\xE7\xE3o.", void 0, false, { etapa: etapaDaOperacao(command), campo: "operacao" });
|
|
662
|
+
const signal = operation.signal;
|
|
663
|
+
if (signal !== void 0 && (!plain(signal) || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function" || typeof signal.removeEventListener !== "function")) throw fail("OPERACAO_INVALIDA", "Informe op\xE7\xF5es v\xE1lidas para a opera\xE7\xE3o.", void 0, false, { etapa: etapaDaOperacao(command), campo: "signal" });
|
|
664
|
+
if (closed) throw closedError();
|
|
454
665
|
if (operation.signal?.aborted) throw fail("OPERACAO_CANCELADA", "Opera\xE7\xE3o cancelada antes da execu\xE7\xE3o.");
|
|
455
666
|
if (["assinar", "transmitir", "consultar", "cancelar", "cartaCorrecao", "inutilizar"].includes(command) && !certificate) throw fail("CERTIFICADO_AUSENTE", "A opera\xE7\xE3o exige um certificado A1.");
|
|
456
667
|
if (command === "gerarXml") options.validaDocumento?.(data.documento);
|
|
@@ -476,7 +687,7 @@ function criarEmissor(options) {
|
|
|
476
687
|
return new Promise((resolve, reject) => {
|
|
477
688
|
if (closed) {
|
|
478
689
|
bytes.fill(0);
|
|
479
|
-
reject(
|
|
690
|
+
reject(closedError());
|
|
480
691
|
return;
|
|
481
692
|
}
|
|
482
693
|
if (busy && queue.length >= capacity) {
|
|
@@ -501,14 +712,17 @@ function criarEmissor(options) {
|
|
|
501
712
|
});
|
|
502
713
|
}
|
|
503
714
|
const xmlData = (xml) => {
|
|
504
|
-
if (typeof xml !== "string" || !xml.trim() || Buffer.byteLength(xml, "utf8") > 2 * 1024 * 1024) throw fail("XML_INVALIDO", "XML vazio ou acima do limite.");
|
|
715
|
+
if (typeof xml !== "string" || !xml.trim() || Buffer.byteLength(xml, "utf8") > 2 * 1024 * 1024) throw fail("XML_INVALIDO", "XML vazio ou acima do limite.", void 0, false, { campo: "xml" });
|
|
505
716
|
return { xmlBase64: Buffer.from(xml, "utf8").toString("base64") };
|
|
506
717
|
};
|
|
507
718
|
const checkKey = (key) => {
|
|
508
|
-
if (!/^\d{44}$/.test(key)) throw fail("CHAVE_INVALIDA", "Chave fiscal inv\xE1lida.");
|
|
719
|
+
if (typeof key !== "string" || !/^\d{44}$/.test(key)) throw fail("CHAVE_INVALIDA", "Chave fiscal inv\xE1lida.", void 0, false, { campo: "chave" });
|
|
509
720
|
};
|
|
510
721
|
const reason = (value) => {
|
|
511
|
-
if (typeof value !== "string" || value.length < 15 || value.length > 255) throw fail("JUSTIFICATIVA_INVALIDA", "Justificativa deve ter de 15 a 255 caracteres.");
|
|
722
|
+
if (typeof value !== "string" || value.length < 15 || value.length > 255) throw fail("JUSTIFICATIVA_INVALIDA", "Justificativa deve ter de 15 a 255 caracteres.", void 0, false, { campo: "justificativa" });
|
|
723
|
+
};
|
|
724
|
+
const checkObject = (data, campo) => {
|
|
725
|
+
if (!plain(data)) throw fail("OPERACAO_INVALIDA", "Informe os par\xE2metros da opera\xE7\xE3o como objeto.", void 0, false, { campo });
|
|
512
726
|
};
|
|
513
727
|
return {
|
|
514
728
|
gerarXml: (documento, op) => request("gerarXml", { documento }, op),
|
|
@@ -516,39 +730,43 @@ function criarEmissor(options) {
|
|
|
516
730
|
assinar: (xml, op) => request("assinar", xmlData(xml), op),
|
|
517
731
|
transmitir: (xml, op) => request("transmitir", xmlData(xml), op),
|
|
518
732
|
consultar: (consulta, op) => {
|
|
733
|
+
checkObject(consulta, "consulta");
|
|
519
734
|
checkKey(consulta.chave);
|
|
520
|
-
if (consulta.recibo && !/^\d{15}$/.test(consulta.recibo)) throw fail("RECIBO_INVALIDO", "Recibo inv\xE1lido.");
|
|
735
|
+
if (consulta.recibo !== void 0 && (typeof consulta.recibo !== "string" || !/^\d{15}$/.test(consulta.recibo))) throw fail("RECIBO_INVALIDO", "Recibo inv\xE1lido.", void 0, false, { campo: "recibo" });
|
|
521
736
|
return request("consultar", consulta, op);
|
|
522
737
|
},
|
|
523
738
|
cancelar: (data, op) => {
|
|
739
|
+
checkObject(data, "cancelamento");
|
|
524
740
|
checkKey(data.chave);
|
|
525
741
|
reason(data.justificativa);
|
|
526
|
-
if (!/^\d{15}$/.test(data.protocolo)) throw fail("PROTOCOLO_INVALIDO", "Protocolo inv\xE1lido.");
|
|
742
|
+
if (typeof data.protocolo !== "string" || !/^\d{15}$/.test(data.protocolo)) throw fail("PROTOCOLO_INVALIDO", "Protocolo inv\xE1lido.", void 0, false, { campo: "protocolo" });
|
|
527
743
|
return request("cancelar", data, op);
|
|
528
744
|
},
|
|
529
745
|
cartaCorrecao: (data, op) => {
|
|
746
|
+
checkObject(data, "cartaCorrecao");
|
|
530
747
|
if (cfg.modelo !== 55) throw fail("OPERACAO_NAO_SUPORTADA", "Carta de corre\xE7\xE3o exige NF-e modelo 55.");
|
|
531
748
|
checkKey(data.chave);
|
|
532
|
-
if (typeof data.correcao !== "string" || data.correcao.length < 15 || data.correcao.length > 1e3 || !Number.isInteger(data.sequenciaEvento ?? 1) || (data.sequenciaEvento ?? 1) < 1 || (data.sequenciaEvento ?? 1) > 20) throw fail("CORRECAO_INVALIDA", "Dados da carta de corre\xE7\xE3o inv\xE1lidos.");
|
|
749
|
+
if (typeof data.correcao !== "string" || data.correcao.length < 15 || data.correcao.length > 1e3 || !Number.isInteger(data.sequenciaEvento ?? 1) || (data.sequenciaEvento ?? 1) < 1 || (data.sequenciaEvento ?? 1) > 20) throw fail("CORRECAO_INVALIDA", "Dados da carta de corre\xE7\xE3o inv\xE1lidos.", void 0, false, { campo: "cartaCorrecao" });
|
|
533
750
|
return request("cartaCorrecao", { ...data, sequenciaEvento: data.sequenciaEvento ?? 1 }, op);
|
|
534
751
|
},
|
|
535
752
|
inutilizar: (data, op) => {
|
|
753
|
+
checkObject(data, "inutilizacao");
|
|
536
754
|
reason(data.justificativa);
|
|
537
|
-
if (!Number.isInteger(data.ano) || data.ano < 0 || data.ano > 99 || !Number.isInteger(data.serie) || data.serie < 0 || data.serie > 999 || !Number.isInteger(data.numeroInicial) || data.numeroInicial < 1 || !Number.isInteger(data.numeroFinal) || data.numeroFinal < data.numeroInicial || data.numeroFinal > 999999999) throw fail("INUTILIZACAO_INVALIDA", "Faixa de inutiliza\xE7\xE3o inv\xE1lida.");
|
|
755
|
+
if (!Number.isInteger(data.ano) || data.ano < 0 || data.ano > 99 || !Number.isInteger(data.serie) || data.serie < 0 || data.serie > 999 || !Number.isInteger(data.numeroInicial) || data.numeroInicial < 1 || !Number.isInteger(data.numeroFinal) || data.numeroFinal < data.numeroInicial || data.numeroFinal > 999999999) throw fail("INUTILIZACAO_INVALIDA", "Faixa de inutiliza\xE7\xE3o inv\xE1lida.", void 0, false, { campo: "inutilizacao" });
|
|
538
756
|
return request("inutilizar", { inutilizacao: { ano: data.ano, serie: data.serie, numeroInicial: data.numeroInicial, numeroFinal: data.numeroFinal }, justificativa: data.justificativa }, op);
|
|
539
757
|
},
|
|
540
758
|
async fechar() {
|
|
541
|
-
if (closed)
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
item.signal?.removeEventListener("abort", item.abort);
|
|
545
|
-
item.bytes.fill(0);
|
|
546
|
-
item.reject(fail("EMISSOR_FECHADO", "Emissor encerrado."));
|
|
759
|
+
if (!closed) {
|
|
760
|
+
closed = true;
|
|
761
|
+
rejectQueue();
|
|
547
762
|
}
|
|
548
763
|
const running = current;
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
764
|
+
try {
|
|
765
|
+
running?.stop();
|
|
766
|
+
if (running) await running.done;
|
|
767
|
+
} finally {
|
|
768
|
+
certificate?.pfx?.fill(0);
|
|
769
|
+
}
|
|
552
770
|
}
|
|
553
771
|
};
|
|
554
772
|
}
|
|
@@ -3083,41 +3301,91 @@ var TVolCollectionItem = class {
|
|
|
3083
3301
|
}
|
|
3084
3302
|
};
|
|
3085
3303
|
var MODEL_SCHEMA = { "TACBrProcessoEmissao": { "name": "TACBrProcessoEmissao", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["peAplicativoContribuinte", "peAvulsaFisco", "peAvulsaContribuinte", "peContribuinteAplicativoFisco", "peProvedorAssinaturaAutorizacao"] }, "TACBrTipoAmbiente": { "name": "TACBrTipoAmbiente", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["taProducao", "taHomologacao"] }, "TACBrTipoEmissao": { "name": "TACBrTipoEmissao", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["teNormal", "teContingencia", "teSCAN", "teDPEC", "teFSDA", "teSVCAN", "teSVCRS", "teSVCSP", "teOffLine"] }, "TACBrTipoImpressao": { "name": "TACBrTipoImpressao", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tiSemGeracao", "tiRetrato", "tiPaisagem", "tiSimplificado", "tiNFCe", "tiMsgEletronica", "tiSimplificadoTipo2"] }, "TAdiCollection": { "name": "TAdiCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TAdiCollectionItem", "factory": "New" }, "TAdiCollectionItem": { "name": "TAdiCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cFabricante", "type": "string", "kind": "string", "readonly": false }, { "name": "nAdicao", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "nDraw", "type": "string", "kind": "string", "readonly": false }, { "name": "nSeqAdi", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "vDescDI", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "Tagropecuario": { "name": "Tagropecuario", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "defensivo", "type": "TdefensivoCollection", "kind": "list", "ref": "TdefensivoCollection", "readonly": false }, { "name": "guiaTransito", "type": "TguiaTransito", "kind": "object", "ref": "TguiaTransito", "readonly": false }] }, "TArmaCollection": { "name": "TArmaCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TArmaCollectionItem", "factory": "New" }, "TArmaCollectionItem": { "name": "TArmaCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "descr", "type": "string", "kind": "string", "readonly": false }, { "name": "nCano", "type": "string", "kind": "string", "readonly": false }, { "name": "nSerie", "type": "string", "kind": "string", "readonly": false }, { "name": "tpArma", "type": "TpcnTipoArma", "kind": "enum", "ref": "TpcnTipoArma", "readonly": false, "declaredDefault": "taUsoPermitido" }] }, "TautXMLCollection": { "name": "TautXMLCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TautXMLCollectionItem", "factory": "New" }, "TautXMLCollectionItem": { "name": "TautXMLCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNPJCPF", "type": "string", "kind": "string", "readonly": false }] }, "TAvulsa": { "name": "TAvulsa", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNPJ", "type": "string", "kind": "string", "readonly": false }, { "name": "dEmi", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "dPag", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "fone", "type": "string", "kind": "string", "readonly": false }, { "name": "matr", "type": "string", "kind": "string", "readonly": false }, { "name": "nDAR", "type": "string", "kind": "string", "readonly": false }, { "name": "repEmi", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }, { "name": "vDAR", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "xAgente", "type": "string", "kind": "string", "readonly": false }, { "name": "xOrgao", "type": "string", "kind": "string", "readonly": false }] }, "Tcana": { "name": "Tcana", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "deduc", "type": "TDeducCollection", "kind": "list", "ref": "TDeducCollection", "readonly": false }, { "name": "fordia", "type": "TForDiaCollection", "kind": "list", "ref": "TForDiaCollection", "readonly": false }, { "name": "qTotAnt", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "qTotGer", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "qTotMes", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "ref", "type": "string", "kind": "string", "readonly": false }, { "name": "safra", "type": "string", "kind": "string", "readonly": false }, { "name": "vFor", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vLiqFor", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vTotDed", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TcCredPres": { "name": "TcCredPres", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["cpNenhum", "cp01", "cp02", "cp03", "cp04", "cp05", "cp06", "cp07", "cp08", "cp09", "cp10", "cp11", "cp12", "cp13"] }, "TCIDE": { "name": "TCIDE", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "qBCProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vAliqProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vCIDE", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TCobr": { "name": "TCobr", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "Dup", "type": "TDupCollection", "kind": "list", "ref": "TDupCollection", "readonly": false }, { "name": "Fat", "type": "TFat", "kind": "object", "ref": "TFat", "readonly": false }] }, "TCOFINS": { "name": "TCOFINS", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CST", "type": "TCstCofins", "kind": "enum", "ref": "TCSTCofins", "readonly": false, "declaredDefault": "cof01" }, { "name": "pCOFINS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vAliqProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vCOFINS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TCOFINSST": { "name": "TCOFINSST", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "indSomaCOFINSST", "type": "TIndSomaCOFINSST", "kind": "enum", "ref": "TIndSomaCOFINSST", "readonly": false }, { "name": "pCOFINS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vAliqProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vCOFINS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TComb": { "name": "TComb", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CIDE", "type": "TCIDE", "kind": "object", "ref": "TCIDE", "readonly": false }, { "name": "CODIF", "type": "string", "kind": "string", "readonly": false }, { "name": "cProdANP", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "descANP", "type": "string", "kind": "string", "readonly": false }, { "name": "encerrante", "type": "Tencerrante", "kind": "object", "ref": "Tencerrante", "readonly": false }, { "name": "ICMS", "type": "TICMSComb", "kind": "object", "ref": "TICMSComb", "readonly": false }, { "name": "ICMSCons", "type": "TICMSCons", "kind": "object", "ref": "TICMSCons", "readonly": false }, { "name": "ICMSInter", "type": "TICMSInter", "kind": "object", "ref": "TICMSInter", "readonly": false }, { "name": "origComb", "type": "TorigCombCollection", "kind": "list", "ref": "TorigCombCollection", "readonly": false }, { "name": "pBio", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pGLP", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pGNi", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pGNn", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pMixGN", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qTemp", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "UFcons", "type": "string", "kind": "string", "readonly": false }, { "name": "vPart", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TCompra": { "name": "TCompra", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "xCont", "type": "string", "kind": "string", "readonly": false }, { "name": "xNEmp", "type": "string", "kind": "string", "readonly": false }, { "name": "xPed", "type": "string", "kind": "string", "readonly": false }] }, "TCredPresIBSZFM": { "name": "TCredPresIBSZFM", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "competApur", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "tpCredPresIBSZFM", "type": "TTpCredPresIBSZFM", "kind": "enum", "ref": "TTpCredPresIBSZFM", "readonly": false }, { "name": "vCredPresIBSZFM", "type": "Double", "kind": "decimal", "readonly": false }] }, "TCredPresumidoCollection": { "name": "TCredPresumidoCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TCredPresumidoCollectionItem", "factory": "New" }, "TCredPresumidoCollectionItem": { "name": "TCredPresumidoCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cCredPresumido", "type": "string", "kind": "string", "readonly": false }, { "name": "pCredPresumido", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCredPresumido", "type": "Double", "kind": "decimal", "readonly": false }] }, "TCSOSNIcms": { "name": "TCSOSNIcms", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["csosnVazio", "csosn101", "csosn102", "csosn103", "csosn201", "csosn202", "csosn203", "csosn300", "csosn400", "csosn500", "csosn900"] }, "TCSTCofins": { "name": "TCSTCofins", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["cof01", "cof02", "cof03", "cof04", "cof05", "cof06", "cof07", "cof08", "cof09", "cof49", "cof50", "cof51", "cof52", "cof53", "cof54", "cof55", "cof56", "cof60", "cof61", "cof62", "cof63", "cof64", "cof65", "cof66", "cof67", "cof70", "cof71", "cof72", "cof73", "cof74", "cof75", "cof98", "cof99"] }, "TCSTIBSCBS": { "name": "TCSTIBSCBS", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["cstNenhum", "cst000", "cst010", "cst011", "cst200", "cst220", "cst221", "cst222", "cst400", "cst410", "cst510", "cst515", "cst550", "cst620", "cst800", "cst810", "cst811", "cst820", "cst830"] }, "TCSTIcms": { "name": "TCSTIcms", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["cstVazio", "cst00", "cst10", "cst20", "cst30", "cst40", "cst41", "cst45", "cst50", "cst51", "cst60", "cst70", "cst80", "cst81", "cst90", "cstICMSOutraUF", "cstICMSSN", "cstPart10", "cstPart90", "cstRep41", "cstRep60", "cst02", "cst15", "cst53", "cst61", "cst01", "cst12", "cst13", "cst14", "cst21", "cst72", "cst73", "cst74", "cstPart20"] }, "TCSTPis": { "name": "TCSTPis", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["pis01", "pis02", "pis03", "pis04", "pis05", "pis06", "pis07", "pis08", "pis09", "pis49", "pis50", "pis51", "pis52", "pis53", "pis54", "pis55", "pis56", "pis60", "pis61", "pis62", "pis63", "pis64", "pis65", "pis66", "pis67", "pis70", "pis71", "pis72", "pis73", "pis74", "pis75", "pis98", "pis99"] }, "TDeducCollection": { "name": "TDeducCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TDeducCollectionItem", "factory": "New" }, "TDeducCollectionItem": { "name": "TDeducCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "vDed", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "xDed", "type": "string", "kind": "string", "readonly": false }] }, "TdefensivoCollection": { "name": "TdefensivoCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TdefensivoCollectionItem", "factory": "New" }, "TdefensivoCollectionItem": { "name": "TdefensivoCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CPFRespTec", "type": "string", "kind": "string", "readonly": false }, { "name": "nReceituario", "type": "string", "kind": "string", "readonly": false }] }, "TDest": { "name": "TDest", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNPJCPF", "type": "string", "kind": "string", "readonly": false }, { "name": "Email", "type": "string", "kind": "string", "readonly": false }, { "name": "EnderDest", "type": "TEnderDest", "kind": "object", "ref": "TEnderDest", "readonly": false }, { "name": "idEstrangeiro", "type": "string", "kind": "string", "readonly": false }, { "name": "IE", "type": "string", "kind": "string", "readonly": false }, { "name": "IM", "type": "string", "kind": "string", "readonly": false }, { "name": "indIEDest", "type": "TindIEDest", "kind": "enum", "ref": "TindIEDest", "readonly": false }, { "name": "ISUF", "type": "string", "kind": "string", "readonly": false }, { "name": "xNome", "type": "string", "kind": "string", "readonly": false }] }, "TDetCollection": { "name": "TDetCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TDetCollectionItem", "factory": "New" }, "TDetCollectionItem": { "name": "TDetCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "DFeReferenciado", "type": "TDFeReferenciado", "kind": "object", "ref": "TDFeReferenciado", "readonly": false }, { "name": "Imposto", "type": "TImposto", "kind": "object", "ref": "TImposto", "readonly": false }, { "name": "infAdProd", "type": "string", "kind": "string", "readonly": false }, { "name": "obsCont", "type": "TobsItem", "kind": "object", "ref": "TobsItem", "readonly": false }, { "name": "obsFisco", "type": "TobsItem", "kind": "object", "ref": "TobsItem", "readonly": false }, { "name": "pDevol", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "Prod", "type": "TProd", "kind": "object", "ref": "TProd", "readonly": false }, { "name": "vIPIDevol", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vItem", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TdetExportCollection": { "name": "TdetExportCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TdetExportCollectionItem", "factory": "New" }, "TdetExportCollectionItem": { "name": "TdetExportCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "chNFe", "type": "string", "kind": "string", "readonly": false }, { "name": "nDraw", "type": "string", "kind": "string", "readonly": false }, { "name": "nRE", "type": "string", "kind": "string", "readonly": false }, { "name": "qExport", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TDFErefCollection": { "name": "TDFErefCollection", "unit": "ACBrDFe.RTC.Classes", "kind": "list", "item": "TDFErefCollectionItem", "factory": "New" }, "TDFErefCollectionItem": { "name": "TDFErefCollectionItem", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "refDFeChave", "type": "string", "kind": "string", "readonly": false }] }, "TDFeReferenciado": { "name": "TDFeReferenciado", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "chaveAcesso", "type": "string", "kind": "string", "readonly": false }, { "name": "nItem", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }] }, "TDICollection": { "name": "TDICollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TDICollectionItem", "factory": "New" }, "TDICollectionItem": { "name": "TDICollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "adi", "type": "TAdiCollection", "kind": "list", "ref": "TAdiCollection", "readonly": false }, { "name": "cExportador", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJ", "type": "string", "kind": "string", "readonly": false }, { "name": "dDesemb", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "dDi", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "nDi", "type": "string", "kind": "string", "readonly": false }, { "name": "tpIntermedio", "type": "TpcnTipoIntermedio", "kind": "enum", "ref": "TpcnTipoIntermedio", "readonly": false }, { "name": "tpViaTransp", "type": "TpcnTipoViaTransp", "kind": "enum", "ref": "TpcnTipoViaTransp", "readonly": false }, { "name": "UFDesemb", "type": "string", "kind": "string", "readonly": false }, { "name": "UFTerceiro", "type": "string", "kind": "string", "readonly": false }, { "name": "vAFRMM", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "xLocDesemb", "type": "string", "kind": "string", "readonly": false }] }, "TDupCollection": { "name": "TDupCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TDupCollectionItem", "factory": "New" }, "TDupCollectionItem": { "name": "TDupCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "dVenc", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "nDup", "type": "string", "kind": "string", "readonly": false }, { "name": "vDup", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TEmit": { "name": "TEmit", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNAE", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJCPF", "type": "string", "kind": "string", "readonly": false }, { "name": "CRT", "type": "TpcnCRT", "kind": "enum", "ref": "TpcnCRT", "readonly": false }, { "name": "EnderEmit", "type": "TEnderEmit", "kind": "object", "ref": "TenderEmit", "readonly": false }, { "name": "IE", "type": "string", "kind": "string", "readonly": false }, { "name": "IEST", "type": "string", "kind": "string", "readonly": false }, { "name": "IM", "type": "string", "kind": "string", "readonly": false }, { "name": "ISUFEmit", "type": "string", "kind": "string", "readonly": false }, { "name": "xFant", "type": "string", "kind": "string", "readonly": false }, { "name": "xNome", "type": "string", "kind": "string", "readonly": false }] }, "Tencerrante": { "name": "Tencerrante", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "nBico", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "nBomba", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "nTanque", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "vEncFin", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vEncIni", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TEnderDest": { "name": "TEnderDest", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CEP", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cMun", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cPais", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "fone", "type": "string", "kind": "string", "readonly": false }, { "name": "nro", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }, { "name": "xBairro", "type": "string", "kind": "string", "readonly": false }, { "name": "xCpl", "type": "string", "kind": "string", "readonly": false }, { "name": "xLgr", "type": "string", "kind": "string", "readonly": false }, { "name": "xMun", "type": "string", "kind": "string", "readonly": false }, { "name": "xPais", "type": "string", "kind": "string", "readonly": false }] }, "TenderEmit": { "name": "TenderEmit", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CEP", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cMun", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cPais", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "fone", "type": "string", "kind": "string", "readonly": false }, { "name": "nro", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }, { "name": "xBairro", "type": "string", "kind": "string", "readonly": false }, { "name": "xCpl", "type": "string", "kind": "string", "readonly": false }, { "name": "xLgr", "type": "string", "kind": "string", "readonly": false }, { "name": "xMun", "type": "string", "kind": "string", "readonly": false }, { "name": "xPais", "type": "string", "kind": "string", "readonly": false }] }, "TEntrega": { "name": "TEntrega", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CEP", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cMun", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "CNPJCPF", "type": "string", "kind": "string", "readonly": false }, { "name": "cPais", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "Email", "type": "string", "kind": "string", "readonly": false }, { "name": "fone", "type": "string", "kind": "string", "readonly": false }, { "name": "IE", "type": "string", "kind": "string", "readonly": false }, { "name": "nro", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }, { "name": "xBairro", "type": "string", "kind": "string", "readonly": false }, { "name": "xCpl", "type": "string", "kind": "string", "readonly": false }, { "name": "xLgr", "type": "string", "kind": "string", "readonly": false }, { "name": "xMun", "type": "string", "kind": "string", "readonly": false }, { "name": "xNome", "type": "string", "kind": "string", "readonly": false }, { "name": "xPais", "type": "string", "kind": "string", "readonly": false }] }, "TExporta": { "name": "TExporta", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "UFembarq", "type": "string", "kind": "string", "readonly": false }, { "name": "UFSaidaPais", "type": "string", "kind": "string", "readonly": false }, { "name": "xLocDespacho", "type": "string", "kind": "string", "readonly": false }, { "name": "xLocEmbarq", "type": "string", "kind": "string", "readonly": false }, { "name": "xLocExporta", "type": "string", "kind": "string", "readonly": false }] }, "TFat": { "name": "TFat", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "nFat", "type": "string", "kind": "string", "readonly": false }, { "name": "vDesc", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vLiq", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vOrig", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TForDiaCollection": { "name": "TForDiaCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TForDiaCollectionItem", "factory": "New" }, "TForDiaCollectionItem": { "name": "TForDiaCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "dia", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "qtde", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TgAjusteCompet": { "name": "TgAjusteCompet", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "competApur", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "vCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgALCZFMCBS": { "name": "TgALCZFMCBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "nProcSuframa", "type": "string", "kind": "string", "readonly": false }, { "name": "pAliqEfetRegCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "tpALCZFMCBS", "type": "TtpALCZFMCBS", "kind": "enum", "ref": "TtpALCZFMCBS", "readonly": false }, { "name": "vTribRegCBS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgCBS": { "name": "TgCBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCredPres", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCredPresCondSus", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vDevTrib", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vDif", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgCBSMonoAdRem": { "name": "TgCBSMonoAdRem", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gMonoPadrao", "type": "TgMonoPadraoCBSQtde", "kind": "object", "ref": "TgMonoPadraoCBSQtde", "readonly": false }, { "name": "gMonoRet", "type": "TgMonoRetCBS", "kind": "object", "ref": "TgMonoRetCBS", "readonly": false }, { "name": "gMonoReten", "type": "TgMonoRetenCBSQtde", "kind": "object", "ref": "TgMonoRetenCBSQtde", "readonly": false }, { "name": "gpBioDiferenca", "type": "TgpBioDiferencaCBS", "kind": "object", "ref": "TgpBioDiferencaCBS", "readonly": false }] }, "TgCBSMonoAdValorem": { "name": "TgCBSMonoAdValorem", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gMonoPadrao", "type": "TgMonoPadraoCBSAliq", "kind": "object", "ref": "TgMonoPadraoCBSAliq", "readonly": false }, { "name": "gMonoRet", "type": "TgMonoRetCBS", "kind": "object", "ref": "TgMonoRetCBS", "readonly": false }, { "name": "gMonoReten", "type": "TgMonoRetenCBSAliq", "kind": "object", "ref": "TgMonoRetenCBSAliq", "readonly": false }, { "name": "gpBioDiferenca", "type": "TgpBioDiferencaCBS", "kind": "object", "ref": "TgpBioDiferencaCBS", "readonly": false }] }, "TgCBSValores": { "name": "TgCBSValores", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gALCZFMCBS", "type": "TgALCZFMCBS", "kind": "object", "ref": "TgALCZFMCBS", "readonly": false }, { "name": "gDevTrib", "type": "TgDevTrib", "kind": "object", "ref": "TgDevTrib", "readonly": false }, { "name": "gDif", "type": "TgDif", "kind": "object", "ref": "TgDif", "readonly": false }, { "name": "gRed", "type": "TgRed", "kind": "object", "ref": "TgRed", "readonly": false }, { "name": "pCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgCompraGov": { "name": "TgCompraGov", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pRedutor", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "refDFeAnt", "type": "TDFerefCollection", "kind": "list", "ref": "TDFErefCollection", "readonly": false }, { "name": "tpEnteGov", "type": "TtpEnteGov", "kind": "enum", "ref": "TtpEnteGov", "readonly": false }, { "name": "tpOperGov", "type": "TtpOperGov", "kind": "enum", "ref": "TtpOperGov", "readonly": false }] }, "TgCredPresOper": { "name": "TgCredPresOper", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "cCredPres", "type": "TcCredPres", "kind": "enum", "ref": "TcCredPres", "readonly": false }, { "name": "gCBSCredPres", "type": "TgIBSCBSCredPres", "kind": "object", "ref": "TgIBSCBSCredPres", "readonly": false }, { "name": "gIBSCredPres", "type": "TgIBSCBSCredPres", "kind": "object", "ref": "TgIBSCBSCredPres", "readonly": false }, { "name": "vBCCredPres", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgDevTrib": { "name": "TgDevTrib", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pDevTrib", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vDevTrib", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgDif": { "name": "TgDif", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pDif", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vDif", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgEstornoCred": { "name": "TgEstornoCred", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vCBSEstCred", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSEstCred", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBS": { "name": "TgIBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gIBSMunTot", "type": "TgIBSMunTot", "kind": "object", "ref": "TgIBSMunTot", "readonly": false }, { "name": "gIBSUFTot", "type": "TgIBSUFTot", "kind": "object", "ref": "TgIBSUFTot", "readonly": false }, { "name": "vCredPres", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCredPresCondSus", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBSCBS": { "name": "TgIBSCBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gCBS", "type": "TgCBSValores", "kind": "object", "ref": "TgCBSValores", "readonly": false }, { "name": "gIBSMun", "type": "TgIBSMunValores", "kind": "object", "ref": "TgIBSMunValores", "readonly": false }, { "name": "gIBSUF", "type": "TgIBSUFValores", "kind": "object", "ref": "TgIBSUFValores", "readonly": false }, { "name": "gTribCompraGov", "type": "TgTribCompraGov", "kind": "object", "ref": "TgTribCompraGov", "readonly": false }, { "name": "gTribRegular", "type": "TgTribRegular", "kind": "object", "ref": "TgTribRegular", "readonly": false }, { "name": "vBC", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vOperacIndiv", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vRedAjusteIndiv", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vRedSocialIndiv", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTornaIndiv", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBSCBSCredPres": { "name": "TgIBSCBSCredPres", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pCredPres", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCredPres", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCredPresCondSus", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBSCBSMono": { "name": "TgIBSCBSMono", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gCBSMonoAdRem", "type": "TgCBSMonoAdRem", "kind": "object", "ref": "TgCBSMonoAdRem", "readonly": false }, { "name": "gCBSMonoAdValorem", "type": "TgCBSMonoAdValorem", "kind": "object", "ref": "TgCBSMonoAdValorem", "readonly": false }, { "name": "gIBSMonoAdRem", "type": "TgIBSMonoAdRem", "kind": "object", "ref": "TgIBSMonoAdRem", "readonly": false }, { "name": "gIBSMonoAdValorem", "type": "TgIBSMonoAdValorem", "kind": "object", "ref": "TgIBSMonoAdValorem", "readonly": false }, { "name": "vTotCBSMonoItem", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTotIBSMonoItem", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBSMonoAdRem": { "name": "TgIBSMonoAdRem", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gMonoPadrao", "type": "TgMonoPadraoIBSQtde", "kind": "object", "ref": "TgMonoPadraoIBSQtde", "readonly": false }, { "name": "gMonoRet", "type": "TgMonoRetIBS", "kind": "object", "ref": "TgMonoRetIBS", "readonly": false }, { "name": "gMonoReten", "type": "TgMonoRetenIBSQtde", "kind": "object", "ref": "TgMonoRetenIBSQtde", "readonly": false }, { "name": "gpBioDiferenca", "type": "TgpBioDiferencaIBS", "kind": "object", "ref": "TgpBioDiferencaIBS", "readonly": false }] }, "TgIBSMonoAdValorem": { "name": "TgIBSMonoAdValorem", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gMonoPadrao", "type": "TgMonoPadraoIBSAliq", "kind": "object", "ref": "TgMonoPadraoIBSAliq", "readonly": false }, { "name": "gMonoRet", "type": "TgMonoRetIBS", "kind": "object", "ref": "TgMonoRetIBS", "readonly": false }, { "name": "gMonoReten", "type": "TgMonoRetenIBSAliq", "kind": "object", "ref": "TgMonoRetenIBSAliq", "readonly": false }, { "name": "gpBioDiferenca", "type": "TgpBioDiferencaIBS", "kind": "object", "ref": "TgpBioDiferencaIBS", "readonly": false }] }, "TgIBSMunTot": { "name": "TgIBSMunTot", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vDevTrib", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vDif", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMun", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBSMunValores": { "name": "TgIBSMunValores", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gDevTrib", "type": "TgDevTrib", "kind": "object", "ref": "TgDevTrib", "readonly": false }, { "name": "gDif", "type": "TgDif", "kind": "object", "ref": "TgDif", "readonly": false }, { "name": "gRed", "type": "TgRed", "kind": "object", "ref": "TgRed", "readonly": false }, { "name": "pIBSMun", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMun", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBSUFTot": { "name": "TgIBSUFTot", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vDevTrib", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vDif", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSUF", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIBSUFValores": { "name": "TgIBSUFValores", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gDevTrib", "type": "TgDevTrib", "kind": "object", "ref": "TgDevTrib", "readonly": false }, { "name": "gDif", "type": "TgDif", "kind": "object", "ref": "TgDif", "readonly": false }, { "name": "gRed", "type": "TgRed", "kind": "object", "ref": "TgRed", "readonly": false }, { "name": "pIBSUF", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSUF", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgIS": { "name": "TgIS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "adRemIS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "cClassTribIS", "type": "string", "kind": "string", "readonly": false }, { "name": "CSTIS", "type": "string", "kind": "string", "readonly": false }, { "name": "pIS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "qTrib", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "uTrib", "type": "string", "kind": "string", "readonly": false }, { "name": "vBCIS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMono": { "name": "TgMono", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vCBSMono", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBSMonoRet", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBSMonoReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMono", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMonoRet", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMonoReten", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoPadraoCBSAliq": { "name": "TgMonoPadraoCBSAliq", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pAliqMonoCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vBCMono", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBSMono", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoPadraoCBSQtde": { "name": "TgMonoPadraoCBSQtde", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "adRemCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "qBCMono", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBSMono", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoPadraoIBSAliq": { "name": "TgMonoPadraoIBSAliq", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pAliqMonoMun", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "pAliqMonoUF", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vBCMono", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMono", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMonoMun", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMonoUF", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoPadraoIBSQtde": { "name": "TgMonoPadraoIBSQtde", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "adRemIBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "qBCMono", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMono", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoRetCBS": { "name": "TgMonoRetCBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vCBSMonoRet", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoRetenCBSAliq": { "name": "TgMonoRetenCBSAliq", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pAliqMonoReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vBCMonoReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBSMonoReten", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoRetenCBSQtde": { "name": "TgMonoRetenCBSQtde", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "adRemCBSReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "qBCMonoReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBSMonoReten", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoRetenIBSAliq": { "name": "TgMonoRetenIBSAliq", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pAliqMonoReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vBCMonoReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMonoReten", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoRetenIBSQtde": { "name": "TgMonoRetenIBSQtde", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "adRemIBSReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "qBCMonoReten", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSMonoReten", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgMonoRetIBS": { "name": "TgMonoRetIBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vIBSMonoRet", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgPagAntecipado": { "name": "TgPagAntecipado", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "refNFe", "type": "TrefDFePagAntCollection", "kind": "list", "ref": "TrefDFePagAntCollection", "readonly": false }] }, "TgpBioDiferencaCBS": { "name": "TgpBioDiferencaCBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "qBCBioComb", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vCBSDiferenca", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgpBioDiferencaIBS": { "name": "TgpBioDiferencaIBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "qBCBioComb", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBSDiferenca", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgRed": { "name": "TgRed", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pAliqEfet", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "pRedAliq", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgTransfCred": { "name": "TgTransfCred", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vIBS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgTribCompraGov": { "name": "TgTribCompraGov", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "pAliqCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "pAliqIBSMun", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "pAliqIBSUF", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTribCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTribIBSMun", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTribIBSUF", "type": "Double", "kind": "decimal", "readonly": false }] }, "TgTribRegular": { "name": "TgTribRegular", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "cClassTribReg", "type": "string", "kind": "string", "readonly": false }, { "name": "CSTReg", "type": "TCSTIBSCBS", "kind": "enum", "ref": "TCSTIBSCBS", "readonly": false }, { "name": "pAliqEfetRegCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "pAliqEfetRegIBSMun", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "pAliqEfetRegIBSUF", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTribRegCBS", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTribRegIBSMun", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vTribRegIBSUF", "type": "Double", "kind": "decimal", "readonly": false }] }, "TguiaTransito": { "name": "TguiaTransito", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "nGuia", "type": "string", "kind": "string", "readonly": false }, { "name": "serieGuia", "type": "string", "kind": "string", "readonly": false }, { "name": "tpGuia", "type": "TtpGuia", "kind": "enum", "ref": "TtpGuia", "readonly": false }, { "name": "UFGuia", "type": "string", "kind": "string", "readonly": false }] }, "TIBSCBS": { "name": "TIBSCBS", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "cClassTrib", "type": "string", "kind": "string", "readonly": false }, { "name": "CST", "type": "TCSTIBSCBS", "kind": "enum", "ref": "TCSTIBSCBS", "readonly": false }, { "name": "gAjusteCompet", "type": "TgAjusteCompet", "kind": "object", "ref": "TgAjusteCompet", "readonly": false }, { "name": "gCredPresIBSZFM", "type": "TCredPresIBSZFM", "kind": "object", "ref": "TCredPresIBSZFM", "readonly": false }, { "name": "gCredPresOper", "type": "TgCredPresOper", "kind": "object", "ref": "TgCredPresOper", "readonly": false }, { "name": "gEstornoCred", "type": "TgEstornoCred", "kind": "object", "ref": "TgEstornoCred", "readonly": false }, { "name": "gIBSCBS", "type": "TgIBSCBS", "kind": "object", "ref": "TgIBSCBS", "readonly": false }, { "name": "gIBSCBSMono", "type": "TgIBSCBSMono", "kind": "object", "ref": "TgIBSCBSMono", "readonly": false }, { "name": "gTransfCred", "type": "TgTransfCred", "kind": "object", "ref": "TgTransfCred", "readonly": false }, { "name": "indDoacao", "type": "TIndicadorEx", "kind": "enum", "ref": "TIndicadorEx", "readonly": false }] }, "TIBSCBSTot": { "name": "TIBSCBSTot", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "gCBS", "type": "TgCBS", "kind": "object", "ref": "TgCBS", "readonly": false }, { "name": "gEstornoCred", "type": "TgEstornoCred", "kind": "object", "ref": "TgEstornoCred", "readonly": false }, { "name": "gIBS", "type": "TgIBS", "kind": "object", "ref": "TgIBS", "readonly": false }, { "name": "gMono", "type": "TgMono", "kind": "object", "ref": "TgMono", "readonly": false }, { "name": "vBCIBSCBS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TICMS": { "name": "TICMS", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "adRemICMS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "adRemICMSDif", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "adRemICMSRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "adRemICMSReten", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "cBenefRBC", "type": "string", "kind": "string", "readonly": false }, { "name": "CSOSN", "type": "TCSOSNIcms", "kind": "enum", "ref": "TCSOSNIcms", "readonly": false }, { "name": "CST", "type": "TCSTIcms", "kind": "enum", "ref": "TCSTIcms", "readonly": false, "declaredDefault": "cst00" }, { "name": "indDeduzDeson", "type": "TIndicadorEx", "kind": "enum", "ref": "TIndicadorEx", "readonly": false, "declaredDefault": "tieNenhum" }, { "name": "modBC", "type": "TpcnDeterminacaoBaseIcms", "kind": "enum", "ref": "TpcnDeterminacaoBaseIcms", "readonly": false, "declaredDefault": "dbiMargemValorAgregado" }, { "name": "modBCST", "type": "TpcnDeterminacaoBaseIcmsST", "kind": "enum", "ref": "TpcnDeterminacaoBaseIcmsST", "readonly": false, "declaredDefault": "dbisPrecoTabelado" }, { "name": "motDesICMS", "type": "TpcnMotivoDesoneracaoICMS", "kind": "enum", "ref": "TpcnMotivoDesoneracaoICMS", "readonly": false }, { "name": "motDesICMSST", "type": "TpcnMotivoDesoneracaoICMS", "kind": "enum", "ref": "TpcnMotivoDesoneracaoICMS", "readonly": false }, { "name": "motRedAdRem", "type": "TmotRedAdRem", "kind": "enum", "ref": "TmotRedAdRem", "readonly": false }, { "name": "orig", "type": "TOrigemMercadoria", "kind": "enum", "ref": "TOrigemMercadoria", "readonly": false, "declaredDefault": "oeNacional" }, { "name": "pBCOp", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pCredSN", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pDif", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pFCP", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pFCPDif", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pFCPST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pFCPSTRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pICMS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pICMSEfet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pICMSST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pMVAST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pRedAdRem", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pRedBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pRedBCEfet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pRedBCST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCMono", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCMonoDif", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCMonoRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCMonoReten", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "UFST", "type": "string", "kind": "string", "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCEfet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCFCP", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCFCPST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCFCPSTRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCSTDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCSTRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vCredICMSSN", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCP", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPDif", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPEfet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPSTRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSDeson", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSDif", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSEfet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMono", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMonoDif", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMonoOp", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMonoRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMonoReten", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSOp", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSSTDeson", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSSTDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSSTRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSSubstituto", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TICMSComb": { "name": "TICMSComb", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "vBCICMS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCICMSST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TICMSCons": { "name": "TICMSCons", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "UFcons", "type": "string", "kind": "string", "readonly": false }, { "name": "vBCICMSSTCons", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSSTCons", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TICMSInter": { "name": "TICMSInter", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "vBCICMSSTDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSSTDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TICMSTot": { "name": "TICMSTot", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "qBCMono", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCMonoRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCMonoReten", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vCOFINS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDesc", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCP", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPSTRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFrete", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSDeson", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMono", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMonoRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSMonoReten", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSUFRemet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vII", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vIPI", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vIPIDevol", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vNF", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vOutro", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vPIS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vSeg", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vST", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vTotTrib", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TICMSUFDest": { "name": "TICMSUFDest", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "pFCPUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pICMSInter", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pICMSInterPart", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pICMSUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCFCPUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vFCPUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSUFDest", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSUFRemet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TIde": { "name": "TIde", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cDV", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cIndOp", "type": "string", "kind": "string", "readonly": false }, { "name": "cMunFG", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cMunFGIBS", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cNF", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cUF", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "dEmi", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "dhCont", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "dPrevEntrega", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "dSaiEnt", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "finNFe", "type": "TpcnFinalidadeNFe", "kind": "enum", "ref": "TpcnFinalidadeNFe", "readonly": false, "declaredDefault": "fnNormal" }, { "name": "gCompraGov", "type": "TgCompraGov", "kind": "object", "ref": "TgCompraGov", "readonly": false }, { "name": "gPagAntecipado", "type": "TgPagAntecipado", "kind": "object", "ref": "TgPagAntecipado", "readonly": false }, { "name": "hSaiEnt", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "idDest", "type": "TpcnDestinoOperacao", "kind": "enum", "ref": "TpcnDestinoOperacao", "readonly": false }, { "name": "indFinal", "type": "TpcnConsumidorFinal", "kind": "enum", "ref": "TpcnConsumidorFinal", "readonly": false }, { "name": "indIntermed", "type": "TindIntermed", "kind": "enum", "ref": "TindIntermed", "readonly": false }, { "name": "indPag", "type": "TpcnIndicadorPagamento", "kind": "enum", "ref": "TpcnIndicadorPagamento", "readonly": false, "declaredDefault": "ipPrazo" }, { "name": "indPres", "type": "TpcnPresencaComprador", "kind": "enum", "ref": "TpcnPresencaComprador", "readonly": false }, { "name": "modelo", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "natOp", "type": "string", "kind": "string", "readonly": false }, { "name": "NFref", "type": "TNFrefCollection", "kind": "list", "ref": "TNFrefCollection", "readonly": false }, { "name": "nNF", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "procEmi", "type": "TACBrProcessoEmissao", "kind": "enum", "ref": "TACBrProcessoEmissao", "readonly": false, "declaredDefault": "peAplicativoContribuinte" }, { "name": "serie", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "tpAmb", "type": "TACBrTipoAmbiente", "kind": "enum", "ref": "TACBrTipoAmbiente", "readonly": false, "declaredDefault": "taHomologacao" }, { "name": "tpEmis", "type": "TACBrTipoEmissao", "kind": "enum", "ref": "TACBrTipoEmissao", "readonly": false, "declaredDefault": "teNormal" }, { "name": "tpImp", "type": "TACBrTipoImpressao", "kind": "enum", "ref": "TACBrTipoImpressao", "readonly": false, "declaredDefault": "tiPaisagem" }, { "name": "tpNF", "type": "TTipoNFe", "kind": "enum", "ref": "TTipoNFe", "readonly": false, "declaredDefault": "tnSaida" }, { "name": "tpNFCredito", "type": "TtpNFCredito", "kind": "enum", "ref": "TtpNFCredito", "readonly": false }, { "name": "tpNFDebito", "type": "TtpNFDebito", "kind": "enum", "ref": "TtpNFDebito", "readonly": false }, { "name": "verProc", "type": "string", "kind": "string", "readonly": false }, { "name": "xJust", "type": "string", "kind": "string", "readonly": false }] }, "TII": { "name": "TII", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "vBc", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDespAdu", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vII", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vIOF", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TImposto": { "name": "TImposto", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "COFINS", "type": "TCOFINS", "kind": "object", "ref": "TCOFINS", "readonly": false }, { "name": "COFINSST", "type": "TCOFINSST", "kind": "object", "ref": "TCOFINSST", "readonly": false }, { "name": "IBSCBS", "type": "TIBSCBS", "kind": "object", "ref": "TIBSCBS", "readonly": false }, { "name": "ICMS", "type": "TICMS", "kind": "object", "ref": "TICMS", "readonly": false }, { "name": "ICMSUFDest", "type": "TICMSUFDest", "kind": "object", "ref": "TICMSUFDest", "readonly": false }, { "name": "II", "type": "TII", "kind": "object", "ref": "TII", "readonly": false }, { "name": "IPI", "type": "TIPI", "kind": "object", "ref": "TIPI", "readonly": false }, { "name": "ISel", "type": "TgIS", "kind": "object", "ref": "TgIS", "readonly": false }, { "name": "ISSQN", "type": "TISSQN", "kind": "object", "ref": "TISSQN", "readonly": false }, { "name": "PIS", "type": "TPIS", "kind": "object", "ref": "TPIS", "readonly": false }, { "name": "PISST", "type": "TPISST", "kind": "object", "ref": "TPISST", "readonly": false }, { "name": "vTotTrib", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TIndicadorEx": { "name": "TIndicadorEx", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tieNenhum", "tieSim", "tieNao"] }, "TindIEDest": { "name": "TindIEDest", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["inContribuinte", "inIsento", "inNaoContribuinte"] }, "TindImport": { "name": "TindImport", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["iiNacional", "iiImportado"] }, "TindIncentivo": { "name": "TindIncentivo", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["iiSim", "iiNao"] }, "TindIntermed": { "name": "TindIntermed", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["iiSemOperacao", "iiOperacaoSemIntermediador", "iiOperacaoComIntermediador"] }, "TIndSomaCOFINSST": { "name": "TIndSomaCOFINSST", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["iscNenhum", "iscCOFINSSTNaoCompoe", "iscCOFINSSTCompoe"] }, "TIndSomaPISST": { "name": "TIndSomaPISST", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["ispNenhum", "ispPISSTNaoCompoe", "ispPISSTCompoe"] }, "TInfAdic": { "name": "TInfAdic", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "infAdFisco", "type": "string", "kind": "string", "readonly": false }, { "name": "infCpl", "type": "string", "kind": "string", "readonly": false }, { "name": "obsCont", "type": "TobsContCollection", "kind": "list", "ref": "TobsContCollection", "readonly": false }, { "name": "obsFisco", "type": "TobsFiscoCollection", "kind": "list", "ref": "TobsFiscoCollection", "readonly": false }, { "name": "procRef", "type": "TprocRefCollection", "kind": "list", "ref": "TprocRefCollection", "readonly": false }] }, "TinfIntermed": { "name": "TinfIntermed", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNPJ", "type": "string", "kind": "string", "readonly": false }, { "name": "idCadIntTran", "type": "string", "kind": "string", "readonly": false }] }, "TinfNFe": { "name": "TinfNFe", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "ID", "type": "string", "kind": "string", "readonly": false }, { "name": "Versao", "type": "Double", "kind": "decimal", "readonly": false }] }, "TinfNFeSupl": { "name": "TinfNFeSupl", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "qrCode", "type": "string", "kind": "string", "readonly": false }, { "name": "urlChave", "type": "string", "kind": "string", "readonly": false }] }, "TinfPAA": { "name": "TinfPAA", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNPJPAA", "type": "string", "kind": "string", "readonly": false }, { "name": "Exponent", "type": "string", "kind": "string", "readonly": false }, { "name": "Modulus", "type": "string", "kind": "string", "readonly": false }, { "name": "SignatureValue", "type": "string", "kind": "string", "readonly": false }] }, "TinfRespTec": { "name": "TinfRespTec", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNPJ", "type": "string", "kind": "string", "readonly": false }, { "name": "email", "type": "string", "kind": "string", "readonly": false }, { "name": "fone", "type": "string", "kind": "string", "readonly": false }, { "name": "hashCSRT", "type": "string", "kind": "string", "readonly": false }, { "name": "idCSRT", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "xContato", "type": "string", "kind": "string", "readonly": false }] }, "TIPI": { "name": "TIPI", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cEnq", "type": "string", "kind": "string", "readonly": false }, { "name": "clEnq", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJProd", "type": "string", "kind": "string", "readonly": false }, { "name": "cSelo", "type": "string", "kind": "string", "readonly": false }, { "name": "CST", "type": "TpcnCstIpi", "kind": "enum", "ref": "TpcnCstIpi", "readonly": false, "declaredDefault": "ipi00" }, { "name": "pIPI", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qSelo", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "qUnid", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vIPI", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vUnid", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TISSQN": { "name": "TISSQN", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cListServ", "type": "string", "kind": "string", "readonly": false }, { "name": "cMun", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cMunFG", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cPais", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cServico", "type": "string", "kind": "string", "readonly": false }, { "name": "cSitTrib", "type": "TpcnISSQNcSitTrib", "kind": "enum", "ref": "TpcnISSQNcSitTrib", "readonly": false, "declaredDefault": "ISSQNcSitTribVazio" }, { "name": "indIncentivo", "type": "TindIncentivo", "kind": "enum", "ref": "TindIncentivo", "readonly": false }, { "name": "indISS", "type": "TpcnindISS", "kind": "enum", "ref": "TpcnindISS", "readonly": false }, { "name": "indISSRet", "type": "TpcnindISSRet", "kind": "enum", "ref": "TpcnindISSRet", "readonly": false }, { "name": "nProcesso", "type": "string", "kind": "string", "readonly": false }, { "name": "vAliq", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDeducao", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDescCond", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDescIncond", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vISSQN", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vISSRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vOutro", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TISSQNtot": { "name": "TISSQNtot", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cRegTrib", "type": "TRegTribISSQN", "kind": "enum", "ref": "TRegTribISSQN", "readonly": false }, { "name": "dCompet", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vCOFINS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDeducao", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDescCond", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vDescIncond", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vISS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vISSRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vOutro", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vPIS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vServ", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TISTot": { "name": "TISTot", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "vIS", "type": "Double", "kind": "decimal", "readonly": false }] }, "TLacresCollection": { "name": "TLacresCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TLacresCollectionItem", "factory": "New" }, "TLacresCollectionItem": { "name": "TLacresCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "nLacre", "type": "string", "kind": "string", "readonly": false }] }, "TMedCollection": { "name": "TMedCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TMedCollectionItem", "factory": "New" }, "TMedCollectionItem": { "name": "TMedCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cProdANVISA", "type": "string", "kind": "string", "readonly": false }, { "name": "dFab", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "dVal", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "nLote", "type": "string", "kind": "string", "readonly": false }, { "name": "qLote", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vPMC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "xMotivoIsencao", "type": "string", "kind": "string", "readonly": false }] }, "TmotRedAdRem": { "name": "TmotRedAdRem", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["motTranspColetivo", "motOutros"] }, "TNFe": { "name": "TNFe", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "agropecuario", "type": "Tagropecuario", "kind": "object", "ref": "Tagropecuario", "readonly": false }, { "name": "autXML", "type": "TautXMLCollection", "kind": "list", "ref": "TautXMLCollection", "readonly": false }, { "name": "Avulsa", "type": "TAvulsa", "kind": "object", "ref": "TAvulsa", "readonly": false }, { "name": "cana", "type": "Tcana", "kind": "object", "ref": "Tcana", "readonly": false }, { "name": "Cobr", "type": "TCobr", "kind": "object", "ref": "TCobr", "readonly": false }, { "name": "compra", "type": "Tcompra", "kind": "object", "ref": "TCompra", "readonly": false }, { "name": "Dest", "type": "TDest", "kind": "object", "ref": "TDest", "readonly": false }, { "name": "Det", "type": "TDetCollection", "kind": "list", "ref": "TDetCollection", "readonly": false }, { "name": "Emit", "type": "TEmit", "kind": "object", "ref": "TEmit", "readonly": false }, { "name": "Entrega", "type": "TEntrega", "kind": "object", "ref": "TEntrega", "readonly": false }, { "name": "exporta", "type": "Texporta", "kind": "object", "ref": "TExporta", "readonly": false }, { "name": "Ide", "type": "TIde", "kind": "object", "ref": "TIde", "readonly": false }, { "name": "InfAdic", "type": "TInfAdic", "kind": "object", "ref": "TInfAdic", "readonly": false }, { "name": "infIntermed", "type": "TinfIntermed", "kind": "object", "ref": "TinfIntermed", "readonly": false }, { "name": "infNFe", "type": "TinfNFe", "kind": "object", "ref": "TinfNFe", "readonly": false }, { "name": "infNFeSupl", "type": "TinfNFeSupl", "kind": "object", "ref": "TinfNFeSupl", "readonly": true }, { "name": "infPAA", "type": "TinfPAA", "kind": "object", "ref": "TinfPAA", "readonly": false }, { "name": "infRespTec", "type": "TinfRespTec", "kind": "object", "ref": "TinfRespTec", "readonly": false }, { "name": "pag", "type": "TpagCollection", "kind": "list", "ref": "TpagCollection", "readonly": false }, { "name": "procNFe", "type": "TProcDFe", "kind": "object", "ref": "TProcDFe", "readonly": true }, { "name": "Retirada", "type": "TRetirada", "kind": "object", "ref": "TRetirada", "readonly": false }, { "name": "signature", "type": "Tsignature", "kind": "object", "ref": "TSignature", "readonly": true }, { "name": "Total", "type": "TTotal", "kind": "object", "ref": "TTotal", "readonly": false }, { "name": "Transp", "type": "TTransp", "kind": "object", "ref": "TTransp", "readonly": false }] }, "TNFrefCollection": { "name": "TNFrefCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TNFrefCollectionItem", "factory": "New" }, "TNFrefCollectionItem": { "name": "TNFrefCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "refCTe", "type": "string", "kind": "string", "readonly": false }, { "name": "RefECF", "type": "TRefECF", "kind": "object", "ref": "TRefECF", "readonly": false }, { "name": "RefNF", "type": "TRefNF", "kind": "object", "ref": "TRefNF", "readonly": false }, { "name": "refNFe", "type": "string", "kind": "string", "readonly": false }, { "name": "refNFeSig", "type": "string", "kind": "string", "readonly": false }, { "name": "RefNFP", "type": "TRefNFP", "kind": "object", "ref": "TRefNFP", "readonly": false }] }, "TNVECollection": { "name": "TNVECollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TNVECollectionItem", "factory": "New" }, "TNVECollectionItem": { "name": "TNVECollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "NVE", "type": "string", "kind": "string", "readonly": false }] }, "TobsContCollection": { "name": "TobsContCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TobsContCollectionItem", "factory": "New" }, "TobsContCollectionItem": { "name": "TobsContCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "xCampo", "type": "string", "kind": "string", "readonly": false }, { "name": "xTexto", "type": "string", "kind": "string", "readonly": false }] }, "TobsFiscoCollection": { "name": "TobsFiscoCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TobsFiscoCollectionItem", "factory": "New" }, "TobsFiscoCollectionItem": { "name": "TobsFiscoCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "xCampo", "type": "string", "kind": "string", "readonly": false }, { "name": "xTexto", "type": "string", "kind": "string", "readonly": false }] }, "TobsItem": { "name": "TobsItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "xCampo", "type": "string", "kind": "string", "readonly": false }, { "name": "xTexto", "type": "string", "kind": "string", "readonly": false }] }, "TorigCombCollection": { "name": "TorigCombCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TorigCombCollectionItem", "factory": "New" }, "TorigCombCollectionItem": { "name": "TorigCombCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cUFOrig", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "indImport", "type": "TindImport", "kind": "enum", "ref": "TindImport", "readonly": false }, { "name": "pOrig", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TOrigemMercadoria": { "name": "TOrigemMercadoria", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["oeNacional", "oeEstrangeiraImportacaoDireta", "oeEstrangeiraAdquiridaBrasil", "oeNacionalConteudoImportacaoSuperior40", "oeNacionalProcessosBasicos", "oeNacionalConteudoImportacaoInferiorIgual40", "oeEstrangeiraImportacaoDiretaSemSimilar", "oeEstrangeiraAdquiridaBrasilSemSimilar", "oeNacionalConteudoImportacaoSuperior70", "oeReservadoParaUsoFuturo", "oeVazio"] }, "TpagCollection": { "name": "TpagCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TpagCollectionItem", "factory": "New" }, "TpagCollectionItem": { "name": "TpagCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cAut", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJ", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJPag", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJReceb", "type": "string", "kind": "string", "readonly": false }, { "name": "dPag", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "idTermPag", "type": "string", "kind": "string", "readonly": false }, { "name": "indPag", "type": "TpcnIndicadorPagamento", "kind": "enum", "ref": "TpcnIndicadorPagamento", "readonly": false, "declaredDefault": "ipNenhum" }, { "name": "tBand", "type": "TpcnBandeiraCartao", "kind": "enum", "ref": "TpcnBandeiraCartao", "readonly": false }, { "name": "tPag", "type": "TpcnFormaPagamento", "kind": "enum", "ref": "TpcnFormaPagamento", "readonly": false }, { "name": "tpIntegra", "type": "TtpIntegra", "kind": "enum", "ref": "TtpIntegra", "readonly": false }, { "name": "UFPag", "type": "string", "kind": "string", "readonly": false }, { "name": "vPag", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "xPag", "type": "string", "kind": "string", "readonly": false }] }, "TpcnBandeiraCartao": { "name": "TpcnBandeiraCartao", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["bcVisa", "bcMasterCard", "bcAmericanExpress", "bcSorocred", "bcDinersClub", "bcElo", "bcHipercard", "bcAura", "bcCabal", "bcAlelo", "bcBanesCard", "bcCalCard", "bcCredz", "bcDiscover", "bcGoodCard", "bcGreenCard", "bcHiper", "bcJcB", "bcMais", "bcMaxVan", "bcPolicard", "bcRedeCompras", "bcSodexo", "bcValeCard", "bcVerocheque", "bcVR", "bcTicket", "bcOutros"] }, "TpcnCondicaoVeiculo": { "name": "TpcnCondicaoVeiculo", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["cvAcabado", "cvInacabado", "cvSemiAcabado"] }, "TpcnConsumidorFinal": { "name": "TpcnConsumidorFinal", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["cfNao", "cfConsumidorFinal"] }, "TpcnCRT": { "name": "TpcnCRT", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["crtSimplesNacional", "crtSimplesExcessoReceita", "crtRegimeNormal", "crtMEI"] }, "TpcnCstIpi": { "name": "TpcnCstIpi", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["ipi00", "ipi49", "ipi50", "ipi99", "ipi01", "ipi02", "ipi03", "ipi04", "ipi05", "ipi51", "ipi52", "ipi53", "ipi54", "ipi55"] }, "TpcnDestinoOperacao": { "name": "TpcnDestinoOperacao", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["doInterna", "doInterestadual", "doExterior"] }, "TpcnDeterminacaoBaseIcms": { "name": "TpcnDeterminacaoBaseIcms", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["dbiMargemValorAgregado", "dbiPauta", "dbiPrecoTabelado", "dbiValorOperacao", "dbiNenhum"] }, "TpcnDeterminacaoBaseIcmsST": { "name": "TpcnDeterminacaoBaseIcmsST", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["dbisPrecoTabelado", "dbisListaNegativa", "dbisListaPositiva", "dbisListaNeutra", "dbisMargemValorAgregado", "dbisPauta", "dbisValordaOperacao"] }, "TpcnECFModRef": { "name": "TpcnECFModRef", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["ECFModRefVazio", "ECFModRef2B", "ECFModRef2C", "ECFModRef2D"] }, "TpcnFinalidadeNFe": { "name": "TpcnFinalidadeNFe", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["fnNormal", "fnComplementar", "fnAjuste", "fnDevolucao", "fnCredito", "fnDebito"] }, "TpcnFormaPagamento": { "name": "TpcnFormaPagamento", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["fpDinheiro", "fpCheque", "fpCartaoCredito", "fpCartaoDebito", "fpCreditoLoja", "fpValeAlimentacao", "fpValeRefeicao", "fpValePresente", "fpValeCombustivel", "fpDuplicataMercantil", "fpBoletoBancario", "fpDepositoBancario", "fpPagamentoInstantaneo", "fpTransfBancario", "fpProgramaFidelidade", "fpSemPagamento", "fpRegimeEspecial", "fpOutro", "fpPagamentoInstantaneoEstatico", "fpCreditoEmLojaPorDevolucao", "fpFalhaHardware", "fpPagamentoPosterior", "fpPagInstantaneoPIXAutomatico", "fpTEFBookTransfer"] }, "TpcnIndEscala": { "name": "TpcnIndEscala", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["ieRelevante", "ieNaoRelevante", "ieNenhum"] }, "TpcnIndicadorPagamento": { "name": "TpcnIndicadorPagamento", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["ipVista", "ipPrazo", "ipOutras", "ipNenhum"] }, "TpcnIndicadorProcesso": { "name": "TpcnIndicadorProcesso", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["ipSEFAZ", "ipJusticaFederal", "ipJusticaEstadual", "ipSecexRFB", "ipCONFAZ", "ipOutros"] }, "TpcnIndicadorTotal": { "name": "TpcnIndicadorTotal", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["itSomaTotalNFe", "itNaoSomaTotalNFe"] }, "TpcnindISS": { "name": "TpcnindISS", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["iiExigivel", "iiNaoIncidencia", "iiIsencao", "iiExportacao", "iiImunidade", "iiExigSuspDecisaoJudicial", "iiExigSuspProcessoAdm"] }, "TpcnindISSRet": { "name": "TpcnindISSRet", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["iirSim", "iirNao"] }, "TpcnISSQNcSitTrib": { "name": "TpcnISSQNcSitTrib", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["ISSQNcSitTribVazio", "ISSQNcSitTribNORMAL", "ISSQNcSitTribRETIDA", "ISSQNcSitTribSUBSTITUTA", "ISSQNcSitTribISENTA"] }, "TpcnModalidadeFrete": { "name": "TpcnModalidadeFrete", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["mfContaEmitente", "mfContaDestinatario", "mfContaTerceiros", "mfProprioRemetente", "mfProprioDestinatario", "mfSemFrete"] }, "TpcnMotivoDesoneracaoICMS": { "name": "TpcnMotivoDesoneracaoICMS", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["mdiTaxi", "mdiDeficienteFisico", "mdiProdutorAgropecuario", "mdiFrotistaLocadora", "mdiDiplomaticoConsular", "mdiAmazoniaLivreComercio", "mdiSuframa", "mdiVendaOrgaosPublicos", "mdiOutros", "mdiDeficienteCondutor", "mdiDeficienteNaoCondutor", "mdiOrgaoFomento", "mdiOlimpiadaRio2016", "mdiSolicitadoFisco"] }, "TpcnPresencaComprador": { "name": "TpcnPresencaComprador", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["pcNao", "pcPresencial", "pcInternet", "pcTeleatendimento", "pcEntregaDomicilio", "pcPresencialForaEstabelecimento", "pcOutros"] }, "TpcnTipoArma": { "name": "TpcnTipoArma", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["taUsoPermitido", "taUsoRestrito"] }, "TpcnTipoIntermedio": { "name": "TpcnTipoIntermedio", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["tiContaPropria", "tiContaOrdem", "tiEncomenda"] }, "TpcnTipoOperacao": { "name": "TpcnTipoOperacao", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["toVendaConcessionaria", "toFaturamentoDireto", "toVendaDireta", "toOutros"] }, "TpcnTipoViaTransp": { "name": "TpcnTipoViaTransp", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["tvMaritima", "tvFluvial", "tvLacustre", "tvAerea", "tvPostal", "tvFerroviaria", "tvRodoviaria", "tvConduto", "tvMeiosProprios", "tvEntradaSaidaFicta", "tvCourier", "tvEmMaos", "tvPorReboque"] }, "TPIS": { "name": "TPIS", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CST", "type": "TCstPis", "kind": "enum", "ref": "TCSTPis", "readonly": false, "declaredDefault": "pis01" }, { "name": "pPIS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vAliqProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBC", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vPIS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TPISST": { "name": "TPISST", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "indSomaPISST", "type": "TIndSomaPISST", "kind": "enum", "ref": "TIndSomaPISST", "readonly": false }, { "name": "pPis", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qBCProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vAliqProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBc", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vPIS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TProcDFe": { "name": "TProcDFe", "unit": "ACBrDFeComum.Proc", "kind": "object", "properties": [{ "name": "chDFe", "type": "string", "kind": "string", "readonly": false }, { "name": "cMsg", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cStat", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "dhRecbto", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "digVal", "type": "string", "kind": "string", "readonly": false }, { "name": "Id", "type": "string", "kind": "string", "readonly": false }, { "name": "nProt", "type": "string", "kind": "string", "readonly": false }, { "name": "PathDFe", "type": "string", "kind": "string", "readonly": false }, { "name": "PathRetConsReciDFe", "type": "string", "kind": "string", "readonly": false }, { "name": "PathRetConsSitDFe", "type": "string", "kind": "string", "readonly": false }, { "name": "tpAmb", "type": "TACBrTipoAmbiente", "kind": "enum", "ref": "TACBrTipoAmbiente", "readonly": false }, { "name": "verAplic", "type": "string", "kind": "string", "readonly": false }, { "name": "XML_DFe", "type": "string", "kind": "string", "readonly": false }, { "name": "XML_prot", "type": "string", "kind": "string", "readonly": false }, { "name": "xMotivo", "type": "string", "kind": "string", "readonly": false }, { "name": "xMsg", "type": "string", "kind": "string", "readonly": false }] }, "TprocRefCollection": { "name": "TprocRefCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TprocRefCollectionItem", "factory": "New" }, "TprocRefCollectionItem": { "name": "TprocRefCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "indProc", "type": "TpcnIndicadorProcesso", "kind": "enum", "ref": "TpcnIndicadorProcesso", "readonly": false, "declaredDefault": "ipSEFAZ" }, { "name": "nProc", "type": "string", "kind": "string", "readonly": false }, { "name": "tpAto", "type": "TtpAto", "kind": "enum", "ref": "TtpAto", "readonly": false }] }, "TProd": { "name": "TProd", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "arma", "type": "TarmaCollection", "kind": "list", "ref": "TArmaCollection", "readonly": false }, { "name": "cBarra", "type": "string", "kind": "string", "readonly": false }, { "name": "cBarraTrib", "type": "string", "kind": "string", "readonly": false }, { "name": "cBenef", "type": "string", "kind": "string", "readonly": false }, { "name": "cEAN", "type": "string", "kind": "string", "readonly": false }, { "name": "cEANTrib", "type": "string", "kind": "string", "readonly": false }, { "name": "CEST", "type": "string", "kind": "string", "readonly": false }, { "name": "CFOP", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJFab", "type": "string", "kind": "string", "readonly": false }, { "name": "comb", "type": "TComb", "kind": "object", "ref": "TComb", "readonly": false }, { "name": "cProd", "type": "string", "kind": "string", "readonly": false }, { "name": "CredPresumido", "type": "TCredPresumidoCollection", "kind": "list", "ref": "TCredPresumidoCollection", "readonly": false }, { "name": "detExport", "type": "TdetExportCollection", "kind": "list", "ref": "TdetExportCollection", "readonly": false }, { "name": "DI", "type": "TDICollection", "kind": "list", "ref": "TDICollection", "readonly": false }, { "name": "EXTIPI", "type": "string", "kind": "string", "readonly": false }, { "name": "indBemMovelUsado", "type": "TIndicadorEx", "kind": "enum", "ref": "TIndicadorEx", "readonly": false, "declaredDefault": "tieNenhum" }, { "name": "indEscala", "type": "TpcnIndEscala", "kind": "enum", "ref": "TpcnIndEscala", "readonly": false, "declaredDefault": "ieNenhum" }, { "name": "IndTot", "type": "TpcnIndicadorTotal", "kind": "enum", "ref": "TpcnIndicadorTotal", "readonly": false, "declaredDefault": "itSomaTotalNFe" }, { "name": "med", "type": "TMedCollection", "kind": "list", "ref": "TMedCollection", "readonly": false }, { "name": "NCM", "type": "string", "kind": "string", "readonly": false }, { "name": "nFCI", "type": "string", "kind": "string", "readonly": false }, { "name": "nItem", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "nItemPed", "type": "string", "kind": "string", "readonly": false }, { "name": "nRECOPI", "type": "string", "kind": "string", "readonly": false }, { "name": "NVE", "type": "TNVECollection", "kind": "list", "ref": "TNVECollection", "readonly": false }, { "name": "qCom", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qTrib", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "rastro", "type": "TRastroCollection", "kind": "list", "ref": "TRastroCollection", "readonly": false }, { "name": "tpCredPresIBSZFM", "type": "TtpCredPresIBSZFM", "kind": "enum", "ref": "TTpCredPresIBSZFM", "readonly": false }, { "name": "uCom", "type": "string", "kind": "string", "readonly": false }, { "name": "uTrib", "type": "string", "kind": "string", "readonly": false }, { "name": "vDesc", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "veicProd", "type": "TveicProd", "kind": "object", "ref": "TveicProd", "readonly": false }, { "name": "vFrete", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vOutro", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vProd", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vSeg", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vUnCom", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "vUnTrib", "type": "Double", "kind": "decimal", "readonly": false }, { "name": "xPed", "type": "string", "kind": "string", "readonly": false }, { "name": "xProd", "type": "string", "kind": "string", "readonly": false }] }, "TRastroCollection": { "name": "TRastroCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TRastroCollectionItem", "factory": "New" }, "TRastroCollectionItem": { "name": "TRastroCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "cAgreg", "type": "string", "kind": "string", "readonly": false }, { "name": "dFab", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "dVal", "type": "TDateTime", "kind": "datetime", "readonly": false }, { "name": "nLote", "type": "string", "kind": "string", "readonly": false }, { "name": "qLote", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TReboqueCollection": { "name": "TReboqueCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TReboqueCollectionItem", "factory": "New" }, "TReboqueCollectionItem": { "name": "TReboqueCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "placa", "type": "string", "kind": "string", "readonly": false }, { "name": "RNTC", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }] }, "TrefDFePagAntCollection": { "name": "TrefDFePagAntCollection", "unit": "ACBrDFe.RTC.Classes", "kind": "list", "item": "TrefDFePagAntCollectionItem", "factory": "New" }, "TrefDFePagAntCollectionItem": { "name": "TrefDFePagAntCollectionItem", "unit": "ACBrDFe.RTC.Classes", "kind": "object", "properties": [{ "name": "refDFEChave", "type": "string", "kind": "string", "readonly": false }] }, "TRefECF": { "name": "TRefECF", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "modelo", "type": "TpcnECFModRef", "kind": "enum", "ref": "TpcnECFModRef", "readonly": false, "declaredDefault": "ECFModRefVazio" }, { "name": "nCOO", "type": "string", "kind": "string", "readonly": false }, { "name": "nECF", "type": "string", "kind": "string", "readonly": false }] }, "TRefNF": { "name": "TRefNF", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "AAMM", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJ", "type": "string", "kind": "string", "readonly": false }, { "name": "cUF", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "modelo", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "nNF", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "serie", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }] }, "TRefNFP": { "name": "TRefNFP", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "AAMM", "type": "string", "kind": "string", "readonly": false }, { "name": "CNPJCPF", "type": "string", "kind": "string", "readonly": false }, { "name": "cUF", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "IE", "type": "string", "kind": "string", "readonly": false }, { "name": "modelo", "type": "string", "kind": "string", "readonly": false }, { "name": "nNF", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "serie", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }] }, "TRegTribISSQN": { "name": "TRegTribISSQN", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["RTISSMicroempresaMunicipal", "RTISSEstimativa", "RTISSSociedadeProfissionais", "RTISSCooperativa", "RTISSMEI", "RTISSMEEPP", "RTISSNenhum"] }, "TRetirada": { "name": "TRetirada", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CEP", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cMun", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "CNPJCPF", "type": "string", "kind": "string", "readonly": false }, { "name": "cPais", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "Email", "type": "string", "kind": "string", "readonly": false }, { "name": "fone", "type": "string", "kind": "string", "readonly": false }, { "name": "IE", "type": "string", "kind": "string", "readonly": false }, { "name": "nro", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }, { "name": "xBairro", "type": "string", "kind": "string", "readonly": false }, { "name": "xCpl", "type": "string", "kind": "string", "readonly": false }, { "name": "xLgr", "type": "string", "kind": "string", "readonly": false }, { "name": "xMun", "type": "string", "kind": "string", "readonly": false }, { "name": "xNome", "type": "string", "kind": "string", "readonly": false }, { "name": "xPais", "type": "string", "kind": "string", "readonly": false }] }, "TretTransp": { "name": "TretTransp", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CFOP", "type": "string", "kind": "string", "readonly": false }, { "name": "cMunFG", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "pICMSRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vICMSRet", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vServ", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TretTrib": { "name": "TretTrib", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "vBCIRRF", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vBCRetPrev", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vIRRF", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vRetCOFINS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vRetCSLL", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vRetPIS", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "vRetPrev", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }] }, "TSignature": { "name": "TSignature", "unit": "ACBrXmlBase", "kind": "object", "properties": [{ "name": "DigestValue", "type": "string", "kind": "string", "readonly": false }, { "name": "IdSignature", "type": "string", "kind": "string", "readonly": false }, { "name": "IdSignatureValue", "type": "string", "kind": "string", "readonly": false }, { "name": "SignatureValue", "type": "string", "kind": "string", "readonly": false }, { "name": "URI", "type": "string", "kind": "string", "readonly": false }, { "name": "X509Certificate", "type": "string", "kind": "string", "readonly": false }] }, "TTipoNFe": { "name": "TTipoNFe", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tnEntrada", "tnSaida"] }, "TTotal": { "name": "TTotal", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "IBSCBSTot", "type": "TIBSCBSTot", "kind": "object", "ref": "TIBSCBSTot", "readonly": false }, { "name": "ICMSTot", "type": "TICMSTot", "kind": "object", "ref": "TICMSTot", "readonly": false }, { "name": "ISSQNtot", "type": "TISSQNtot", "kind": "object", "ref": "TISSQNtot", "readonly": false }, { "name": "ISTot", "type": "TISTot", "kind": "object", "ref": "TISTot", "readonly": false }, { "name": "retTrib", "type": "TretTrib", "kind": "object", "ref": "TretTrib", "readonly": false }, { "name": "vNFTot", "type": "Double", "kind": "decimal", "readonly": false }] }, "TtpALCZFMCBS": { "name": "TtpALCZFMCBS", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tpALCZFMCBSnOpInd", "tpALCZFMCBSOpInd"] }, "TtpAto": { "name": "TtpAto", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["taNenhum", "taTermoAcordo", "taRegimeEspecial", "taAutorizacaoEspecifica", "taAjusteSNIEF", "taConvenioICMS"] }, "TTpCredPresIBSZFM": { "name": "TTpCredPresIBSZFM", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tcpNenhum", "tcpSemCredito", "tcpBensConsumoFinal", "tcpBensCapital", "tcpBensIntermediarios", "tcpBensInformaticaOutros"] }, "TtpEnteGov": { "name": "TtpEnteGov", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tcgNenhum", "tcgUniao", "tcgEstados", "tcgDistritoFederal", "tcgMunicipios", "tcgConsorcioPublico", "tcgComiteGestorIBS"] }, "TtpGuia": { "name": "TtpGuia", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["tpgNenhum", "tpgGTA", "tpgTTA", "tpgDTA", "tpgATV", "tpgPTV", "tpgGTV", "tpgGuiaFlorestal"] }, "TtpIntegra": { "name": "TtpIntegra", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tiNaoInformado", "tiPagIntegrado", "tiPagNaoIntegrado"] }, "TtpNFCredito": { "name": "TtpNFCredito", "unit": "pcnConversaoNFe", "kind": "enum", "values": ["tcNenhum", "tcMultaJuros", "tcApropriacaoCreditoPresumido", "tcRetorno", "tcReducaoValores", "tcTransferenciaCreditoSucessao", "tcRetornoRecusaParcial"] }, "TtpNFDebito": { "name": "TtpNFDebito", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["tdNenhum", "tdTransferenciaCreditoCooperativa", "tdAnulacao", "tdDebitosNaoProcessadas", "tdMultaJuros", "tdTransferenciaCreditoSucessao", "tdPagamentoAntecipado", "tdPerdaEmEstoque", "tdDesenquadramentodoSN"] }, "TtpOperGov": { "name": "TtpOperGov", "unit": "ACBrDFe.Conversao", "kind": "enum", "values": ["togNenhum", "togFornecimento", "togRecebimentoPag", "togFornecimentoPagRealizado", "togRecebimentoPagFornecPosterior"] }, "TTransp": { "name": "TTransp", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "balsa", "type": "string", "kind": "string", "readonly": false }, { "name": "modFrete", "type": "TpcnModalidadeFrete", "kind": "enum", "ref": "TpcnModalidadeFrete", "readonly": false }, { "name": "Reboque", "type": "TReboqueCollection", "kind": "list", "ref": "TReboqueCollection", "readonly": false }, { "name": "retTransp", "type": "TretTransp", "kind": "object", "ref": "TretTransp", "readonly": false }, { "name": "Transporta", "type": "TTransporta", "kind": "object", "ref": "TTransporta", "readonly": false }, { "name": "vagao", "type": "string", "kind": "string", "readonly": false }, { "name": "veicTransp", "type": "TveicTransp", "kind": "object", "ref": "TveicTransp", "readonly": false }, { "name": "Vol", "type": "TVolCollection", "kind": "list", "ref": "TVolCollection", "readonly": false }] }, "TTransporta": { "name": "TTransporta", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "CNPJCPF", "type": "string", "kind": "string", "readonly": false }, { "name": "IE", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }, { "name": "xEnder", "type": "string", "kind": "string", "readonly": false }, { "name": "xMun", "type": "string", "kind": "string", "readonly": false }, { "name": "xNome", "type": "string", "kind": "string", "readonly": false }] }, "TveicProd": { "name": "TveicProd", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "anoFab", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "anoMod", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "cCor", "type": "string", "kind": "string", "readonly": false }, { "name": "cCorDENATRAN", "type": "string", "kind": "string", "readonly": false }, { "name": "chassi", "type": "string", "kind": "string", "readonly": false }, { "name": "Cilin", "type": "string", "kind": "string", "readonly": false }, { "name": "cMod", "type": "string", "kind": "string", "readonly": false }, { "name": "CMT", "type": "string", "kind": "string", "readonly": false }, { "name": "CombDescricao", "type": "string", "kind": "string", "readonly": true }, { "name": "condVeic", "type": "TpcnCondicaoVeiculo", "kind": "enum", "ref": "TpcnCondicaoVeiculo", "readonly": false }, { "name": "dist", "type": "string", "kind": "string", "readonly": false }, { "name": "espVeic", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "lota", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "nMotor", "type": "string", "kind": "string", "readonly": false }, { "name": "nSerie", "type": "string", "kind": "string", "readonly": false }, { "name": "pesoB", "type": "string", "kind": "string", "readonly": false }, { "name": "pesoL", "type": "string", "kind": "string", "readonly": false }, { "name": "pot", "type": "string", "kind": "string", "readonly": false }, { "name": "tpComb", "type": "string", "kind": "string", "readonly": false }, { "name": "tpOP", "type": "TpcnTipoOperacao", "kind": "enum", "ref": "TpcnTipoOperacao", "readonly": false }, { "name": "tpPint", "type": "string", "kind": "string", "readonly": false }, { "name": "tpRest", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "tpVeic", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }, { "name": "VIN", "type": "string", "kind": "string", "readonly": false }, { "name": "xCor", "type": "string", "kind": "string", "readonly": false }] }, "TveicTransp": { "name": "TveicTransp", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "placa", "type": "string", "kind": "string", "readonly": false }, { "name": "RNTC", "type": "string", "kind": "string", "readonly": false }, { "name": "UF", "type": "string", "kind": "string", "readonly": false }] }, "TVolCollection": { "name": "TVolCollection", "unit": "ACBrNFe.Classes", "kind": "list", "item": "TVolCollectionItem", "factory": "New" }, "TVolCollectionItem": { "name": "TVolCollectionItem", "unit": "ACBrNFe.Classes", "kind": "object", "properties": [{ "name": "esp", "type": "string", "kind": "string", "readonly": false }, { "name": "Lacres", "type": "TLacresCollection", "kind": "list", "ref": "TLacresCollection", "readonly": false }, { "name": "marca", "type": "string", "kind": "string", "readonly": false }, { "name": "nVol", "type": "string", "kind": "string", "readonly": false }, { "name": "pesoB", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "pesoL", "type": "Currency", "kind": "decimal", "scale": 4, "readonly": false }, { "name": "qVol", "type": "Integer", "kind": "integer", "min": -2147483648, "max": 2147483647, "readonly": false }] } };
|
|
3304
|
+
function campoConhecido(at) {
|
|
3305
|
+
if (typeof at !== "string" || at.length > 512 || !/^[A-Za-z_]\w*(?:(?:\.[A-Za-z_]\w*)|(?:\[\d{1,7}\]))*$/.test(at)) return void 0;
|
|
3306
|
+
const parts = at.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
3307
|
+
let schema = Object.hasOwn(MODEL_SCHEMA, parts[0]) ? MODEL_SCHEMA[parts[0]] : void 0;
|
|
3308
|
+
if (!schema) return void 0;
|
|
3309
|
+
for (const part of parts.slice(1)) {
|
|
3310
|
+
if (schema.kind === "list") {
|
|
3311
|
+
if (!/^\d+$/.test(part)) return void 0;
|
|
3312
|
+
schema = MODEL_SCHEMA[schema.item];
|
|
3313
|
+
} else if (schema.kind === "object") {
|
|
3314
|
+
const p = schema.properties.find((p2) => p2.name === part);
|
|
3315
|
+
if (!p) return void 0;
|
|
3316
|
+
schema = p.ref ? MODEL_SCHEMA[p.ref] : { kind: p.kind };
|
|
3317
|
+
} else return void 0;
|
|
3318
|
+
}
|
|
3319
|
+
return at;
|
|
3320
|
+
}
|
|
3321
|
+
var ErroValidacaoModelo = class extends TypeError {
|
|
3322
|
+
codigo;
|
|
3323
|
+
diagnostico;
|
|
3324
|
+
constructor(codigo, at) {
|
|
3325
|
+
const catalogo = {
|
|
3326
|
+
MODELO_DESCONHECIDO: ["Modelo desconhecido.", "Use um modelo exportado pelo cliente gerado."],
|
|
3327
|
+
ENUM_INVALIDO: ["enum inv\xE1lido", "Use um dos valores textuais do enum exportado pelo cliente."],
|
|
3328
|
+
ARRAY_ESPERADO: ["esperado array", "Informe uma lista JSON entre colchetes."],
|
|
3329
|
+
OBJETO_ESPERADO: ["esperado objeto", "Informe um objeto JSON entre chaves."],
|
|
3330
|
+
CAMPO_DESCONHECIDO: ["propriedade desconhecida", "Confira os nomes permitidos neste grupo; a chave desconhecida n\xE3o \xE9 registrada."],
|
|
3331
|
+
CAMPO_SOMENTE_LEITURA: ["propriedade somente leitura", "Remova este campo da entrada; o motor preenche seu resultado."],
|
|
3332
|
+
INTEIRO_INVALIDO: ["inteiro fora do intervalo", "Informe um n\xFAmero inteiro dentro do intervalo do campo."],
|
|
3333
|
+
BOOLEANO_ESPERADO: ["esperado boolean", "Informe true ou false como valor JSON, sem aspas."],
|
|
3334
|
+
DECIMAL_INVALIDO: ["esperado decimal em string", "Informe o decimal entre aspas, com ponto e a escala permitida pelo campo."],
|
|
3335
|
+
DATA_HORA_INVALIDA: ["esperado data/hora civil ISO (sem timezone)", "Informe a data/hora civil da UF como AAAA-MM-DDTHH:mm:ss, sem Z ou offset. Confira a data antes do envio."],
|
|
3336
|
+
DATA_INVALIDA: ["data inv\xE1lida", "Confira dia, m\xEAs, ano e hor\xE1rio usando uma data civil v\xE1lida."],
|
|
3337
|
+
TEXTO_ESPERADO: ["esperado string", "Informe texto entre aspas no JSON."]
|
|
3338
|
+
};
|
|
3339
|
+
const safeCode = Object.hasOwn(catalogo, codigo) ? codigo : "MODELO_DESCONHECIDO";
|
|
3340
|
+
const campo = campoConhecido(at), [texto, acao] = catalogo[safeCode], mensagem = (campo ? campo + ": " : "") + texto;
|
|
3341
|
+
super(mensagem);
|
|
3342
|
+
this.codigo = safeCode;
|
|
3343
|
+
const causa = Object.freeze({ codigo: safeCode, etapa: "documento", ...campo ? { campo } : {} });
|
|
3344
|
+
this.diagnostico = Object.freeze({ codigo: safeCode, etapa: "documento", ...campo ? { campo } : {}, mensagem, acao, statusEnvio: "nao_enviado", causa });
|
|
3345
|
+
Object.defineProperty(this, "cause", { value: causa, enumerable: false });
|
|
3346
|
+
}
|
|
3347
|
+
toJSON() {
|
|
3348
|
+
return this.diagnostico;
|
|
3349
|
+
}
|
|
3350
|
+
};
|
|
3086
3351
|
function validateModel(model, value, at = model) {
|
|
3087
|
-
const schema = MODEL_SCHEMA[model];
|
|
3088
|
-
if (!schema) throw new
|
|
3352
|
+
const schema = Object.hasOwn(MODEL_SCHEMA, model) ? MODEL_SCHEMA[model] : void 0;
|
|
3353
|
+
if (!schema) throw new ErroValidacaoModelo("MODELO_DESCONHECIDO");
|
|
3354
|
+
at = campoConhecido(at) ?? model;
|
|
3089
3355
|
if (schema.kind === "enum") {
|
|
3090
|
-
if (typeof value !== "string" || !schema.values.includes(value)) throw new
|
|
3356
|
+
if (typeof value !== "string" || !schema.values.includes(value)) throw new ErroValidacaoModelo("ENUM_INVALIDO", at);
|
|
3091
3357
|
return;
|
|
3092
3358
|
}
|
|
3093
3359
|
if (schema.kind === "list") {
|
|
3094
|
-
if (!Array.isArray(value)) throw new
|
|
3360
|
+
if (!Array.isArray(value)) throw new ErroValidacaoModelo("ARRAY_ESPERADO", at);
|
|
3095
3361
|
value.forEach((item, index) => validateModel(schema.item, item, at + "[" + index + "]"));
|
|
3096
3362
|
return;
|
|
3097
3363
|
}
|
|
3098
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new
|
|
3364
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new ErroValidacaoModelo("OBJETO_ESPERADO", at);
|
|
3099
3365
|
const fields = new Map(schema.properties.filter((p) => !p.readonly).map((p) => [p.name, p]));
|
|
3100
3366
|
for (const [name, v] of Object.entries(value)) {
|
|
3101
3367
|
if (v === void 0) continue;
|
|
3102
3368
|
const p = fields.get(name);
|
|
3103
|
-
if (!p)
|
|
3104
|
-
|
|
3369
|
+
if (!p) {
|
|
3370
|
+
const readonly = schema.properties.some((p2) => p2.name === name && p2.readonly);
|
|
3371
|
+
throw new ErroValidacaoModelo(readonly ? "CAMPO_SOMENTE_LEITURA" : "CAMPO_DESCONHECIDO", readonly ? at + "." + name : at);
|
|
3372
|
+
}
|
|
3105
3373
|
const field = at + "." + name;
|
|
3106
3374
|
if (p.ref) {
|
|
3107
3375
|
validateModel(p.ref, v, field);
|
|
3108
3376
|
continue;
|
|
3109
3377
|
}
|
|
3110
3378
|
if (p.kind === "integer") {
|
|
3111
|
-
if (typeof v !== "number" || !Number.isSafeInteger(v) || v < p.min || v > p.max) throw new
|
|
3379
|
+
if (typeof v !== "number" || !Number.isSafeInteger(v) || v < p.min || v > p.max) throw new ErroValidacaoModelo("INTEIRO_INVALIDO", field);
|
|
3112
3380
|
} else if (p.kind === "boolean") {
|
|
3113
|
-
if (typeof v !== "boolean") throw new
|
|
3381
|
+
if (typeof v !== "boolean") throw new ErroValidacaoModelo("BOOLEANO_ESPERADO", field);
|
|
3114
3382
|
} else if (p.kind === "decimal") {
|
|
3115
|
-
if (typeof v !== "string" || v.length > 64 || !/^-?\d+(?:\.\d+)?$/.test(v) || p.scale !== void 0 && (v.split(".")[1]?.length ?? 0) > p.scale) throw new
|
|
3383
|
+
if (typeof v !== "string" || v.length > 64 || !/^-?\d+(?:\.\d+)?$/.test(v) || p.scale !== void 0 && (v.split(".")[1]?.length ?? 0) > p.scale) throw new ErroValidacaoModelo("DECIMAL_INVALIDO", field);
|
|
3116
3384
|
} else if (p.kind === "datetime") {
|
|
3117
|
-
if (typeof v !== "string" || !/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?)?$/.test(v) || Number.isNaN(Date.parse(v + (v.length === 10 ? "T00:00:00Z" : "Z")))) throw new
|
|
3385
|
+
if (typeof v !== "string" || !/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?)?$/.test(v) || Number.isNaN(Date.parse(v + (v.length === 10 ? "T00:00:00Z" : "Z")))) throw new ErroValidacaoModelo("DATA_HORA_INVALIDA", field);
|
|
3118
3386
|
const date = /* @__PURE__ */ new Date(v + (v.length === 10 ? "T00:00:00Z" : "Z"));
|
|
3119
|
-
if (date.toISOString().slice(0, 10) !== v.slice(0, 10)) throw new
|
|
3120
|
-
} else if (typeof v !== "string") throw new
|
|
3387
|
+
if (date.toISOString().slice(0, 10) !== v.slice(0, 10)) throw new ErroValidacaoModelo("DATA_INVALIDA", field);
|
|
3388
|
+
} else if (typeof v !== "string") throw new ErroValidacaoModelo("TEXTO_ESPERADO", field);
|
|
3121
3389
|
}
|
|
3122
3390
|
}
|
|
3123
3391
|
function validateTNFe(value) {
|
|
@@ -3125,6 +3393,9 @@ function validateTNFe(value) {
|
|
|
3125
3393
|
}
|
|
3126
3394
|
|
|
3127
3395
|
// src/index.ts
|
|
3396
|
+
function diagnosticarErro2(erro) {
|
|
3397
|
+
return erro instanceof ErroValidacaoModelo ? erro.diagnostico : diagnosticarErro(erro);
|
|
3398
|
+
}
|
|
3128
3399
|
function criarEmissor2(options) {
|
|
3129
3400
|
const emissor = criarEmissor({ ...options, contrato: ACBR_CONTRACT, validaDocumento: validateTNFe });
|
|
3130
3401
|
return { ...emissor, gerarXml(documento, operacao) {
|
|
@@ -3136,6 +3407,7 @@ function criarEmissor2(options) {
|
|
|
3136
3407
|
ACBR_CONTRACT,
|
|
3137
3408
|
CONTRACT_HASH,
|
|
3138
3409
|
ErroAcbrNode,
|
|
3410
|
+
ErroValidacaoModelo,
|
|
3139
3411
|
PROTOCOL_VERSION,
|
|
3140
3412
|
SOURCE_REVISION,
|
|
3141
3413
|
TACBrProcessoEmissao,
|
|
@@ -3343,6 +3615,8 @@ function criarEmissor2(options) {
|
|
|
3343
3615
|
TveicProd,
|
|
3344
3616
|
TveicTransp,
|
|
3345
3617
|
criarEmissor,
|
|
3618
|
+
diagnosticarErro,
|
|
3619
|
+
diagnosticarResultado,
|
|
3346
3620
|
validateModel,
|
|
3347
3621
|
validateTNFe
|
|
3348
3622
|
});
|