// NFE.io SDK - https://nfe.io /// //#region src/generated/nf-servico-v1.d.ts interface operations { readonly Companies_Get: { readonly parameters: { readonly query?: { /** @description Items por página (a API aceita 2–50 e retorna 10 quando omitido; 1 é rejeitado apesar da mensagem "between 1 and 50") */readonly pageCount?: number; /** @description Número da página (1-based — a primeira página é 1) */ readonly pageIndex?: number; }; readonly header?: never; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Consulta realizada com sucesso */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly companies?: readonly { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber: string; /** @description RPS número serie */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description RPS número */ readonly rpsNumber?: number; /** * Format: double * @description Alíquota do ISS para Simples Nacional */ readonly issRate?: number; /** * @description Ambiente de processamento * @enum {string} */ readonly environment?: "Development" | "Production" | "Staging"; /** * @description Status no sistema * @enum {string} */ readonly fiscalStatus?: "CityNotSupported" | "Pending" | "Inactive" | "None" | "Active"; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; /** @description Certificado */ readonly certificate?: { /** @description Thumbprint certificado */readonly thumbprint?: string; /** * Format: date-time * @description Certificado alterado em */ readonly modifiedOn?: string; /** * Format: date-time * @description Certificado expira em */ readonly expiresOn?: string; /** * @description Status do certificado * @enum {string} */ readonly status?: "Overdue" | "Pending" | "None" | "Active"; }; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }[]; /** Format: int64 */ readonly totalResults?: number; /** Format: int32 */ readonly totalPages?: number; /** Format: int32 */ readonly page?: number; }; }; }; /** @description Algum parametro informado não é válido, verificar resposta */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly Companies_Post: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path?: never; readonly cookie?: never; }; /** @description Dados da empresa */ readonly requestBody: { readonly content: { readonly "application/json": { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber: string; /** @description RPS número serie */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description RPS número */ readonly rpsNumber?: number; /** * Format: double * @description Alíquota do ISS para Simples Nacional */ readonly issRate?: number; /** * @description Ambiente de processamento * @enum {string} */ readonly environment?: "Development" | "Production" | "Staging"; /** * @description Status no sistema * @enum {string} */ readonly fiscalStatus?: "CityNotSupported" | "Pending" | "Inactive" | "None" | "Active"; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; /** @description Certificado */ readonly certificate?: { /** @description Thumbprint certificado */readonly thumbprint?: string; /** * Format: date-time * @description Certificado alterado em */ readonly modifiedOn?: string; /** * Format: date-time * @description Certificado expira em */ readonly expiresOn?: string; /** * @description Status do certificado * @enum {string} */ readonly status?: "Overdue" | "Pending" | "None" | "Active"; }; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; readonly responses: { /** @description Sucesso na criação da empresa */readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly companies?: { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber: string; /** @description RPS número serie */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description RPS número */ readonly rpsNumber?: number; /** * Format: double * @description Alíquota do ISS para Simples Nacional */ readonly issRate?: number; /** * @description Ambiente de processamento * @enum {string} */ readonly environment?: "Development" | "Production" | "Staging"; /** * @description Status no sistema * @enum {string} */ readonly fiscalStatus?: "CityNotSupported" | "Pending" | "Inactive" | "None" | "Active"; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; /** @description Certificado */ readonly certificate?: { /** @description Thumbprint certificado */readonly thumbprint?: string; /** * Format: date-time * @description Certificado alterado em */ readonly modifiedOn?: string; /** * Format: date-time * @description Certificado expira em */ readonly expiresOn?: string; /** * @description Status do certificado * @enum {string} */ readonly status?: "Overdue" | "Pending" | "None" | "Active"; }; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Já existe uma empresa com o CNPJ informado */ readonly 409: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly Companies_idGet: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa ou Inscrição Federal (CNPJ) */readonly company_id_or_tax_number: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly companies?: { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber: string; /** @description RPS número serie */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description RPS número */ readonly rpsNumber?: number; /** * Format: double * @description Alíquota do ISS para Simples Nacional */ readonly issRate?: number; /** * @description Ambiente de processamento * @enum {string} */ readonly environment?: "Development" | "Production" | "Staging"; /** * @description Status no sistema * @enum {string} */ readonly fiscalStatus?: "CityNotSupported" | "Pending" | "Inactive" | "None" | "Active"; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; /** @description Certificado */ readonly certificate?: { /** @description Thumbprint certificado */readonly thumbprint?: string; /** * Format: date-time * @description Certificado alterado em */ readonly modifiedOn?: string; /** * Format: date-time * @description Certificado expira em */ readonly expiresOn?: string; /** * @description Status do certificado * @enum {string} */ readonly status?: "Overdue" | "Pending" | "None" | "Active"; }; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly Companies_Put: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; /** @description Dados da empresa */ readonly requestBody: { readonly content: { readonly "application/json": { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber: string; /** @description RPS número serie */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description RPS número */ readonly rpsNumber?: number; /** * Format: double * @description Alíquota do ISS para Simples Nacional */ readonly issRate?: number; /** * @description Ambiente de processamento * @enum {string} */ readonly environment?: "Development" | "Production" | "Staging"; /** * @description Status no sistema * @enum {string} */ readonly fiscalStatus?: "CityNotSupported" | "Pending" | "Inactive" | "None" | "Active"; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; /** @description Certificado */ readonly certificate?: { /** @description Thumbprint certificado */readonly thumbprint?: string; /** * Format: date-time * @description Certificado alterado em */ readonly modifiedOn?: string; /** * Format: date-time * @description Certificado expira em */ readonly expiresOn?: string; /** * @description Status do certificado * @enum {string} */ readonly status?: "Overdue" | "Pending" | "None" | "Active"; }; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; readonly responses: { /** @description Sucesso na atualização da empresa */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly companies?: { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber: string; /** @description RPS número serie */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description RPS número */ readonly rpsNumber?: number; /** * Format: double * @description Alíquota do ISS para Simples Nacional */ readonly issRate?: number; /** * @description Ambiente de processamento * @enum {string} */ readonly environment?: "Development" | "Production" | "Staging"; /** * @description Status no sistema * @enum {string} */ readonly fiscalStatus?: "CityNotSupported" | "Pending" | "Inactive" | "None" | "Active"; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; /** @description Certificado */ readonly certificate?: { /** @description Thumbprint certificado */readonly thumbprint?: string; /** * Format: date-time * @description Certificado alterado em */ readonly modifiedOn?: string; /** * Format: date-time * @description Certificado expira em */ readonly expiresOn?: string; /** * @description Status do certificado * @enum {string} */ readonly status?: "Overdue" | "Pending" | "None" | "Active"; }; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly Companies_Delete: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na remoção da empresa */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": Record; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description empresa não foi encontrada */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly Companies_CertificateUpload: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; /** @description Arquivo do certificado digital com extensao PFX ou P12 */ readonly requestBody: { readonly content: { readonly "multipart/form-data": { /** Format: binary */readonly file?: string; readonly password?: string; }; }; }; readonly responses: { /** @description Sucesso na atualização da certificado digital */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": string; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Empresa não foi encontrada */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Nenhum arquivo foi encontrado na requisição */ readonly 415: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly CompaniesNotifications_Get: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Consulta realizada com sucesso */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly notifications?: readonly { /** @description Identificação */readonly id?: string; /** * @description Canal de Notificação * @enum {string} */ readonly channel?: "None" | "Email"; /** @description Filtro de Evento */ readonly filters?: readonly string[]; /** * @description Status no sistema * @enum {string} */ readonly status?: "Active" | "Inactive"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }[]; }; }; }; /** @description Algum parametro informado não é válido, verificar resposta */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly CompaniesNotifications_idGet: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da notificação a ser consultado */ readonly notification_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly notification?: { /** @description Identificação */readonly id?: string; /** * @description Canal de Notificação * @enum {string} */ readonly channel?: "None" | "Email"; /** @description Filtro de Evento */ readonly filters?: readonly string[]; /** * @description Status no sistema * @enum {string} */ readonly status?: "Active" | "Inactive"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly CompaniesNotifications_Delete: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da notificação */ readonly notification_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na remoção da empresa */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": Record; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description empresa não foi encontrada */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly CompaniesNotifications_Post: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; /** @description Dados da notificação */ readonly requestBody: { readonly content: { readonly "application/json": { /** * @description Lista de filtros de evento sem distinção entre maiúsculas e minúsculas associado a esta notificação. * Os filtros de evento são usados para determinar em quais eventos essa notificação será acionada. * Os valores de filtros suportados pode ser consultados através do requisição na API de **Tipos de Eventos**. */ readonly filters?: readonly string[]; /** * @description Determina se as notificações são enviadas quando o evento é gerado. * Definir como **Inactive** para não receber nenhuma nova notificação, sendo o padrão: **Active** * para receber todas as notificações. * @enum {string} */ readonly status?: "Active" | "Inactive"; }; }; }; readonly responses: { /** @description Sucesso na criação da empresa */readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly notification?: { /** @description Identificação */readonly id?: string; /** * @description Canal de Notificação * @enum {string} */ readonly channel?: "None" | "Email"; /** @description Filtro de Evento */ readonly filters?: readonly string[]; /** * @description Status no sistema * @enum {string} */ readonly status?: "Active" | "Inactive"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Já existe uma empresa com o CNPJ informado */ readonly 409: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly EventTypes_GetAll: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na consulta do tipos de eventos */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Lista de Evento */readonly eventTypes?: readonly { /** * @description Identificador do evento, seguem o padrão **Resource.EventAction**. * Onde **Resource**: nome da entidade que gerou o evento; * **EventAction**: nome do evento e ação criados. * Alguns exemplos **Invoice.Issued** ou **Blob.Updated** */ readonly id?: string; /** @description Descrição para o recurso, evento e ação exemplicando quando e onde eles ocorrem dentro na plataforma. */ readonly description?: string; }[]; }; }; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly LegalPeople_Get: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature?: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber?: string; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly LegalPeople_idGet: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da pessoa juridica */ readonly id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly legalPeople?: { /** @description Identificação */readonly id?: string; /** @description Nome ou Razão Social */ readonly name: string; /** @description Nome fantasia */ readonly tradeName?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature?: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber?: string; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly NaturalPeople_Get: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly naturalPeople?: readonly { /** @description Identificação */readonly id?: string; /** @description Nome completo */ readonly name: string; /** * Format: int64 * @description CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data nascimento */ readonly birthDate?: string; /** @description Número do Registro Geral (RG) */ readonly idNumber?: string; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }[]; /** Format: int64 */ readonly totalResults?: number; /** Format: int32 */ readonly totalPages?: number; /** Format: int32 */ readonly page?: number; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly NaturalPeople_idGet: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da pessoa física */ readonly id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Identificação */readonly id?: string; /** @description Nome completo */ readonly name: string; /** * Format: int64 * @description CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email: string; /** @description Endereço */ readonly address: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * Format: date-time * @description Data nascimento */ readonly birthDate?: string; /** @description Número do Registro Geral (RG) */ readonly idNumber?: string; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_Get: { readonly parameters: { readonly query?: { /** @description Items por página */readonly pageCount?: number; /** @description Número da página (1-based — a primeira página é 1) */ readonly pageIndex?: number; /** @description Data de competência início */ readonly issuedBegin?: string; /** @description Data de competência fim */ readonly issuedEnd?: string; /** @description Data de criação início */ readonly createdBegin?: string; /** @description Data de criação fim */ readonly createdEnd?: string; readonly hasTotals?: boolean; }; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly serviceInvoices?: readonly { /** @description Identificação */readonly id?: string; /** * @description Ambiente de Processamento * @enum {string} */ readonly environment: "Development" | "Production" | "Staging"; /** * @description Status do processamento * @enum {string} */ readonly flowStatus?: "CancelFailed" | "IssueFailed" | "Issued" | "Cancelled" | "PullFromCityHall" | "WaitingCalculateTaxes" | "WaitingDefineRpsNumber" | "WaitingSend" | "WaitingSendCancel" | "WaitingReturn" | "WaitingDownload"; /** @description Mensagem de processamento */ readonly flowMessage?: string; /** @description Prestador dos serviços */ readonly provider?: { /** @description Nome Fantasia */readonly tradeName?: string; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature?: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber?: string; /** * Format: double * @description Taxa da Aliquota do ISS (Simples Nacional) */ readonly issRate?: number; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; /** @description Tomador dos serviços */ readonly borrower?: { readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Telefone */ readonly phoneNumber?: string; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; /** @description Identificação única do cliente */ readonly externalId?: string; /** * Format: int64 * @description Número do lote da RPS */ readonly batchNumber?: number; /** @description Número do protocolo do lote da RPS */ readonly batchCheckNumber?: string; /** * Format: int64 * @description Número do NFE */ readonly number?: number; /** @description Código de Verificação da NFE */ readonly checkCode?: string; /** * @description Status da NFE * @enum {string} */ readonly status?: "Error" | "None" | "Created" | "Issued" | "Cancelled"; /** * @description Tipo da RPS * @enum {string} */ readonly rpsType?: "Rps" | "RpsMista" | "Cupom"; /** * @description Status da RPS * @enum {string} */ readonly rpsStatus?: "Normal" | "Canceled" | "Lost"; /** * @description Tipo da tributação * @enum {string} */ readonly taxationType?: "None" | "WithinCity" | "OutsideCity" | "Export" | "Free" | "Immune" | "SuspendedCourtDecision" | "SuspendedAdministrativeProcedure" | "OutsideCityFree" | "OutsideCityImmune" | "OutsideCitySuspended" | "OutsideCitySuspendedAdministrativeProcedure" | "ObjectiveImune"; /** * Format: date-time * @description Data de emissão */ readonly issuedOn?: string; /** * Format: date-time * @description Data de cancelamento */ readonly cancelledOn?: string; /** @description Número de serie da RPS */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description Número da RPS */ readonly rpsNumber?: number; /** @description Código do servico prestado no Municipio */ readonly cityServiceCode?: string; /** @description Código do servico prestado federal */ readonly federalServiceCode?: string; /** @description Descrição do serviço no municipio */ readonly description?: string; /** * Format: double * @description Valor do serviços */ readonly servicesAmount?: number; /** * Format: double * @description Valor dos Serviços pago */ readonly paidAmount?: number; /** * @description Formas de pagamento * @enum {string} */ readonly paymentMethod?: "None" | "Cash" | "Check" | "CreditCard" | "DebitCard" | "StoreCredit" | "FoodVoucher" | "MealVoucher" | "GiftCard" | "FuelVoucher" | "Others"; /** * Format: double * @description Valor de deduções */ readonly deductionsAmount?: number; /** * Format: double * @description Valor do desconto incondicionado */ readonly discountUnconditionedAmount?: number; /** * Format: double * @description Valor do desconto condicionado */ readonly discountConditionedAmount?: number; /** * Format: double * @description Valor da base de calculo de impostos */ readonly baseTaxAmount?: number; /** * Format: double * @description Aliquota do ISS */ readonly issRate?: number; /** * Format: double * @description Valor do ISS */ readonly issTaxAmount?: number; /** * Format: double * @description Valor retido do Imposto de Renda (IR) */ readonly irAmountWithheld?: number; /** * Format: double * @description Valor retido do PIS */ readonly pisAmountWithheld?: number; /** * Format: double * @description Valor retido do COFINS */ readonly cofinsAmountWithheld?: number; /** * Format: double * @description Valor retido do CSLL */ readonly csllAmountWithheld?: number; /** * Format: double * @description Valor retido do INSS */ readonly inssAmountWithheld?: number; /** * Format: double * @description Valor retido do ISS */ readonly issAmountWithheld?: number; /** * Format: double * @description Valor de outras retenções */ readonly othersAmountWithheld?: number; /** * Format: double * @description Valor das retenções */ readonly amountWithheld?: number; /** * Format: double * @description Valor líquido */ readonly amountNet?: number; /** @description Local da Prestação do Serviço */ readonly location?: { /** @description Estado */readonly state?: string; /** @description País */ readonly country?: string; /** @description Código Postal */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número */ readonly number?: string; /** @description Bairro */ readonly district?: string; /** @description Informações Adicionais (Complemento) */ readonly AdditionalInformation?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; }; /** @description Detalhes da atividade do evento */ readonly activityEvent?: { /** @description Nome do evento */readonly name?: string; /** * Format: date-time * @description Data de início do evento */ readonly beginOn?: string; /** * Format: date-time * @description Data do fim do evento */ readonly endOn?: string; /** @description Código da atividade do evento */ readonly Code?: string; }; /** @description Tributos aproximados */ readonly approximateTax?: { /** @description Nome da fonte da taxa */readonly source?: string; /** @description Versão da taxa baseado na fonte */ readonly version?: string; /** * Format: double * @description Taxa dos tributos aproximados */ readonly totalRate?: number; }; /** @description Informações Adicionais */ readonly additionalInformation?: string; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }[]; /** Format: int64 */ readonly totalResults?: number; /** Format: int32 */ readonly totalPages?: number; /** Format: int32 */ readonly page?: number; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_Post: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; }; readonly cookie?: never; }; /** @description Dados da nota fiscal de serviço */ readonly requestBody: { readonly content: { readonly "application/json": { /** @description Tomador dos serviços */readonly borrower?: { /** * @description Tipo do tomador dos serviços * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity"; /** @description Nome / Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Inscrição Municipal para Pessoas Jurídicas */ readonly municipalTaxNumber?: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** @description Telefone */ readonly phoneNumber?: string; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number?: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; /** @description Estado */ readonly state?: string; }; }; /** @description Identificação única do cliente */ readonly externalId?: string; /** @description Código do serviço no municipio */ readonly cityServiceCode: string; /** @description Código federal do servico (Item da lista de serviço LC 116) */ readonly federalServiceCode?: string; /** @description Código CNAE (somente quando necessario na cidade) */ readonly cnaeCode?: string; /** @description Código do NBS no municipio (somente quando necessario na cidade) */ readonly nbsCode?: string; /** @description Descrição dos serviços */ readonly description: string; /** * Format: double * @description Valor do serviços */ readonly servicesAmount: number; /** @description Número de Serie da RPS */ readonly rpsSerialNumber?: string; /** * Format: date-time * @description Data da emissão no formato YYYY-MM-DDTHH:MM:SS.SSSSSS-03:00 */ readonly issuedOn?: string; /** * Format: int64 * @description Número da RPS */ readonly rpsNumber?: number; /** * @description Tipo da tributação * @enum {string} */ readonly taxationType?: "None" | "WithinCity" | "OutsideCity" | "Export" | "Free" | "Immune" | "SuspendedCourtDecision" | "SuspendedAdministrativeProcedure" | "OutsideCityFree" | "OutsideCityImmune" | "OutsideCitySuspended" | "OutsideCitySuspendedAdministrativeProcedure" | "ObjectiveImune"; /** * Format: double * @description Aliquota do ISS */ readonly issRate?: number; /** * Format: double * @description Valor do ISS */ readonly issTaxAmount?: number; /** * Format: double * @description Valor de deduções */ readonly deductionsAmount?: number; /** * Format: double * @description Valor do desconto incondicionado */ readonly discountUnconditionedAmount?: number; /** * Format: double * @description Valor do desconto condicionado */ readonly discountConditionedAmount?: number; /** * Format: double * @description Valor retido do Imposto de Renda (IR) */ readonly irAmountWithheld?: number; /** * Format: double * @description Valor retido do PIS */ readonly pisAmountWithheld?: number; /** * Format: double * @description Valor retido do COFINS */ readonly cofinsAmountWithheld?: number; /** * Format: double * @description Valor retido do CSLL */ readonly csllAmountWithheld?: number; /** * Format: double * @description Valor retido do INSS */ readonly inssAmountWithheld?: number; /** * Format: double * @description Valor retido do ISS */ readonly issAmountWithheld?: number; /** * Format: double * @description Valor de outras retenções */ readonly othersAmountWithheld?: number; /** @description Tributos aproximados */ readonly approximateTax?: { /** @description Nome da fonte da taxa */readonly source?: string; /** @description Versão da taxa baseado na fonte */ readonly version?: string; /** * Format: double * @description Taxa dos tributos aproximados */ readonly totalRate?: number; }; /** @description Informações Adicionais */ readonly additionalInformation?: string; /** @description Local da Prestação do Serviço */ readonly location?: { /** @description Estado */readonly state?: string; /** @description País */ readonly country?: string; /** @description Código Postal */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número */ readonly number?: string; /** @description Bairro */ readonly district?: string; /** @description Informações Adicionais (Complemento) */ readonly AdditionalInformation?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; }; /** @description Detalhes da atividade do evento */ readonly activityEvent?: { /** @description Nome do evento */readonly name?: string; /** * Format: date-time * @description Data de início do evento */ readonly beginOn?: string; /** * Format: date-time * @description Data do fim do evento */ readonly endOn?: string; /** @description Código da atividade do evento */ readonly Code?: string; }; }; }; }; readonly responses: { /** @description Nota Fiscal de Serviços foi enviada com sucesso para fila de emissão */readonly 202: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Identificação */readonly id?: string; /** * @description Ambiente de Processamento * @enum {string} */ readonly environment: "Development" | "Production" | "Staging"; /** * @description Status do processamento * @enum {string} */ readonly flowStatus?: "CancelFailed" | "IssueFailed" | "Issued" | "Cancelled" | "PullFromCityHall" | "WaitingCalculateTaxes" | "WaitingDefineRpsNumber" | "WaitingSend" | "WaitingSendCancel" | "WaitingReturn" | "WaitingDownload"; /** @description Mensagem de processamento */ readonly flowMessage?: string; /** @description Prestador dos serviços */ readonly provider?: { /** @description Nome Fantasia */readonly tradeName?: string; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature?: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber?: string; /** * Format: double * @description Taxa da Aliquota do ISS (Simples Nacional) */ readonly issRate?: number; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email?: string; /** @description Endere o */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number?: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; /** @description Tomador dos serviços */ readonly borrower?: { readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Telefone */ readonly phoneNumber?: string; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number?: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; /** @description Identificação única do cliente */ readonly externalId?: string; /** * Format: int64 * @description Número do lote da RPS */ readonly batchNumber?: number; /** @description Número do protocolo do lote da RPS */ readonly batchCheckNumber?: string; /** * Format: int64 * @description Número do NFE */ readonly number?: number; /** @description Código de Verificação da NFE */ readonly checkCode?: string; /** * @description Status da NFE * @enum {string} */ readonly status?: "Error" | "None" | "Created" | "Issued" | "Cancelled"; /** * @description Tipo da RPS * @enum {string} */ readonly rpsType?: "Rps" | "RpsMista" | "Cupom"; /** * @description Status da RPS * @enum {string} */ readonly rpsStatus?: "Normal" | "Canceled" | "Lost"; /** * @description Tipo da tributação * @enum {string} */ readonly taxationType?: "None" | "WithinCity" | "OutsideCity" | "Export" | "Free" | "Immune" | "SuspendedCourtDecision" | "SuspendedAdministrativeProcedure" | "OutsideCityFree" | "OutsideCityImmune" | "OutsideCitySuspended" | "OutsideCitySuspendedAdministrativeProcedure" | "ObjectiveImune"; /** * Format: date-time * @description Data de emissão */ readonly issuedOn?: string; /** * Format: date-time * @description Data de cancelamento */ readonly cancelledOn?: string; /** @description Número de serie da RPS */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description Número da RPS */ readonly rpsNumber?: number; /** @description Código do servico prestado no Municipio */ readonly cityServiceCode?: string; /** @description Código do servico prestado federal */ readonly federalServiceCode?: string; /** @description Descrição do serviço no municipio */ readonly description?: string; /** * Format: double * @description Valor do serviços */ readonly servicesAmount?: number; /** * Format: double * @description Valor de deduções */ readonly deductionsAmount?: number; /** * Format: double * @description Valor do desconto incondicionado */ readonly discountUnconditionedAmount?: number; /** * Format: double * @description Valor do desconto condicionado */ readonly discountConditionedAmount?: number; /** * Format: double * @description Valor da base de calculo de impostos */ readonly baseTaxAmount?: number; /** * Format: double * @description Aliquota do ISS */ readonly issRate?: number; /** * Format: double * @description Valor do ISS */ readonly issTaxAmount?: number; /** * Format: double * @description Valor retido do Imposto de Renda (IR) */ readonly irAmountWithheld?: number; /** * Format: double * @description Valor retido do PIS */ readonly pisAmountWithheld?: number; /** * Format: double * @description Valor retido do COFINS */ readonly cofinsAmountWithheld?: number; /** * Format: double * @description Valor retido do CSLL */ readonly csllAmountWithheld?: number; /** * Format: double * @description Valor retido do INSS */ readonly inssAmountWithheld?: number; /** * Format: double * @description Valor retido do ISS */ readonly issAmountWithheld?: number; /** * Format: double * @description Valor de outras retenções */ readonly othersAmountWithheld?: number; /** * Format: double * @description Valor das retenções */ readonly amountWithheld?: number; /** * Format: double * @description Valor líquido */ readonly amountNet?: number; /** @description Local da Prestação do Serviço */ readonly location?: { /** @description Estado */readonly state?: string; /** @description País */ readonly country?: string; /** @description Código Postal */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número */ readonly number?: string; /** @description Bairro */ readonly district?: string; /** @description Informações Adicionais (Complemento) */ readonly AdditionalInformation?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; }; /** @description Detalhes da atividade do evento */ readonly activityEvent?: { /** @description Nome do evento */readonly name?: string; /** * Format: date-time * @description Data de início do evento */ readonly beginOn?: string; /** * Format: date-time * @description Data do fim do evento */ readonly endOn?: string; /** @description Código da atividade do evento */ readonly Code?: string; }; /** @description Tributos aproximados */ readonly approximateTax?: { /** @description Nome da fonte da taxa */readonly source?: string; /** @description Versão da taxa baseado na fonte */ readonly version?: string; /** * Format: double * @description Taxa dos tributos aproximados */ readonly totalRate?: number; }; /** @description Informações Adicionais */ readonly additionalInformation?: string; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Tempo de reposta do servidor excedeu o limite (60s) */ readonly 408: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_externalIdGet: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID externo da Nota Fiscal de Serviço (NFSE) */ readonly externalId: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Identificação */readonly id?: string; /** * @description Ambiente de Processamento * @enum {string} */ readonly environment: "Development" | "Production" | "Staging"; /** * @description Status do processamento * @enum {string} */ readonly flowStatus?: "CancelFailed" | "IssueFailed" | "Issued" | "Cancelled" | "PullFromCityHall" | "WaitingCalculateTaxes" | "WaitingDefineRpsNumber" | "WaitingSend" | "WaitingSendCancel" | "WaitingReturn" | "WaitingDownload"; /** @description Mensagem de processamento */ readonly flowMessage?: string; /** @description Prestador dos serviços */ readonly provider?: { /** @description Nome Fantasia */readonly tradeName?: string; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature?: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber?: string; /** * Format: double * @description Taxa da Aliquota do ISS (Simples Nacional) */ readonly issRate?: number; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; /** @description Tomador dos serviços */ readonly borrower?: { readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Telefone */ readonly phoneNumber?: string; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; /** @description Identificação única do cliente */ readonly externalId?: string; /** * Format: int64 * @description Número do lote da RPS */ readonly batchNumber?: number; /** @description Número do protocolo do lote da RPS */ readonly batchCheckNumber?: string; /** * Format: int64 * @description Número do NFE */ readonly number?: number; /** @description Código de Verificação da NFE */ readonly checkCode?: string; /** * @description Status da NFE * @enum {string} */ readonly status?: "Error" | "None" | "Created" | "Issued" | "Cancelled"; /** * @description Tipo da RPS * @enum {string} */ readonly rpsType?: "Rps" | "RpsMista" | "Cupom"; /** * @description Status da RPS * @enum {string} */ readonly rpsStatus?: "Normal" | "Canceled" | "Lost"; /** * @description Tipo da tributação * @enum {string} */ readonly taxationType?: "None" | "WithinCity" | "OutsideCity" | "Export" | "Free" | "Immune" | "SuspendedCourtDecision" | "SuspendedAdministrativeProcedure" | "OutsideCityFree" | "OutsideCityImmune" | "OutsideCitySuspended" | "OutsideCitySuspendedAdministrativeProcedure" | "ObjectiveImune"; /** * Format: date-time * @description Data de emissão */ readonly issuedOn?: string; /** * Format: date-time * @description Data de cancelamento */ readonly cancelledOn?: string; /** @description Número de serie da RPS */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description Número da RPS */ readonly rpsNumber?: number; /** @description Código do servico prestado no Municipio */ readonly cityServiceCode?: string; /** @description Código do servico prestado federal */ readonly federalServiceCode?: string; /** @description Descrição do serviço no municipio */ readonly description?: string; /** * Format: double * @description Valor do serviços */ readonly servicesAmount?: number; /** * Format: double * @description Valor de deduções */ readonly deductionsAmount?: number; /** * Format: double * @description Valor do desconto incondicionado */ readonly discountUnconditionedAmount?: number; /** * Format: double * @description Valor do desconto condicionado */ readonly discountConditionedAmount?: number; /** * Format: double * @description Valor da base de calculo de impostos */ readonly baseTaxAmount?: number; /** * Format: double * @description Aliquota do ISS */ readonly issRate?: number; /** * Format: double * @description Valor do ISS */ readonly issTaxAmount?: number; /** * Format: double * @description Valor retido do Imposto de Renda (IR) */ readonly irAmountWithheld?: number; /** * Format: double * @description Valor retido do PIS */ readonly pisAmountWithheld?: number; /** * Format: double * @description Valor retido do COFINS */ readonly cofinsAmountWithheld?: number; /** * Format: double * @description Valor retido do CSLL */ readonly csllAmountWithheld?: number; /** * Format: double * @description Valor retido do INSS */ readonly inssAmountWithheld?: number; /** * Format: double * @description Valor retido do ISS */ readonly issAmountWithheld?: number; /** * Format: double * @description Valor de outras retenções */ readonly othersAmountWithheld?: number; /** * Format: double * @description Valor das retenções */ readonly amountWithheld?: number; /** * Format: double * @description Valor líquido */ readonly amountNet?: number; /** @description Local da Prestação do Serviço */ readonly location?: { /** @description Estado */readonly state?: string; /** @description País */ readonly country?: string; /** @description Código Postal */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número */ readonly number?: string; /** @description Bairro */ readonly district?: string; /** @description Informações Adicionais (Complemento) */ readonly AdditionalInformation?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; }; /** @description Detalhes da atividade do evento */ readonly activityEvent?: { /** @description Nome do evento */readonly name?: string; /** * Format: date-time * @description Data de início do evento */ readonly beginOn?: string; /** * Format: date-time * @description Data do fim do evento */ readonly endOn?: string; /** @description Código da atividade do evento */ readonly Code?: string; }; /** @description Tributos aproximados */ readonly approximateTax?: { /** @description Nome da fonte da taxa */readonly source?: string; /** @description Versão da taxa baseado na fonte */ readonly version?: string; /** * Format: double * @description Taxa dos tributos aproximados */ readonly totalRate?: number; }; /** @description Informações Adicionais */ readonly additionalInformation?: string; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_idGet: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da Nota Fiscal de Serviço (NFSE) */ readonly id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Identificação */readonly id?: string; /** * @description Ambiente de Processamento * @enum {string} */ readonly environment: "Development" | "Production" | "Staging"; /** * @description Status do processamento * @enum {string} */ readonly flowStatus?: "CancelFailed" | "IssueFailed" | "Issued" | "Cancelled" | "PullFromCityHall" | "WaitingCalculateTaxes" | "WaitingDefineRpsNumber" | "WaitingSend" | "WaitingSendCancel" | "WaitingReturn" | "WaitingDownload"; /** @description Mensagem de processamento */ readonly flowMessage?: string; /** @description Prestador dos serviços */ readonly provider?: { /** @description Nome Fantasia */readonly tradeName?: string; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string; /** * @description Tipo do Regime Tributário * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** * @description Tipo do regime especial de tributação * @enum {string} */ readonly specialTaxRegime?: "Automatico" | "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte"; /** * @description Código da Natureza Jurídica * @enum {string} */ readonly legalNature?: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Atividades da Empresa */ readonly economicActivities?: readonly { /** @enum {string} */readonly type?: "Main" | "Secondary"; /** Format: int32 */ readonly code?: number; }[]; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number; /** @description Número de Inscrição na Prefeitura (CCM) */ readonly municipalTaxNumber?: string; /** * Format: double * @description Taxa da Aliquota do ISS (Simples Nacional) */ readonly issRate?: number; /** * @description Determinação de imposto federal * @enum {string} */ readonly federalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** * @description Determinação de imposto municipal * @enum {string} */ readonly municipalTaxDetermination?: "NotInformed" | "Default" | "SimplesNacional"; /** @description Nome de login */ readonly loginName?: string; /** @description Senha de login */ readonly loginPassword?: string; /** @description Valor de emissão de autorização */ readonly authIssueValue?: string; readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; /** @description Tomador dos serviços */ readonly borrower?: { readonly parentId?: string; /** @description Identificação */ readonly id?: string; /** @description Nome ou Razão Social */ readonly name?: string; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number; /** @description Telefone */ readonly phoneNumber?: string; /** @description Email */ readonly email?: string; /** @description Endereço */ readonly address?: { /** * @description Sigla do País (padrão ISO 3166-1 mais em http://bit.ly/1OgCkxd) * Exemplo: BRA, USD, ARG */ readonly country: string; /** @description CEP (Exemplo: 99999-999) */ readonly postalCode?: string; /** @description Logradouro */ readonly street: string; /** @description Número (Exemplo: 185 ou S/N) */ readonly number: string; /** @description Complemento (Exemplo: BLC A; APT 10 */ readonly additionalInformation?: string; /** @description Bairro */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; /** @description Estado */ readonly state?: string; }; /** * @description Status no sistema * @enum {string} */ readonly status?: "Inactive" | "None" | "Active"; /** * @description Tipo da pessoa: Jurídica ou Física * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity" | "LegalPerson" | "Company" | "Customer"; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; /** @description Identificação única do cliente */ readonly externalId?: string; /** * Format: int64 * @description Número do lote da RPS */ readonly batchNumber?: number; /** @description Número do protocolo do lote da RPS */ readonly batchCheckNumber?: string; /** * Format: int64 * @description Número do NFE */ readonly number?: number; /** @description Código de Verificação da NFE */ readonly checkCode?: string; /** * @description Status da NFE * @enum {string} */ readonly status?: "Error" | "None" | "Created" | "Issued" | "Cancelled"; /** * @description Tipo da RPS * @enum {string} */ readonly rpsType?: "Rps" | "RpsMista" | "Cupom"; /** * @description Status da RPS * @enum {string} */ readonly rpsStatus?: "Normal" | "Canceled" | "Lost"; /** * @description Tipo da tributação * @enum {string} */ readonly taxationType?: "None" | "WithinCity" | "OutsideCity" | "Export" | "Free" | "Immune" | "SuspendedCourtDecision" | "SuspendedAdministrativeProcedure" | "OutsideCityFree" | "OutsideCityImmune" | "OutsideCitySuspended" | "OutsideCitySuspendedAdministrativeProcedure" | "ObjectiveImune"; /** * Format: date-time * @description Data de emissão */ readonly issuedOn?: string; /** * Format: date-time * @description Data de cancelamento */ readonly cancelledOn?: string; /** @description Número de serie da RPS */ readonly rpsSerialNumber?: string; /** * Format: int64 * @description Número da RPS */ readonly rpsNumber?: number; /** @description Código do servico prestado no Municipio */ readonly cityServiceCode?: string; /** @description Código do servico prestado federal */ readonly federalServiceCode?: string; /** @description Descrição do serviço no municipio */ readonly description?: string; /** * Format: double * @description Valor do serviços */ readonly servicesAmount?: number; /** * Format: double * @description Valor de deduções */ readonly deductionsAmount?: number; /** * Format: double * @description Valor do desconto incondicionado */ readonly discountUnconditionedAmount?: number; /** * Format: double * @description Valor do desconto condicionado */ readonly discountConditionedAmount?: number; /** * Format: double * @description Valor da base de calculo de impostos */ readonly baseTaxAmount?: number; /** * Format: double * @description Aliquota do ISS */ readonly issRate?: number; /** * Format: double * @description Valor do ISS */ readonly issTaxAmount?: number; /** * Format: double * @description Valor retido do Imposto de Renda (IR) */ readonly irAmountWithheld?: number; /** * Format: double * @description Valor retido do PIS */ readonly pisAmountWithheld?: number; /** * Format: double * @description Valor retido do COFINS */ readonly cofinsAmountWithheld?: number; /** * Format: double * @description Valor retido do CSLL */ readonly csllAmountWithheld?: number; /** * Format: double * @description Valor retido do INSS */ readonly inssAmountWithheld?: number; /** * Format: double * @description Valor retido do ISS */ readonly issAmountWithheld?: number; /** * Format: double * @description Valor de outras retenções */ readonly othersAmountWithheld?: number; /** * Format: double * @description Valor das retenções */ readonly amountWithheld?: number; /** * Format: double * @description Valor líquido */ readonly amountNet?: number; /** @description Local da Prestação do Serviço */ readonly location?: { /** @description Estado */readonly state?: string; /** @description País */ readonly country?: string; /** @description Código Postal */ readonly postalCode?: string; /** @description Logradouro */ readonly street?: string; /** @description Número */ readonly number?: string; /** @description Bairro */ readonly district?: string; /** @description Informações Adicionais (Complemento) */ readonly AdditionalInformation?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE */readonly code?: string; /** @description Nome */ readonly name?: string; }; }; /** @description Detalhes da atividade do evento */ readonly activityEvent?: { /** @description Nome do evento */readonly name?: string; /** * Format: date-time * @description Data de início do evento */ readonly beginOn?: string; /** * Format: date-time * @description Data do fim do evento */ readonly endOn?: string; /** @description Código da atividade do evento */ readonly Code?: string; }; /** @description Tributos aproximados */ readonly approximateTax?: { /** @description Nome da fonte da taxa */readonly source?: string; /** @description Versão da taxa baseado na fonte */ readonly version?: string; /** * Format: double * @description Taxa dos tributos aproximados */ readonly totalRate?: number; }; /** @description Informações Adicionais */ readonly additionalInformation?: string; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string; }; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_Delete: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da Nota Fiscal de Serviço (NFSE) */ readonly id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Nota fiscal cancelada com sucesso */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": string; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Tempo de reposta do servidor excedeu o limite (60s) */ readonly 408: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_SendEmail: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da Nota Fiscal de Serviço (NFSE) */ readonly id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": string; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Tempo de reposta do servidor excedeu o limite (60s) */ readonly 408: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_GetDocumentPdf: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da Nota Fiscal de Serviço (NFSE) */ readonly id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": string; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Não foi possivel o download */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Tempo de reposta do servidor excedeu o limite (60s) */ readonly 408: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly ServiceInvoices_GetDocumentXml: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID da empresa */readonly company_id: string; /** @description ID da Nota Fiscal de Serviço (NFSE) */ readonly id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na requisição */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": string; }; }; /** @description Algum parametro informado não é válido */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description API Key da conta não é valida */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Não foi possivel o download */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Tempo de reposta do servidor excedeu o limite (60s) */ readonly 408: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly RegistrationLookupAction: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path: { /** @description ID do webhook a ser consultado */readonly webhook_id: string; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Sucesso na consulta do webhook */readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description WebHook (Notificação HTTP) */readonly webHook?: { /** * @description ID exclusivo do WebHook. Este ID pode ser usado para se referir mais tarde ao WebHook no caso de * precisa ser atualizado ou excluído. O ID é, por padrão, na forma de um GUID. */ readonly id?: string; /** @description A URL onde as notificações dos eventos deverão entregues. */ readonly uri: string; /** * @description Segredo, contendo de 32 até 64 caracteres que será usado gerar o valor * do **HMAC-SHA1** em hexadecimal que será enviado no cabeçalho HTTP *X-Hub-Signature*. * O HMAC-SHA1 será gerado baseado no bytes do corpo do evento de notificação que será enviado. */ readonly secret?: string; /** * Format: int32 * @description WebHook Media Type * @enum {integer} */ readonly contentType?: 0 | 1; /** * @description Determina se o certificado SSL do host da URL será verificado ao entregar as notificações dos eventos. * Defina como **true** para pular a verificação do certificado SSL, sendo o padrão: **false**. */ readonly insecureSsl?: boolean; /** * Format: int32 * @description WebHook Status * @enum {integer} */ readonly status?: 0 | 1; /** * @description Lista de filtros sem distinção entre maiúsculas e minúsculas associado a este webhook. * Os filtros são usados para determinar em quais notificações dos eventos esse WebHook será notificado. * Os valores de filtros suportados pode ser consultados através do requisição do **Tipos de Eventos**. */ readonly filters?: readonly string[]; /** @description Lista de cabeçalhos HTTP adicionais que serão enviados juntamente com as notificações dos eventos para o webhook. */ readonly headers?: { readonly [key: string]: string; }; /** * @description Lista de propriedades adicionais que não diferenciam maiúsculas de minúsculas que serão enviadas * juntamente com as notificações dos eventos para o webhook como parte do corpo da entidade de solicitação HTTP. */ readonly properties?: { readonly [key: string]: unknown; }; /** * Format: date-time * @description Data de criação do webhook */ readonly createdOn?: string; /** * Format: date-time * @description Data de modificação do webhook */ readonly modifiedOn?: string; }; }; }; }; /** @description Algum parametro informado não é válido, verificar resposta */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Lista de Erros */readonly errors?: readonly { /** * Format: int32 * @description Código do erro */ readonly code?: number; /** @description Mensagem contendo os detalhes do erro */ readonly message?: string; }[]; }; }; }; /** @description Não autorizado, verificar o cabeçalho do HTTP Authorization */ readonly 401: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Accesso proibido */ readonly 403: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Webhook não encontrado */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Erro no processamento */ readonly 500: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Lista de Erros */readonly errors?: readonly { /** * Format: int32 * @description Código do erro */ readonly code?: number; /** @description Mensagem contendo os detalhes do erro */ readonly message?: string; }[]; }; }; }; }; }; } //#endregion //#region src/generated/consulta-cte-v2.d.ts interface components$4 { schemas: { /** * Format: int32 * @enum {integer} */ readonly "DFe.NetCore.Domain.Enums.EntityStatus": 0 | 1 | -1; /** * Format: int32 * @enum {integer} */ readonly "DFe.NetCore.Domain.Enums.MetadataResourceType": 0 | 1 | 2 | 3 | 4 | 5; readonly "DFe.NetCore.Domain.Resources.CompanyResource": { readonly id?: string | null; readonly federalTaxNumber?: string | null; readonly state?: string | null; readonly stateTaxNumber?: string | null; }; readonly "DFe.NetCore.Domain.Resources.EnableInboundProductInvoiceResource": { /** Format: int64 */readonly startFromNsu?: number; /** Format: date-time */ readonly startFromDate?: string; readonly automaticManifesting?: components$4["schemas"]["DFe.NetCore.Domain.Resources.ManifestAutomaticRulesResource"]; }; readonly "DFe.NetCore.Domain.Resources.EnableTransportationInvoiceInboundResource": { /** Format: int64 */readonly startFromNsu?: number; /** Format: date-time */ readonly startFromDate?: string; }; readonly "DFe.NetCore.Domain.Resources.ManifestAutomaticRulesResource": { /** Format: int32 */readonly minutesToWaitAwarenessOperation?: number; }; readonly "DFe.NetCore.Domain.Resources.MetadataResource": { readonly id?: string | null; /** Format: date-time */ readonly createdOn?: string | null; readonly accessKey?: string | null; readonly parentAccessKey?: string | null; readonly productInvoices?: readonly components$4["schemas"]["DFe.NetCore.Domain.Resources.ProductInvoiceResource"][] | null; readonly company?: components$4["schemas"]["DFe.NetCore.Domain.Resources.CompanyResource"]; readonly type?: components$4["schemas"]["DFe.NetCore.Domain.Enums.MetadataResourceType"]; /** Format: int64 */ readonly nsu?: number; /** Format: date-time */ readonly issuedOn?: string | null; readonly description?: string | null; readonly xmlUrl?: string | null; readonly federalTaxNumberSender?: string | null; readonly nameSender?: string | null; readonly totalInvoiceAmount?: string | null; }; readonly "DFe.NetCore.Domain.Resources.ProductInvoiceInboundResource": { /** Format: int64 */readonly startFromNsu?: number; /** Format: date-time */ readonly startFromDate?: string; readonly automaticManifesting?: components$4["schemas"]["DFe.NetCore.Domain.Resources.ManifestAutomaticRulesResource"]; readonly companyId?: string | null; readonly status?: components$4["schemas"]["DFe.NetCore.Domain.Enums.EntityStatus"]; /** Format: date-time */ readonly createdOn?: string; /** Format: date-time */ readonly modifiedOn?: string | null; }; readonly "DFe.NetCore.Domain.Resources.ProductInvoiceResource": { readonly accessKey?: string | null; }; readonly "DFe.NetCore.Domain.Resources.TransportationInvoiceInboundResource": { /** Format: int64 */readonly startFromNsu?: number; /** Format: date-time */ readonly startFromDate?: string; readonly companyId?: string | null; readonly status?: components$4["schemas"]["DFe.NetCore.Domain.Enums.EntityStatus"]; /** Format: date-time */ readonly createdOn?: string; /** Format: date-time */ readonly modifiedOn?: string | null; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } //#endregion //#region src/generated/service-invoice-rtc-v1.d.ts interface components$3 { schemas: { /** Nota Fiscal de Serviço (NFSe) Schema */readonly NFSeRequest: { /** @description Identificação única do cliente */readonly externalId?: string; /** @description Código do serviço no municipio */ readonly cityServiceCode: string; /** @description Código federal do servico (Item da lista de serviço LC 116) (CodigoServico, tpCodigoServico) */ readonly federalServiceCode?: string; /** @description Descrição dos serviços (Discriminacao, tpDiscriminacao) */ readonly description: string; /** @description Valor do serviços (ValorServicos - V1.0 SP) - Valor total dos serviços (tpValor) */ readonly servicesAmount: number; /** @description Código do NBS no municipio (somente quando necessario na cidade) (NBS, tpCodigoNBS) */ readonly nbsCode: string; /** @description Código CNAE (somente quando necessario na cidade) */ readonly cnaeCode?: string; /** @description Código NCM (Nomenclatura Comum do Mercosul) (NCM, tpCodigoNCM) */ readonly ncmCode?: string; /** @description Valor dos Serviços pago (Valor Total Recebido, tpValor) */ readonly paidAmount?: number; /** * Format: date-time * @description Data da emissão no formato YYYY-MM-DDTHH:MM:SS.SSSSSS-03:00 (dhEmi, DataEmissaoNFe). * **Automático**: Se não for informado, o sistema utilizará a data e hora atuais no momento do processamento. */ readonly issuedOn?: string; /** * Format: date * @description Data da competência da prestação do serviço no formato AAAA-MM-DD (Competencia). * **Automático**: Se não for informado, o sistema utilizará a data do campo `issuedOn`. */ readonly accrualOn?: string; /** * @description Número de Série da RPS (SerieRPS, serie, tpSerieRPS). * **Prioridade**: Se informado, o valor enviado será utilizado. * **Automático**: Se não for informado, o sistema utilizará o valor definido no cadastro da empresa. */ readonly rpsSerialNumber?: string; /** * @description Número da RPS (NumeroRPS, nDPS, tpNumero). * **Prioridade**: Se informado, o valor enviado será utilizado. * **Automático**: Se não for informado, o sistema utilizará o próximo número da sequência automática. */ readonly rpsNumber?: number; /** * @description **Tipo de Tributação (taxationType)** * * O campo `taxationType` define o regime de tributação do **ISSQN (Imposto Sobre Serviços de Qualquer Natureza)**. Ele é um campo legado, mantido para compatibilidade com os layouts municipais existentes, como o da Prefeitura de São Paulo, e continua sendo fundamental para o cálculo do ISS durante o período de transição da Reforma Tributária. * * **Finalidade Principal (Contexto do ISSQN):** * * Este campo indica ao sistema como o ISSQN deve ser tratado na operação. Com base no valor selecionado (ex: `WithinCity`, `OutsideCity`, `Immune`), o sistema determina se o ISSQN é devido, se a tributação ocorrerá dentro ou fora do município, ou se a operação é isenta ou imune a este imposto específico. * * **Relação com a Reforma Tributária (IBS/CBS):** * * É crucial entender que o `taxationType` **não se aplica aos novos tributos (IBS e CBS)**. Para a apuração do IBS e da CBS, as regras de tributação e o local de incidência são definidos exclusivamente pelos campos dentro do grupo `IbsCbs`, como o `operationIndicator` e o `classCode`. * * **Em resumo:** * * **`taxationType`**: Governa o comportamento do **ISSQN**. * * **`ibsCbs`**: Governa o comportamento do **IBS e da CBS**. * * Durante o período de transição, ambos os sistemas de tributação coexistirão, tornando o preenchimento correto de todos esses campos essencial para a conformidade fiscal da nota. * * --- * * Tipo da tributação (TributacaoRPS, tpTributacaoNFe). * Valores possíveis: * - `None`: Nenhuma * - `WithinCity`: Tributação no município * - `OutsideCity`: Tributação fora do município * - `Export`: Exportação * - `Free`: Isenta * - `Immune`: Imune * - `SuspendedCourtDecision`: Exigibilidade suspensa por decisão judicial * - `SuspendedAdministrativeProcedure`: Exigibilidade suspensa por procedimento administrativo * - `OutsideCityFree`: Isenta e fora do município * - `OutsideCityImmune`: Imune e fora do município * - `OutsideCitySuspended`: Suspensa e fora do município * - `OutsideCitySuspendedAdministrativeProcedure`: Suspensa por processo administrativo e fora do município * - `ObjectiveImune`: Imunidade Objetiva * @default WithinCity * @enum {string} */ readonly taxationType: "None" | "WithinCity" | "OutsideCity" | "Export" | "Free" | "Immune" | "SuspendedCourtDecision" | "SuspendedAdministrativeProcedure" | "OutsideCityFree" | "OutsideCityImmune" | "OutsideCitySuspended" | "OutsideCitySuspendedAdministrativeProcedure" | "ObjectiveImune"; /** * @description Alíquota do ISS (pAliq, tpAliquota). * **Automático**: Se não for informado, o sistema utilizará o valor definido no cadastro do código de serviço. */ readonly issRate?: number; /** * @description Valor do ISS (ValorISS, tpValor). * **Automático**: Se não for informado, o sistema realizará o cálculo automático. */ readonly issTaxAmount?: number; /** * @description **Deduções: Simples vs. Estruturado (`deductionsAmount` vs. `deduction`)** * * O layout oferece duas formas de registrar deduções da base de cálculo do ISSQN, visando flexibilidade e conformidade com os diferentes padrões (municipal legado vs. nacional). * * * **`deductionsAmount` (Valor Simples):** * Um campo numérico para informar o **valor total consolidado** das deduções. É uma abordagem direta, compatível com layouts mais antigos que não exigem o detalhamento dos documentos que comprovam a dedução. * * * **`deduction` (Grupo Estruturado):** * Um objeto complexo que permite justificar cada dedução com base em documentos fiscais, alinhando-se ao **padrão da NFS-e Nacional**. Ele detalha a origem de cada valor (chave do documento, tipo, valor, fornecedor). * * **Relação e Recomendação:** * A coexistência dos campos oferece compatibilidade. `deductionsAmount` é uma opção simplificada, enquanto o grupo `deduction` é a forma mais completa e recomendada para garantir rastreabilidade e conformidade fiscal com o padrão nacional. O sistema de emissão priorizará os dados detalhados do grupo `deduction`, se fornecidos. * * **Recomendação de Uso:** * * Use `deductionsAmount` para integrações simples ou quando não há detalhamento dos documentos. * * Use o grupo `deduction` sempre que a informação detalhada dos documentos estiver disponível para garantir a máxima conformidade. * * --- * * Valor de deduções (vDR, tpValor). */ readonly deductionsAmount?: number; /** @description Valor do desconto incondicionado (vDescIncond, tpValor). */ readonly discountUnconditionedAmount?: number; /** @description Valor do desconto condicionado (vDescCond, tpValor). */ readonly discountConditionedAmount?: number; /** * @description Valor retido do Imposto de Renda (IR) (vRetIRRF, tpValor). * **Automático**: Se não for informado, o sistema realizará o cálculo automático. */ readonly irAmountWithheld?: number; /** * @description Código de Situação Tributária do PIS/COFINS (CST). * Valores: * - `00`: Nenhum * - `01`: Operação Tributável com Alíquota Básica * - `02`: Operação Tributável com Alíquota Diferenciada * - `03`: Operação Tributável com Alíquota por Unidade de Medida de Produto * - `04`: Operação Tributável monofásica - Revenda a Alíquota Zero * - `05`: Operação Tributável por Substituição Tributária * - `06`: Operação Tributável a Alíquota Zero * - `07`: Operação Tributável da Contribuição * - `08`: Operação sem Incidência da Contribuição * - `09`: Operação com Suspensão da Contribuição * @enum {string} */ readonly cstPisCofins?: "00" | "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09"; /** @description Base de cálculo para o Pis e Cofins (vBCPisCofins, tpValor). */ readonly pisCofinsBaseTax?: number; /** * @description Alíquota do PIS (pAliqPis). * **Automático**: Se não for informado, o sistema utilizará o valor definido no cadastro do código de serviço. */ readonly pisRate?: number; /** @description Valor do PIS (vPis, tpValor). Campo utilizado para informar o valor do PIS, porém sem retenção. */ readonly pisAmount?: number; /** * @description Valor retido do PIS (vPis, tpValor). * **Automático**: Se não for informado, o sistema realizará o cálculo automático. */ readonly pisAmountWithheld?: number; /** * @description Alíquota do COFINS (pAliqCofins). * **Automático**: Se não for informado, o sistema utilizará o valor definido no cadastro do código de serviço. */ readonly cofinsRate?: number; /** @description Valor do COFINS (vCofins, tpValor). Campo utilizado para informar o valor do COFINS, porém sem retenção. */ readonly cofinsAmount?: number; /** * @description Valor retido do COFINS (vCofins, tpValor). * **Automático**: Se não for informado, o sistema realizará o cálculo automático. */ readonly cofinsAmountWithheld?: number; /** @description Valor do CSLL (vCSLL, tpValor). Campo utilizado para informar o valor do CSLL, porém sem retenção. */ readonly csllAmount?: number; /** @description Alíquota do CSLL (pAliqCSLL). */ readonly csllRate?: number; /** * @description Valor retido do CSLL (vRetCSLL, tpValor). * **Automático**: Se não for informado, o sistema realizará o cálculo automático. */ readonly csllAmountWithheld?: number; /** * @description Valor retido do INSS (vRetCP, tpValor). * **Automático**: Se não for informado, o sistema realizará o cálculo automático. */ readonly inssAmountWithheld?: number; /** * @description Valor retido do ISS (vISSQN). * **Automático**: Se não for informado, o sistema realizará o cálculo automático quando houver retenção de ISS. */ readonly issAmountWithheld?: number; /** * @description SP - Alíquota IPI (pAliqIPI, tpAliquota). * **Automático**: Se não for informado, o sistema utilizará o valor definido no cadastro do código de serviço. */ readonly ipiRate?: number; /** * @description SP - Valor IPI (vIPI, tpValor). * **Automático**: Se não for informado, o sistema realizará o cálculo automático. */ readonly ipiAmount?: number; /** @description Valor de outras retenções (vOutrasRet, tpValor). */ readonly othersAmountWithheld?: number; /** * @description **Informações Adicionais: Simples vs. Estruturado (`additionalInformation` vs. `additionalInformationGroup`)** * * O layout oferece duas formas de enviar informações complementares, visando flexibilidade e completude. * * * **`additionalInformation` (Texto Simples):** * Um campo de `string` para adicionar qualquer observação em formato de texto livre. É ideal para anotações rápidas e genéricas. * * * **`additionalInformationGroup` (Objeto Estruturado):** * Um objeto que organiza dados complementares em campos específicos, como `responsibilityDocumentIdentifier` (ART/RRT), `registrationWork` (Matrícula de Obra), `order` (Pedido), etc. É a forma mais completa e padronizada de enviar esses dados. * * **Comportamento e Relação:** * Para facilitar a integração, o campo `additionalInformation` funciona como um atalho. Se você preencher apenas este campo, seu conteúdo será automaticamente copiado para `additionalInformationGroup.otherInformation`. Isso garante que todas as informações adicionais fiquem consolidadas na estrutura mais completa, mantendo a consistência interna dos dados. * * **Recomendação:** * * Para observações simples, use `additionalInformation`. * * Para dados específicos como ART, Matrícula de Obra, etc., use os campos dedicados dentro de `additionalInformationGroup`. */ readonly additionalInformation?: string; /** * @description **Informações Adicionais: Simples vs. Estruturado (`additionalInformation` vs. `additionalInformationGroup`)** * * O layout oferece duas formas de enviar informações complementares, visando flexibilidade e completude. * * * **`additionalInformation` (Texto Simples):** * Um campo de `string` para adicionar qualquer observação em formato de texto livre. É ideal para anotações rápidas e genéricas. * * * **`additionalInformationGroup` (Objeto Estruturado):** * Um objeto que organiza dados complementares em campos específicos, como `responsibilityDocumentIdentifier` (ART/RRT), `registrationWork` (Matrícula de Obra), `order` (Pedido), etc. É a forma mais completa e padronizada de enviar esses dados. * * **Comportamento e Relação:** * Para facilitar a integração, o campo `additionalInformation` funciona como um atalho. Se você preencher apenas este campo, seu conteúdo será automaticamente copiado para `additionalInformationGroup.otherInformation`. Isso garante que todas as informações adicionais fiquem consolidadas na estrutura mais completa, mantendo a consistência interna dos dados. * * **Recomendação:** * * Para observações simples, use `additionalInformation`. * * Para dados específicos como ART, Matrícula de Obra, etc., use os campos dedicados dentro de `additionalInformationGroup`. */ readonly additionalInformationGroup?: { /** @description Identificador do documento de responsabilidade técnica (ART, RRT, etc.) (idDocTec). */readonly responsibilityDocumentIdentifier?: string; /** @description Documento de referência relacionado ao serviço prestado (docRef). */ readonly referencedDocument?: string; /** @description Número do pedido/ordem de compra/ordem de serviço (xPed). */ readonly order?: string; /** @description Grupo de itens do pedido/ordem de compra/ordem de serviço (gItemPed). */ readonly items?: readonly { /** @description Item do pedido/ordem de compra/ordem de serviço (xItemPed). */readonly item?: string; }[]; /** @description Outras informações complementares (xInfComp). */ readonly otherInformation?: string; }; /** @description Indica se é uma nota fiscal de pagamento parcelado antecipado, realizado antes do fornecimento do serviço. (PagamentoParceladoAntecipado, tpNaoSim) */ readonly isEarlyInstallmentPayment?: boolean; /** * @description **Tipo de Imunidade (immunityType)** * * O campo `immunityType` é condicional e deve ser utilizado **exclusivamente quando o campo `taxationType` for definido como `Immune`**. * * Sua finalidade é especificar a base legal que fundamenta a imunidade tributária do **ISSQN (Imposto Sobre Serviços de Qualquer Natureza)** para a operação. Cada valor disponível no campo corresponde a uma alínea específica do Artigo 150, Inciso VI, da Constituição Federal, que trata das limitações ao poder de tributar. * * **Relação com a Reforma Tributária (IBS/CBS):** * * É fundamental destacar que este campo se refere **apenas à imunidade do ISSQN**. As regras de imunidade para os novos tributos (IBS e CBS) são tratadas de forma separada, dentro do grupo `ibsCbs`, através de códigos específicos no campo `classCode` (ex: códigos iniciados com `41xxxx`). * * **Em resumo:** * A correta especificação do `immunityType` é essencial para validar a justificativa legal da não incidência do ISSQN na nota fiscal, garantindo a conformidade perante as autoridades fiscais municipais durante o período de transição. * * --- * * Tipo de imunidade (tpImunidade) — usar apenas quando taxationMode = 'immunity'. * Valores possíveis: * - `unspecified`: Imunidade (tipo não informado na nota de origem) * - `PublicEntitiesMutual`: Patrimônio, renda ou serviços, uns dos outros (CF88, Art 150, VI, a) * - `Temples`: Templos de qualquer culto (CF88, Art 150, VI, b) * - `PartiesUnionsEducationSocialNonprofit`: Patrimônio, renda ou serviços dos partidos políticos, inclusive suas fundações, das entidades sindicais dos trabalhadores, das instituições de educação e de assistência social, sem fins lucrativos (CF88, Art 150, VI, c) * - `BooksPressPaper`: Livros, jornais, periódicos e o papel destinado a sua impressão (CF88, Art 150, VI, d) * - `BrazilianMusicPhonograms`: Fonogramas e videofonogramas musicais produzidos no Brasil (CF88, Art 150, VI, e) * @enum {string} */ readonly immunityType?: "Unspecified" | "PublicEntitiesMutual" | "Temples" | "PartiesUnionsEducationSocialNonprofit" | "BooksPressPaper" | "BrazilianMusicPhonograms"; /** * @description **Tipo de Retenção do ISSQN (retentionType)** * * O campo `retentionType` determina quem é o responsável pelo recolhimento do **ISSQN (Imposto Sobre Serviços de Qualquer Natureza)**. Ele é um dos campos mais importantes para a correta apuração do ISSQN, pois define a transferência da responsabilidade de pagamento do imposto do prestador para outra parte na operação. * * **Finalidade e Opções:** * * * **`notWithheld` (Não Retido):** Esta é a situação padrão. O **prestador** do serviço é o responsável por calcular e recolher o ISSQN devido. * * **`withheldByBuyer` (Retido pelo Tomador):** A responsabilidade pelo recolhimento do ISSQN é transferida para o **tomador** (cliente/comprador) do serviço. O valor do ISSQN é descontado do total a ser pago ao prestador, e o tomador fica encarregado de repassá-lo ao município. * * **`withheldByIntermediary` (Retido pelo Intermediário):** Em operações que contam com um intermediário (como marketplaces ou agências), a responsabilidade pelo recolhimento do ISSQN é transferida para este **intermediário**. * * **Comportamento Automático vs. Manual:** * * Conforme a descrição do campo, ele possui uma lógica de prioridade: * 1. **Manual:** Se um valor for explicitamente enviado na requisição, ele será utilizado. * 2. **Automático:** Se o campo não for enviado (nulo), o sistema aplicará as regras de cálculo automáticas (baseadas na legislação, local da prestação e cadastro dos envolvidos) para definir se a retenção é aplicável e quem é o responsável. * * **Relação com a Reforma Tributária (IBS/CBS):** * * Assim como outros campos legados, o `retentionType` aplica-se **exclusivamente ao ISSQN**. As regras de retenção e recolhimento para os novos tributos (IBS e CBS) serão definidas por legislação complementar específica e tratadas em outros campos do layout. * * --- * * Tipo de retenção do ISSQN (tpRetISSQN). * Valores possíveis: * - `NotWithheld`: Não Retido * - `WithheldByBuyer`: Retido pelo Tomador * - `WithheldByIntermediary`: Retido pelo Intermediário * * Define o tipo de retenção. Prioridade: Se um valor for enviado na integração, ele será utilizado. Automático: Se o campo não for enviado (nulo), o sistema aplicará a regra de cálculo automática para definir a retenção. * @default NotWithheld * @enum {string} */ readonly retentionType: "NotWithheld" | "WithheldByBuyer" | "WithheldByIntermediary"; /** * @description Tomador dos serviços. * * **Opcional**: o grupo `borrower` pode ser omitido. Quando informado, aplicam-se validações condicionais aos seus campos: * - `name`: se informado, no máximo 115 caracteres; * - `federalTaxNumber`: se informado (diferente de zero), deve ser um CNPJ/CPF válido e coerente com o `type` (`NaturalPerson` → CPF; `LegalEntity` → CNPJ). Para tomador no exterior (`address.country` ≠ `BRA`), não é validado; * - `phoneNumber`: se informado, entre 7 e 20 dígitos; * - `address`: opcional, mas se um endereço **brasileiro** for parcialmente preenchido, passam a ser obrigatórios `postalCode`, `street`, `city.code` (código IBGE de 7 dígitos), `city.name` e `state` (UF de 2 letras), que devem ser consistentes entre si. */ readonly borrower?: components$3["schemas"]["partyDefinition"]; /** * @description Grupo de informações relativas ao intermediário do serviço (interm). * * **Opcional**: pode ser omitido; envie apenas quando houver intermediário na operação (por exemplo, quando a retenção dos tributos é feita pelo intermediário, `issWithheldIndicator = WithheldByIntermediary`). Quando informado, segue a mesma estrutura do `borrower` (ex.: `type`, `federalTaxNumber`, `name`). */ readonly intermediary?: components$3["schemas"]["partyDefinition"]; /** * @description Representa o **Destinatário Final do Serviço**, quando ele é diferente do tomador. Utiliza a estrutura `partyDefinition`. * * **IMPORTANTE**: Quando este objeto for preenchido, é obrigatório informar o valor `DifferentFromBuyer` na propriedade `destinationIndicator` dentro do grupo `ibsCbs`. */ readonly recipient?: components$3["schemas"]["partyDefinition"]; /** @description Local da Prestação do Serviço (cLocPrestacao, cPaisPrestacao) */ readonly location?: components$3["schemas"]["addressDefinition"]; readonly activityEvent?: components$3["schemas"]["activityEvent"]; readonly ReferenceSubstitution?: components$3["schemas"]["ReferenceSubstitution"]; readonly lease?: components$3["schemas"]["lease"]; readonly construction?: components$3["schemas"]["construction"]; /** @description Grupo de informações de operações relacionadas a bens imóveis, exceto obras. (imovel) */ readonly realEstate?: components$3["schemas"]["realEstate"]; readonly foreignTrade?: components$3["schemas"]["foreignTrade"]; readonly deduction?: components$3["schemas"]["deduction"]; readonly benefit?: components$3["schemas"]["benefit"]; readonly suspension?: components$3["schemas"]["suspension"]; /** @description Detalhes dos valores do serviço, incluindo encargos. (RetornoComplementarIBSCBS) */ readonly serviceAmountDetails?: components$3["schemas"]["serviceAmountDefinitions"]; readonly ibsCbs?: components$3["schemas"]["ibsCbs"]; readonly approximateTax?: components$3["schemas"]["approximateTax"]; readonly approximateTotals?: components$3["schemas"]["approximateTotals"]; }; /** @description Definição de endereço reutilizável, alinhada com as estruturas nacionais e complementada para endereços no exterior (tpEnderecoExterior, tpEstadoProvinciaRegiao). */ readonly addressDefinition: { /** * @description Sigla do País (padrão ISO 3166-1). Exemplo: BRA, USD, ARG (country do partyDefinition, cPais da NFS-e NAC). * @default BRA */ readonly country: string; /** @description CEP (Exemplo: 99999-999) ou Código de Endereçamento Postal no exterior (cEndPost). */ readonly postalCode?: string; /** @description Logradouro (xLgr, tpLogradouro) */ readonly street?: string; /** @description Número (Exemplo: 185 ou S/N) (nro, tpNumeroEndereco) */ readonly number?: string; /** @description Complemento (Exemplo: BLC A; APT 10) (xCpl, tpComplementoEndereco) */ readonly additionalInformation?: string; /** @description Bairro (xBairro, tpBairro) */ readonly district?: string; /** @description Cidade */ readonly city?: { /** @description Código do IBGE (cMun, tpCidade) */readonly code?: string; /** @description Nome da Cidade (tpNomeCidade) - Usado para endereços no exterior. */ readonly name?: string; }; /** @description Estado/UF (tpUF) ou Estado, Província, Região no exterior (xEstProvReg, tpEstadoProvinciaRegiao) */ readonly state?: string; }; /** @description Definição reutilizável para um participante (Tomador, Intermediário, Fornecedor). Baseado em partyDefinition da NFSe Nacional, com campos alinhados aos tipos de São Paulo (tpInformacoesPessoa, gpCPFCNPJNIF). */ readonly partyDefinition: { /** * @description Tipo do participante. * Valores possíveis: * - `Undefined`: Não definido * - `NaturalPerson`: Pessoa Física * - `LegalEntity`: Pessoa Jurídica * @enum {string} */ readonly type?: "Undefined" | "NaturalPerson" | "LegalEntity"; /** @description Nome / Razão Social (xNome, tpRazaoSocial), obrigatório quando aplicável (tpRazaoSocialObrigatorio) */ readonly name?: string; /** @description CNPJ, CPF ou NIF (Número de Identificação Fiscal) (tpCNPJ, tpCPF, tpNIF) */ readonly federalTaxNumber?: number; /** @description Inscrição Municipal (tpInscricaoMunicipal, tamanho 8 ou 12 na v2.0 SP) */ readonly municipalTaxNumber?: string; /** @description Inscrição Estadual (Opcional, não se aplica a todos) (tpInscricaoEstadual) */ readonly stateTaxNumber?: string; /** * @description Tipo do Regime Tributário. * Valores possíveis: * - `Isento`: Isento * - `MicroempreendedorIndividual`: Microempreendedor Individual (MEI) * - `SimplesNacional`: Simples Nacional * - `LucroPresumido`: Lucro Presumido * - `LucroReal`: Lucro Real * @enum {string} */ readonly taxRegime?: "Isento" | "MicroempreendedorIndividual" | "SimplesNacional" | "LucroPresumido" | "LucroReal"; /** @description Número do Cadastro de Atividade Econômica da Pessoa Física (CAEPF). */ readonly caepf?: string; /** @description Telefone */ readonly phoneNumber?: string; /** @description Endereço eletrônico (email, tpEmail) */ readonly email?: string; /** * @description Justificativa para ausência de NIF (tpNaoNIF, 0 - Não informado na nota de origem, 1 - Dispensado do NIF, 2 - Não exigência do NIF, além dos padrões nacionais). * Valores possíveis: * - `NotInformedOriginal`: Não informado na nota de origem * - `Exempted`: Dispensado do NIF * - `NotRequired`: Não exigência do NIF * @enum {string} */ readonly noTaxIdReason?: "NotInformedOriginal" | "Exempted" | "NotRequired"; readonly address?: components$3["schemas"]["addressDefinition"]; }; /** @description Detalhes dos valores do serviço, incluindo encargos. (tpRetornoComplementarIBSCBS) */ readonly serviceAmountDefinitions: { /** @description Valor Inicial Cobrado (ValorInicialCobrado) - Valor dos serviços antes de tributos, multa e juros. (Versão 2.0 SP) */readonly initialChargedAmount?: number; /** @description Valor Final Cobrado (ValorFinalCobrado) - Valor total cobrado pela prestação do serviço, incluindo todos os tributos. (Versão 2.0 SP) */ readonly finalChargedAmount?: number; /** @description Valor da Multa (ValorMulta) (Versão 2.0 SP) */ readonly fineAmount?: number; /** @description Valor dos Juros (ValorJuros) (Versão 2.0 SP) */ readonly interestAmount?: number; }; /** @description Detalhes da atividade do evento (atvEvento, tpAtividadeEvento) */ readonly activityEvent: { /** @description Nome do evento (xNomeEvt, tpXNomeEvt) */readonly name?: string; /** * Format: date-time * @description Data de início do evento no formato YYYY-MM-DDTHH:MM:SS.SSSSSS-03:00 (dtiniEvt) */ readonly beginOn?: string; /** * Format: date-time * @description Data do fim do evento no formato YYYY-MM-DDTHH:MM:SS.SSSSSS-03:00 (dtFimEvt) */ readonly endOn?: string; /** @description Código da atividade do evento */ readonly Code?: string; /** @description Endereço do evento (end, tpEnderecoSimplesIBSCBS) */ readonly address?: components$3["schemas"]["addressDefinition"]; }; /** * @description Totais aproximados dos tributos (Lei 12.741/2012). (totTrib) - Define os totais aproximados de tributos. **Prioridade**: Se informado, o valor enviado será utilizado, ignorando o cálculo automático. **Automático**: Caso o campo não seja enviado (nulo), os valores serão calculados automaticamente pelo sistema. * * **Estrutura Simplificada vs. Detalhada (`approximateTax` vs. `approximateTotals`)** * * Ambos os campos, `approximateTax` e `approximateTotals`, servem para atender à Lei 12.741/2012 ("Lei De Olho no Imposto"), que exige a informação da carga tributária aproximada na nota fiscal. A principal diferença entre eles está na **granularidade** da informação. * * * **`approximateTax` (Estrutura Simplificada):** * Permite informar a carga tributária de forma consolidada, através de um percentual (`totalRate`) ou valor monetário (`totalAmount`) totais. É ideal para sistemas que não possuem a decomposição dos tributos por esfera governamental. * * * **`approximateTotals` (Estrutura Detalhada):** * Permite um detalhamento completo, separando os valores por esfera: `federal`, `state` e `municipal`. É a escolha ideal quando o sistema possui essa informação decomposta, oferecendo maior transparência. * * **Flexibilidade e Comportamento Automático:** * A coexistência dos dois campos oferece **flexibilidade**. O `approximateTax` simplifica a integração para sistemas com dados consolidados, enquanto o `approximateTotals` atende a sistemas que desejam fornecer o detalhamento completo. O sistema de emissão priorizará a informação mais detalhada, se disponível. * * **Importante:** Se nenhum dos grupos (`approximateTax` ou `approximateTotals`) for preenchido, o sistema realizará o cálculo automático e preencherá o grupo `approximateTax`. */ readonly approximateTax: { /** @description Fonte de informação da carga tributária (tpFonteCargaTributaria) */readonly source?: string; readonly version?: string; /** @description Valor percentual da carga tributária (tpPercentualCargaTributaria) */ readonly totalRate?: number; /** @description Valor da carga tributária total em R$ (ValorCargaTributaria, tpValor) */ readonly totalAmount?: number; }; /** @description Grupo de informações relativas à NFS-e a ser substituída */ readonly ReferenceSubstitution: { /** @description Identificador da NFS-e a ser substituída (chSubstda). */readonly id?: string; /** * @description Motivo da substituição (equivale ao cMotivo). * Valores possíveis: * - `SnOut`: Desenquadramento de NFS-e do Simples Nacional * - `SnIn`: Enquadramento de NFS-e no Simples Nacional * - `ImmunityAddRetro`: Inclusão Retroativa de Imunidade/Isenção para NFS-e * - `ImmunityRemoveRetro`: Exclusão Retroativa de Imunidade/Isenção para NFS-e * - `RejectionBuyerOrIntermediary`: Rejeição de NFS-e pelo tomador ou pelo intermediário se responsável pelo recolhimento do tributo * - `Other`: Outros * @enum {string} */ readonly reason?: "SnOut" | "SnIn" | "ImmunityAddRetro" | "ImmunityRemoveRetro" | "RejectionBuyerOrIntermediary" | "Other"; /** @description Descrição quando reason = 'other' (equivale ao xMotivo). */ readonly reasonText?: string; }; /** @description Grupo de informações relativas a atividades de Locação, sublocação, arrendamento, direito de passagem ou permissão de uso, compartilhado ou não, de ferrovia, rodovia, postes, cabos, dutos e condutos de qualquer natureza. */ readonly lease: { /** * @description Categoria do serviço (categ). * Valores possíveis: * - `Lease`: Locação * - `Sublease`: Sublocação * - `Leasehold`: Arrendamento * - `RightOfWay`: Direito de passagem * - `UsePermission`: Permissão de uso * @enum {string} */ readonly category?: "Lease" | "Sublease" | "Leasehold" | "RightOfWay" | "UsePermission"; /** * @description Objeto da locação/sublocação/arrendamento/etc. (objeto). * Valores possíveis: * - `Railway`: Ferrovia * - `Road`: Rodovia * - `Poles`: Postes * - `Cables`: Cabos * - `Pipelines`: Dutos * - `Conduits`: Condutos * @enum {string} */ readonly objectType?: "Railway" | "Road" | "Poles" | "Cables" | "Pipelines" | "Conduits"; /** @description Comprimento total de ferrovia/rodovia/cabos/dutos/condutos (extensao). */ readonly totalLength?: number; /** @description Número total de postes (nPostes). */ readonly polesCount?: number; }; /** @description Grupo de informações relativas à obras de construção civil e congêneres. Apenas uma das opções (workId, cibCode ou siteAddress) deve ser preenchida. (obra) */ readonly construction: { /** @description Inscrição imobiliária fiscal (inscImobFisc), exemplos: SQL ou INCRA. (tpinsclmobFisc) */readonly propertyFiscalRegistration?: string; /** @description Identificação da obra (CNO/CEI) — cObra. */ readonly workId?: { /** * @description Tipo de cadastro da obra (CNO/CEI). (tpCObra) - Cadastro Nacional de Obras, ou do Cadastro Específico do INSS. * Valores possíveis: * - `bra.cno`: Cadastro Nacional de Obras * - `bra.cei`: Cadastro Específico do INSS * @enum {string} */ readonly scheme?: "bra.cno" | "bra.cei"; /** @description Número da obra no cadastro selecionado. (tpCObra, tpNumero) */ readonly value?: string; }; /** @description Código do Cadastro Imobiliário Brasileiro (cCIB). (tpCCIB) */ readonly cibCode?: string; /** @description Endereço da obra (nacional ou exterior). (siteAddress) */ readonly siteAddress?: components$3["schemas"]["addressDefinition"]; /** * @description Número do encapsulamento da obra (NumeroEncapsulamento). String numérica com 1 a 12 dígitos. * Atualmente utilizado apenas pelo serializador do município de São Paulo (Paulistana): quando informado, é emitido como o elemento XML `` nos blocos `` e ``, imediatamente antes de ``. Zeros à esquerda são preservados. (tpNumero: 1-12 dígitos) * @example 123456 */ readonly encapsulationNumber?: string; } & (unknown | unknown | unknown); /** @description Grupo de informações de operações relacionadas a bens imóveis, exceto obras. Apenas uma das opções (cibCode ou siteAddress) deve ser preenchida. (imovel) */ readonly realEstate: { /** @description Inscrição imobiliária fiscal (inscImobFisc), exemplos: SQL ou INCRA. (tpinsclmobFisc) */readonly propertyFiscalRegistration?: string; /** @description Código do Cadastro Imobiliário Brasileiro (cCIB). (tpCCIB) */ readonly cibCode?: string; /** @description Endereço do imóvel (nacional ou exterior). (siteAddress) */ readonly siteAddress?: components$3["schemas"]["addressDefinition"]; } & (unknown | unknown); /** @description Grupo de informações sobre transações entre residentes ou domiciliados no Brasil com residentes ou domiciliados no exterior */ readonly foreignTrade: { /** * @description Modo de prestação (mdPrestacao). * Valores possíveis: * - `Unknown`: Desconhecido (tipo não informado na nota de origem) * - `CrossBorder`: Transfronteiriço * - `ConsumptionInBrazil`: Consumo no Brasil * - `TemporaryPersonnel`: Movimento Temporário de Pessoas Físicas * - `ConsumptionAbroad`: Consumo no Exterior * @default unknown * @enum {string} */ readonly serviceMode: "Unknown" | "CrossBorder" | "ConsumptionInBrazil" | "TemporaryPersonnel" | "ConsumptionAbroad"; /** * @description Vínculo entre as partes (vincPrest). * Valores possíveis: * - `NoLink`: Sem vínculo com o Tomador/Prestador * - `Controlled`: Controlada * - `Controller`: Controladora * - `Affiliate`: Coligada * - `HeadOffice`: Matriz * - `Branch`: Filial ou sucursal * - `OtherLink`: Outro vínculo * @default NoLink * @enum {string} */ readonly relationShip: "NoLink" | "Controlled" | "Controller" | "Affiliate" | "HeadOffice" | "Branch" | "OtherLink"; /** @description Moeda da transação (tabela de moedas do Banco Central do Brasil) — tpMoeda. */ readonly currency?: string; /** @description Valor do serviço na moeda informada em currency — vServMoeda. */ readonly serviceAmountInCurrency?: number; /** * @description Mecanismo de apoio/fomento utilizado pelo prestador (mecAFComexP). * Valores possíveis: * - `Unknown`: Desconhecido * - `None`: Nenhum * - `Acc`: ACC - Adiantamento sobre Contrato de Câmbio * - `Ace`: ACE – Adiantamento sobre Cambiais Entregues * - `BndesEximPostShipServices`: BNDES-Exim Pós-Embarque – Serviços * - `BndesEximPreShipServices`: BNDES-Exim Pré-Embarque - Serviços * - `Fge`: FGE - Fundo de Garantia à Exportação * - `ProexEqualization`: PROEX - EQUALIZAÇÃO * - `ProexFinancing`: PROEX - Financiamento * @default unknown * @enum {string} */ readonly supportMechanismProvider: "Unknown" | "None" | "Acc" | "Ace" | "BndesEximPostShipServices" | "BndesEximPreShipServices" | "Fge" | "ProexEqualization" | "ProexFinancing"; /** * @description Mecanismo de apoio/fomento utilizado pelo tomador (mecAFComexT). * Valores possíveis: * - `Unknown`: Desconhecido * - `None`: Nenhum * - `PublicAdminAndInternationalRep`: Adm. Pública e Repr. Internacional * - `LeasesMachineryShipsAircraft`: Alugueis e Arrend. Mercantil de maquinas, equip., embarc. e aeronaves * - `AircraftLeaseAirTransportPublic`: Arrendamento Mercantil de aeronave para empresa de transporte aéreo público * - `ExportAgentsCommission`: Comissão a agentes externos na exportação * - `StorageHandlingTransportAbroad`: Despesas de armazenagem, mov. e transporte de carga no exterior * - `FifaEventsSubsidiary`: Eventos FIFA (subsidiária) * - `FifaEvents`: Eventos FIFA * - `FreightsVesselAircraftRentalsOthers`: Fretes, arrendamentos de embarcações ou aeronaves e outros * - `AeronauticalMaterial`: Material Aeronáutico * - `PromotionGoodsAbroad`: Promoção de Bens no Exterior * - `PromotionBrazilianTourism`: Promoção de Dest. Turísticos Brasileiros * - `PromotionBrazilAbroad`: Promoção do Brasil no Exterior * - `PromotionServicesAbroad`: Promoção Serviços no Exterior * - `Recine`: RECINE * - `Recopa`: RECOPA * - `TrademarksPatentsCultivars`: Registro e Manutenção de marcas, patentes e cultivares * - `Reicomp`: REICOMP * - `Reidi`: REIDI * - `Repenec`: REPENEC * - `Repes`: REPES * - `Retaero`: RETAERO * - `Retid`: RETID * - `RoyaltiesTechnicalAssistance`: Royalties, Assistência Técnica, Científica e Assemelhados * - `ConformityAssessmentWto`: Serviços de avaliação da conformidade vinculados aos Acordos da OMC * - `Zpe`: ZPE * @default unknown * @enum {string} */ readonly supportMechanismReceiver: "Unknown" | "None" | "PublicAdminAndInternationalRep" | "LeasesMachineryShipsAircraft" | "AircraftLeaseAirTransportPublic" | "ExportAgentsCommission" | "StorageHandlingTransportAbroad" | "FifaEventsSubsidiary" | "FifaEvents" | "FreightsVesselAircraftRentalsOthers" | "AeronauticalMaterial" | "PromotionGoodsAbroad" | "PromotionBrazilianTourism" | "PromotionBrazilAbroad" | "PromotionServicesAbroad" | "Recine" | "Recopa" | "TrademarksPatentsCultivars" | "Reicomp" | "Reidi" | "Repenec" | "Repes" | "Retaero" | "Retid" | "RoyaltiesTechnicalAssistance" | "ConformityAssessmentWto" | "Zpe"; /** * @description Vínculo à movimentação temporária de bens (movTempBens). * Valores possíveis: * - `Unknown`: Desconhecido * - `No`: Não * - `LinkedImportDeclaration`: Vinculada - Declaração de Importação * - `LinkedExportDeclaration`: Vinculada - Declaração de Exportação * @enum {string} */ readonly temporaryGoods?: "Unknown" | "No" | "LinkedImportDeclaration" | "LinkedExportDeclaration"; /** @description Número da Declaração de Importação (DI/DSI/DA/DRI-E) averbado — nDI. */ readonly importDeclaration?: string; /** @description Número do Registro de Exportação (RE) averbado — nRE. */ readonly exportRegistration?: string; /** @description Indicador de envio da NFS-e ao MDIC (mdic). */ readonly mdicDelivery?: boolean; }; /** * @description Grupo de informações relativas ao valores para dedução/redução do valor da base de cálculo (vDedRed). Dedução/Redução aplicada SOMENTE à base de cálculo do ISSQN. * * **Deduções: Simples vs. Estruturado (`deductionsAmount` vs. `deduction`)** * * O layout oferece duas formas de registrar deduções da base de cálculo do ISSQN, visando flexibilidade e conformidade com os diferentes padrões (municipal legado vs. nacional). * * * **`deductionsAmount` (Valor Simples):** * Um campo numérico para informar o **valor total consolidado** das deduções. É uma abordagem direta, compatível com layouts mais antigos que não exigem o detalhamento dos documentos que comprovam a dedução. * * * **`deduction` (Grupo Estruturado):** * Um objeto complexo que permite justificar cada dedução com base em documentos fiscais, alinhando-se ao **padrão da NFS-e Nacional**. Ele detalha a origem de cada valor (chave do documento, tipo, valor, fornecedor). * * **Relação e Recomendação:** * A coexistência dos campos oferece compatibilidade. `deductionsAmount` é uma opção simplificada, enquanto o grupo `deduction` é a forma mais completa e recomendada para garantir rastreabilidade e conformidade fiscal com o padrão nacional. O sistema de emissão priorizará os dados detalhados do grupo `deduction`, se fornecidos. * * **Recomendação de Uso:** * * Use `deductionsAmount` para integrações simples ou quando não há detalhamento dos documentos. * * Use o grupo `deduction` sempre que a informação detalhada dos documentos estiver disponível para garantir a máxima conformidade. */ readonly deduction: { /** @description Percentual padrão de dedução/redução (pDR, %). */readonly rate?: number; /** @description Valor monetário padrão de dedução/redução (vDR, R$). */ readonly amount?: number; readonly documents?: readonly components$3["schemas"]["deductionDocument"][]; } & (unknown | unknown | unknown); /** * @description Documento base que justifica um item de dedução/redução (docDedRed, TCDocDedRed). * Pelo menos **um** identificador deve ser preenchido — `nfseKey`, `nfeKey`, * `municipalNfse`, `fiscalDocumentNumber` ou `nonFiscalDocumentNumber`. Se mais * de um for enviado, o backend aplica a precedência nessa ordem. Quando * `deductionType = Other`, o campo `otherDeductionDescription` passa a ser obrigatório. */ readonly deductionDocument: ({ /** @description Chave de acesso da NFS-e nacional, exatamente 50 dígitos (chNFSe, TSChaveNFSe). */readonly nfseKey?: string; /** @description Chave de acesso da NF-e (produto), exatamente 44 dígitos (chNFe). */ readonly nfeKey?: string; /** @description Referência a uma NFS-e municipal no padrão legado (NFSeMun). */ readonly municipalNfse?: { /** @description Código IBGE do município emissor (cMunNFSeMun). */readonly cityCode: string; /** @description Número da NFS-e municipal (nNFSeMun). */ readonly number: string; /** @description Código de verificação (cVerifNFSeMun). */ readonly verificationCode: string; }; /** @description Identificador de outro documento fiscal não eletrônico (nDocFisc). */ readonly fiscalDocumentNumber?: string; /** @description Identificador de documento não fiscal, ex: nota de débito interna (nDoc). */ readonly nonFiscalDocumentNumber?: string; /** * @description Tipo da dedução/redução (tpDedRed). * Valores aceitos (nome do enum — código numérico — descrição): * - `FoodAndBeverages` (1): Alimentação e bebidas/frigobar * - `Materials` (2): Materiais * - `ConsortiumPassThrough` (5): Repasse consorciado * - `HealthPlanPassThrough` (6): Repasse plano de saúde * - `Services` (7): Serviços * - `Subcontracting` (8): Subempreitada de mão de obra * - `Other` (99): Outras deduções — exige `otherDeductionDescription` * @enum {string} */ readonly deductionType: "FoodAndBeverages" | "Materials" | "ConsortiumPassThrough" | "HealthPlanPassThrough" | "Services" | "Subcontracting" | "Other"; /** @description Obrigatório quando deductionType = 'Other' (xDescOutDed). */ readonly otherDeductionDescription?: string; /** * Format: date * @description Data de emissão do documento de origem (dtEmiDoc, AAAA-MM-DD). */ readonly issueDate: string; /** @description Valor total dedutível/redutível no documento de origem (vDedutivelRedutivel). */ readonly deductibleTotal: number; /** @description Valor efetivamente utilizado como dedução nesta NFS-e (vDeducaoReducao). Deve ser ≤ deductibleTotal. */ readonly usedAmount: number; /** @description Fornecedor do documento (fornec). */ readonly supplier?: components$3["schemas"]["partyDefinition"]; } | unknown | unknown | unknown | unknown | unknown) & ({ /** @enum {string} */readonly deductionType?: "Other"; } | { readonly deductionType?: unknown; }); /** @description Benefício Municipal aplicado à base de cálculo do ISSQN (BM). */ readonly benefit: { /** @description Identificador do benefício (nBM: IBGE[7] + tipo[2] + seq[5]). */readonly id: string; /** @description Redução da BC por valor (vRedBCBM, R$). */ readonly amount?: number; /** @description Redução da BC por percentual (pRedBCBM, %). */ readonly rate?: number; } & (unknown | unknown); /** @description Suspensão da exigibilidade do ISSQN (exigSusp). */ readonly suspension: { /** * @description Motivo da suspensão (tpSusp). * Valores possíveis: * - `Judicial`: Exigibilidade Suspensa por Decisão Judicial * - `Administrative`: Exigibilidade Suspensa por Processo Administrativo * @enum {string} */ readonly reason: "Judicial" | "Administrative"; /** @description Número do processo (nProcesso). */ readonly processNumber: string; }; /** * @description Totais aproximados dos tributos (Lei 12.741/2012). (totTrib) - Define os totais aproximados de tributos. **Prioridade**: Se informado, o valor enviado será utilizado, ignorando o cálculo automático. **Automático**: Caso o campo não seja enviado (nulo), os valores serão calculados automaticamente pelo sistema. * * **Estrutura Simplificada vs. Detalhada (`approximateTax` vs. `approximateTotals`)** * * Ambos os campos, `approximateTax` e `approximateTotals`, servem para atender à Lei 12.741/2012 ("Lei De Olho no Imposto"), que exige a informação da carga tributária aproximada na nota fiscal. A principal diferença entre eles está na **granularidade** da informação. * * * **`approximateTax` (Estrutura Simplificada):** * Permite informar a carga tributária de forma consolidada, através de um percentual (`totalRate`) ou valor monetário (`totalAmount`) totais. É ideal para sistemas que não possuem a decomposição dos tributos por esfera governamental. * * * **`approximateTotals` (Estrutura Detalhada):** * Permite um detalhamento completo, separando os valores por esfera: `federal`, `state` e `municipal`. É a escolha ideal quando o sistema possui essa informação decomposta, oferecendo maior transparência. * * **Flexibilidade e Comportamento Automático:** * A coexistência dos dois campos oferece **flexibilidade**. O `approximateTax` simplifica a integração para sistemas com dados consolidados, enquanto o `approximateTotals` atende a sistemas mais robustos que desejam fornecer o detalhamento completo. O sistema de emissão priorizará a informação mais detalhada, se disponível. * * **Importante:** Se nenhum dos grupos (`approximateTax` ou `approximateTotals`) for preenchido, o sistema realizará o cálculo automático e preencherá o grupo `approximateTax`. */ readonly approximateTotals: { /** @description Tributos federais. */readonly federal?: { /** @description Valor percentual total aproximado dos tributos federais (%). (pTotTribFed) */readonly rate?: number; /** @description Valor monetário total aproximado dos tributos federais (R$). (vTotTribFed) */ readonly amount?: number; }; /** @description Tributos estaduais. */ readonly state?: { /** @description Valor percentual total aproximado dos tributos estaduais (%). (vTotTribEst) */readonly rate?: number; /** @description Valor monetário total aproximado dos tributos estaduais (R$). (vTotTribEst) */ readonly amount?: number; }; /** @description Tributos municipais. */ readonly municipal?: { /** @description Valor percentual total aproximado dos tributos municipais (%). (pTotTribMun) */readonly rate?: number; /** @description Valor monetário total aproximado dos tributos municipais (R$). (vTotTribMun) */ readonly amount?: number; }; /** @description Valor percentual total aproximado dos tributos (%). */ readonly rate?: number; /** @description Valor monetário total aproximado dos tributos (R$). */ readonly amount?: number; }; /** @description Informações referentes ao IBS e à CBS por item (NFSe/infNFSe/DPS/infDPS/IBSCBS). (tpIBSCBS) */ readonly ibsCbs: { /** * @description Finalidade da emissão da NFS-e (finNFe). (tpfinNFSe) - default: 'regular'. * Valores possíveis: * - `regular`: Regular * @default regular * @enum {string} */ readonly purpose: "regular"; /** * @description Relação entre destinatário e comprador/tomador indicado na NFS-e (indDest). (tpindDest) - default: 'sameAsBuyer'. Quando o valor for 'differentFromBuyer', o preenchimento do objeto 'recipient' se torna obrigatório. * Valores possíveis: * - `SameAsBuyer`: O destinatário é o mesmo que o comprador/tomador * - `DifferentFromBuyer`: O destinatário é diferente do comprador/tomador * @default SameAsBuyer * @enum {string} */ readonly destinationIndicator: "SameAsBuyer" | "DifferentFromBuyer"; /** @description Base de cálculo antes de reduções para cálculo do tributo bruto (vBC). */ readonly basis?: number; /** @description Montante relativo a reembolso/repasse/ressarcimento não integrante da BC (vReembRepasse). */ readonly reimbursedResuppliedAmount?: number; /** @description Valor monetário (R$) total relativo aos valores de dedução e redução da Base de Cálculo do IBS e da CBS referentes às operações de locação, cessão onerosa ou arrendamento de bens imóveis, e serviços médicos (vCalcDedRedIBSCBS). */ readonly ibscbsDeductionReductionAmount?: number; /** @description Indica se a operação é uma doação (indDoacao). (tpNaoSim) */ readonly isDonation?: boolean | null; /** * @description **Indicador de Uso ou Consumo Pessoal** * * Indica se a operação é para uso ou consumo pessoal do adquirente. Este campo é crucial para a aplicação de regras tributárias específicas, como a não geração de crédito de IBS/CBS para o tomador. (indFinal) */ readonly personalUse?: boolean | null; /** * @description **Indicador da Operação (operationIndicator / cIndOp)** * * O campo `operationIndicator` (ou `cIndOp` nos schemas XSD) é um código obrigatório que define a natureza e a característica da operação de fornecimento do serviço ou bem, sendo um dos campos mais importantes introduzidos pela Reforma Tributária. * * Sua principal finalidade é determinar o **local de incidência** (onde o imposto é devido) para os novos tributos, o IBS (Imposto sobre Bens e Serviços) e a CBS (Contribuição sobre Bens e Serviços). Diferente do modelo anterior, onde o local da prestação era muitas vezes suficiente, este código traz uma regra específica para cada tipo de operação. * * **Como funciona?** * * Com base no código informado, o sistema tributário nacional identifica se o imposto deve ser recolhido: * * No município onde um imóvel está localizado (para serviços de construção ou sobre imóveis). * * No endereço do estabelecimento do fornecedor. * * No endereço do adquirente (comprador/tomador) do serviço. * * No local onde um evento ocorre. * * Entre outras regras específicas. * * A escolha do código correto é, portanto, fundamental para garantir a conformidade fiscal e o recolhimento do IBS para o estado e município corretos. A seleção de um código inadequado pode levar a apurações de impostos incorretas. * * **Exemplo prático:** * Para um serviço de reforma de um imóvel (`código 020201`), o imposto será devido no município onde o imóvel está localizado, independentemente de onde o prestador ou o tomador do serviço estejam estabelecidos. Já para um serviço de consultoria prestado à distância (`código 100301`), a regra geral aponta para o domicílio do adquirente. * * A lista completa de valores pode ser consultada na Tabela de [operationIndicator](https://nfe.io/docs/documentacao/reforma-tributaria/conceitos-funcionais/documentacao-layout-nfse-rtc/#tabela-de-operationindicator) da documentação funcional. */ readonly operationIndicator: string; /** * @description Tipo de Operação com Entes Governamentais ou outros serviços sobre bens imóveis (tpOper). * Valores possíveis: * - `SupplyFirstPayLater`: Fornecimento com pagamento posterior * - `PayForPastSupply`: Recebimento do pagamento com fornecimento já realizado * - `SupplyForPastPay`: Fornecimento com pagamento já realizado * - `PayFirstSupplyLater`: Recebimento do pagamento com fornecimento posterior * - `SupplyPayTogether`: Fornecimento e recebimento do pagamento concomitantes * @enum {string} */ readonly operationType?: "SupplyFirstPayLater" | "PayForPastSupply" | "SupplyForPastPay" | "PayFirstSupplyLater" | "SupplyPayTogether"; /** * @description Código de Situação Tributária do IBS/CBS. Opcional. * Quando não preenchido, o valor será obtido através dos 3 primeiros caracteres do valor informado no campo `classCode`. * A lista completa de valores pode ser consultada na Tabela de [situationCode](hhttps://nfe.io/docs/documentacao/reforma-tributaria/conceitos-funcionais/documentacao-layout-nfse-rtc/#tabela-de-situationcode) da documentação funcional. */ readonly situationCode?: string; /** * @description Código de Classificação Tributária do IBS/CBS. (cClassTrib, tpClassificacaoTributaria) * A lista completa de valores pode ser consultada na Tabela de [classCode](https://nfe.io/docs/documentacao/reforma-tributaria/conceitos-funcionais/documentacao-layout-nfse-rtc/#tabela-de-classcode) da documentação funcional. */ readonly classCode: string; /** @description Grupo de NFS-e referenciadas (gRefNFSe). */ readonly relatedDocs?: { /** @description Chaves de NFS-e referenciadas (refNFSe). */readonly items?: readonly string[]; }; /** @description Grupo de informações relativas aos bens móveis objetos de locação (gLocBensMoveis). Grupo só é admitido quando se tratar de locação de bens móveis. cTribNac = 99.04.01. */ readonly leasedMovableAssets?: readonly { /** @description Código da Nomenclatura Comum do Mercosul (NCM) do bem móvel objeto da locação (cNCMBemMovel). */readonly ncmCode?: string; /** @description Descrição do Bem Móvel objeto da locação (xNCMBemMovel). */ readonly description?: string; /** @description Quantidade do Bem Móvel objeto da locação (qtdNCMBemMovel). */ readonly quantity?: number; }[]; /** @description Alíquotas e total do IBS por esfera subnacional. */ readonly ibs?: { /** @description Total do IBS (vIBSTot = vIBSUF + vIBSMun). */readonly totalAmount: number; readonly state: { /** @description Alíquota IBS (UF) (%) (pAliqIBSUF). */readonly rate: number; /** * @description Redução de alíquota estadual (%). * @default 0 */ readonly rateReduction: number; /** @description pAliqEfetUF = rate × (1 − rateReduction). Se rateReduction ausente, usar rate. */ readonly effectiveRate: number; /** @description Deferimento do IBS na esfera estadual. */ readonly deferment?: { /** @description Percentual de diferimento (pDif, %). */readonly rate?: number; /** @description Valor do diferimento (vDif). */ readonly amount?: number; }; /** @description Valor de imposto devolvido/devolução (vDevTrib) na esfera estadual. */ readonly returnedAmount?: number; /** @description Valor do IBS da UF (vIBSUF). */ readonly amount?: number; }; readonly municipal: { /** @description Alíquota IBS (Município) (%) (pAliqIBSMun). */readonly rate: number; /** * @description Redução de alíquota municipal (%). * @default 0 */ readonly rateReduction: number; /** @description pAliqEfetMun = rate × (1 − rateReduction). Se rateReduction ausente, usar rate. */ readonly effectiveRate: number; /** @description Deferimento do IBS na esfera municipal. */ readonly deferment?: { /** @description Percentual de diferimento (pDif, %). */readonly rate?: number; /** @description Valor do diferimento (vDif). */ readonly amount?: number; }; /** @description Valor de imposto devolvido/devolução (vDevTrib) na esfera municipal. */ readonly returnedAmount?: number; /** @description Valor do IBS do Município (vIBSMun). */ readonly amount?: number; }; }; /** @description Alíquotas da CBS (esfera federal). */ readonly cbs?: { /** @description Alíquota da CBS (%) (pAliqCBS). */readonly rate: number; /** * @description Redução de alíquota da CBS (%). * @default 0 */ readonly rateReduction: number; /** @description pAliqEfetCBS = rate × (1 − rateReduction). Se rateReduction ausente, usar rate. */ readonly effectiveRate: number; /** @description Deferimento da CBS. */ readonly deferment?: { /** @description Percentual de diferimento (pDif, %). */readonly rate?: number; /** @description Valor do diferimento (vDif). */ readonly amount?: number; }; /** @description Valor de imposto devolvido/devolução da CBS (vDevTrib). */ readonly returnedAmount?: number; /** @description Valor total da CBS (vCBS). */ readonly amount?: number; }; /** @description Tributação regular hipotética caso condição resolutória/suspensiva não se aplique. (tpGTribRegular) */ readonly regularTaxation?: { /** @description CST regular (CSTReg), 3 dígitos. */readonly situationCode?: string; /** @description Classificação tributária regular (cClassTribReg), 6 dígitos. */ readonly classCode?: string; readonly ibs?: { /** @description Total do IBS (vIBSTotReg). */readonly totalAmount?: number; readonly state?: { /** @description Alíquota efetiva IBS UF (pAliqEfetRegIBSUF). */readonly effectiveRate?: number; /** @description IBS UF regular (vTribRegIBSUF). */ readonly amount?: number; }; readonly municipal?: { /** @description Alíquota efetiva IBS Município (pAliqEfetRegIBSMun). */readonly effectiveRate?: number; /** @description IBS Município regular (vTribRegIBSMun). */ readonly amount?: number; }; }; readonly cbs?: { /** @description Alíquota efetiva CBS (pAliqEfetRegCBS). */readonly effectiveRate?: number; /** @description CBS regular (vTribRegCBS). */ readonly amount?: number; }; }; /** @description Créditos presumidos de IBS e CBS quando aplicáveis. */ readonly presumedCredits?: { readonly ibs?: { /** @description Código do crédito presumido IBS (cCredPres). */readonly code?: string; /** @description Percentual do crédito presumido IBS (pCredPres). */ readonly rate?: number; /** @description Valor do crédito presumido IBS (vCredPres). */ readonly amount?: number; /** @description Valor do crédito presumido IBS sob condição suspensiva (vCredPresCondSus). */ readonly conditionalAmount?: number; }; readonly cbs?: { /** @description Código do crédito presumido CBS (cCredPres). */readonly code?: string; /** @description Percentual do crédito presumido CBS (pCredPres). */ readonly rate?: number; /** @description Valor do crédito presumido CBS (vCredPres). */ readonly amount?: number; /** @description Valor do crédito presumido CBS sob condição suspensiva (vCredPresCondSus). */ readonly conditionalAmount?: number; }; }; /** @description Composição do valor de IBS e CBS em compras governamentais. */ readonly governmentPurchase?: { /** * @description Tipo do ente da compra governamental (tpEnteGov). * Valores possíveis: * - `Union`: União * - `State`: Estado * - `FederalDistrict`: Distrito Federal * - `Municipality`: Município * @enum {string} */ readonly entityType?: "Union" | "State" | "FederalDistrict" | "Municipality"; /** * @description Tipo de Operação com Entes Governamentais (tpOperGov). * Valores possíveis: * - `SupplyFirstPayLater`: Fornecimento com pagamento posterior * - `PayForPastSupply`: Pagamento de fornecimento anterior * - `SupplyForPastPay`: Fornecimento com pagamento antecipado * - `SupplyPayTogether`: Fornecimento e pagamento concomitantes * @enum {string} */ readonly operationType?: "SupplyFirstPayLater" | "PayForPastSupply" | "SupplyForPastPay" | "SupplyPayTogether"; readonly ibs?: { /** @description Total do IBS em compras governamentais (vIBSTotGov). */readonly totalAmount?: number; readonly state?: { /** @description Alíquota IBS UF em compras governamentais (pAliqIBSUF). */readonly rate?: number; /** @description Valor IBS UF em compras governamentais (vTribIBSUF). */ readonly amount?: number; }; readonly municipal?: { /** @description Alíquota IBS Município em compras governamentais (pAliqIBSMun). */readonly rate?: number; /** @description Valor IBS Município em compras governamentais (vTribIBSMun). */ readonly amount?: number; }; }; readonly cbs?: { /** @description Alíquota CBS em compras governamentais (pAliqCBS). */readonly rate?: number; /** @description Valor CBS em compras governamentais (vTribCBS). */ readonly amount?: number; }; }; /** @description Transferência de créditos de IBS e CBS. */ readonly creditTransfer?: { /** @description Valor de IBS a transferir (vIBS). */readonly ibsAmount?: number; /** @description Valor de CBS a transferir (vCBS). */ readonly cbsAmount?: number; }; /** @description Valores de reembolso/repasse/ressarcimento já tributados e aqui referenciados. (tpGrupoReeRepRes) */ readonly thirdPartyReimbursements?: { readonly documents?: readonly components$3["schemas"]["thirdPartyReimbursementDocument"][]; }; }; /** @description Documento utilizado para justificar exclusão da BC de IBS/CBS/ISS. (tpDocumento) */ readonly thirdPartyReimbursementDocument: { /** @description Chave NFS-e (padrão nacional). */readonly nfseKey?: string; /** @description Chave NF-e (44 dígitos). */ readonly nfeKey?: string; /** @description Chave CT-e (44 dígitos). */ readonly cteKey?: string; /** @description Outro DF-e presente no repositório nacional. (tpDFeNacional) */ readonly otherNationalDfe?: { /** @description Chave do DF-e (chDFE). */readonly dfeKey: string; /** @description Tipo do DF-e (xTpDFE, xTipoChaveDFe). */ readonly dfeTypeText: string; /** @description Documento fiscal a que se refere a chaveDfe (tipoChaveDFE, tpTipoChaveDFE). */ readonly dfeType?: string; }; /** @description Documento fiscal que não está no repositório nacional (eletrônico ou não). (tpDocFiscalOutro) */ readonly otherFiscalDoc?: { /** @description Código IBGE do município emissor do documento fiscal (cMunEmiDocFisc). (cMunDocFiscal) */readonly issuerCityCode: string; /** @description Número do documento fiscal (nDocFisc). (nDocFiscal, tpNumeroDescricaoDocumento) */ readonly fiscalDocNumber: string; /** @description Descrição do documento fiscal (xDocFisc). (xDocFiscal, tpNumeroDescricaoDocumento) */ readonly fiscalDocDescription?: string; }; /** @description Documento não fiscal. (tpDocOutro) */ readonly otherDoc?: { /** @description Número do documento (nDoc). (nDoc, tpNumeroDescricaoDocumento) */readonly docNumber: string; /** @description Descrição do documento (xDoc). (xDoc, tpNumeroDescricaoDocumento) */ readonly docDescription: string; }; /** @description Fornecedor/emitente do documento referenciado (quando aplicável). (fornec, tpFornecedor) */ readonly supplier?: components$3["schemas"]["partyDefinition"]; /** * Format: date * @description Data de emissão (AAAA-MM-DD) (dtEmiDoc). */ readonly issueDate: string; /** * Format: date * @description Data de competência (AAAA-MM-DD) (dtCompDoc). */ readonly accrualOn: string; /** * @description Motivo do reembolso/repasse/ressarcimento (tpReemb). (tpReeRepRes) * Valores possíveis: * - `RealEstateBrokerPassThrough`: Repasse de corretagem de imóveis * - `TravelAgencySupplierPassThrough`: Repasse de valores de fornecedores em agência de viagens * - `AdAgencyExternalProductionReimbursement`: Reembolso de produção externa em agência de publicidade * - `AdAgencyMediaReimbursement`: Reembolso de despesas com mídia em agência de publicidade * - `OtherReimbursement`: Outros reembolsos ou ressarcimentos * @enum {string} */ readonly reimbursementType: "RealEstateBrokerPassThrough" | "TravelAgencySupplierPassThrough" | "AdAgencyExternalProductionReimbursement" | "AdAgencyMediaReimbursement" | "OtherReimbursement"; /** @description Obrigatório quando reimbursementType = 'otherReimbursement' (xReembOutros). (tpXTpReeRepRes) */ readonly reimbursementTypeText?: string; /** @description Valor considerado para exclusão da BC (total ou parcial, R$) (vReemb). (vlrReembRepasse) */ readonly amount: number; } | unknown | unknown | unknown | unknown | unknown | unknown; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } //#endregion //#region src/generated/product-invoice-rtc-v1.d.ts interface components$2 { schemas: { /** * Nota Fiscal de Produto (NFe) Schema * @description Schema para validar o objeto ProductInvoiceRequest da API */ readonly ProductInvoiceRequest: { /** @description Identificador único */readonly id?: string | null; /** @description Grupo de Formas de Pagamento (pag) */ readonly payment: readonly components$2["schemas"]["PaymentResource"][]; /** * Format: int32 * @description Série do Documento Fiscal (serie) */ readonly serie?: number | null; /** * Format: int64 * @description Número do Documento Fiscal (nNF) */ readonly number?: number | null; /** * Format: date-time * @description Data e Hora de Saída ou da Entrada da Mercadoria/Produto (dhSaiEnt) * * Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD. * */ readonly operationOn?: string | null; /** * Format: date * @description Data da previsão de entrega ou disponibilização do bem (dPrevEntrega). Formato: “AAAA-MM-DD”. Observação: Não informar este campo para a NFC-e. */ readonly expectedDeliveryOn?: string | null; /** @description Descrição da Natureza da Operação (natOp) */ readonly operationNature?: string | null; /** @description Tipo do Documento Fiscal (tpNF) */ readonly operationType?: components$2["schemas"]["OperationType"]; /** @description Identificador de Local de destino da operação (idDest) */ readonly destination?: components$2["schemas"]["Destination"]; /** @description Código do Município de Ocorrência do Fato Gerador (cMunFG) */ readonly consumptionCityCode?: components$2["schemas"]["ConsumptionCityCode"]; /** @description Município de ocorrência do fato gerador do IBS/CBS (cMunFGIBS) */ readonly ibsConsumptionCityCode?: components$2["schemas"]["IbsConsumptionCityCode"]; /** @description Formato de impressão do DANFE (tpImp) */ readonly printType?: components$2["schemas"]["PrintType"]; /** @description Finalidade da emissão da NF-e (finNFe) */ readonly purposeType?: components$2["schemas"]["PurposeType"]; /** @description Tipo de Nota de Débito (tpNFDebito) */ readonly debitType?: components$2["schemas"]["DebitType"]; readonly creditType?: components$2["schemas"]["CreditType"]; /** @description Indica operação com Consumidor final (indFinal) */ readonly consumerType?: components$2["schemas"]["ConsumerType"]; /** @description Indicador de presença do comprador no estabelecimento (indPres) */ readonly presenceType?: components$2["schemas"]["ConsumerPresenceType"]; /** * Format: date-time * @description Data e Hora da entrada em contingência (dhCont) * * Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD * */ readonly contingencyOn?: string | null; /** @description Justificativa da entrada em contingência (xJust) */ readonly contingencyJustification?: string | null; /** @description Grupo de Compras Governamentais (gCompraGov) */ readonly governmentPurchase?: components$2["schemas"]["GovernmentPurchaseResource"]; /** @description Identificação do Destinatário (dest) */ readonly buyer?: components$2["schemas"]["BuyerResource"]; /** @description Grupo de Informações do Transporte da NF-e (transp) */ readonly transport?: components$2["schemas"]["TransportInformationResource"]; /** @description Informações adicionais da NF-e (infAdic) */ readonly additionalInformation?: components$2["schemas"]["AdditionalInformationResource"]; /** @description Informações de exportação (exporta) */ readonly export?: components$2["schemas"]["ExportResource"]; /** @description Detalhamento de Produtos e Serviços (det). Pelo menos um item é obrigatório. */ readonly items: readonly components$2["schemas"]["InvoiceItemResource"][]; /** @description Grupo de Valores Totais da NF-e (total) */ readonly totals?: components$2["schemas"]["Total"]; readonly billing?: components$2["schemas"]["BillingResource"]; /** @description IE do Substituto Tributário da UF de destino da mercadoria, quando houver a retenção do ICMS ST para a UF de destino. (IEST) */ readonly issuerTaxSubstitute?: components$2["schemas"]["IssuerFromRequestResource"]; /** @description Grupo de Informações do Intermediador da Transação (infIntermed) */ readonly transactionIntermediate?: components$2["schemas"]["IntermediateResource"]; /** @description Identificação do Local de entrega (entrega) */ readonly delivery?: components$2["schemas"]["DeliveryInformationResource"]; /** @description Identificação do Local de retirada (retirada) */ readonly withdrawal?: components$2["schemas"]["WithdrawalInformationResource"]; readonly purchaseInformation?: components$2["schemas"]["PurchaseInformationResource"]; }; readonly ActivityResource: { /** @description Detalhes do Evento */readonly data?: unknown; /** @description Nome do Evento gerado */ readonly type?: string | null; /** * Format: int32 * @description Número sequencial do Evento */ readonly sequence?: number | null; }; /** @description Adições (adi) */ readonly AdditionResource: { /** * Format: int64 * @description Numero da adição (nAdicao) */ readonly code?: number | null; /** @description Código do fabricante estrangeiro (cFabricante) */ readonly manufacturer?: string | null; /** * Format: double * @description Valor do desconto do item da DI – Adição (vDescDI) */ readonly amount?: number | null; /** * Format: int64 * @description Número do ato concessório de Drawback (nDraw) */ readonly drawback?: number | null; }; readonly AdditionalInformationResource: { /** @description Informações Adicionais de Interesse do Fisco (infAdFisco) */readonly fisco?: string | null; /** @description Informações Complementares de interesse do Contribuinte (infCpl) */ readonly taxpayer?: string | null; /** @description Pessoas autorizadas para o download do XML da NF-e (autXML). CNPJ ou CPF das pessoas autorizadas. Máximo de 10 autorizações. */ readonly xmlAuthorized?: readonly number[] | null; /** @description Esforço (xCampo) */ readonly effort?: string | null; /** @description Pedido (xCampo) */ readonly order?: string | null; /** @description Contrato (xCampo) */ readonly contract?: string | null; /** @description Documentos Fiscais Referenciados (refECF) */ readonly taxDocumentsReference?: readonly components$2["schemas"]["TaxDocumentsReferenceResource"][] | null; /** @description Grupo de notas de antecipação de pagamento - Informado para abater as parcelas de antecipação de pagamento, conforme Art. 10. § 4º (gPagAntecipado). */ readonly advancePayment?: readonly components$2["schemas"]["AdvancePaymentItemResource"][] | null; /** @description Observações fiscais (obsCont) */ readonly taxpayerComments?: readonly components$2["schemas"]["TaxpayerCommentsResource"][] | null; /** @description Processos referenciados (procRef) */ readonly referencedProcess?: readonly components$2["schemas"]["ReferencedProcessResource"][] | null; }; /** @description Dados do Endereço */ readonly AddressResource: { /** @description Estado, ex.: SP, RJ, AC, padrão ISO 3166-2 ALFA 2. */readonly state: string; /** @description Cidade do Endereço (cMun) */ readonly city: components$2["schemas"]["CityResource"]; /** @description Bairro do Endereço (xBairro) */ readonly district: string; /** @description Complemento do Endereço, ex.: AP 2, BL A. (xCpl) */ readonly additionalInformation?: string | null; /** @description Logradouro do Endereço (xLgr) */ readonly street: string; /** @description Número do Endereço. Usar S/N para "sem número". (nro) */ readonly number: string; /** @description Cód. Endereço Postal (CEP) */ readonly postalCode?: string | null; /** * @description País, ex.: BRA, ARG, USA, padrão ISO 3166-1 ALFA-3. (xPais). Opcional — se omitido, assume BRA. * @default BRA */ readonly country: string | null; /** @description Telefone (fone) */ readonly phone?: string | null; }; /** @description Grupo de notas de antecipação de pagamento - Informado para abater as parcelas de antecipação de pagamento, conforme Art. 10. § 4º (gPagAntecipado). */ readonly AdvancePaymentItemResource: { readonly accessKey?: string | null; }; readonly AuthorizationResource: { /** * Format: date-time * @description Data e hora do recebimento (dhRecbto) */ readonly receiptOn?: string | null; /** @description Chave de Acesso da NF-e (chNFe) */ readonly accessKey?: string | null; readonly message?: string | null; /** @description Mensagem da SEFAZ (xMotivo) */ readonly description?: string; }; readonly BillResource: { /** @description Número da Fatura (nFat) */readonly number?: string | null; /** * Format: double * @description Valor Original da Fatura (vOrig) */ readonly originalAmount?: number | null; /** * Format: double * @description Valor do desconto (vDesc) */ readonly discountAmount?: number | null; /** * Format: double * @description Valor Líquido da Fatura (vLiq) */ readonly netAmount?: number | null; }; readonly BillingResource: { /** @description Grupo Fatura (fat) */readonly bill?: components$2["schemas"]["BillResource"]; /** @description Grupo Duplicata (dup) */ readonly duplicates?: readonly components$2["schemas"]["DuplicateResource"][] | null; }; /** @description Identificação do Destinatário da Nota Fiscal eletrônica - Grupo Obrigatório para a NF-e (modelo 55) e opcional para NFC-e (modelo 65). */ readonly BuyerResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name: string; /** * Format: int64 * @description CNPJ ou CPF (CNPJ/CPF) */ readonly federalTaxNumber: number; /** @description Email (email) */ readonly email?: string | null; /** @description Dados do Endereço (enderDest) */ readonly address: components$2["schemas"]["AddressResource"]; /** @description Tipo da pessoa (indIEDest) */ readonly type?: components$2["schemas"]["PersonType"]; /** @description Indicador Inscrição Estadual (indIEDest) */ readonly stateTaxNumberIndicator?: components$2["schemas"]["ReceiverStateTaxIndicator"]; /** @description Nome fantasia (xFant) */ readonly tradeName?: string | null; /** @description Regime de tributação (CRT) */ readonly taxRegime?: components$2["schemas"]["TaxRegime"]; /** @description Inscrição Estadual (IE) */ readonly stateTaxNumber?: string | null; }; /** @description Grupo de Informações da CBS */ readonly CBSTaxResource: { /** * Format: double * @description Alíquota da CBS (em percentual) (pCBS) */ readonly rate?: number | null; /** @description Grupo de Informações do Diferimento (gDif) */ readonly deferment?: components$2["schemas"]["DefermentTaxResource"]; /** @description Grupo de Informações da Devolução de Tributos (gDevTrib) */ readonly returnedAmount?: components$2["schemas"]["ReturnedTaxResource"]; /** @description Grupo de informações da redução da alíquota (gRed) */ readonly reduction?: components$2["schemas"]["ReductionTaxResource"]; /** * Format: double * @description Valor total da CBS (vCBS). */ readonly amount?: number | null; }; readonly CIDEResource: { /** * Format: double * @description BC da CIDE (qBCProd) */ readonly bc?: number | null; /** * Format: double * @description Valor da alíquota da CIDE (vAliqProd) */ readonly rate?: number | null; /** * Format: double * @description Valor da CIDE (vCIDE) */ readonly cideAmount?: number | null; }; readonly CardResource: { /** @description CNPJ da Credenciadora de cartão de crédito e/ou débito (CNPJ) */readonly federalTaxNumber?: string | null; /** @description Bandeira da operadora de cartão de crédito e/ou débito (tBand) */ readonly flag?: components$2["schemas"]["FlagCard"]; /** @description Número de autorização da operação cartão de crédito e/ou débito (cAut) */ readonly authorization?: string | null; /** @description Tipo de Integração para pagamento (tpIntegra) */ readonly integrationPaymentType?: components$2["schemas"]["IntegrationPaymentType"]; readonly federalTaxNumberRecipient?: string | null; readonly idPaymentTerminal?: string | null; }; readonly CityResource: { /** @description Cód. do Município, segundo o Tabela de Municípios do IBGE (cMun) */readonly code: string; /** @description Nome do Município (xMun) */ readonly name: string; }; /** * @description Grupo do COFINS * * ID: S01 * Pai: M01 * * Obs: Informar apenas um dos grupos S02, S03, S04 ou S04 * com base valor atribuído ao campo S06 – CST do COFINS */ readonly CofinsTaxResource: { /** @description Código de Situação Tributária da COFINS (CST) */readonly cst: string; /** * Format: double * @description Valor da Base de Cálculo da COFINS (vBC) */ readonly baseTax?: number | null; /** * Format: double * @description Alíquota da COFINS (em percentual) (pCOFINS) */ readonly rate?: number | null; /** * Format: double * @description Valor da COFINS (vCOFINS) */ readonly amount?: number | null; /** * Format: double * @description Quantidade Vendida (qBCProd) */ readonly baseTaxProductQuantity?: number | null; /** * Format: double * @description Alíquota da COFINS (em reais) (vAliqProd) */ readonly productRate?: number | null; }; /** @description Ajuste de Competência (gAjusteCompet) */ readonly CompetenceAdjustmentResource: { /** @description Ano e mês referência do período de apuração (AAAA-MM) (competApur) */readonly assessmentPeriod?: string | null; /** * Format: double * @description Valor de IBS referente ao ajuste de competência (vIBS) */ readonly ibsAmount?: number | null; /** * Format: double * @description Valor de CBS referente ao ajuste de competência (vCBS) */ readonly cbsAmount?: number | null; }; /** * @description Indicador de Presença (indPres). * Valores possíveis: * - `None`: Não se aplica (ex: nota complementar ou de ajuste) * - `Presence`: Operação presencial * - `Internet`: Operação não presencial, pela Internet * - `Telephone`: Operação não presencial, Teleatendimento * - `Delivery`: NFC-e em operação com entrega a domicílio * - `OthersNonPresenceOperation`: Operação não presencial, outros * @default Internet * @enum {string} */ readonly ConsumerPresenceType: "None" | "Presence" | "Internet" | "Telephone" | "Delivery" | "OthersNonPresenceOperation"; /** * @description Indica operação com Consumidor final (indFinal). O valor padrão é determinado pelo `federalTaxNumber` do `buyer`: `Normal` para CNPJ, `FinalConsumer` para CPF. * Valores possíveis: * - `FinalConsumer`: Consumidor final * - `Normal`: Operação normal * @default Normal * @enum {string} */ readonly ConsumerType: "FinalConsumer" | "Normal"; /** * Format: int64 * @description Código do Município de ocorrência do fato gerador do IBS/CBS (cMunFGIBS). Informar o município de ocorrência do fato gerador do IBS/CBS. Este campo só é preenchido quando "indPres = 5 (Operação presencial, fora do estabelecimento)" e não incluir o endereço do destinatário (Grupo: E05) ou local de entrega (Grupo: G01). */ readonly ConsumptionCityCode: number | null; readonly ContingencyDetails: { readonly authorizer?: components$2["schemas"]["StateTaxProcessingAuthorizer"]; /** * Format: date-time * @description Data e hora do início da contingência */ readonly startedOn?: string; /** @description Justificativa da entrada em contingência */ readonly reason?: string | null; }; /** @description Estorno de Crédito (gEstornoCred) */ readonly CreditReversalResource: { /** * Format: double * @description Valor do IBS a ser estornado (vIBSEstCred) */ readonly ibsReversalAmount?: number | null; /** * Format: double * @description Valor da CBS a ser estornada (vCBSEstCred) */ readonly cbsReversalAmount?: number | null; }; /** @description Estorno de Crédito (gEstornoCred) */ readonly CreditReversalTotalsResource: { /** * Format: double * @description Valor do IBS a ser estornado (vIBSEstCred) */ readonly ibsReversalAmount?: number | null; /** * Format: double * @description Valor da CBS a ser estornada (vCBSEstCred) */ readonly cbsReversalAmount?: number | null; }; /** @description Informações de Transferências de Crédito (gTransfCred) */ readonly CreditTransferTaxResource: { /** * Format: double * @description Valor de IBS a transferir (vIBS). */ readonly ibsAmount?: number | null; /** * Format: double * @description Valor de CBS a transferir (vCBS). */ readonly cbsAmount?: number | null; }; /** * @description Tipo de Nota de Crédito (tpNFCredito). * Valores possíveis: * - `FinesAndInterest`: Multa e juros * - `IbsPresumedCreditAppropriationZfm`: Apropriação de crédito presumido de IBS sobre o saldo devedor na ZFM * - `ReturnDeliveryRefusedOrNotFound`: Retorno por recusa na entrega ou não localização do destinatário * - `ValueReduction`: Redução de valores * - `TransferCreditSuccession`: Transferência de crédito na sucessão * @enum {string|null} */ readonly CreditType: "FinesAndInterest" | "IbsPresumedCreditAppropriationZfm" | "ReturnDeliveryRefusedOrNotFound" | "ValueReduction" | "TransferCreditSuccession" | null; /** * @description Tipo de Nota de Débito (tpNFDebito). * Valores possíveis: * - `TransferCreditsToCooperatives`: Transferência de créditos para cooperativas * - `CancelCreditsExemptImmuneSales`: Cancelamento de créditos por vendas isentas/imunes * - `UnprocessedInvoicesDebits`: Débitos de faturas não processadas no cálculo * - `FinesAndInterest`: Multas e juros * - `TransferInheritanceCredit`: Transferência de crédito de herança * - `AdvancePayment`: Pagamento antecipado * - `InventoryLoss`: Perda de estoque * - `SnDisqualification`: Desenquadramento do Simples Nacional * @enum {string|null} */ readonly DebitType: "TransferCreditsToCooperatives" | "CancelCreditsExemptImmuneSales" | "UnprocessedInvoicesDebits" | "FinesAndInterest" | "TransferInheritanceCredit" | "AdvancePayment" | "InventoryLoss" | "SnDisqualification" | null; /** @description Grupo de Informações do Diferimento */ readonly DefermentTaxResource: { /** * Format: double * @description Percentual do diferimento */ readonly rate?: number | null; /** * Format: double * @description Valor do Diferimento */ readonly amount?: number | null; }; /** @description Identificação do Local de entrega (entrega) */ readonly DeliveryInformationResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components$2["schemas"]["AddressResource"]; readonly type?: components$2["schemas"]["PersonType"]; /** @description Inscrição Estadual (IE) */ readonly stateTaxNumber?: string | null; }; /** * @description Identificador de local de destino da operação (idDest). * Valores possíveis: * - `None`: Não definido * - `InternalOperation`: Operação interna * - `InterstateOperation`: Operação interestadual * - `InternationalOperation`: Operação com o exterior * @default InternalOperation * @enum {string} */ readonly Destination: "None" | "InternalOperation" | "InterstateOperation" | "InternationalOperation"; /** @description Dados para inutilizar números de nota fiscal */ readonly DisablementResource: { readonly environment?: components$2["schemas"]["EnvironmentType"]; /** * Format: int32 * @description Série */ readonly serie?: number; readonly state?: components$2["schemas"]["StateCode"]; /** * Format: int32 * @description Número inicial */ readonly beginNumber?: number; /** * Format: int32 * @description Número final (usar o mesmo número inicial se for apenas um número) */ readonly lastNumber?: number; /** @description Motivo da inutilização */ readonly reason?: string | null; }; readonly DocumentElectronicInvoiceResource: { /** @description Chave de Acesso (refNFe) */readonly accessKey?: string | null; }; readonly DocumentInvoiceReferenceResource: { /** * Format: double * @description Código da UF (cUF) */ readonly state?: number | null; /** @description Ano / Mês (AAMM) */ readonly yearMonth?: string | null; /** @description CNPJ (CNPJ) */ readonly federalTaxNumber?: string | null; /** @description Modelo (mod) */ readonly model?: string | null; /** @description Série (serie) */ readonly series?: string | null; /** @description Número (nNF) */ readonly number?: string | null; }; /** * @description Indicador de dedução do ICMS desonerado do valor total da NF-e (indDeducao). * Valores possíveis: * - `NotDeduct`: O valor do ICMS desonerado (vICMSDeson) não deduz do valor total da NF-e * - `Deduce`: O valor do ICMS desonerado (vICMSDeson) deduz do valor total da NF-e * @enum {string} */ readonly DuductionIndicator: "NotDeduct" | "Deduce"; readonly DuplicateResource: { /** @description Número da Duplicata (nDup) */readonly number?: string | null; /** * Format: date-time * @description Data de vencimento (dVenc) */ readonly expirationOn?: string | null; /** * Format: double * @description Valor da duplicata (vDup) */ readonly amount?: number | null; }; readonly EconomicActivityResource: { readonly type?: components$2["schemas"]["EconomicActivityType"]; /** * Format: int32 * @description Código da Atividade da Empresa */ readonly code?: number | null; }; /** * @description Tipo de Atividade Econômica. * Valores possíveis: * - `Main`: Principal * - `Secondary`: Secundária * @enum {string} */ readonly EconomicActivityType: "Main" | "Secondary"; /** * @description Tipo de Ambiente (tpAmb). * Valores possíveis: * - `None`: Não definido * - `Production`: Produção * - `Test`: Homologação (Teste) * @enum {string} */ readonly EnvironmentType: "None" | "Production" | "Test"; readonly ErrorResource: { /** Format: int32 */readonly code?: number | null; readonly message?: string | null; }; readonly ErrorsResource: { readonly errors?: readonly components$2["schemas"]["ErrorResource"][] | null; }; /** * @description Motivo da desoneração. Campo será preenchido quando o campo anterior estiver preenchido. * Valores possíveis: * - `Agriculture`: Produtos agropecuários * - `Others`: Outros * - `DevelopmentEntities`: Órgãos de fomento e desenvolvimento * @enum {string} */ readonly ExemptReason: "Agriculture" | "Others" | "DevelopmentEntities"; readonly ExportDetailResource: { /** @description Número do ato concessório de Drawback (nDraw) */readonly drawback?: string | null; readonly hintInformation?: components$2["schemas"]["ExportHintResource"]; }; readonly ExportHintResource: { /** @description Número do Registro de Exportação (nRE) */readonly registryId?: string | null; /** @description Chave de Acesso da NF-e recebida para exportação (chNFe) */ readonly accessKey?: string | null; /** * Format: double * @description Quantidade do item realmente exportado (qExport) */ readonly quantity?: number | null; }; readonly ExportResource: { readonly state?: components$2["schemas"]["StateCode"]; /** @description Descrição do Local de Embarque ou de transposição de fronteira (xLocExporta) */ readonly office?: string | null; /** @description Informações Complementares de interesse do Contribuinte (xLocDespacho) */ readonly local?: string | null; }; /** @description Arquivo */ readonly FileResource: { /** @description Endereço Absoluto URI para o arquivo */readonly uri?: string | null; }; /** * @description Bandeira da operadora de cartão de crédito e/ou débito (tBand). * Valores possíveis: * - `None`: Não definido * - `Visa`: Visa * - `Mastercard`: Mastercard * - `AmericanExpress`: American Express * - `Sorocred`: Sorocred * - `DinersClub`: Diners Club * - `Elo`: Elo * - `Hipercard`: Hipercard * - `Aura`: Aura * - `Cabal`: Cabal * - `Alelo`: Alelo * - `BanesCard`: Banescard * - `CalCard`: Calcard * - `Credz`: Credz * - `Discover`: Discover * - `GoodCard`: Good Card * - `GreenCard`: Green Card * - `Hiper`: Hiper * - `JCB`: JCB * - `Mais`: Mais * - `MaxVan`: Maxvan * - `Policard`: Policard * - `RedeCompras`: Rede Compras * - `Sodexo`: Sodexo * - `ValeCard`: ValeCard * - `Verocheque`: Verocheque * - `VR`: VR * - `Ticket`: Ticket * - `Other`: Outros * @enum {string} */ readonly FlagCard: "None" | "Visa" | "Mastercard" | "AmericanExpress" | "Sorocred" | "DinersClub" | "Elo" | "Hipercard" | "Aura" | "Cabal" | "Alelo" | "BanesCard" | "CalCard" | "Credz" | "Discover" | "GoodCard" | "GreenCard" | "Hiper" | "JCB" | "Mais" | "MaxVan" | "Policard" | "RedeCompras" | "Sodexo" | "ValeCard" | "Verocheque" | "VR" | "Ticket" | "Other"; readonly FuelOriginResource: { /** * Format: int32 * @description Indicador de importação (indImport) */ readonly indImport?: number | null; /** * Format: int32 * @description Código da UF (cUFOrig) */ readonly cUFOrig?: number | null; /** * Format: double * @description Percentual originário para a UF (pOrig) */ readonly pOrig?: number | null; }; /** @description Detalhamento de Veículos novos (veicProd) - grupo J01 */ readonly VehicleDetailResource: { /** * Format: int32 * @description Tipo da Operação (tpOp). * Valores possíveis: * - `0`: Outros * - `1`: Venda concessionária * - `2`: Faturamento direto para consumidor final * - `3`: Venda direta para grandes consumidores * @enum {integer|null} */ readonly operationType?: 0 | 1 | 2 | 3 | null; /** @description Chassi do veículo - VIN (chassi). 17 caracteres alfanuméricos */ readonly chassis?: string | null; /** @description Cor do veículo - código de cada montadora (cCor) */ readonly colorCode?: string | null; /** @description Descrição da Cor (xCor) */ readonly colorDescription?: string | null; /** @description Potência máxima do motor em cavalo vapor - CV (pot) */ readonly enginePower?: string | null; /** @description Capacidade volumétrica do motor em centímetros cúbicos - CC (cilin) */ readonly engineDisplacement?: string | null; /** @description Peso Líquido (pesoL) */ readonly netWeight?: string | null; /** @description Peso Bruto (pesoB) */ readonly grossWeight?: string | null; /** @description Serial - série (nSerie) */ readonly serialNumber?: string | null; /** @description Tipo de combustível - Tabela RENAVAM (tpComb). Ex: 01-Álcool; 02-Gasolina; 03-Diesel; 16-Álcool/Gas.; 17-Gas./Álcool/GNV; 18-Gasolina/Elétrico */ readonly fuelType?: string | null; /** @description Número do motor (nMotor) */ readonly engineNumber?: string | null; /** @description Capacidade Máxima de Tração em toneladas - 4 casas decimais (CMT) */ readonly maximumTractionCapacity?: string | null; /** @description Distância entre eixos (dist) */ readonly wheelBase?: string | null; /** * Format: int32 * @description Ano Modelo de Fabricação (anoMod). Formato: 4 dígitos */ readonly modelYear?: number | null; /** * Format: int32 * @description Ano de Fabricação (anoFab). Formato: 4 dígitos */ readonly manufactureYear?: number | null; /** @description Tipo de pintura (tpPint) */ readonly paintType?: string | null; /** @description Tipo de veículo - Tabela RENAVAM (tpVeic) */ readonly vehicleType?: string | null; /** * Format: int32 * @description Espécie de veículo - Tabela RENAVAM (espVeic) */ readonly vehicleSpecies?: number | null; /** * @description Condição do VIN — chassi (VIN). * Valores possíveis: * - `R`: Remarcado (chassi regravado pelo DETRAN) * - `N`: Normal (chassi original de fábrica) * @enum {string|null} */ readonly vinCondition?: "R" | "N" | null; /** * Format: int32 * @description Condição do veículo (condVeic). * Valores possíveis: * - `1`: Acabado (veículo pronto para uso) * - `2`: Inacabado (veículo sem algum componente essencial) * - `3`: Semi-acabado (veículo parcialmente montado, ex: chassis-cabina) * @enum {integer|null} */ readonly vehicleCondition?: 1 | 2 | 3 | null; /** @description Código Marca Modelo - Tabela RENAVAM (cMod) */ readonly brandModelCode?: string | null; /** @description Código da Cor DENATRAN (cCorDENATRAN). 01-AMARELO; 02-AZUL; 03-BEGE; 04-BRANCA; 05-CINZA; 06-DOURADA; 07-GRENA; 08-LARANJA; 09-MARROM; 10-PRATA; 11-PRETA; 12-ROSA; 13-ROXA; 14-VERDE; 15-VERMELHA; 16-FANTASIA */ readonly denatranColorCode?: string | null; /** * Format: int32 * @description Quantidade máxima de passageiros sentados, inclusive motorista (lota) */ readonly seatingCapacity?: number | null; /** * Format: int32 * @description Tipo de restrição sobre o veículo (tpRest). * Valores possíveis: * - `0`: Não há restrição (veículo livre para venda e transferência) * - `1`: Alienação Fiduciária (veículo dado como garantia em financiamento) * - `2`: Arrendamento Mercantil (veículo em contrato de leasing) * - `3`: Reserva de Domínio (vendedor mantém a propriedade até quitação total) * - `4`: Penhor de Veículos (veículo dado como garantia em empréstimo) * - `9`: Outras restrições * @enum {integer|null} */ readonly restrictionType?: 0 | 1 | 2 | 3 | 4 | 9 | null; }; readonly FuelResource: { /** @description Código de produto da ANP (cProdANP) */readonly codeANP?: string | null; /** * Format: double * @description Percentual de Gás Natural para o produto GLP (cProdANP=210203001) (pMixGN) */ readonly percentageNG?: number | null; /** @description Descrição do produto conforme ANP (descANP) */ readonly descriptionANP?: string | null; /** * Format: double * @description Percentual do GLP derivado do petróleo no produto GLP (cProdANP=210203001) (pGLP) */ readonly percentageGLP?: number | null; /** * Format: double * @description Percentual de Gás Natural Nacional – GLGNn para o produto GLP (cProdANP= 210203001) (pGNn) */ readonly percentageNGn?: number | null; /** * Format: double * @description Percentual * de Gás Natural Importado – GLGNi para o produto GLP (cProdANP= 210203001) (pGNi) */ readonly percentageGNi?: number | null; /** * Format: double * @description Valor de partida (cProdANP=210203001) (vPart) */ readonly startingAmount?: number | null; /** @description Código de autorização / registro do CODIF (CODIF) */ readonly codif?: string | null; /** * Format: double * @description Quantidade de combustível faturada à temperatura ambiente (qTemp) */ readonly amountTemp?: number | null; /** @description Sigla da UF de consumo (UFCons) */ readonly stateBuyer?: string | null; readonly cide?: components$2["schemas"]["CIDEResource"]; readonly pump?: components$2["schemas"]["PumpResource"]; readonly fuelOrigin?: components$2["schemas"]["FuelOriginResource"]; }; /** * @description Tipo de ente governamental (tpEnteGov). Para administração pública direta e suas autarquias e fundações. * Valores possíveis: * - `Union`: União * - `State`: Estado * - `FederalDistrict`: Distrito Federal * - `Municipality`: Município * @enum {string|null} */ readonly GovernmentPurchaseEntityType: "Union" | "State" | "FederalDistrict" | "Municipality" | null; /** * @description Tipo de operação com o ente governamental (tpOperGov). * Valores possíveis: * - `Supply`: Fornecimento * - `Payment`: Recebimento do pagamento * - `SupplyThenPay`: Fornecimento e pagamento simultâneo * - `PayForPastSupply`: Pagamento por fornecimento passado * - `SupplyAfterPay`: Fornecimento após pagamento * - `PayNowSupplyLater`: Pagamento agora, fornecimento depois * - `SupplyAndPayNow`: Fornecimento e pagamento agora * @enum {string|null} */ readonly GovernmentPurchaseOperationType: "Supply" | "Payment" | "SupplyThenPay" | "PayForPastSupply" | "SupplyAfterPay" | "PayNowSupplyLater" | "SupplyAndPayNow" | null; /** @description Grupo de Compras Governamentais (gCompraGov). Grupo opcional. Informar apenas para compras governamentais. */ readonly GovernmentPurchaseResource: { readonly entityType?: components$2["schemas"]["GovernmentPurchaseEntityType"]; /** * Format: double * @description Percentual de redução de alíquota em compra governamental (pRedutor). Conforme o art. 472/370 da LC 214/2025. */ readonly rateReduction?: number | null; readonly operationType?: components$2["schemas"]["GovernmentPurchaseOperationType"]; }; /** @description Grupo de informações sobre a composição do valor do IBS e CBS nas compras governamentais. Informar apenas para compras governamentais. */ readonly GovernmentPurchaseTaxResource: { /** * Format: double * @description Alíquota IBS UF em compras governamentais (pAliqIBSUF). */ readonly stateRate?: number | null; /** * Format: double * @description Valor IBS UF em compras governamentais (vTribIBSUF). */ readonly stateAmount?: number | null; /** * Format: double * @description Alíquota IBS Município em compras governamentais (pAliqIBSMun). */ readonly municipalRate?: number | null; /** * Format: double * @description Valor IBS Município em compras governamentais (vTribIBSMun). */ readonly municipalAmount?: number | null; /** * Format: double * @description Alíquota CBS em compras governamentais (pAliqCBS). */ readonly cbsRate?: number | null; /** * Format: double * @description Valor CBS em compras governamentais (vTribCBS) */ readonly cbsAmount?: number | null; }; /** @description Grupo de Informações do IBS e CBS */ readonly IBSCBSTaxResource: { /** @description Código de Situação Tributária do IBS/CBS (CST). Campo opcional. Se preenchido, será considerado; caso contrário, será definido com base no valor informado no campo `classCode`. Consulte a tabela de referência de `situationCode` (CST) disponível na nossa documentação funcional. */readonly situationCode?: string | null; /** @description Código de Classificação Tributária do IBS/CBS (cClassTrib). Consulte a tabela de referência [cClassTrib](https://nfe.io/docs/documentacao/reforma-tributaria/conceitos-funcionais/tabelas-de-referencia/tabela-referencia-cst-classificacao-tributaria-ibs-cbs/) disponível na nossa documentação funcional. */ readonly classCode?: string | null; /** * @description Modo de cálculo do IBS/CBS. * Valores possíveis: * - `Manual`: Preenchimento manual dos campos de tributo. * - `OfficialService`: Utiliza o serviço oficial para calcular IBS/CBS. Quando ativo, apenas `situationCode` e `classCode` são necessários; os demais campos de tributo são ignorados na entrada e preenchidos pelo serviço. * @default Manual * @enum {string|null} */ readonly calculationMode: "Manual" | "OfficialService" | null; /** @description Indica a natureza da operação de doação, orientando a apuração e a geração de débitos ou estornos conforme o cenário (indDoacao). Informar quando for doação. */ readonly donationIndicator?: string | null; /** * Format: double * @description Base de cálculo antes de reduções para cálculo do tributo bruto. Este campo é opcional. Se enviado, será considerado; caso contrário, será calculado. */ readonly basis?: number | null; readonly state?: components$2["schemas"]["IBSStateTaxResource"]; readonly municipal?: components$2["schemas"]["IBSMunicipalTaxResource"]; /** * Format: double * @description Total do IBS (vIBSTot = vIBSUF + vIBSMun). Quando houver crédito presumido com o indicador "IndDeduzCredPres=1", o valor de vCredPres deve ser deduzido deste total. */ readonly ibsTotalAmount?: number | null; readonly cbs?: components$2["schemas"]["CBSTaxResource"]; /** @description Tributação regular hipotética caso condição resolutória/suspensiva não se aplique. */ readonly regularTaxation?: components$2["schemas"]["RegularTaxationResource"]; /** @description Grupo de informações sobre a composição do valor do IBS e CBS nas compras governamentais. */ readonly governmentPurchase?: components$2["schemas"]["GovernmentPurchaseTaxResource"]; /** @description Grupo de Informações do IBS e CBS sobre transações monofásicas */ readonly monophase?: components$2["schemas"]["MonophaseIBSCBSTaxResource"]; /** @description Grupo de Informações sobre Transferências de Crédito */ readonly creditTransfer?: components$2["schemas"]["CreditTransferTaxResource"]; /** @description Informações sobre o crédito presumido operacional (gCredPresOper). */ readonly operationalPresumedCredit?: components$2["schemas"]["OperationalPresumedCreditResource"]; /** @description Estorno de Crédito (gEstornoCred). Observação: a obrigatoriedade ou vedação do preenchimento deste grupo está condicionada ao indicador “ind_gEstornoCred” da tabela de cClassTrib do IBS e da CBS. */ readonly creditReversal?: components$2["schemas"]["CreditReversalResource"]; /** @description Informações sobre o crédito presumido de IBS para fornecimentos da ZFM (gCredPresIBSZFM). */ readonly zfmPresumedCredit?: components$2["schemas"]["ZfmPresumedCreditResource"]; }; /** @description Grupo de Valores Totais referentes ao ICMS */ readonly ICMSTotal: { /** * Format: double * @description Base de Cálculo do ICMS (vBC) */ readonly baseTax?: number | null; /** * Format: double * @description Valor Total do ICMS (vICMS) */ readonly icmsAmount?: number | null; /** * Format: double * @description Valor ICMS Total desonerado (vICMSDeson) */ readonly icmsExemptAmount?: number | null; /** * Format: double * @description Base de Cálculo do ICMS Substituição Tributária (vBCST) */ readonly stCalculationBasisAmount?: number | null; /** * Format: double * @description Valor Total do ICMS ST (vST) */ readonly stAmount?: number | null; /** * Format: double * @description Valor Total dos produtos e serviços (vProd) */ readonly productAmount?: number; /** * Format: double * @description Valor Total do Frete (vFrete) */ readonly freightAmount?: number | null; /** * Format: double * @description Valor Total do Seguro (vSeg) */ readonly insuranceAmount?: number | null; /** * Format: double * @description Valor Total do Desconto (vDesc) */ readonly discountAmount?: number | null; /** * Format: double * @description Valor Total do Imposto de Importação (vII) */ readonly iiAmount?: number | null; /** * Format: double * @description Valor Total do IPI (vIPI) */ readonly ipiAmount?: number | null; /** * Format: double * @description Valor do PIS (vPIS) */ readonly pisAmount?: number | null; /** * Format: double * @description Valor do COFINS (vCOFINS) */ readonly cofinsAmount?: number | null; /** * Format: double * @description Outras Despesas acessórias (vOutro) */ readonly othersAmount?: number | null; /** * Format: double * @description Valor Total da NF-e (vNF) */ readonly invoiceAmount?: number; /** * Format: double * @description Valor Total ICMS FCP UF Destino */ readonly fcpufDestinationAmount?: number | null; /** * Format: double * @description Valor Total ICMS Interestadual UF Destino */ readonly icmsufDestinationAmount?: number | null; /** * Format: double * @description Valor Total ICMS Interestadual UF Rem. */ readonly icmsufSenderAmount?: number | null; /** * Format: double * @description Valor aproximado total de tributos federais, estaduais e municipais. (vTotTrib) */ readonly federalTaxesAmount?: number; /** * Format: double * @description Valor Total do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCP) */ readonly fcpAmount?: number | null; /** * Format: double * @description Valor Total do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCPST) retido por substituição tributária. */ readonly fcpstAmount?: number | null; /** * Format: double * @description Valor Total do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCP) retido anteriormente por substituição tributária. */ readonly fcpstRetAmount?: number | null; /** * Format: double * @description Valor total do IPI devolvido (vIPIDevol) */ readonly ipiDevolAmount?: number | null; /** Format: double */ readonly qBCMono?: number | null; /** * Format: double * @description Valor total do ICMS monofásico próprio (vICMSMono). */ readonly vICMSMono?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico sujeito a retenção (qBCMonoReten). */ readonly qBCMonoReten?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico retido anteriormente(vICMSMonoReten) */ readonly vICMSMonoReten?: number | null; /** * Format: double * @description Valor total do ICMS monofásico retido anteriormente (vICMSMonoRet) */ readonly qBCMonoRet?: number | null; /** * Format: double * @description Valor total do ICMS monofásico retido anteriormente (vICMSMonoRet) */ readonly vICMSMonoRet?: number | null; }; /** @description Grupo de Valores Totais referentes ao ICMS */ readonly ICMSTotalResource: { /** * Format: double * @description Base de Cálculo do ICMS (vBC) */ readonly baseTax?: number | null; /** * Format: double * @description Valor Total do ICMS (vICMS) */ readonly icmsAmount?: number | null; /** * Format: double * @description Valor ICMS Total desonerado (vICMSDeson) */ readonly icmsExemptAmount?: number | null; /** * Format: double * @description Base de Cálculo do ICMS Substituição Tributária (vBCST) */ readonly stCalculationBasisAmount?: number | null; /** * Format: double * @description Valor Total do ICMS ST (vST) */ readonly stAmount?: number | null; /** * Format: double * @description Valor Total dos produtos e serviços (vProd) */ readonly productAmount?: number | null; /** * Format: double * @description Valor Total do Frete (vFrete) */ readonly freightAmount?: number | null; /** * Format: double * @description Valor Total do Seguro (vSeg) */ readonly insuranceAmount?: number | null; /** * Format: double * @description Valor Total do Desconto (vDesc) */ readonly discountAmount?: number | null; /** * Format: double * @description Valor Total do Imposto de Importação (vII) */ readonly iiAmount?: number | null; /** * Format: double * @description Valor Total do IPI (vIPI) */ readonly ipiAmount?: number | null; /** * Format: double * @description Valor do PIS (vPIS) */ readonly pisAmount?: number | null; /** * Format: double * @description Valor do COFINS (vCOFINS) */ readonly cofinsAmount?: number | null; /** * Format: double * @description Outras Despesas acessórias (vOutro) */ readonly othersAmount?: number | null; /** * Format: double * @description Valor Total da NF-e (vNF) */ readonly invoiceAmount?: number | null; /** * Format: double * @description Valor Total ICMS FCP UF Destino (vFCPUFDest) */ readonly fcpufDestinationAmount?: number | null; /** * Format: double * @description Valor Total ICMS Interestadual UF Destino (vICMSUFDest) */ readonly icmsufDestinationAmount?: number | null; /** * Format: double * @description Valor Total ICMS Interestadual UF Remetente (vICMSUFRemet) */ readonly icmsufSenderAmount?: number | null; /** * Format: double * @description Valor aproximado total de tributos federais, estaduais e municipais. * (vTotTrib) */ readonly federalTaxesAmount?: number | null; /** * Format: double * @description Valor Total do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCP) */ readonly fcpAmount?: number | null; /** * Format: double * @description Valor Total do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCPST) retido por substituição tributária. */ readonly fcpstAmount?: number | null; /** * Format: double * @description Valor Total do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária (vFCPSTRet) */ readonly fcpstRetAmount?: number | null; /** * Format: double * @description Valor total do IPI devolvido (vIPIDevol) */ readonly ipiDevolAmount?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico próprio (qBCMono) */ readonly qBCMono?: number | null; /** * Format: double * @description Valor total do ICMS monofásico próprio (vICMSMono). */ readonly vICMSMono?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico sujeito a retenção (qBCMonoReten). */ readonly qBCMonoReten?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico retido anteriormente(vICMSMonoReten) */ readonly vICMSMonoReten?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico retido anteriormente(qBCMonoRet) */ readonly qBCMonoRet?: number | null; /** * Format: double * @description Valor total do ICMS monofásico retido anteriormente (vICMSMonoRet) */ readonly vICMSMonoRet?: number | null; }; /** @description Grupo de Tributação do ICMS de Destino da UF */ readonly ICMSUFDestinationTaxResource: { /** * Format: double * @description Valor da Base de Cálculo do ICMS na UF de destino (vBCUFDest) */ readonly vBCUFDest?: number | null; /** * Format: double * @description Percentual adicional inserido na alíquota interna da UF de destino, relativo ao Fundo de Combate à Pobreza (FCP) naquela UF (pFCPUFDest) */ readonly pFCPUFDest?: number | null; /** * Format: double * @description Alíquota adotada nas operações internas na UF de destino para o produto / mercadoria (pICMSUFDest) */ readonly pICMSUFDest?: number | null; /** * Format: double * @description Alíquota interestadual das UF envolvidas (pICMSInter) */ readonly pICMSInter?: number | null; /** * Format: double * @description Percentual de ICMS Interestadual para a UF de destino (pICMSInterPart) */ readonly pICMSInterPart?: number | null; /** * Format: double * @description Valor do ICMS relativo ao Fundo de Combate à Pobreza (FCP) da UF de destino (vFCPUFDest */ readonly vFCPUFDest?: number | null; /** * Format: double * @description Valor do ICMS * Interestadual para a UF de destino (vICMSUFDest) */ readonly vICMSUFDest?: number | null; /** * Format: double * @description Valor do ICMS Interestadual para a UF do remetente (vICMSUFRemet) */ readonly vICMSUFRemet?: number | null; /** * Format: double * @description Valor da BC FCP na UF de destino (vBCFCPUFDest) */ readonly vBCFCPUFDest?: number | null; }; /** @description Grupo de Informações do IBS para o município */ readonly IBSMunicipalTaxResource: { /** * Format: double * @description Alíquota IBS (Município) (%). */ readonly rate?: number | null; readonly deferment?: components$2["schemas"]["DefermentTaxResource"]; readonly returnedAmount?: components$2["schemas"]["ReturnedTaxResource"]; readonly reduction?: components$2["schemas"]["ReductionTaxResource"]; /** * Format: double * @description Valor do IBS do Município (vIBSMun). */ readonly amount?: number | null; }; /** @description Grupo de Informações do IBS para a UF */ readonly IBSStateTaxResource: { /** * Format: double * @description Alíquota do IBS de competência das UF (em percentual). Alíquota vigente do IBS da UF.Preencher de acordo com a tabela de alíquotas do IBS e CBS. */ readonly rate?: number | null; readonly deferment?: components$2["schemas"]["DefermentTaxResource"]; readonly returnedAmount?: components$2["schemas"]["ReturnedTaxResource"]; readonly reduction?: components$2["schemas"]["ReductionTaxResource"]; /** * Format: double * @description Valor do IBS da UF (vIBSUF). */ readonly amount?: number | null; }; /** * @description Grupo do Imposto de Importação * * Id: P01 * Pai: O01 */ readonly IITaxResource: { /** @description Valor BC do Imposto de Importação (vBC) */readonly baseTax?: string | null; /** @description Valor despesas aduaneiras (vDespAdu) */ readonly customsExpenditureAmount?: string | null; /** * Format: double * @description Valor Imposto de Importação (vII) */ readonly amount?: number | null; /** * Format: double * @description Valor Imposto sobre Operações Financeiras (vIOF) */ readonly iofAmount?: number | null; /** * Format: double * @description Valor dos encargos cambiais */ readonly vEnqCamb?: number | null; }; /** * @description Grupo do IPI * * Informar apenas quando * o item for sujeito ao IPI * * ID: O01 * * Pai: M01 */ readonly IPITaxResource: { /** @description Código da situação tributária do IPI (CST) */readonly cst?: string | null; /** @description Código de Enquadramento Legal do IPI (cEnq) */ readonly classificationCode?: string | null; /** @description Classe de enquadramento do IPI para Cigarros e Bebidas (clEnq) */ readonly classification?: string | null; /** @description CNPJ do produtor da mercadoria, quando diferente do emitente. Somente para os casos de exportação direta ou indireta (CNPJProd) */ readonly producerCNPJ?: string | null; /** @description Código do selo de controle IPI (cSelo) */ readonly stampCode?: string | null; /** * Format: double * @description Quantidade de selo de controle (qSelo) */ readonly stampQuantity?: number | null; /** * Format: double * @description Valor da BC do IPI (vBC) */ readonly base?: number | null; /** * Format: double * @description Alíquota do IPI (pIPI) */ readonly rate?: number | null; /** * Format: double * @description Quantidade total na unidade padrão para tributação (somente para os produtos tributados por unidade) (qUnid) */ readonly unitQuantity?: number | null; /** * Format: double * @description Valor por Unidade Tributável (vUnid) */ readonly unitAmount?: number | null; /** * Format: double * @description Valor IPI (vIPI) */ readonly amount?: number | null; }; readonly ISSQNTotal: { /** * Format: double * @description Valor Total Serv.Não Tributados p/ ICMS (vServ) */ readonly totalServiceNotTaxedICMS?: number | null; /** * Format: double * @description Base de Cálculo do ISS (vBC) */ readonly baseRateISS?: number | null; /** * Format: double * @description Valor Total do ISS (vISS) */ readonly totalISS?: number | null; /** * Format: double * @description Valor do PIS sobre Serviços (vPIS) */ readonly valueServicePIS?: number | null; /** * Format: double * @description Valor da COFINS sobre Serviços (vCOFINS) */ readonly valueServiceCOFINS?: number | null; /** * Format: date-time * @description Data Prestação Serviço (dCompet) */ readonly provisionService?: string | null; /** * Format: double * @description Valor Dedução para Redução da BC (vDeducao) */ readonly deductionReductionBC?: number | null; /** * Format: double * @description Valor Outras Retenções (vOutro) */ readonly valueOtherRetention?: number | null; /** * Format: double * @description Valor Desconto Incondicionado (vDescIncond) */ readonly discountUnconditional?: number | null; /** * Format: double * @description Valor Desconto Condicionado (vDescCond) */ readonly discountConditioning?: number | null; /** * Format: double * @description Valor Total Retenção ISS (vISSRet) */ readonly totalRetentionISS?: number | null; /** * Format: double * @description Código Regime Tributação (cRegTrib) */ readonly codeTaxRegime?: number | null; }; readonly ISSQNTotalResource: { /** * Format: double * @description Valor Total Serv.Não Tributados p/ ICMS (vServ) */ readonly totalServiceNotTaxedICMS?: number | null; /** * Format: double * @description Base de Cálculo do ISS (vBC) */ readonly baseRateISS?: number | null; /** * Format: double * @description Valor Total do ISS (vISS) */ readonly totalISS?: number | null; /** * Format: double * @description Valor do PIS sobre Serviços (vPIS) */ readonly valueServicePIS?: number | null; /** * Format: double * @description Valor da COFINS sobre Serviços (vCOFINS) */ readonly valueServiceCOFINS?: number | null; /** * Format: date-time * @description Data Prestação Serviço (dCompet) */ readonly provisionService?: string | null; /** * Format: double * @description Valor Dedução para Redução da BC (vDeducao) */ readonly deductionReductionBC?: number | null; /** * Format: double * @description Valor Outras Retenções (vOutro) */ readonly valueOtherRetention?: number | null; /** * Format: double * @description Valor Desconto Incondicionado (vDescIncond) */ readonly discountUnconditional?: number | null; /** * Format: double * @description Valor Desconto Condicionado (vDescCond) */ readonly discountConditioning?: number | null; /** * Format: double * @description Valor Total Retenção ISS (vISSRet) */ readonly totalRetentionISS?: number | null; /** * Format: double * @description Código Regime Tributação (cRegTrib) */ readonly codeTaxRegime?: number | null; }; /** @description Imposto Seletivo (IS). Informe quando o item estiver sujeito ao IS. */ readonly ISTaxResource: { /** @description CST do Imposto Seletivo (IS). Código de Situação Tributária de 3 dígitos (CST). Consulte a tabela de referência. */readonly situationCode?: string | null; /** @description Código de Classificação Tributária do IS (cClassTribIS), 6 dígitos. Consulte a tabela de referência. */ readonly classificationCode?: string | null; /** * Format: double * @description Base de cálculo do IS (vBCIS). 15 posições, 13 inteiros e 2 decimais. */ readonly basis?: number | null; /** * Format: double * @description Alíquota do IS em percentual (pIS). Até 4 casas decimais. */ readonly rate?: number | null; /** * Format: double * @description Alíquota específica por unidade (pISEspec), em R$ por unidade tributável. */ readonly unitRate?: number | null; /** @description Unidade tributável usada quando houver alíquota específica por unidade (uTrib). */ readonly unit?: string | null; /** * Format: double * @description Quantidade tributável usada quando houver alíquota específica por unidade (qTrib). Até 4 casas decimais. */ readonly quantity?: number | null; /** * Format: double * @description Valor do Imposto Seletivo (vIS). 15 posições, 13 inteiros e 2 decimais. */ readonly amount?: number | null; }; /** * Format: int64 * @description Código do Município de ocorrência do fato gerador do IBS/CBS (cMunFGIBS). Informar o município de ocorrência do fato gerador do IBS/CBS. Este campo só é preenchido quando "indPres = 5 (Operação presencial, fora do estabelecimento)" e não incluir o endereço do destinatário (Grupo: E05) ou local de entrega (Grupo: G01). */ readonly IbsConsumptionCityCode: number | null; /** * @description Classificação para cálculo do crédito presumido de IBS para fornecimentos da ZFM (tpCredPresIBSZFM). * Valores possíveis: * - `NoPresumedCredit`: Sem Crédito Presumido * - `FinalConsumptionGoods`: Bens de consumo final (55%) * - `CapitalGoods`: Bens de capital (75%) * - `IntermediateGoods`: Bens intermediários (90,25%) * - `ItAndOtherGoods`: Bens de informática e outros definidos em legislação (100%) * @enum {string|null} */ readonly IbsZfmPresumedCreditClassification: "NoPresumedCredit" | "FinalConsumptionGoods" | "CapitalGoods" | "IntermediateGoods" | "ItAndOtherGoods" | null; /** * @description Grupo do ICMS da Operação própria e ST (ICMS). * **Regra de obrigatoriedade**: deve-se informar **exatamente um** entre `cst` (Regime Normal) ou `csosn` (Simples Nacional). A SEFAZ não aceita ambos preenchidos ou nenhum dos dois. */ readonly IcmsTaxResource: { /** * @description Origem da mercadoria (orig). * 0 - Nacional, exceto as indicadas nos códigos 3, 4, 5 e 8; * 1 - Estrangeira - Importação direta, exceto a indicada no código 6; * 2 - Estrangeira - Adquirida no mercado interno, exceto a indicada no código 7; * 3 - Nacional, mercadoria ou bem com Conteúdo de Importação superior a 40% e inferior ou igual a 70%; * 4 - Nacional, cuja produção tenha sido feita em conformidade com os processos produtivos básicos de que tratam as legislações citadas nos Ajustes; * 5 - Nacional, mercadoria ou bem com Conteúdo de Importação inferior ou igual a 40%; * 6 - Estrangeira - Importação direta, sem similar nacional, constante em lista da CAMEX e gás natural; * 7 - Estrangeira - Adquirida no mercado interno, sem similar nacional, constante lista CAMEX e gás natural; * 8 - Nacional, mercadoria ou bem com Conteúdo de Importação superior a 70%; */ readonly origin: string; /** @description Tributação do ICMS (CST) — obrigatório quando o emitente é do Regime Normal. Mutuamente exclusivo com `csosn`. */ readonly cst?: string | null; /** @description 101- Tributada pelo Simples Nacional com permissão de crédito (v.2.0) (CSOSN). Código de Situação da Operação – Simples Nacional */ readonly csosn?: string | null; /** * @description Modalidade de determinação da BC do ICMS (modBC). * Margem Valor Agregado (%) = 0 * Pauta (valor) = 1 * Preço Tabelado Máximo (valor) = 2 * Valor da Operação = 3 */ readonly baseTaxModality?: string | null; /** * Format: double * @description Valor da BC do ICMS (vBC) */ readonly baseTax?: number | null; /** @description Modalidade de determinação da BC do ICMS ST (modBCST) */ readonly baseTaxSTModality?: string | null; /** @description Percentual da Redução de BC do ICMS ST (pRedBCST) */ readonly baseTaxSTReduction?: string | null; /** * Format: double * @description Valor da BC do ICMS ST (vBCST) */ readonly baseTaxST?: number | null; /** * Format: double * @description Percentual da Redução de BC (pRedBC) */ readonly baseTaxReduction?: number | null; /** @description Código de Benefício na UF para Redução da Base de Cálculo (cBenefRBC). Tamanho 8 ou 10, quando exigido pela UF (NT 2019.001). Código de Benefício Fiscal utilizado pelo Estado, aplicado ao item quando houver RBC. Observação: Deve ser utilizado o mesmo código utilizado na EFD e demais declarações nos Estados que o exigem. (Incluído na NT 2019.001) */ readonly basisBenefitCode?: string | null; /** * Format: double * @description Alíquota do imposto do ICMS ST (pICMSST) */ readonly stRate?: number | null; /** * Format: double * @description Valor do ICMS ST (vICMSST) */ readonly stAmount?: number | null; /** * Format: double * @description Percentual da margem de valor Adicionado do ICMS ST (pMVAST) */ readonly stMarginAmount?: number | null; /** * Format: double * @description Alíquota do imposto (pICMS) */ readonly rate?: number | null; /** * Format: double * @description Valor do ICMS (vICMS). O valor do ICMS desonerado será informado apenas nas operações: * a) com produtos beneficiados com a desoneração condicional do ICMS. * b) destinadas à SUFRAMA, informando-se o valor que seria devido se não houvesse isenção. * c) de venda a órgãos da administração pública direta e suas fundações e autarquias com isenção do ICMS. (NT 2011/004) */ readonly amount?: number | null; /** * Format: double * @description Percentual da Redução de BC (pICMS) */ readonly percentual?: number | null; /** * Format: double * @description Alíquota aplicável de cálculo do crédito (Simples Nacional) (pCredSN). */ readonly snCreditRate?: number | null; /** * Format: double * @description Valor crédito do ICMS que pode ser aproveitado nos termos do art. 23 da LC 123 Simples Nacional (vCredICMSSN) */ readonly snCreditAmount?: number | null; /** @description Percentual da margem de valor Adicionado do ICMS ST (pMVAST) */ readonly stMarginAddedAmount?: string | null; /** @description Valor do ICMS ST retido (vICMSSTRet) */ readonly stRetentionAmount?: string | null; /** @description Valor da BC do ICMS ST retido (vBCSTRet) */ readonly baseSTRetentionAmount?: string | null; /** @description Percentual da BC operação própria (pBCOp). Percentual para determinação do valor da Base de Cálculo da operação própria (v2.0) */ readonly baseTaxOperationPercentual?: string | null; /** @description UF para qual é devido o ICMS ST (UFST). Sigla da UF para qual é devido o ICMS ST da operação (v2.0) */ readonly ufst?: string | null; /** @description Motivo Desoneração ICMS (motDesICMS) */ readonly amountSTReason?: string | null; /** @description Valor da BC do ICMS ST retido (vBCSTRet) */ readonly baseSNRetentionAmount?: string | null; /** @description Valor do ICMS ST retido (vICMSSTRet) */ readonly snRetentionAmount?: string | null; /** @description Valor do ICMS da Operação (vICMSOp) */ readonly amountOperation?: string | null; /** @description Percentual do Diferimento (pDif) */ readonly percentualDeferment?: string | null; /** @description Valor do ICMS Diferido (vICMSDif) */ readonly baseDeferred?: string | null; /** * Format: double * @description Valor ICMS Desonerado (vICMSDeson) */ readonly exemptAmount?: number | null; /** @description Motivo da desoneração do ICMS (motDesICMS) */ readonly exemptReason?: components$2["schemas"]["ExemptReason"]; /** * Format: double * @description Valor ICMS Desonerado (vICMSSTDeson) */ readonly exemptAmountST?: number | null; /** @description Motivo da desoneração do ICMS ST (motDesICMSST) */ readonly exemptReasonST?: components$2["schemas"]["ExemptReason"]; /** * Format: double * @description Percentual do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza (pFCP) */ readonly fcpRate?: number | null; /** * Format: double * @description Valor Total do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCP) */ readonly fcpAmount?: number | null; /** * Format: double * @description Percentual do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido por substituição tributária (pFCPST) */ readonly fcpstRate?: number | null; /** * Format: double * @description Valor Total do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido por substituição tributária (vFCPST) */ readonly fcpstAmount?: number | null; /** * Format: double * @description Percentual do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária (pFCPSTRet) */ readonly fcpstRetRate?: number | null; /** * Format: double * @description Valor Total do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária (vFCPSTRet) */ readonly fcpstRetAmount?: number | null; /** * Format: double * @description Informar o valor da Base de Cálculo do FCP (vBCFCPST) */ readonly baseTaxFCPSTAmount?: number | null; /** * Format: double * @description Valor do ICMS próprio do Substituto (tag: vICMSSubstituto) */ readonly substituteAmount?: number | null; /** * Format: double * @description N26a - Alíquota suportada pelo Consumidor Final (pST). Deve ser informada a alíquota do cálculo do ICMS-ST, já incluso o FCP caso incida sobre a mercadoria */ readonly stFinalConsumerRate?: number | null; /** * Format: double * @description N34 - Percentual de redução da base de cálculo efetiva, caso estivesse submetida ao regime comum de tributação (pRedBCEfet) */ readonly effectiveBaseTaxReductionRate?: number | null; /** * Format: double * @description N35 - Valor da base de cálculo efetiva, caso estivesse submetida ao regime comum de tributação (vBCEfet) */ readonly effectiveBaseTaxAmount?: number | null; /** * Format: double * @description N36 - Alíquota do ICMS efetiva, caso estivesse submetida ao regime comum de tributação (pICMSEFET) */ readonly effectiveRate?: number | null; /** * Format: double * @description N37 - Valor do ICMS efetivo, caso estivesse submetida ao regime comum de tributação (vICMSEFET) */ readonly effectiveAmount?: number | null; /** @description Indicador de dedução do ICMS desonerado (indDeducao) */ readonly deductionIndicator?: components$2["schemas"]["DuductionIndicator"]; }; /** @description Declaração Importação (DI) */ readonly ImportDeclarationResource: { /** @description Número do Documento de Importação da DI/DSI/DA (nDI) */readonly code?: string | null; /** * Format: date-time * @description Data de Registro da DI/DSI/DA (dDI) */ readonly registeredOn?: string | null; /** @description Local de desembaraço (xLocDesemb) */ readonly customsClearanceName?: string | null; /** @description Sigla da UF onde ocorreu o Desembaraço Aduaneiro (UFDesemb) */ readonly customsClearanceState?: components$2["schemas"]["StateCode"]; /** * Format: date-time * @description Data do Desembaraço Aduaneiro (dDesemb) */ readonly customsClearancedOn?: string | null; /** @description Adições (adi) */ readonly additions?: readonly components$2["schemas"]["AdditionResource"][] | null; /** @description Código do exportador (cExportador) */ readonly exporter?: string | null; /** @description Via de transporte internacional informada na Declaração de Importação (DI) (tpViaTransp) */ readonly internationalTransport?: components$2["schemas"]["InternationalTransportType"]; /** * Format: double * @description Valor Adicional ao frete para renovação de marinha mercante (vAFRMM) */ readonly afrmmAmount?: number | null; /** @description Forma de importação quanto a intermediação (tpIntermedio) */ readonly intermediation?: components$2["schemas"]["IntermediationType"]; /** @description CNPJ/CPF do adquirente ou do encomendante (CNPJ ou CPF) */ readonly acquirerFederalTaxNumber?: string | null; /** @description Sigla da UF do adquirente ou do encomendante (UFTerceiro) */ readonly stateThird?: string | null; }; /** * @description Tipo de Integração para pagamento (tpIntegra). * Valores possíveis: * - `Integrated`: 1 - Pagamento integrado com o sistema de automação da empresa (ex: equipamento TEF, Comércio Eletrônico) * - `NotIntegrated`: 2 - Pagamento não integrado com o sistema de automação da empresa (ex: equipamento POS) * @enum {string} */ readonly IntegrationPaymentType: "Integrated" | "NotIntegrated"; /** @description Grupo de Informações do Intermediador da Transação (infIntermed) */ readonly IntermediateResource: { /** * Format: int64 * @description CNPJ do Intermediador da Transação (agenciador, plataforma de delivery, marketplace e similar) de serviços e de negócios (CNPJ). */ readonly federalTaxNumber?: number | null; /** @description Identificador cadastrado no intermediador (idCadIntTran) */ readonly identifier?: string | null; }; /** * @description Forma de importação quanto a intermediação (tpIntermedio). * Valores possíveis: * - `None`: Não definido * - `ByOwn`: Importação por conta própria * - `ImportOnBehalf`: Importação por conta e ordem de terceiro * - `ByOrder`: Importação por encomenda * @enum {string} */ readonly IntermediationType: "None" | "ByOwn" | "ImportOnBehalf" | "ByOrder"; /** * @description Via de transporte internacional (tpViaTransp). * Valores possíveis: * - `None`: Não definido * - `Maritime`: Marítima * - `River`: Fluvial * - `Lake`: Lacustre * - `Airline`: Aérea * - `Postal`: Postal * - `Railway`: Ferroviária * - `Highway`: Rodoviária * - `Network`: Conduto / Rede Transmissão * - `Own`: Meios Próprios * - `Ficta`: Entrada / Saída ficta * - `Courier`: Serviço de Courrier * - `Handcarry`: Em mãos * @enum {string} */ readonly InternationalTransportType: "None" | "Maritime" | "River" | "Lake" | "Airline" | "Postal" | "Railway" | "Highway" | "Network" | "Own" | "Ficta" | "Courier" | "Handcarry"; readonly InvoiceEventsResource: { /** @description Lista de Eventos ocorridos na Nota Fiscal */readonly events?: readonly components$2["schemas"]["ActivityResource"][] | null; /** @description Identificador de possibilidade de mais itens. */ readonly hasMore?: boolean | null; /** @description Identificação */ readonly id?: string | null; /** @description Identificador da Conta */ readonly accountId?: string | null; /** @description Identificador da Empresa */ readonly companyId?: string | null; }; readonly InvoiceEventsResourceBase: { /** @description Lista de Eventos ocorridos na Nota Fiscal */readonly events?: readonly components$2["schemas"]["ActivityResource"][] | null; /** @description Identificador de possibilidade de mais itens. */ readonly hasMore?: boolean | null; }; /** @description Grupo do detalhamento de Produtos e Serviços da NF-e */ readonly InvoiceItemResource: { /** @description Código do produto ou serviço (cProd) */readonly code: string; /** @description GTIN (Global Trade Item Number) do produto, antigo código EAN ou código de barras (cEAN) */ readonly codeGTIN?: string | null; /** @description Descrição do produto ou serviço (xProd) */ readonly description: string; /** @description Código NCM com 8 dígitos ou 2 dígitos (gênero) (NCM) */ readonly ncm: string; /** @description Nomenclatura de Valor Aduaneiro e Estatístico (NVE) */ readonly nve?: readonly string[] | null; /** @description Código Exceção da Tabela de IPI (EXTIPI) */ readonly extipi?: string | null; /** * Format: int64 * @description Código Fiscal de Operações e Prestações (CFOP) */ readonly cfop?: number | null; /** @description Unidade Comercial (uCom) */ readonly unit: string; /** * Format: double * @description Quantidade Comercial (qCom) */ readonly quantity: number; /** * Format: double * @description Valor Unitário de Comercialização (vUnCom) */ readonly unitAmount: number; /** * Format: double * @description Valor Total Bruto dos Produtos ou Serviços (vProd) */ readonly totalAmount: number; /** @description GTIN (Global Trade Item Number) da unidade tributável, antigo código EAN ou código de barras (cEANTrib) */ readonly codeTaxGTIN?: string | null; /** @description Unidade Tributável (uTrib) */ readonly unitTax: string; /** * Format: double * @description Quantidade Tributável (qTrib) */ readonly quantityTax?: number | null; /** * Format: double * @description Valor Unitário de tributação (vUnTrib) */ readonly taxUnitAmount?: number | null; /** * Format: double * @description Valor Total do Frete (vFrete) */ readonly freightAmount?: number | null; /** * Format: double * @description Valor Total do Seguro (vSeg) */ readonly insuranceAmount?: number | null; /** * Format: double * @description Valor do Desconto (vDesc) */ readonly discountAmount?: number | null; /** * Format: double * @description Outras despesas acessórias (vOutro) */ readonly othersAmount?: number | null; /** * @description Indica se valor do Item (vProd) entra no valor total da NF-e (vProd) (indTot) * @default true */ readonly totalIndicator: boolean | null; /** @description Indica fornecimento de bem móvel usado (indBemMovelUsado) */ readonly usedMovableAssetIndicator?: components$2["schemas"]["UsedMovableAssetIndicator"]; /** @description CEST - Código especificador da substituição tributária (CEST) */ readonly cest?: string | null; /** @description Tributos incidentes no Produto ou Serviço (imposto) */ readonly tax: components$2["schemas"]["InvoiceItemTaxResource"]; /** @description Informações Adicionais do Produto (infAdProd) */ readonly additionalInformation?: string | null; /** * Format: double * @description Valor total do item (vItem). */ readonly itemAmount?: number | null; /** @description Número do pedido de compra (xPed) */ readonly numberOrderBuy?: string | null; /** * Format: int32 * @description Item do Pedido de Compra (nItemPed) */ readonly itemNumberOrderBuy?: number | null; /** @description Número de controle da FCI - Ficha de Conteúdo de Importação (nFCI) */ readonly importControlSheetNumber?: string | null; /** * @description Detalhamento de Veículos novos (veicProd). Preencher exclusivamente quando o item da nota fiscal é um veículo 0 km. * **Mutuamente exclusivo** com `fuelDetail` e `medicineDetail` — cada item da nota pode conter no máximo um grupo de produto específico. */ readonly vehicleDetail?: components$2["schemas"]["VehicleDetailResource"]; /** @description Detalhamento de Combustível (comb) */ readonly fuelDetail?: components$2["schemas"]["FuelResource"]; /** @description Código de Benefício Fiscal na UF aplicado ao item (cBenef) */ readonly benefit?: string | null; /** @description Informações de Crédito Presumido por item (gCred) */ readonly presumedCredit?: components$2["schemas"]["PresumedCreditResource"]; /** @description Classificação conforme percentuais definidos no art. 450, § 1º, da LC 214/25 para o cálculo do crédito presumido (tpCredPresIBSZFM) */ readonly ibsZfmPresumedCreditClassification?: components$2["schemas"]["IbsZfmPresumedCreditClassification"]; /** @description Declaração Importação (DI) */ readonly importDeclarations?: readonly components$2["schemas"]["ImportDeclarationResource"][] | null; /** @description Grupo de informações de exportação para o item (detExport) */ readonly exportDetails?: readonly components$2["schemas"]["ExportDetailResource"][] | null; readonly referencedDFe?: components$2["schemas"]["ReferencedDFeResource"]; /** @description Grupo de informações fiscais para o cálculo automático de impostos (infFiscal). Se este grupo for preenchido, o grupo `tax.IBSCBS` será calculado automaticamente. Se não for preenchido, o cálculo automático do grupo `tax.IBSCBS` torna-se opcional. */ readonly taxDetermination?: components$2["schemas"]["TaxDeterminationResource"]; }; readonly InvoiceItemTaxResource: { /** * Format: double * @description Valor aproximado total de tributos federais, estaduais e municipais (vTotTrib) */ readonly totalTax?: number | null; /** @description Grupo do ICMS da Operação própria e ST (ICMS) */ readonly icms: components$2["schemas"]["IcmsTaxResource"]; /** @description Grupo do IPI (IPI) */ readonly ipi?: components$2["schemas"]["IPITaxResource"]; /** @description Grupo do Imposto de Importação (II) */ readonly ii?: components$2["schemas"]["IITaxResource"]; /** @description Grupo do PIS (PIS) */ readonly pis?: components$2["schemas"]["PISTaxResource"]; /** @description Grupo do COFINS (COFINS) */ readonly cofins?: components$2["schemas"]["CofinsTaxResource"]; /** @description Grupo de Tributação do ICMS de Destino da UF (ICMSUFDest) */ readonly icmsDestination?: components$2["schemas"]["ICMSUFDestinationTaxResource"]; /** @description Imposto Seletivo (IS) */ readonly IS?: components$2["schemas"]["ISTaxResource"]; /** @description Grupo de Informações do IBS e CBS */ readonly IBSCBS?: components$2["schemas"]["IBSCBSTaxResource"]; /** @description Ajuste de Competência (gAjusteCompet) */ readonly competenceAdjustment?: components$2["schemas"]["CompetenceAdjustmentResource"]; }; readonly InvoiceItemsResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificador da Empresa */ readonly companyId?: string | null; /** @description Identificador da Nota Fiscal */ readonly id?: string | null; /** @description Detalhamento de Produtos e Serviços (det) - Lista de Items da Nota Fiscal */ readonly items?: readonly components$2["schemas"]["InvoiceItemResource"][] | null; /** @description Identifica se existem mais items a serem consultados */ readonly hasMore?: boolean | null; }; readonly InvoiceResource: { /** @description Identificador único */readonly id?: string | null; /** * Format: int32 * @description Série do Documento Fiscal (serie) */ readonly serie?: number | null; /** * Format: int64 * @description Número do Documento Fiscal (nNF) */ readonly number?: number | null; /** @description Status da NF-e (cStat) */ readonly status?: components$2["schemas"]["InvoiceStatus"]; /** @description Informações do Protocolo de Autorização (protNFe) */ readonly authorization?: components$2["schemas"]["AuthorizationResource"]; /** @description Detalhes da contingência (dhCont) */ readonly contingencyDetails?: components$2["schemas"]["ContingencyDetails"]; /** @description Descrição da Natureza da Operação (natOp) */ readonly operationNature?: string | null; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string | null; /** * Format: date-time * @description Data de modificação */ readonly modifiedOn?: string | null; /** * Format: date-time * @description Data e Hora de Saída ou da Entrada da Mercadoria/Produto (dhSaiEnt). Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD. */ readonly operationOn?: string | null; /** @description Tipo do Documento Fiscal (tpNF) */ readonly operationType?: components$2["schemas"]["OperationType"]; /** @description Tipo de Ambiente (tpAmb) */ readonly environmentType?: components$2["schemas"]["EnvironmentType"]; /** @description Finalidade da emissão da NF-e (finNFe) */ readonly purposeType?: components$2["schemas"]["PurposeType"]; /** @description Identificação do Emitente (emit) */ readonly issuer?: components$2["schemas"]["IssuerResource"]; /** @description Identificação do Destinatário (dest) */ readonly buyer?: components$2["schemas"]["BuyerResource"]; /** @description Grupo de Valores Totais da NF-e (total) */ readonly totals?: components$2["schemas"]["TotalResource"]; /** @description Grupo de Informações do Transporte da NF-e (transp) */ readonly transport?: components$2["schemas"]["TransportInformationResource"]; /** @description Informações adicionais da NF-e (infAdic) */ readonly additionalInformation?: components$2["schemas"]["AdditionalInformationResource"]; /** @description Informações de exportação (exporta) */ readonly export?: components$2["schemas"]["ExportResource"]; /** @description Grupo Cobrança (cobr) */ readonly billing?: components$2["schemas"]["BillingResource"]; /** @description Grupo de Formas de Pagamento (pag) */ readonly payment?: readonly components$2["schemas"]["PaymentResource"][]; /** @description Grupo de Informações do Intermediador da Transação (infIntermed) */ readonly transactionIntermediate?: components$2["schemas"]["IntermediateResource"]; /** @description Identificação do Local de entrega (entrega) */ readonly delivery?: components$2["schemas"]["DeliveryInformationResource"]; /** @description Identificação do Local de retirada (retirada) */ readonly withdrawal?: components$2["schemas"]["WithdrawalInformationResource"]; /** @description Últimos eventos da NF-e (eventos) */ readonly lastEvents?: components$2["schemas"]["InvoiceEventsResourceBase"]; }; /** * @description Status da NF-e. * Valores possíveis: * - `None`: Não definido * - `Created`: Criada * - `Processing`: Processando * - `Issued`: Emitida * - `IssuedContingency`: Emitida em Contingência * - `Cancelled`: Cancelada * - `Disabled`: Inutilizada * - `IssueDenied`: Emissão Denegada * - `Error`: Erro * @enum {string} */ readonly InvoiceStatus: "None" | "Created" | "Processing" | "Issued" | "IssuedContingency" | "Cancelled" | "Disabled" | "IssueDenied" | "Error"; readonly InvoiceWithoutEventsResource: { /** @description Identificador único */readonly id?: string | null; /** * Format: int32 * @description Série do Documento Fiscal (serie) */ readonly serie?: number | null; /** * Format: int64 * @description Número do Documento Fiscal (nNF) */ readonly number?: number | null; /** @description Status da NF-e (cStat) */ readonly status?: components$2["schemas"]["InvoiceStatus"]; /** @description Informações do Protocolo de Autorização (protNFe) */ readonly authorization?: components$2["schemas"]["AuthorizationResource"]; /** @description Detalhes da contingência (dhCont) */ readonly contingencyDetails?: components$2["schemas"]["ContingencyDetails"]; /** @description Descrição da Natureza da Operação (natOp) */ readonly operationNature?: string | null; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string | null; /** * Format: date-time * @description Data de modificação */ readonly modifiedOn?: string | null; /** * Format: date-time * @description Data e Hora de Saída ou da Entrada da Mercadoria/Produto (dhSaiEnt). Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD. */ readonly operationOn?: string | null; /** @description Tipo do Documento Fiscal (tpNF) */ readonly operationType?: components$2["schemas"]["OperationType"]; /** @description Tipo de Ambiente (tpAmb) */ readonly environmentType?: components$2["schemas"]["EnvironmentType"]; /** @description Finalidade da emissão da NF-e (finNFe) */ readonly purposeType?: components$2["schemas"]["PurposeType"]; /** @description Identificação do Emitente (emit) */ readonly issuer?: components$2["schemas"]["IssuerResource"]; /** @description Identificação do Destinatário (dest) */ readonly buyer?: components$2["schemas"]["BuyerResource"]; /** @description Grupo de Valores Totais da NF-e (total) */ readonly totals?: components$2["schemas"]["TotalResource"]; /** @description Grupo de Informações do Transporte da NF-e (transp) */ readonly transport?: components$2["schemas"]["TransportInformationResource"]; /** @description Informações adicionais da NF-e (infAdic) */ readonly additionalInformation?: components$2["schemas"]["AdditionalInformationResource"]; /** @description Informações de exportação (exporta) */ readonly export?: components$2["schemas"]["ExportResource"]; /** @description Grupo Cobrança (cobr) */ readonly billing?: components$2["schemas"]["BillingResource"]; /** @description Grupo de Formas de Pagamento (pag) */ readonly payment?: readonly components$2["schemas"]["PaymentResource"][]; /** @description Grupo de Informações do Intermediador da Transação (infIntermed) */ readonly transactionIntermediate?: components$2["schemas"]["IntermediateResource"]; /** @description Identificação do Local de entrega (entrega) */ readonly delivery?: components$2["schemas"]["DeliveryInformationResource"]; /** @description Identificação do Local de retirada (retirada) */ readonly withdrawal?: components$2["schemas"]["WithdrawalInformationResource"]; }; readonly IssuerFromRequestResource: { /** @description IE do Substituto Tributário da UF de destino da mercadoria, quando houver a retenção do ICMS ST para a UF de destino. (IEST) */readonly stStateTaxNumber?: string | null; }; /** @description Grupo de identificação do emitente da NF-e */ readonly IssuerResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF (CNPJ/CPF) */ readonly federalTaxNumber?: number | null; /** @description Email (email) */ readonly email?: string | null; /** @description Dados do Endereço (enderEmit) */ readonly address?: components$2["schemas"]["AddressResource"]; /** @description Tipo da pessoa (indIEDest) */ readonly type?: components$2["schemas"]["PersonType"]; /** @description Nome Fantasia (xFant) */ readonly tradeName?: string | null; /** * Format: date-time * @description Data abertura da empresa (dIniAtiv) */ readonly openningDate?: string | null; /** @description Regime de tributação (CRT) */ readonly taxRegime?: components$2["schemas"]["TaxRegime"]; /** @description Regime especial de tributação (indRegTrib) */ readonly specialTaxRegime?: components$2["schemas"]["SpecialTaxRegime"]; /** @description Natureza jurídica (natJuridica) */ readonly legalNature?: components$2["schemas"]["LegalNature"]; /** @description Atividades da Empresa (CNAE) */ readonly economicActivities?: readonly components$2["schemas"]["EconomicActivityResource"][] | null; /** * Format: int64 * @description Número de Inscrição na Junta Comercial (nIRE) */ readonly companyRegistryNumber?: number | null; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number | null; /** * Format: int64 * @description Inscrição Estadual do Substituto Tributário (IEST) */ readonly regionalSTTaxNumber?: number | null; /** @description Número de Inscrição na Prefeitura (IM/CCM) */ readonly municipalTaxNumber?: string | null; /** @description IE do Substituto Tributário (IEST) */ readonly stStateTaxNumber?: string | null; }; /** * @description Código da Natureza Jurídica da empresa (natJuridica), conforme tabela do IBGE. * Valores possíveis: * - `EmpresaPublica`: Empresa Pública * - `SociedadeEconomiaMista`: Sociedade de Economia Mista * - `SociedadeAnonimaAberta`: Sociedade Anônima Aberta * - `SociedadeAnonimaFechada`: Sociedade Anônima Fechada * - `SociedadeEmpresariaLimitada`: Sociedade Empresária Limitada (LTDA) * - `SociedadeEmpresariaEmNomeColetivo`: Sociedade Empresária em Nome Coletivo * - `SociedadeEmpresariaEmComanditaSimples`: Sociedade Empresária em Comandita Simples * - `SociedadeEmpresariaEmComanditaporAcoes`: Sociedade Empresária em Comandita por Ações * - `SociedadeemContaParticipacao`: Sociedade em Conta de Participação * - `Empresario`: Empresário Individual * - `Cooperativa`: Cooperativa * - `ConsorcioSociedades`: Consórcio de Sociedades * - `GrupoSociedades`: Grupo de Sociedades * - `EmpresaDomiciliadaExterior`: Empresa Domiciliada no Exterior * - `ClubeFundoInvestimento`: Clube/Fundo de Investimento * - `SociedadeSimplesPura`: Sociedade Simples Pura * - `SociedadeSimplesLimitada`: Sociedade Simples Limitada * - `SociedadeSimplesEmNomeColetivo`: Sociedade Simples em Nome Coletivo * - `SociedadeSimplesEmComanditaSimples`: Sociedade Simples em Comandita Simples * - `EmpresaBinacional`: Empresa Binacional * - `ConsorcioEmpregadores`: Consórcio de Empregadores * - `ConsorcioSimples`: Consórcio Simples * - `EireliNaturezaEmpresaria`: EIRELI de Natureza Empresária * - `EireliNaturezaSimples`: EIRELI de Natureza Simples * - `ServicoNotarial`: Serviço Notarial e Registral (Cartórios) * - `FundacaoPrivada`: Fundação Privada * - `ServicoSocialAutonomo`: Serviço Social Autônomo * - `CondominioEdilicio`: Condomínio Edilício * - `ComissaoConciliacaoPrevia`: Comissão de Conciliação Prévia * - `EntidadeMediacaoArbitragem`: Entidade de Mediação e Arbitragem * - `PartidoPolitico`: Partido Político * - `EntidadeSindical`: Entidade Sindical * - `EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras`: Estabelecimento no Brasil de Fundação ou Associação Estrangeiras * - `FundacaoAssociacaoDomiciliadaExterior`: Fundação ou Associação Domiciliada no Exterior * - `OrganizacaoReligiosa`: Organização Religiosa * - `ComunidadeIndigena`: Comunidade Indígena * - `FundoPrivado`: Fundo Privado * - `AssociacaoPrivada`: Associação Privada * @enum {string} */ readonly LegalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @description Deferimento na tributação monofásica (para biocombustíveis). */ readonly MonophaseDefermentTaxResource: { /** * Format: double * @description Percentual de diferimento do IBS monofásico (pDifIBS). */ readonly ibsRate?: number | null; /** * Format: double * @description Valor do diferimento IBS monofásico (vIBSMonoDif). */ readonly ibsAmount?: number | null; /** * Format: double * @description Percentual de diferimento do CBS monofásico (pDifCBS). */ readonly cbsRate?: number | null; /** * Format: double * @description Valor do diferimento CBS monofásico (vCBSMonoDif). */ readonly cbsAmount?: number | null; }; /** @description Grupo de Informações do IBS e CBS sobre transações monofásicas */ readonly MonophaseIBSCBSTaxResource: { /** @description Informações de tributação monofásica padrão para IBS/CBS (gMonofasicoPadrao). */readonly standart?: components$2["schemas"]["MonophaseStandardTaxResource"]; /** @description Tributação monofásica sujeita à retenção (gMonofasicoRetido). */ readonly withholding?: components$2["schemas"]["MonophaseWithholdingTaxResource"]; /** @description Tributação monofásica previamente retida (gMonofasicoRetidoAnt). */ readonly previouslyWithheld?: components$2["schemas"]["MonophasePreviouslyWithheldTaxResource"]; /** @description Deferimento na tributação monofásica (para biocombustíveis) (gMonofasicoDif). */ readonly deferment?: components$2["schemas"]["MonophaseDefermentTaxResource"]; /** * Format: double * @description Total de IBS monofásico do item (vTotIBSMonoItem). */ readonly ibsAmount?: number | null; /** * Format: double * @description Total de CBS monofásico do item (vTotCBSMonoItem). */ readonly cbsAmount?: number | null; }; /** @description Tributação monofásica previamente retida. */ readonly MonophasePreviouslyWithheldTaxResource: { /** * Format: double * @description Quantidade base previamente retida (qBCMonoRet). */ readonly quantityBasis?: number | null; /** * Format: double * @description Alíquota ad rem IBS previamente retida (adRemIBSRet). */ readonly ibsAdRemRate?: number | null; /** * Format: double * @description Valor IBS previamente retido (vIBSMonoRet). */ readonly ibsAmount?: number | null; /** * Format: double * @description Alíquota ad rem CBS previamente retida (adRemCBSRet). */ readonly cbsAdRemRate?: number | null; /** * Format: double * @description Valor CBS previamente retido (vCBSMonoRet). */ readonly cbsAmount?: number | null; }; /** @description Informações de tributação monofásica padrão para IBS/CBS. */ readonly MonophaseStandardTaxResource: { /** * Format: double * @description Quantidade base tributada na monofásica (qBCMono). */ readonly quantityBasis?: number | null; /** * Format: double * @description Alíquota ad rem IBS (adRemIBS). */ readonly ibsAdRemRate?: number | null; /** * Format: double * @description Alíquota ad rem CBS (adRemCBS). */ readonly cbsAdRemRate?: number | null; /** * Format: double * @description Valor IBS monofásico (vIBSMono). */ readonly ibsAmount?: number | null; /** * Format: double * @description Valor CBS monofásico (vCBSMono). */ readonly cbsAmount?: number | null; }; /** @description Tributação monofásica sujeita à retenção. */ readonly MonophaseWithholdingTaxResource: { /** * Format: double * @description Quantidade base tributada na retenção monofásica (qBCMonoReten). */ readonly quantityBasis?: number | null; /** * Format: double * @description Alíquota ad rem IBS retida (adRemIBSReten). */ readonly ibsAdRemRate?: number | null; /** * Format: double * @description Valor IBS monofásico retido (vIBSMonoReten). */ readonly ibsAmount?: number | null; /** * Format: double * @description Alíquota ad rem CBS retida (adRemCBSReten). */ readonly cbsAdRemRate?: number | null; /** * Format: double * @description Valor CBS monofásico retido (vCBSMonoReten). */ readonly cbsAmount?: number | null; }; /** @description Informações sobre o crédito presumido de IBS para fornecimentos (gCredPresOper). */ readonly OperationalPresumedCreditResource: { /** * Format: double * @description Valor da Base de Cálculo do Crédito Presumido da Operação (vBC) */ readonly basis?: number | null; /** @description Código de Classificação do Crédito Presumido (cCredPres). */ readonly classificationCode?: components$2["schemas"]["PresumedCreditClassificationCode"]; /** @description Grupo de Informações do Crédito Presumido referente ao IBS (gIBSCredPres) */ readonly ibs?: components$2["schemas"]["PresumedCreditDetailsResource"]; /** @description Grupo de Informações do Crédito Presumido referente a CBS (gCBSCredPres) */ readonly cbs?: components$2["schemas"]["PresumedCreditDetailsResource"]; }; /** * @description Tipo de Operação (tpNF). * Valores possíveis: * - `Outgoing`: Saída * - `Incoming`: Entrada * @default Outgoing * @enum {string} */ readonly OperationType: "Outgoing" | "Incoming"; /** @description Grupo do PIS */ readonly PISTaxResource: { /** @description Código de Situação Tributária do PIS (CST) */readonly cst?: string | null; /** * Format: double * @description Valor da Base de Cálculo do PIS (vBC) */ readonly baseTax?: number | null; /** * Format: double * @description Alíquota do PIS (em percentual) (pPIS) */ readonly rate?: number | null; /** * Format: double * @description Valor do PIS (vPIS) */ readonly amount?: number | null; /** * Format: double * @description Quantidade Vendida (qBCProd) */ readonly baseTaxProductQuantity?: number | null; /** * Format: double * @description Alíquota do PIS (em reais) (vAliqProd) */ readonly productRate?: number | null; }; readonly PaymentDetailResource: { /** @description Forma de pagamento (tPag) */readonly method: components$2["schemas"]["PaymentMethod"]; /** @description Descrição do meio de pagamento (xPag) */ readonly methodDescription?: string | null; /** @description Indicador da forma de pagamento (indPag) */ readonly paymentType?: components$2["schemas"]["PaymentType"]; /** * Format: double * @description Valor do Pagamento (vPag) */ readonly amount: number; /** @description Grupo de Cartões (card) */ readonly card?: components$2["schemas"]["CardResource"]; /** * Format: date-time * @description Data do pagamento (dPag) - Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD */ readonly paymentDate?: string | null; /** @description CNPJ transacional do pagamento (CNPJPag) */ readonly federalTaxNumberPag?: string | null; /** @description UF do CNPJ do estabelecimento onde o pagamento foi processado/transacionado/recebido (UFPag) */ readonly statePag?: string | null; }; /** * @description Forma de pagamento (tPag). * Valores possíveis: * - `Cash`: 01 - Dinheiro * - `Cheque`: 02 - Cheque * - `CreditCard`: 03 - Cartão de Crédito * - `DebitCard`: 04 - Cartão de Débito * - `StoreCredict`: 05 - Crédito Loja * - `FoodVouchers`: 10 - Vale Alimentação * - `MealVouchers`: 11 - Vale Refeição * - `GiftVouchers`: 12 - Vale Presente * - `FuelVouchers`: 13 - Vale Combustível * - `MercantileDuplicate`: 14 - Duplicata Mercantil * - `BankBill`: 15 - Boleto Bancário * - `BankDeposit`: 16 - Depósito Bancário * - `InstantPayment`: 17 - Pagamento Instantâneo (PIX) * - `WireTransfer`: 18 - Transferência bancária, Carteira Digital * - `Cashback`: 19 - Programa de fidelidade, Cashback, Crédito Virtual * - `StaticInstantPayment`: 20 - Pagamento Instantâneo (PIX) Estático * - `StoreCredit`: 21 - Crédito em Loja * - `ElectronicPaymentNotInformed`: 22 - Pagamento Eletrônico Não Informado * - `WithoutPayment`: 90 - Sem Pagamento * - `Others`: 99 - Outros * @enum {string} */ readonly PaymentMethod: "Cash" | "Cheque" | "CreditCard" | "DebitCard" | "StoreCredict" | "FoodVouchers" | "MealVouchers" | "GiftVouchers" | "FuelVouchers" | "MercantileDuplicate" | "BankBill" | "BankDeposit" | "InstantPayment" | "WireTransfer" | "Cashback" | "StaticInstantPayment" | "StoreCredit" | "ElectronicPaymentNotInformed" | "WithoutPayment" | "Others"; readonly PaymentResource: { /** @description YA01a - Grupo Detalhamento da Forma de Pagamento (detPag) VERSÃO 4.00 */readonly paymentDetail: readonly components$2["schemas"]["PaymentDetailResource"][]; /** * Format: double * @description Valor do troco (vTroco) VERSÃO 4.00 */ readonly payBack?: number | null; }; /** * @description Indicador da forma de pagamento (indPag). * Valores possíveis: * - `InCash`: Pagamento à vista * - `Term`: Pagamento a prazo * @enum {string} */ readonly PaymentType: "InCash" | "Term"; /** * @description Tipo de Pessoa. * Valores possíveis: * - `Undefined`: Não definido * - `NaturalPerson`: Pessoa Física * - `LegalEntity`: Pessoa Jurídica * - `Company`: Empresa * - `Customer`: Cliente * @enum {string} */ readonly PersonType: "Undefined" | "NaturalPerson" | "LegalEntity" | "Company" | "Customer"; /** * @description Código de Classificação do Crédito Presumido (cCredPres). * Valores possíveis: * - `RuralProducerNonTaxpayer`: Produtor rural não contribuinte * - `TacPfTransportServiceNonTaxpayer`: TAC Pessoa Física não contribuinte do serviço de transporte * - `RecyclingFromIndividual`: Reciclagem de pessoa física * - `UsedMovableGoodsFromIndividualForResale`: Bens móveis usados de pessoa física para revenda * - `OptionalRegimeForCooperative`: Regime opcional para cooperativa * @enum {string|null} */ readonly PresumedCreditClassificationCode: "RuralProducerNonTaxpayer" | "TacPfTransportServiceNonTaxpayer" | "RecyclingFromIndividual" | "UsedMovableGoodsFromIndividualForResale" | "OptionalRegimeForCooperative" | null; /** @description Grupo de Informações do Crédito Presumido */ readonly PresumedCreditDetailsResource: { /** * Format: double * @description Percentual do Crédito Presumido (pCredPres) */ readonly rate?: number | null; /** * Format: double * @description Valor do Crédito Presumido (vCredPres) */ readonly amount?: number | null; /** * Format: double * @description Valor do Crédito Presumido em condição suspensiva. (vCredPresCondSus) */ readonly suspensiveConditionAmount?: number | null; }; /** @description Informações de Crédito Presumido por item (gCred). Preenchimento conforme exigência da UF (NT 2019.001). */ readonly PresumedCreditResource: { /** @description Código do Benefício de Crédito Presumido na UF (cCredPresumido). Use o mesmo código utilizado na EFD/declarações da UF. Tamanho 8 ou 10. */readonly code?: string | null; /** * Format: double * @description Percentual do Crédito Presumido (pCredPresumido). Use fração: 0.04 = 4%. Até 4 casas decimais. */ readonly rate?: number | null; /** * Format: double * @description Valor do Crédito Presumido (vCredPresumido). */ readonly amount?: number | null; }; /** * @description Formato de impressão do DANFE (tpImp). * Valores possíveis: * - `None`: Não definido * - `NFeNormalPortrait`: DANFE normal, Retrato * - `NFeNormalLandscape`: DANFE normal, Paisagem * - `NFeSimplified`: DANFE Simplificado * - `DANFE_NFC_E`: DANFE NFC-e * - `DANFE_NFC_E_MSG_ELETRONICA`: DANFE NFC-e em mensagem eletrônica * @enum {string} */ readonly PrintType: "None" | "NFeNormalPortrait" | "NFeNormalLandscape" | "NFeSimplified" | "DANFE_NFC_E" | "DANFE_NFC_E_MSG_ELETRONICA"; /** @description Notas Fiscais Eletrônicas (NF-e) */ readonly ProductInvoicesResource: { /** @description Lista de Notas Fiscais Eletrônicas (NF-e) */readonly productInvoices?: readonly components$2["schemas"]["InvoiceWithoutEventsResource"][] | null; /** @description Identificador de possibilidade de mais itens. */ readonly hasMore?: boolean; }; readonly PumpResource: { /** * Format: int32 * @description Número de identificação do bico utilizado no abastecimento (nBico) */ readonly spoutNumber?: number | null; /** * Format: int32 * @description Número de identificação da bomba ao qual o bico está interligado (nBomba) */ readonly number?: number | null; /** * Format: int32 * @description Número de identificação do tanque ao qual o bico está interligado (nTanque) */ readonly tankNumber?: number | null; /** * Format: double * @description Valor do Encerrante no início do abastecimento (vEncIni) */ readonly beginningAmount?: number | null; /** * Format: double * @description Valor do Encerrante no final do abastecimento (vEncFin) */ readonly endAmount?: number | null; /** * Format: double * @description Percentual do índice de mistura do Biodiesel (B100) no Óleo Diesel B instituído pelo órgão regulamentador */ readonly percentageBio?: number | null; }; /** @description Grupo Compra. Additional purchase information (compra) */ readonly PurchaseInformationResource: { /** @description Nota de Empenho. Identification of the Note of Commitment, when dealing with public purchases (xNEmp) */readonly commitmentNote?: string | null; /** @description Pedido. (xPed) */ readonly purchaseOrder?: string | null; /** @description Contrato. (xcont) */ readonly contractNumber?: string | null; }; /** * @description Finalidade da emissão da NF-e (finNFe). * Valores possíveis: * - `None`: Não definido * - `Normal`: NF-e normal * - `Complement`: NF-e complementar * - `Adjustment`: NF-e de ajuste * - `Devolution`: Devolução de mercadoria * @default Normal * @enum {string} */ readonly PurposeType: "None" | "Normal" | "Complement" | "Adjustment" | "Devolution"; readonly QueueEventResource: { /** * @description Justificativa da carta de correção * O Texto deve * conter no mínimo 15 e no máximo 1.000 caracteres * (os quais não poderão conter acentos e/ou caracteres especiais) */ readonly reason?: string | null; }; /** @description Grupo Reboque */ readonly ReboqueResource: { /** @description Placa do Veiculo (placa) */readonly plate?: string | null; /** @description UF Veiculo Reboque (UF) */ readonly uf?: string | null; /** @description Registro Nacional de Transportador de Carga (ANTT) (RNTC) */ readonly rntc?: string | null; /** @description Identificação do Vagão (vagao) */ readonly wagon?: string | null; /** @description Identificação da Balsa (balsa) */ readonly ferry?: string | null; }; /** * @description Indicador da IE do Destinatário (indIEDest). * Valores possíveis: * - `None`: Não definido * - `TaxPayer`: Contribuinte ICMS (informar a IE do destinatário) * - `Exempt`: Contribuinte isento de Inscrição no cadastro de Contribuintes do ICMS * - `NonTaxPayer`: Não Contribuinte, que pode ou não possuir Inscrição Estadual no Cadastro de Contribuintes do ICMS * @enum {string} */ readonly ReceiverStateTaxIndicator: "None" | "TaxPayer" | "Exempt" | "NonTaxPayer"; /** @description Grupo de informações da redução da alíquota */ readonly ReductionTaxResource: { /** * Format: double * @description Percentual da redução de alíquota */ readonly rateReduction?: number | null; /** * Format: double * @description Alíquota Efetiva que será aplicada a Base de Cálculo (em percentual) */ readonly effectiveRate?: number | null; }; readonly ReferencedProcessResource: { /** @description Identificador do ato concessório (identificadorAtoConcessorio). */readonly identifierConcessory?: string | null; /** * Format: int32 * @description Identificador de origem do processo (identificadorOrigemProcesso). */ readonly identifierOrigin?: number | null; /** * Format: int32 * @description Tipo do ato concessório (tipoAtoConcessorio). */ readonly concessionActType?: number | null; }; /** @description Documento Fiscal Eletrônico Referenciado (DFeReferenciado). Grupo para referenciamento de itens de outro DF-e. */ readonly ReferencedDFeResource: { /** @description Chave de acesso do DF-e referenciado (chaveAcesso). */readonly accessKey: string; /** * Format: int32 * @description Número do item do documento referenciado (nItem). Corresponde ao atributo “nItem” do elemento “det” do documentooriginal. */ readonly itemNumber?: number | null; } | null; /** @description Grupo de totais do Imposto Seletivo. (ISTot) */ readonly ISTotalsResource: { /** * Format: double * @description Total do imposto seletivo. (vIS) */ readonly amount?: number | null; } | null; /** @description Totais da NF-e com IBS e CBS. (IBSCBSTot) */ readonly IBSCBSTotalsResource: { /** * Format: double * @description Valor total da Base de Cálculo do IBS e da CBS. (vBCIBSCBS) */ readonly basis?: number | null; /** @description Grupo total do IBS (gIBS) */ readonly ibs?: components$2["schemas"]["IBSTotalsResource"]; /** @description Grupo total da CBS (gCBS) */ readonly cbs?: components$2["schemas"]["CBSTotalsResource"]; /** @description Grupo de totais da tributação monofásica. */ readonly monophase?: components$2["schemas"]["MonophaseTotalsResource"]; /** @description Grupo total do Estorno de Crédito (gEstornoCred) */ readonly creditReversal?: components$2["schemas"]["CreditReversalTotalsResource"]; } | null; /** @description Grupo total do IBS (gIBS) */ readonly IBSTotalsResource: { /** @description Informações do IBS da UF. */readonly state?: components$2["schemas"]["IBSStateTotalsResource"]; /** @description Informações do IBS do Município. */ readonly municipal?: components$2["schemas"]["IBSMunicipalTotalsResource"]; /** * Format: double * @description Valor total do IBS (vIBS) */ readonly totalAmount?: number | null; /** * Format: double * @description Valor total do crédito presumido (vCredPres) */ readonly presumedCreditAmount?: number | null; /** * Format: double * @description Valor total do crédito presumido em condição suspensiva. (vCredPresCondSus) */ readonly presumedCreditConditionalAmount?: number | null; } | null; /** @description Informações do IBS da UF (gIBSUF) */ readonly IBSStateTotalsResource: { /** * Format: double * @description Valor total do diferimento (vDif) */ readonly defermentAmount?: number | null; /** * Format: double * @description Valor total de devolução de tributos (vDevTrib) */ readonly returnedAmount?: number | null; /** * Format: double * @description Valor total do IBS da UF. (vIBSUF) */ readonly amount?: number | null; } | null; /** @description Informações do IBS do Município (gIBSMun) */ readonly IBSMunicipalTotalsResource: { /** * Format: double * @description Valor total do diferimento (vDif) */ readonly defermentAmount?: number | null; /** * Format: double * @description Valor total de devolução de tributos (vDevTrib) */ readonly returnedAmount?: number | null; /** * Format: double * @description Valor total do IBS do Município. (vIBSMun) */ readonly amount?: number | null; } | null; /** @description Grupo total da CBS (gCBS) */ readonly CBSTotalsResource: { /** * Format: double * @description Valor total do diferimento (vDif) */ readonly defermentAmount?: number | null; /** * Format: double * @description Valor total de devolução de tributos (vDevTrib) */ readonly returnedAmount?: number | null; /** * Format: double * @description Valor total da CBS (vCBS) */ readonly amount?: number | null; /** * Format: double * @description Valor total do crédito presumido (vCredPres) */ readonly presumedCreditAmount?: number | null; /** * Format: double * @description Valor total do crédito presumido em condição suspensiva. (vCredPresCondSus) */ readonly presumedCreditConditionalAmount?: number | null; } | null; /** @description Grupo de totais da tributação monofásica. */ readonly MonophaseTotalsResource: { /** @description Totais do IBS monofásico */readonly ibs?: components$2["schemas"]["MonophaseIBSTotalsResource"]; /** @description Totais da CBS monofásica */ readonly cbs?: components$2["schemas"]["MonophaseCBSTotalsResource"]; } | null; /** @description Tributação regular hipotética caso condição resolutória/suspensiva não se aplique. Informar como a tributação seria aplicada se a condição resolutória/suspensiva não for atendida. */ readonly RegularTaxationResource: { /** @description CST regular (CSTReg), 3 dígitos. Use tabela CST do IBS/CBS */readonly situationCode?: string | null; /** @description Classificação tributária regular (cClassTribReg), 6 dígitos. Use tabela cClassTrib */ readonly classCode?: string | null; /** * Format: double * @description Alíquota efetiva IBS UF (pAliqEfetRegIBSUF). */ readonly stateEffectiveRate?: number | null; /** * Format: double * @description IBS UF regular (vTribRegIBSUF). */ readonly amount?: number | null; /** * Format: double * @description Alíquota efetiva IBS Município (pAliqEfetRegIBSMun). */ readonly municipalEffectiveRate?: number | null; /** * Format: double * @description IBS Município regular (vTribRegIBSMun). */ readonly municipalAmount?: number | null; /** * Format: double * @description Alíquota efetiva CBS (pAliqEfetRegCBS). */ readonly cbsEffectiveRate?: number | null; /** * Format: double * @description CBS regular (vTribRegCBS). */ readonly cbsAmount?: number | null; }; /** @description Totais do IBS monofásico */ readonly MonophaseIBSTotalsResource: { /** * Format: double * @description Total do IBS monofásico. (vIBSMono) */ readonly amount?: number | null; /** * Format: double * @description Total do IBS monofásico sujeito a retenção. (vIBSMonoReten) */ readonly withheldAmount?: number | null; /** * Format: double * @description Total do IBS monofásico retido anteriormente. (vIBSMonoRet) */ readonly previouslyWithheldAmount?: number | null; } | null; /** @description Totais da CBS monofásica */ readonly MonophaseCBSTotalsResource: { /** * Format: double * @description Total da CBS monofásica. (vCBSMono) */ readonly amount?: number | null; /** * Format: double * @description Total da CBS monofásica sujeita a retenção. (vCBSMonoReten) */ readonly withheldAmount?: number | null; /** * Format: double * @description Total da CBS monofásica retida anteriormente. (vCBSMonoRet) */ readonly previouslyWithheldAmount?: number | null; } | null; readonly RequestCancellationResource: { readonly accountId?: string | null; readonly companyId?: string | null; readonly productInvoiceId?: string | null; readonly reason?: string | null; }; /** @description Grupo de Informações da Devolução de Tributos */ readonly ReturnedTaxResource: { /** * Format: double * @description Valor do tributo devolvido (vDevTrib) */ readonly amount?: number | null; }; /** * @description Modalidade do frete (modFrete). * Valores possíveis: * - `ByIssuer`: Contratação do Frete por conta do Remetente (CIF) * - `ByReceiver`: Contratação do Frete por conta do Destinatário (FOB) * - `ByThirdParties`: Contratação do Frete por conta de Terceiros * - `OwnBySender`: Transporte Próprio por conta do Remetente * - `OwnByBuyer`: Transporte Próprio por conta do Destinatário * - `Free`: Sem Ocorrência de Transporte * @default Free * @enum {string} */ readonly ShippingModality: "ByIssuer" | "ByReceiver" | "ByThirdParties" | "OwnBySender" | "OwnByBuyer" | "Free"; /** * @description Regime especial de tributação. * Valores possíveis: * - `Nenhum`: Nenhum * - `MicroempresaMunicipal`: Microempresa Municipal * - `Estimativa`: Estimativa * - `SociedadeDeProfissionais`: Sociedade de Profissionais * - `MicroempreendedorIndividual`: Microempreendedor Individual (MEI) * - `MicroempresarioEmpresaPequenoPorte`: Microempresário e Empresa de Pequeno Porte (ME/EPP) * - `Automatico`: Automático * @enum {string} */ readonly SpecialTaxRegime: "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte" | "Automatico"; /** @enum {string} */ readonly StateCode: "NA" | "RO" | "AC" | "AM" | "RR" | "PA" | "AP" | "TO" | "MA" | "PI" | "CE" | "RN" | "PB" | "PE" | "AL" | "SE" | "BA" | "MG" | "ES" | "RJ" | "SP" | "PR" | "SC" | "RS" | "MS" | "MT" | "GO" | "DF" | "EX"; /** * @description Autorizador de Processamento de Imposto Estadual. * Valores possíveis: * - `Normal`: Autorizador Normal * - `EPEC`: Autorizador de Evento Prévio de Emissão em Contingência * @enum {string} */ readonly StateTaxProcessingAuthorizer: "Normal" | "EPEC"; readonly TaxCouponInformationResource: { /** @description Modelo de Documento Fiscal (mod) */readonly modelDocumentFiscal?: string | null; /** @description Número de Ordem Sequencial do ECF (nECF) */ readonly orderECF?: string | null; /** * Format: int32 * @description Número do Contador de Ordem de Operação (nCOO) */ readonly orderCountOperation?: number | null; }; /** @description Grupo de informações fiscais para o cálculo automático de impostos. Se este grupo for preenchido, o grupo `tax.IBSCBS` será calculado automaticamente. Se não for preenchido, o cálculo automático do grupo `tax.IBSCBS` torna-se opcional. */ readonly TaxDeterminationResource: { /** * Format: int32 * @description Código interno para determinação de natureza de operação */ readonly operationCode?: number | null; /** @description Perfil fiscal do vendedor (origem) - usado para o cálculo automático de impostos */ readonly issuerTaxProfile?: string | null; /** @description Perfil fiscal do comprador (destino) - usado para o cálculo automático de impostos */ readonly buyerTaxProfile?: string | null; /** @description Origem da mercadoria */ readonly origin?: string | null; /** * @description Finalidade de aquisição - usado para o * cálculo automático de impostos */ readonly acquisitionPurpose?: string | null; }; readonly TaxDocumentsReferenceResource: { readonly taxCouponInformation?: components$2["schemas"]["TaxCouponInformationResource"]; readonly documentInvoiceReference?: components$2["schemas"]["DocumentInvoiceReferenceResource"]; readonly documentElectronicInvoice?: components$2["schemas"]["DocumentElectronicInvoiceResource"]; }; /** * @description Código de Regime Tributário (CRT). * Valores possíveis: * - `None`: Não definido * - `LucroReal`: Lucro Real * - `LucroPresumido`: Lucro Presumido * - `SimplesNacional`: Simples Nacional * - `SimplesNacionalExcessoSublimite`: Simples Nacional – excesso de sublimite de receita bruta * - `MicroempreendedorIndividual`: Microempreendedor Individual - MEI * - `Isento`: Isento * @enum {string} */ readonly TaxRegime: "None" | "LucroReal" | "LucroPresumido" | "SimplesNacional" | "SimplesNacionalExcessoSublimite" | "MicroempreendedorIndividual" | "Isento"; readonly TaxpayerCommentsResource: { /** @description Campo (xCampo) */readonly field?: string | null; /** @description Texto (xTexto) */ readonly text?: string | null; }; readonly Total: { readonly icms?: components$2["schemas"]["ICMSTotal"]; readonly issqn?: components$2["schemas"]["ISSQNTotal"]; /** @description Grupo Retenções de Tributos (retTrib) */ readonly withheldTaxes?: components$2["schemas"]["TotalsWithholdings"]; /** @description Grupo de totais do Imposto Seletivo. (ISTot) */ readonly isTotals?: components$2["schemas"]["ISTotalsResource"]; /** @description Totais da NF-e com IBS e CBS. (IBSCBSTot) */ readonly ibsCbsTotals?: components$2["schemas"]["IBSCBSTotalsResource"]; /** * Format: double * @description Valor total da NF-e com IBS / CBS / IS (vNFTot) */ readonly totalInvoiceAmount?: number | null; }; readonly TotalResource: { readonly icms?: components$2["schemas"]["ICMSTotalResource"]; readonly issqn?: components$2["schemas"]["ISSQNTotalResource"]; }; /** @description Grupo Transportador */ readonly TransportGroupResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components$2["schemas"]["AddressResource"]; readonly type?: components$2["schemas"]["PersonType"]; /** @description Inscrição Estadual do Transportador (IE) */ readonly stateTaxNumber?: string | null; /** @description Grupo de Retenção do ICMS do transporte */ readonly transportRetention?: string | null; }; /** * @description Grupo de Informações do Transporte da NF-e * Id: X01 Pai: A1 */ readonly TransportInformationResource: { readonly freightModality?: components$2["schemas"]["ShippingModality"]; readonly transportGroup?: components$2["schemas"]["TransportGroupResource"]; readonly reboque?: components$2["schemas"]["ReboqueResource"]; readonly volume?: components$2["schemas"]["VolumeResource"]; readonly transportVehicle?: components$2["schemas"]["TransportVehicleResource"]; /** @description Número dos Lacres */ readonly sealNumber?: string | null; readonly transpRate?: components$2["schemas"]["TransportRateResource"]; }; readonly TransportRateResource: { /** * Format: double * @description Valor do Serviço (vServ) */ readonly serviceAmount?: number | null; /** * Format: double * @description BC da Retenção do ICMS (vBCRet) */ readonly bcRetentionAmount?: number | null; /** * Format: double * @description Alíquota da Retenção (pICMSRet) //Change to Rate */ readonly icmsRetentionRate?: number | null; /** * Format: double * @description Valor do ICMS Retido (vICMSRet) */ readonly icmsRetentionAmount?: number | null; /** * Format: int64 * @description CFOP de Serviço de Transporte (CFOP) */ readonly cfop?: number | null; /** * Format: int64 * @description Código do Municipio de ocorrencia do fato gerador do ICMS do Transporte (cMunFG) */ readonly cityGeneratorFactCode?: number | null; }; /** @description Grupo Veiculo */ readonly TransportVehicleResource: { /** @description Placa do Veiculo (placa) */readonly plate?: string | null; /** @description Sigla da UF (UF) */ readonly state?: string | null; /** @description Registro Nacional de Transportador de Carga (ANTT) (RNTC) */ readonly rntc?: string | null; }; /** @description Indica fornecimento de bem móvel usado (indBemMovelUsado). true = bem usado; false = bem novo. */ readonly UsedMovableAssetIndicator: boolean; /** * @description Volumes * Id:X26 */ readonly VolumeResource: { /** * Format: int32 * @description Quantidade de volumes transportados (qVol) */ readonly volumeQuantity?: number | null; /** @description Espécie dos volumes transportados (esp) */ readonly species?: string | null; /** @description Marca dos Volumes Transportados (marca) */ readonly brand?: string | null; /** @description Numeração dos Volumes Transportados (nVol) */ readonly volumeNumeration?: string | null; /** * Format: double * @description Peso Liquido(em Kg) (pesoL) */ readonly netWeight?: number | null; /** * Format: double * @description Peso Bruto(em Kg) (pesoB) */ readonly grossWeight?: number | null; }; /** @description Identificação do Local de retirada (retirada) */ readonly WithdrawalInformationResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components$2["schemas"]["AddressResource"]; readonly type?: components$2["schemas"]["PersonType"]; /** @description Inscrição Estadual (IE) */ readonly stateTaxNumber?: string | null; }; /** @description Grupo Retenções de Tributos (retTrib) */ readonly TotalsWithholdings: { /** * Format: double * @description Valor Retido de PIS (vRetPIS) */ readonly pisAmount?: number | null; /** * Format: double * @description Valor Retido de COFINS (vRetCOFINS) */ readonly cofinsAmount?: number | null; /** * Format: double * @description Valor Retido de CSLL (vRetCSLL) */ readonly csllAmount?: number | null; /** * Format: double * @description Base de Cálculo do IRRF (vBCIRRF) */ readonly irrfBasis?: number | null; /** * Format: double * @description Valor Retido do IRRF (vIRRF) */ readonly irrfAmount?: number | null; /** * Format: double * @description Base de Cálculo da Retenção da Previdência Social (vBCRetPrev) */ readonly socialSecutiryBasis?: number | null; /** * Format: double * @description Valor da Retenção da Previdência Social (vRetPrev) */ readonly socialSecutiryAmount?: number | null; } | null; /** @description Informações sobre o crédito presumido de IBS para fornecimentos da ZFM (gCredPresIBSZFM). */ readonly ZfmPresumedCreditResource: { /** @description Tipo de crédito presumido (tpCredPresIBSZFM). */readonly classificationCode?: components$2["schemas"]["IbsZfmPresumedCreditClassification"]; /** * Format: double * @description Valor do crédito presumido ZFM (vCredPresIBSZFM). Obrigatório para notas de crédito com tpNFCredito = 02. */ readonly amount?: number | null; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } //#endregion //#region src/generated/contribuintes-v2.d.ts interface components$1 { schemas: { readonly "DFeTech.TaxPayers.Domain.Entities.Address": { readonly state?: string | null; readonly city?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.CityBase"]; readonly district?: string | null; readonly additionalInformation?: string | null; readonly streetPrefix?: string | null; readonly street?: string | null; readonly number?: string | null; readonly postalCode?: string | null; readonly country?: string | null; }; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.ApiEnvironment": "Development" | "Production" | "Staging"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.CertificateStatus": "None" | "Active" | "Inactive" | "Overdue" | "Pending"; readonly "DFeTech.TaxPayers.Domain.Entities.CityBase": { readonly code?: string | null; readonly name?: string | null; }; readonly "DFeTech.TaxPayers.Domain.Entities.CityExtended": { readonly code?: string | null; readonly name?: string | null; readonly country?: string | null; readonly state?: string | null; }; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.CompanyFiscalStatus": "None" | "Active" | "CityNotSupported" | "Pending" | "Inactive"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.EnvironmentType": "None" | "Production" | "Test"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.FederalTaxDeterminationBy": "NotInformed" | "Default" | "SimplesNacional"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.LegalNature": "None" | "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "SociedadeEstrangeiraNoBrasil" | "EmpresaBinacionalArgentinoBrasileira" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "SociedadeUnipessoaldeAdvogados" | "CooperativaDeConsumo" | "EmpresaSimplesDeInovacao" | "InvestidorNaoResidente" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "OrgaoDirecaoNacionalPartidoPolitico" | "OrgaoDirecaoRegionalPartidoPolitico" | "OrgaoDirecaoLocalPartidoPolitico" | "ComiteFinanceiroDePartidoPolitico" | "FrentePlebiscitariaOuReferendaria" | "OrganizacaoSocial" | "DemaisCondominios" | "PlanoBeneficiosPrevidenciaComplementarFechada" | "AssociacaoPrivada" | "EmpresaIndividualImobiliaria" | "SeguradoEspecial" | "ContribuinteIndividual" | "CandidatoCargoPoliticoEletivo" | "Leiloeiro" | "ProdutorRural" | "OrganizacaoInternacional" | "RepresentacaoDiplomaticaEstrangeira" | "OutrasInstituicoesExtraterritoriais"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.MunicipalTaxDeterminationBy": "NotInformed" | "Default" | "SimplesNacional"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.MunicipalTaxFiscalStatus": "None" | "Active" | "CityNotSupported" | "Pending" | "Inactive"; readonly "DFeTech.TaxPayers.Domain.Entities.SecurityCredential": { /** Format: int32 */readonly id?: number; readonly code?: string | null; }; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime": "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte" | "Automatico"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.StateCode": "NA" | "RO" | "AC" | "AM" | "RR" | "PA" | "AP" | "TO" | "MA" | "PI" | "CE" | "RN" | "PB" | "PE" | "AL" | "SE" | "BA" | "MG" | "ES" | "RJ" | "SP" | "PR" | "SC" | "RS" | "MS" | "MT" | "GO" | "DF" | "EX"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.StateTaxProcessingAuthorizer": "Normal" | "EPEC"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.StateTaxType": "Default" | "NFe" | "NFCe"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.Status": "None" | "Active" | "Inactive"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Domain.Entities.TaxRegime": "None" | "LucroReal" | "LucroPresumido" | "SimplesNacional" | "SimplesNacionalExcessoSublimite" | "MicroempreendedorIndividual" | "Isento"; readonly "DFeTech.TaxPayers.Resources.AddressResource": { /** @description Estado, ex.: SP, RJ, AC, padrão ISO 3166-2 ALFA 2. */readonly state: string; readonly city: components$1["schemas"]["DFeTech.TaxPayers.Resources.CityBaseResource"]; /** @description Bairro do Endereço */ readonly district: string; /** @description Complemento do Endereço, ex.: AP 2, BL A. */ readonly additionalInformation?: string | null; /** @description Logradouro do Endereço */ readonly street: string; /** @description Número do Endereço. Usar S/N para "sem número". */ readonly number: string; /** @description Cód. Endereço Postal (CEP) */ readonly postalCode: string; /** @description País, ex.: BRA, ARG, USA, padrão ISO 3166-1 ALFA-3. */ readonly country: string; }; /** @description Certificado */ readonly "DFeTech.TaxPayers.Resources.CertificateMetadataResource": { readonly certificate?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CertificateMetadataResourceItem"]; }; /** @description Certificado */ readonly "DFeTech.TaxPayers.Resources.CertificateMetadataResourceItem": { /** @description Identificador do contribuinte */readonly taxPayerId?: string | null; /** @description A impressão digital do certificado */ readonly thumbprint?: string | null; /** @description Documento do contribuinte */ readonly taxId?: string | null; /** @description Nome do certificado (subject distinguished name) */ readonly subject?: string | null; /** * Format: date-time * @description Data no horário local após o qual um certificado não é mais válido */ readonly validUntil?: string; /** * Format: date-time * @description Data de modificação */ readonly modifiedOn?: string | null; readonly status?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.CertificateStatus"]; }; /** @description Certificado */ readonly "DFeTech.TaxPayers.Resources.CertificatesMetadataResource": { /** @description Certificado */readonly certificates?: readonly components$1["schemas"]["DFeTech.TaxPayers.Resources.CertificateMetadataResourceItem"][] | null; }; readonly "DFeTech.TaxPayers.Resources.CityBaseResource": { /** @description Cód. do Município, segundo o Tabela de Municípios do IBGE */readonly code: string; /** @description Nome do Município */ readonly name: string; }; /** @description Empresas */ readonly "DFeTech.TaxPayers.Resources.CompaniesResource": { /** @description Lista de Empresa */readonly companies?: readonly components$1["schemas"]["DFeTech.TaxPayers.Resources.CompanyResourceItem"][] | null; }; readonly "DFeTech.TaxPayers.Resources.CompanyCertificateV1": { /** @description Thumbprint certificado */readonly thumbprint?: string | null; /** * Format: date-time * @description Certificado alterado em */ readonly modifiedOn?: string | null; /** * Format: date-time * @description Certificado expira em */ readonly expiresOn?: string | null; readonly status?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.CertificateStatus"]; }; readonly "DFeTech.TaxPayers.Resources.CompanyCollectionResourceV1": { /** Format: int64 */readonly totalResults?: number | null; /** Format: int32 */ readonly totalPages?: number | null; /** Format: int32 */ readonly page?: number | null; readonly companies?: readonly components$1["schemas"]["DFeTech.TaxPayers.Resources.CompanyResourceV1"][] | null; }; /** @description Empresa */ readonly "DFeTech.TaxPayers.Resources.CompanyResource": { readonly company?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CompanyResourceItem"]; }; /** @description Dados da Empresa */ readonly "DFeTech.TaxPayers.Resources.CompanyResourceItem": { /** @description Razão Social */readonly name: string; /** @description Identificador da conta */ readonly accountId?: string | null; /** @description Nome Fantasia */ readonly tradeName?: string | null; /** * Format: int64 * @description Número de Inscrição Federal (CNPJ) */ readonly federalTaxNumber: number; /** @description Número da Inscrição Municipal */ readonly municipalTaxNumber?: string | null; readonly taxRegime: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.TaxRegime"]; readonly address: components$1["schemas"]["DFeTech.TaxPayers.Resources.AddressResource"]; /** @description Identificador (gerado automaticamente) */ readonly id?: string | null; /** @description Lista de Inscrição Estadual */ readonly stateTaxes?: readonly string[] | null; /** @description Lista de Inscrição Municipal */ readonly municipalTaxes?: readonly string[] | null; readonly status?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.Status"]; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data de modificação */ readonly modifiedOn?: string | null; }; readonly "DFeTech.TaxPayers.Resources.CompanyResourceV1": { /** @description Identificação */readonly id?: string | null; /** @description Nome ou Razão Social */ readonly name?: string | null; /** @description Nome fantasia */ readonly tradeName?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.Address"]; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string | null; readonly taxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.TaxRegime"]; readonly specialTaxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime"]; readonly legalNature?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.LegalNature"]; /** * Format: int64 * @description Número de Inscricação na Junta Comercial */ readonly companyRegistryNumber?: number | null; /** * Format: int64 * @description Número de Inscricação na SEFAZ (IE) */ readonly regionalTaxNumber?: number | null; /** @description Número de Inscricação na Prefeitura (CCM) */ readonly municipalTaxNumber?: string | null; /** @description RPS número serie */ readonly rpsSerialNumber?: string | null; /** * Format: int64 * @description RPS número */ readonly rpsNumber?: number | null; /** * Format: int64 * @description RPS número */ readonly lastRpsSent?: number | null; /** * Format: double * @description Alíquota do ISS para Simples Nacional */ readonly issRate?: number | null; readonly environment?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.ApiEnvironment"]; readonly fiscalStatus?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.MunicipalTaxFiscalStatus"]; readonly federalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.FederalTaxDeterminationBy"]; readonly municipalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.MunicipalTaxDeterminationBy"]; /** @description Login para acesso ao sistema */ readonly loginName?: string | null; /** @description Senha para acesso ao sistema */ readonly loginPassword?: string | null; /** @description Código de autenticação gerado pela prefeitura */ readonly authIssueValue?: string | null; readonly certificate?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CompanyCertificateV1"]; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string | null; /** * Format: date-time * @description Data da última modificação */ readonly modifiedOn?: string | null; readonly status?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.Status"]; }; readonly "DFeTech.TaxPayers.Resources.CompanySingleResourceV1": { readonly companies?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CompanyResourceV1"]; }; /** @description Dados para Criar Empresa */ readonly "DFeTech.TaxPayers.Resources.CreateCompanyResource": { readonly company?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CreateCompanyResourceItem"]; }; /** @description Criar Empresa */ readonly "DFeTech.TaxPayers.Resources.CreateCompanyResourceItem": { /** @description Razão Social */readonly name: string; /** @description Identificador da conta */ readonly accountId?: string | null; /** @description Nome Fantasia */ readonly tradeName?: string | null; /** * Format: int64 * @description Número de Inscrição Federal (CNPJ) */ readonly federalTaxNumber: number; /** @description Número da Inscrição Municipal */ readonly municipalTaxNumber?: string | null; readonly taxRegime: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.TaxRegime"]; readonly address: components$1["schemas"]["DFeTech.TaxPayers.Resources.AddressResource"]; }; readonly "DFeTech.TaxPayers.Resources.CreateMunicipalTaxResource": { readonly municipalTax?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CreateMunicipalTaxResourceItem"]; }; readonly "DFeTech.TaxPayers.Resources.CreateMunicipalTaxResourceItem": { readonly city?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.CityExtended"]; /** @description Inscrição Municipal */ readonly taxNumber?: string | null; readonly environment?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.ApiEnvironment"]; readonly specialTaxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime"]; /** @description Email */ readonly email?: string | null; readonly legalNature?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.LegalNature"]; /** * Format: int64 * @description Registro da Empresa na Junta Comercial */ readonly companyRegistryNumber?: number | null; /** * Format: int64 * @description Número Região */ readonly regionalTaxNumber?: number | null; /** * Format: double * @description ALíquota do ISS (%) */ readonly issRate?: number | null; readonly federalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.FederalTaxDeterminationBy"]; readonly municipalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.MunicipalTaxDeterminationBy"]; /** @description Login para acesso ao sistema */ readonly loginName?: string | null; /** @description Senha para acesso ao sistema */ readonly loginPassword?: string | null; /** @description Código de autenticação gerado pela prefeitura */ readonly authIssueValue?: string | null; /** * Format: int64 * @description Número do RPS */ readonly rpsNumber?: number; /** * Format: int64 * @description Último RPS enviado */ readonly lastRpsSent?: number; /** @description Série do RPS */ readonly rpsSerialNumber?: string | null; }; readonly "DFeTech.TaxPayers.Resources.CreateStateTaxProcessingDetailsResource": { readonly switchAuthorizerStrategy?: components$1["schemas"]["DFeTech.TaxPayers.Resources.StateTaxProcessingSwitchAuthorizerStrategyResource"]; }; readonly "DFeTech.TaxPayers.Resources.CreateStateTaxResource": { readonly stateTax?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CreateStateTaxResourceItem"]; }; readonly "DFeTech.TaxPayers.Resources.CreateStateTaxResourceItem": { readonly code: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateCode"]; readonly environmentType?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.EnvironmentType"]; /** @description Inscrição Estadual */ readonly taxNumber: string; readonly specialTaxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime"]; /** * Format: int32 * @description Serie para a emissão NFe */ readonly serie?: number | null; /** * Format: int64 * @description Número para a emissão NFe */ readonly number?: number | null; readonly securityCredential?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SecurityCredential"]; readonly type: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateTaxType"]; readonly processingDetails?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CreateStateTaxProcessingDetailsResource"]; }; /** @description Erro */ readonly "DFeTech.TaxPayers.Resources.ErrorResource": { /** * Format: int32 * @description Código do erro */ readonly code?: number | null; /** @description Mensagem contendo os detalhes do erro */ readonly message?: string | null; }; /** @description Lista de Erros */ readonly "DFeTech.TaxPayers.Resources.ErrorsResource": { /** @description Lista de Erros */readonly errors?: readonly components$1["schemas"]["DFeTech.TaxPayers.Resources.ErrorResource"][] | null; }; /** @description Inscrição Municipal */ readonly "DFeTech.TaxPayers.Resources.MunicipalTaxResource": { readonly municipalTax?: components$1["schemas"]["DFeTech.TaxPayers.Resources.MunicipalTaxResourceItem"]; }; /** @description Dados da Inscrição Municipal */ readonly "DFeTech.TaxPayers.Resources.MunicipalTaxResourceItem": { /** @description Identificador (gerado automaticamente) */readonly id?: string | null; /** @description Código da Empresa */ readonly companyId?: string | null; /** @description Código da Conta */ readonly accountId?: string | null; readonly status?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.Status"]; readonly city?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.CityExtended"]; /** @description Inscrição Municipal */ readonly taxNumber?: string | null; readonly specialTaxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime"]; /** @description Email */ readonly email?: string | null; readonly legalNature?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.LegalNature"]; /** * Format: int64 * @description Registro da Empresa na Junta Comercial */ readonly companyRegistryNumber?: number | null; /** * Format: int64 * @description Número Região */ readonly regionalTaxNumber?: number | null; /** @description Série do RPS */ readonly rpsSerialNumber?: string | null; /** * Format: int64 * @description Número do RPS */ readonly rpsNumber?: number; /** * Format: int64 * @description Número do último RPS */ readonly lastRpsSent?: number; /** * Format: double * @description ALíquota do ISS (%) */ readonly issRate?: number | null; readonly environment?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.ApiEnvironment"]; readonly fiscalStatus?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.CompanyFiscalStatus"]; readonly federalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.FederalTaxDeterminationBy"]; readonly municipalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.MunicipalTaxDeterminationBy"]; /** @description Login para acesso ao sistema */ readonly loginName?: string | null; /** @description Senha para acesso ao sistema */ readonly loginPassword?: string | null; /** @description Código de autenticação gerado pela prefeitura */ readonly authIssueValue?: string | null; /** @description Todas as séries para esta Inscrição Municipal */ readonly rpsSerialNumbers?: readonly string[] | null; }; readonly "DFeTech.TaxPayers.Resources.SerieResource": { readonly serie?: components$1["schemas"]["DFeTech.TaxPayers.Resources.SerieResourceItem"]; }; /** @description Dados da Serie */ readonly "DFeTech.TaxPayers.Resources.SerieResourceItem": { /** * Format: int64 * @description Próximo número de RPS */ readonly rpsNumber?: number; /** * Format: int64 * @description Último RPS enviado */ readonly lastRpsSent?: number; }; /** @enum {string} */ readonly "DFeTech.TaxPayers.Resources.StateTaxProcessingAuthorizerResource": "Normal" | "EPEC"; /** @enum {string} */ readonly "DFeTech.TaxPayers.Resources.StateTaxProcessingSwitchAuthorizerStrategyResource": "Manual" | "StateTaxAuthorityStatusUnavailable"; /** @description Inscrição Estadual */ readonly "DFeTech.TaxPayers.Resources.StateTaxResource": { readonly stateTax?: components$1["schemas"]["DFeTech.TaxPayers.Resources.StateTaxResourceItem"]; }; /** @description Dados da Inscrição Estadual */ readonly "DFeTech.TaxPayers.Resources.StateTaxResourceItem": { readonly code: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateCode"]; readonly environmentType?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.EnvironmentType"]; /** @description Inscrição Estadual */ readonly taxNumber: string; readonly specialTaxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime"]; /** * Format: int32 * @description Serie para a emissão NFe */ readonly serie?: number | null; /** * Format: int64 * @description Número para a emissão NFe */ readonly number?: number | null; readonly securityCredential?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SecurityCredential"]; readonly type: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateTaxType"]; readonly processingDetails?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CreateStateTaxProcessingDetailsResource"]; /** @description Identificador (gerado automaticamente) */ readonly id?: string | null; /** @description Código da Empresa */ readonly companyId?: string | null; /** @description Código da Conta */ readonly accountId?: string | null; readonly status?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.Status"]; /** @description Todas as séries para esta Inscrição Estadual */ readonly series?: readonly number[] | null; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string; /** * Format: date-time * @description Data de modificação */ readonly modifiedOn?: string | null; }; readonly "DFeTech.TaxPayers.Resources.StateTaxSwitchAuthorizerRequest": { readonly authorizer?: components$1["schemas"]["DFeTech.TaxPayers.Resources.StateTaxProcessingAuthorizerResource"]; /** @description Motivo da contingência */ readonly reason?: string | null; }; readonly "DFeTech.TaxPayers.Resources.StateTaxSwitchAuthorizerResponse": { readonly fromAuthorizer?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateTaxProcessingAuthorizer"]; readonly toAuthorizer?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateTaxProcessingAuthorizer"]; /** @description Motivo da contingência */ readonly reason?: string | null; /** * Format: date-time * @description Data e hora da modificação */ readonly modifiedOn?: string; }; /** @description Inscrições Estaduais */ readonly "DFeTech.TaxPayers.Resources.StateTaxesResource": { /** @description Lista de Inscrições Estaduais */readonly stateTaxes?: readonly components$1["schemas"]["DFeTech.TaxPayers.Resources.StateTaxResourceItem"][] | null; }; /** @description Dados para Alterar Empresa */ readonly "DFeTech.TaxPayers.Resources.UpdateCompanyResource": { readonly company?: components$1["schemas"]["DFeTech.TaxPayers.Resources.UpdateCompanyResourceItem"]; }; /** @description Alterar Empresa */ readonly "DFeTech.TaxPayers.Resources.UpdateCompanyResourceItem": { /** @description Razão Social */readonly name: string; /** @description Identificador da conta */ readonly accountId?: string | null; /** @description Nome Fantasia */ readonly tradeName?: string | null; /** * Format: int64 * @description Número de Inscrição Federal (CNPJ) */ readonly federalTaxNumber: number; /** @description Número da Inscrição Municipal */ readonly municipalTaxNumber?: string | null; readonly taxRegime: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.TaxRegime"]; readonly address: components$1["schemas"]["DFeTech.TaxPayers.Resources.AddressResource"]; /** @description Identificador (gerado automaticamente) */ readonly id?: string | null; }; readonly "DFeTech.TaxPayers.Resources.UpdateMunicipalTaxResource": { readonly municipalTax?: components$1["schemas"]["DFeTech.TaxPayers.Resources.UpdateMunicipalTaxResourceItem"]; }; readonly "DFeTech.TaxPayers.Resources.UpdateMunicipalTaxResourceItem": { readonly city?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.CityExtended"]; /** @description Inscrição Municipal */ readonly taxNumber?: string | null; readonly specialTaxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime"]; /** @description Email */ readonly email?: string | null; readonly legalNature?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.LegalNature"]; /** * Format: int64 * @description Registro da Empresa na Junta Comercial */ readonly companyRegistryNumber?: number | null; /** * Format: int64 * @description Número Região */ readonly regionalTaxNumber?: number | null; /** * Format: int64 * @description Número do RPS */ readonly rpsNumber?: number; /** * Format: int64 * @description Número do último RPS */ readonly lastRpsSent?: number; /** * Format: double * @description ALíquota do ISS (%) */ readonly issRate?: number | null; readonly federalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.FederalTaxDeterminationBy"]; readonly municipalTaxDetermination?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.MunicipalTaxDeterminationBy"]; /** @description Login para acesso ao sistema */ readonly loginName?: string | null; /** @description Senha para acesso ao sistema */ readonly loginPassword?: string | null; /** @description Código de autenticação gerado pela prefeitura */ readonly authIssueValue?: string | null; readonly environment?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.ApiEnvironment"]; readonly rpsSerialNumber?: string | null; }; readonly "DFeTech.TaxPayers.Resources.UpdateStateTaxResource": { readonly stateTax?: components$1["schemas"]["DFeTech.TaxPayers.Resources.UpdateStateTaxResourceItem"]; }; readonly "DFeTech.TaxPayers.Resources.UpdateStateTaxResourceItem": { readonly code: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateCode"]; readonly environmentType?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.EnvironmentType"]; /** @description Inscrição Estadual */ readonly taxNumber: string; readonly specialTaxRegime?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SpecialTaxRegime"]; /** * Format: int32 * @description Serie para a emissão NFe */ readonly serie?: number | null; /** * Format: int64 * @description Número para a emissão NFe */ readonly number?: number | null; readonly securityCredential?: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.SecurityCredential"]; readonly type: components$1["schemas"]["DFeTech.TaxPayers.Domain.Entities.StateTaxType"]; readonly processingDetails?: components$1["schemas"]["DFeTech.TaxPayers.Resources.CreateStateTaxProcessingDetailsResource"]; }; /** @enum {string} */ readonly "Microsoft.OData.Edm.EdmContainerElementKind": "None" | "EntitySet" | "ActionImport" | "FunctionImport" | "Singleton"; /** @enum {string} */ readonly "Microsoft.OData.Edm.EdmExpressionKind": "None" | "BinaryConstant" | "BooleanConstant" | "DateTimeOffsetConstant" | "DecimalConstant" | "FloatingConstant" | "GuidConstant" | "IntegerConstant" | "StringConstant" | "DurationConstant" | "Null" | "Record" | "Collection" | "Path" | "If" | "Cast" | "IsOf" | "FunctionApplication" | "LabeledExpressionReference" | "Labeled" | "PropertyPath" | "NavigationPropertyPath" | "DateConstant" | "TimeOfDayConstant" | "EnumMember" | "AnnotationPath"; /** @enum {string} */ readonly "Microsoft.OData.Edm.EdmSchemaElementKind": "None" | "TypeDefinition" | "Term" | "Action" | "EntityContainer" | "Function"; /** @enum {string} */ readonly "Microsoft.OData.Edm.EdmTypeKind": "None" | "Primitive" | "Entity" | "Complex" | "Collection" | "EntityReference" | "Enum" | "TypeDefinition" | "Untyped" | "Path"; readonly "Microsoft.OData.Edm.IEdmEntityContainer": { readonly name?: string | null; readonly schemaElementKind?: components$1["schemas"]["Microsoft.OData.Edm.EdmSchemaElementKind"]; readonly namespace?: string | null; readonly elements?: readonly components$1["schemas"]["Microsoft.OData.Edm.IEdmEntityContainerElement"][] | null; }; readonly "Microsoft.OData.Edm.IEdmEntityContainerElement": { readonly name?: string | null; readonly containerElementKind?: components$1["schemas"]["Microsoft.OData.Edm.EdmContainerElementKind"]; readonly container?: components$1["schemas"]["Microsoft.OData.Edm.IEdmEntityContainer"]; }; readonly "Microsoft.OData.Edm.IEdmExpression": { readonly expressionKind?: components$1["schemas"]["Microsoft.OData.Edm.EdmExpressionKind"]; }; readonly "Microsoft.OData.Edm.IEdmModel": { readonly schemaElements?: readonly components$1["schemas"]["Microsoft.OData.Edm.IEdmSchemaElement"][] | null; readonly vocabularyAnnotations?: readonly components$1["schemas"]["Microsoft.OData.Edm.Vocabularies.IEdmVocabularyAnnotation"][] | null; readonly referencedModels?: readonly components$1["schemas"]["Microsoft.OData.Edm.IEdmModel"][] | null; readonly declaredNamespaces?: readonly string[] | null; readonly directValueAnnotationsManager?: components$1["schemas"]["Microsoft.OData.Edm.Vocabularies.IEdmDirectValueAnnotationsManager"]; readonly entityContainer?: components$1["schemas"]["Microsoft.OData.Edm.IEdmEntityContainer"]; }; readonly "Microsoft.OData.Edm.IEdmSchemaElement": { readonly name?: string | null; readonly schemaElementKind?: components$1["schemas"]["Microsoft.OData.Edm.EdmSchemaElementKind"]; readonly namespace?: string | null; }; readonly "Microsoft.OData.Edm.IEdmType": { readonly typeKind?: components$1["schemas"]["Microsoft.OData.Edm.EdmTypeKind"]; }; readonly "Microsoft.OData.Edm.IEdmTypeReference": { readonly isNullable?: boolean; readonly definition?: components$1["schemas"]["Microsoft.OData.Edm.IEdmType"]; }; readonly "Microsoft.OData.Edm.Vocabularies.IEdmDirectValueAnnotationsManager": Record; readonly "Microsoft.OData.Edm.Vocabularies.IEdmTerm": { readonly name?: string | null; readonly schemaElementKind?: components$1["schemas"]["Microsoft.OData.Edm.EdmSchemaElementKind"]; readonly namespace?: string | null; readonly type?: components$1["schemas"]["Microsoft.OData.Edm.IEdmTypeReference"]; readonly appliesTo?: string | null; readonly defaultValue?: string | null; }; readonly "Microsoft.OData.Edm.Vocabularies.IEdmVocabularyAnnotatable": Record; readonly "Microsoft.OData.Edm.Vocabularies.IEdmVocabularyAnnotation": { readonly qualifier?: string | null; readonly term?: components$1["schemas"]["Microsoft.OData.Edm.Vocabularies.IEdmTerm"]; readonly target?: components$1["schemas"]["Microsoft.OData.Edm.Vocabularies.IEdmVocabularyAnnotatable"]; readonly value?: components$1["schemas"]["Microsoft.OData.Edm.IEdmExpression"]; readonly usesDefault?: boolean; }; readonly "Microsoft.OData.ODataEntitySetInfo": { readonly typeAnnotation?: components$1["schemas"]["Microsoft.OData.ODataTypeAnnotation"]; /** Format: uri */ readonly url?: string | null; readonly name?: string | null; readonly title?: string | null; }; readonly "Microsoft.OData.ODataFunctionImportInfo": { readonly typeAnnotation?: components$1["schemas"]["Microsoft.OData.ODataTypeAnnotation"]; /** Format: uri */ readonly url?: string | null; readonly name?: string | null; readonly title?: string | null; }; readonly "Microsoft.OData.ODataServiceDocument": { readonly typeAnnotation?: components$1["schemas"]["Microsoft.OData.ODataTypeAnnotation"]; readonly entitySets?: readonly components$1["schemas"]["Microsoft.OData.ODataEntitySetInfo"][] | null; readonly singletons?: readonly components$1["schemas"]["Microsoft.OData.ODataSingletonInfo"][] | null; readonly functionImports?: readonly components$1["schemas"]["Microsoft.OData.ODataFunctionImportInfo"][] | null; }; readonly "Microsoft.OData.ODataSingletonInfo": { readonly typeAnnotation?: components$1["schemas"]["Microsoft.OData.ODataTypeAnnotation"]; /** Format: uri */ readonly url?: string | null; readonly name?: string | null; readonly title?: string | null; }; readonly "Microsoft.OData.ODataTypeAnnotation": { readonly typeName?: string | null; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } //#endregion //#region src/generated/nf-consumidor-v2.d.ts interface components { schemas: { readonly ActivityResource: { /** @description Detalhes do Evento */readonly data?: unknown; /** @description Nome do Evento gerado */ readonly type?: string | null; /** * Format: int32 * @description Número sequencial do Evento */ readonly sequence?: number | null; }; /** @description Adições (adi) */ readonly AdditionResource: { /** * Format: int64 * @description Numero da adição (nAdicao) */ readonly code?: number | null; /** @description Código do fabricante estrangeiro (cFabricante) */ readonly manufacturer?: string | null; /** * Format: double * @description Valor do desconto do item da DI – Adição (vDescDI) */ readonly amount?: number | null; /** * Format: int64 * @description Número do ato concessório de Drawback (nDraw) */ readonly drawback?: number | null; }; readonly AdditionalInformationResource: { /** @description Informações Adicionais de Interesse do Fisco (infAdFisco) */readonly fisco?: string | null; /** @description Informações Complementares de interesse do Contribuinte (infCpl) */ readonly taxpayer?: string | null; /** @description Informações Complementares de interesse do Contribuinte (infCpl) */ readonly xmlAuthorized?: readonly number[] | null; readonly effort?: string | null; readonly order?: string | null; readonly contract?: string | null; /** @description Documentos Fiscais Referenciados (refECF) */ readonly taxDocumentsReference?: readonly components["schemas"]["TaxDocumentsReferenceResource"][] | null; /** @description Observações fiscais (obsCont) */ readonly taxpayerComments?: readonly components["schemas"]["TaxpayerCommentsResource"][] | null; /** @description Processos referenciados (procRef) */ readonly referencedProcess?: readonly components["schemas"]["ReferencedProcessResource"][] | null; }; /** @description Dados do Endereço */ readonly AddressResource: { /** @description Estado, ex.: SP, RJ, AC, padrão ISO 3166-2 ALFA 2. */readonly state?: string | null; readonly city?: components["schemas"]["CityResource"]; /** @description Bairro do Endereço */ readonly district?: string | null; /** @description Complemento do Endereço, ex.: AP 2, BL A. */ readonly additionalInformation?: string | null; /** @description Logradouro do Endereço */ readonly street?: string | null; /** @description Número do Endereço. Usar S/N para "sem número". */ readonly number?: string | null; /** @description Cód. Endereço Postal (CEP) */ readonly postalCode?: string | null; /** @description País, ex.: BRA, ARG, USA, padrão ISO 3166-1 ALFA-3. */ readonly country?: string | null; /** @description Telefone */ readonly phone?: string | null; }; readonly AuthorizationResource: { /** Format: date-time */readonly receiptOn?: string | null; readonly accessKey?: string | null; readonly message?: string | null; }; readonly BillResource: { /** @description Número da Fatura (nFat) */readonly number?: string | null; /** * Format: double * @description Valor Original da Fatura (vOrig) */ readonly originalAmount?: number | null; /** * Format: double * @description Valor do desconto (vDesc) */ readonly discountAmount?: number | null; /** * Format: double * @description Valor Líquido da Fatura (vLiq) */ readonly netAmount?: number | null; }; readonly BillingResource: { readonly bill?: components["schemas"]["BillResource"]; /** @description Grupo Duplicata (dup) */ readonly duplicates?: readonly components["schemas"]["DuplicateResource"][] | null; }; /** * @description Manual_de_Orientação_Contribuinte_v_5.00 * Grupo de endereço do Destinatário da NF-e */ readonly BuyerResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components["schemas"]["AddressResource"]; readonly type?: components["schemas"]["PersonType"]; readonly stateTaxNumberIndicator?: components["schemas"]["ReceiverStateTaxIndicator"]; /** @description Nome fantasia */ readonly tradeName?: string | null; readonly taxRegime?: components["schemas"]["TaxRegime"]; /** @description Inscrição Estadual (IE) */ readonly stateTaxNumber?: string | null; }; readonly CIDEResource: { /** * Format: double * @description BC da CIDE (qBCProd) */ readonly bc?: number | null; /** * Format: double * @description Valor da alíquota da CIDE (vAliqProd) */ readonly rate?: number | null; /** * Format: double * @description Valor da CIDE (vCIDE) */ readonly cideAmount?: number | null; }; readonly CardResource: { /** @description CNPJ da Credenciadora de cartão de crédito e/ou débito (CNPJ) */readonly federalTaxNumber?: string | null; readonly flag?: components["schemas"]["FlagCard"]; /** @description Número de autorização da operação cartão de crédito e/ou débito (cAut) */ readonly authorization?: string | null; readonly integrationPaymentType?: components["schemas"]["IntegrationPaymentType"]; /** @description CNPJ do beneficiário do pagamento (CNPJReceb) */ readonly federalTaxNumberRecipient?: string | null; /** @description Identificador do terminal de pagamento (idTermPag) */ readonly idPaymentTerminal?: string | null; }; readonly CityResource: { /** @description Cód. do Município, segundo o Tabela de Municípios do IBGE */readonly code?: string | null; /** @description Nome do Município */ readonly name?: string | null; }; /** * @description Grupo do COFINS * * ID: S01 * Pai: M01 * * Obs: Informar apenas um dos grupos S02, S03, S04 ou S04 * com base valor atribuído ao campo S06 – CST do COFINS */ readonly CofinsTaxResource: { /** @description Código de Situação Tributária da COFINS */readonly cst?: string | null; /** * Format: double * @description Valor da Base de Cálculo da COFINS (vBC) */ readonly baseTax?: number | null; /** * Format: double * @description Alíquota da COFINS (em percentual) (pCOFINS) */ readonly rate?: number | null; /** * Format: double * @description Valor da COFINS (vCOFINS) */ readonly amount?: number | null; /** * Format: double * @description Quantidade Vendida (qBCProd) */ readonly baseTaxProductQuantity?: number | null; /** * Format: double * @description Alíquota da COFINS (em reais) (vAliqProd) */ readonly productRate?: number | null; }; /** @description Nota Fiscal de Consumidor Eletrônica (NFCe) */ readonly ConsumerInvoiceRequest: { /** @description Identificador único */readonly id?: string | null; /** @description Grupo de Formas de Pagamento (pag) */ readonly payment?: readonly components["schemas"]["PaymentResource"][] | null; /** * Format: int32 * @description Série do Documento Fiscal (serie) */ readonly serie?: number | null; /** * Format: int64 * @description Número do Documento Fiscal (nNF) */ readonly number?: number | null; /** * Format: date-time * @description Data e Hora de Saída ou da Entrada da Mercadoria/Produto (dhSaiEnt) * * Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD. * */ readonly operationOn?: string | null; /** @description Descrição da Natureza da Operação (natOp) */ readonly operationNature?: string | null; readonly operationType?: components["schemas"]["OperationType"]; readonly destination?: components["schemas"]["Destination"]; readonly printType?: components["schemas"]["PrintType"]; readonly purposeType?: components["schemas"]["PurposeType"]; readonly consumerType?: components["schemas"]["ConsumerType"]; readonly presenceType?: components["schemas"]["ConsumerPresenceType"]; /** * Format: date-time * @description Data e Hora da entrada em contingência (dhCont) * * Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD * */ readonly contingencyOn?: string | null; /** @description Justificativa da entrada em contingência (xJust) */ readonly contingencyJustification?: string | null; readonly buyer?: components["schemas"]["BuyerResource"]; readonly transport?: components["schemas"]["TransportInformationResource"]; readonly additionalInformation?: components["schemas"]["AdditionalInformationResource"]; /** @description Detalhamento de Produtos e Serviços (det) */ readonly items: readonly components["schemas"]["InvoiceItemResource"][]; readonly totals?: components["schemas"]["TotalResource"]; readonly billing?: components["schemas"]["BillingResource"]; readonly issuer?: components["schemas"]["IssuerFromRequestResource"]; readonly transactionIntermediate?: components["schemas"]["IntermediateResource"]; }; /** @description Notas Fiscais de Consumidor Eletrônicas (NFC-e) */ readonly ConsumerInvoicesResource: { /** @description Lista de Notas Fiscais de Consumidor Eletrônicas (NFC-e) */readonly consumerInvoices?: readonly components["schemas"]["InvoiceWithoutEventsResource"][] | null; /** @description Identificador de possibilidade de mais itens. */ readonly hasMore?: boolean; }; /** * @description Indicador de Presença (indPres ) * @enum {string} */ readonly ConsumerPresenceType: "None" | "Presence" | "Internet" | "Telephone" | "Delivery" | "OthersNonPresenceOperation"; /** * @description Indica operação com Consumidor final (indFinal) * @enum {string} */ readonly ConsumerType: "FinalConsumer" | "Normal"; readonly ContingencyDetails: { readonly authorizer?: components["schemas"]["StateTaxProcessingAuthorizer"]; /** * Format: date-time * @description Data e hora do início da contingência */ readonly startedOn?: string; /** @description Justificativa da entrada em contingência */ readonly reason?: string | null; }; /** @description Identificação do Local de entrega (entrega) */ readonly DeliveryInformationResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components["schemas"]["AddressResource"]; readonly type?: components["schemas"]["PersonType"]; /** @description Inscrição Estadual (IE) */ readonly stateTaxNumber?: string | null; }; /** * @description Identificador de local de destino da operação (idDest) * @enum {string} */ readonly Destination: "None" | "Internal_Operation" | "Interstate_Operation" | "International_Operation"; /** @description Dados para inutilizar números de nota fiscal */ readonly DisablementResource: { readonly environment?: components["schemas"]["EnvironmentType"]; /** * Format: int32 * @description Série */ readonly serie?: number; readonly state?: components["schemas"]["StateCode"]; /** * Format: int32 * @description Número inicial */ readonly beginNumber?: number; /** * Format: int32 * @description Número final (usar o mesmo número inicial se for apenas um número) */ readonly lastNumber?: number; /** @description Motivo da inutilização */ readonly reason?: string | null; }; readonly DocumentElectronicInvoiceResource: { /** @description Chave de Acesso (refNFe) */readonly accessKey?: string | null; }; readonly DocumentInvoiceReferenceResource: { /** * Format: double * @description Código da UF (cUF) */ readonly state?: number | null; /** @description Ano / Mês (AAMM) */ readonly yearMonth?: string | null; /** @description CNPJ (CNPJ) */ readonly federalTaxNumber?: string | null; /** @description Modelo (mod) */ readonly model?: string | null; /** @description Série (serie) */ readonly series?: string | null; /** @description Número (nNF) */ readonly number?: string | null; }; /** * @description Indicador de intermediador/marketplace (indIntermed) * @enum {string} */ readonly DuductionIndicator: "NotDeduct" | "Deduce"; readonly DuplicateResource: { /** @description Número da Duplicata (nDup) */readonly number?: string | null; /** * Format: date-time * @description Data de vencimento (dVenc) */ readonly expirationOn?: string | null; /** * Format: double * @description Valor da duplicata (vDup) */ readonly amount?: number | null; }; readonly EconomicActivityResource: { readonly type?: components["schemas"]["EconomicActivityType"]; /** * Format: int32 * @description Código da Atividade da Empresa */ readonly code?: number | null; }; /** @enum {string} */ readonly EconomicActivityType: "Main" | "Secondary"; /** @enum {string} */ readonly EnvironmentType: "None" | "Production" | "Test"; readonly ErrorResource: { /** Format: int32 */readonly code?: number | null; readonly message?: string | null; }; readonly ErrorsResource: { readonly errors?: readonly components["schemas"]["ErrorResource"][] | null; }; /** * @description Campo será preenchido quando o campo anterior estiver * preenchido.Informar o motivo da desoneração: * @enum {string} */ readonly ExemptReason: "Agriculture" | "Others" | "DevelopmentEntities"; readonly ExportDetailResource: { /** @description Número do ato concessório de Drawback (nDraw) */readonly drawback?: string | null; readonly hintInformation?: components["schemas"]["ExportHintResource"]; }; readonly ExportHintResource: { /** @description Número do Registro de Exportação (nRE) */readonly registryId?: string | null; /** @description Chave de Acesso da NF-e recebida para exportação (chNFe) */ readonly accessKey?: string | null; /** * Format: double * @description Quantidade do item realmente exportado (qExport) */ readonly quantity?: number | null; }; readonly ExportResource: { readonly state?: components["schemas"]["StateCode"]; /** @description Descrição do Local de Embarque ou de transposição de fronteira (xLocExporta) */ readonly office?: string | null; /** @description Informações Complementares de interesse do Contribuinte (xLocDespacho) */ readonly local?: string | null; }; /** @description Arquivo */ readonly FileResource: { /** @description Endereço Absoluto URI para o arquivo */readonly uri?: string | null; }; /** @enum {string} */ readonly FlagCard: "None" | "Visa" | "Mastercard" | "AmericanExpress" | "Sorocred" | "DinersClub" | "Elo" | "Hipercard" | "Aura" | "Cabal" | "Alelo" | "BanesCard" | "CalCard" | "Credz" | "Discover" | "GoodCard" | "GreenCard" | "Hiper" | "JCB" | "Mais" | "MaxVan" | "Policard" | "RedeCompras" | "Sodexo" | "ValeCard" | "Verocheque" | "VR" | "Ticket" | "Other"; readonly FuelOriginResource: { /** * Format: int32 * @description Indicador de importação (indImport) */ readonly indImport?: number | null; /** * Format: int32 * @description Código da UF (cUFOrig) */ readonly cUFOrig?: number | null; /** * Format: double * @description Percentual originário para a UF (pOrig) */ readonly pOrig?: number | null; }; readonly FuelResource: { /** @description Código de produto da ANP (cProdANP) */readonly codeANP?: string | null; /** * Format: double * @description Percentual de Gás Natural para o produto GLP (cProdANP=210203001) (pMixGN) */ readonly percentageNG?: number | null; /** @description Descrição do produto conforme ANP (descANP) */ readonly descriptionANP?: string | null; /** * Format: double * @description Percentual do GLP derivado do petróleo no produto GLP (cProdANP=210203001) (pGLP) */ readonly percentageGLP?: number | null; /** * Format: double * @description Percentual de Gás Natural Nacional – GLGNn para o produto GLP (cProdANP= 210203001) (pGNn) */ readonly percentageNGn?: number | null; /** * Format: double * @description Percentual de Gás Natural Importado – GLGNi para o produto GLP (cProdANP= 210203001) (pGNi) */ readonly percentageGNi?: number | null; /** * Format: double * @description Valor de partida (cProdANP=210203001) (vPart) */ readonly startingAmount?: number | null; /** @description Código de autorização / registro do CODIF (CODIF) */ readonly codif?: string | null; /** * Format: double * @description Quantidade de combustível faturada à temperatura ambiente (qTemp) */ readonly amountTemp?: number | null; /** @description Sigla da UF de consumo (UFCons) */ readonly stateBuyer?: string | null; readonly cide?: components["schemas"]["CIDEResource"]; readonly pump?: components["schemas"]["PumpResource"]; readonly fuelOrigin?: components["schemas"]["FuelOriginResource"]; }; /** * @description Manual Contribuinte v_5.00 * Grupo de Valores Totais referentes ao ICMS */ readonly ICMSTotalResource: { /** * Format: double * @description Base de Cálculo do ICMS (vBC) */ readonly baseTax?: number | null; /** * Format: double * @description Valor Total do ICMS (vICMS) */ readonly icmsAmount?: number | null; /** * Format: double * @description Valor ICMS Total desonerado (vICMSDeson) */ readonly icmsExemptAmount?: number | null; /** * Format: double * @description Base de Cálculo do ICMS Substituição Tributária (vBCST) */ readonly stCalculationBasisAmount?: number | null; /** * Format: double * @description Valor Total do ICMS ST (vST) */ readonly stAmount?: number | null; /** * Format: double * @description Valor Total dos produtos e serviços (vProd) */ readonly productAmount?: number | null; /** * Format: double * @description Valor Total do Frete (vFrete) */ readonly freightAmount?: number | null; /** * Format: double * @description Valor Total do Seguro (vSeg) */ readonly insuranceAmount?: number | null; /** * Format: double * @description Valor Total do Desconto (vDesc) */ readonly discountAmount?: number | null; /** * Format: double * @description Valor Total do Imposto de Importação (vII) */ readonly iiAmount?: number | null; /** * Format: double * @description Valor Total do IPI (vIPI) */ readonly ipiAmount?: number | null; /** * Format: double * @description Valor do PIS (vPIS) */ readonly pisAmount?: number | null; /** * Format: double * @description Valor do COFINS (vCOFINS) */ readonly cofinsAmount?: number | null; /** * Format: double * @description Outras Despesas acessórias (vOutro) */ readonly othersAmount?: number | null; /** * Format: double * @description Valor Total da NF-e (vNF) */ readonly invoiceAmount?: number | null; /** * Format: double * @description Valor Total ICMS FCP UF Destino (vFCPUFDest) */ readonly fcpufDestinationAmount?: number | null; /** * Format: double * @description Valor Total ICMS Interestadual UF Destino (vICMSUFDest) */ readonly icmsufDestinationAmount?: number | null; /** * Format: double * @description Valor Total ICMS Interestadual UF Remetente (vICMSUFRemet) */ readonly icmsufSenderAmount?: number | null; /** * Format: double * @description Valor aproximado total de tributos federais, estaduais e municipais. (vTotTrib) */ readonly federalTaxesAmount?: number | null; /** * Format: double * @description Valor Total do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCP) */ readonly fcpAmount?: number | null; /** * Format: double * @description Valor Total do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido por substituição tributária (vFCPST) */ readonly fcpstAmount?: number | null; /** * Format: double * @description Valor Total do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária (vFCPSTRet) */ readonly fcpstRetAmount?: number | null; /** * Format: double * @description Valor total do IPI devolvido (vIPIDevol) */ readonly ipiDevolAmount?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico próprio (qBCMono) */ readonly qBCMono?: number | null; /** * Format: double * @description Valor total do ICMS monofásico próprio (vICMSMono) */ readonly vICMSMono?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico sujeito a retenção(qBCMonoReten) */ readonly qBCMonoReten?: number | null; /** * Format: double * @description Valor total do ICMS monofásico sujeito a retenção (vICMSMonoReten) */ readonly vICMSMonoReten?: number | null; /** * Format: double * @description Valor total da quantidade tributada do ICMS monofásico retido anteriormente(qBCMonoRet) */ readonly qBCMonoRet?: number | null; /** * Format: double * @description Valor total do ICMS monofásico retido anteriormente (vICMSMonoRet) */ readonly vICMSMonoRet?: number | null; }; /** @description Grupo de Tributação do ICMS de Destino da UF */ readonly ICMSUFDestinationTaxResource: { /** * Format: double * @description Valor da Base de Cálculo do ICMS na UF de destino (vBCUFDest) */ readonly vBCUFDest?: number | null; /** * Format: double * @description Percentual adicional inserido na alíquota interna da UF de destino, relativo ao Fundo de Combate à Pobreza (FCP) naquela UF (pFCPUFDest) */ readonly pFCPUFDest?: number | null; /** * Format: double * @description Alíquota adotada nas operações internas na UF de destino para o produto / mercadoria (pICMSUFDest) */ readonly pICMSUFDest?: number | null; /** * Format: double * @description Alíquota interestadual das UF envolvidas (pICMSInter) */ readonly pICMSInter?: number | null; /** * Format: double * @description Percentual de ICMS Interestadual para a UF de destino (pICMSInterPart) */ readonly pICMSInterPart?: number | null; /** * Format: double * @description Valor do ICMS relativo ao Fundo de Combate à Pobreza (FCP) da UF de destino (vFCPUFDest */ readonly vFCPUFDest?: number | null; /** * Format: double * @description Valor do ICMS Interestadual para a UF de destino (vICMSUFDest) */ readonly vICMSUFDest?: number | null; /** * Format: double * @description Valor do ICMS Interestadual para a UF do remetente (vICMSUFRemet) */ readonly vICMSUFRemet?: number | null; /** * Format: double * @description Valor da BC FCP na UF de destino (vBCFCPUFDest) */ readonly vBCFCPUFDest?: number | null; }; /** * @description Grupo do Imposto de Importação * * Id: P01 * Pai: O01 */ readonly IITaxResource: { /** @description Valor BC do Imposto de Importação (vBC) */readonly baseTax?: string | null; /** @description Valor despesas aduaneiras (vDespAdu) */ readonly customsExpenditureAmount?: string | null; /** * Format: double * @description Valor Imposto de Importação (vII) */ readonly amount?: number | null; /** * Format: double * @description Valor Imposto sobre Operações Financeiras (vIOF) */ readonly iofAmount?: number | null; /** * Format: double * @description Valor dos encargos cambiais */ readonly vEnqCamb?: number | null; }; /** * @description Grupo do IPI * * Informar apenas quando o item for sujeito ao IPI * * ID: O01 * * Pai: M01 */ readonly IPITaxResource: { /** @description Código da situação tributária do IPI (CST) */readonly cst?: string | null; /** @description Código de Enquadramento Legal do IPI (cEnq) */ readonly classificationCode?: string | null; /** * @description clEnq * Classe de enquadramento do IPI para Cigarros e Bebidas (clEnq) */ readonly classification?: string | null; /** @description CNPJ do produtor da mercadoria, quando diferente do emitente. Somente para os casos de exportação direta ou indireta (CNPJProd) */ readonly producerCNPJ?: string | null; /** @description Código do selo de controle IPI (cSelo) */ readonly stampCode?: string | null; /** * Format: double * @description Quantidade de selo de controle (qSelo) */ readonly stampQuantity?: number | null; /** * Format: double * @description Valor da BC do IPI (vBC) */ readonly base?: number | null; /** * Format: double * @description Alíquota do IPI (pIPI) */ readonly rate?: number | null; /** * Format: double * @description Quantidade total na unidade padrão para tributação (somente para os produtos tributados por unidade) (qUnid) */ readonly unitQuantity?: number | null; /** * Format: double * @description Valor por Unidade Tributável (vUnid) */ readonly unitAmount?: number | null; /** * Format: double * @description Valor IPI (vIPI) */ readonly amount?: number | null; }; readonly ISSQNTotalResource: { /** * Format: double * @description Valor Total Serv.Não Tributados p/ ICMS (vServ) */ readonly totalServiceNotTaxedICMS?: number | null; /** * Format: double * @description Base de Cálculo do ISS (vBC) */ readonly baseRateISS?: number | null; /** * Format: double * @description Valor Total do ISS (vISS) */ readonly totalISS?: number | null; /** * Format: double * @description Valor do PIS sobre Serviços (vPIS) */ readonly valueServicePIS?: number | null; /** * Format: double * @description Valor da COFINS sobre Serviços (vCOFINS) */ readonly valueServiceCOFINS?: number | null; /** * Format: date-time * @description Data Prestação Serviço (dCompet) */ readonly provisionService?: string | null; /** * Format: double * @description Valor Dedução para Redução da BC (vDeducao) */ readonly deductionReductionBC?: number | null; /** * Format: double * @description Valor Outras Retenções (vOutro) */ readonly valueOtherRetention?: number | null; /** * Format: double * @description Valor Desconto Incondicionado (vDescIncond) */ readonly discountUnconditional?: number | null; /** * Format: double * @description Valor Desconto Condicionado (vDescCond) */ readonly discountConditioning?: number | null; /** * Format: double * @description Valor Total Retenção ISS (vISSRet) */ readonly totalRetentionISS?: number | null; /** * Format: double * @description Código Regime Tributação (cRegTrib) */ readonly codeTaxRegime?: number | null; }; /** * @description Grupo do ICMS da Operação própria e ST * * ID: N01 * PAI: M01 * * Obs: Informar apenas um dos grupos N02, N03, N04, N05, N06, N07, N08, N09, N10, * N10a, N10b, N10c, N10d, N10e, N10f, N10g ou N10h com base no conteúdo informado na TAG Tributação do ICMS. (v2.0) */ readonly IcmsTaxResource: { /** @description Origem da mercadoria (orig) */readonly origin?: string | null; /** @description Tributação do ICMS (CST) */ readonly cst?: string | null; /** * @description 101- Tributada pelo Simples Nacional com permissão de crédito. (v.2.0) (CSOSN) * Código de Situação da Operação – Simples Nacional */ readonly csosn?: string | null; /** * @description Modalidade de determinação da BC do ICMS (modBC) * * Margem Valor Agregado (%) = 0 * Pauta (valor) = 1 * Preço Tabelado Máximo (valor) = 2 * Valor da Operação = 3 * */ readonly baseTaxModality?: string | null; /** * Format: double * @description Valor da BC do ICMS (vBC) */ readonly baseTax?: number | null; /** @description Modalidade de determinação da BC do ICMS ST (modBCST) */ readonly baseTaxSTModality?: string | null; /** * @description pRedBCST * Percentual da Redução de BC do ICMS ST (pRedBCST) */ readonly baseTaxSTReduction?: string | null; /** * Format: double * @description Valor da BC do ICMS ST (vBCST) */ readonly baseTaxST?: number | null; /** * Format: double * @description Percentual da Redução de BC (pRedBC) */ readonly baseTaxReduction?: number | null; /** * Format: double * @description Alíquota do imposto do ICMS ST (pICMSST) */ readonly stRate?: number | null; /** * Format: double * @description Valor do ICMS ST (vICMSST) */ readonly stAmount?: number | null; /** * Format: double * @description pMVAST * Percentual da margem de valor Adicionado do ICMS ST (pMVAST) */ readonly stMarginAmount?: number | null; /** * Format: double * @description pICMS * Alíquota do imposto (pICMS) */ readonly rate?: number | null; /** * Format: double * @description Valor do ICMS (vICMS) * O valor do ICMS desonerado será informado apenas nas operações: * a) com produtos beneficiados com a desoneração condicional do ICMS. * b) destinadas à SUFRAMA, informando-se o valor que seria devido se não houvesse isenção. * c) de venda a órgãos da administração pública direta e suas fundações e * autarquias com isenção do ICMS. (NT 2011/004) */ readonly amount?: number | null; /** * Format: double * @description Percentual da Redução de BC (pICMS) */ readonly percentual?: number | null; /** * Format: double * @description Alíquota aplicável de cálculo do crédito (Simples Nacional). (pCredSN) */ readonly snCreditRate?: number | null; /** * Format: double * @description Valor crédito do ICMS que pode ser aproveitado nos termos do art. 23 da LC 123 Simples Nacional (vCredICMSSN) */ readonly snCreditAmount?: number | null; /** @description Percentual da margem de valor Adicionado do ICMS ST (pMVAST) */ readonly stMarginAddedAmount?: string | null; /** @description Valor do ICMS ST retido (vICMSSTRet) */ readonly stRetentionAmount?: string | null; /** @description Valor da BC do ICMS ST retido (vBCSTRet) */ readonly baseSTRetentionAmount?: string | null; /** * @description Percentual da BC operação própria (pBCOp) * Percentual para determinação do valor da Base de Cálculo da operação própria. (v2.0) */ readonly baseTaxOperationPercentual?: string | null; /** * @description UF para qual é devido o ICMS ST (UFST) * Sigla da UF para qual é devido o ICMS ST da operação. (v2.0) */ readonly ufst?: string | null; /** @description Motivo Desoneração ICMS */ readonly amountSTReason?: string | null; /** @description Valor da BC do ICMS ST retido (vBCSTRet) */ readonly baseSNRetentionAmount?: string | null; /** @description Valor do ICMS ST retido (vICMSSTRet) */ readonly snRetentionAmount?: string | null; /** @description Valor do ICMS da Operação (vICMSOp) */ readonly amountOperation?: string | null; /** @description Percentual do Diferimento (pDif) */ readonly percentualDeferment?: string | null; /** @description Valor do ICMS Diferido (vICMSDif) */ readonly baseDeferred?: string | null; /** * Format: double * @description Valor ICMS Desonerado */ readonly exemptAmount?: number | null; readonly exemptReason?: components["schemas"]["ExemptReason"]; /** * Format: double * @description Valor ICMS Desonerado */ readonly exemptAmountST?: number | null; readonly exemptReasonST?: components["schemas"]["ExemptReason"]; /** * Format: double * @description Percentual do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza (pFCP) */ readonly fcpRate?: number | null; /** * Format: double * @description Valor Total do FCP - Valor do ICMS relativo ao Fundo de Combate à Pobreza (vFCP) */ readonly fcpAmount?: number | null; /** * Format: double * @description Percentual do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido por substituição tributária (pFCPST) */ readonly fcpstRate?: number | null; /** * Format: double * @description Valor Total do FCP retido por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido por substituição tributária (vFCPST) */ readonly fcpstAmount?: number | null; /** * Format: double * @description Percentual do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária (pFCPSTRet) */ readonly fcpstRetRate?: number | null; /** * Format: double * @description Valor Total do FCP retido por anteriormente por ST - Valor do ICMS relativo ao Fundo de Combate à Pobreza retido anteriormente por substituição tributária (vFCPSTRet) */ readonly fcpstRetAmount?: number | null; /** * Format: double * @description Informar o valor da Base de Cálculo do FCP (vBCFCPST) */ readonly baseTaxFCPSTAmount?: number | null; /** * Format: double * @description Valor do ICMS próprio do Substituto (tag: vICMSSubstituto) */ readonly substituteAmount?: number | null; /** * Format: double * @description N26a - Alíquota suportada pelo Consumidor Final (pST) * Deve ser informada a alíquota do cálculo do ICMS-ST, já incluso o FCP caso incida sobre a mercadoria */ readonly stFinalConsumerRate?: number | null; /** * Format: double * @description N34 - Percentual de redução da base de cálculo efetiva, caso estivesse submetida ao regime comum de tributação (pRedBCEfet) */ readonly effectiveBaseTaxReductionRate?: number | null; /** * Format: double * @description N35 - Valor da base de cálculo efetiva, caso estivesse submetida ao regime comum de tributação (vBCEfet) */ readonly effectiveBaseTaxAmount?: number | null; /** * Format: double * @description N36 - Alíquota do ICMS efetiva, caso estivesse submetida ao regime comum de tributação (pICMSEFET) */ readonly effectiveRate?: number | null; /** * Format: double * @description N37 - Valor do ICMS efetivo, caso estivesse submetida ao regime comum de tributação (vICMSEFET) */ readonly effectiveAmount?: number | null; readonly deductionIndicator?: components["schemas"]["DuductionIndicator"]; }; /** @description Declaração Importação (DI) */ readonly ImportDeclarationResource: { /** @description Número do Documento de Importação da DI/DSI/DA (nDI) */readonly code?: string | null; /** * Format: date-time * @description Data de Registro da DI/DSI/DA (dDI) */ readonly registeredOn?: string | null; /** @description Local de desembaraço (xLocDesemb) */ readonly customsClearanceName?: string | null; readonly customsClearanceState?: components["schemas"]["StateCode"]; /** * Format: date-time * @description Data do Desembaraço Aduaneiro (dDesemb) */ readonly customsClearancedOn?: string | null; /** @description Adições (adi) */ readonly additions?: readonly components["schemas"]["AdditionResource"][] | null; /** @description Código do exportador (cExportador) */ readonly exporter?: string | null; readonly internationalTransport?: components["schemas"]["InternationalTransportType"]; readonly intermediation?: components["schemas"]["IntermediationType"]; /** @description CNPJ/CPF do adquirente ou do encomendante (CNPJ ou CPF) */ readonly acquirerFederalTaxNumber?: string | null; /** @description Sigla da UF do adquirente ou do encomendante (UFTerceiro) */ readonly stateThird?: string | null; }; /** * @description 1 - Pagamento integrado com o sistema de automação da empresa(Ex.: equipamento TEF, Comércio Eletrônico) * 2 - Pagamento não integrado com o sistema de automação da empresa(Ex.: equipamento POS); * @enum {string} */ readonly IntegrationPaymentType: "Integrated" | "NotIntegrated"; /** @description Grupo de Informações do Intermediador da Transação (infIntermed) */ readonly IntermediateResource: { /** * Format: int64 * @description CNPJ do Intermediador da Transação (agenciador, plataforma de delivery, marketplace e similar) de serviços e de negócios. (CNPJ) */ readonly federalTaxNumber?: number | null; /** @description Identificador cadastrado no intermediador (idCadIntTran) */ readonly identifier?: string | null; }; /** * @description Tipo de Intermediação * @enum {string} */ readonly IntermediationType: "None" | "ByOwn" | "ImportOnBehalf" | "ByOrder"; /** * @description Tipo Transporte Internacional * @enum {string} */ readonly InternationalTransportType: "None" | "Maritime" | "River" | "Lake" | "Airline" | "Postal" | "Railway" | "Highway" | "Network" | "Own" | "Ficta" | "Courier" | "Handcarry"; readonly InvoiceEventsResource: { /** @description Lista de Eventos ocorridos na Nota Fiscal */readonly events?: readonly components["schemas"]["ActivityResource"][] | null; /** @description Identificador de possibilidade de mais itens. */ readonly hasMore?: boolean | null; /** @description Identificação */ readonly id?: string | null; /** @description Identificador da Conta */ readonly accountId?: string | null; /** @description Identificador da Empresa */ readonly companyId?: string | null; }; readonly InvoiceEventsResourceBase: { /** @description Lista de Eventos ocorridos na Nota Fiscal */readonly events?: readonly components["schemas"]["ActivityResource"][] | null; /** @description Identificador de possibilidade de mais itens. */ readonly hasMore?: boolean | null; }; /** * @description Manual Contribuinte v_5.00 * Grupo do detalhamento de Produtos e Serviços da NF-e */ readonly InvoiceItemResource: { /** @description Código do produto ou serviço (cProd) */readonly code?: string | null; /** * @description GTIN (Global Trade Item Number) do produto, * antigo código EAN ou código de barras (cEAN) */ readonly codeGTIN?: string | null; /** @description Descrição do produto ou serviço (xProd) */ readonly description?: string | null; /** @description Código NCM com 8 dígitos ou 2 dígitos (gênero) (NCM) */ readonly ncm?: string | null; /** @description Nomenclatura de Valor aduaneiro e Estatístico (NVE) */ readonly nve?: readonly string[] | null; /** @description Código Exceção da Tabela de IPI */ readonly extipi?: string | null; /** * Format: int64 * @description Código Fiscal de Operações e Prestações (CFOP) */ readonly cfop?: number | null; /** @description Unidade Comercial (uCom) */ readonly unit?: string | null; /** * Format: double * @description Quantidade Comercial (qCom) */ readonly quantity?: number | null; /** * Format: double * @description Valor Unitário de Comercialização (vUnCom) */ readonly unitAmount?: number | null; /** * Format: double * @description Valor Total Bruto dos Produtos ou Serviços (vProd) */ readonly totalAmount?: number | null; /** * @description GTIN (Global Trade Item Number) da unidade tributável, * antigo código EAN ou código de barras (cEANTrib) */ readonly codeTaxGTIN?: string | null; /** @description Unidade Tributável (uTrib) */ readonly unitTax?: string | null; /** * Format: double * @description Quantidade Tributável (qTrib) */ readonly quantityTax?: number | null; /** * Format: double * @description Valor Unitário de tributação (vUnTrib) */ readonly taxUnitAmount?: number | null; /** * Format: double * @description Valor Total do Frete (vFrete) */ readonly freightAmount?: number | null; /** * Format: double * @description Valor Total do Seguro (vSeg) */ readonly insuranceAmount?: number | null; /** * Format: double * @description Valor do Desconto (vDesc) */ readonly discountAmount?: number | null; /** * Format: double * @description Outras despesas acessórias (vOutro) */ readonly othersAmount?: number | null; /** * @description Indica se valor do Item (vProd) * entra no valor total da NF-e (vProd) (indTot) */ readonly totalIndicator?: boolean | null; /** @description CEST - Código especificador da substituição tributária */ readonly cest?: string | null; readonly tax?: components["schemas"]["InvoiceItemTaxResource"]; /** @description Informações Adicionais do Produto (infAdProd) */ readonly additionalInformation?: string | null; /** @description Número do pedido de compra (xPed) */ readonly numberOrderBuy?: string | null; /** * Format: int32 * @description Item do Pedido de Compra (nItemPed) */ readonly itemNumberOrderBuy?: number | null; /** @description Número de controle da FCI - Ficha de Conteúdo de Importação (nFCI) */ readonly importControlSheetNumber?: string | null; readonly fuelDetail?: components["schemas"]["FuelResource"]; /** @description Código de Benefício Fiscal na UF aplicado ao item (cBenef) */ readonly benefit?: string | null; /** @description Declaração Importação (DI) */ readonly importDeclarations?: readonly components["schemas"]["ImportDeclarationResource"][] | null; /** @description Grupo de informações de exportação para o item (detExport) */ readonly exportDetails?: readonly components["schemas"]["ExportDetailResource"][] | null; readonly taxDetermination?: components["schemas"]["TaxDeterminationResource"]; }; readonly InvoiceItemTaxResource: { /** * Format: double * @description Valor aproximado total de tributos federais, estaduais e municipais (vTotTrib) */ readonly totalTax?: number | null; readonly icms?: components["schemas"]["IcmsTaxResource"]; readonly ipi?: components["schemas"]["IPITaxResource"]; readonly ii?: components["schemas"]["IITaxResource"]; readonly pis?: components["schemas"]["PISTaxResource"]; readonly cofins?: components["schemas"]["CofinsTaxResource"]; readonly icmsDestination?: components["schemas"]["ICMSUFDestinationTaxResource"]; }; readonly InvoiceItemsResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificador da Empresa */ readonly companyId?: string | null; /** @description Identificador da Nota Fiscal */ readonly id?: string | null; /** @description Detalhamento de Produtos e Serviços (det) - Lista de Items da Nota Fiscal */ readonly items?: readonly components["schemas"]["InvoiceItemResource"][] | null; /** @description Identifica se existem mais items a serem consultados */ readonly hasMore?: boolean | null; }; readonly InvoiceResource: { /** @description Identificador único */readonly id?: string | null; /** * Format: int32 * @description Série do Documento Fiscal (serie) */ readonly serie?: number | null; /** * Format: int64 * @description Número do Documento Fiscal (nNF) */ readonly number?: number | null; readonly status?: components["schemas"]["InvoiceStatus"]; readonly authorization?: components["schemas"]["AuthorizationResource"]; readonly contingencyDetails?: components["schemas"]["ContingencyDetails"]; /** @description Descrição da Natureza da Operação (natOp) */ readonly operationNature?: string | null; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string | null; /** * Format: date-time * @description Data de modificação */ readonly modifiedOn?: string | null; /** * Format: date-time * @description Data e Hora de Saída ou da Entrada da Mercadoria/Produto (dhSaiEnt) * * Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD. * */ readonly operationOn?: string | null; readonly operationType?: components["schemas"]["OperationType"]; readonly environmentType?: components["schemas"]["EnvironmentType"]; readonly purposeType?: components["schemas"]["PurposeType"]; readonly issuer?: components["schemas"]["IssuerResource"]; readonly buyer?: components["schemas"]["BuyerResource"]; readonly totals?: components["schemas"]["TotalResource"]; readonly transport?: components["schemas"]["TransportInformationResource"]; readonly additionalInformation?: components["schemas"]["AdditionalInformationResource"]; readonly export?: components["schemas"]["ExportResource"]; readonly billing?: components["schemas"]["BillingResource"]; /** @description Grupo de Formas de Pagamento (pag) */ readonly payment?: readonly components["schemas"]["PaymentResource"][] | null; readonly transactionIntermediate?: components["schemas"]["IntermediateResource"]; readonly delivery?: components["schemas"]["DeliveryInformationResource"]; readonly withdrawal?: components["schemas"]["WithdrawalInformationResource"]; readonly lastEvents?: components["schemas"]["InvoiceEventsResourceBase"]; }; /** @enum {string} */ readonly InvoiceStatus: "None" | "Created" | "Processing" | "Issued" | "IssuedContingency" | "Cancelled" | "Disabled" | "IssueDenied" | "Error"; readonly InvoiceWithoutEventsResource: { /** @description Identificador único */readonly id?: string | null; /** * Format: int32 * @description Série do Documento Fiscal (serie) */ readonly serie?: number | null; /** * Format: int64 * @description Número do Documento Fiscal (nNF) */ readonly number?: number | null; readonly status?: components["schemas"]["InvoiceStatus"]; readonly authorization?: components["schemas"]["AuthorizationResource"]; readonly contingencyDetails?: components["schemas"]["ContingencyDetails"]; /** @description Descrição da Natureza da Operação (natOp) */ readonly operationNature?: string | null; /** * Format: date-time * @description Data de criação */ readonly createdOn?: string | null; /** * Format: date-time * @description Data de modificação */ readonly modifiedOn?: string | null; /** * Format: date-time * @description Data e Hora de Saída ou da Entrada da Mercadoria/Produto (dhSaiEnt) * * Data e hora no formato UTC (Universal Coordinated Time): AAAA-MM-DDThh:mm:ssTZD. * */ readonly operationOn?: string | null; readonly operationType?: components["schemas"]["OperationType"]; readonly environmentType?: components["schemas"]["EnvironmentType"]; readonly purposeType?: components["schemas"]["PurposeType"]; readonly issuer?: components["schemas"]["IssuerResource"]; readonly buyer?: components["schemas"]["BuyerResource"]; readonly totals?: components["schemas"]["TotalResource"]; readonly transport?: components["schemas"]["TransportInformationResource"]; readonly additionalInformation?: components["schemas"]["AdditionalInformationResource"]; readonly export?: components["schemas"]["ExportResource"]; readonly billing?: components["schemas"]["BillingResource"]; /** @description Grupo de Formas de Pagamento (pag) */ readonly payment?: readonly components["schemas"]["PaymentResource"][] | null; readonly transactionIntermediate?: components["schemas"]["IntermediateResource"]; readonly delivery?: components["schemas"]["DeliveryInformationResource"]; readonly withdrawal?: components["schemas"]["WithdrawalInformationResource"]; }; readonly IssuerFromRequestResource: { /** @description IE do Substituto Tributário (IEST) */readonly stStateTaxNumber?: string | null; }; /** * @description Manual_de_Orientação_Contribuinte_v_5.00 * Grupo de identificação do emitente da NF-e */ readonly IssuerResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components["schemas"]["AddressResource"]; readonly type?: components["schemas"]["PersonType"]; /** @description Nome Fantasia */ readonly tradeName?: string | null; /** * Format: date-time * @description Data abertura da empresa */ readonly openningDate?: string | null; readonly taxRegime?: components["schemas"]["TaxRegime"]; readonly specialTaxRegime?: components["schemas"]["SpecialTaxRegime"]; readonly legalNature?: components["schemas"]["LegalNature"]; /** @description Atividades da Empresa (CNAE) */ readonly economicActivities?: readonly components["schemas"]["EconomicActivityResource"][] | null; /** * Format: int64 * @description Número de Inscrição na Junta Comercial */ readonly companyRegistryNumber?: number | null; /** * Format: int64 * @description Número de Inscrição na SEFAZ (IE) */ readonly regionalTaxNumber?: number | null; /** * Format: int64 * @description Inscrição Estadual do Substituto Tributário (IEST) */ readonly regionalSTTaxNumber?: number | null; /** @description Número de Inscrição na Prefeitura (IM/CCM) */ readonly municipalTaxNumber?: string | null; /** @description IE do Substituto Tributário (IEST) */ readonly stStateTaxNumber?: string | null; }; /** @enum {string} */ readonly LegalNature: "EmpresaPublica" | "SociedadeEconomiaMista" | "SociedadeAnonimaAberta" | "SociedadeAnonimaFechada" | "SociedadeEmpresariaLimitada" | "SociedadeEmpresariaEmNomeColetivo" | "SociedadeEmpresariaEmComanditaSimples" | "SociedadeEmpresariaEmComanditaporAcoes" | "SociedadeemContaParticipacao" | "Empresario" | "Cooperativa" | "ConsorcioSociedades" | "GrupoSociedades" | "EmpresaDomiciliadaExterior" | "ClubeFundoInvestimento" | "SociedadeSimplesPura" | "SociedadeSimplesLimitada" | "SociedadeSimplesEmNomeColetivo" | "SociedadeSimplesEmComanditaSimples" | "EmpresaBinacional" | "ConsorcioEmpregadores" | "ConsorcioSimples" | "EireliNaturezaEmpresaria" | "EireliNaturezaSimples" | "ServicoNotarial" | "FundacaoPrivada" | "ServicoSocialAutonomo" | "CondominioEdilicio" | "ComissaoConciliacaoPrevia" | "EntidadeMediacaoArbitragem" | "PartidoPolitico" | "EntidadeSindical" | "EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras" | "FundacaoAssociacaoDomiciliadaExterior" | "OrganizacaoReligiosa" | "ComunidadeIndigena" | "FundoPrivado" | "AssociacaoPrivada"; /** @enum {string} */ readonly OperationType: "Outgoing" | "Incoming"; /** @description Grupo do PIS */ readonly PISTaxResource: { /** @description Código de Situação Tributária do PIS (CST) */readonly cst?: string | null; /** * Format: double * @description Valor da Base de Cálculo do PIS (vBC) */ readonly baseTax?: number | null; /** * Format: double * @description Alíquota do PIS (em percentual) (pPIS) */ readonly rate?: number | null; /** * Format: double * @description Valor do PIS (vPIS) */ readonly amount?: number | null; /** * Format: double * @description Quantidade Vendida (qBCProd) */ readonly baseTaxProductQuantity?: number | null; /** * Format: double * @description Alíquota do PIS (em reais) (vAliqProd) */ readonly productRate?: number | null; }; readonly PaymentDetailResource: { readonly method?: components["schemas"]["PaymentMethod"]; /** @description Descrição do meio de pagamento (xPag) */ readonly methodDescription?: string | null; readonly paymentType?: components["schemas"]["PaymentType"]; /** * Format: double * @description Valor do Pagamento (vPag) */ readonly amount?: number | null; readonly card?: components["schemas"]["CardResource"]; /** * Format: date-time * @description Data do pagamento (dPag) */ readonly paymentDate?: string | null; /** @description CNPJ transacional do pagamento (CNPJPag) */ readonly federalTaxNumberPag?: string | null; /** @description UF do CNPJ do estabelecimento onde o pagamento foi processado/transacionado/recebido (UFPag) */ readonly statePag?: string | null; }; /** @enum {string} */ readonly PaymentMethod: "Cash" | "Cheque" | "CreditCard" | "DebitCard" | "StoreCredict" | "FoodVouchers" | "MealVouchers" | "GiftVouchers" | "FuelVouchers" | "BankBill" | "BankDeposit" | "InstantPayment" | "WireTransfer" | "Cashback" | "StaticInstantPayment" | "StoreCredit" | "ElectronicPaymentNotInformed" | "WithoutPayment" | "Others"; readonly PaymentResource: { /** * @description YA01a - Grupo Detalhamento da Forma de Pagamento (detPag) * VERSÃO 4.00 */ readonly paymentDetail?: readonly components["schemas"]["PaymentDetailResource"][] | null; /** * Format: double * @description Valor do troco (vTroco) * VERSÃO 4.00 */ readonly payBack?: number | null; }; /** @enum {string} */ readonly PaymentType: "InCash" | "Term"; /** @enum {string} */ readonly PersonType: "Undefined" | "NaturalPerson" | "LegalEntity" | "Company" | "Customer"; /** @enum {string} */ readonly PrintType: "None" | "NFeNormalPortrait" | "NFeNormalLandscape" | "NFeSimplified" | "DANFE_NFC_E" | "DANFE_NFC_E_MSG_ELETRONICA"; readonly PumpResource: { /** * Format: int32 * @description Número de identificação do bico utilizado no abastecimento (nBico) */ readonly spoutNumber?: number | null; /** * Format: int32 * @description Número de identificação da bomba ao qual o bico está interligado (nBomba) */ readonly number?: number | null; /** * Format: int32 * @description Número de identificação do tanque ao qual o bico está interligado (nTanque) */ readonly tankNumber?: number | null; /** * Format: double * @description Valor do Encerrante no início do abastecimento (vEncIni) */ readonly beginningAmount?: number | null; /** * Format: double * @description Valor do Encerrante no final do abastecimento (vEncFin) */ readonly endAmount?: number | null; /** * Format: double * @description Percentual do índice de mistura do Biodiesel (B100) no Óleo Diesel B instituído pelo órgão regulamentador */ readonly percentageBio?: number | null; }; /** @enum {string} */ readonly PurposeType: "None" | "Normal" | "Complement" | "Adjustment" | "Devolution"; /** * @description Manual_de_Orientação_Contribuinte_v_5.00 * Grupo Reboque */ readonly ReboqueResource: { /** @description Placa do Veiculo (placa) */readonly plate?: string | null; /** @description UF Veiculo Reboque (UF) */ readonly uf?: string | null; /** @description Registro Nacional de Transportador de Carga (ANTT) (RNTC) */ readonly rntc?: string | null; /** @description Identificação do Vagão (vagao) */ readonly wagon?: string | null; /** @description Identificação da Balsa (balsa) */ readonly ferry?: string | null; }; /** @enum {string} */ readonly ReceiverStateTaxIndicator: "None" | "TaxPayer" | "Exempt" | "NonTaxPayer"; readonly ReferencedProcessResource: { readonly identifierConcessory?: string | null; /** Format: int32 */ readonly identifierOrigin?: number | null; /** Format: int32 */ readonly concessionActType?: number | null; }; readonly RequestCancellationResource: { readonly accountId?: string | null; readonly companyId?: string | null; readonly productInvoiceId?: string | null; readonly reason?: string | null; }; /** @enum {string} */ readonly ShippingModality: "ByIssuer" | "ByReceiver" | "ByThirdParties" | "OwnBySender" | "OwnByBuyer" | "Free"; /** * @description Regime especial de tributação * @enum {string} */ readonly SpecialTaxRegime: "Nenhum" | "MicroempresaMunicipal" | "Estimativa" | "SociedadeDeProfissionais" | "Cooperativa" | "MicroempreendedorIndividual" | "MicroempresarioEmpresaPequenoPorte" | "Automatico"; /** @enum {string} */ readonly StateCode: "NA" | "RO" | "AC" | "AM" | "RR" | "PA" | "AP" | "TO" | "MA" | "PI" | "CE" | "RN" | "PB" | "PE" | "AL" | "SE" | "BA" | "MG" | "ES" | "RJ" | "SP" | "PR" | "SC" | "RS" | "MS" | "MT" | "GO" | "DF" | "EX"; /** @enum {string} */ readonly StateTaxProcessingAuthorizer: "Normal" | "EPEC"; readonly TaxCouponInformationResource: { /** @description Modelo de Documento Fiscal (mod) */readonly modelDocumentFiscal?: string | null; /** @description Número de Ordem Sequencial do ECF (nECF) */ readonly orderECF?: string | null; /** * Format: int32 * @description Número do Contador de Ordem de Operação (nCOO) */ readonly orderCountOperation?: number | null; }; readonly TaxDeterminationResource: { /** * Format: int32 * @description Código interno para determinação de natureza de operação */ readonly operationCode?: number | null; /** @description Perfil fiscal do vendedor (origem) - usado para o cálculo automático de impostos */ readonly issuerTaxProfile?: string | null; /** @description Perfil fiscal do comprador (destino) - usado para o cálculo automático de impostos */ readonly buyerTaxProfile?: string | null; /** @description Origem da mercadoria */ readonly origin?: string | null; /** @description Finalidade de aquisição - usado para o cálculo automático de impostos */ readonly acquisitionPurpose?: string | null; }; readonly TaxDocumentsReferenceResource: { readonly taxCouponInformation?: components["schemas"]["TaxCouponInformationResource"]; readonly documentInvoiceReference?: components["schemas"]["DocumentInvoiceReferenceResource"]; readonly documentElectronicInvoice?: components["schemas"]["DocumentElectronicInvoiceResource"]; }; /** * @description Regime de tributação * @enum {string} */ readonly TaxRegime: "None" | "LucroReal" | "LucroPresumido" | "SimplesNacional" | "SimplesNacionalExcessoSublimite" | "MicroempreendedorIndividual" | "Isento"; readonly TaxpayerCommentsResource: { /** @description Campo (xCampo) */readonly field?: string | null; /** @description Texto (xTexto) */ readonly text?: string | null; }; readonly TotalResource: { readonly icms?: components["schemas"]["ICMSTotalResource"]; readonly issqn?: components["schemas"]["ISSQNTotalResource"]; }; /** * @description Manual_de_Orientação_Contribuinte_v_5.00 * Grupo Transportador */ readonly TransportGroupResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components["schemas"]["AddressResource"]; readonly type?: components["schemas"]["PersonType"]; /** @description Inscrição Estadual do Transportador (IE) */ readonly stateTaxNumber?: string | null; /** @description Grupo de Retenção do ICMS do transporte */ readonly transportRetention?: string | null; }; /** * @description Manual_de_Orientação_Contribuinte_v_5.00 * Grupo de Informações do Transporte da NF-e * Id: X01 Pai: A1 */ readonly TransportInformationResource: { readonly freightModality?: components["schemas"]["ShippingModality"]; readonly transportGroup?: components["schemas"]["TransportGroupResource"]; readonly reboque?: components["schemas"]["ReboqueResource"]; readonly volume?: components["schemas"]["VolumeResource"]; readonly transportVehicle?: components["schemas"]["TransportVehicleResource"]; /** @description Número dos Lacres */ readonly sealNumber?: string | null; readonly transpRate?: components["schemas"]["TransportRateResource"]; }; readonly TransportRateResource: { /** * Format: double * @description Valor do Serviço (vServ) */ readonly serviceAmount?: number | null; /** * Format: double * @description BC da Retenção do ICMS (vBCRet) */ readonly bcRetentionAmount?: number | null; /** * Format: double * @description Alíquota da Retenção (pICMSRet) //Change to Rate */ readonly icmsRetentionRate?: number | null; /** * Format: double * @description Valor do ICMS Retido (vICMSRet) */ readonly icmsRetentionAmount?: number | null; /** * Format: int64 * @description CFOP de Serviço de Transporte (CFOP) */ readonly cfop?: number | null; /** * Format: int64 * @description Código do Municipio de ocorrencia do fato gerador do ICMS do Transporte (cMunFG) */ readonly cityGeneratorFactCode?: number | null; }; /** * @description Manual_de_Orientação_Contribuinte_v_5.00 * Grupo Veiculo */ readonly TransportVehicleResource: { /** @description Placa do Veiculo (placa) */readonly plate?: string | null; /** @description Sigla da UF (UF) */ readonly state?: string | null; /** @description Registro Nacional de Transportador de Carga (ANTT) (RNTC) */ readonly rntc?: string | null; }; /** * @description Manual_de_Orientação_Contribuinte_v_5.00 * Volumes * Id:X26 */ readonly VolumeResource: { /** * Format: int32 * @description Quantidade de volumes transportados (qVol) */ readonly volumeQuantity?: number | null; /** @description Espécie dos volumes transportados (esp) */ readonly species?: string | null; /** @description Marca dos Volumes Transportados (marca) */ readonly brand?: string | null; /** @description Numeração dos Volumes Transportados (nVol) */ readonly volumeNumeration?: string | null; /** * Format: double * @description Peso Liquido(em Kg) (pesoL) */ readonly netWeight?: number | null; /** * Format: double * @description Peso Bruto(em Kg) (pesoB) */ readonly grossWeight?: number | null; }; /** @description Identificação do Local de retirada (retirada) */ readonly WithdrawalInformationResource: { /** @description Identificador da Conta */readonly accountId?: string | null; /** @description Identificação */ readonly id?: string | null; /** @description Nome ou Razão Social (xNome) */ readonly name?: string | null; /** * Format: int64 * @description CNPJ ou CPF */ readonly federalTaxNumber?: number | null; /** @description Email */ readonly email?: string | null; readonly address?: components["schemas"]["AddressResource"]; readonly type?: components["schemas"]["PersonType"]; /** @description Inscrição Estadual (IE) */ readonly stateTaxNumber?: string | null; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } //#endregion //#region src/core/types.d.ts /** * NFE.io SDK v3 - Core Types * * TypeScript definitions for NFE.io API v1 * * This file re-exports generated types and adds SDK-specific types * for configuration, HTTP client, and high-level operations. */ interface NfeConfig { /** * API key for every FISCAL host — `api.nfe.io` and `api.nfse.io`. * * Covers companies, service/product/consumer invoices (incl. RTC), certificates, * municipal and state taxes, tax calculation, tax codes, webhooks, and the * inbound CT-e / NF-e distribution resources. */ apiKey?: string; /** * API key for the LOOKUP hosts — `nfe.api.nfe.io`, `legalentity.api.nfe.io`, * `naturalperson.api.nfe.io`, `address.api.nfe.io`. * * Covers address (CEP), legal entity (CNPJ), natural person (CPF) and the * product/consumer invoice *query* resources. * * **The two keys are NOT interchangeable.** Each is rejected with HTTP 403 on * the other family's hosts — verified live on 2026-09-01, see * `tests/fixtures/live-contracts/api-key-host-matrix.json`. Setting this key * does not affect any fiscal resource. * * Optional: falls back to {@link NfeConfig.apiKey} when omitted. Note the * fallback is one-way — a client configured with ONLY `dataApiKey` cannot * reach fiscal resources and throws `ConfigurationError` when one is accessed. */ dataApiKey?: string; /** Environment to use (both use same endpoint, differentiated by API key) */ environment?: 'production' | 'development'; /** Custom base URL (overrides environment) */ baseUrl?: string; /** Request timeout in milliseconds */ timeout?: number; /** Retry configuration */ retryConfig?: RetryConfig; } interface RetryConfig { /** Maximum number of retry attempts */ maxRetries: number; /** Base delay between retries in milliseconds */ baseDelay: number; /** Maximum delay between retries in milliseconds */ maxDelay?: number; /** Backoff multiplier */ backoffMultiplier?: number; } interface HttpConfig { baseUrl: string; apiKey: string; timeout: number; retryConfig: RetryConfig; } interface HttpResponse { data: T; status: number; headers: Record; } interface AsyncResponse { code: 202; status: 'pending'; location: string; } /** Flow status for service invoice processing */ type FlowStatus = 'CancelFailed' | 'IssueFailed' | 'Issued' | 'Cancelled' | 'PullFromCityHall' | 'WaitingCalculateTaxes' | 'WaitingDefineRpsNumber' | 'WaitingSend' | 'WaitingSendCancel' | 'WaitingReturn' | 'WaitingDownload'; /** Async response with extracted invoice ID */ interface ServiceInvoiceAsyncResponse extends AsyncResponse { /** Invoice ID extracted from location header */ invoiceId: string; } /** Options for listing service invoices */ interface ListServiceInvoicesOptions extends PaginationOptions { /** Filter by issued date start (yyyy-MM-dd) */ issuedBegin?: string; /** Filter by issued date end (yyyy-MM-dd) */ issuedEnd?: string; /** Filter by created date start (yyyy-MM-dd) */ createdBegin?: string; /** Filter by created date end (yyyy-MM-dd) */ createdEnd?: string; /** Include totals in response */ hasTotals?: boolean; } /** Options for automatic polling in createAndWait */ interface PollingOptions { /** Total timeout in milliseconds @default 120000 (2 minutes) */ timeout?: number; /** Initial delay before first poll @default 1000 (1 second) */ initialDelay?: number; /** Maximum delay between polls @default 10000 (10 seconds) */ maxDelay?: number; /** Backoff multiplier for exponential backoff @default 1.5 */ backoffFactor?: number; /** Callback invoked after each poll attempt */ onPoll?: (attempt: number, flowStatus: FlowStatus) => void; } /** Response from sendEmail operation */ interface SendEmailResponse { /** Whether email was sent successfully */ sent: boolean; /** Optional message about the send operation */ message?: string; } /** Additional invoice details (withholdings, deductions) */ type ServiceInvoiceDetails = { issWithheld?: number; pisWithheld?: number; cofinsWithheld?: number; csllWithheld?: number; irrfWithheld?: number; inssWithheld?: number; deductions?: number; additionalInformation?: string; }; type EntityType = 'Undefined' | 'NaturalPerson' | 'LegalEntity'; type TaxRegime = 'Isento' | 'MicroempreendedorIndividual' | 'SimplesNacional' | 'LucroPresumido' | 'LucroReal'; type SpecialTaxRegime = 'Automatico' | 'Nenhum' | 'MicroempresaMunicipal' | 'Estimativa' | 'SociedadeDeProfissionais' | 'Cooperativa' | 'MicroempreendedorIndividual' | 'MicroempresarioEmpresaPequenoPorte'; /** * @deprecated Este shape (`url`/`events`/`active`) não corresponde ao contrato real da * API de webhooks (confirmado ao vivo em 2026-07-02: a API rejeita `url` com * `400 "The Uri field is required"`). Use {@link AccountWebhook} com os métodos * account-scoped (`listAccountWebhooks`, `createAccountWebhook`, ...). */ interface Webhook { /** Webhook ID */ id?: string; /** Target URL */ url: string; /** Webhook events */ events: WebhookEvent[]; /** Is active */ active?: boolean; /** Secret for signature validation */ secret?: string; /** Creation timestamp */ createdOn?: string; /** Last update timestamp */ modifiedOn?: string; } /** * @deprecated Estes literais (`invoice.*`) não existem na API real — os event types * vivos seguem o padrão `service_invoice.issued_successfully` etc. Use * {@link WebhookEventType} (lista viva via `webhooks.fetchEventTypes()`). */ type WebhookEvent = 'invoice.created' | 'invoice.issued' | 'invoice.cancelled' | 'invoice.failed'; /** * Webhook de conta — shape real do recurso em `/v2/webhooks`, conforme os specs * oficiais (`openapi/spec/nf-servico-v1.yaml` e equivalentes) e confirmado ao vivo * (2026-07-02). * * Nota de contrato: o spec declara `contentType`/`status` como enums inteiros, mas a * API serializa strings (`"json"`, `"Active"`) — o tipo segue o formato de fio real. */ interface AccountWebhook { /** ID exclusivo do webhook (GUID gerado pela API) */ id?: string; /** URL de entrega das notificações. Verificada com ping na criação (exige 2xx). */ uri: string; /** Media type das entregas (a API serializa string, ex.: `"json"`) */ contentType?: 'json' | (string & {}); /** * Segredo de 32–64 caracteres usado no HMAC-SHA1 do header `X-Hub-Signature`. * Ecoado na resposta do create; omitido em list/retrieve (write-only na leitura). */ secret?: string; /** Filtros de event types (ver {@link WebhookEventType} e `fetchEventTypes()`) */ filters?: Array; /** Pular verificação do certificado SSL do host da URI (padrão: `false`) */ insecureSsl?: boolean; /** Cabeçalhos HTTP adicionais enviados nas entregas */ headers?: Record; /** Propriedades adicionais incluídas no corpo das notificações */ properties?: Record; /** Status do webhook (a API serializa string, ex.: `"Active"`) */ status?: 'Active' | (string & {}); /** Data de criação */ createdOn?: string; /** Data de modificação */ modifiedOn?: string; } /** * Event types reais de webhook, extraídos de `GET /v2/webhooks/eventTypes` ao vivo * (2026-07-02). União aberta: ids novos do servidor continuam aceitos sem quebra. * Prefira `webhooks.fetchEventTypes()` para a lista viva. * * (O id `legal_entity_taxpayer:updated_sucessfully` — com `:` e grafia `sucessfully` — * é reproduzido exatamente como a API o retorna.) */ type WebhookEventType = 'service_invoice.issued' | 'service_invoice.issued_successfully' | 'service_invoice.issued_error' | 'service_invoice.issued_failed' | 'service_invoice.cancelled' | 'service_invoice.cancelled_successfully' | 'service_invoice.cancelled_error' | 'service_invoice.cancelled_failed' | 'service_invoice.pulled' | 'service_invoice_inbound.issued_successfully' | 'service_invoice_inbound.event_raised_successfully' | 'product_invoice.issued_successfully' | 'product_invoice.issued_error' | 'product_invoice.issued_failed' | 'product_invoice.cancelled_successfully' | 'product_invoice.cancelled_error' | 'product_invoice.cancelled_failed' | 'product_invoice.cce_successfully' | 'product_invoice.cce_error' | 'product_invoice.cce_failed' | 'product_invoice.dfe_event_successfully' | 'product_invoice.dfe_event_error' | 'product_invoice.dfe_event_failed' | 'product_invoice.disabled_successfully' | 'product_invoice.disabled_error' | 'product_invoice.disabled_failed' | 'product_invoice_inbound.issued_successfully' | 'product_invoice_inbound.event_raised_successfully' | 'product_invoice_inbound.input_event_raised_successfully' | 'product_invoice_inbound_summary.issued_successfully' | 'product_invoice_inbound_summary.event_raised_successfully' | 'consumer_invoice.issued_successfully' | 'consumer_invoice.issued_error' | 'consumer_invoice.issued_failed' | 'consumer_invoice.cancelled_successfully' | 'consumer_invoice.cancelled_error' | 'consumer_invoice.cancelled_failed' | 'transportation_invoice_inbound.issued_successfully' | 'transportation_invoice_inbound.event_raised_successfully' | 'legal_entity_taxpayer:updated_sucessfully' | 'product_tax.created_successfully' | 'product_tax.creation_failed' | 'product_tax.custom_rules_requested' | 'tax_payment_form.created_successfully' | 'tax_payment_form.creation_failed' | 'tax_payment_form.creation_not_needed' | (string & {}); /** * City information with IBGE code */ interface AddressCity { /** IBGE city code */ code: string; /** City name */ name: string; } /** * Complete address information from Correios DNE */ interface Address { /** State abbreviation (e.g., 'SP', 'RJ') */ state: string; /** City information with IBGE code */ city: AddressCity; /** District/neighborhood name */ district: string; /** Additional address information */ additionalInformation: string; /** Street type suffix (e.g., 'Avenida', 'Rua') */ streetSuffix: string; /** Street name */ street: string; /** Address number (may be a textual range, e.g. "de 612 a 1510 - lado par") */ number: string; /** Minimum number in range (omitted by the API for some entries) */ numberMin?: string; /** Maximum number in range (omitted by the API for some entries) */ numberMax?: string; /** Postal code (CEP), returned formatted with hyphen (e.g. "01310-100") */ postalCode: string; /** Country code (ISO 3166-1 alpha-3, e.g. "BRA") */ country: string; } /** * Raw response envelope from the postal-code lookup endpoint * (`GET /v2/addresses/{cep}`). The API wraps the single result in an `address` key; * {@link AddressesResource.lookupByPostalCode} unwraps it and returns the inner * {@link Address}. */ interface AddressLookupResponse { /** The single matching address */ address: Address; } interface ListResponse { /** Response data array */ data: T[]; /** Total count (if available) */ totalCount?: number; /** Page information */ page?: PageInfo; } interface PageInfo { /** Current page index (1-based — the first page is 1) */ pageIndex: number; /** Items per page */ pageCount: number; /** Has next page */ hasNext?: boolean; /** Has previous page */ hasPrevious?: boolean; } interface PaginationOptions extends Record { /** Page index (1-based — the first page is 1; the API rejects 0) */ pageIndex?: number; /** Items per page */ pageCount?: number; } interface PollOptions { /** Maximum number of polling attempts */ maxAttempts?: number; /** Interval between attempts in milliseconds */ intervalMs?: number; } /** * Internal normalized configuration after processing NfeConfig. * API keys remain optional since validation is done lazily when resources are accessed. */ interface RequiredNfeConfig { /** Main API key (may be undefined if only using data services) */ apiKey: string | undefined; /** Data API key for the lookup hosts (address, CNPJ, CPF, invoice query). Not valid on fiscal hosts. May be undefined; falls back to apiKey. */ dataApiKey: string | undefined; /** Environment */ environment: 'production' | 'development'; /** Base URL for main API */ baseUrl: string; /** Request timeout */ timeout: number; /** Retry configuration */ retryConfig: Required; } /** Extract resource ID from response or input */ type ResourceId = string; /** Generic API error response */ interface ApiErrorResponse { code: number; message: string; details?: unknown; } type ServiceInvoicesGetOperation = operations['ServiceInvoices_Get']; type ServiceInvoicesPostOperation = operations['ServiceInvoices_Post']; /** * Service Invoice response type (from GET operations) * The main type representing a Service Invoice in the system */ type ServiceInvoiceData = NonNullable[number]>; /** * Service Invoice creation request body * Type for the data sent when creating a new service invoice */ type CreateServiceInvoiceData = ServiceInvoicesPostOperation['requestBody']['content']['application/json']; /** * Service Invoice list response * Type for the complete list response including metadata */ type ServiceInvoiceListResponse = ServiceInvoicesGetOperation['responses']['200']['content']['application/json']; /** * Company entity. * * Additive enrichment (no breaking change, ships in a minor): the original * required fields and the permissive `[key: string]: unknown` index are kept, * and the documented `contribuintes-v2` fields (address, taxRegime, tradeName, * stateTaxes, …) are added as **optional** — so autocomplete improves without * tightening the type or the `create()` input. Use {@link CompanyResourceItem} / * {@link CompanyResourceV1} for the strict spec shapes, and * {@link CreateCompanyResourceItem} for a strict create input. */ type Company = { id?: string; name: string; federalTaxNumber: number; email: string; } & Partial> & { [key: string]: unknown; }; /** * Legal Person type. * NOTE: no dedicated 3.x spec backs the company-scoped legalpeople sub-resource yet, * so this remains hand-typed (review F14). Keep the permissive index for compat. */ type LegalPerson = { id?: string; federalTaxNumber: string; name: string; [key: string]: unknown; }; /** * Natural Person type. * NOTE: hand-typed for the same reason as {@link LegalPerson}. */ type NaturalPerson = { id?: string; federalTaxNumber: string; name: string; [key: string]: unknown; }; /** RTC NFS-e (service) emission request body — named schema `NFSeRequest`. */ type NFSeRtcRequest = components$3['schemas']['NFSeRequest']; /** RTC NF-e/NFC-e (product) emission request body — named schema `ProductInvoiceRequest`. */ type ProductInvoiceRtcRequest = components$2['schemas']['ProductInvoiceRequest']; /** Company entity (list/item shape) — `contribuintes-v2` field-bearing schema. */ type CompanyResourceItem = components$1['schemas']['DFeTech.TaxPayers.Resources.CompanyResourceItem']; /** Company entity (rich v1 shape, 28 fields). */ type CompanyResourceV1 = components$1['schemas']['DFeTech.TaxPayers.Resources.CompanyResourceV1']; /** Company creation request body (opt-in, decoupled from the response type). */ type CreateCompanyResourceItem = components$1['schemas']['DFeTech.TaxPayers.Resources.CreateCompanyResourceItem']; /** Company update request body. */ type UpdateCompanyResourceItem = components$1['schemas']['DFeTech.TaxPayers.Resources.UpdateCompanyResourceItem']; /** * Options for the v2 cursor-based company listing * (`GET api.nfse.io/v2/companies`, contribuintes-v2). */ interface CompanyV2ListOptions { /** Cursor: start after this company ID */ startingAfter?: string; /** Cursor: end before this company ID */ endingBefore?: string; /** Number of results per page — the API accepts 1-50 (default: 10) */ limit?: number; } /** * Response of the v2 cursor-based company listing. * * Items follow the v2 projection ({@link CompanyResourceItem}) — a different * shape from the v1 {@link Company}: no NFS-e config fields (`rpsNumber`, * `issRate`, `environment`, `fiscalStatus`, `certificate`, ...), and with * v2-only fields (`stateTaxes`, `municipalTaxes`, `type`, `version`). */ interface CompanyV2ListResponse { /** Companies in this page (v2 projection) */ data: CompanyResourceItem[]; /** Whether more pages exist after this one */ hasMore: boolean; } /** * Certificado embutido no item da listagem de empresas v1. * * `GET /v1/companies` devolve este objeto em CADA item — medido em 2026-09-02 * nos 50 itens da primeira página. É por isso que a varredura de certificados * por conta não precisa de uma requisição por empresa. * * Atenção ao nome do campo de vencimento: aqui é `expiresOn`; no endpoint * `/v1/companies/{id}/certificate` o mesmo dado se chama `validUntil`. */ type CompanyCertificateV1 = components$1['schemas']['DFeTech.TaxPayers.Resources.CompanyCertificateV1']; /** Item de certificado devolvido por `/v1/companies/{id}/certificate`. */ type CertificateMetadataResourceItem = components$1['schemas']['DFeTech.TaxPayers.Resources.CertificateMetadataResourceItem']; /** Situação do certificado: `None` | `Active` | `Inactive` | `Overdue` | `Pending`. */ type CertificateStatus = components$1['schemas']['DFeTech.TaxPayers.Domain.Entities.CertificateStatus']; /** Digital certificate metadata (real, spec-backed). */ type CertificateMetadataResource = components$1['schemas']['DFeTech.TaxPayers.Resources.CertificateMetadataResource']; /** Digital certificate metadata collection (plural `/certificates`). */ type CertificatesMetadataResource = components$1['schemas']['DFeTech.TaxPayers.Resources.CertificatesMetadataResource']; /** Company address (spec-backed). */ type CompanyAddress = components$1['schemas']['DFeTech.TaxPayers.Resources.AddressResource']; /** Municipal tax registration (Inscrição Municipal) entity. */ type MunicipalTax = components$1['schemas']['DFeTech.TaxPayers.Resources.MunicipalTaxResourceItem']; /** Municipal tax creation input (item; wrapped as `{ municipalTax }` on the wire). */ type CreateMunicipalTaxData = components$1['schemas']['DFeTech.TaxPayers.Resources.CreateMunicipalTaxResourceItem']; /** Municipal tax update input (item). */ type UpdateMunicipalTaxData = components$1['schemas']['DFeTech.TaxPayers.Resources.UpdateMunicipalTaxResourceItem']; /** List response for municipal taxes (best-effort shape). */ interface MunicipalTaxListResponse { municipalTaxes?: MunicipalTax[]; [key: string]: unknown; } /** NFC-e emission request body (`ConsumerInvoiceRequest`). */ type ConsumerInvoiceData = components['schemas']['ConsumerInvoiceRequest']; /** NFC-e invoice entity (`InvoiceResource`). */ type ConsumerInvoice = components['schemas']['InvoiceResource']; /** NFC-e list response envelope (`ConsumerInvoicesResource`). */ type ConsumerInvoiceListResponse = components['schemas']['ConsumerInvoicesResource']; /** NFC-e disablement (inutilização) request body (`DisablementResource`). */ type ConsumerInvoiceDisablementData = components['schemas']['DisablementResource']; /** * NFC-e items response (`InvoiceItemsResource`) — `{ accountId, companyId, id, * items, hasMore }`. Cursor pagination via `limit`/`startingAfter`. */ type ConsumerInvoiceItemsResponse = components['schemas']['InvoiceItemsResource']; /** * NFC-e events response (`InvoiceEventsResource`) — `{ id, accountId, companyId, * events, hasMore }`. Its own type: the product-invoice events envelope is a * different shape and must not be reused here. */ type ConsumerInvoiceEventsResponse = components['schemas']['InvoiceEventsResource']; /** * NFC-e cancellation response (`RequestCancellationResource`) — returned by * `DELETE /consumerinvoices/{id}` (204). */ type ConsumerInvoiceCancellationResponse = components['schemas']['RequestCancellationResource']; /** * NFC-e document download response (`FileResource`) — `{ uri }`. * * Note the envelope differs from the inbound routes, which use * `publicTemporaryUri` ({@link InboundFileResource}). Verified live 2026-09-01. */ type ConsumerInvoiceFileResource = components['schemas']['FileResource']; /** * Transportation Invoice inbound settings * Configuration for automatic CT-e search via SEFAZ Distribuição DFe */ type TransportationInvoiceInboundSettings = components$4['schemas']['DFe.NetCore.Domain.Resources.TransportationInvoiceInboundResource']; /** * Transportation Invoice metadata * Metadata of a CT-e document retrieved via Distribuição DFe */ type TransportationInvoiceMetadata = components$4['schemas']['DFe.NetCore.Domain.Resources.MetadataResource']; /** * Options for enabling automatic CT-e search */ interface EnableTransportationInvoiceOptions { /** Start from a specific NSU (Número Sequencial Único) */ startFromNsu?: number; /** Start from a specific date (ISO 8601 format) */ startFromDate?: string; } /** * CT-e entity status */ type TransportationInvoiceEntityStatus = components$4['schemas']['DFe.NetCore.Domain.Enums.EntityStatus']; /** * CT-e metadata resource type */ type TransportationInvoiceMetadataType = components$4['schemas']['DFe.NetCore.Domain.Enums.MetadataResourceType']; /** * Company reference in inbound document metadata */ interface InboundCompany { /** Company ID */ id: string; /** Company CNPJ */ federalTaxNumber: string; } /** * Issuer reference in inbound document metadata */ interface InboundIssuer { /** Issuer CNPJ */ federalTaxNumber: string; /** Issuer name */ name: string; } /** * Buyer reference in inbound document metadata */ interface InboundBuyer { /** Buyer CNPJ/CPF */ federalTaxNumber: string; /** Buyer name */ name: string; } /** * Transportation entity reference in inbound document metadata */ interface InboundTransportation { /** Transportation CNPJ */ federalTaxNumber: string; /** Transportation name */ name: string; } /** * Document download links */ interface InboundLinks { /** XML download URL */ xml: string; /** PDF download URL */ pdf: string; } /** * Product invoice reference (used in webhook v2 responses) */ interface InboundProductInvoice { /** Access key of the referenced product invoice */ accessKey: string; } /** * Automatic manifesting configuration */ interface AutomaticManifesting { /** Minutes to wait before automatic awareness operation */ minutesToWaitAwarenessOperation: string; } /** * Inbound invoice metadata (webhook v1 format) * * Contains details of an NF-e or CT-e document retrieved via Distribuição DFe. * Corresponds to the generic endpoint `GET /{access_key}`. */ interface InboundInvoiceMetadata { /** Document ID */ id: string; /** Creation timestamp */ createdOn: string; /** 44-digit access key */ accessKey: string; /** Parent document access key (for events) */ parentAccessKey: string; /** Company that received the document */ company: InboundCompany; /** Document issuer */ issuer: InboundIssuer; /** Document buyer */ buyer: InboundBuyer; /** Transportation entity */ transportation: InboundTransportation; /** Download links */ links: InboundLinks; /** XML download URL */ xmlUrl: string; /** Sender CNPJ */ federalTaxNumberSender: string; /** Sender name */ nameSender: string; /** Document type */ type: string | null; /** NSU (Número Sequencial Único) */ nsu: string; /** Parent NSU */ nsuParent: string; /** NF-e number */ nfeNumber: string; /** NF-e serial number */ nfeSerialNumber: string; /** Issue date */ issuedOn: string; /** Document description */ description: string; /** Total invoice amount */ totalInvoiceAmount: string; /** Operation type */ operationType: string | null; } /** * Inbound product invoice metadata (webhook v2 format) * * Extends the base metadata with product invoice references. * Corresponds to the `GET /productinvoice/{access_key}` endpoint. */ interface InboundProductInvoiceMetadata extends Omit { /** Referenced product invoices */ productInvoices: InboundProductInvoice[]; } /** * Inbound NF-e distribution service settings * * Configuration for automatic NF-e search via SEFAZ Distribuição DFe. */ interface InboundSettings { /** Starting NSU for document retrieval */ startFromNsu: string; /** Starting date for document retrieval */ startFromDate: string; /** SEFAZ environment (e.g., Production) */ environmentSEFAZ: string | null; /** Automatic manifesting configuration */ automaticManifesting: AutomaticManifesting; /** Webhook version */ webhookVersion: string; /** Company ID */ companyId: string; /** Service status */ status: string | null; /** Creation timestamp */ createdOn: string; /** Last modification timestamp */ modifiedOn: string; } /** * Options for enabling automatic NF-e distribution fetch */ interface EnableInboundOptions { /** Starting NSU number */ startFromNsu?: string; /** Starting date (ISO 8601 format) */ startFromDate?: string; /** SEFAZ environment */ environmentSEFAZ?: string; /** Automatic manifesting settings */ automaticManifesting?: AutomaticManifesting; /** Webhook version */ webhookVersion?: string; } /** * Manifest event types for Manifestação do Destinatário * * - `210210` — Ciência da Operação (awareness of the operation) * - `210220` — Confirmação da Operação (confirmation of the operation) * - `210240` — Operação não Realizada (operation not performed) */ type ManifestEventType = 210210 | 210220 | 210240; /** Current status of a product invoice (NF-e) */ type ProductInvoiceStatus = 'unknown' | 'authorized' | 'canceled'; /** Payment type indicator */ type ProductInvoicePaymentType = 'inCash' | 'term' | 'others'; /** Operation type (incoming/outgoing) */ type ProductInvoiceOperationType = 'incoming' | 'outgoing'; /** Destination of the operation */ type ProductInvoiceDestination = 'international_Operation' | 'interstate_Operation' | 'internal_Operation'; /** DANFE print format */ type ProductInvoicePrintType = 'none' | 'nFeNormalPortrait' | 'nFeNormalLandscape' | 'nFeSimplified' | 'dANFE_NFC_E' | 'dANFE_NFC_E_MSG_ELETRONICA'; /** Invoice issue type (emission contingency modes) */ type ProductInvoiceIssueType = 'normal' | 'cONTINGENCIA_OFF_LINE_NFC_E' | 'cONTINGENCIA_SVC_RS' | 'cONTINGENCIA_SVC_AN' | 'cONTINGENCIA_FS_DA' | 'cONTINGENCIA_DPEC' | 'cONTINGENCIA_SCAN' | 'cONTINGENCIA_FS_IA'; /** Environment type */ type ProductInvoiceEnvironmentType = 'production' | 'test'; /** Invoice purpose */ type ProductInvoicePurposeType = 'normal' | 'complement' | 'adjustment' | 'devolution'; /** Consumer type */ type ProductInvoiceConsumerType = 'normal' | 'finalConsumer'; /** Buyer presence indicator */ type ProductInvoicePresenceType = 'none' | 'presence' | 'internet' | 'telephone' | 'delivery' | 'presenceOutOfStore' | 'othersNoPresente'; /** Process type for invoice emission */ type ProductInvoiceProcessType = 'ownSoftware' | 'fiscoSingle' | 'taxPayerSingle' | 'fiscoSoftware'; /** Tax regime code */ type ProductInvoiceTaxRegimeCode = 'national_Simple' | 'national_Simple_Brute' | 'normal_Regime'; /** Person type */ type ProductInvoicePersonType = 'undefined' | 'naturalPerson' | 'legalEntity'; /** Payment method */ type ProductInvoicePaymentMethod = 'cash' | 'cheque' | 'creditCard' | 'debitCard' | 'storeCredict' | 'foodVouchers' | 'mealVouchers' | 'giftVouchers' | 'fuelVouchers' | 'commercialDuplicate' | 'bankSlip' | 'unpaid' | 'others'; /** Card flag/brand */ type ProductInvoiceCardFlag = 'visa' | 'mastercard' | 'americanExpress' | 'sorocred' | 'dinnersClub' | 'elo' | 'hipercard' | 'aura' | 'cabal' | 'outros'; /** Integration payment type */ type ProductInvoiceIntegrationPaymentType = 'integrated' | 'notIntegrated'; /** City within an address */ interface ProductInvoiceCity { code?: string; name?: string; } /** Address for issuer or buyer */ interface ProductInvoiceAddress { phone?: string; state?: string; city?: ProductInvoiceCity; district?: string; additionalInformation?: string; streetSuffix?: string; street?: string; number?: string; postalCode?: string; country?: string; } /** Invoice issuer (emitente) */ interface ProductInvoiceIssuer { federalTaxNumber?: number; name?: string; tradeName?: string; address?: ProductInvoiceAddress; stateTaxNumber?: string; codeTaxRegime?: ProductInvoiceTaxRegimeCode; cnae?: number; im?: string; iest?: number; type?: ProductInvoicePersonType; } /** Invoice buyer (destinatário) */ interface ProductInvoiceBuyer { federalTaxNumber?: number; name?: string; address?: ProductInvoiceAddress; stateTaxNumber?: string; stateTaxNumberIndicator?: number; email?: string; type?: ProductInvoicePersonType; } /** ICMS totals */ interface ProductInvoiceIcmsTotals { baseTax?: number; icmsAmount?: number; icmsExemptAmount?: number; stCalculationBasisAmount?: number; stAmount?: number; productAmount?: number; freightAmount?: number; insuranceAmount?: number; discountAmount?: number; iiAmount?: number; ipiAmount?: number; pisAmount?: number; cofinsAmount?: number; othersAmount?: number; invoiceAmount?: number; fcpufDestinationAmount?: number; icmsufDestinationAmount?: number; icmsufSenderAmount?: number; federalTaxesAmount?: number; fcpAmount?: number; fcpstAmount?: number; fcpstRetAmount?: number; ipiDevolAmount?: number; } /** ISSQN totals */ interface ProductInvoiceIssqnTotals { totalServiceNotTaxedICMS?: number; baseRateISS?: number; totalISS?: number; valueServicePIS?: number; valueServiceCOFINS?: number; provisionService?: string; deductionReductionBC?: number; valueOtherRetention?: number; discountUnconditional?: number; discountConditioning?: number; totalRetentionISS?: number; codeTaxRegime?: number; } /** Invoice totals */ interface ProductInvoiceTotals { icms?: ProductInvoiceIcmsTotals; issqn?: ProductInvoiceIssqnTotals; } /** ICMS tax on item */ interface ProductInvoiceItemIcms { origin?: string; cst?: string; baseTaxModality?: string; baseTax?: number; baseTaxSTModality?: string; baseTaxSTReduction?: number; baseTaxSTAmount?: number; baseTaxReduction?: number; stRate?: number; stAmount?: number; stMarginAmount?: number; csosn?: string; rate?: number; amount?: number; snCreditRate?: string; snCreditAmount?: string; stMarginAddedAmount?: string; stRetentionAmount?: string; baseSTRetentionAmount?: string; baseTaxOperationPercentual?: string; ufst?: string; amountSTUnfounded?: number; amountSTReason?: string; baseSNRetentionAmount?: string; snRetentionAmount?: string; amountOperation?: string; percentualDeferment?: string; baseDeferred?: string; fcpRate?: number; fcpAmount?: number; fcpstRate?: number; fcpstAmount?: number; fcpstRetRate?: number; fcpstRetAmount?: number; bcfcpstAmount?: number; finalConsumerRate?: number; bcstRetIssuerAmount?: number; stRetIssuerAmout?: number; bcstBuyerAmount?: number; stBuyerAmout?: number; substituteAmount?: number; } /** IPI tax on item */ interface ProductInvoiceItemIpi { classification?: string; producerCNPJ?: string; stampCode?: string; stampQuantity?: number; classificationCode?: string; cst?: string; base?: string; rate?: number; unitQuantity?: number; unitAmount?: number; amount?: number; } /** Import tax (II) on item */ interface ProductInvoiceItemII { baseTax?: string; customsExpenditureAmount?: string; amount?: number; iofAmount?: number; } /** PIS tax on item */ interface ProductInvoiceItemPis { cst?: string; baseTax?: number; rate?: number; amount?: number; baseTaxProductQuantity?: number; productRate?: number; } /** COFINS tax on item */ interface ProductInvoiceItemCofins { cst?: string; baseTax?: number; rate?: number; amount?: number; baseTaxProductQuantity?: number; productRate?: number; } /** ICMS destination (interestadual) on item */ interface ProductInvoiceItemIcmsDestination { vBCUFDest?: number; pFCPUFDest?: number; pICMSUFDest?: number; pICMSInter?: number; pICMSInterPart?: number; vFCPUFDest?: number; vICMSUFDest?: number; vICMSUFRemet?: number; vBCFCPUFDest?: number; } /** Tax group on item */ interface ProductInvoiceItemTax { totalTax?: number; icms?: ProductInvoiceItemIcms; ipi?: ProductInvoiceItemIpi; ii?: ProductInvoiceItemII; pis?: ProductInvoiceItemPis; cofins?: ProductInvoiceItemCofins; icmsDestination?: ProductInvoiceItemIcmsDestination; } /** Medicine detail on item */ interface ProductInvoiceItemMedicine { maximumPrice?: number; anvisaCode?: string; batchId?: string; batchQuantity?: number; manufacturedOn?: string; expireOn?: string; } /** Fuel CIDE information */ interface ProductInvoiceItemFuelCide { bc?: number; rate?: number; cideAmount?: number; } /** Fuel pump (encerrante) information */ interface ProductInvoiceItemFuelPump { spoutNumber?: number; number?: number; tankNumber?: number; beginningAmount?: number; endAmount?: number; } /** Fuel detail on item */ interface ProductInvoiceItemFuel { codeANP?: string; percentageNG?: number; descriptionANP?: string; percentageGLP?: number; percentageNGn?: number; percentageGNi?: number; startingAmount?: number; codif?: string; amountTemp?: number; stateBuyer?: string; cide?: ProductInvoiceItemFuelCide; pump?: ProductInvoiceItemFuelPump; } /** Invoice item (product/service) */ interface ProductInvoiceItem { code?: string; codeGTIN?: string; description?: string; ncm?: string; extipi?: string; cfop?: number; unit?: string; quantity?: number; unitAmount?: number; totalAmount?: number; eanTaxableCode?: string; unitTax?: string; quantityTax?: number; taxUnitAmount?: number; freightAmount?: number; insuranceAmount?: number; discountAmount?: number; othersAmount?: number; totalIndicator?: boolean; cest?: string; tax?: ProductInvoiceItemTax; additionalInformation?: string; numberOrderBuy?: string; itemNumberOrderBuy?: number; medicineDetail?: ProductInvoiceItemMedicine; fuel?: ProductInvoiceItemFuel; } /** Transport group (transportador) */ interface ProductInvoiceTransportGroup { cityName?: string; federalTaxNumber?: string; cpf?: string; name?: string; stateTaxNumber?: string; fullAddress?: string; state?: string; transportRetention?: string; } /** Transport reboque (trailer) */ interface ProductInvoiceTransportReboque { plate?: string; uf?: string; rntc?: string; wagon?: string; ferry?: string; } /** Transport volume */ interface ProductInvoiceTransportVolume { volumeQuantity?: number; species?: string; brand?: string; volumeNumeration?: string; netWeight?: number; grossWeight?: number; } /** Transport vehicle */ interface ProductInvoiceTransportVehicle { plate?: string; state?: string; rntc?: string; } /** Transport ICMS retention */ interface ProductInvoiceTransportRate { serviceAmount?: number; bcRetentionAmount?: number; icmsRetentionRate?: number; icmsRetentionAmount?: number; cfop?: number; cityGeneratorFactCode?: number; } /** Transport information */ interface ProductInvoiceTransport { freightModality?: number; transportGroup?: ProductInvoiceTransportGroup; reboque?: ProductInvoiceTransportReboque; volume?: ProductInvoiceTransportVolume; transportVehicle?: ProductInvoiceTransportVehicle; sealNumber?: string; transpRate?: ProductInvoiceTransportRate; } /** Additional information */ interface ProductInvoiceAdditionalInfo { fisco?: string; taxpayer?: string; xmlAuthorized?: number[]; effort?: string; order?: string; contract?: string; taxDocumentsReference?: ProductInvoiceTaxDocumentRef[]; taxpayerComments?: ProductInvoiceTaxpayerComment[]; referencedProcess?: ProductInvoiceReferencedProcess[]; } /** Tax document reference */ interface ProductInvoiceTaxDocumentRef { taxCouponInformation?: { modelDocumentFiscal?: string; orderECF?: string; orderCountOperation?: number; }; documentInvoiceReference?: { state?: number; yearMonth?: string; federalTaxNumber?: string; model?: string; series?: string; number?: string; }; accessKey?: string; } /** Taxpayer comment */ interface ProductInvoiceTaxpayerComment { field?: string; text?: string; } /** Referenced process */ interface ProductInvoiceReferencedProcess { identifierConcessory?: string; identifierOrigin?: number; } /** Protocol information */ interface ProductInvoiceProtocol { id?: string; environmentType?: ProductInvoiceEnvironmentType; applicationVersion?: string; accessKey?: string; receiptOn?: string; protocolNumber?: string; validatorDigit?: string; statusCode?: number; description?: string; signature?: string; } /** Payment card details */ interface ProductInvoicePaymentCard { federalTaxNumber?: string; flag?: ProductInvoiceCardFlag; authorization?: string; integrationPaymentType?: ProductInvoiceIntegrationPaymentType; } /** Payment detail entry */ interface ProductInvoicePaymentDetail { method?: ProductInvoicePaymentMethod; amount?: number; card?: ProductInvoicePaymentCard; } /** Payment group */ interface ProductInvoicePayment { paymentDetail?: ProductInvoicePaymentDetail[]; payBack?: number; } /** Billing bill (fatura) */ interface ProductInvoiceBill { number?: string; originalAmount?: number; discountAmount?: number; netAmount?: number; } /** Billing duplicate */ interface ProductInvoiceDuplicate { duplicateNumber?: string; expirationOn?: string; amount?: number; } /** Billing information (cobrança) */ interface ProductInvoiceBilling { bill?: ProductInvoiceBill; duplicates?: ProductInvoiceDuplicate[]; } /** Full product invoice details returned by SEFAZ query */ interface ProductInvoiceDetails { currentStatus?: ProductInvoiceStatus; stateCode?: number; checkCode?: number; operationNature?: string; paymentType?: ProductInvoicePaymentType; codeModel?: number; serie?: number; number?: number; issuedOn?: string; operationOn?: string; operationType?: ProductInvoiceOperationType; destination?: ProductInvoiceDestination; cityCode?: number; printType?: ProductInvoicePrintType; issueType?: ProductInvoiceIssueType; checkCodeDigit?: number; environmentType?: ProductInvoiceEnvironmentType; purposeType?: ProductInvoicePurposeType; consumerType?: ProductInvoiceConsumerType; presenceType?: ProductInvoicePresenceType; processType?: ProductInvoiceProcessType; invoiceVersion?: string; xmlVersion?: string; contingencyOn?: string; contingencyJustification?: string; issuer?: ProductInvoiceIssuer; buyer?: ProductInvoiceBuyer; totals?: ProductInvoiceTotals; transport?: ProductInvoiceTransport; additionalInformation?: ProductInvoiceAdditionalInfo; protocol?: ProductInvoiceProtocol; items?: ProductInvoiceItem[]; billing?: ProductInvoiceBilling; payment?: ProductInvoicePayment[]; } /** Fiscal event associated with a product invoice */ interface ProductInvoiceEvent { stateCode?: number; type?: number; sequence?: number; authorFederalTaxNumber?: string; id?: string; protocol?: number; authorizedOn?: string; description?: string; } /** Response from listing fiscal events for a product invoice */ interface ProductInvoiceEventsResponse { events?: ProductInvoiceEvent[]; createdOn?: string; } /** Status of a CFe-SAT consumer invoice (coupon) */ type CouponStatus = 'Unknown' | 'Authorized' | 'Canceled' | (string & {}); /** Person type for CFe-SAT entities */ type CouponPersonType = 'Undefined' | 'NaturalPerson' | 'LegalEntity' | (string & {}); /** Tax regime for CFe-SAT issuer */ type CouponTaxRegime = 'National_Simple' | 'National_Simple_Brute' | 'Normal_Regime' | (string & {}); /** Payment method for CFe-SAT coupon */ type CouponPaymentMethod = 'Cash' | 'Cheque' | 'CreditCard' | 'DebitCard' | 'StoreCredict' | 'FoodVouchers' | 'MealVouchers' | 'GiftVouchers' | 'FuelVouchers' | 'CommercialDuplicate' | 'BankSlip' | 'BankDeposit' | 'InstantPayment' | 'WireTransfer' | 'Cashback' | 'Unpaid' | 'Others' | (string & {}); /** ISSQN tax incentive indicator */ type CouponIssqnTaxIncentive = 'Yes' | 'No' | (string & {}); /** City reference in CFe-SAT */ interface CouponCity { code?: string; name?: string; } /** Address in CFe-SAT documents */ interface CouponAddress { state?: string; city?: CouponCity; district?: string; additionalInformation?: string; streetSuffix?: string; street?: string; number?: string; postalCode?: string; country?: string; } /** Issuer (emit) of a CFe-SAT coupon */ interface CouponIssuer { federalTaxNumber?: number; type?: CouponPersonType; name?: string; tradeName?: string; address?: CouponAddress; stateTaxNumber?: string; taxRegime?: CouponTaxRegime; municipalTaxNumber?: string; iss?: string; avarageIndicator?: boolean; } /** Buyer (dest) of a CFe-SAT coupon */ interface CouponBuyer { pretectedPersonalInformation?: string; federalTaxNumber?: number; name?: string; } /** ICMS totals for a CFe-SAT coupon */ interface CouponIcmsTotal { productAmount?: number; discountAmount?: number; othersAmount?: number; icmsAmount?: number; inputDiscountAmount?: number; inputAdditionAmount?: number; pisAmount?: number; cofinsAmount?: number; pisstAmount?: number; cofinsstAmount?: number; } /** ISSQN totals for a CFe-SAT coupon */ interface CouponIssqnTotal { baseAmount?: number; issAmount?: number; pisAmount?: number; cofinsAmount?: number; pisstAmount?: number; cofinsstAmount?: number; } /** Totals for a CFe-SAT coupon */ interface CouponTotal { icms?: CouponIcmsTotal; issqn?: CouponIssqnTotal; totalAmount?: number; couponAmount?: number; } /** Tax base resource (used by PIS/COFINS ST) */ interface CouponTaxBase { baseTax?: number; rate?: number; amount?: number; rateAmount?: number; quantity?: number; } /** ICMS tax data for a coupon item */ interface CouponIcmsTax { origin?: string; cst?: string; csosn?: string; amount?: number; rate?: number; } /** PIS tax data for a coupon item */ interface CouponPisTax { cst?: string; st?: CouponTaxBase; baseTax?: number; rate?: number; amount?: number; rateAmount?: number; quantity?: number; } /** COFINS tax data for a coupon item */ interface CouponCofinsTax { cst?: string; st?: CouponTaxBase; baseTax?: number; rate?: number; amount?: number; rateAmount?: number; quantity?: number; } /** ISSQN tax data for a coupon item */ interface CouponIssqnTax { deductionsAmount?: number; baseTax?: number; rate?: number; amount?: number; federalServiceCode?: string; cityServiceCode?: string; cityCode?: number; taxIncentive?: CouponIssqnTaxIncentive; operationNature?: string; } /** Tax breakdown for a coupon item */ interface CouponItemTax { totalTax?: number; icms?: CouponIcmsTax; pis?: CouponPisTax; cofins?: CouponCofinsTax; issqn?: CouponIssqnTax; } /** Fisco observation field */ interface CouponFiscoField { key?: string; value?: string; } /** Referenced tax document */ interface CouponReferencedDocument { accessKey?: string; order?: number; } /** Product item in a CFe-SAT coupon */ interface CouponItem { description?: string; quantity?: number; unit?: string; code?: string; codeGTIN?: string; ncm?: string; cfop?: number; cest?: string; unitAmount?: number; discountAmount?: number; othersAmount?: number; additionalInformation?: string; itemNumberOrderBuy?: number; netAmount?: number; grossAmount?: number; rule?: string; apportionmentDiscountAmount?: number; apportionmentAmount?: number; fisco?: CouponFiscoField[]; tax?: CouponItemTax; } /** Payment detail in a CFe-SAT coupon */ interface CouponPaymentDetail { method?: CouponPaymentMethod; amount?: number; card?: string; } /** Payment group for a CFe-SAT coupon */ interface CouponPayment { payBack?: number; paymentDetails?: CouponPaymentDetail[]; } /** Delivery information for a CFe-SAT coupon */ interface CouponDelivery { address?: CouponAddress; } /** Additional information for a CFe-SAT coupon */ interface CouponAdditionalInformation { taxpayer?: string; fisco?: CouponFiscoField[]; referencedDocuments?: CouponReferencedDocument[]; } /** CFe-SAT tax coupon (Cupom Fiscal Eletrônico) */ interface TaxCoupon { currentStatus?: CouponStatus; number?: number; satSerie?: string; softwareVersion?: string; softwareFederalTaxNumber?: number; accessKey?: string; cashier?: number; issuedOn?: string; createdOn?: string; xmlVersion?: string; issuer?: CouponIssuer; buyer?: CouponBuyer; totals?: CouponTotal; delivery?: CouponDelivery; additionalInformation?: CouponAdditionalInformation; items?: CouponItem[]; payment?: CouponPayment; } /** Valid Brazilian state abbreviations (27 UFs + EX + NA) */ type BrazilianState = 'AC' | 'AL' | 'AM' | 'AP' | 'BA' | 'CE' | 'DF' | 'ES' | 'GO' | 'MA' | 'MG' | 'MS' | 'MT' | 'PA' | 'PB' | 'PE' | 'PI' | 'PR' | 'RJ' | 'RN' | 'RO' | 'RR' | 'RS' | 'SC' | 'SE' | 'SP' | 'TO' | 'EX' | 'NA'; /** Options for basic info lookup */ interface LegalEntityBasicInfoOptions { /** Whether to update the address from postal service data (default: true) */ updateAddress?: boolean; /** When updateAddress=false, whether to update only the city code from postal service data (default: false) */ updateCityCode?: boolean; } /** Response wrapper for CNPJ basic info lookup */ interface LegalEntityBasicInfoResponse { /** Legal entity data */ legalEntity?: LegalEntityBasicInfo; } /** Response wrapper for state tax info lookup */ interface LegalEntityStateTaxResponse { /** Legal entity state tax data */ legalEntity?: LegalEntityStateTaxInfo; } /** Response wrapper for state tax for invoice lookup */ interface LegalEntityStateTaxForInvoiceResponse { /** Legal entity state tax data for invoice evaluation */ legalEntity?: LegalEntityStateTaxForInvoiceInfo; } /** Company size classification */ type LegalEntitySize = 'Unknown' | 'ME' | 'EPP' | 'DEMAIS'; /** Company registration status */ type LegalEntityStatus = 'Unknown' | 'Active' | 'Suspended' | 'Cancelled' | 'Unabled' | 'Null'; /** Organizational unit type */ type LegalEntityUnit = 'Headoffice' | 'Subsidiary'; /** Tax regime code */ type LegalEntityTaxRegime = 'Unknown' | 'SimplesNacional' | 'MEI' | 'Normal'; /** Legal nature classification */ type LegalEntityNatureCode = 'EmpresaPublica' | 'SociedadeEconomiaMista' | 'SociedadeAnonimaAberta' | 'SociedadeAnonimaFechada' | 'SociedadeEmpresariaLimitada' | 'SociedadeEmpresariaEmNomeColetivo' | 'SociedadeEmpresariaEmComanditaSimples' | 'SociedadeEmpresariaEmComanditaporAcoes' | 'SociedadeemContaParticipacao' | 'Empresario' | 'Cooperativa' | 'ConsorcioSociedades' | 'GrupoSociedades' | 'EmpresaDomiciliadaExterior' | 'ClubeFundoInvestimento' | 'SociedadeSimplesPura' | 'SociedadeSimplesLimitada' | 'SociedadeSimplesEmNomeColetivo' | 'SociedadeSimplesEmComanditaSimples' | 'EmpresaBinacional' | 'ConsorcioEmpregadores' | 'ConsorcioSimples' | 'EireliNaturezaEmpresaria' | 'EireliNaturezaSimples' | 'ServicoNotarial' | 'FundacaoPrivada' | 'ServicoSocialAutonomo' | 'CondominioEdilicio' | 'ComissaoConciliacaoPrevia' | 'EntidadeMediacaoArbitragem' | 'PartidoPolitico' | 'EntidadeSindical' | 'EstabelecimentoBrasilFundacaoAssociacaoEstrangeiras' | 'FundacaoAssociacaoDomiciliadaExterior' | 'OrganizacaoReligiosa' | 'ComunidadeIndigena' | 'FundoPrivado' | 'AssociacaoPrivada' | 'OutrasSemFimLucrativo' | 'Unknown'; /** State tax registration status */ type LegalEntityStateTaxStatus = 'Abled' | 'Unabled' | 'Cancelled' | 'Unknown'; /** Extended state tax registration status for invoice evaluation */ type LegalEntityStateTaxForInvoiceStatus = 'Abled' | 'Unabled' | 'Cancelled' | 'UnabledTemp' | 'UnabledNotConfirmed' | 'Unknown' | 'UnknownTemp' | 'UnknownNotConfirmed'; /** Fiscal document contributor status */ type LegalEntityFiscalDocumentStatus = 'Abled' | 'Unabled' | 'Unknown'; /** Economic activity type classification */ type LegalEntityActivityType = 'Main' | 'Secondary'; /** Phone source */ type LegalEntityPhoneSource = 'RFB'; /** City information */ interface LegalEntityCity { /** City IBGE code */ code?: string; /** City name */ name?: string; } /** Address from Legal Entity API */ interface LegalEntityAddress { /** State abbreviation (UF) */ state?: string; /** City information */ city?: LegalEntityCity; /** District / neighborhood */ district?: string; /** Additional address information */ additionalInformation?: string; /** Street suffix (type) */ streetSuffix?: string; /** Street name */ street?: string; /** Street number */ number?: string; /** Minimum number range */ numberMin?: string; /** Maximum number range */ numberMax?: string; /** Postal code (CEP) */ postalCode?: string; /** Country */ country?: string; } /** Phone number */ interface LegalEntityPhone { /** Area code (DDD) */ ddd?: string; /** Phone number */ number?: string; /** Information source */ source?: LegalEntityPhoneSource; } /** Economic activity (CNAE) */ interface LegalEntityEconomicActivity { /** Activity classification (Main or Secondary) */ type?: LegalEntityActivityType; /** CNAE code */ code?: number; /** CNAE description */ description?: string; } /** Legal nature */ interface LegalEntityNature { /** Legal nature code */ code?: string; /** Legal nature description */ description?: string; } /** Partner qualification */ interface LegalEntityQualification { /** Qualification code */ code?: string; /** Qualification description */ description?: string; } /** Company partner */ interface LegalEntityPartner { /** Partner name */ name?: string; /** Partner qualification */ qualification?: LegalEntityQualification; } /** Fiscal document indicator (NFe/NFSe/CTe/NFCe) */ interface LegalEntityFiscalDocumentInfo { /** Contributor status */ status?: LegalEntityFiscalDocumentStatus; /** Data source description */ description?: string; } /** State tax registration (Inscrição Estadual) */ interface LegalEntityStateTax { /** Registration status */ status?: LegalEntityStateTaxStatus; /** State tax number (IE) */ taxNumber?: string; /** Status date */ statusOn?: string; /** Opening date */ openedOn?: string; /** Closing date */ closedOn?: string; /** Additional information */ additionalInformation?: string; /** State code */ code?: BrazilianState; /** Address */ address?: LegalEntityAddress; /** Economic activities (CNAE) */ economicActivities?: LegalEntityEconomicActivity[]; /** NFe indicator */ nfe?: LegalEntityFiscalDocumentInfo; /** NFSe indicator */ nfse?: LegalEntityFiscalDocumentInfo; /** CTe indicator */ cte?: LegalEntityFiscalDocumentInfo; /** NFCe indicator */ nfce?: LegalEntityFiscalDocumentInfo; } /** State tax registration for invoice evaluation (extended status) */ interface LegalEntityStateTaxForInvoice { /** Registration status (extended enum) */ status?: LegalEntityStateTaxForInvoiceStatus; /** State tax number (IE) */ taxNumber?: string; /** Status date */ statusOn?: string; /** Opening date */ openedOn?: string; /** Closing date */ closedOn?: string; /** Additional information */ additionalInformation?: string; /** State code */ code?: BrazilianState; /** Address */ address?: LegalEntityAddress; /** Economic activities (CNAE) */ economicActivities?: LegalEntityEconomicActivity[]; /** NFe indicator */ nfe?: LegalEntityFiscalDocumentInfo; /** NFSe indicator */ nfse?: LegalEntityFiscalDocumentInfo; /** CTe indicator */ cte?: LegalEntityFiscalDocumentInfo; /** NFCe indicator */ nfce?: LegalEntityFiscalDocumentInfo; } /** Full company data from CNPJ basic info lookup */ interface LegalEntityBasicInfo { /** Trade name (nome fantasia) */ tradeName?: string; /** Legal name (razão social) */ name?: string; /** Federal tax number (CNPJ) — numeric */ federalTaxNumber?: number; /** Company size classification */ size?: LegalEntitySize; /** Opening date */ openedOn?: string; /** Company address */ address?: LegalEntityAddress; /** Phone numbers */ phones?: LegalEntityPhone[]; /** Registration status date */ statusOn?: string; /** Registration status */ status?: LegalEntityStatus; /** Email address */ email?: string; /** Responsible federal entity (EFR) */ responsableEntity?: string; /** Special status */ specialStatus?: string; /** Special status date */ specialStatusOn?: string; /** Query date (when the data was fetched) */ issuedOn?: string; /** Status reason description */ statusReason?: string; /** Share capital in BRL */ shareCapital?: number; /** Economic activities (CNAE) */ economicActivities?: LegalEntityEconomicActivity[]; /** Legal nature */ legalNature?: LegalEntityNature; /** Partners and administrators */ partners?: LegalEntityPartner[]; /** Registration unit (city/office) */ registrationUnit?: string; /** Organizational unit (headquarters/subsidiary) */ unit?: LegalEntityUnit; } /** State tax information from state tax info lookup */ interface LegalEntityStateTaxInfo { /** Trade name */ tradeName?: string; /** Legal name */ name?: string; /** Federal tax number (CNPJ) — numeric */ federalTaxNumber?: number; /** Query date */ createdOn?: string; /** Tax regime (CRT) */ taxRegime?: LegalEntityTaxRegime; /** Legal nature code */ legalNature?: LegalEntityNatureCode; /** Fiscal unit */ fiscalUnit?: string; /** Registration unit */ createdUnit?: string; /** Verification code */ checkCode?: string; /** State tax registrations (Inscrições Estaduais) */ stateTaxes?: LegalEntityStateTax[]; } /** State tax information for invoice evaluation */ interface LegalEntityStateTaxForInvoiceInfo { /** Trade name */ tradeName?: string; /** Legal name */ name?: string; /** Federal tax number (CNPJ) — numeric */ federalTaxNumber?: number; /** Query date */ createdOn?: string; /** Tax regime (CRT) */ taxRegime?: LegalEntityTaxRegime; /** Legal nature code */ legalNature?: LegalEntityNatureCode; /** Fiscal unit */ fiscalUnit?: string; /** Registration unit */ createdUnit?: string; /** Verification code */ checkCode?: string; /** State tax registrations for invoice evaluation (extended status) */ stateTaxes?: LegalEntityStateTaxForInvoice[]; } /** * Known cadastral status values for CPF (situação cadastral na Receita Federal). * The union includes a `(string & {})` fallback to allow unknown future values * while still providing autocomplete for known statuses. */ type NaturalPersonStatus = 'Regular' | 'Suspensa' | 'Cancelada' | 'Titular Falecido' | 'Pendente de Regularização' | 'Nula' | (string & {}); /** * Response from the CPF cadastral status lookup endpoint. * * Returned by `GET /v1/naturalperson/status/{federalTaxNumber}/{birthDate}` * on `naturalperson.api.nfe.io`. */ interface NaturalPersonStatusResponse { /** Full name of the person */ name?: string; /** CPF number (digits only) */ federalTaxNumber: string; /** Date of birth (ISO 8601 date-time string) */ birthOn?: string; /** Cadastral status at Receita Federal */ status?: NaturalPersonStatus; /** Timestamp of when the query was created (ISO 8601 date-time string) */ createdOn?: string; } /** * Type of tax operation (incoming vs outgoing). * * - `'Outgoing'` — Saída (sale, shipment) * - `'Incoming'` — Entrada (purchase, receipt) */ type TaxOperationType = 'Outgoing' | 'Incoming'; /** * Origin of the merchandise for ICMS purposes. * * Mirrors the SEFAZ origin codes (0-8). */ type TaxOrigin = 'National' | 'ForeignDirectImport' | 'ForeignInternalMarket' | 'NationalWith40To70Import' | 'NationalPpb' | 'NationalWithLess40Import' | 'ForeignDirectImportWithoutNationalSimilar' | 'ForeignInternalMarketWithoutNationalSimilar' | 'NationalWithGreater70Import'; /** * Tax regime used in the Tax Calculation Engine. * * **Note:** This differs from the service-invoice {@link TaxRegime} which uses * Portuguese-language values. This enum uses the PascalCase values from the * calculo-impostos API. */ type TaxCalcTaxRegime = 'NationalSimple' | 'RealProfit' | 'PresumedProfit' | 'NationalSimpleSublimitExceeded' | 'IndividualMicroEnterprise' | 'Exempt'; /** * ICMS tax component — covers ICMS, ICMS-ST, FCP, and related calculations. * * All numeric fields are represented as strings matching the API's format. */ interface TaxIcms { /** Origem da mercadoria */ orig?: string; /** Tributação do ICMS (CST) */ cst?: string; /** Código de Situação da Operação – Simples Nacional (CSOSN) */ csosn?: string; /** Modalidade de determinação da BC do ICMS */ modBC?: string; /** Valor da BC do ICMS */ vBC?: string; /** Percentual da Redução de BC */ pRedBC?: string; /** Código do benefício fiscal relacionado a redução de base */ cBenefRBC?: string; /** Alíquota do imposto */ pICMS?: string; /** Valor do ICMS */ vICMS?: string; /** Valor do ICMS da Operação */ vICMSOp?: string; /** Modalidade de determinação da BC do ICMS ST */ modBCST?: string; /** Valor da BC do ICMS ST */ vBCST?: string; /** Percentual da Redução de BC do ICMS ST */ pRedBCST?: string; /** Alíquota do imposto do ICMS ST */ pICMSST?: string; /** Valor do ICMS ST */ vICMSST?: string; /** Percentual da margem de valor Adicionado do ICMS ST */ pMVAST?: string; /** Alíquota suportada pelo Consumidor Final */ pST?: string; /** Valor da BC do ICMS ST retido */ vBCSTRet?: string; /** Valor do ICMS ST retido */ vICMSSTRet?: string; /** Valor da Base de Cálculo do FCP */ vBCFCP?: string; /** Percentual do ICMS relativo ao Fundo de Combate à Pobreza (FCP) */ pFCP?: string; /** Valor do Fundo de Combate à Pobreza (FCP) */ vFCP?: string; /** Valor da Base de Cálculo do FCP retido por Substituição Tributária */ vBCFCPST?: string; /** Percentual do FCP retido por Substituição Tributária */ pFCPST?: string; /** Valor do FCP retido por Substituição Tributária */ vFCPST?: string; /** Valor da Base de Cálculo do FCP retido anteriormente */ vBCFCPSTRet?: string; /** Percentual do FCP retido anteriormente por Substituição Tributária */ pFCPSTRet?: string; /** Valor do FCP retido por Substituição Tributária (retained) */ vFCPSTRet?: string; /** Valor da base de cálculo efetiva */ vBCEfet?: string; /** Percentual de redução da base de cálculo efetiva */ pRedBCEfet?: string; /** Alíquota do ICMS efetiva */ pICMSEfet?: string; /** Valor do ICMS efetivo */ vICMSEfet?: string; /** Percentual do diferimento */ pDif?: string; /** Valor do ICMS diferido */ vICMSDif?: string; /** Valor do ICMS próprio do Substituto */ vICMSSubstituto?: string; /** Alíquota aplicável de cálculo do crédito (Simples Nacional) */ pCredSN?: string; /** Valor crédito do ICMS (Simples Nacional, LC 123 art. 23) */ vCredICMSSN?: string; /** Percentual do diferimento do FCP */ pFCPDif?: string; /** Valor do FCP diferido */ vFCPDif?: string; /** Valor efetivo do FCP */ vFCPEfet?: string; /** Valor do ICMS desonerado */ vICMSDeson?: string; /** Motivo da desoneração do ICMS */ motDesICMS?: string; /** Valor do ICMS-ST desonerado */ vICMSSTDeson?: string; /** Motivo da desoneração do ICMS-ST */ motDesICMSST?: string; /** Indica se o valor do ICMS desonerado deduz do valor do item */ indDeduzDeson?: string; } /** * ICMS interestadual (DIFAL / UF Destination) tax component. */ interface TaxIcmsUfDest { /** Valor da BC do ICMS na UF de destino */ vBCUFDest?: string; /** Valor da BC FCP na UF de destino */ vBCFCPUFDest?: string; /** Percentual do FCP na UF de destino */ pFCPUFDest?: string; /** Alíquota interna da UF de destino */ pICMSUFDest?: string; /** Alíquota interestadual das UF envolvidas */ pICMSInter?: string; /** Percentual provisório de partilha do ICMS Interestadual */ pICMSInterPart?: string; /** Valor do FCP na UF de destino */ vFCPUFDest?: string; /** Valor do ICMS Interestadual para a UF de destino */ vICMSUFDest?: string; /** Valor do ICMS Interestadual para a UF do remetente */ vICMSUFRemet?: string; } /** * PIS tax component. */ interface TaxPis { /** Código de Situação Tributária do PIS */ cst?: string; /** Valor da Base de Cálculo do PIS */ vBC?: string; /** Alíquota do PIS (em percentual) */ pPIS?: string; /** Valor do PIS */ vPIS?: string; /** Quantidade Vendida */ qBCProd?: string; /** Alíquota do PIS (em reais) */ vAliqProd?: string; } /** * COFINS tax component. */ interface TaxCofins { /** Código de Situação Tributária da COFINS */ cst?: string; /** Valor da Base de Cálculo do COFINS */ vBC?: string; /** Alíquota do COFINS (em percentual) */ pCOFINS?: string; /** Valor do COFINS */ vCOFINS?: string; /** Quantidade Vendida */ qBCProd?: string; /** Alíquota do COFINS (em reais) */ vAliqProd?: string; } /** * IPI tax component. */ interface TaxIpi { /** Código de Enquadramento Legal do IPI */ cEnq?: string; /** Código da situação tributária do IPI */ cst?: string; /** Valor da BC do IPI */ vBC?: string; /** Alíquota do IPI */ pIPI?: string; /** Quantidade total na unidade padrão para tributação */ qUnid?: string; /** Valor por Unidade Tributável */ vUnid?: string; /** Valor do IPI */ vIPI?: string; } /** * Import Tax (II) component. */ interface TaxIi { /** Valor BC do Imposto de Importação */ vBC?: string; /** Valor despesas aduaneiras */ vDespAdu?: string; /** Valor Imposto de Importação */ vII?: string; /** Valor Imposto sobre Operações Financeiras */ vIOF?: string; /** Valor dos encargos cambiais */ vEncCamb?: string; /** Alíquota do Simples Nacional aplicável */ pCredSN?: string; /** Valor crédito do ICMS (Simples Nacional) */ vCredICMSSN?: string; /** Ativação do cálculo do custo de aquisição (0=Inativo, 1=Ativo) */ infCustoAquis?: string; } /** * Issuer data for the tax calculation request. */ interface CalculateRequestIssuer { /** Tax regime of the issuer */ taxRegime: TaxCalcTaxRegime; /** Default tax profile for the issuer */ taxProfile?: string; /** State of the issuer */ state: BrazilianState; } /** * Recipient data for the tax calculation request. */ interface CalculateRequestRecipient { /** Tax regime of the recipient (optional) */ taxRegime?: TaxCalcTaxRegime; /** Default tax profile for the recipient */ taxProfile?: string; /** State of the recipient */ state: BrazilianState; } /** * A single item (product) in the tax calculation request. */ interface CalculateItemRequest { /** Unique item identifier */ id: string; /** Internal code for operation nature determination (1–9999) */ operationCode: number; /** Acquisition purpose code */ acquisitionPurpose?: string; /** Issuer tax profile for this specific item */ issuerTaxProfile?: string; /** Recipient tax profile for this specific item */ recipientTaxProfile?: string; /** Product SKU */ sku?: string; /** NCM code (Nomenclatura Comum do Mercosul, up to 8 digits) */ ncm?: string; /** CEST code (Código Especificador da Substituição Tributária, 7 digits) */ cest?: string; /** Fiscal benefit code */ benefit?: string; /** EX TIPI code (1–3 chars) */ exTipi?: string; /** Origin of the merchandise */ origin: TaxOrigin; /** Global Trade Item Number */ gtin?: string; /** Taxable quantity */ quantity: number; /** Taxable unit amount */ unitAmount: number; /** Freight amount */ freightAmount?: number; /** Insurance amount */ insuranceAmount?: number; /** Discount amount */ discountAmount?: number; /** Other accessory expenses */ othersAmount?: number; /** ICMS input overrides (for import tax scenarios) */ icms?: TaxIcms; /** Import tax input overrides */ ii?: TaxIi; } /** * Tax calculation request payload. * * Submit to `POST /tax-rules/{tenantId}/engine/calculate` to compute all * applicable Brazilian taxes (ICMS, ICMS-ST, PIS, COFINS, IPI, II) for * the given operation context and product items. * * @example * ```typescript * const request: CalculateRequest = { * operationType: 'Outgoing', * issuer: { state: 'SP', taxRegime: 'RealProfit' }, * recipient: { state: 'RJ' }, * items: [{ * id: '1', * operationCode: 121, * origin: 'National', * quantity: 10, * unitAmount: 100.00, * ncm: '61091000' * }] * }; * ``` */ interface CalculateRequest { /** Product collection identifier */ collectionId?: string; /** Issuer (seller/shipper) fiscal data */ issuer: CalculateRequestIssuer; /** Recipient (buyer/receiver) fiscal data */ recipient: CalculateRequestRecipient; /** Type of operation */ operationType: TaxOperationType; /** List of products/items to calculate taxes for */ items: CalculateItemRequest[]; /** Whether this is a product registration request (vs invoice issuance) */ isProductRegistration?: boolean; } /** * A single item in the tax calculation response with full tax breakdown. */ interface CalculateItemResponse { /** Item identifier (matches the request item id) */ id?: string; /** CFOP — Código Fiscal de Operações e Prestações */ cfop?: number; /** CEST code */ cest?: string; /** Fiscal benefit code */ benefit?: string; /** ICMS tax breakdown */ icms?: TaxIcms; /** ICMS interestadual (DIFAL / UF destination) breakdown */ icmsUfDest?: TaxIcmsUfDest; /** PIS tax breakdown */ pis?: TaxPis; /** COFINS tax breakdown */ cofins?: TaxCofins; /** IPI tax breakdown */ ipi?: TaxIpi; /** Import tax (II) breakdown */ ii?: TaxIi; /** Additional product information */ additionalInformation?: string; /** Timestamp of the last rule modification (ISO 8601) */ lastModified?: string; /** Registered product ID */ productId?: string; } /** * Tax calculation response containing per-item tax breakdowns. */ interface CalculateResponse { /** Calculated items with full tax data */ items?: CalculateItemResponse[]; } /** * A single tax code entry (operation code, acquisition purpose, or tax profile). */ interface TaxCode { /** The code identifier */ code?: string; /** Human-readable description */ description?: string; } /** * Paginated response for tax code listings. */ interface TaxCodePaginatedResponse { /** List of tax code entries */ items?: TaxCode[]; /** Current page number (1-based) */ currentPage?: number; /** Total number of pages */ totalPages?: number; /** Total count of entries */ totalCount?: number; } /** * Options for listing tax codes (pagination). * * Uses the API's native pagination model (`pageIndex`/`pageCount`), * which differs from the OData-style `$skip`/`$top` used by other resources. */ interface TaxCodeListOptions { /** Page index (1-based, default: 1) */ pageIndex?: number; /** Number of items per page (default: 50) */ pageCount?: number; } /** Environment type for NF-e product invoice operations */ type NfeEnvironmentType = 'None' | 'Production' | 'Test'; /** Status of a product invoice (NF-e) in the issuance lifecycle */ type NfeInvoiceStatus = 'None' | 'Created' | 'Processing' | 'Issued' | 'IssuedContingency' | 'Cancelled' | 'Disabled' | 'IssueDenied' | 'Error'; /** Brazilian state code (UF) */ type NfeStateCode = 'NA' | 'RO' | 'AC' | 'AM' | 'RR' | 'PA' | 'AP' | 'TO' | 'MA' | 'PI' | 'CE' | 'RN' | 'PB' | 'PE' | 'AL' | 'SE' | 'BA' | 'MG' | 'ES' | 'RJ' | 'SP' | 'PR' | 'SC' | 'RS' | 'MS' | 'MT' | 'GO' | 'DF' | 'EX'; /** Operation type (incoming/outgoing) for NF-e */ type NfeOperationType = 'Outgoing' | 'Incoming'; /** Purpose of the NF-e invoice */ type NfePurposeType = 'None' | 'Normal' | 'Complement' | 'Adjustment' | 'Devolution'; /** Payment method for NF-e */ type NfePaymentMethod = 'Cash' | 'Cheque' | 'CreditCard' | 'DebitCard' | 'StoreCredict' | 'FoodVouchers' | 'MealVouchers' | 'GiftVouchers' | 'FuelVouchers' | 'BankBill' | 'BankDeposit' | 'InstantPayment' | 'WireTransfer' | 'Cashback' | 'WithoutPayment' | 'Others'; /** Shipping modality for NF-e transport */ type NfeShippingModality = 'ByIssuer' | 'ByReceiver' | 'ByThirdParties' | 'OwnBySender' | 'OwnByBuyer' | 'Free'; /** Consumer presence indicator for NF-e */ type NfeConsumerPresenceType = 'None' | 'Presence' | 'Internet' | 'Telephone' | 'Delivery' | 'OthersNonPresenceOperation'; /** DANFE print format */ type NfePrintType = 'None' | 'NFeNormalPortrait' | 'NFeNormalLandscape' | 'NFeSimplified' | 'DANFE_NFC_E' | 'DANFE_NFC_E_MSG_ELETRONICA'; /** Person type */ type NfePersonType = 'Undefined' | 'NaturalPerson' | 'LegalEntity' | 'Company' | 'Customer'; /** Destination of the operation */ type NfeDestination = 'None' | 'Internal_Operation' | 'Interstate_Operation' | 'International_Operation'; /** Consumer type indicator */ type NfeConsumerType = 'FinalConsumer' | 'Normal'; /** Payment type (cash or term) */ type NfePaymentType = 'InCash' | 'Term'; /** Receiver state tax indicator */ type NfeReceiverStateTaxIndicator = 'None' | 'TaxPayer' | 'Exempt' | 'NonTaxPayer'; /** Card flag/brand for payment */ type NfeFlagCard = 'None' | 'Visa' | 'Mastercard' | 'AmericanExpress' | 'Sorocred' | 'DinersClub' | 'Elo' | 'Hipercard' | 'Aura' | 'Cabal' | 'Alelo' | 'BanesCard' | 'CalCard' | 'Credz' | 'Discover' | 'GoodCard' | 'GreenCard' | 'Hiper' | 'JCB' | 'Mais' | 'MaxVan' | 'Policard' | 'RedeCompras' | 'Sodexo' | 'ValeCard' | 'Verocheque' | 'VR' | 'Ticket' | 'Other'; /** Integration payment type */ type NfeIntegrationPaymentType = 'Integrated' | 'NotIntegrated'; /** Intermediation type */ type NfeIntermediationType = 'None' | 'ByOwn' | 'ImportOnBehalf' | 'ByOrder'; /** Tax regime */ type NfeTaxRegime = 'None' | 'LucroReal' | 'LucroPresumido' | 'SimplesNacional' | 'SimplesNacionalExcessoSublimite' | 'MicroempreendedorIndividual' | 'Isento'; /** Special tax regime */ type NfeSpecialTaxRegime = 'Nenhum' | 'MicroempresaMunicipal' | 'Estimativa' | 'SociedadeDeProfissionais' | 'Cooperativa' | 'MicroempreendedorIndividual' | 'MicroempresarioEmpresaPequenoPorte' | 'Automatico'; /** State tax processing authorizer */ type NfeStateTaxProcessingAuthorizer = 'Normal' | 'EPEC'; /** Flow status for file operations */ type NfeFlowStatus = string; /** Address in NF-e context */ interface NfeAddress { /** Street name */ street?: string; /** Street number */ number?: string; /** Additional info (complement) */ district?: string; /** City */ city?: NfeCity; /** State code */ state?: NfeStateCode; /** Postal code (CEP) */ postalCode?: string; /** Country code */ countryCode?: string; /** Country name */ country?: string; /** Additional info */ additionalInformation?: string; [key: string]: unknown; } /** City reference */ interface NfeCity { /** IBGE city code */ code?: string; /** City name */ name?: string; } /** Buyer/recipient information for NF-e */ interface NfeProductInvoiceBuyer { /** Buyer name */ name?: string; /** CNPJ or CPF (numeric) */ federalTaxNumber?: number; /** Email */ email?: string; /** Buyer address */ address?: NfeAddress; /** Person type */ type?: NfePersonType; /** State tax number (IE) */ stateTaxNumber?: string; /** State tax indicator */ stateTaxNumberIndicator?: NfeReceiverStateTaxIndicator; /** Trade name */ tradeName?: string; /** ISUF (SUFRAMA registration) */ isuf?: string; [key: string]: unknown; } /** Card payment details */ interface NfeCardResource { /** Card flag/brand */ flagCard?: NfeFlagCard; /** Integration type */ integrationType?: NfeIntegrationPaymentType; /** Authorization number */ authorizationNumber?: string; /** Card number */ cardNumber?: string; [key: string]: unknown; } /** Payment detail entry */ interface NfePaymentDetail { /** Payment method */ method?: NfePaymentMethod; /** Payment method description */ methodDescription?: string; /** Payment type (cash/term) */ paymentType?: NfePaymentType; /** Payment amount */ amount?: number; /** Card information */ card?: NfeCardResource; /** Payment date */ paymentDate?: string; /** CNPJ transacional do pagamento */ federalTaxNumberPag?: string; /** UF do CNPJ do pagamento */ statePag?: string; [key: string]: unknown; } /** Payment group with details and change */ interface NfePaymentResource { /** Payment details */ paymentDetail?: NfePaymentDetail[]; /** Change amount (troco) */ payBack?: number; } /** Billing information (cobrança) */ interface NfeBillingResource { /** Invoice reference */ invoice?: NfeBillingInvoice; /** Duplicates (parcelas) */ duplicates?: NfeDuplicateResource[]; } /** Billing invoice reference */ interface NfeBillingInvoice { /** Invoice number */ number?: string; /** Original amount */ originalAmount?: number; /** Discount amount */ discountAmount?: number; /** Net amount */ netAmount?: number; [key: string]: unknown; } /** Billing duplicate (parcela) */ interface NfeDuplicateResource { /** Duplicate number */ number?: string; /** Expiration date */ expirationOn?: string; /** Amount */ amount?: number; } /** ICMS tax information for an item */ interface NfeIcmsTaxResource { /** Origin of goods */ origin?: string; /** CST (Código de Situação Tributária) */ cst?: string; /** CSOSN (Código de Situação da Operação – Simples Nacional) */ csosn?: string; /** Tax base amount */ baseTax?: number; /** Tax rate (%) */ rate?: number; /** Tax amount */ amount?: number; /** Modality of ICMS base calculation */ modality?: number; /** ICMS ST base amount */ baseTaxST?: number; /** ICMS ST rate */ rateST?: number; /** ICMS ST amount */ amountST?: number; [key: string]: unknown; } /** IPI tax information */ interface NfeIpiTaxResource { /** CST */ cst?: string; /** Tax base */ baseTax?: number; /** Rate */ rate?: number; /** Amount */ amount?: number; /** IPI enquadramento code */ ipiCode?: string; [key: string]: unknown; } /** PIS tax information */ interface NfePisTaxResource { /** CST */ cst?: string; /** Tax base */ baseTax?: number; /** Rate */ rate?: number; /** Amount */ amount?: number; /** Product quantity base */ baseTaxProductQuantity?: number; /** Product rate (in reais) */ productRate?: number; } /** COFINS tax information */ interface NfeCofinsTaxResource { /** CST */ cst?: string; /** Tax base */ baseTax?: number; /** Rate */ rate?: number; /** Amount */ amount?: number; /** Product quantity base */ baseTaxProductQuantity?: number; /** Product rate (in reais) */ productRate?: number; } /** II (Import tax) information */ interface NfeIiTaxResource { /** Tax base */ baseTax?: number; /** Custom expenses */ customExpenses?: number; /** IOF amount */ iofAmount?: number; /** II amount */ amount?: number; } /** ICMS UF Destination tax (partilha) */ interface NfeIcmsUfDestinationTaxResource { /** Base tax amount */ baseTax?: number; /** FCP rate */ fcpRate?: number; /** Rate */ rate?: number; /** Interestadual rate */ interestadualRate?: number; /** Provisorio rate */ provisorioRate?: number; /** FCP amount */ fcpAmount?: number; /** Destination amount */ destinationAmount?: number; /** Origin amount */ originAmount?: number; [key: string]: unknown; } /** Tax information for an invoice item */ interface NfeInvoiceItemTax { /** Total approximate tax value */ totalTax?: number; /** ICMS tax */ icms?: NfeIcmsTaxResource; /** IPI tax */ ipi?: NfeIpiTaxResource; /** II (import) tax */ ii?: NfeIiTaxResource; /** PIS tax */ pis?: NfePisTaxResource; /** COFINS tax */ cofins?: NfeCofinsTaxResource; /** ICMS UF destination */ icmsDestination?: NfeIcmsUfDestinationTaxResource; } /** Tax determination resource for automatic tax calculation */ interface NfeTaxDeterminationResource { /** Operation code for tax determination */ operationCode?: number; /** Issuer tax profile */ issuerTaxProfile?: string; /** Buyer tax profile */ buyerTaxProfile?: string; /** Origin */ origin?: string; /** Acquisition purpose */ acquisitionPurpose?: string; } /** Invoice item (product/service detail) */ interface NfeInvoiceItemResource { /** Product/service code */ code?: string; /** GTIN barcode */ codeGTIN?: string; /** Product/service description */ description?: string; /** NCM code */ ncm?: string; /** NVE codes */ nve?: string[]; /** EXTIPI code */ extipi?: string; /** CFOP code */ cfop?: number; /** Commercial unit */ unit?: string; /** Commercial quantity */ quantity?: number; /** Unit amount */ unitAmount?: number; /** Total amount */ totalAmount?: number; /** Tax GTIN */ codeTaxGTIN?: string; /** Tax unit */ unitTax?: string; /** Tax quantity */ quantityTax?: number; /** Tax unit amount */ taxUnitAmount?: number; /** Freight amount */ freightAmount?: number; /** Insurance amount */ insuranceAmount?: number; /** Discount amount */ discountAmount?: number; /** Other expenses */ othersAmount?: number; /** Indicates if value enters total */ totalIndicator?: boolean; /** CEST code */ cest?: string; /** Tax details */ tax?: NfeInvoiceItemTax; /** Additional product information */ additionalInformation?: string; /** Purchase order number */ numberOrderBuy?: string; /** Purchase order item number */ itemNumberOrderBuy?: number; /** FCI number */ importControlSheetNumber?: string; /** Fuel details */ fuelDetail?: Record; /** Benefit code */ benefit?: string; /** Import declarations */ importDeclarations?: Record[]; /** Export details */ exportDetails?: Record[]; /** Tax determination */ taxDetermination?: NfeTaxDeterminationResource; [key: string]: unknown; } /** Transport information for NF-e */ interface NfeTransportInformation { /** Shipping modality */ shippingModality?: NfeShippingModality; /** Transport group (carrier info) */ transportGroup?: NfeTransportGroupResource; /** Volumes */ volumes?: NfeVolumeResource[]; [key: string]: unknown; } /** Transport group/carrier resource */ interface NfeTransportGroupResource { /** Carrier name */ name?: string; /** CNPJ or CPF */ federalTaxNumber?: string; /** State tax number (IE) */ stateTaxNumber?: string; /** Address (full) */ address?: string; /** City name */ city?: string; /** State code */ state?: string; /** Vehicle plate */ vehiclePlate?: string; /** Vehicle UF */ vehicleUf?: string; /** Vehicle RNTC */ vehicleRntc?: string; [key: string]: unknown; } /** Volume resource for transport */ interface NfeVolumeResource { /** Quantity */ quantity?: number; /** Species */ species?: string; /** Brand */ brand?: string; /** Numbering */ numbering?: string; /** Net weight */ netWeight?: number; /** Gross weight */ grossWeight?: number; /** Seal numbers */ seals?: string[]; [key: string]: unknown; } /** Additional information for the invoice */ interface NfeAdditionalInformation { /** Additional info for tax authority (infAdFisco) */ taxAdministration?: string; /** Complementary info for taxpayer (infCpl) */ taxpayer?: string; /** Referenced processes */ referencedProcess?: Record[]; [key: string]: unknown; } /** Export hint and details */ interface NfeExportResource { /** State that generated the invoice */ exportState?: NfeStateCode; /** Export location municipio */ exportLocation?: string; /** Export hint details */ hint?: Record; [key: string]: unknown; } /** Issuer from request (issuer overrides) */ interface NfeIssuerFromRequest { /** IE do Substituto Tributário (IEST) */ stStateTaxNumber?: string; } /** Transaction intermediate resource */ interface NfeIntermediateResource { /** CNPJ of intermediary */ federalTaxNumber?: number; /** Identifier at intermediary */ identifier?: string; } /** Delivery information */ interface NfeDeliveryInformation { /** Account ID */ accountId?: string; /** Entity ID */ id?: string; /** Name */ name?: string; /** CNPJ or CPF */ federalTaxNumber?: number; /** Email */ email?: string; /** Address */ address?: NfeAddress; /** Person type */ type?: NfePersonType; /** State tax number */ stateTaxNumber?: string; [key: string]: unknown; } /** Withdrawal information */ interface NfeWithdrawalInformation { /** Account ID */ accountId?: string; /** Entity ID */ id?: string; /** Name */ name?: string; /** CNPJ or CPF */ federalTaxNumber?: number; /** Email */ email?: string; /** Address */ address?: NfeAddress; /** Person type */ type?: NfePersonType; /** State tax number */ stateTaxNumber?: string; [key: string]: unknown; } /** Totals (request — partial totals sent on issue) */ interface NfeTotals { /** ICMS total */ icms?: Record; /** ISSQN total */ issqn?: Record; [key: string]: unknown; } /** Total resource (response — full totals from API) */ interface NfeTotalResource { /** ICMS total */ icms?: Record; /** ISSQN total */ issqn?: Record; [key: string]: unknown; } /** Authorization details */ interface NfeAuthorizationResource { /** Protocol number */ protocol?: string; /** Authorization date */ sentOn?: string; /** Authorization status */ status?: string; /** Access key (44 digits) */ accessKey?: string; /** Reason */ reason?: string; [key: string]: unknown; } /** Contingency details */ interface NfeContingencyDetails { /** Authorizer used */ authorizer?: NfeStateTaxProcessingAuthorizer; /** Start time */ startedOn?: string; /** Reason for contingency */ reason?: string; } /** Activity/event resource */ interface NfeActivityResource { /** Event type */ type?: string; /** Event type description */ typeDescription?: string; /** Sequence number */ sequence?: number; /** Event creation date */ createdOn?: string; /** Event data */ data?: Record; [key: string]: unknown; } /** Events base resource */ interface NfeInvoiceEventsBase { /** List of events */ events?: NfeActivityResource[]; /** Whether more events exist */ hasMore?: boolean; } /** * Data for issuing a product invoice (NF-e). * Corresponds to `ProductInvoiceQueueIssueResource` in the OpenAPI spec. */ interface NfeProductInvoiceIssueData { /** Invoice ID (optional, auto-generated) */ id?: string; /** Invoice serie number */ serie?: number; /** Invoice number */ number?: number; /** Operation date/time (UTC ISO 8601) */ operationOn?: string; /** Operation nature description (natOp) */ operationNature?: string; /** Operation type */ operationType?: NfeOperationType; /** Destination */ destination?: NfeDestination; /** DANFE print type */ printType?: NfePrintType; /** Purpose type */ purposeType?: NfePurposeType; /** Consumer type */ consumerType?: NfeConsumerType; /** Consumer presence type */ presenceType?: NfeConsumerPresenceType; /** Contingency date/time */ contingencyOn?: string; /** Contingency justification */ contingencyJustification?: string; /** Buyer information */ buyer?: NfeProductInvoiceBuyer; /** Transport information */ transport?: NfeTransportInformation; /** Additional information */ additionalInformation?: NfeAdditionalInformation; /** Export information */ export?: NfeExportResource; /** Invoice items (products/services) */ items?: NfeInvoiceItemResource[]; /** Billing information */ billing?: NfeBillingResource; /** Issuer overrides */ issuer?: NfeIssuerFromRequest; /** Transaction intermediate */ transactionIntermediate?: NfeIntermediateResource; /** Delivery information */ delivery?: NfeDeliveryInformation; /** Withdrawal information */ withdrawal?: NfeWithdrawalInformation; /** Payment groups */ payment?: NfePaymentResource[]; /** Totals */ totals?: NfeTotals; [key: string]: unknown; } /** Issuer resource (in responses) */ interface NfeIssuerResource { /** Account ID */ accountId?: string; /** Issuer entity ID */ id?: string; /** Name or company name */ name?: string; /** CNPJ or CPF */ federalTaxNumber?: number; /** Email */ email?: string; /** Address */ address?: NfeAddress; /** Person type */ type?: NfePersonType; /** Trade name */ tradeName?: string; /** Opening date */ openningDate?: string; /** Tax regime */ taxRegime?: NfeTaxRegime; /** Special tax regime */ specialTaxRegime?: NfeSpecialTaxRegime; /** Regional tax number (IE) */ regionalTaxNumber?: number; /** Municipal tax number (IM) */ municipalTaxNumber?: string; /** State tax number for ST */ stStateTaxNumber?: string; [key: string]: unknown; } /** * Full product invoice (NF-e) response. * Corresponds to `InvoiceResource` in the OpenAPI spec. */ interface NfeProductInvoice { /** Invoice ID */ id?: string; /** Serie number */ serie?: number; /** Invoice number */ number?: number; /** Invoice status */ status?: NfeInvoiceStatus; /** Authorization details */ authorization?: NfeAuthorizationResource; /** Contingency details */ contingencyDetails?: NfeContingencyDetails; /** Operation nature */ operationNature?: string; /** Creation date */ createdOn?: string; /** Modification date */ modifiedOn?: string; /** Operation date */ operationOn?: string; /** Operation type */ operationType?: NfeOperationType; /** Environment type */ environmentType?: NfeEnvironmentType; /** Purpose type */ purposeType?: NfePurposeType; /** Issuer */ issuer?: NfeIssuerResource; /** Buyer */ buyer?: NfeProductInvoiceBuyer; /** Totals */ totals?: NfeTotalResource; /** Transport information */ transport?: NfeTransportInformation; /** Additional information */ additionalInformation?: NfeAdditionalInformation; /** Export information */ export?: NfeExportResource; /** Billing */ billing?: NfeBillingResource; /** Payment groups */ payment?: NfePaymentResource[]; /** Transaction intermediate */ transactionIntermediate?: NfeIntermediateResource; /** Delivery information */ delivery?: NfeDeliveryInformation; /** Withdrawal information */ withdrawal?: NfeWithdrawalInformation; /** Last events */ lastEvents?: NfeInvoiceEventsBase; [key: string]: unknown; } /** Product invoice without events (used in list responses) */ interface NfeProductInvoiceWithoutEvents { /** Invoice ID */ id?: string; /** Serie number */ serie?: number; /** Invoice number */ number?: number; /** Invoice status */ status?: NfeInvoiceStatus; /** Authorization details */ authorization?: NfeAuthorizationResource; /** Contingency details */ contingencyDetails?: NfeContingencyDetails; /** Operation nature */ operationNature?: string; /** Creation date */ createdOn?: string; /** Modification date */ modifiedOn?: string; /** Operation date */ operationOn?: string; /** Operation type */ operationType?: NfeOperationType; /** Environment type */ environmentType?: NfeEnvironmentType; /** Purpose type */ purposeType?: NfePurposeType; /** Issuer */ issuer?: NfeIssuerResource; /** Buyer */ buyer?: NfeProductInvoiceBuyer; /** Totals */ totals?: NfeTotalResource; /** Transport information */ transport?: NfeTransportInformation; /** Additional information */ additionalInformation?: NfeAdditionalInformation; /** Export information */ export?: NfeExportResource; /** Billing */ billing?: NfeBillingResource; /** Payment groups */ payment?: NfePaymentResource[]; /** Transaction intermediate */ transactionIntermediate?: NfeIntermediateResource; /** Delivery information */ delivery?: NfeDeliveryInformation; /** Withdrawal information */ withdrawal?: NfeWithdrawalInformation; [key: string]: unknown; } /** Options for listing product invoices (cursor-based pagination) */ interface NfeProductInvoiceListOptions { /** Environment (required) */ environment: NfeEnvironmentType; /** Cursor: start after this ID */ startingAfter?: string; /** Cursor: end before this ID */ endingBefore?: string; /** Number of results per page (default: 10) */ limit?: number; /** ElasticSearch query string */ q?: string; } /** Paginated list of product invoices */ interface NfeProductInvoiceListResponse { /** List of invoices (without events) */ productInvoices?: NfeProductInvoiceWithoutEvents[]; /** Whether more results exist */ hasMore?: boolean; } /** Paginated list of invoice items */ interface NfeInvoiceItemsResponse { /** Account ID */ accountId?: string; /** Company ID */ companyId?: string; /** Invoice ID */ id?: string; /** Invoice items */ items?: NfeInvoiceItemResource[]; /** Whether more items exist */ hasMore?: boolean; } /** Paginated list of invoice events */ interface NfeProductInvoiceEventsResponse { /** Invoice ID */ id?: string; /** Account ID */ accountId?: string; /** Company ID */ companyId?: string; /** List of events */ events?: NfeActivityResource[]; /** Whether more events exist */ hasMore?: boolean; } /** Options for listing items/events (cursor pagination) */ interface NfeProductInvoiceSubListOptions { /** Number of results per page (default: 10) */ limit?: number; /** Cursor: start after (default: 0) */ startingAfter?: number | string; } /** File resource (PDF/XML download response) — product and consumer invoices. */ interface NfeFileResource { /** Absolute URI to the file */ uri?: string; } /** * File resource returned by the INBOUND routes * (`/v2/companies/{id}/inbound/{accessKey}/xml` and `/pdf`, shared by CT-e and * NF-e distribution). * * Deliberately separate from {@link NfeFileResource}: the inbound routes name the * field `publicTemporaryUri`, not `uri`. Two envelopes, two types — verified live * on 2026-09-01, see `tests/fixtures/live-contracts/inbound-download.json`. * * The URI is a pre-signed, time-limited link. No binary is ever returned on these * routes, and the `Accept` header does not change the response. */ interface InboundFileResource { /** Pre-signed, time-limited URI to the document. Download is up to the caller. */ publicTemporaryUri?: string; } /** Request cancellation response */ interface NfeRequestCancellationResource { /** Account ID */ accountId?: string; /** Company ID */ companyId?: string; /** Product invoice ID */ productInvoiceId?: string; /** Reason for cancellation */ reason?: string; } /** Disablement request data */ interface NfeDisablementData { /** Environment */ environment: NfeEnvironmentType; /** Serie number */ serie: number; /** State code */ state: NfeStateCode; /** Beginning invoice number */ beginNumber: number; /** Last invoice number (same as beginNumber for a single number) */ lastNumber: number; /** Reason for disablement */ reason?: string; } /** Disablement response */ interface NfeDisablementResource { /** Environment */ environment?: NfeEnvironmentType; /** Serie */ serie?: number; /** State code */ state?: NfeStateCode; /** Beginning number */ beginNumber?: number; /** Last number */ lastNumber?: number; /** Reason */ reason?: string; } /** State tax type (emission type) */ type NfeStateTaxType = 'default' | 'nFe' | 'nFCe'; /** State tax environment type */ type NfeStateTaxEnvironmentType = 'none' | 'production' | 'test'; /** State tax status */ type NfeStateTaxStatus = 'inactive' | 'none' | 'active'; /** State tax state code (lowercase as in API) */ type NfeStateTaxStateCode = 'rO' | 'aC' | 'aM' | 'rR' | 'pA' | 'aP' | 'tO' | 'mA' | 'pI' | 'cE' | 'rN' | 'pB' | 'pE' | 'aL' | 'sE' | 'bA' | 'mG' | 'eS' | 'rJ' | 'sP' | 'pR' | 'sC' | 'rS' | 'mS' | 'mT' | 'gO' | 'dF' | 'eX' | 'nA'; /** State tax special tax regime (lowercase as in API) */ type NfeStateTaxSpecialTaxRegime = 'automatico' | 'nenhum' | 'microempresaMunicipal' | 'estimativa' | 'sociedadeDeProfissionais' | 'cooperativa' | 'microempreendedorIndividual' | 'microempresarioEmpresaPequenoPorte'; /** Security credential for NFCe */ interface NfeSecurityCredential { /** Credential ID */ id?: number; /** Security code */ code?: string; } /** Full state tax record (response) */ interface NfeStateTax { /** State tax ID */ id?: string; /** Company ID */ companyId?: string; /** Account ID */ accountId?: string; /** State code */ code?: NfeStateTaxStateCode; /** Environment type */ environmentType?: NfeStateTaxEnvironmentType; /** State tax number (IE) */ taxNumber?: string; /** Serie for emission */ serie?: number; /** Number for emission */ number?: number; /** Status */ status?: NfeStateTaxStatus; /** Special tax regime */ specialTaxRegime?: NfeStateTaxSpecialTaxRegime; /** Security credential (for NFCe) */ securityCredential?: NfeSecurityCredential; /** Emission type */ type?: NfeStateTaxType; /** All series for this state tax */ series?: number[]; /** Batch ID */ batchId?: number; /** Creation date */ createdOn?: string; /** Modification date */ modifiedOn?: string; } /** Data for creating a state tax registration */ interface NfeStateTaxCreateData { /** State tax number (IE) — required */ taxNumber: string; /** Serie for emission — required */ serie: number; /** Number for emission — required */ number: number; /** State code */ code?: NfeStateTaxStateCode; /** Environment type */ environmentType?: NfeStateTaxEnvironmentType; /** Special tax regime */ specialTaxRegime?: NfeStateTaxSpecialTaxRegime; /** Security credential (for NFCe) */ securityCredential?: NfeSecurityCredential; /** Emission type */ type?: NfeStateTaxType; } /** Data for updating a state tax registration */ interface NfeStateTaxUpdateData { /** State tax number (IE) */ taxNumber?: string; /** Serie for emission */ serie?: number; /** Number for emission */ number?: number; /** State code */ code?: NfeStateTaxStateCode; /** Environment type */ environmentType?: NfeStateTaxEnvironmentType; /** Special tax regime */ specialTaxRegime?: NfeStateTaxSpecialTaxRegime; /** Security credential (for NFCe) */ securityCredential?: NfeSecurityCredential; /** Emission type */ type?: NfeStateTaxType; } /** Paginated list of state tax registrations */ interface NfeStateTaxListResponse { /** List of state taxes */ stateTaxes?: NfeStateTax[]; } /** Options for listing state taxes (cursor pagination) */ interface NfeStateTaxListOptions { /** Cursor: start after this ID */ startingAfter?: string; /** Cursor: end before this ID */ endingBefore?: string; /** Number of results per page (default: 10) */ limit?: number; } //#endregion //#region src/core/http/client.d.ts declare class HttpClient { private readonly config; constructor(config: HttpConfig); get(path: string, params?: Record, customHeaders?: Record): Promise>; post(path: string, data?: unknown): Promise>; put(path: string, data?: unknown): Promise>; delete(path: string): Promise>; patch(path: string, data?: unknown): Promise>; /** * HEAD request — returns status/headers, no body. Non-2xx still throws via the * error factory (e.g. 404 → NotFoundError), so callers checking existence * should catch NotFoundError and treat it as "not found". */ head(path: string): Promise>; /** * GET request expecting a binary buffer response (e.g., PDF, XML downloads). * * Sends an Accept header for the given content type and returns the response body as a Buffer. */ getBuffer(path: string, accept?: string): Promise>; private request; private executeRequest; private processResponse; private parseResponseData; private handleErrorResponse; /** * Extrai a mensagem de erro do corpo devolvido pela API. * * A plataforma usa QUATRO envelopes distintos, todos medidos ao vivo em * 2026-09-02 (e o de ModelState capturado em `tests/fixtures/live-contracts/`): * * "pageCount must be between 1 and 50" string JSON crua * {"code":40001,"message":"environment has to be ..."} campo `message` * {"errors":[{"message":"access key is not valid"}]} lista (hosts de consulta) * {"title":"...","errors":{"file":["The File field ..."]}} ProblemDetails/ModelState * * Só os dois primeiros eram tratados. Nos outros dois a mensagem real era * descartada e o chamador recebia `HTTP 400 error` — literalmente o status que * ele já tinha. Foi assim que o campo errado no upload de certificado * (`The File field is required.`) ficou invisível por meses. */ private extractErrorMessage; /** * Lê o campo `errors`, que vem em duas formas conforme o serviço: * lista de `{message}` (hosts de consulta) ou mapa `campo -> string[]` * (ModelState do ASP.NET). */ private extractFromErrorsField; private buildUrl; private buildHeaders; private buildBody; private isFormData; /** * Identificação do SDK no fio. * * Nome e versão vêm de `src/version.ts`, gerado do `package.json` — NÃO fixar * literal aqui. Até 2026-09-02 esta função devolvia `@nfe-io/sdk@3.0.0`: nome de * pacote que não existe (o publicado é `nfe-io`) e versão três majors atrás. * Nos 30 dias anteriores, 93.995 requisições chegaram ao gateway com esse valor, * em 23 variantes de User-Agent e 5 majors de Node — e nenhuma informação sobre * a versão do SDK. Era o único sinal de adoção que a plataforma tinha. */ private getUserAgent; private extractHeaders; private shouldNotRetry; private calculateRetryDelay; private sleep; private validateFetchSupport; } //#endregion //#region src/core/resources/service-invoices.d.ts /** Discriminated union for create() response */ type CreateInvoiceResponse = { status: 'immediate'; invoice: ServiceInvoiceData; } | { status: 'async'; response: ServiceInvoiceAsyncResponse; }; /** * Discriminated union for cancel() response. * * Cancellation is normally asynchronous: the API replies `202 + Location` and the * invoice moves through `WaitingSendCancel` → `Cancelled`. Use `cancelAndWait()` to poll * until it settles. */ type CancelInvoiceResponse = { status: 'immediate'; invoice: ServiceInvoiceData; } | { status: 'async'; response: ServiceInvoiceAsyncResponse; }; declare class ServiceInvoicesResource { private readonly http; constructor(http: HttpClient); /** * Create a new service invoice * * NFE.io typically returns 202 (async processing) with a Location header. * The invoice ID can be extracted from the location for polling. * * @param companyId - Company ID (GUID) * @param data - Invoice data following NFE.io schema * @returns Discriminated union: immediate (201) or async (202) response * * @example * ```typescript * const result = await nfe.serviceInvoices.create(companyId, { * borrower: { * federalTaxNumber: 12345678901234, * name: 'Client Name', * email: 'client@example.com' * }, * cityServiceCode: '01234', * federalServiceCode: '01.02', * description: 'Service description', * servicesAmount: 1000.00 * }); * * if (result.status === 'async') { * console.log('Invoice being processed:', result.response.invoiceId); * // Use createAndWait() or poll manually * } else { * console.log('Invoice issued immediately:', result.invoice.id); * } * ``` */ create(companyId: string, data: CreateServiceInvoiceData): Promise; /** * List service invoices for a company * * Supports pagination and date filtering. * * @param companyId - Company ID (GUID) * @param options - Pagination and filtering options * @returns List of invoices with pagination metadata * * @example * ```typescript * // List recent invoices * const result = await nfe.serviceInvoices.list(companyId, { * pageIndex: 1, * pageCount: 20, * issuedBegin: '2026-01-01', * issuedEnd: '2026-01-31' * }); * * console.log(`Found ${result.serviceInvoices?.length} invoices`); * ``` */ list(companyId: string, options?: ListServiceInvoicesOptions): Promise; /** * Retrieve a specific service invoice by ID * * @param companyId - Company ID (GUID) * @param invoiceId - Invoice ID (GUID) * @returns Complete invoice data * @throws {NotFoundError} If invoice not found * * @example * ```typescript * const invoice = await nfe.serviceInvoices.retrieve(companyId, invoiceId); * console.log('Invoice status:', invoice.flowStatus); * ``` */ retrieve(companyId: string, invoiceId: string): Promise; /** * Retrieve a service invoice by the caller's external id (idempotency key). * * @param companyId - Company ID (GUID) * @param externalId - The `externalId` supplied at creation * @returns The matching invoice * @throws {NotFoundError} If no invoice with that external id exists */ retrieveByExternalId(companyId: string, externalId: string): Promise; /** * Cancel a service invoice * * Cancellation is normally **asynchronous**: the API replies `202 Accepted` with a * `Location` header and the invoice transitions `WaitingSendCancel` → `Cancelled`. * This method returns a discriminated union (mirroring {@link create}) so the static * type always matches the runtime shape. Use {@link cancelAndWait} to poll until the * cancellation settles. * * @param companyId - Company ID (GUID) * @param invoiceId - Invoice ID (GUID) * @returns `{ status: 'async', response }` (202 + Location) or `{ status: 'immediate', invoice }` * @throws {InvoiceProcessingError} If a 202 is returned without a Location header * * @example * ```typescript * const result = await nfe.serviceInvoices.cancel(companyId, invoiceId); * if (result.status === 'async') { * console.log('Cancellation in progress:', result.response.invoiceId); * // or use cancelAndWait() to block until it settles * } else { * console.log('Cancelled immediately:', result.invoice.flowStatus); * } * ``` */ cancel(companyId: string, invoiceId: string): Promise; /** * Cancel an invoice and wait for the cancellation to settle. * * Combines {@link cancel} + polling, mirroring {@link createAndWait}. Polls the invoice * until it reaches a terminal flow status and returns it. * * @param companyId - Company ID (GUID) * @param invoiceId - Invoice ID (GUID) * @param options - Polling configuration (timeout, delays, callback) * @returns The settled invoice (expected `flowStatus: 'Cancelled'`) * @throws {TimeoutError} If polling timeout exceeded * @throws {InvoiceProcessingError} If cancellation failed (`flowStatus: 'CancelFailed'`) * * @example * ```typescript * const invoice = await nfe.serviceInvoices.cancelAndWait(companyId, invoiceId); * console.log(invoice.flowStatus); // 'Cancelled' * ``` */ cancelAndWait(companyId: string, invoiceId: string, options?: PollingOptions): Promise; /** * Send invoice via email to the borrower (client) * * @param companyId - Company ID (GUID) * @param invoiceId - Invoice ID (GUID) * @returns Email send result * * @example * ```typescript * const result = await nfe.serviceInvoices.sendEmail(companyId, invoiceId); * if (result.sent) { * console.log('Email sent successfully'); * } * ``` */ sendEmail(companyId: string, invoiceId: string): Promise; /** * Create invoice and wait for completion (handles async processing automatically) * * This method combines create() + polling to provide a synchronous-like experience. * It uses exponential backoff and respects timeout constraints. * * @param companyId - Company ID (GUID) * @param data - Invoice data * @param options - Polling configuration (timeout, delays, callbacks) * @returns Completed invoice (Issued status) * @throws {TimeoutError} If polling timeout exceeded * @throws {InvoiceProcessingError} If invoice processing failed * * @example * ```typescript * // Simple usage with defaults (2 min timeout) * const invoice = await nfe.serviceInvoices.createAndWait(companyId, data); * console.log('Invoice issued:', invoice.id); * * // Custom timeout and progress tracking * const invoice = await nfe.serviceInvoices.createAndWait(companyId, data, { * timeout: 180000, // 3 minutes * onPoll: (attempt, status) => { * console.log(`Attempt ${attempt}: ${status}`); * } * }); * ``` */ createAndWait(companyId: string, data: CreateServiceInvoiceData, options?: PollingOptions): Promise; /** * Download invoice PDF * * Downloads the PDF file for a service invoice. The invoice must be in a terminal state * (Issued, Cancelled) before the PDF is available. * * @param companyId - Company ID (GUID) * @param invoiceId - Invoice ID (GUID) — obrigatório * @returns PDF data as Buffer * @throws {NotFoundError} If the invoice or PDF is not found/not ready * @throws {AuthenticationError} If API key is invalid * * @example * ```typescript * const pdf = await nfe.serviceInvoices.downloadPdf(companyId, invoiceId); * fs.writeFileSync('invoice.pdf', pdf); * ``` * * @remarks * - PDF is only available after invoice reaches terminal state (Issued/Cancelled) * - Returns 404 if PDF is not yet ready - use polling or check flowStatus first * - Large files may consume significant memory - consider streaming for production use * * Não existe download em lote por empresa. Até 2026-09-02 `invoiceId` era * opcional e o ramo sem id montava `/serviceinvoices/pdf`, que o servidor casa * com a rota `/{id}` e trata como identificador literal: * `404 "service invoice with id (pdf) was not found"`. A rota não está na spec * `nf-servico-v1` nem no `nfeio-docs` — nunca houve caminho válido. */ downloadPdf(companyId: string, invoiceId: string): Promise; /** * Download invoice XML * * Downloads the XML file for a service invoice. The invoice must be in a terminal state * (Issued, Cancelled) before the XML is available. * * @param companyId - Company ID (GUID) * @param invoiceId - Invoice ID (GUID) — obrigatório * @returns XML data as Buffer * @throws {NotFoundError} If the invoice or XML is not found/not ready * @throws {AuthenticationError} If API key is invalid * * @example * ```typescript * const xml = await nfe.serviceInvoices.downloadXml(companyId, invoiceId); * fs.writeFileSync('invoice.xml', xml); * console.log(xml.toString('utf-8')); // View as string * ``` * * @remarks * - XML is only available after invoice reaches terminal state (Issued/Cancelled) * - Returns 404 if XML is not yet ready - use polling or check flowStatus first * - Buffer can be converted to string with `.toString('utf-8')` if needed * * Não existe download em lote por empresa — mesmo motivo do * {@link ServiceInvoicesResource.downloadPdf}: `/serviceinvoices/xml` responde * `404 "service invoice with id (xml) was not found"`. */ downloadXml(companyId: string, invoiceId: string): Promise; /** * Get invoice status with detailed information * * @param companyId - Company ID (GUID) * @param invoiceId - Invoice ID (GUID) * @returns Status information with invoice data */ getStatus(companyId: string, invoiceId: string): Promise<{ status: FlowStatus; invoice: ServiceInvoiceData; isComplete: boolean; isFailed: boolean; }>; /** * Bulk operations: Create multiple invoices * * @param companyId - Company ID (GUID) * @param invoices - Array of invoice data * @param options - Batch processing options * @returns Array of create responses */ createBatch(companyId: string, invoices: CreateServiceInvoiceData[], options?: { waitForCompletion?: boolean; maxConcurrent?: number; }): Promise>; /** * Extract invoice ID from Location header * Location format: /v1/companies/{companyId}/serviceinvoices/{invoiceId} */ private extractInvoiceIdFromLocation; } //#endregion //#region src/core/resources/companies.d.ts /** * Resumo do certificado de uma empresa. * * `expiresOn` / `isValid` / os dois derivados descrevem o certificado preferido * (ver {@link CompaniesResource.getCertificateStatus}); `certificates` traz os itens * como a API devolveu, para quem precisar de `thumbprint`, `subject` ou decidir * por outro critério. */ interface CertificateStatusSummary { /** Há ao menos um certificado instalado. */ hasCertificate: boolean; /** Vencimento do certificado preferido (o `validUntil` da API). */ expiresOn?: string; /** O certificado preferido está com `status: 'Active'`. */ isValid?: boolean; /** Dias até o vencimento — negativo se já venceu. */ daysUntilExpiration?: number; /** Vence dentro do limite padrão do {@link CertificateValidator} (30 dias). */ isExpiringSoon?: boolean; /** Itens como a API os devolveu. Vazio quando não há certificado. */ certificates: readonly CertificateMetadataResourceItem[]; } declare class CompaniesResource { private readonly http; private readonly v2Http; /** * @param http - Main client (api.nfe.io) for the legacy v1 company CRUD. * @param v2Http - Optional client for the contribuintes-v2 endpoints on * api.nfse.io (e.g. the HEAD existence check). Falls back to `http`. */ constructor(http: HttpClient, v2Http?: HttpClient); /** * Check whether a company exists, via `HEAD /v2/companies/{id}` (api.nfse.io). * * @returns `true` if the company exists (2xx), `false` on 404. Other errors propagate. */ exists(companyId: string): Promise; /** * Create a new company * * The API requires `name`, `federalTaxNumber`, `taxRegime` and `address` * (with `state`, `city { code, name }`, `district`, `street`, `number`, * `postalCode`, `country`) — a payload without them compiles against the * loose `Company`-based signature but fails with a 400. Note that `email` * is NOT part of the create body. For the strict wire shape, see * {@link CreateCompanyResourceItem} (exported from the package root). * * @param data - Company data (excluding id, createdOn, modifiedOn) * @returns The created company with generated id * @throws {ValidationError} If company data is invalid * @throws {AuthenticationError} If API key is invalid * @throws {ConflictError} If company with same tax number already exists * * @example * ```typescript * const company = await nfe.companies.create({ * name: 'Acme Corp', * federalTaxNumber: 12345678000190, * taxRegime: 'SimplesNacional', * address: { * state: 'SP', * city: { code: '3550308', name: 'São Paulo' }, * district: 'Centro', * street: 'Rua Exemplo', * number: '100', * postalCode: '01001000', * country: 'BRA', * }, * }); * ``` */ create(data: Omit): Promise; /** * List companies (v1 API — offset pagination) * * @deprecated The v1 companies API (`api.nfe.io/v1/companies`) is being * discontinued. Prefer {@link listV2} (cursor-based, `api.nfse.io/v2`) for * page-by-page listing, or {@link listAll}/{@link listIterator} for full * sweeps. This method keeps working during the coexistence window. * * Pagination is 1-based (API contract): the first page is `pageIndex: 1`. * The API rejects `pageIndex: 0` with a validation error. * * `pageCount` accepted by the API: 2-50 (when omitted, the API returns 10 * items). Values outside that range — including 1, despite the API's * "between 1 and 50" error message — are rejected with a 400. * * @param options - Pagination options (pageCount, pageIndex) * @returns List response with companies and pagination info * * @example * ```typescript * const page1 = await nfe.companies.list({ pageCount: 20, pageIndex: 1 }); * const page2 = await nfe.companies.list({ pageCount: 20, pageIndex: 2 }); * ``` */ list(options?: PaginationOptions): Promise>; /** * List companies via the v2 cursor API (`GET api.nfse.io/v2/companies`) * * This is the successor of {@link list} (the v1 companies API is being * discontinued). Cursor-based: pass the last item's `id` as * `startingAfter` to fetch the next page; `hasMore` tells whether more * pages exist. Results are ordered by name, then id. * * `limit` accepted by the API: 1-50 (default 10). Values above 50 are * rejected; `limit: 0` is rejected client-side (the API would silently * return an empty page). Items follow the **v2 projection** * ({@link CompanyResourceItem}) — a different shape from the v1 * {@link Company} (no NFS-e config fields; adds `stateTaxes`, * `municipalTaxes`, `type`, `version`). * * Known API issue (reported 2026-07-14): on some accounts, specific * records make the server answer 500 for any page window containing * them, which breaks full sweeps — the reason {@link listAll}/ * {@link listIterator} still run on v1 in this release. * * @param options - Cursor pagination options (limit, startingAfter, endingBefore) * @returns Page of companies (v2 projection) plus `hasMore` * @throws {ValidationError} If `limit` is outside 1-50 * * @example * ```typescript * let page = await nfe.companies.listV2({ limit: 50 }); * while (page.hasMore) { * const last = page.data[page.data.length - 1]; * page = await nfe.companies.listV2({ limit: 50, startingAfter: last.id }); * } * ``` */ listV2(options?: CompanyV2ListOptions): Promise; /** * List all companies with automatic pagination * * Fetches all pages automatically and returns complete list. * Use with caution for accounts with many companies. * * @returns Array of all companies * * @example * ```typescript * const allCompanies = await nfe.companies.listAll(); * console.log(`Total companies: ${allCompanies.length}`); * ``` */ listAll(): Promise; /** * Async iterator for streaming companies * * Memory-efficient way to process large numbers of companies. * Automatically fetches new pages as needed. * * @yields Company objects one at a time * * @example * ```typescript * for await (const company of nfe.companies.listIterator()) { * console.log(company.name); * } * ``` */ listIterator(): AsyncIterableIterator; /** * Retrieve a specific company by ID * * @param companyId - Company ID to retrieve * @returns The company data * @throws {NotFoundError} If company doesn't exist * @throws {AuthenticationError} If API key is invalid * * @example * ```typescript * const company = await nfe.companies.retrieve('company-123'); * console.log(company.name); * ``` */ retrieve(companyId: string): Promise; /** * Update a company * * **This is a PUT (full replacement), NOT a partial update.** The API * requires the complete object (`name`, `federalTaxNumber`, `taxRegime`, * `address`, ...) on every call; omitted fields are reset/replaced, not * kept. Sending only the fields you want to change either fails with a * 400 or silently wipes the rest. Always read-modify-write. * * For the strict wire shape, see {@link UpdateCompanyResourceItem} * (exported from the package root). The loose `Partial` * signature is kept for backwards compatibility only. * * @param companyId - Company ID to update * @param data - The COMPLETE company data (full replacement) * @returns The updated company * @throws {ValidationError} If update data is invalid * @throws {NotFoundError} If company doesn't exist * * @example * ```typescript * // Read-modify-write: fetch the current object, change it, send it whole * const current = await nfe.companies.retrieve('company-123'); * const updated = await nfe.companies.update('company-123', { * ...current, * tradeName: 'Novo Nome Fantasia', * }); * ``` */ update(companyId: string, data: Partial): Promise; /** * Delete a company (named 'remove' to avoid JS keyword conflict) * * @param companyId - Company ID to delete * @returns Deletion confirmation with company ID * @throws {NotFoundError} If company doesn't exist * @throws {ConflictError} If company has dependent resources * * @example * ```typescript * const result = await nfe.companies.remove('company-123'); * console.log(`Deleted: ${result.deleted}`); // true * ``` */ remove(companyId: string): Promise<{ deleted: boolean; id: string; }>; /** * Validate certificate before upload * * @param file - Certificate file buffer * @param password - Certificate password * @returns Validation result with metadata * @throws {ValidationError} If certificate format is not supported * * @example * ```typescript * const validation = await nfe.companies.validateCertificate( * certificateBuffer, * 'password123' * ); * * if (validation.valid) { * console.log('Certificate expires:', validation.metadata?.validTo); * } else { * console.error('Invalid certificate:', validation.error); * } * ``` */ validateCertificate(file: Buffer, password: string): Promise<{ valid: boolean; metadata?: { subject: string; issuer: string; validFrom: Date; validTo: Date; serialNumber?: string; }; error?: string; }>; /** * Upload digital certificate for a company * Automatically validates certificate before upload * * @param companyId - Company ID * @param certificateData - Certificate data * @returns Upload result * @throws {ValidationError} If certificate is invalid or password is wrong * @throws {NotFoundError} If company doesn't exist * * @example * ```typescript * import { readFileSync } from 'fs'; * * const certificateBuffer = readFileSync('certificate.pfx'); * * const result = await nfe.companies.uploadCertificate('company-123', { * file: certificateBuffer, * password: 'cert-password', * filename: 'certificate.pfx' * }); * * console.log(result.message); * ``` */ uploadCertificate(companyId: string, certificateData: { /** Certificate file (Buffer or Blob) */file: any; /** Certificate password */ password: string; /** Optional filename (should be .pfx or .p12) */ filename?: string; }): Promise<{ uploaded: boolean; message?: string; }>; /** * Get certificate status for a company * Includes expiration calculation and warnings * * @param companyId - Company ID * @returns Certificate status with expiration info * @throws {NotFoundError} If company doesn't exist * * @remarks * `GET /v1/companies/{id}/certificate` responde `{ certificates: [...] }`, com * `validUntil` e `status` em cada item — NÃO `{hasCertificate, expiresOn, isValid}`, * que era o que este método lia antes de 2026-09-02 (e por isso devolvia * `undefined` em tudo, silenciosamente). Empresa sem certificado responde * **200 com `certificates: []`**, não 404. * * O campo de vencimento na superfície do SDK se chama `expiresOn` — o mesmo nome * que a API usa quando o certificado vem embutido no item da listagem de empresas * ({@link CompanyCertificateV1}). No endpoint de certificado ele se chama * `validUntil`; a normalização acontece aqui. * * Quando há mais de um certificado, o resumo descreve o preferido: um com * `status: 'Active'` e, entre os ativos, o de vencimento mais distante. Se nenhum * for ativo, o de vencimento mais distante entre todos. Isso é convenção do SDK, * não contrato da API — use `certificates` para decidir de outro jeito. * * @example * ```typescript * const status = await nfe.companies.getCertificateStatus('company-123'); * * if (status.hasCertificate) { * console.log('Certificate expires:', status.expiresOn); * console.log('Days until expiration:', status.daysUntilExpiration); * * if (status.isExpiringSoon) { * console.warn('Certificate is expiring soon!'); * } * * // Dado que o resumo não expõe: thumbprint, subject, providerType... * console.log(status.certificates[0]?.thumbprint); * } * ``` */ getCertificateStatus(companyId: string): Promise; /** * Replace existing certificate (convenience method) * Uploads a new certificate, replacing the existing one * * @param companyId - Company ID * @param certificateData - New certificate data * @returns Upload result * @throws {ValidationError} If certificate is invalid * @throws {NotFoundError} If company doesn't exist * * @example * ```typescript * const result = await nfe.companies.replaceCertificate('company-123', { * file: newCertificateBuffer, * password: 'new-password', * filename: 'new-certificate.pfx' * }); * ``` */ replaceCertificate(companyId: string, certificateData: { file: any; password: string; filename?: string; }): Promise<{ uploaded: boolean; message?: string; }>; /** * Check if certificate is expiring soon for a company * * @param companyId - Company ID * @param thresholdDays - Days threshold (default: 30) * @returns Warning object if expiring soon, null otherwise * @throws {NotFoundError} If company doesn't exist * * @example * ```typescript * const warning = await nfe.companies.checkCertificateExpiration('company-123', 30); * * if (warning) { * console.warn(`Certificate expiring in ${warning.daysRemaining} days!`); * console.log('Expiration date:', warning.expiresOn); * } * ``` */ checkCertificateExpiration(companyId: string, thresholdDays?: number): Promise<{ isExpiring: true; daysRemaining: number; expiresOn: Date; } | null>; /** * Find company by federal tax number (CNPJ or CPF) * * @param taxNumber - Federal tax number (11 digits for CPF, 14 for CNPJ) * @returns Company if found, null otherwise * * @example * ```typescript * const company = await nfe.companies.findByTaxNumber(12345678901234); * * if (company) { * console.log('Found:', company.name); * } else { * console.log('Company not found'); * } * ``` */ findByTaxNumber(taxNumber: number): Promise; /** * Find company by name (case-insensitive partial match) * * @param name - Company name or part of it * @returns Array of matching companies * * @example * ```typescript * const companies = await nfe.companies.findByName('Acme'); * * companies.forEach(company => { * console.log('Match:', company.name); * }); * ``` */ findByName(name: string): Promise; /** * Get companies with active certificates * * @returns Array of companies that have valid certificates * * @example * ```typescript * const companiesWithCerts = await nfe.companies.getCompaniesWithCertificates(); * * console.log(`Found ${companiesWithCerts.length} companies with certificates`); * ``` */ getCompaniesWithCertificates(): Promise; /** * Get companies with expiring certificates * * @param thresholdDays - Days threshold (default: 30) * @returns Array of companies with expiring certificates * * @example * ```typescript * const expiring = await nfe.companies.getCompaniesWithExpiringCertificates(30); * * expiring.forEach(company => { * console.log(`${company.name} certificate expiring soon`); * }); * ``` */ getCompaniesWithExpiringCertificates(thresholdDays?: number): Promise; private createFormData; } //#endregion //#region src/core/resources/legal-people.d.ts /** * LegalPeople resource for managing legal entities (pessoas jurídicas) * All operations are scoped by company_id */ declare class LegalPeopleResource { private readonly http; constructor(http: HttpClient); /** * List all legal people for a company * * @param companyId - Company ID * @returns List of legal people * * @example * ```typescript * const result = await nfe.legalPeople.list('company-id'); * console.log(`Found ${result.legalPeople?.length ?? 0} legal entities`); * ``` */ list(companyId: ResourceId): Promise>; /** * Create a new legal person * * @param companyId - Company ID * @param data - Legal person data * @returns Created legal person * * @example * ```typescript * const legalPerson = await nfe.legalPeople.create('company-id', { * federalTaxNumber: '12345678901234', * name: 'Empresa Exemplo Ltda', * email: 'contato@empresa.com.br', * address: { * street: 'Av. Paulista, 1000', * neighborhood: 'Bela Vista', * city: { code: '3550308', name: 'São Paulo' }, * state: 'SP', * postalCode: '01310-100' * } * }); * ``` */ create(companyId: ResourceId, data: Partial): Promise; /** * Retrieve a specific legal person * * @param companyId - Company ID * @param legalPersonId - Legal person ID * @returns Legal person details * * @example * ```typescript * const legalPerson = await nfe.legalPeople.retrieve( * 'company-id', * 'legal-person-id' * ); * console.log(legalPerson.name); * ``` */ retrieve(companyId: ResourceId, legalPersonId: ResourceId): Promise; /** * Update a legal person * * @param companyId - Company ID * @param legalPersonId - Legal person ID * @param data - Data to update * @returns Updated legal person * * @example * ```typescript * const updated = await nfe.legalPeople.update( * 'company-id', * 'legal-person-id', * { email: 'novo@email.com' } * ); * ``` */ update(companyId: ResourceId, legalPersonId: ResourceId, data: Partial): Promise; /** * Delete a legal person * * @param companyId - Company ID * @param legalPersonId - Legal person ID * * @example * ```typescript * await nfe.legalPeople.delete('company-id', 'legal-person-id'); * ``` */ delete(companyId: ResourceId, legalPersonId: ResourceId): Promise; /** * Create multiple legal people in batch * * @param companyId - Company ID * @param data - Array of legal people data * @returns Array of created legal people * * @example * ```typescript * const created = await nfe.legalPeople.createBatch('company-id', [ * { name: 'Empresa 1', federalTaxNumber: '11111111111111', ... }, * { name: 'Empresa 2', federalTaxNumber: '22222222222222', ... } * ]); * ``` */ createBatch(companyId: ResourceId, data: Array>): Promise; /** * Find legal person by federal tax number (CNPJ) * * @param companyId - Company ID * @param federalTaxNumber - CNPJ (only numbers) * @returns Legal person or undefined if not found * * @example * ```typescript * const person = await nfe.legalPeople.findByTaxNumber( * 'company-id', * '12345678901234' * ); * if (person) { * console.log('Found:', person.name); * } * ``` */ findByTaxNumber(companyId: ResourceId, federalTaxNumber: string): Promise; } //#endregion //#region src/core/resources/natural-people.d.ts /** * NaturalPeople resource for managing natural persons (pessoas físicas) * All operations are scoped by company_id */ declare class NaturalPeopleResource { private readonly http; constructor(http: HttpClient); /** * List all natural people for a company * * @param companyId - Company ID * @returns List of natural people * * @example * ```typescript * const result = await nfe.naturalPeople.list('company-id'); * console.log(`Found ${result.data.length} natural persons`); * ``` */ list(companyId: ResourceId): Promise>; /** * Create a new natural person * * @param companyId - Company ID * @param data - Natural person data * @returns Created natural person * * @example * ```typescript * const naturalPerson = await nfe.naturalPeople.create('company-id', { * federalTaxNumber: '12345678901', * name: 'João Silva', * email: 'joao@exemplo.com', * address: { * street: 'Rua Exemplo, 123', * neighborhood: 'Centro', * city: { code: '3550308', name: 'São Paulo' }, * state: 'SP', * postalCode: '01000-000' * } * }); * ``` */ create(companyId: ResourceId, data: Partial): Promise; /** * Retrieve a specific natural person * * @param companyId - Company ID * @param naturalPersonId - Natural person ID * @returns Natural person details * * @example * ```typescript * const naturalPerson = await nfe.naturalPeople.retrieve( * 'company-id', * 'natural-person-id' * ); * console.log(naturalPerson.name); * ``` */ retrieve(companyId: ResourceId, naturalPersonId: ResourceId): Promise; /** * Update a natural person * * @param companyId - Company ID * @param naturalPersonId - Natural person ID * @param data - Data to update * @returns Updated natural person * * @example * ```typescript * const updated = await nfe.naturalPeople.update( * 'company-id', * 'natural-person-id', * { email: 'novo@email.com' } * ); * ``` */ update(companyId: ResourceId, naturalPersonId: ResourceId, data: Partial): Promise; /** * Delete a natural person * * @param companyId - Company ID * @param naturalPersonId - Natural person ID * * @example * ```typescript * await nfe.naturalPeople.delete('company-id', 'natural-person-id'); * ``` */ delete(companyId: ResourceId, naturalPersonId: ResourceId): Promise; /** * Create multiple natural people in batch * * @param companyId - Company ID * @param data - Array of natural people data * @returns Array of created natural people * * @example * ```typescript * const created = await nfe.naturalPeople.createBatch('company-id', [ * { name: 'João Silva', federalTaxNumber: '11111111111', ... }, * { name: 'Maria Santos', federalTaxNumber: '22222222222', ... } * ]); * ``` */ createBatch(companyId: ResourceId, data: Array>): Promise; /** * Find natural person by federal tax number (CPF) * * @param companyId - Company ID * @param federalTaxNumber - CPF (only numbers) * @returns Natural person or undefined if not found * * @example * ```typescript * const person = await nfe.naturalPeople.findByTaxNumber( * 'company-id', * '12345678901' * ); * if (person) { * console.log('Found:', person.name); * } * ``` */ findByTaxNumber(companyId: ResourceId, federalTaxNumber: string): Promise; } //#endregion //#region src/core/resources/webhooks.d.ts /** * Webhooks resource for managing event subscriptions. * * Webhooks are managed at the **account** level (`/v2/webhooks`) — use the * `*AccountWebhook*` methods. The company-scoped methods (`list`, `create`, * `retrieve`, `update`, `delete`, `test`) are deprecated: the route * `/v1/companies/{id}/webhooks` returns 404 on the current API (confirmed on * two accounts, 2026-07-02). */ declare class WebhooksResource { private readonly http; /** * HTTP client for ACCOUNT-scoped endpoints (host-root `/v2/webhooks`). When not * provided, falls back to the company-scoped client (back-compat for tests). */ private readonly account; constructor(http: HttpClient, accountHttp?: HttpClient); /** * List all webhooks for a company * * @deprecated A rota `/v1/companies/{id}/webhooks` retorna 404 na API atual * (confirmado em duas contas, 2026-07-02). Use {@link listAccountWebhooks}. * * @param companyId - Company ID * @returns List of webhooks * * @example * ```typescript * const result = await nfe.webhooks.list('company-id'); * console.log(`You have ${result.data.length} webhooks configured`); * ``` */ list(companyId: ResourceId): Promise>; /** * Create a new webhook subscription * * @deprecated A rota `/v1/companies/{id}/webhooks` retorna 404 na API atual * (confirmado em duas contas, 2026-07-02). Use {@link createAccountWebhook}. * * @param companyId - Company ID * @param data - Webhook configuration * @returns Created webhook * * @example * ```typescript * const webhook = await nfe.webhooks.create('company-id', { * url: 'https://seu-site.com/webhook/nfe', * events: ['invoice.issued', 'invoice.cancelled'], * secret: 'sua-chave-secreta-opcional' * }); * ``` */ create(companyId: ResourceId, data: Partial): Promise; /** * Retrieve a specific webhook * * @deprecated A rota `/v1/companies/{id}/webhooks` retorna 404 na API atual * (confirmado em duas contas, 2026-07-02). Use {@link retrieveAccountWebhook}. * * @param companyId - Company ID * @param webhookId - Webhook ID * @returns Webhook details * * @example * ```typescript * const webhook = await nfe.webhooks.retrieve('company-id', 'webhook-id'); * console.log('Webhook URL:', webhook.url); * ``` */ retrieve(companyId: ResourceId, webhookId: ResourceId): Promise; /** * Update a webhook * * @deprecated A rota `/v1/companies/{id}/webhooks` retorna 404 na API atual * (confirmado em duas contas, 2026-07-02). Use {@link updateAccountWebhook}. * * @param companyId - Company ID * @param webhookId - Webhook ID * @param data - Data to update * @returns Updated webhook * * @example * ```typescript * const updated = await nfe.webhooks.update( * 'company-id', * 'webhook-id', * { events: ['invoice.issued', 'invoice.cancelled', 'invoice.failed'] } * ); * ``` */ update(companyId: ResourceId, webhookId: ResourceId, data: Partial): Promise; /** * Delete a webhook * * @deprecated A rota `/v1/companies/{id}/webhooks` retorna 404 na API atual * (confirmado em duas contas, 2026-07-02). Use {@link deleteAccountWebhook}. * * @param companyId - Company ID * @param webhookId - Webhook ID * * @example * ```typescript * await nfe.webhooks.delete('company-id', 'webhook-id'); * console.log('Webhook deleted'); * ``` */ delete(companyId: ResourceId, webhookId: ResourceId): Promise; /** * Validate a webhook signature sent by NFE.io. * * NFE.io signs every webhook delivery with `HMAC-SHA1(secret, raw_body_bytes)`, * encoded as hex (uppercase in the wire format, but compared case-insensitively), * and prefixed with `sha1=`. The signed value is delivered in the * `X-Hub-Signature` HTTP header. * * @param payload - The raw request body. Pass a `Buffer` whenever possible to * preserve byte-exact content. Strings are encoded as UTF-8. * Re-serializing JSON (e.g. `JSON.stringify(req.body)`) does * NOT work because property order and whitespace will differ * from the bytes NFE.io signed. * @param signature - The full value of the `X-Hub-Signature` header, including * the `sha1=` prefix. Accepts `string` or `string[]` (the * shape Node's `IncomingMessage` exposes for repeated * headers); `undefined`/`null` are treated as invalid. * @param secret - The webhook secret configured when the webhook was created. * @returns `true` only when the signature matches; `false` for any mismatch, * malformed input, missing input, or wrong algorithm prefix. This * method never throws. * * @example * ```typescript * import express from 'express'; * * // IMPORTANT: capture the raw body BEFORE any JSON parser so that * // validateSignature sees the exact bytes NFE.io signed. * app.post( * '/webhook/nfe', * express.raw({ type: '*\/*' }), * (req, res) => { * const ok = nfe.webhooks.validateSignature( * req.body, // Buffer with exact bytes * req.headers['x-hub-signature'], // correct header * process.env.NFE_WEBHOOK_SECRET ?? '' * ); * if (!ok) return res.status(401).end(); * * const event = JSON.parse(req.body.toString('utf8')); * // process event... * res.status(204).end(); * } * ); * ``` */ validateSignature(payload: Buffer | string, signature: string | string[] | undefined, secret: string): boolean; /** * Test webhook delivery * * Sends a test event to the webhook URL to verify it's working * * @deprecated A rota `/v1/companies/{id}/webhooks` retorna 404 na API atual * (confirmado em duas contas, 2026-07-02). Use {@link pingAccountWebhook}. * * @param companyId - Company ID * @param webhookId - Webhook ID * @returns Test result * * @example * ```typescript * const result = await nfe.webhooks.test('company-id', 'webhook-id'); * if (result.success) { * console.log('Webhook is working!'); * } * ``` */ test(companyId: ResourceId, webhookId: ResourceId): Promise<{ success: boolean; message?: string; }>; /** * List account-level webhooks (`GET /v2/webhooks`). * * The API wraps the result as `{ webHooks: [...] }`; this normalizes it to the * SDK's `ListResponse` (`{ data: [...] }`). */ listAccountWebhooks(): Promise>; /** * Create an account-level webhook (`POST /v2/webhooks`). * * NFE.io **verifies the target URI at creation time**: it sends a test request * (ping) to `data.uri` and the endpoint must already be live and answer 2xx, * otherwise creation fails. The `secret` must be 32–64 characters; it is echoed * back in the create response but omitted on subsequent reads. * * @example * ```typescript * const webhook = await nfe.webhooks.createAccountWebhook({ * uri: 'https://seu-site.com/webhook/nfe', // precisa responder 2xx já na criação * contentType: 'json', * secret: 'um-segredo-de-32-a-64-caracteres-aqui', * filters: ['service_invoice.issued_successfully', 'service_invoice.cancelled_successfully'], * }); * console.log('Webhook criado:', webhook.id); * ``` */ createAccountWebhook(data: AccountWebhook): Promise; /** Retrieve an account-level webhook by id (`GET /v2/webhooks/{id}`). */ retrieveAccountWebhook(webhookId: ResourceId): Promise; /** * Update an account-level webhook by id (`PUT /v2/webhooks/{id}`). * * ⚠️ O `PUT` tem **semântica de substituição integral** (confirmado ao vivo em * 2026-07-03): campos omitidos voltam ao padrão — em particular, um update sem * `status` **desativa o webhook** (`status` volta a `"Inactive"`). Envie o * objeto completo, por exemplo partindo de {@link retrieveAccountWebhook}: * * @example * ```typescript * const current = await nfe.webhooks.retrieveAccountWebhook(id); * await nfe.webhooks.updateAccountWebhook(id, { * ...current, * filters: [...(current.filters ?? []), 'service_invoice.cancelled_successfully'], * }); * ``` */ updateAccountWebhook(webhookId: ResourceId, data: Partial): Promise; /** Delete a single account-level webhook by id (`DELETE /v2/webhooks/{id}`). */ deleteAccountWebhook(webhookId: ResourceId): Promise; /** * ⚠️ DANGEROUS: delete **ALL** account-level webhooks (`DELETE /v2/webhooks`). * * Named distinctly from {@link deleteAccountWebhook} so it can never be reached * by a mistyped single delete. This removes every webhook on the account. */ deleteAllAccountWebhooks(): Promise; /** Trigger a test ping for an account-level webhook (`PUT /v2/webhooks/{id}/pings`). */ pingAccountWebhook(webhookId: ResourceId): Promise; /** * Fetch the live list of available webhook event types (`GET /v2/webhooks/eventTypes`). * * Prefer this over {@link getAvailableEvents}: the server is the source of truth, * so new event types are picked up automatically. The return is the **open** union * {@link WebhookEventType}, so new server-side events don't break typing. * The API wraps the result as `{ eventTypes: [{ id, ... }] }`; this extracts the ids. */ fetchEventTypes(): Promise; /** * Get available webhook events. * * @deprecated This returns a hardcoded list that can drift from the platform's * real event set. Use {@link fetchEventTypes} to get the live list from the API. * * @returns List of available events */ getAvailableEvents(): WebhookEvent[]; } //#endregion //#region src/core/resources/addresses.d.ts /** * Addresses API Resource * * @description * Provides operations for looking up Brazilian addresses using the NFE.io Address API. * Data is sourced from Correios DNE (Diretório Nacional de Endereços) integrated with IBGE city codes. * * **Note:** This resource uses a different API host (address.api.nfe.io) and may require * a separate API key configured via `dataApiKey` in the client configuration. * * The live `address.api.nfe.io/v2` API supports **postal code lookup only**. A single * address is returned for a given CEP; there is no working address search/free-text * endpoint on this host (see the `fix-address-lookup-api-mismatch` change). * * @example Basic postal code lookup * ```typescript * const address = await nfe.addresses.lookupByPostalCode('01310-100'); * console.log(address.street); // 'Paulista' * console.log(`${address.streetSuffix} ${address.street}, ${address.city.name}/${address.state}`); * ``` */ declare class AddressesResource { private readonly http; constructor(http: HttpClient); /** * Lookup address by postal code (CEP) * * Calls `GET /v2/addresses/{cep}` and returns the single {@link Address} carried in * the API's `{ address }` envelope. * * @param postalCode - Brazilian postal code (CEP), with or without hyphen * @returns Promise resolving to the matching {@link Address} * @throws {ValidationError} If postal code format is invalid * @throws {NotFoundError} If no address found for the postal code * * @example * ```typescript * // With or without hyphen — both normalize to the 8-digit form * const address = await nfe.addresses.lookupByPostalCode('01310-100'); * * console.log(`${address.streetSuffix} ${address.street}, ${address.city.name} - ${address.state}`); * console.log(address.postalCode); // '01310-100' (API returns it formatted) * ``` */ lookupByPostalCode(postalCode: string): Promise
; } //#endregion //#region src/core/resources/transportation-invoices.d.ts /** * Transportation Invoices (CT-e) API Resource * * @description * Provides operations for managing CT-e (Conhecimento de Transporte Eletrônico) * documents via SEFAZ Distribuição DFe. This allows companies to automatically * receive CT-e documents destined to them. * * **Prerequisites:** * - Company must be registered with a valid A1 digital certificate * - Webhook must be configured to receive CT-e notifications * * **Note:** This resource uses a different API host (api.nfse.io) and may require * a separate API key configured via `dataApiKey` in the client configuration. * If not set, it falls back to `apiKey`. * * @example Enable automatic CT-e search * ```typescript * // Enable with default settings * const settings = await nfe.transportationInvoices.enable('company-id'); * * // Enable starting from a specific NSU * const settings = await nfe.transportationInvoices.enable('company-id', { * startFromNsu: 12345 * }); * ``` * * @example Retrieve CT-e by access key * ```typescript * const cte = await nfe.transportationInvoices.retrieve( * 'company-id', * '35240112345678000190570010000001231234567890' * ); * console.log(cte.nameSender, cte.totalInvoiceAmount); * ``` * * @example Download CT-e XML * ```typescript * const xml = await nfe.transportationInvoices.downloadXml( * 'company-id', * '35240112345678000190570010000001231234567890' * ); * // Save to file or parse as needed * ``` */ declare class TransportationInvoicesResource { private readonly http; constructor(http: HttpClient); /** * Enable automatic CT-e search for a company * * Activates the automatic search for CT-e documents destined to the specified * company via SEFAZ Distribuição DFe. Once enabled, new CT-es will be automatically * retrieved and can be accessed via the configured webhook. * * @param companyId - The company ID to enable automatic search for * @param options - Optional settings for the automatic search * @returns Promise with the inbound settings after enabling * @throws {ValidationError} If company ID is empty * @throws {BadRequestError} If the request is invalid * @throws {NotFoundError} If the company is not found * * @example * ```typescript * // Enable with default settings * const settings = await nfe.transportationInvoices.enable('company-id'); * * // Enable starting from a specific NSU * const settings = await nfe.transportationInvoices.enable('company-id', { * startFromNsu: 12345 * }); * * // Enable starting from a specific date * const settings = await nfe.transportationInvoices.enable('company-id', { * startFromDate: '2024-01-01T00:00:00Z' * }); * ``` */ enable(companyId: string, options?: EnableTransportationInvoiceOptions): Promise; /** * Disable automatic CT-e search for a company * * Deactivates the automatic search for CT-e documents. After disabling, * no new CT-es will be retrieved for the company. * * @param companyId - The company ID to disable automatic search for * @returns Promise with the inbound settings after disabling * @throws {ValidationError} If company ID is empty * @throws {NotFoundError} If automatic search is not enabled for this company * * @example * ```typescript * const settings = await nfe.transportationInvoices.disable('company-id'); * console.log('Automatic search disabled:', settings.status); * ``` */ disable(companyId: string): Promise; /** * Get current automatic CT-e search settings * * Retrieves the current configuration for automatic CT-e search, * including status, start NSU, start date, and timestamps. * * @param companyId - The company ID to get settings for * @returns Promise with the current inbound settings * @throws {ValidationError} If company ID is empty * @throws {NotFoundError} If automatic search is not configured for this company * * @example * ```typescript * const settings = await nfe.transportationInvoices.getSettings('company-id'); * console.log('Status:', settings.status); * console.log('Start NSU:', settings.startFromNsu); * console.log('Created:', settings.createdOn); * ``` */ getSettings(companyId: string): Promise; /** * Retrieve CT-e metadata by access key * * Gets the metadata of a CT-e document by its 44-digit access key. * * @param companyId - The company ID that received the CT-e * @param accessKey - The 44-digit CT-e access key * @returns Promise with the CT-e metadata * @throws {ValidationError} If company ID or access key is invalid * @throws {NotFoundError} If the CT-e is not found * * @example * ```typescript * const cte = await nfe.transportationInvoices.retrieve( * 'company-id', * '35240112345678000190570010000001231234567890' * ); * console.log('Sender:', cte.nameSender); * console.log('CNPJ:', cte.federalTaxNumberSender); * console.log('Amount:', cte.totalInvoiceAmount); * console.log('Issued:', cte.issuedOn); * ``` */ retrieve(companyId: string, accessKey: string): Promise; /** * Download CT-e XML by access key * * Gets the XML content of a CT-e document. * * * A resposta e um objeto com `publicTemporaryUri` — URL pre-assinada e temporaria. * Binario NAO trafega nesta rota e o `Accept` nao altera a resposta; baixar a URL * fica a cargo do chamador. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/inbound-download.json). * * @param companyId - The company ID that received the CT-e * @param accessKey - The 44-digit CT-e access key * @returns Promise com o file-resource (`publicTemporaryUri`) * @throws {ValidationError} If company ID or access key is invalid * @throws {NotFoundError} If the CT-e is not found * * @example * ```typescript * const res = await nfe.transportationInvoices.downloadXml( * 'company-id', * '35240112345678000190570010000001231234567890' * ); * const xml = await fetch(res.publicTemporaryUri!).then((r) => r.text()); * ``` */ downloadXml(companyId: string, accessKey: string): Promise; /** * Retrieve CT-e event metadata * * Gets the metadata of an event related to a CT-e document. * * @param companyId - The company ID that received the CT-e * @param accessKey - The 44-digit CT-e access key * @param eventKey - The event key * @returns Promise with the event metadata * @throws {ValidationError} If any parameter is invalid * @throws {NotFoundError} If the event is not found * * @example * ```typescript * const event = await nfe.transportationInvoices.getEvent( * 'company-id', * '35240112345678000190570010000001231234567890', * 'event-key-123' * ); * console.log('Event:', event.description); * ``` */ getEvent(companyId: string, accessKey: string, eventKey: string): Promise; /** * Download CT-e event XML * * Gets the XML content of a CT-e event. * * @param companyId - The company ID that received the CT-e * @param accessKey - The 44-digit CT-e access key * @param eventKey - The event key * @returns Promise com o file-resource (`publicTemporaryUri`) * @throws {ValidationError} If any parameter is invalid * @throws {NotFoundError} If the event is not found * * @example * ```typescript * const res = await nfe.transportationInvoices.downloadEventXml( * 'company-id', * '35240112345678000190570010000001231234567890', * 'event-key-123' * ); * const xml = await fetch(res.publicTemporaryUri!).then((r) => r.text()); * ``` * * A resposta e um objeto com `publicTemporaryUri` — URL pre-assinada e temporaria. * Binario NAO trafega nesta rota e o `Accept` nao altera a resposta; baixar a URL * fica a cargo do chamador. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/inbound-download.json). */ downloadEventXml(companyId: string, accessKey: string, eventKey: string): Promise; } //#endregion //#region src/core/resources/inbound-product-invoices.d.ts /** * Inbound Product Invoices (NF-e Distribution) API Resource * * @description * Provides operations for querying NF-e (Nota Fiscal Eletrônica) documents * received by a company via the SEFAZ Distribuição DFe service. * * **Capabilities:** * - Enable/disable automatic NF-e distribution fetch * - Retrieve inbound NF-e metadata by access key * - Download NF-e documents in XML, PDF, and JSON formats * - Send recipient manifest (Manifestação do Destinatário) * - Reprocess webhooks * * **Prerequisites:** * - Company must be registered with a valid A1 digital certificate * - Webhook must be configured to receive NF-e notifications * * **Note:** This resource uses a different API host (api.nfse.io) and may require * a separate API key configured via `dataApiKey` in the client configuration. * If not set, it falls back to `apiKey`. * * @example Enable automatic NF-e search * ```typescript * const settings = await nfe.inboundProductInvoices.enableAutoFetch('company-id', { * startFromNsu: '999999', * environmentSEFAZ: 'Production', * webhookVersion: '2' * }); * ``` * * @example Retrieve NF-e details * ```typescript * const details = await nfe.inboundProductInvoices.getProductInvoiceDetails( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * console.log(details.nameSender, details.totalInvoiceAmount); * ``` * * @example Download NF-e XML * ```typescript * const xml = await nfe.inboundProductInvoices.getXml( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * ``` */ declare class InboundProductInvoicesResource { private readonly http; constructor(http: HttpClient); /** * Enable automatic NF-e distribution fetch for a company * * Activates the automatic search for NF-e documents destined to the specified * company via SEFAZ Distribuição DFe. Once enabled, new NF-e documents will be * automatically retrieved and sent to the configured webhook endpoint. * * @param companyId - The company ID to enable automatic search for * @param options - Configuration options for the automatic search * @returns Promise with the inbound settings after enabling * @throws {ValidationError} If company ID is empty * @throws {BadRequestError} If the request is invalid * @throws {NotFoundError} If the company is not found * * @example * ```typescript * const settings = await nfe.inboundProductInvoices.enableAutoFetch('company-id', { * startFromNsu: '999999', * startFromDate: '2024-01-01T00:00:00Z', * environmentSEFAZ: 'Production', * automaticManifesting: { minutesToWaitAwarenessOperation: '30' }, * webhookVersion: '2' * }); * console.log('Status:', settings.status); * ``` */ enableAutoFetch(companyId: string, options: EnableInboundOptions): Promise; /** * Disable automatic NF-e distribution fetch for a company * * Deactivates the automatic search for NF-e documents. After disabling, * no new NF-e documents will be retrieved for the company. * * @param companyId - The company ID to disable automatic search for * @returns Promise with the inbound settings after disabling * @throws {ValidationError} If company ID is empty * @throws {NotFoundError} If automatic search is not enabled for this company * * @example * ```typescript * const settings = await nfe.inboundProductInvoices.disableAutoFetch('company-id'); * console.log('Disabled. Status:', settings.status); * ``` */ disableAutoFetch(companyId: string): Promise; /** * Get current automatic NF-e distribution fetch settings * * Retrieves the current configuration for automatic NF-e search, * including status, start NSU, start date, and timestamps. * * @param companyId - The company ID to get settings for * @returns Promise with the current inbound settings * @throws {ValidationError} If company ID is empty * @throws {NotFoundError} If automatic search is not configured for this company * * @example * ```typescript * const settings = await nfe.inboundProductInvoices.getSettings('company-id'); * console.log('Status:', settings.status); * console.log('Start NSU:', settings.startFromNsu); * console.log('Webhook version:', settings.webhookVersion); * ``` */ getSettings(companyId: string): Promise; /** * Get details of an inbound NF-e/CT-e by access key (webhook v1 format) * * Retrieves the metadata of an inbound document using its 44-digit access key. * This is the generic endpoint that works for both NF-e and CT-e documents. * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key * @returns Promise with the inbound invoice metadata * @throws {ValidationError} If company ID or access key is invalid * @throws {NotFoundError} If the document is not found * * @example * ```typescript * const doc = await nfe.inboundProductInvoices.getDetails( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * console.log('Sender:', doc.nameSender); * console.log('Amount:', doc.totalInvoiceAmount); * console.log('NSU:', doc.nsu); * ``` */ getDetails(companyId: string, accessKey: string): Promise; /** * Get details of an inbound NF-e by access key (webhook v2 format) * * Retrieves the metadata of an NF-e document using its 44-digit access key. * This endpoint returns additional `productInvoices` array compared to the v1 format. * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key * @returns Promise with the inbound product invoice metadata (includes productInvoices array) * @throws {ValidationError} If company ID or access key is invalid * @throws {NotFoundError} If the document is not found * * @example * ```typescript * const doc = await nfe.inboundProductInvoices.getProductInvoiceDetails( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * console.log('Sender:', doc.nameSender); * console.log('Product invoices:', doc.productInvoices.length); * ``` */ getProductInvoiceDetails(companyId: string, accessKey: string): Promise; /** * Get details of an event related to an inbound NF-e/CT-e (generic endpoint) * * Retrieves the metadata of an event associated with an inbound document. * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key of the parent document * @param eventKey - The event key * @returns Promise with the event metadata * @throws {ValidationError} If any parameter is invalid * @throws {NotFoundError} If the event is not found * * @example * ```typescript * const event = await nfe.inboundProductInvoices.getEventDetails( * 'company-id', * '35240112345678000190550010000001231234567890', * 'event-key-123' * ); * console.log('Event:', event.description); * ``` */ getEventDetails(companyId: string, accessKey: string, eventKey: string): Promise; /** * Get details of an event related to an inbound NF-e (product invoice endpoint) * * Retrieves the metadata of an event associated with an inbound NF-e document. * Returns the webhook v2 format with `productInvoices` array. * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key of the parent document * @param eventKey - The event key * @returns Promise with the product invoice event metadata * @throws {ValidationError} If any parameter is invalid * @throws {NotFoundError} If the event is not found * * @example * ```typescript * const event = await nfe.inboundProductInvoices.getProductInvoiceEventDetails( * 'company-id', * '35240112345678000190550010000001231234567890', * 'event-key-123' * ); * console.log('Event:', event.description); * console.log('Product invoices:', event.productInvoices.length); * ``` */ getProductInvoiceEventDetails(companyId: string, accessKey: string, eventKey: string): Promise; /** * Download XML of an inbound NF-e/CT-e by access key * * Gets the XML content of an inbound document. * * A resposta e um objeto com `publicTemporaryUri` — URL pre-assinada e temporaria. * Binario NAO trafega nesta rota e o `Accept` nao altera a resposta; baixar a URL * fica a cargo do chamador. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/inbound-download.json). * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key * @returns Promise com o file-resource (`publicTemporaryUri`) * @throws {ValidationError} If company ID or access key is invalid * @throws {NotFoundError} If the document is not found * * @example * ```typescript * const res = await nfe.inboundProductInvoices.getXml(companyId, accessKey); * const doc = await fetch(res.publicTemporaryUri!).then((r) => r.text()); * ``` */ getXml(companyId: string, accessKey: string): Promise; /** * Download XML of an event related to an inbound NF-e/CT-e * * Gets the XML content of an event associated with an inbound document. * * A resposta e um objeto com `publicTemporaryUri` — URL pre-assinada e temporaria. * Binario NAO trafega nesta rota e o `Accept` nao altera a resposta; baixar a URL * fica a cargo do chamador. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/inbound-download.json). * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key of the parent document * @param eventKey - The event key * @returns Promise with the event XML content as a string * @throws {ValidationError} If any parameter is invalid * @throws {NotFoundError} If the event is not found * * @example * ```typescript * const res = await nfe.inboundProductInvoices.getEventXml(companyId, accessKey, eventKey); * const doc = await fetch(res.publicTemporaryUri!).then((r) => r.text()); * ``` */ getEventXml(companyId: string, accessKey: string, eventKey: string): Promise; /** * Download PDF of an inbound NF-e by access key * * Gets the PDF content of an NF-e document. * * A resposta e um objeto com `publicTemporaryUri` — URL pre-assinada e temporaria. * Binario NAO trafega nesta rota e o `Accept` nao altera a resposta; baixar a URL * fica a cargo do chamador. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/inbound-download.json). * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key * @returns Promise com o file-resource (`publicTemporaryUri`) * @throws {ValidationError} If company ID or access key is invalid * @throws {NotFoundError} If the document is not found * * @example * ```typescript * const res = await nfe.inboundProductInvoices.getPdf(companyId, accessKey); * const bytes = await fetch(res.publicTemporaryUri!).then((r) => r.arrayBuffer()); * ``` */ getPdf(companyId: string, accessKey: string): Promise; /** * Get JSON representation of an inbound NF-e by access key * * Gets the structured JSON data of an NF-e document. * * @param companyId - The company ID that received the document * @param accessKey - The 44-digit access key * @returns Promise with the NF-e metadata in JSON format * @throws {ValidationError} If company ID or access key is invalid * @throws {NotFoundError} If the document is not found * * @example * ```typescript * const data = await nfe.inboundProductInvoices.getJson( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * console.log('Sender:', data.nameSender); * console.log('Amount:', data.totalInvoiceAmount); * ``` */ getJson(companyId: string, accessKey: string): Promise; /** * Send recipient manifest (Manifestação do Destinatário) for an NF-e * * Sends a manifest event for an NF-e document identified by its access key. * Defaults to "Ciência da Operação" (210210) if no event type is specified. * * **Event types:** * - `210210` — Ciência da Operação (awareness, default) * - `210220` — Confirmação da Operação (confirmation) * - `210240` — Operação não Realizada (operation not performed) * * @param companyId - The company ID * @param accessKey - The 44-digit access key of the NF-e * @param tpEvent - Manifest event type (defaults to 210210) * @returns Promise with the manifest response * @throws {ValidationError} If company ID or access key is invalid * * @example Default manifest (Ciência da Operação) * ```typescript * const result = await nfe.inboundProductInvoices.manifest( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * ``` * * @example Confirm operation * ```typescript * const result = await nfe.inboundProductInvoices.manifest( * 'company-id', * '35240112345678000190550010000001231234567890', * 210220 * ); * ``` */ manifest(companyId: string, accessKey: string, tpEvent?: ManifestEventType): Promise; /** * Reprocess webhook for an inbound NF-e by access key or NSU * * Triggers reprocessing of the webhook notification for a specific document, * identified either by its 44-digit access key or by its NSU number. * * @param companyId - The company ID * @param accessKeyOrNsu - The 44-digit access key or NSU number * @returns Promise with the product invoice metadata * @throws {ValidationError} If company ID or identifier is empty * @throws {NotFoundError} If the document is not found * * @example Reprocess by access key * ```typescript * const result = await nfe.inboundProductInvoices.reprocessWebhook( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * ``` * * @example Reprocess by NSU * ```typescript * const result = await nfe.inboundProductInvoices.reprocessWebhook( * 'company-id', * '12345' * ); * ``` */ reprocessWebhook(companyId: string, accessKeyOrNsu: string): Promise; } //#endregion //#region src/core/resources/product-invoice-query.d.ts /** * Product Invoice Query Resource * * @description * Queries NF-e (Nota Fiscal Eletrônica) product invoices on SEFAZ by access key. * This is a read-only resource that does not require company scope. * * **Capabilities:** * - Retrieve full invoice details (issuer, buyer, items, totals, transport, payment) * - Download DANFE PDF * - Download NF-e XML * - List fiscal events (cancellations, corrections, manifestations) * * **Authentication:** Uses data API key (`dataApiKey` or `apiKey` fallback). * * @example * ```typescript * const details = await nfe.productInvoiceQuery.retrieve( * '35240112345678000190550010000001231234567890' * ); * console.log(details.issuer?.name, details.totals?.icms?.invoiceAmount); * ``` */ declare class ProductInvoiceQueryResource { private readonly http; constructor(http: HttpClient); /** * Retrieve full product invoice (NF-e) details from SEFAZ by access key * * @param accessKey - 44-digit numeric access key (Chave de Acesso) * @returns Full invoice details including issuer, buyer, items, totals, transport, and payment * @throws {ValidationError} If access key format is invalid * @throws {NotFoundError} If no invoice matches the access key (HTTP 404) * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const invoice = await nfe.productInvoiceQuery.retrieve( * '35240112345678000190550010000001231234567890' * ); * console.log(invoice.currentStatus); // 'authorized' * console.log(invoice.issuer?.name); * console.log(invoice.totals?.icms?.invoiceAmount); * ``` */ retrieve(accessKey: string): Promise; /** * Download the DANFE PDF for a product invoice by access key * * @param accessKey - 44-digit numeric access key (Chave de Acesso) * @returns Buffer containing the PDF binary content * @throws {ValidationError} If access key format is invalid * @throws {NotFoundError} If no invoice matches the access key (HTTP 404) * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const pdfBuffer = await nfe.productInvoiceQuery.downloadPdf( * '35240112345678000190550010000001231234567890' * ); * fs.writeFileSync('danfe.pdf', pdfBuffer); * ``` */ downloadPdf(accessKey: string): Promise; /** * Download the raw NF-e XML for a product invoice by access key * * @param accessKey - 44-digit numeric access key (Chave de Acesso) * @returns Buffer containing the XML binary content * @throws {ValidationError} If access key format is invalid * @throws {NotFoundError} If no invoice matches the access key (HTTP 404) * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const xmlBuffer = await nfe.productInvoiceQuery.downloadXml( * '35240112345678000190550010000001231234567890' * ); * fs.writeFileSync('nfe.xml', xmlBuffer); * ``` */ downloadXml(accessKey: string): Promise; /** * List fiscal events for a product invoice by access key * * Events include cancellations, corrections, manifestations, etc. * * @param accessKey - 44-digit numeric access key (Chave de Acesso) * @returns Events response with an array of fiscal events and query timestamp * @throws {ValidationError} If access key format is invalid * @throws {NotFoundError} If no invoice matches the access key (HTTP 404) * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const result = await nfe.productInvoiceQuery.listEvents( * '35240112345678000190550010000001231234567890' * ); * for (const event of result.events ?? []) { * console.log(event.description, event.authorizedOn); * } * ``` */ listEvents(accessKey: string): Promise; } //#endregion //#region src/core/resources/consumer-invoice-query.d.ts /** * Consumer Invoice Query Resource * * @deprecated **A plataforma não serve nenhuma das duas rotas deste recurso.** * Elas estão declaradas na spec `consulta-nf-consumidor` e no `nfeio-docs`, em * `nfe.api.nfe.io` — e respondem `404` de corpo vazio, sem `content-type`, * idêntico ao de um path inventado no mesmo host. Confirmação independente: o * `404` vem **inclusive sem credencial**, enquanto uma rota servida no mesmo host * responde `401` sem credencial — o middleware de autenticação nem chega a rodar. * Noventa dias de log de gateway não têm um único `200`. Medido em 2026-09-02. * * Os métodos continuam emitindo a requisição: se a rota subir, o resultado passa * sem alteração. * * @description * Queries CFe-SAT (Cupom Fiscal Eletrônico) consumer invoices by access key. * This is a read-only resource that does not require company scope. * * **Capabilities:** * - Retrieve full coupon details (issuer, buyer, items, totals, payment) * - Download original CFe XML * * **Authentication:** Uses data API key (`dataApiKey` or `apiKey` fallback). * * @example * ```typescript * const coupon = await nfe.consumerInvoiceQuery.retrieve( * '35240112345678000190590000000012341234567890' * ); * console.log(coupon.issuer?.name, coupon.totals?.couponAmount); * ``` */ declare class ConsumerInvoiceQueryResource { private readonly http; constructor(http: HttpClient); /** * Retrieve full CFe-SAT coupon details from SEFAZ by access key * * @param accessKey - 44-digit numeric access key (Chave de Acesso) * @returns Full coupon details including issuer, buyer, items, totals, and payment * @throws {ValidationError} If access key format is invalid * @throws {NotFoundError} If no coupon matches the access key (HTTP 404) * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const coupon = await nfe.consumerInvoiceQuery.retrieve( * '35240112345678000190590000000012341234567890' * ); * console.log(coupon.currentStatus); // 'Authorized' * console.log(coupon.issuer?.name); * console.log(coupon.totals?.couponAmount); * ``` */ retrieve(accessKey: string): Promise; /** * Download the raw CFe XML for a consumer invoice by access key * * @param accessKey - 44-digit numeric access key (Chave de Acesso) * @returns Buffer containing the XML binary content * @throws {ValidationError} If access key format is invalid * @throws {NotFoundError} If no coupon matches the access key (HTTP 404) * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const xmlBuffer = await nfe.consumerInvoiceQuery.downloadXml( * '35240112345678000190590000000012341234567890' * ); * fs.writeFileSync('cfe.xml', xmlBuffer); * ``` */ downloadXml(accessKey: string): Promise; } //#endregion //#region src/core/resources/legal-entity-lookup.d.ts /** Base URL for Legal Entity API */ declare const LEGAL_ENTITY_API_BASE_URL = "https://legalentity.api.nfe.io"; /** * Legal Entity Lookup API Resource * * @description * Provides read-only operations for querying Brazilian company (CNPJ) data * from the NFE.io Legal Entity API. Data is sourced from Receita Federal, * SEFAZ state registries, and NFE.io enrichment services. * * **Note:** This resource uses a different API host (legalentity.api.nfe.io) * and may require a separate API key configured via `dataApiKey` in the client configuration. * * @example Basic CNPJ lookup * ```typescript * const result = await nfe.legalEntityLookup.getBasicInfo('12.345.678/0001-90'); * console.log(result.legalEntity?.name); // 'EMPRESA LTDA' * console.log(result.legalEntity?.status); // 'Active' * console.log(result.legalEntity?.address?.city?.name); // 'São Paulo' * ``` * * @example State tax registration lookup * ```typescript * const result = await nfe.legalEntityLookup.getStateTaxInfo('SP', '12345678000190'); * for (const tax of result.legalEntity?.stateTaxes ?? []) { * console.log(`IE: ${tax.taxNumber} - Status: ${tax.status}`); * } * ``` * * @example Best IE for invoice issuance * ```typescript * const result = await nfe.legalEntityLookup.getSuggestedStateTaxForInvoice('SP', '12345678000190'); * const bestIE = result.legalEntity?.stateTaxes?.[0]; * console.log(`Best IE: ${bestIE?.taxNumber} (${bestIE?.status})`); * ``` */ declare class LegalEntityLookupResource { private readonly http; constructor(http: HttpClient); /** * Lookup basic company information by CNPJ * * @description * Queries the Receita Federal registry for company registration data including * legal name, trade name, address, phone numbers, economic activities (CNAE), * legal nature, partners, registration status, and share capital. * * @param federalTaxNumber - CNPJ number, with or without punctuation (e.g., "12345678000190" or "12.345.678/0001-90") * @param options - Optional lookup configuration * @returns Promise with company basic information * @throws {ValidationError} If CNPJ format is invalid (not 14 digits) * @throws {NotFoundError} If no company found for the given CNPJ * @throws {AuthenticationError} If API key is invalid or missing * * @example * ```typescript * // Simple lookup * const result = await nfe.legalEntityLookup.getBasicInfo('12345678000190'); * console.log(result.legalEntity?.name); * * // With formatted CNPJ * const result = await nfe.legalEntityLookup.getBasicInfo('12.345.678/0001-90'); * * // Disable address update from postal service * const result = await nfe.legalEntityLookup.getBasicInfo('12345678000190', { * updateAddress: false, * updateCityCode: true * }); * ``` */ getBasicInfo(federalTaxNumber: string, options?: LegalEntityBasicInfoOptions): Promise; /** * Lookup state tax registration (Inscrição Estadual) by CNPJ and state * * @description * Queries state tax registration data for a given CNPJ in a specific Brazilian state. * Returns registration details including status, tax regime, economic activities, * and fiscal document indicators (NFe, NFSe, CTe, NFCe). * * @param state - Brazilian state abbreviation (e.g., "SP", "RJ", "MG") * @param federalTaxNumber - CNPJ number, with or without punctuation * @returns Promise with state tax registration information * @throws {ValidationError} If state code or CNPJ format is invalid * @throws {AuthenticationError} If API key is invalid or missing * * @example * ```typescript * const result = await nfe.legalEntityLookup.getStateTaxInfo('SP', '12345678000190'); * console.log(result.legalEntity?.taxRegime); // 'SimplesNacional' * * for (const tax of result.legalEntity?.stateTaxes ?? []) { * console.log(`IE: ${tax.taxNumber} - Status: ${tax.status}`); * console.log(` NFe: ${tax.nfe?.status}, NFSe: ${tax.nfse?.status}`); * } * ``` */ getStateTaxInfo(state: string, federalTaxNumber: string): Promise; /** * Lookup state tax registration for invoice issuance evaluation * * @description * Queries state tax registration data specifically for evaluating the ability * to issue product invoices (NF-e) in a given state. Returns extended status * information including temporary and unconfirmed states. * * @param state - Brazilian state abbreviation (e.g., "SP", "RJ", "MG") * @param federalTaxNumber - CNPJ number, with or without punctuation * @returns Promise with state tax data for invoice evaluation * @throws {ValidationError} If state code or CNPJ format is invalid * @throws {AuthenticationError} If API key is invalid or missing * * @example * ```typescript * const result = await nfe.legalEntityLookup.getStateTaxForInvoice('MG', '12345678000190'); * for (const tax of result.legalEntity?.stateTaxes ?? []) { * if (tax.status === 'Abled') { * console.log(`Can issue invoices with IE: ${tax.taxNumber}`); * } * } * ``` */ getStateTaxForInvoice(state: string, federalTaxNumber: string): Promise; /** * Lookup the best state tax registration for invoice issuance * * @description * Queries the optimal state tax registration for issuing invoices when multiple * registrations are enabled in a state. NFE.io applies evaluation criteria to * suggest the best IE for invoice issuance. * * Returns the same response type as `getStateTaxForInvoice` but the API * prioritizes the best enabled state tax registration. * * @param state - Brazilian state abbreviation (e.g., "SP", "RJ", "MG") * @param federalTaxNumber - CNPJ number, with or without punctuation * @returns Promise with suggested state tax data for invoice evaluation * @throws {ValidationError} If state code or CNPJ format is invalid * @throws {AuthenticationError} If API key is invalid or missing * * @example * ```typescript * const result = await nfe.legalEntityLookup.getSuggestedStateTaxForInvoice('SP', '12345678000190'); * const bestIE = result.legalEntity?.stateTaxes?.[0]; * if (bestIE) { * console.log(`Recommended IE: ${bestIE.taxNumber} (${bestIE.status})`); * } * ``` */ getSuggestedStateTaxForInvoice(state: string, federalTaxNumber: string): Promise; } //#endregion //#region src/core/resources/natural-person-lookup.d.ts /** Base URL for Natural Person API */ declare const NATURAL_PERSON_API_BASE_URL = "https://naturalperson.api.nfe.io"; /** * Natural Person Lookup API Resource * * @description * Provides a read-only operation for querying CPF cadastral status (situação cadastral) * at the Brazilian Federal Revenue Service (Receita Federal) via the NFE.io Natural Person API. * * **Note:** This resource uses a different API host (naturalperson.api.nfe.io) * and may require a separate API key configured via `dataApiKey` in the client configuration. * * @example CPF cadastral status lookup * ```typescript * const result = await nfe.naturalPersonLookup.getStatus('123.456.789-01', '1990-01-15'); * console.log(result.name); // 'JOÃO DA SILVA' * console.log(result.status); // 'Regular' * ``` * * @example Using a Date object for birth date * ```typescript * const result = await nfe.naturalPersonLookup.getStatus('12345678901', new Date(1990, 0, 15)); * console.log(result.status); // 'Regular' * ``` */ declare class NaturalPersonLookupResource { private readonly http; constructor(http: HttpClient); /** * Lookup CPF cadastral status at Receita Federal * * @description * Queries the cadastral status of a CPF (pessoa física) at the Brazilian Federal * Revenue Service. Returns the person's name, CPF, birth date, cadastral status * (Regular, Suspensa, Cancelada, etc.), and query timestamp. * * @param federalTaxNumber - CPF number, with or without punctuation (e.g., "12345678901" or "123.456.789-01") * @param birthDate - Date of birth as string in YYYY-MM-DD format (e.g., "1990-01-15") or a Date object * @returns Promise with the CPF cadastral status response * @throws {ValidationError} If CPF format is invalid (not 11 digits) or birth date format is invalid * @throws {NotFoundError} If CPF is not found or birth date does not match (404) * @throws {AuthenticationError} If API key is invalid or missing (401) * * @example * ```typescript * // Simple lookup with string date * const result = await nfe.naturalPersonLookup.getStatus('12345678901', '1990-01-15'); * console.log(result.name); // 'JOÃO DA SILVA' * console.log(result.status); // 'Regular' * * // With formatted CPF * const result = await nfe.naturalPersonLookup.getStatus('123.456.789-01', '1990-01-15'); * * // Using a Date object * const result = await nfe.naturalPersonLookup.getStatus('12345678901', new Date(1990, 0, 15)); * ``` */ getStatus(federalTaxNumber: string, birthDate: string | Date): Promise; } //#endregion //#region src/core/resources/tax-calculation.d.ts /** * Tax Calculation Resource * * @description * Provides access to the NFE.io Tax Calculation Engine (Motor de Cálculo de * Tributos). The engine computes all applicable Brazilian taxes for product * operations, returning per-item tax breakdowns including CFOP determination. * * **Supported taxes:** * - ICMS (including ICMS-ST and FCP) * - ICMS interestadual (DIFAL / UF destination) * - PIS * - COFINS * - IPI * - II (Import Tax) * * **Authentication:** Uses data API key (`dataApiKey` or `apiKey` fallback) * via the CTE HTTP client (`api.nfse.io`). * * @example * ```typescript * const result = await nfe.taxCalculation.calculate('my-tenant-id', { * operationType: 'Outgoing', * issuer: { state: 'SP', taxRegime: 'RealProfit' }, * recipient: { state: 'RJ' }, * items: [{ * id: '1', * operationCode: 121, * origin: 'National', * quantity: 10, * unitAmount: 100.00, * ncm: '61091000' * }] * }); * * for (const item of result.items ?? []) { * console.log(`Item ${item.id}: CFOP ${item.cfop}`); * console.log(` ICMS CST: ${item.icms?.cst}, value: ${item.icms?.vICMS}`); * console.log(` PIS CST: ${item.pis?.cst}, value: ${item.pis?.vPIS}`); * } * ``` */ declare class TaxCalculationResource { private readonly http; constructor(http: HttpClient); /** * Calculate taxes for a product operation * * @description * Submits an operation with issuer, recipient, operation type, and product items * to the Tax Calculation Engine. Returns per-item tax breakdowns including all * applicable Brazilian taxes (ICMS, PIS, COFINS, IPI, II) with CFOP determination. * * The `tenantId` is the subscription/account identifier that scopes the tax rules. * * @param tenantId - Subscription/account ID (required, non-empty) * @param request - Tax calculation request with issuer, recipient, operation type, and items * @returns Tax calculation response with per-item breakdowns * @throws {ValidationError} If tenantId is empty * @throws {ValidationError} If required request fields are missing (issuer, recipient, operationType, items) * @throws {AuthenticationError} If API key is invalid (HTTP 401) * @throws {BadRequestError} If the API rejects the payload (HTTP 400) * @throws {ValidationError} If the API returns unprocessable content (HTTP 422) * * @example Basic calculation * ```typescript * const result = await nfe.taxCalculation.calculate('tenant-123', { * operationType: 'Outgoing', * issuer: { state: 'SP', taxRegime: 'RealProfit' }, * recipient: { state: 'RJ' }, * items: [{ * id: 'item-1', * operationCode: 121, * origin: 'National', * quantity: 1, * unitAmount: 500.00, * ncm: '61091000' * }] * }); * console.log(result.items?.[0]?.cfop); // e.g., 6102 * ``` * * @example With per-item tax profiles * ```typescript * const result = await nfe.taxCalculation.calculate('tenant-123', { * operationType: 'Incoming', * issuer: { state: 'MG', taxRegime: 'NationalSimple' }, * recipient: { state: 'SP', taxRegime: 'RealProfit' }, * items: [{ * id: 'item-1', * operationCode: 569, * acquisitionPurpose: '569', * origin: 'National', * quantity: 100, * unitAmount: 25.50, * ncm: '39174090', * issuerTaxProfile: 'industry', * recipientTaxProfile: 'industry' * }] * }); * ``` */ calculate(tenantId: string, request: CalculateRequest): Promise; } /** * Create a new TaxCalculationResource instance */ declare function createTaxCalculationResource(http: HttpClient): TaxCalculationResource; //#endregion //#region src/core/resources/tax-codes.d.ts /** * Tax Codes Resource * * @description * Provides paginated listings of the four auxiliary reference tables used as * inputs for the Tax Calculation Engine: * * - **Operation Codes** — natureza de operação (e.g., 121 = "Venda de mercadoria") * - **Acquisition Purposes** — finalidade de aquisição (e.g., 569 = "Compra para comercialização") * - **Issuer Tax Profiles** — perfil fiscal do emissor (e.g., "retail", "industry") * - **Recipient Tax Profiles** — perfil fiscal do destinatário (e.g., "final_consumer_non_icms_contributor") * * All methods support pagination via `pageIndex` (1-based) and `pageCount` parameters. * * **Authentication:** Uses data API key (`dataApiKey` or `apiKey` fallback) * via the CTE HTTP client (`api.nfse.io`). * * @example * ```typescript * // List operation codes (first page) * const codes = await nfe.taxCodes.listOperationCodes(); * for (const code of codes.items ?? []) { * console.log(`${code.code} - ${code.description}`); * } * * // With pagination * const page2 = await nfe.taxCodes.listOperationCodes({ pageIndex: 2, pageCount: 20 }); * console.log(`Page ${page2.currentPage} of ${page2.totalPages}`); * ``` */ declare class TaxCodesResource { private readonly http; constructor(http: HttpClient); /** * List operation codes (natureza de operação) * * @description * Returns a paginated list of operation codes used in the `operationCode` field * of tax calculation item requests. Each code represents a specific operation * nature (e.g., sale, return, transfer). * * @param options - Optional pagination parameters * @returns Paginated list of operation codes * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const result = await nfe.taxCodes.listOperationCodes(); * console.log(`Total: ${result.totalCount} codes`); * for (const code of result.items ?? []) { * console.log(`${code.code} - ${code.description}`); * } * ``` * * @example With pagination * ```typescript * const page = await nfe.taxCodes.listOperationCodes({ pageIndex: 2, pageCount: 10 }); * console.log(`Page ${page.currentPage} of ${page.totalPages}`); * ``` */ listOperationCodes(options?: TaxCodeListOptions): Promise; /** * List acquisition purposes (finalidade de aquisição) * * @description * Returns a paginated list of acquisition purpose codes used in the * `acquisitionPurpose` field of tax calculation item requests. * * @param options - Optional pagination parameters * @returns Paginated list of acquisition purposes * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const result = await nfe.taxCodes.listAcquisitionPurposes(); * for (const purpose of result.items ?? []) { * console.log(`${purpose.code} - ${purpose.description}`); * } * ``` */ listAcquisitionPurposes(options?: TaxCodeListOptions): Promise; /** * List issuer tax profiles (perfil fiscal do emissor) * * @description * Returns a paginated list of issuer tax profile codes used in the * `issuerTaxProfile` field of tax calculation item requests or the * `taxProfile` field of the issuer. * * @param options - Optional pagination parameters * @returns Paginated list of issuer tax profiles * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const result = await nfe.taxCodes.listIssuerTaxProfiles(); * for (const profile of result.items ?? []) { * console.log(`${profile.code} - ${profile.description}`); * } * ``` */ listIssuerTaxProfiles(options?: TaxCodeListOptions): Promise; /** * List recipient tax profiles (perfil fiscal do destinatário) * * @description * Returns a paginated list of recipient tax profile codes used in the * `recipientTaxProfile` field of tax calculation item requests or the * `taxProfile` field of the recipient. * * @param options - Optional pagination parameters * @returns Paginated list of recipient tax profiles * @throws {AuthenticationError} If API key is invalid (HTTP 401) * * @example * ```typescript * const result = await nfe.taxCodes.listRecipientTaxProfiles(); * for (const profile of result.items ?? []) { * console.log(`${profile.code} - ${profile.description}`); * } * ``` */ listRecipientTaxProfiles(options?: TaxCodeListOptions): Promise; } /** * Create a new TaxCodesResource instance */ declare function createTaxCodesResource(http: HttpClient): TaxCodesResource; //#endregion //#region src/core/resources/product-invoices.d.ts /** * Product Invoices (NF-e) API Resource * * @description * Provides full lifecycle management for NF-e (Nota Fiscal Eletronica de Produto) * product invoices -- issue, list, retrieve, cancel, send correction letters (CC-e), * disable invoice numbers, and download files (PDF/XML). * * All operations are scoped by company and use the api.nfse.io v2 API. * * **Important:** Issue, cancel, correction letter, and disablement operations are * asynchronous -- they return 202/204 indicating the request was enqueued. * Completion is notified via webhooks. * * **Prerequisites:** * - Company must be registered with a valid A1 digital certificate * - State tax registration (Inscricao Estadual) must be configured * * @example Issue a product invoice * \`\`\`typescript * const result = await nfe.productInvoices.create('company-id', { * operationNature: 'Venda de mercadoria', * operationType: 'Outgoing', * buyer: { name: 'Empresa LTDA', federalTaxNumber: 12345678000190 }, * items: [{ code: 'PROD-001', description: 'Produto X', quantity: 1, unitAmount: 100 }], * payment: [{ paymentDetail: [{ method: 'Cash', amount: 100 }] }], * }); * \`\`\` */ declare class ProductInvoicesResource { private readonly http; constructor(http: HttpClient); private basePath; /** * Issue a product invoice (NF-e) by posting it to the processing queue. * * Processing is asynchronous -- a 202 response indicates the invoice was enqueued. * Monitor completion via webhooks. * * @param companyId - The company ID * @param data - Invoice issue data (buyer, items, payment, operationNature, etc.) * @returns The enqueued invoice data * @throws {ValidationError} If companyId is empty * @throws {BadRequestError} If invoice data is invalid */ create(companyId: string, data: NfeProductInvoiceIssueData): Promise; /** * Issue a product invoice (NF-e) specifying a particular state tax registration. * * Processing is asynchronous -- a 202 response indicates the invoice was enqueued. * * @param companyId - The company ID * @param stateTaxId - The state tax registration ID (Inscricao Estadual) * @param data - Invoice issue data * @returns The enqueued invoice data * @throws {ValidationError} If companyId or stateTaxId is empty */ createWithStateTax(companyId: string, stateTaxId: string, data: NfeProductInvoiceIssueData): Promise; /** * List product invoices (NF-e) for a company with cursor-based pagination. * * The environment option is required. * * @param companyId - The company ID * @param options - List options (environment required, pagination, ElasticSearch query) * @returns Paginated list of invoices * @throws {ValidationError} If companyId is empty or environment is missing */ list(companyId: string, options: NfeProductInvoiceListOptions): Promise; /** * Retrieve a single product invoice (NF-e) by ID. * * Returns full invoice details including authorization, buyer, totals, * transport, billing, payment, and last events. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @returns Full invoice details * @throws {ValidationError} If companyId or invoiceId is empty * @throws {NotFoundError} If invoice does not exist */ retrieve(companyId: string, invoiceId: string): Promise; /** * Cancel a product invoice (NF-e) by enqueuing it for cancellation. * * Processing is asynchronous -- a 204 response indicates the request was enqueued. * * @param companyId - The company ID * @param invoiceId - The invoice ID to cancel * @param reason - Optional reason for cancellation * @returns Cancellation request details * @throws {ValidationError} If companyId or invoiceId is empty * @throws {NotFoundError} If invoice does not exist */ cancel(companyId: string, invoiceId: string, reason?: string): Promise; /** * List items (products/services) for a specific invoice. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @param options - Optional pagination (limit, startingAfter) * @returns Paginated list of invoice items * @throws {ValidationError} If companyId or invoiceId is empty * @throws {NotFoundError} If invoice does not exist */ listItems(companyId: string, invoiceId: string, options?: NfeProductInvoiceSubListOptions): Promise; /** * List fiscal events for a specific invoice. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @param options - Optional pagination (limit, startingAfter) * @returns Paginated list of invoice events * @throws {ValidationError} If companyId or invoiceId is empty */ listEvents(companyId: string, invoiceId: string, options?: NfeProductInvoiceSubListOptions): Promise; /** * Get the URL for the DANFE PDF file of an invoice. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @param force - If true, forces PDF regeneration regardless of FlowStatus * @returns File resource with URI to the PDF * @throws {ValidationError} If companyId or invoiceId is empty */ downloadPdf(companyId: string, invoiceId: string, force?: boolean): Promise; /** * Get the URL for the authorized NF-e XML file. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @returns File resource with URI to the XML * @throws {ValidationError} If companyId or invoiceId is empty */ downloadXml(companyId: string, invoiceId: string): Promise; /** * Get the URL for the NF-e rejection XML file. * * Uses the /xml-rejection endpoint (canonical form). * * @param companyId - The company ID * @param invoiceId - The invoice ID * @returns File resource with URI to the rejection XML * @throws {ValidationError} If companyId or invoiceId is empty */ downloadRejectionXml(companyId: string, invoiceId: string): Promise; /** * Get the URL for the contingency authorization (EPEC) XML file. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @returns File resource with URI to the EPEC XML * @throws {ValidationError} If companyId or invoiceId is empty */ downloadEpecXml(companyId: string, invoiceId: string): Promise; /** * Send a correction letter (Carta de Correcao - CC-e) for a product invoice. * * Processing is asynchronous. The reason text must contain between 15 and 1,000 * characters without accents or special characters. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @param reason - Correction reason (15-1,000 characters, no accents/special chars) * @returns Cancellation request resource with operation details * @throws {ValidationError} If reason is too short or too long */ sendCorrectionLetter(companyId: string, invoiceId: string, reason: string): Promise; /** * Get the URL for the CC-e DANFE PDF file. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @returns File resource with URI to the correction letter PDF * @throws {ValidationError} If companyId or invoiceId is empty */ downloadCorrectionLetterPdf(companyId: string, invoiceId: string): Promise; /** * Get the URL for the CC-e XML file. * * @param companyId - The company ID * @param invoiceId - The invoice ID * @returns File resource with URI to the correction letter XML * @throws {ValidationError} If companyId or invoiceId is empty */ downloadCorrectionLetterXml(companyId: string, invoiceId: string): Promise; /** * Disable (inutilizar) a specific product invoice by ID. * * Processing is asynchronous. The reason parameter is optional. * * @param companyId - The company ID * @param invoiceId - The invoice ID to disable * @param reason - Optional reason for disablement * @returns Cancellation request resource * @throws {ValidationError} If companyId or invoiceId is empty */ disable(companyId: string, invoiceId: string, reason?: string): Promise; /** * Disable a range of invoice numbers for a company. * * If disabling a single number, set beginNumber and lastNumber to the same value. * * @param companyId - The company ID * @param data - Disablement data (environment, serie, state, beginNumber, lastNumber, reason?) * @returns Disablement resource with operation details * @throws {ValidationError} If companyId is empty */ disableRange(companyId: string, data: NfeDisablementData): Promise; } //#endregion //#region src/core/resources/state-taxes.d.ts /** * State Taxes (Inscrições Estaduais) API Resource * * @description * Provides CRUD operations for company state tax registrations. * State taxes define the series, numbering, environment, and state configuration * required for NF-e product invoice issuance. * * All operations are scoped by company and use the `api.nfse.io` v2 API. * * @example List state taxes * ```typescript * const result = await nfe.stateTaxes.list('company-id'); * for (const tax of result.stateTaxes ?? []) { * console.log(tax.code, tax.taxNumber, tax.status); * } * ``` * * @example Create a state tax registration * ```typescript * const tax = await nfe.stateTaxes.create('company-id', { * taxNumber: '123456789', * serie: 1, * number: 1, * code: 'sP', * environmentType: 'production', * type: 'nFe', * }); * console.log(tax.id); * ``` * * @example Update and delete * ```typescript * await nfe.stateTaxes.update('company-id', 'state-tax-id', { serie: 2 }); * await nfe.stateTaxes.delete('company-id', 'state-tax-id'); * ``` */ declare class StateTaxesResource { private readonly http; constructor(http: HttpClient); /** * Returns the base path for state tax operations. */ private basePath; /** * List all state tax registrations (Inscrições Estaduais) for a company. * * Uses cursor-based pagination with `startingAfter`, `endingBefore`, and `limit`. * * @param companyId - The company ID * @param options - Optional pagination options * @returns List of state tax registrations * @throws {ValidationError} If companyId is empty * * @example * ```typescript * const result = await nfe.stateTaxes.list('company-id'); * for (const tax of result.stateTaxes ?? []) { * console.log(tax.id, tax.taxNumber, tax.serie, tax.status); * } * ``` */ list(companyId: string, options?: NfeStateTaxListOptions): Promise; /** * Create a new state tax registration (Inscrição Estadual) for a company. * * @param companyId - The company ID * @param data - State tax data (taxNumber, serie, and number are required) * @returns The created state tax record * @throws {ValidationError} If companyId is empty * @throws {BadRequestError} If required fields are missing * * @example * ```typescript * const tax = await nfe.stateTaxes.create('company-id', { * taxNumber: '123456789', * serie: 1, * number: 1, * code: 'sP', * environmentType: 'production', * }); * ``` */ create(companyId: string, data: NfeStateTaxCreateData): Promise; /** * Retrieve a specific state tax registration by ID. * * @param companyId - The company ID * @param stateTaxId - The state tax ID * @returns The state tax record * @throws {ValidationError} If companyId or stateTaxId is empty * @throws {NotFoundError} If state tax record does not exist * * @example * ```typescript * const tax = await nfe.stateTaxes.retrieve('company-id', 'state-tax-id'); * console.log(tax.taxNumber, tax.environmentType, tax.serie); * ``` */ retrieve(companyId: string, stateTaxId: string): Promise; /** * Update an existing state tax registration. * * @param companyId - The company ID * @param stateTaxId - The state tax ID to update * @param data - Fields to update * @returns The updated state tax record * @throws {ValidationError} If companyId or stateTaxId is empty * @throws {NotFoundError} If state tax record does not exist * * @example * ```typescript * const tax = await nfe.stateTaxes.update('company-id', 'state-tax-id', { * serie: 2, * environmentType: 'test', * }); * ``` */ update(companyId: string, stateTaxId: string, data: NfeStateTaxUpdateData): Promise; /** * Delete a state tax registration. * * @param companyId - The company ID * @param stateTaxId - The state tax ID to delete * @throws {ValidationError} If companyId or stateTaxId is empty * @throws {NotFoundError} If state tax record does not exist * * @example * ```typescript * await nfe.stateTaxes.delete('company-id', 'state-tax-id'); * ``` */ delete(companyId: string, stateTaxId: string): Promise; /** * Switch the NF-e authorizer (SEFAZ environment/authorizer) for a state tax. * * @param companyId - The company ID * @param stateTaxId - The state tax ID * @param data - Optional switch payload (authorizer selection) * @returns The updated state tax record */ switchAuthorizer(companyId: string, stateTaxId: string, data?: Record): Promise; } //#endregion //#region src/core/resources/service-invoices-rtc.d.ts declare class ServiceInvoicesRtcResource { private readonly http; constructor(http: HttpClient); /** No `/v1` prefix — the main client base URL (`https://api.nfe.io/v1`) carries it. */ private basePath; /** * Emit an NFS-e with the RTC layout (`ibsCbs` group). * * Returns a discriminated union: immediate (201) or async (202 + Location). * Use {@link createAndWait} to poll until the invoice reaches a terminal state. */ create(companyId: string, data: NFSeRtcRequest): Promise; /** * Emit an RTC NFS-e and poll until it reaches a terminal flow status. */ createAndWait(companyId: string, data: NFSeRtcRequest, options?: PollingOptions): Promise; /** Retrieve an emitted invoice (used for polling; shares the endpoint with serviceInvoices). */ retrieve(companyId: string, invoiceId: string): Promise; /** * Download the XML of the cancellation event (Ambiente Nacional) for an NFS-e. * * @returns The cancellation-event XML as a Buffer. * @throws {NotFoundError} If the invoice/cancellation XML is not found/not ready. */ downloadCancellationXml(companyId: string, invoiceId: string): Promise; private extractInvoiceIdFromLocation; } //#endregion //#region src/core/resources/product-invoices-rtc.d.ts declare class ProductInvoicesRtcResource { private readonly http; constructor(http: HttpClient); private basePath; /** * Emit an NF-e / NFC-e with the RTC layout (item-level `tax.IBSCBS`). * * Webhook-driven: a 202 indicates the invoice was enqueued; monitor completion * via webhooks. Returns the enqueued invoice data (does NOT poll). */ create(companyId: string, data: ProductInvoiceRtcRequest): Promise; } //#endregion //#region src/core/resources/municipal-taxes.d.ts declare class MunicipalTaxesResource { private readonly http; constructor(http: HttpClient); private basePath; /** List municipal tax registrations for a company. */ list(companyId: string): Promise; /** Create a municipal tax registration (wrapped as `{ municipalTax }`). */ create(companyId: string, data: CreateMunicipalTaxData): Promise; /** Retrieve a municipal tax registration by id. */ retrieve(companyId: string, municipalTaxId: string): Promise; /** Update a municipal tax registration. */ update(companyId: string, municipalTaxId: string, data: UpdateMunicipalTaxData): Promise; /** Delete a municipal tax registration. */ delete(companyId: string, municipalTaxId: string): Promise; /** * Update the prefecture (city hall) credentials/integration for a municipal tax * registration. Uses HTTP PATCH (`.../updateprefecture`). * * @deprecated A plataforma **não serve** esta rota. Ela está declarada na spec * `contribuintes-v2` e responde `404` — o mesmo `404` de corpo vazio que uma * sub-rota inventada no mesmo host devolve (medido em 2026-09-02, com um * `municipal_tax_id` cujo registro pai responde `200`). O método continua * emitindo a requisição: se a rota subir, o resultado passa sem alteração. */ updatePrefecture(companyId: string, municipalTaxId: string, data: UpdateMunicipalTaxData): Promise; /** * Look up an RPS series for a municipal tax registration. * * @deprecated A plataforma **não serve** esta rota — mesma medição de * {@link MunicipalTaxesResource.updatePrefecture}. Testado com toda série * plausível, inclusive a que o próprio registro declara em `rpsSerialNumber`: * `404` de corpo vazio, sem `content-type`, idêntico ao de uma sub-rota * inventada. O método continua emitindo a requisição. */ getSeries(companyId: string, municipalTaxId: string, serie: string): Promise>; } //#endregion //#region src/core/resources/consumer-invoices.d.ts /** The NFC-e API requires which environment's invoices to operate on. */ type ConsumerInvoiceEnvironment = 'Production' | 'Test'; /** Options for {@link ConsumerInvoicesResource.list}. `environment` is required by the API. */ interface ConsumerInvoiceListOptions { /** Required by the API (`Production` or `Test`). Omitting it yields HTTP 400. */ environment: ConsumerInvoiceEnvironment; startingAfter?: string; endingBefore?: string; limit?: number; /** Free-text query filter, if supported by the endpoint. */ q?: string; } /** Cursor pagination for the NFC-e sub-collections (items and events). */ interface ConsumerInvoicePageOptions { /** Page size. */ limit?: number; /** Cursor: start after this index. */ startingAfter?: number; } declare class ConsumerInvoicesResource { private readonly http; constructor(http: HttpClient); private basePath; /** * Emit an NFC-e (consumer invoice). * * Webhook-driven: a 202 indicates the invoice was enqueued; completion is * notified via webhooks. Returns the enqueued invoice (does NOT poll). */ create(companyId: string, data: ConsumerInvoiceData): Promise; /** * List NFC-e for a company. The API **requires** `environment` (`Production` or * `Test`); omitting it returns HTTP 400. */ list(companyId: string, options: ConsumerInvoiceListOptions): Promise; /** * Retrieve an NFC-e by id. * * The route takes no query parameters — `environment` is neither required nor * defined by the spec here (verified live 2026-09-01). */ retrieve(companyId: string, invoiceId: string): Promise; /** * Cancel an NFC-e. * * @param reason - Optional cancellation reason, sent as the `reason` query * parameter defined by the spec. */ cancel(companyId: string, invoiceId: string, reason?: string): Promise; /** * List the items of an NFC-e, with cursor pagination (`limit`/`startingAfter`). * The response carries `hasMore`. */ getItems(companyId: string, invoiceId: string, options?: ConsumerInvoicePageOptions): Promise; /** * List the events of an NFC-e, with cursor pagination (`limit`/`startingAfter`). * The response carries `hasMore`. */ getEvents(companyId: string, invoiceId: string, options?: ConsumerInvoicePageOptions): Promise; /** * Get the DANFE-NFC-e PDF link. * * @param force - Force regeneration of the document (spec `force` query param). * * A API devolve `{ uri }` — URL temporaria para o arquivo, nao o binario. O * header `Accept` nao altera a resposta. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/consumer-invoice-download.json). * * Atencao: o envelope difere das rotas de ENTRADA, que usam `publicTemporaryUri`. */ downloadPdf(companyId: string, invoiceId: string, force?: boolean): Promise; /** * Get the NFC-e XML link. * * A API devolve `{ uri }` — URL temporaria para o arquivo, nao o binario. O * header `Accept` nao altera a resposta. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/consumer-invoice-download.json). * * Atencao: o envelope difere das rotas de ENTRADA, que usam `publicTemporaryUri`. */ downloadXml(companyId: string, invoiceId: string): Promise; /** * Get the rejection XML link for a rejected NFC-e. * * A API devolve `{ uri }` — URL temporaria para o arquivo, nao o binario. O * header `Accept` nao altera a resposta. Verificado ao vivo em 2026-09-01 * (tests/fixtures/live-contracts/consumer-invoice-download.json). * * Atencao: o envelope difere das rotas de ENTRADA, que usam `publicTemporaryUri`. */ downloadRejectionXml(companyId: string, invoiceId: string): Promise; /** Disable (inutilizar) a range of NFC-e numbers. */ disable(companyId: string, data: ConsumerInvoiceDisablementData): Promise; } //#endregion //#region src/core/resources/certificates.d.ts declare class CertificatesResource { private readonly http; constructor(http: HttpClient); private v2Base; private v1Base; /** List a company's certificates (`GET /v2/companies/{id}/certificates`). */ list(companyId: string): Promise; /** Retrieve a certificate by thumbprint (`GET /v2/companies/{id}/certificates/{thumbprint}`). */ getByThumbprint(companyId: string, thumbprint: string): Promise; /** Delete a certificate by thumbprint (`DELETE /v2/companies/{id}/certificates/{thumbprint}`). */ deleteByThumbprint(companyId: string, thumbprint: string): Promise; /** Retrieve a certificate by thumbprint via the v1 path (`/v1/companies/{id}/certificate/{thumbprint}`). */ getByThumbprintV1(companyId: string, thumbprint: string): Promise; /** Delete a certificate by thumbprint via the v1 path. */ deleteByThumbprintV1(companyId: string, thumbprint: string): Promise; } //#endregion //#region src/core/resources/notifications.d.ts /** A company notification (minimal, spec has no named schema). */ interface Notification { id?: string; [key: string]: unknown; } /** List response for notifications (best-effort shape). */ interface NotificationListResponse { notifications?: Notification[]; [key: string]: unknown; } declare class NotificationsResource { private readonly http; constructor(http: HttpClient); private basePath; /** List company notifications. */ list(companyId: string): Promise; /** Retrieve a notification by id. */ retrieve(companyId: string, notificationId: string): Promise; /** Delete a notification. */ delete(companyId: string, notificationId: string): Promise; /** Configure / send notification email settings. */ sendEmail(companyId: string, data?: Record): Promise; } //#endregion //#region src/core/client.d.ts /** Base URL for CT-e API (Transportation Invoices) */ declare const CTE_API_BASE_URL = "https://api.nfse.io"; /** * Main NFE.io API Client * * @description * Primary client class for interacting with the NFE.io API. Provides access to all * API resources including service invoices, companies, legal/natural people, and webhooks. * * **Features:** * - Zero runtime dependencies (uses native fetch) * - Automatic retry with exponential backoff * - TypeScript type safety * - Async invoice processing with polling utilities * - Environment detection and validation * * @example Basic Usage * ```typescript * import { NfeClient } from 'nfe-io'; * * const nfe = new NfeClient({ * apiKey: 'your-api-key', * environment: 'production' // or 'sandbox' * }); * * // Create a company * const company = await nfe.companies.create({ * federalTaxNumber: '12345678000190', * name: 'My Company' * }); * * // Issue a service invoice * const invoice = await nfe.serviceInvoices.create(company.id, { * borrower: { /* ... *\/ }, * cityServiceCode: '12345', * servicesAmount: 1000.00 * }); * ``` * * @example With Custom Configuration * ```typescript * const nfe = new NfeClient({ * apiKey: process.env.NFE_API_KEY, * environment: 'production', * timeout: 60000, // 60 seconds * retryConfig: { * maxRetries: 5, * baseDelay: 1000, * maxDelay: 30000 * } * }); * ``` * * @example Async Invoice Processing * ```typescript * // Method 1: Manual polling * const result = await nfe.serviceInvoices.create(companyId, data); * if (result.status === 'pending') { * const invoice = await nfe.pollUntilComplete( * () => nfe.serviceInvoices.retrieve(companyId, result.id) * ); * } * * // Method 2: Automatic polling (recommended) * const invoice = await nfe.serviceInvoices.createAndWait(companyId, data, { * maxAttempts: 30, * interval: 2000 // Check every 2 seconds * }); * ``` * * @see {@link NfeConfig} for configuration options * @see {@link ServiceInvoicesResource} for invoice operations * @see {@link CompaniesResource} for company operations */ declare class NfeClient { /** @internal HTTP client for main API requests (created lazily) */ private _http; /** @internal HTTP client for address API requests (created lazily) */ private _addressHttp; /** @internal HTTP client for CT-e API requests (created lazily) */ private _nfseHttp; private _webhooksAccountHttp; /** @internal HTTP client for NF-e query API requests (created lazily) */ private _nfeQueryHttp; /** @internal HTTP client for Legal Entity API requests (created lazily) */ private _legalEntityHttp; /** @internal HTTP client for Natural Person API requests (created lazily) */ private _naturalPersonHttp; /** @internal Normalized client configuration */ private readonly config; /** @internal Cached resource instances */ private _serviceInvoices; private _companies; private _legalPeople; private _naturalPeople; private _webhooks; private _addresses; private _transportationInvoices; private _inboundProductInvoices; private _productInvoiceQuery; private _consumerInvoiceQuery; private _legalEntityLookup; private _naturalPersonLookup; private _taxCalculation; private _taxCodes; private _productInvoices; private _stateTaxes; private _serviceInvoicesRtc; private _productInvoicesRtc; private _municipalTaxes; private _consumerInvoices; private _certificates; private _notifications; /** * Service Invoices API resource * * @description * Provides operations for managing service invoices (NFS-e): * - Create, list, retrieve, cancel service invoices * - Send invoices by email * - Download PDF and XML files * - Automatic polling for async invoice processing * * @see {@link ServiceInvoicesResource} * @throws {ConfigurationError} If API key is not configured * * @example * ```typescript * const invoice = await nfe.serviceInvoices.create(companyId, { * borrower: { name: 'Client', email: 'client@example.com' }, * cityServiceCode: '12345', * servicesAmount: 1000.00 * }); * ``` */ get serviceInvoices(): ServiceInvoicesResource; /** * Companies API resource * * @description * Provides operations for managing companies: * - CRUD operations for companies * - Upload digital certificates (PFX/P12) * - Batch operations * * @see {@link CompaniesResource} * @throws {ConfigurationError} If API key is not configured * * @example * ```typescript * const company = await nfe.companies.create({ * federalTaxNumber: '12345678000190', * name: 'My Company', * email: 'company@example.com' * }); * ``` */ get companies(): CompaniesResource; /** * Legal People API resource * * @description * Provides operations for managing legal persons (empresas/PJ): * - CRUD operations scoped by company * - CNPJ lookup and validation * - Batch operations * * @see {@link LegalPeopleResource} * @throws {ConfigurationError} If API key is not configured * * @example * ```typescript * const legalPerson = await nfe.legalPeople.create(companyId, { * federalTaxNumber: '12345678000190', * name: 'Legal Person Company' * }); * ``` */ get legalPeople(): LegalPeopleResource; /** * Natural People API resource * * @description * Provides operations for managing natural persons (pessoas físicas/PF): * - CRUD operations scoped by company * - CPF lookup and validation * - Batch operations * * @see {@link NaturalPeopleResource} * @throws {ConfigurationError} If API key is not configured * * @example * ```typescript * const naturalPerson = await nfe.naturalPeople.create(companyId, { * federalTaxNumber: '12345678901', * name: 'John Doe' * }); * ``` */ get naturalPeople(): NaturalPeopleResource; /** * Webhooks API resource * * @description * Provides operations for managing webhooks (account-scoped, `/v2/webhooks`): * - CRUD operations for webhook configurations (`*AccountWebhook*` methods) * - Webhook signature validation * - Ping/test webhook delivery * - Fetch available event types from the live API * * The company-scoped methods (`create`, `list`, ...) are deprecated — the * `/v1/companies/{id}/webhooks` route returns 404 on the current API. * * @see {@link WebhooksResource} * @throws {ConfigurationError} If API key is not configured * * @example * ```typescript * const webhook = await nfe.webhooks.createAccountWebhook({ * uri: 'https://example.com/webhook', // precisa responder 2xx já na criação * contentType: 'json', * secret: 'um-segredo-de-32-a-64-caracteres-aqui', * filters: ['service_invoice.issued_successfully', 'service_invoice.cancelled_successfully'], * }); * ``` */ get webhooks(): WebhooksResource; /** * Addresses API resource * * @description * Provides postal code (CEP) lookup for Brazilian addresses. The live API host * supports postal-code lookup only and returns a single {@link Address}. * * **Note:** This resource uses a different API host (address.api.nfe.io). * Configure `dataApiKey` for a separate key, or it will fallback to `apiKey`. * * @see {@link AddressesResource} * @throws {ConfigurationError} If no API key is configured (dataApiKey or apiKey) * * @example * ```typescript * const address = await nfe.addresses.lookupByPostalCode('01310-100'); * console.log(address.street); // 'Paulista' * ``` */ get addresses(): AddressesResource; /** * Transportation Invoices (CT-e) API resource * * @description * Provides operations for managing CT-e (Conhecimento de Transporte Eletrônico) * documents via SEFAZ Distribuição DFe: * - Enable/disable automatic CT-e search * - Retrieve CT-e metadata and XML * - Retrieve CT-e event metadata and XML * * **Prerequisites:** * - Company must have a valid A1 digital certificate * - Webhook must be configured to receive CT-e notifications * * **Note:** This resource uses a different API host (api.nfse.io). * Uses the main `apiKey` — `api.nfse.io` is a FISCAL host and rejects the data key with 403. * * @see {@link TransportationInvoicesResource} * @throws {ConfigurationError} If no main API key is configured (apiKey) * * @example * ```typescript * // Enable automatic CT-e search * await nfe.transportationInvoices.enable('company-id'); * * // Retrieve CT-e metadata * const cte = await nfe.transportationInvoices.retrieve( * 'company-id', * '35240112345678000190570010000001231234567890' * ); * ``` */ get transportationInvoices(): TransportationInvoicesResource; /** * Inbound Product Invoices (NF-e Distribution) API resource * * @description * Provides operations for querying NF-e documents received by a company * via SEFAZ Distribuição DFe: * - Enable/disable automatic NF-e distribution fetch * - Retrieve inbound NF-e metadata by access key * - Download NF-e documents in XML, PDF, and JSON formats * - Send recipient manifest (Manifestação do Destinatário) * - Reprocess webhooks * * **Prerequisites:** * - Company must have a valid A1 digital certificate * - Webhook must be configured to receive NF-e notifications * * **Note:** This resource uses a different API host (api.nfse.io). * Uses the main `apiKey` — `api.nfse.io` is a FISCAL host and rejects the data key with 403. * * @see {@link InboundProductInvoicesResource} * @throws {ConfigurationError} If no main API key is configured (apiKey) * * @example * ```typescript * // Enable automatic NF-e fetch * await nfe.inboundProductInvoices.enableAutoFetch('company-id', { * startFromNsu: '999999', * environmentSEFAZ: 'Production', * webhookVersion: '2' * }); * * // Get NF-e details * const doc = await nfe.inboundProductInvoices.getProductInvoiceDetails( * 'company-id', * '35240112345678000190550010000001231234567890' * ); * ``` */ get inboundProductInvoices(): InboundProductInvoicesResource; /** * Product Invoice Query (NF-e) API resource * * @description * Provides read-only operations for querying product invoices (NF-e) directly * on SEFAZ by access key — no company scope required: * - Retrieve full invoice details (issuer, buyer, items, totals, transport, payment) * - Download DANFE PDF * - Download raw NF-e XML * - List fiscal events (cancellations, corrections, manifestations) * * **Note:** This resource uses a different API host (nfe.api.nfe.io). * Configure `dataApiKey` for a separate key, or it will fallback to `apiKey`. * * @see {@link ProductInvoiceQueryResource} * @throws {ConfigurationError} If no API key is configured (dataApiKey or apiKey) * * @example * ```typescript * // Retrieve invoice details * const invoice = await nfe.productInvoiceQuery.retrieve( * '35240112345678000190550010000001231234567890' * ); * console.log(invoice.currentStatus); // 'authorized' * console.log(invoice.issuer?.name); * * // Download PDF * const pdf = await nfe.productInvoiceQuery.downloadPdf( * '35240112345678000190550010000001231234567890' * ); * fs.writeFileSync('danfe.pdf', pdf); * * // List fiscal events * const events = await nfe.productInvoiceQuery.listEvents( * '35240112345678000190550010000001231234567890' * ); * ``` */ get productInvoiceQuery(): ProductInvoiceQueryResource; /** * Consumer Invoice Query API resource (CFe-SAT) * * @description * Provides read-only operations for querying CFe-SAT (Cupom Fiscal Eletrônico) * consumer invoices by access key. No company scope required. * * - Retrieve full coupon details (issuer, buyer, items, totals, payment) * - Download original CFe XML * * Uses data API key authentication on `nfe.api.nfe.io`. * * @see {@link ConsumerInvoiceQueryResource} * @throws {ConfigurationError} If API key is not configured * * @example * ```typescript * // Retrieve coupon details * const coupon = await nfe.consumerInvoiceQuery.retrieve( * '35240112345678000190590000000012341234567890' * ); * console.log(coupon.currentStatus); // 'Authorized' * console.log(coupon.issuer?.name); * * // Download CFe XML * const xml = await nfe.consumerInvoiceQuery.downloadXml( * '35240112345678000190590000000012341234567890' * ); * fs.writeFileSync('cfe.xml', xml); * ``` */ get consumerInvoiceQuery(): ConsumerInvoiceQueryResource; /** * Legal Entity Lookup API resource (CNPJ) * * @description * Provides read-only operations for querying Brazilian company (CNPJ) data: * - Basic company info (Receita Federal registry data) * - State tax registration (Inscrição Estadual) lookup * - State tax evaluation for invoice issuance * - Suggested optimal IE for invoice issuance * * **Note:** This resource uses a different API host (legalentity.api.nfe.io). * Configure `dataApiKey` for a separate key, or it will fallback to `apiKey`. * * @see {@link LegalEntityLookupResource} * @throws {ConfigurationError} If no API key is configured (dataApiKey or apiKey) * * @example * ```typescript * // Basic CNPJ lookup * const result = await nfe.legalEntityLookup.getBasicInfo('12.345.678/0001-90'); * console.log(result.legalEntity?.name); * * // State tax registration * const stateTax = await nfe.legalEntityLookup.getStateTaxInfo('SP', '12345678000190'); * ``` */ get legalEntityLookup(): LegalEntityLookupResource; /** * Natural Person Lookup API resource (CPF) * * @description * Provides a read-only operation for querying CPF cadastral status (situação cadastral) * at the Brazilian Federal Revenue Service (Receita Federal). * * **Note:** This resource uses a different API host (naturalperson.api.nfe.io). * Configure `dataApiKey` for a separate key, or it will fallback to `apiKey`. * * @see {@link NaturalPersonLookupResource} * @throws {ConfigurationError} If no API key is configured (dataApiKey or apiKey) * * @example * ```typescript * // CPF cadastral status lookup * const result = await nfe.naturalPersonLookup.getStatus('123.456.789-01', '1990-01-15'); * console.log(result.name); // 'JOÃO DA SILVA' * console.log(result.status); // 'Regular' * ``` */ get naturalPersonLookup(): NaturalPersonLookupResource; /** * Tax Calculation Engine API resource * * @description * Provides access to the Motor de Cálculo de Tributos (Tax Calculation Engine) * for computing all applicable Brazilian taxes (ICMS, ICMS-ST, PIS, COFINS, * IPI, II) on product operations. * * **Note:** This resource uses a different API host (api.nfse.io). * Uses the main `apiKey` — `api.nfse.io` is a FISCAL host and rejects the data key with 403. * * @see {@link TaxCalculationResource} * @throws {ConfigurationError} If no main API key is configured (apiKey) * * @example * ```typescript * const result = await nfe.taxCalculation.calculate('tenant-id', { * operationType: 'Outgoing', * issuer: { state: 'SP', taxRegime: 'RealProfit' }, * recipient: { state: 'RJ' }, * items: [{ * id: '1', operationCode: 121, origin: 'National', * quantity: 10, unitAmount: 100.00, ncm: '61091000' * }] * }); * ``` */ get taxCalculation(): TaxCalculationResource; /** * Tax Codes API resource (auxiliary reference tables) * * @description * Provides paginated listings of auxiliary tax code reference tables * needed as inputs for the Tax Calculation Engine: operation codes, * acquisition purposes, issuer tax profiles, and recipient tax profiles. * * **Note:** This resource uses a different API host (api.nfse.io). * Uses the main `apiKey` — `api.nfse.io` is a FISCAL host and rejects the data key with 403. * * @see {@link TaxCodesResource} * @see {@link TaxCalculationResource} * @throws {ConfigurationError} If no main API key is configured (apiKey) * * @example * ```typescript * const codes = await nfe.taxCodes.listOperationCodes({ pageIndex: 1, pageCount: 20 }); * for (const code of codes.items ?? []) { * console.log(`${code.code} - ${code.description}`); * } * ``` */ get taxCodes(): TaxCodesResource; /** * Product Invoices (NF-e) API resource * * @description * Provides full lifecycle management for NF-e (Nota Fiscal Eletrônica de Produto) * product invoices — issue, list, retrieve, cancel, send correction letters (CC-e), * disable invoice numbers, and download files (PDF/XML). * * **Note:** This resource uses the api.nfse.io host. * Uses the main `apiKey` — `api.nfse.io` is a FISCAL host and rejects the data key with 403. * * @see {@link ProductInvoicesResource} * @throws {ConfigurationError} If no main API key is configured (apiKey) * * @example * ```typescript * const result = await nfe.productInvoices.create('company-id', invoiceData); * const invoices = await nfe.productInvoices.list('company-id', { environment: 'Production' }); * ``` */ get productInvoices(): ProductInvoicesResource; /** * State Taxes (Inscrições Estaduais) API resource * * @description * Provides CRUD operations for company state tax registrations required for * NF-e product invoice issuance — list, create, retrieve, update, and delete. * * **Note:** This resource uses the api.nfse.io host. * Uses the main `apiKey` — `api.nfse.io` is a FISCAL host and rejects the data key with 403. * * @see {@link StateTaxesResource} * @throws {ConfigurationError} If no main API key is configured (apiKey) * * @example * ```typescript * const taxes = await nfe.stateTaxes.list('company-id'); * const tax = await nfe.stateTaxes.create('company-id', { taxNumber: '123', serie: 1, number: 1 }); * ``` */ get stateTaxes(): StateTaxesResource; /** * Service Invoices RTC resource — emit NFS-e under the Reforma Tributária layout * (IBS/CBS groups). Uses the main host (api.nfe.io); supports polling. Emission * is opt-in via this resource; retrieve/cancel/PDF/XML are shared with * {@link serviceInvoices}. */ get serviceInvoicesRtc(): ServiceInvoicesRtcResource; /** * Product Invoices RTC resource — emit NF-e/NFC-e under the Reforma Tributária * layout (IBS state+municipal, CBS, IS). Uses api.nfse.io; webhook-driven (not * polled), mirroring {@link productInvoices}. */ get productInvoicesRtc(): ProductInvoicesRtcResource; /** * Municipal Taxes resource — CRUD for company municipal tax registrations * (Inscrições Municipais), prerequisite for NFS-e issuance. Uses api.nfse.io. */ get municipalTaxes(): MunicipalTaxesResource; /** * Consumer Invoices resource — emit & manage NFC-e (company-scoped) on * api.nfse.io. Webhook-driven emission. Distinct from {@link consumerInvoiceQuery} * (read-only coupon lookup). */ get consumerInvoices(): ConsumerInvoicesResource; /** * Certificates resource — manage company digital certificates (retrieve/delete * by thumbprint, list) via the contribuintes-v2 API on api.nfse.io. Complements * the legacy `companies.uploadCertificate` (which targets the api.nfe.io host). */ get certificates(): CertificatesResource; /** * Notifications resource — company notification operations (api.nfe.io). */ get notifications(): NotificationsResource; /** * Create a new NFE.io API client * * @param config - Client configuration options * @throws {ConfigurationError} If configuration is invalid * @throws {ConfigurationError} If Node.js version < 18 * @throws {ConfigurationError} If fetch API is not available * * @example Basic * ```typescript * const nfe = new NfeClient({ * apiKey: 'your-api-key', * environment: 'production' * }); * ``` * * @example With environment variable * ```typescript * // Set NFE_API_KEY environment variable * const nfe = new NfeClient({ * environment: 'production' * }); * ``` * * @example With custom retry config * ```typescript * const nfe = new NfeClient({ * apiKey: 'your-api-key', * timeout: 60000, * retryConfig: { * maxRetries: 5, * baseDelay: 1000, * maxDelay: 30000 * } * }); * ``` * * @example With only data API key * ```typescript * // Only use data services (address lookup, CT-e), no main API access * const nfe = new NfeClient({ * dataApiKey: 'data-api-key' * }); * await nfe.addresses.lookupByPostalCode('01310-100'); * ``` */ constructor(config?: NfeConfig); /** * Get or create the main API HTTP client * @throws {ConfigurationError} If no API key is configured */ private getMainHttpClient; /** * Get or create the Address API HTTP client * @throws {ConfigurationError} If no API key is configured */ private getAddressHttpClient; /** * Resolve the main API key using fallback chain */ private resolveMainApiKey; /** * Resolve the data API key using fallback chain * Order: dataApiKey → apiKey → NFE_DATA_API_KEY → NFE_API_KEY */ private resolveDataApiKey; /** * Get or create the HTTP client for `api.nfse.io` — the FISCAL host. * * Every resource on this host uses the MAIN api key. The two platform keys are * complementary, not interchangeable: the data key is rejected with 403 here, * and the main key is rejected with 403 on the lookup hosts * (`nfe.api.nfe.io`, `legalentity`, `naturalperson`, `address`). * Verified live on 2026-09-01 — see tests/fixtures/live-contracts/api-key-host-matrix.json. * * @throws {ConfigurationError} If no main API key is configured */ private getNfseHttpClient; /** * Get or create the HTTP client for ACCOUNT-scoped webhook endpoints. These * live at the host root under `/v2` (e.g. https://api.nfe.io/v2/webhooks) and * use the MAIN key — NOT under the `/v1` base of the main client. * @throws {ConfigurationError} If no main API key is configured */ private getWebhooksAccountHttpClient; /** * Get or create the NF-e Query API HTTP client (nfe.api.nfe.io) * @throws {ConfigurationError} If no API key is configured */ private getNfeQueryHttpClient; /** * Get or create the Legal Entity API HTTP client (legalentity.api.nfe.io) * @throws {ConfigurationError} If no API key is configured */ private getLegalEntityHttpClient; /** * Get or create the Natural Person API HTTP client (naturalperson.api.nfe.io) * @throws {ConfigurationError} If no API key is configured */ private getNaturalPersonHttpClient; private validateAndNormalizeConfig; private getDefaultBaseUrl; private getEnvironmentVariable; private validateEnvironment; private validateNodeVersion; private getNodeVersion; private extractMajorVersion; /** * Update client configuration dynamically * * @param newConfig - Partial configuration to merge with existing config * @throws {ConfigurationError} If new configuration is invalid * * @example * ```typescript * const nfe = new NfeClient({ apiKey: 'old-key' }); * * // Switch to sandbox environment * nfe.updateConfig({ environment: 'sandbox' }); * * // Update timeout * nfe.updateConfig({ timeout: 60000 }); * ``` */ updateConfig(newConfig: Partial): void; /** * Invalidate every lazily-cached HTTP client and resource. * * Must list every `_*Http` and resource field so that, after `updateConfig`, * no cached instance retains a stale baseUrl/apiKey/timeout. When adding a new * resource or HTTP client, add it here too (single source of cache truth). */ private resetCaches; /** * Set request timeout in milliseconds * * @param timeout - Request timeout in milliseconds * * @description * Maintains v2 API compatibility. Equivalent to `updateConfig({ timeout })`. * * @example * ```typescript * nfe.setTimeout(60000); // 60 seconds * ``` */ setTimeout(timeout: number): void; /** * Set or update API key * * @param apiKey - New API key to use for authentication * * @description * Maintains v2 API compatibility. Equivalent to `updateConfig({ apiKey })`. * * @example * ```typescript * nfe.setApiKey('new-api-key'); * ``` */ setApiKey(apiKey: string): void; /** * Get current client configuration * * @returns Readonly copy of current configuration * * @example * ```typescript * const config = nfe.getConfig(); * console.log('Environment:', config.environment); * console.log('Base URL:', config.baseUrl); * console.log('Timeout:', config.timeout); * ``` */ getConfig(): Readonly; /** * Poll a resource until it completes or times out * * @template T - Type of the resource being polled * @param locationUrl - URL or path to poll * @param options - Polling configuration * @returns Promise that resolves when resource is complete * @throws {PollingTimeoutError} If polling exceeds maxAttempts * * @description * Critical utility for NFE.io's async invoice processing. When creating a service * invoice, the API returns a 202 response with a location URL. This method polls * that URL until the invoice is fully processed or the polling times out. * * @example Basic usage * ```typescript * const result = await nfe.serviceInvoices.create(companyId, data); * * if (result.status === 'pending') { * const invoice = await nfe.pollUntilComplete(result.location); * console.log('Invoice issued:', invoice.number); * } * ``` * * @example With custom polling options * ```typescript * const invoice = await nfe.pollUntilComplete(locationUrl, { * maxAttempts: 60, // Poll up to 60 times * intervalMs: 3000 // Wait 3 seconds between attempts * }); * ``` * * @example Using createAndWait (recommended) * ```typescript * // Instead of manual polling, use the convenience method: * const invoice = await nfe.serviceInvoices.createAndWait(companyId, data, { * maxAttempts: 30, * interval: 2000 * }); * ``` * * @see {@link PollOptions} for configuration options * @see {@link ServiceInvoicesResource.createAndWait} for automated polling */ pollUntilComplete(locationUrl: string, options?: PollOptions): Promise; private extractPathFromUrl; private isCompleteResponse; private isFailedResponse; private sleep; /** * Check if the client is properly configured and can reach the NFE.io API * * @returns Health check result with status and optional error details * * @description * Performs a simple API request to verify connectivity and authentication. * Useful for debugging connection issues or validating client configuration. * * Issues `GET /v1/companies` with no query string — the smallest request the * API accepts on this route. See the implementation note before you add a * pagination parameter here. * * @example * ```typescript * const health = await nfe.healthCheck(); * * if (health.status === 'ok') { * console.log('API connection successful!'); * } else { * console.error('API connection failed:', health.details); * } * ``` * * @example In application startup * ```typescript * async function initializeApp() { * const nfe = new NfeClient({ apiKey: process.env.NFE_API_KEY }); * * const health = await nfe.healthCheck(); * if (health.status !== 'ok') { * throw new Error(`NFE.io API is not reachable: ${health.details?.error}`); * } * * console.log('NFE.io SDK initialized successfully'); * } * ``` */ healthCheck(): Promise<{ status: 'ok' | 'error'; details?: any; }>; /** * Get client information for debugging and diagnostics * * @returns Client diagnostic information * * @description * Returns comprehensive information about the current SDK instance, * useful for bug reports and troubleshooting. * * @example * ```typescript * const info = nfe.getClientInfo(); * console.log('SDK Version:', info.version); * console.log('Node Version:', info.nodeVersion); * console.log('Environment:', info.environment); * console.log('Base URL:', info.baseUrl); * ``` * * @example In error reporting * ```typescript * try { * await nfe.serviceInvoices.create(companyId, data); * } catch (error) { * const info = nfe.getClientInfo(); * console.error('Error context:', { * error: error.message, * sdkInfo: info * }); * } * ``` */ getClientInfo(): { version: string; nodeVersion: string; environment: string; baseUrl: string; hasApiKey: boolean; }; } /** * Create NFE.io client instance using factory function * * @param apiKey - API key string or full configuration object * @param _version - API version (ignored in v3, maintained for v2 compatibility) * @returns Configured NfeClient instance * * @description * Factory function for creating NFE.io client instances. Maintains v2 API compatibility * while providing modern TypeScript support. * * @example String API key * ```typescript * const nfe = createNfeClient('your-api-key'); * ``` * * @example Configuration object * ```typescript * const nfe = createNfeClient({ * apiKey: 'your-api-key', * environment: 'sandbox', * timeout: 60000 * }); * ``` * * @example v2 compatibility * ```typescript * // v2 style (still works) * const nfe = createNfeClient('your-api-key'); * ``` */ declare function createNfeClient(apiKey: string | NfeConfig): NfeClient; /** * Default export factory function for CommonJS compatibility * * @param apiKey - API key string or full configuration object * @returns Configured NfeClient instance * * @description * Default export maintains v2 API compatibility for CommonJS users. * Equivalent to `createNfeClient()`. * * @example ES Modules * ```typescript * import nfe from 'nfe-io'; * const client = nfe('your-api-key'); * ``` * * @example CommonJS * ```javascript * const nfe = require('nfe-io').default; * const client = nfe('your-api-key'); * ``` */ declare function nfe(apiKey: string | NfeConfig): NfeClient; /** * Current SDK version * * Vem de `src/version.ts`, gerado do `package.json` — ver a nota em * `PACKAGE_VERSION` (`src/index.ts`) sobre por que não se fixa literal aqui. * * @constant */ declare const VERSION = "6.0.0"; /** * Supported Node.js version range (semver format) * @constant */ declare const SUPPORTED_NODE_VERSIONS = ">=18.0.0"; //#endregion //#region src/core/errors/index.d.ts /** * NFE.io SDK v3 - Error Classes * * Comprehensive error handling system that maintains compatibility * with v2 error types while providing modern TypeScript benefits */ declare class NfeError extends Error { readonly type: string; readonly code?: number | undefined; readonly status?: number | undefined; readonly details?: unknown; readonly raw?: unknown; constructor(message: string, details?: unknown, code?: number); get statusCode(): number | undefined; /** Convert error to JSON for logging/debugging */ toJSON(): { type: string; name: string; message: string; code: number | undefined; details: unknown; stack: string | undefined; }; } declare class AuthenticationError extends NfeError { readonly type = "AuthenticationError"; constructor(message?: string, details?: unknown); } declare class ValidationError extends NfeError { readonly type = "ValidationError"; constructor(message?: string, details?: unknown); } declare class NotFoundError extends NfeError { readonly type = "NotFoundError"; constructor(message?: string, details?: unknown); } declare class ConflictError extends NfeError { readonly type = "ConflictError"; constructor(message?: string, details?: unknown); } declare class RateLimitError extends NfeError { readonly type = "RateLimitError"; constructor(message?: string, details?: unknown); } declare class ServerError extends NfeError { readonly type = "ServerError"; constructor(message?: string, details?: unknown, code?: number); } declare class ConnectionError extends NfeError { readonly type = "ConnectionError"; constructor(message?: string, details?: unknown); } declare class TimeoutError extends NfeError { readonly type = "TimeoutError"; constructor(message?: string, details?: unknown); } declare class ConfigurationError extends NfeError { readonly type = "ConfigurationError"; constructor(message?: string, details?: unknown); } declare class PollingTimeoutError extends NfeError { readonly type = "PollingTimeoutError"; constructor(message?: string, details?: unknown); } declare class InvoiceProcessingError extends NfeError { readonly type = "InvoiceProcessingError"; constructor(message?: string, details?: unknown); } declare class ErrorFactory { /** * Create error from HTTP response (maintains v2 ResourceError.generate pattern) */ static fromHttpResponse(status: number, data?: unknown, message?: string): NfeError; /** * Create error from fetch/network issues */ static fromNetworkError(error: Error): NfeError; /** * Create error from Node.js version check */ static fromNodeVersionError(nodeVersion: string): ConfigurationError; /** * Create error from missing API key */ static fromMissingApiKey(): ConfigurationError; private static getDefaultMessage; } declare function isNfeError(error: unknown): error is NfeError; declare function isAuthenticationError(error: unknown): error is AuthenticationError; declare function isValidationError(error: unknown): error is ValidationError; declare function isNotFoundError(error: unknown): error is NotFoundError; declare function isConnectionError(error: unknown): error is ConnectionError; declare function isTimeoutError(error: unknown): error is TimeoutError; declare function isPollingTimeoutError(error: unknown): error is PollingTimeoutError; /** @deprecated Use ValidationError instead */ declare const BadRequestError: typeof ValidationError; /** @deprecated Use NfeError instead */ declare const APIError: typeof NfeError; /** @deprecated Use ServerError instead */ declare const InternalServerError: typeof ServerError; declare const ErrorTypes: { readonly NfeError: typeof NfeError; readonly AuthenticationError: typeof AuthenticationError; readonly ValidationError: typeof ValidationError; readonly NotFoundError: typeof NotFoundError; readonly ConflictError: typeof ConflictError; readonly RateLimitError: typeof RateLimitError; readonly ServerError: typeof ServerError; readonly ConnectionError: typeof ConnectionError; readonly TimeoutError: typeof TimeoutError; readonly ConfigurationError: typeof ConfigurationError; readonly PollingTimeoutError: typeof PollingTimeoutError; readonly InvoiceProcessingError: typeof InvoiceProcessingError; readonly BadRequestError: typeof ValidationError; readonly APIError: typeof NfeError; readonly InternalServerError: typeof ServerError; }; type ErrorType = keyof typeof ErrorTypes; //#endregion //#region src/core/utils/certificate-validator.d.ts /** * NFE.io SDK v3 - Certificate Validator * * Utilities for validating digital certificates before upload * Supports PKCS#12 format (.pfx, .p12) */ interface CertificateMetadata { subject: string; issuer: string; validFrom: Date; validTo: Date; serialNumber?: string; } interface CertificateValidationResult { valid: boolean; metadata?: CertificateMetadata; error?: string; } declare class CertificateValidator { /** * Pre-flight a certificate file before upload. * * IMPORTANT: this performs **format-only** local checks (non-empty buffer, * password provided, PKCS#12 `3082` magic bytes). It does NOT parse the * certificate and CANNOT verify the password, expiry, subject or issuer — * doing so requires a PKCS#12 reader, which would violate the SDK's * no-runtime-dependency rule. Subject/issuer/validity and the password are * verified **server-side** by the NFE.io API when the certificate is uploaded. * * Therefore a `valid: true` result means "looks like a PKCS#12 file", not * "this is a valid, in-date certificate with the right password". * * @param file - Certificate file buffer * @param password - Certificate password (presence checked only) * @returns Pre-flight result (no fabricated metadata) */ static validate(file: Buffer, password: string): Promise; /** * Check if certificate format is supported * * @param filename - Certificate filename * @returns True if .pfx or .p12 format */ static isSupportedFormat(filename: string): boolean; /** * Calculate days until expiration * * @param expiresOn - Expiration date * @returns Number of days until expiration (negative if expired) */ static getDaysUntilExpiration(expiresOn: Date): number; /** * Check if certificate is expiring soon * * @param expiresOn - Expiration date * @param threshold - Days threshold (default: 30) * @returns True if expiring within threshold days */ static isExpiringSoon(expiresOn: Date, threshold?: number): boolean; } //#endregion //#region src/index.d.ts /** * NPM package name * * Vem de `src/version.ts`, gerado do `package.json`. Até 2026-09-02 esta constante * dizia `@nfe-io/sdk` — pacote que não existe; o publicado é `nfe-io`. * * @constant */ declare const PACKAGE_NAME = "nfe-io"; /** * Current SDK version * * Vem da mesma fonte. NÃO fixar literal: até 2026-09-02 esta constante dizia * `5.1.0`, `VERSION` dizia o mesmo, o `package.json` dizia `5.2.0` e o User-Agent * dizia `3.0.0` — quatro valores para uma informação só. * * @constant */ declare const PACKAGE_VERSION = "6.0.0"; /** * NFE.io API version supported by this SDK * @constant */ declare const API_VERSION = "v1"; /** * GitHub repository URL * @constant */ declare const REPOSITORY_URL = "https://github.com/nfe/client-nodejs"; /** * Official NFE.io API documentation URL * @constant */ declare const DOCUMENTATION_URL = "https://nfe.io/docs"; /** * Check if the current environment supports NFE.io SDK v3 requirements * * @description * Validates that the runtime environment has all necessary features: * - Node.js 18+ (for native fetch support) * - Fetch API availability * - AbortController availability * * @returns Object containing support status and detected issues * * @example * ```typescript * const check = isEnvironmentSupported(); * if (!check.supported) { * console.error('Environment issues:', check.issues); * console.error('Node version:', check.nodeVersion); * } * ``` */ declare function isEnvironmentSupported(): { /** Whether all requirements are met */supported: boolean; /** Detected Node.js version (e.g., "v18.17.0") */ nodeVersion?: string; /** Whether Fetch API is available */ hasFetch: boolean; /** Whether AbortController is available */ hasAbortController: boolean; /** List of detected compatibility issues */ issues: string[]; }; /** * Get comprehensive SDK runtime information * * @description * Returns detailed information about the current runtime environment, * useful for debugging and support. * * @returns Object containing SDK and runtime environment information * * @example * ```typescript * const info = getRuntimeInfo(); * console.log('SDK Version:', info.sdkVersion); * console.log('Node Version:', info.nodeVersion); * console.log('Platform:', info.platform); * console.log('Environment:', info.environment); * ``` */ declare function getRuntimeInfo(): { /** Current SDK version */sdkVersion: string; /** Node.js version (e.g., "v18.17.0") */ nodeVersion: string; /** Operating system platform (e.g., "linux", "darwin", "win32") */ platform: string; /** CPU architecture (e.g., "x64", "arm64") */ arch: string; /** Runtime environment type */ environment: 'node' | 'browser' | 'unknown'; }; /** * Create NFE.io client from environment variable * * @description * Convenience function that reads API key from NFE_API_KEY environment variable. * Useful for serverless functions and quick prototyping. * * @param environment - Target environment ('production' or 'sandbox') * @returns Configured NfeClient instance * @throws {ConfigurationError} If NFE_API_KEY environment variable is not set * * @example * ```typescript * // Set environment variable: NFE_API_KEY=your-api-key * const nfe = createClientFromEnv('production'); * * // Use the client normally * const companies = await nfe.companies.list(); * ``` * * @example Docker/Kubernetes * ```yaml * env: * - name: NFE_API_KEY * valueFrom: * secretKeyRef: * name: nfe-credentials * key: api-key * ``` */ declare function createClientFromEnv(environment?: 'production' | 'sandbox'): any; /** * Validate NFE.io API key format * * @description * Performs basic validation on API key format before attempting to use it. * Helps catch common mistakes like missing keys or keys with whitespace. * * @param apiKey - The API key to validate * @returns Validation result with any detected issues * * @example * ```typescript * const result = validateApiKeyFormat('my-api-key'); * if (!result.valid) { * console.error('API key issues:', result.issues); * // ["API key appears to be too short"] * } * ``` * * @example Integration with client * ```typescript * const apiKey = process.env.NFE_API_KEY; * const validation = validateApiKeyFormat(apiKey); * * if (!validation.valid) { * throw new Error(`Invalid API key: ${validation.issues.join(', ')}`); * } * * const nfe = new NfeClient({ apiKey }); * ``` */ declare function validateApiKeyFormat(apiKey: string): { /** Whether the API key passes basic validation */valid: boolean; /** List of validation issues found */ issues: string[]; }; //#endregion export { APIError, API_VERSION, type AccountWebhook, type Address, type AddressCity, type AddressLookupResponse, type ApiErrorResponse, AuthenticationError, type AutomaticManifesting, BadRequestError, type BrazilianState, CTE_API_BASE_URL, type CalculateItemRequest, type CalculateItemResponse, type CalculateRequest, type CalculateRequestIssuer, type CalculateRequestRecipient, type CalculateResponse, type CancelInvoiceResponse, type CertificateMetadataResource, type CertificateMetadataResourceItem, type CertificateStatus, type CertificateStatusSummary, CertificateValidator, type CertificatesMetadataResource, CertificatesResource, type Company, type CompanyAddress, type CompanyCertificateV1, type CompanyResourceItem, type CompanyResourceV1, type CompanyV2ListOptions, type CompanyV2ListResponse, ConfigurationError, ConflictError, ConnectionError, type ConsumerInvoice, type ConsumerInvoiceCancellationResponse, type ConsumerInvoiceData, type ConsumerInvoiceDisablementData, type ConsumerInvoiceEnvironment, type ConsumerInvoiceEventsResponse, type ConsumerInvoiceFileResource, type ConsumerInvoiceItemsResponse, type ConsumerInvoiceListOptions, type ConsumerInvoiceListResponse, type ConsumerInvoicePageOptions, ConsumerInvoicesResource, type CouponAdditionalInformation, type CouponAddress, type CouponBuyer, type CouponCity, type CouponCofinsTax, type CouponDelivery, type CouponFiscoField, type CouponIcmsTax, type CouponIcmsTotal, type CouponIssqnTax, type CouponIssqnTaxIncentive, type CouponIssqnTotal, type CouponIssuer, type CouponItem, type CouponItemTax, type CouponPayment, type CouponPaymentDetail, type CouponPaymentMethod, type CouponPersonType, type CouponPisTax, type CouponReferencedDocument, type CouponStatus, type CouponTaxBase, type CouponTaxRegime, type CouponTotal, type CreateCompanyResourceItem, type CreateInvoiceResponse, type CreateMunicipalTaxData, DOCUMENTATION_URL, type EnableInboundOptions, type EnableTransportationInvoiceOptions, type EntityType, ErrorFactory, type ErrorType, ErrorTypes, type HttpResponse, type InboundBuyer, type InboundCompany, type InboundFileResource, type InboundInvoiceMetadata, type InboundIssuer, type InboundLinks, type InboundProductInvoice, type InboundProductInvoiceMetadata, type InboundSettings, type InboundTransportation, InternalServerError, InvoiceProcessingError, LEGAL_ENTITY_API_BASE_URL, type LegalEntityActivityType, type LegalEntityAddress, type LegalEntityBasicInfo, type LegalEntityBasicInfoOptions, type LegalEntityBasicInfoResponse, type LegalEntityCity, type LegalEntityEconomicActivity, type LegalEntityFiscalDocumentInfo, type LegalEntityFiscalDocumentStatus, type LegalEntityNature, type LegalEntityNatureCode, type LegalEntityPartner, type LegalEntityPhone, type LegalEntityPhoneSource, type LegalEntityQualification, type LegalEntitySize, type LegalEntityStateTax, type LegalEntityStateTaxForInvoice, type LegalEntityStateTaxForInvoiceInfo, type LegalEntityStateTaxForInvoiceResponse, type LegalEntityStateTaxForInvoiceStatus, type LegalEntityStateTaxInfo, type LegalEntityStateTaxResponse, type LegalEntityStateTaxStatus, type LegalEntityStatus, type LegalEntityTaxRegime, type LegalEntityUnit, type LegalPerson, type ListResponse, type ManifestEventType, type MunicipalTax, type MunicipalTaxListResponse, MunicipalTaxesResource, NATURAL_PERSON_API_BASE_URL, type NFSeRtcRequest, type NaturalPerson, type NaturalPersonStatus, type NaturalPersonStatusResponse, type NfeActivityResource, type NfeAdditionalInformation, type NfeAddress, type NfeAuthorizationResource, type NfeBillingInvoice, type NfeBillingResource, type NfeCardResource, type NfeCity, NfeClient, type NfeCofinsTaxResource, type NfeConfig, type NfeConsumerPresenceType, type NfeConsumerType, type NfeContingencyDetails, type NfeDeliveryInformation, type NfeDestination, type NfeDisablementData, type NfeDisablementResource, type NfeDuplicateResource, type NfeEnvironmentType, NfeError, type NfeExportResource, type NfeFileResource, type NfeFlagCard, type NfeFlowStatus, type NfeIcmsTaxResource, type NfeIcmsUfDestinationTaxResource, type NfeIiTaxResource, type NfeIntegrationPaymentType, type NfeIntermediateResource, type NfeIntermediationType, type NfeInvoiceEventsBase, type NfeInvoiceItemResource, type NfeInvoiceItemTax, type NfeInvoiceItemsResponse, type NfeInvoiceStatus, type NfeIpiTaxResource, type NfeIssuerFromRequest, type NfeIssuerResource, type NfeOperationType, type NfePaymentDetail, type NfePaymentMethod, type NfePaymentResource, type NfePaymentType, type NfePersonType, type NfePisTaxResource, type NfePrintType, type NfeProductInvoice, type NfeProductInvoiceBuyer, type NfeProductInvoiceEventsResponse, type NfeProductInvoiceIssueData, type NfeProductInvoiceListOptions, type NfeProductInvoiceListResponse, type NfeProductInvoiceSubListOptions, type NfeProductInvoiceWithoutEvents, type NfePurposeType, type NfeReceiverStateTaxIndicator, type NfeRequestCancellationResource, type NfeSecurityCredential, type NfeShippingModality, type NfeSpecialTaxRegime, type NfeStateCode, type NfeStateTax, type NfeStateTaxCreateData, type NfeStateTaxEnvironmentType, type NfeStateTaxListOptions, type NfeStateTaxListResponse, type NfeStateTaxProcessingAuthorizer, type NfeStateTaxSpecialTaxRegime, type NfeStateTaxStateCode, type NfeStateTaxStatus, type NfeStateTaxType, type NfeStateTaxUpdateData, type NfeTaxDeterminationResource, type NfeTaxRegime, type NfeTotalResource, type NfeTotals, type NfeTransportGroupResource, type NfeTransportInformation, type NfeVolumeResource, type NfeWithdrawalInformation, NotFoundError, type Notification, type NotificationListResponse, NotificationsResource, PACKAGE_NAME, PACKAGE_VERSION, type PageInfo, type PaginationOptions, type PollOptions, PollingTimeoutError, type ProductInvoiceAdditionalInfo, type ProductInvoiceAddress, type ProductInvoiceBilling, type ProductInvoiceBuyer, type ProductInvoiceCardFlag, type ProductInvoiceCity, type ProductInvoiceConsumerType, type ProductInvoiceDestination, type ProductInvoiceDetails, type ProductInvoiceEnvironmentType, type ProductInvoiceEvent, type ProductInvoiceEventsResponse, type ProductInvoiceIcmsTotals, type ProductInvoiceIntegrationPaymentType, type ProductInvoiceIssqnTotals, type ProductInvoiceIssueType, type ProductInvoiceIssuer, type ProductInvoiceItem, type ProductInvoiceItemIcms, type ProductInvoiceItemTax, type ProductInvoiceOperationType, type ProductInvoicePayment, type ProductInvoicePaymentMethod, type ProductInvoicePaymentType, type ProductInvoicePersonType, type ProductInvoicePresenceType, type ProductInvoicePrintType, type ProductInvoiceProcessType, type ProductInvoiceProtocol, type ProductInvoicePurposeType, type ProductInvoiceRtcRequest, type ProductInvoiceStatus, type ProductInvoiceTaxRegimeCode, type ProductInvoiceTotals, type ProductInvoiceTransport, ProductInvoicesResource, ProductInvoicesRtcResource, REPOSITORY_URL, RateLimitError, type RequiredNfeConfig, type ResourceId, type RetryConfig, SUPPORTED_NODE_VERSIONS, ServerError, type ServiceInvoiceData as ServiceInvoice, type ServiceInvoiceData, type ServiceInvoiceDetails, ServiceInvoicesRtcResource, type SpecialTaxRegime, StateTaxesResource, type TaxCalcTaxRegime, TaxCalculationResource, type TaxCode, type TaxCodeListOptions, type TaxCodePaginatedResponse, TaxCodesResource, type TaxCofins, type TaxCoupon, type TaxIcms, type TaxIcmsUfDest, type TaxIi, type TaxIpi, type TaxOperationType, type TaxOrigin, type TaxPis, type TaxRegime, TimeoutError, type TransportationInvoiceEntityStatus, type TransportationInvoiceInboundSettings, type TransportationInvoiceMetadata, type TransportationInvoiceMetadataType, TransportationInvoicesResource, type UpdateCompanyResourceItem, type UpdateMunicipalTaxData, VERSION, ValidationError, type Webhook, type WebhookEvent, type WebhookEventType, createClientFromEnv, createNfeClient, createTaxCalculationResource, createTaxCodesResource, nfe as default, getRuntimeInfo, isAuthenticationError, isConnectionError, isEnvironmentSupported, isNfeError, isNotFoundError, isPollingTimeoutError, isTimeoutError, isValidationError, validateApiKeyFormat }; //# sourceMappingURL=index.d.cts.map