import { ClientConfig, Pool } from 'pg'; import { MongoClient } from 'mongodb'; type AuditAction = 'CREATED' | 'UPDATED' | 'DELETED' | 'INACTIVATED' | 'ACTIVATED' | 'STATUS_CHANGED' | 'IMPORTED' | 'REPROCESSED'; type AuditActorType = 'USER' | 'SYSTEM' | 'INTEGRATION'; type AuditSourceType = 'HTTP' | 'CONSUMER' | 'JOB' | 'WEBHOOK'; type AuditChangeSetType = 'PATCH' | 'BEFORE_AFTER' | 'NONE'; interface AuditFieldChange { field: string; previous?: unknown; next?: unknown; label?: string; } interface AuditChangeSet { type: AuditChangeSetType; changed_fields?: string[]; patch?: Record; before?: Record; after?: Record; field_changes?: AuditFieldChange[]; } interface AuditEvent { event_id: string; service: string; tenant_id: string; action: AuditAction; entity: string; user: { type: AuditActorType; id?: string; name?: string; email?: string; }; source: { type: AuditSourceType; name: string; }; change_set?: AuditChangeSet; created_at?: Date; updated_at: Date; } interface IAuditEventRepository { insert(event: AuditEvent): Promise; } declare class AuditEventBuilder { private readonly event; withEventId(value: string): this; withEntity(value: string): this; withUser(user: AuditEvent['user']): this; withAction(action: AuditAction): this; withTenant(tenantId: string): this; withService(service: string): this; withSource(type: AuditSourceType, name: string): this; withChangeSet(changeSet: AuditChangeSet): this; build(): AuditEvent; } declare const EnrichmentField: { readonly REFERENTIAL_ACCOUNT_PLAN: "referential_account_plan"; }; type EnrichmentField = (typeof EnrichmentField)[keyof typeof EnrichmentField]; type FieldEnricherFn = (before: Record, after: Record, context: AuditContext) => Promise<{ previous?: unknown; next?: unknown; }>; interface CompareOptions { ignore?: string[]; } interface CompareResult { hasChanges: boolean; fieldChanges: AuditFieldChange[]; changedFields: string[]; } declare class ObjectComparator { static compare>(previous: T, next: T, options?: CompareOptions): CompareResult; private static flatten; private static isIgnored; private static isEqual; } interface AuditServiceConfig { service: string; source: { type: AuditSourceType; name: string; }; defaultIgnoredFields?: string[]; } interface AuditContext { tenantId: string; user: AuditEvent['user']; } declare class AuditEventService { private readonly repository; private readonly config; constructor(repository: IAuditEventRepository, config: AuditServiceConfig); trackCreate>(entityType: string, eventId: string, entity: T, context: AuditContext, enrichers?: Map): Promise; trackUpdate>(entityType: string, eventId: string, before: T, after: T, context: AuditContext, compareOptions?: CompareOptions, enrichers?: Map): Promise; trackDelete>(entityType: string, eventId: string, entity: T, context: AuditContext): Promise; track(action: AuditAction, entityType: string, eventId: string, changeSet: AuditChangeSet, context: AuditContext): Promise; private applyEnrichers; } declare class MongoConfig { host: string; port: number; database: string; username?: string; password?: string; isSrv: boolean; maxPoolSize: number; minPoolSize: number; connectTimeoutMS: number; socketTimeoutMS: number; constructor(host: string, port: number, database: string, username?: string, password?: string, isSrv?: boolean, maxPoolSize?: number, minPoolSize?: number, connectTimeoutMS?: number, socketTimeoutMS?: number); getConnectionString(): string; getPoolOptions(): { maxPoolSize: number; minPoolSize: number; connectTimeoutMS: number; socketTimeoutMS: number; }; } declare class MongoAuditEventRepository implements IAuditEventRepository { private readonly mongoConfig; private readonly collectionName; private readonly _client; private collection; constructor(mongoConfig: MongoConfig, collectionName?: string); private getCollection; private ensureIndexes; insert(event: AuditEvent): Promise; disconnect(): Promise; } declare class PostgresConfig { config: { user: string; host: string; database: string; password: string; port: number; ssl?: { rejectUnauthorized: boolean; }; }; constructor(config: { user: string; host: string; database: string; password: string; port: number; ssl?: { rejectUnauthorized: boolean; }; }); getConnection(): ClientConfig; } declare class AccountServicePostgresRepository { private readonly pool; constructor(config: PostgresConfig); getReferentialAccountPlanAlias(id: string): Promise; } declare function createReferentialAccountPlanEnricher(config: PostgresConfig, fieldName?: EnrichmentField): FieldEnricherFn; interface Cloneable { clone(): this; } declare class Addition implements Cloneable { private _number; private _addition_sequence_number; private _manufacturer_code; private _import_discount_amount; private _drawback_concession_number; get number(): string; set number(value: string); get addition_sequence_number(): string; set addition_sequence_number(value: string); get manufacturer_code(): string; set manufacturer_code(value: string); get import_discount_amount(): number; set import_discount_amount(value: number); get drawback_concession_number(): string; set drawback_concession_number(value: string); clone(): this; } declare enum NameCountryEnum { AFGHANISTAN = "AFEGANISTAO", ALBANIA = "ALBANIA, REPUBLICA DA", GERMANY = "ALEMANHA", BURKINA_FASO = "BURKINA FASO", ANDORRA = "ANDORRA", ANGOLA = "ANGOLA", ANGUILLA = "ANGUILLA", ANTIGUA_AND_BARBUDA = "ANTIGUA E BARBUDA", NETHERLANDS_ANTILLES = "ANTILHAS HOLANDESAS", SAUDI_ARABIA = "ARABIA SAUDITA", ALGERIA = "ARGELIA", ARGENTINA = "ARGENTINA", ARMENIA = "ARMENIA, REPUBLICA DA", ARUBA = "ARUBA", AUSTRALIA = "AUSTRALIA", AUSTRIA = "AUSTRIA", AZERBAIJAN = "AZERBAIJAO, REPUBLICA DO", BAHAMAS = "BAHAMAS, ILHAS", BAHRAIN = "BAHREIN, ILHAS", BANGLADESH = "BANGLADESH", BARBADOS = "BARBADOS", BELARUS = "BELARUS, REPUBLICA DA", BELGIUM = "BELGICA", BELIZE = "BELIZE", BERMUDA = "BERMUDAS", MYANMAR = "MIANMAR (BIRMANIA)", BOLIVIA = "BOLIVIA", BOSNIA_HERZEGOVINA = "BOSNIA-HERZEGOVINA (REPUBLICA DA)", BOTSWANA = "BOTSUANA", BRAZIL = "BRASIL", BRUNEI = "BRUNEI", BULGARIA = "BULGARIA, REPUBLICA DA", BURUNDI = "BURUNDI", BHUTAN = "BUTAO", CAPE_VERDE = "CABO VERDE, REPUBLICA DE", CAYMAN_ISLANDS = "CAYMAN, ILHAS", CAMBODIA = "CAMBOJA", CAMEROON = "CAMAROES", CANADA = "CANADA", GUERNSEY = "GUERNSEY, ILHA DO CANAL (INCLUI ALDERNEY E SARK)", JERSEY = "JERSEY, ILHA DO CANAL", CANARY_ISLANDS = "CANARIAS, ILHAS", KAZAKHSTAN = "CAZAQUISTAO, REPUBLICA DO", QATAR = "CATAR", CHILE = "CHILE", CHINA = "CHINA, REPUBLICA POPULAR", TAIWAN = "FORMOSA (TAIWAN)", CYPRUS = "CHIPRE", COCOS_ISLANDS = "COCOS(KEELING),ILHAS", COLOMBIA = "COLOMBIA", COMOROS = "COMORES, ILHAS", CONGO = "CONGO", COOK_ISLANDS = "COOK, ILHAS", NORTH_KOREA = "COREIA, REP.POP.DEMOCRATICA", SOUTH_KOREA = "COREIA, REPUBLICA DA", IVORY_COAST = "COSTA DO MARFIM", CROATIA = "CROACIA (REPUBLICA DA)", COSTA_RICA = "COSTA RICA", COVEITE = "COVEITE", CUBA = "CUBA", BENIN = "BENIN", DENMARK = "DINAMARCA", DOMINICA = "DOMINICA,ILHA", ECUADOR = "EQUADOR", EGYPT = "EGITO", ERITREA = "ERITREIA", UNITED_ARAB_EMIRATES = "EMIRADOS ARABES UNIDOS", SPAIN = "ESPANHA", SLOVENIA = "ESLOVENIA, REPUBLICA DA", SLOVAKIA = "ESLOVACA, REPUBLICA", UNITED_STATES = "ESTADOS UNIDOS", ESTONIA = "ESTONIA, REPUBLICA DA", ETHIOPIA = "ETIOPIA", FALKLAND_ISLANDS = "FALKLAND (ILHAS MALVINAS)", FAROE_ISLANDS = "FEROE_ILHAS", PHILIPPINES = "FILIPINAS", FINLAND = "FINLANDIA", FRANCE = "FRANCA", GABON = "GABAO", GAMBIA = "GAMBIA", GHANA = "GANA", GEORGIA = "GEORGIA_REPUBLICA_DA", GIBRALTAR = "GIBRALTAR", GRENADA = "GRANADA", GREECE = "GRECIA", GREENLAND = "GROENLANDIA", GUADELOUPE = "GUADALUPE", GUAM = "GUAM", GUATEMALA = "GUATEMALA", FRENCH_GUIANA = "GUIANA_FRANCESA", GUINEA = "GUINE", EQUATORIAL_GUINEA = "GUINE_EQUATORIAL", GUINEA_BISSAU = "GUINE_BISSAU", GUYANA = "GUIANA", HAITI = "HAITI", HONDURAS = "HONDURAS", HONG_KONG = "HONG_KONG", HUNGARY = "HUNGRIA_REPUBLICA_DA", YEMEN = "IEMEN", ISLE_OF_MAN = "MAN_ILHA_DE", INDIA = "INDIA", INDONESIA = "INDONESIA", IRAQ = "IRAQUE", IRAN = "IRA_REPUBLICA_ISLAMICA_DO", IRELAND = "IRLANDA", ICELAND = "ISLANDIA", ISRAEL = "ISRAEL", ITALY = "ITALIA", JAMAICA = "JAMAICA", JOHNSTON_ISLAND = "JOHNSTON_ILHAS", JAPAN = "JAPAO", JORDAN = "JORDANIA", KIRIBATI = "KIRIBATI", LAOS = "LAOS, REP.POP.DEMOCR.DO", LESOTHO = "LESOTO", LATVIA = "LETONIA, REPUBLICA DA", LEBANON = "LIBANO", LIBERIA = "LIBERIA", LIBYA = "LIBIA", LIECHTENSTEIN = "LIECHTENSTEIN", LITHUANIA = "LITUANIA, REPUBLICA DA", LUXEMBOURG = "LUXEMBURGO", MACAU = "MACAU", MACEDONIA = "MACEDONIA, ANT.REP.IUGOSLAVA", MADAGASCAR = "MADAGASCAR", MADEIRA = "MADEIRA, ILHA DA", MALAYSIA = "MALASIA", MALAWI = "MALAVI", MALDIVES = "MALDIVAS", MALI = "MALI", MALTA = "MALTA", NORTHERN_MARIANAS = "MARIANAS DO NORTE", MOROCCO = "MARROCOS", MARSHALL_ISLANDS = "MARSHALL,ILHAS", MARTINIQUE = "MARTINICA", MAURITIUS = "MAURICIO", MAURITANIA = "MAURITANIA", MIDWAY_ISLANDS = "MIDWAY, ILHAS", MEXICO = "MEXICO", MOLDOVA = "MOLDAVIA, REPUBLICA DA", MONACO = "MONACO", MONGOLIA = "MONGOLIA", MONTENEGRO = "MONTENEGRO", MICRONESIA = "MICRONESIA", MONTSERRAT = "MONTSERRAT,ILHAS", MOZAMBIQUE = "MOCAMBIQUE", NAMIBIA = "NAMIBIA", NAURU = "NAURU", CHRISTMAS_ISLAND = "CHRISTMAS,ILHA (NAVIDAD)", NEPAL = "NEPAL", NICARAGUA = "NICARAGUA", NIGER = "NIGER", NIGERIA = "NIGERIA", NIUE = "NIUE,ILHA", NORFOLK_ISLAND = "NORFOLK,ILHA", NORWAY = "NORUEGA", NEW_CALEDONIA = "NOVA CALEDONIA", PAPUA_NEW_GUINEA = "PAPUA NOVA GUINE", NEW_ZEALAND = "NOVA ZELANDIA", VANUATU = "VANUATU", OMAN = "OMA", PACIFIC_ISLANDS = "PACIFICO,ILHAS DO (POSSESSAO DOS EUA)", NETHERLANDS = "PAISES BAIXOS (HOLANDA)", PALAU = "PALAU", PAKISTAN = "PAQUISTAO", PANAMA = "PANAMA", PARAGUAY = "PARAGUAI", PERU = "PERU", PITCAIRN_ISLAND = "PITCAIRN,ILHA", FRENCH_POLYNESIA = "POLINESIA FRANCESA", POLAND = "POLONIA, REPUBLICA DA", PORTUGAL = "PORTUGAL", PUERTO_RICO = "PORTO RICO", KENYA = "QUENIA", KYRGYZSTAN = "QUIRGUIZ, REPUBLICA", UNITED_KINGDOM = "REINO UNIDO", CENTRAL_AFRICAN_REPUBLIC = "REPUBLICA CENTRO-AFRICANA", DOMINICAN_REPUBLIC = "REPUBLICA DOMINICANA", REUNION = "REUNIAO, ILHA", ZIMBABWE = "ZIMBABUE", ROMANIA = "ROMENIA", RWANDA = "RUANDA", RUSSIA = "RUSSIA, FEDERACAO DA", SOLOMON_ISLANDS = "SALOMAO, ILHAS", SAINT_KITTS_AND_NEVIS = "SAINT KITTS E NEVIS", WEST_SAHARA = "SAARA OCIDENTAL", EL_SALVADOR = "EL SALVADOR", SAMOA = "SAMOA", AMERICAN_SAMOA = "SAMOA AMERICANA", SAINT_CHRISTOPHER_AND_NEVIS = "SAO CRISTOVAO E NEVES,ILHAS", SAN_MARINO = "SAN MARINO", SAINT_PETER_AND_MIQUELON = "SAO PEDRO E MIQUELON", SAINT_VINCENT_AND_THE_GRENADINES = "SAO VICENTE E GRANADINAS", SAINT_HELENA = "SANTA HELENA", SAINT_LUCIA = "SANTA LUCIA", SAO_TOME_AND_PRINCIPE = "SAO TOME E PRINCIPE, ILHAS", SENEGAL = "SENEGAL", SEYCHELLES = "SEYCHELLES", SIERRA_LEONE = "SERRA LEOA", SERBIA = "SERVIA", SINGAPORE = "CINGAPURA", SYRIA = "SIRIA, REPUBLICA ARABE DA", SOMALIA = "SOMALIA", SRI_LANKA = "SRI LANKA", SOUTH_AFRICA = "AFRICA DO SUL", SUDAN = "SUDAO", SWEDEN = "SUECIA", SWITZERLAND = "SUICA", SURINAME = "SURINAME", TAJIKISTAN = "TADJIQUISTAO, REPUBLICA DO", THAILAND = "TAILANDIA", TANZANIA = "TANZANIA, REP.UNIDA DA", BRITISH_INDIAN_OCEAN_TERRITORY = "TERRITORIO BRIT.OC.INDICO", DJIBOUTI = "DJIBUTI", CHAD = "CHADE", CZECH_REPUBLIC = "TCHECA, REPUBLICA", TIMOR_LESTE = "TIMOR LESTE", TOGO = "TOGO", TOKELAU_ISLANDS = "TOQUELAU,ILHAS", TONGA = "TONGA", TRINIDAD_AND_TOBAGO = "TRINIDAD E TOBAGO", TUNISIA = "TUNISIA", TURKS_AND_CAICOS_ISLANDS = "TURCAS E CAICOS,ILHAS", TURKMENISTAN = "TURCOMENISTAO, REPUBLICA DO", TURKEY = "TURQUIA", TUVALU = "TUVALU", UKRAINE = "UCRANIA", UGANDA = "UGANDA", URUGUAY = "URUGUAI", UZBEKISTAN = "UZBEQUISTAO, REPUBLICA DO", VATICAN = "VATICANO, EST.DA CIDADE DO", VENEZUELA = "VENEZUELA", VIETNAM = "VIETNA", BRITISH_VIRGIN_ISLANDS = "VIRGENS,ILHAS (BRITANICAS)", US_VIRGIN_ISLANDS = "VIRGENS,ILHAS (E.U.A.)", FIJI = "FIJI", WAKE_ISLAND = "WAKE, ILHA", CONGO_DEMOCRATIC_REPUBLIC = "CONGO, REPUBLICA DEMOCRATICA DO", ZAMBIA = "ZAMBIA", PANAMA_CANAL_ZONE = "ZONA DO CANAL DO PANAMA", SOUTH_SUDAN = "SUDAO DO SUL", LEBAAN_ISLAND = "LEBUAN,ILHAS", MAYOTTE = "MAYOTTE (ILHAS FRANCESAS)", PALESTINE = "PALESTINA", CURACAO = "CURACAO", SAINT_MARTIN_FRENCH_PART = "SAO MARTINHO, ILHA DE (PARTE FRANCESA)", SAINT_MARTIN_DUTCH_PART = "SAO MARTINHO, ILHA DE (PARTE HOLANDESA)", ESWATINI = "ESWATINI", BONAIRE = "BONAIRE, SAINT EUSTATIUS E SABA" } declare enum CountryCodeEnum { NOT_APPLICABLE = "", AFGHANISTAN = "0132", ALBANIA = "0175", GERMANY = "0230", BURKINA_FASO = "0310", ANDORRA = "0370", ANGOLA = "0400", ANGUILLA = "0418", ANTIGUA_AND_BARBUDA = "0434", NETHERLANDS_ANTILLES = "0477", SAUDI_ARABIA = "0531", ALGERIA = "0590", ARGENTINA = "0639", ARMENIA = "0647", ARUBA = "0655", AUSTRALIA = "0698", AUSTRIA = "0728", AZERBAIJAN = "0736", BAHAMAS = "0779", BAHRAIN = "0809", BANGLADESH = "0817", BARBADOS = "0833", BELARUS = "0850", BELGIUM = "0876", BELIZE = "0884", BERMUDA = "0906", MYANMAR = "0930", BOLIVIA = "0973", BOSNIA_HERZEGOVINA = "0981", BOTSWANA = "1015", BRAZIL = "1058", BRUNEI = "1082", BULGARIA = "1112", BURUNDI = "1155", BHUTAN = "1198", CAPE_VERDE = "1279", CAYMAN_ISLANDS = "1376", CAMBODIA = "1414", CAMEROON = "1457", CANADA = "1490", GUERNSEY = "1504", JERSEY = "1508", CANARY_ISLANDS = "1511", KAZAKHSTAN = "1538", QATAR = "1546", CHILE = "1589", CHINA = "1600", TAIWAN = "1619", CYPRUS = "1635", COCOS_KEELING_ISLANDS = "1651", COLOMBIA = "1694", COMOROS = "1732", CONGO = "1775", COOK_ISLANDS = "1830", NORTH_KOREA = "1872", SOUTH_KOREA = "1902", IVORY_COAST = "1937", CROATIA = "1953", COSTA_RICA = "1961", COVEITE = "1988", CUBA = "1996", BENIN = "2291", DENMARK = "2321", DOMINICA = "2356", ECUADOR = "2399", EGYPT = "2402", ERITREA = "2437", UNITED_ARAB_EMIRATES = "2445", SPAIN = "2453", SLOVENIA = "2461", SLOVAKIA = "2470", UNITED_STATES = "2496", ESTONIA = "2518", ETHIOPIA = "2534", FALKLAND_ISLANDS = "2550", FAROE_ISLANDS = "2593", PHILIPPINES = "2674", FINLAND = "2712", FRANCE = "2755", GABON = "2810", GAMBIA = "2852", GHANA = "2895", GEORGIA = "2917", GIBRALTAR = "2933", GRENADA = "2976", GREECE = "3018", GREENLAND = "3050", GUADELOUPE = "3093", GUAM = "3131", GUATEMALA = "3174", FRENCH_GUIANA = "3255", GUINEA = "3298", EQUATORIAL_GUINEA = "3310", GUINEA_BISSAU = "3344", GUYANA = "3379", HAITI = "3417", HONDURAS = "3450", HONG_KONG = "3514", HUNGARY = "3557", YEMEN = "3573", ISLE_OF_MAN = "3595", INDIA = "3611", INDONESIA = "3654", IRAQ = "3697", IRAN = "3727", IRELAND = "3751", ICELAND = "3794", ISRAEL = "3832", ITALY = "3867", JAMAICA = "3913", JOHNSTON_ISLAND = "3964", JAPAN = "3999", JORDAN = "4030", KIRIBATI = "4111", LAOS = "4200", LESOTHO = "4260", LATVIA = "4278", LEBANON = "4316", LIBERIA = "4340", LIBYA = "4383", LIECHTENSTEIN = "4405", LITHUANIA = "4421", LUXEMBOURG = "4456", MACAU = "4472", MACEDONIA = "4499", MADAGASCAR = "4502", MADEIRA = "4525", MALAYSIA = "4553", MALAWI = "4588", MALDIVES = "4618", MALI = "4642", MALTA = "4677", NORTHERN_MARIANAS = "4723", MOROCCO = "4740", MARSHALL_ISLANDS = "4766", MARTINIQUE = "4774", MAURITIUS = "4855", MAURITANIA = "4880", MIDWAY_ISLANDS = "4901", MEXICO = "4936", MOLDOVA = "4944", MONACO = "4952", MONGOLIA = "4979", MONTENEGRO = "4985", MICRONESIA = "4995", MONTSERRAT = "5010", MOZAMBIQUE = "5053", NAMIBIA = "5070", NAURU = "5088", CHRISTMAS_ISLAND = "5118", NEPAL = "5177", NICARAGUA = "5215", NIGER = "5258", NIGERIA = "5282", NIUE = "5312", NORFOLK_ISLAND = "5355", NORWAY = "5380", NEW_CALEDONIA = "5428", PAPUA_NEW_GUINEA = "5452", NEW_ZEALAND = "5487", VANUATU = "5517", OMAN = "5568", PACIFIC_ISLANDS = "5665", NETHERLANDS = "5738", PALAU = "5754", PAKISTAN = "5762", PANAMA = "5800", PARAGUAY = "5860", PERU = "5894", PITCAIRN_ISLANDS = "5932", FRENCH_POLYNESIA = "5991", POLAND = "6033", PORTUGAL = "6076", PUERTO_RICO = "6114", KENYA = "6238", KYRGYZSTAN = "6254", UNITED_KINGDOM = "6289", CENTRAL_AFRICAN_REPUBLIC = "6408", DOMINICAN_REPUBLIC = "6475", REUNION = "6602", ZIMBABWE = "6653", ROMANIA = "6700", RWANDA = "6750", RUSSIA = "6769", SOLOMON_ISLANDS = "6777", SAINT_KITTS_AND_NEVIS = "6781", WESTERN_SAHARA = "6858", EL_SALVADOR = "6874", SAMOA = "6904", AMERICAN_SAMOA = "6912", SAINT_CHRISTOPHER_AND_NEVIS = "6955", SAN_MARINO = "6971", SAINT_PIERRE_AND_MIQUELON = "7005", SAINT_VINCENT_AND_THE_GRENADINES = "7056", SAINT_HELENA = "7102", SAINT_LUCIA = "7153", SAO_TOME_AND_PRINCIPE = "7200", SENEGAL = "7285", SEYCHELLES = "7315", SIERRA_LEONE = "7358", SERBIA = "7370", SINGAPORE = "7412", SYRIA = "7447", SOMALIA = "7480", SRI_LANKA = "7501", SOUTH_AFRICA = "7560", SUDAN = "7595", SWEDEN = "7641", SWITZERLAND = "7676", SURINAME = "7706", TAJIKISTAN = "7722", THAILAND = "7765", TANZANIA = "7803", BRITISH_INDIAN_OCEAN_TERRITORY = "7820", DJIBOUTI = "7838", CHAD = "7889", CZECH_REPUBLIC = "7919", EAST_TIMOR = "7951", TOGO = "8001", TOKELAU_ISLANDS = "8052", TONGA = "8109", TRINIDAD_AND_TOBAGO = "8150", TUNISIA = "8206", TURKS_AND_CAICOS_ISLANDS = "8230", TURKMENISTAN = "8249", TURKEY = "8273", TUVALU = "8281", UKRAINE = "8311", UGANDA = "8338", URUGUAY = "8451", UZBEKISTAN = "8478", VATICAN_CITY = "8486", VENEZUELA = "8508", VIETNAM = "8583", BRITISH_VIRGIN_ISLANDS = "8630", US_VIRGIN_ISLANDS = "8664", FIJI = "8702", WAKE_ISLAND = "8737", DEMOCRATIC_REPUBLIC_OF_THE_CONGO = "8885", ZAMBIA = "8907", PANAMA_CANAL_ZONE = "8958", SOUTH_SUDAN = "7600", LEBAAN_ISLAND = "4235", MAYOTTE = "4885", PALESTINE = "5780", CURACAO = "2003", SAINT_MARTIN_DUTCH_PART = "0699", SAINT_MARTIN_FRENCH_PART = "6980", ESWATINI = "7544", BONAIRE = "0990" } declare namespace CountryCodeEnum { function normalize(value: string): string; function fromOldValue(value: string): CountryCodeEnum | undefined; function fromNewValue(code: CountryCodeEnum): string | undefined; function getCountryByCode(code: CountryCodeEnum): NameCountryEnum | undefined; } declare enum MunicipalObligationIdEnum { DDS = "DDS", DNR = "DNR", DES_BH = "DES-BH", DST = "DST", DISTRITO_FEDERAL = "DISTRITO_FEDERAL", CAMPINAS = "CAMPINAS", SUMARE = "SUMARE", GOIANIA = "GOIANIA", NFTS_SP = "NFTS", CURITIBA = "CURITIBA", FORTALEZA = "FORTALEZA", NATAL = "NATAL", BAURU = "BAURU", BELEM_PA = "BELEM_PA", RIO_DE_JANEIRO = "RIO_DE_JANEIRO", RECIFE = "RECIFE", SAO_BERNARDO_DO_CAMPO = "SAO_BERNARDO_DO_CAMPO", FLORIANOPOLIS = "FLORIANOPOLIS", CAMPOS_DOS_GOYTACAZES_RJ = "CAMPOS_DOS_GOYTACAZES_RJ" } declare enum MunicipalObligationNameEnum { DES = "DES", ISS = "ISS", ISSE = "ISS-e", NFSE = "NFSe", REST = "REST", DDS = "DDS", DSRE = "DSR-e", NOTA_CARIOCA = "Nota Carioca", NFTS = "NFTS", DST = "DST", DECLARACAO_SERVICOS_CONTRATADOS = "Declara\u00E7\u00E3o de Servi\u00E7os Contratados", GIF_ST = "GIF-ST", GIF_AJUSTE = "GIF-AJUSTE", GISS_ONLINE = "GISS ONLINE" } declare enum MunicipalObligationTypeEnum { NORMAL = "Normal (Original)", CORRECTIVE = "Retificadora (Substitutiva)", COMPLEMENTARY = "Complementar", CANCELLATION = "Cancelamento", ADJUSTMENT = "Ajuste" } declare class MunicipalObligation { protected _id: MunicipalObligationIdEnum; protected _name: MunicipalObligationNameEnum; protected _versions: Set; protected _types: Set; constructor(id: MunicipalObligationIdEnum, name: MunicipalObligationNameEnum, versions: string[], types: MunicipalObligationTypeEnum[]); get id(): MunicipalObligationIdEnum; get name(): MunicipalObligationNameEnum; addVersion(version: string): void; get versions(): string[]; addType(type: MunicipalObligationTypeEnum): void; get types(): string[]; isVersionAvailable(version: string): boolean; } interface ILC116Code { municipal_service_code: string; description: string; aliquot: number; } declare class Municipality { protected _IBGE_code: number; protected _name: string; protected _state: State; protected _ddd: string; protected _siafi_code: string; protected _sedetec_code: string; protected _rest_code: number; protected _municipal_obligations: Map; protected _lc116_codes: Map; constructor(state: State, ibge_code: number, name: string, ddd: string); set siafi_code(siafi_code: string); set sedetec_code(sedetec_code: string); set rest_code(rest_code: number); get municipal_obligations(): MunicipalObligation[]; get IBGE_code(): number; get name(): string; get uf(): State; get ddd(): string; get siafi_code(): string; get sedetec_code(): string; get rest_code(): number; addMunicipalObligation(obligation: MunicipalObligation): void; getMunicipalObligationById(obligationId: string): MunicipalObligation; setLC116Codes(codes: Map): void; hasLC116Codes(): boolean; getLC116CodeInfo(lc116Code: string): ILC116Code | undefined; getLC116EquivalentCode(lc116Code: string): string; } declare enum StateEnum { Acre = "AC", Alagoas = "AL", Amapa = "AP", Amazonas = "AM", Bahia = "BA", Ceara = "CE", Distrito_Federal = "DF", Espirito_Santo = "ES", Goias = "GO", Maranhao = "MA", Mato_Grosso = "MT", Mato_Grosso_do_Sul = "MS", Minas_Gerais = "MG", Para = "PA", Paraiba = "PB", Parana = "PR", Pernambuco = "PE", Piaui = "PI", Rio_de_Janeiro = "RJ", Rio_Grande_do_Norte = "RN", Rio_Grande_do_Sul = "RS", Rondonia = "RO", Roraima = "RR", Santa_Catarina = "SC", Sao_Paulo = "SP", Sergipe = "SE", Tocantins = "TO", Empty = "" } declare function parseState(value: string | null | undefined): StateEnum; declare class State { protected _uf: StateEnum; protected _code: number; protected _name: string; protected _municipalities: Map; constructor(uf: StateEnum, code: number, name: string); get uf(): StateEnum; get code(): number; get name(): string; addMunicipality(municipality: Municipality): void; get municipalities(): Municipality[]; getMunicipalityByIBGECode(ibge_code: number): Municipality | undefined; } declare class ServiceCode { protected _code: ServiceCodeEnum; protected _description: string; constructor(code: ServiceCodeEnum, description: string); get code(): string; get description(): string; } declare class Country { protected _code: number; protected _name: string; constructor(code: number, name: string); get code(): number; get name(): string; } interface Repository { getAllStates(): State[]; getAllMunicipalities(): Municipality[]; getStateByUF(uf: string): State | undefined; getMunicipalityByIBGECode(ibge_code: number): Municipality | undefined; getMunicipalitiesWithMunicipalObligation(): Municipality[]; getAllServiceCodes(): ServiceCode[]; getServiceCodeByCode(code: string): ServiceCode | undefined; getAllCountries(): Country[]; getCountryByCode(code: number): Country | undefined; } declare class MemoryMasterDataRepository implements Repository { private static instance; private states; private municipalities; private serviceCodes; private countries; private constructor(); static getInstance(): MemoryMasterDataRepository; private loadData; getAllServiceCodes(): ServiceCode[]; getServiceCodeByCode(code: string): ServiceCode | undefined; getAllMunicipalities(): Municipality[]; getAllStates(): State[]; getMunicipalitiesWithMunicipalObligation(): Municipality[]; getMunicipalityByIBGECode(ibge_code: number): Municipality | undefined; getStateByUF(uf: string): State | undefined; getAllCountries(): Country[]; getCountryByCode(code: number): Country | undefined; } declare class Address implements Cloneable { private _id; private _neighborhood; private _municipality; private _country; private _postal_code; private _supplement; private _state; private _street; private _number; private _telephone; private _category; private _isMain; set id(value: string); get id(): string; get neighborhood(): string; set neighborhood(value: string); get municipality_code(): string; get municipality_code_number(): number; set municipality_code(value: string); get municipality(): Municipality | undefined; set municipality(value: Municipality | undefined); get country_code(): CountryCodeEnum; set country_code(value: CountryCodeEnum); get country(): Country | undefined; set country(value: Country | undefined); get postal_code(): string; set postal_code(value: string); get supplement(): string; set supplement(value: string); get state(): StateEnum; set state(value: StateEnum); get stateObject(): State | undefined; set stateObject(value: State | undefined); get street(): string; set street(value: string); get number(): string; set number(value: string); get telephone(): string; set telephone(value: string); clone(): this; get category(): string; set category(value: string); get isMain(): boolean; set isMain(value: boolean); } declare enum CodeStatusEnum { AUTHORIZED = "00", EXTEMPORANEOUS_AUTHORIZED = "01", CANCELLED = "02", EXTEMPORANEOUS_CANCELLED = "03", LATE_REGULARIZED = "04", LATE_CANCELLED = "05", COMPLEMENTARY = "06", EXTEMPORANEOUS_COMPLEMENTARY = "07", SPECIAL_REGIME = "08", REPLACED = "09", NOT_APPLICABLE = "" } declare namespace CodeStatusEnum { function fromOldValue(value: string): CodeStatusEnum | undefined; function fromNewValue(value: CodeStatusEnum): string | undefined; } declare enum CteTypeEnum { NORMAL = "0", VALUE_COMPLEMENT = "1", REPLACEMENT = "3", METROPOLITAN_TRANSPORT = "4", SIMPLIFIED = "5", SIMPLIFIED_REPLACEMENT = "6", NOT_APPLICABLE = "" } declare namespace CteTypeEnum { function fromOldValue(value: string): CteTypeEnum | undefined; function fromNewValue(value: CteTypeEnum): string | undefined; } declare enum DocumentTypeEnum { nfe = "nfe", nfce = "nfce", nf = "nf", nfse = "nfse", others = "others", cte = "cte", cce = "cce", nfs = "nfs", payment = "payment", receipt = "receipt", base = "base" } declare namespace DocumentTypeEnum { function fromOldValue(value: string): DocumentTypeEnum | undefined; function fromNewValue(value: DocumentTypeEnum): string | undefined; } declare enum FreightTypeEnum { BY_ISSUER = "Frete por conta do remetente (CIF)", BY_RECIPIENT = "Frete por conta do destinat\u00E1rio (FOB)", THIRD_PARTY = "Frete por conta de terceiros", OWN_TRANSPORT_BY_ISSUER = "Transporte pr\u00F3prio por conta do remetente", OWN_TRANSPORT_BY_RECIPIENT = "Transporte pr\u00F3prio por conta do destinat\u00E1rio", NO_TRANSPORT = "Sem ocorr\u00EAncia de transporte", NOT_APPLICABLE = "" } declare namespace FreightTypeEnum { function fromOldValue(value: string): FreightTypeEnum | undefined; function fromNewValue(value: FreightTypeEnum): string | undefined; } declare enum FreightTypeCodeEnum { BY_ISSUER = "0", BY_RECIPIENT = "1", THIRD_PARTY = "2", OWN_TRANSPORT_BY_ISSUER = "3", OWN_TRANSPORT_BY_RECIPIENT = "4", NO_TRANSPORT = "9", NOT_APPLICABLE = "" } declare namespace FreightTypeCodeEnum { function fromOldValue(value: string): FreightTypeCodeEnum | undefined; function fromNewValue(value: FreightTypeCodeEnum): string | undefined; } declare enum IssuerIndicatorEnum { OWN_ISSUANCE = "0", THIRD_PARTY_ISSUANCE = "1", NOT_APPLICABLE = "" } declare namespace IssuerIndicatorEnum { function fromOldValue(value: number): IssuerIndicatorEnum | undefined; function fromNewValue(value: IssuerIndicatorEnum): number | undefined; } declare enum OperationTypeEnum { INBOUND = "input", OUTBOUND = "output", NOT_APPLICABLE = "" } declare namespace OperationTypeEnum { function fromOldValue(value: string): OperationTypeEnum | undefined; function fromNewValue(value: OperationTypeEnum): string | undefined; } declare enum PaymentTypeEnum { CASH = "\u00C0 vista", INSTALLMENTS = "A prazo", OTHER = "Outros", NOT_APPLICABLE = "" } declare namespace PaymentTypeEnum { function fromOldValue(value: string): PaymentTypeEnum | undefined; function fromNewValue(value: PaymentTypeEnum): string | undefined; } declare enum RevenueTypeEnum { OWN_SERVICES_PROVIDED = "0", OWN_DEBT_COLLECTION = "1", OWN_PREPAID_SERVICE_PAST_BILLING = "2", OWN_PREPAID_SERVICE_CURRENT_BILLING = "3", OTHER_OWN_COMMUNICATION_REVENUES = "4", OWN_CO_BILLING = "5", OWN_SERVICES_TO_BILL_FUTURE = "6", OTHER_OWN_NON_CUMULATIVE_REVENUES = "7", OTHER_THIRD_PARTY_REVENUES = "8", OTHER_REVENUES = "9", NOT_APPLICABLE = "" } declare namespace RevenueTypeEnum { function fromOldValue(value: string): RevenueTypeEnum | undefined; function fromNewValue(value: RevenueTypeEnum): string | undefined; } declare enum StatusDocumentEnum { SUCCESS = 1, ERROR = 2, WARNING = 3, NOT_APPLICABLE = 0 } declare namespace StatusDocumentEnum { function fromOldValue(value: string): StatusDocumentEnum | undefined; function fromNewValue(value: StatusDocumentEnum): string | undefined; } declare class ConversionFactor implements Cloneable { private _unit; private _multiply; private _barcode; get unit(): string; set unit(value: string); get multiply(): number; set multiply(value: number); get barcode(): string; set barcode(value: string); clone(): this; } declare enum FreightContractedNatureIndicatorEnum { SALE_SELLER_BEARING_COST = "0", SALE_BUYER_BEARING_COST = "1", PURCHASE_WITH_CREDIT = "2", PURCHASE_WITHOUT_CREDIT = "3", FINISHED_PRODUCT_TRANSFER = "4", IN_PROCESS_PRODUCT_TRANSFER = "5", OTHERS = "9", NOT_APPLICABLE = "" } declare namespace FreightContractedNatureIndicatorEnum { function fromOldValue(value: string): FreightContractedNatureIndicatorEnum | undefined; function fromNewValue(value: FreightContractedNatureIndicatorEnum): string | undefined; } declare enum ItemTypeEnum { GOODS_FOR_RESALE = "00", RAW_MATERIAL = "01", PACKAGING = "02", PRODUCT_IN_PROCESS = "03", FINISHED_PRODUCT = "04", BYPRODUCT = "05", INTERMEDIATE_PRODUCT = "06", CONSUMABLE_MATERIAL = "07", FIXED_ASSET = "08", SERVICES = "09", OTHER_INPUTS = "10", OTHERS = "99", NOT_APPLICABLE = "" } declare namespace ItemTypeEnum { function fromOldValue(value: string): ItemTypeEnum | undefined; function fromNewValue(value: ItemTypeEnum): string | undefined; } declare enum ServiceCodeEnum { SOFTWARE_DEVELOPMENT = "01.01", PROGRAMMING = "01.02", DATA_PROCESSING = "01.03", SOFTWARE_CREATION = "01.04", SOFTWARE_LICENSING = "01.05", IT_CONSULTING = "01.06", TECH_SUPPORT = "01.07", WEBSITE_DEVELOPMENT = "01.08", DIGITAL_CONTENT_PROVISION = "01.09", RESEARCH_AND_DEVELOPMENT = "02.01", RENTAL_CONSTRUCTIONS = "03.01", BRAND_USAGE_RIGHTS = "03.02", EVENT_VENUE_RENTAL = "03.03", INFRASTRUCTURE_RENTAL = "03.04", TEMP_STRUCTURE_RENTAL = "03.05", MEDICINE_AND_BIOMEDICINE = "04.01", CLINICAL_ANALYSIS = "04.02", MEDICAL_CLINICS = "04.03", SURGICAL_INSTRUMENTATION = "04.04", ACUPUNCTURE = "04.05", NURSING_SERVICES = "04.06", PHARMACY_SERVICES = "04.07", THERAPIES_AND_SPEECH = "04.08", ANY_THERAPIES = "04.09", NUTRITION = "04.10", OBSTETRICS = "04.11", DENTAL_SERVICES = "04.12", ORTHOPTICS = "04.13", CUSTOM_PROSTHESES = "04.14", PSYCHOANALYSIS = "04.15", PSYCHOLOGY = "04.16", CARE_FACILITIES = "04.17", IN_VITRO_FERTILIZATION = "04.18", BIOLOGICAL_BANKS = "04.19", BIOLOGICAL_COLLECTION = "04.20", MOBILE_HEALTH_UNITS = "04.21", HEALTH_PLANS = "04.22", THIRD_PARTY_HEALTH_PLANS = "04.23", VETERINARY_MEDICINE = "05.01", VETERINARY_CLINICS = "05.02", VETERINARY_LABS = "05.03", VETERINARY_REPRODUCTION = "05.04", VET_BLOOD_ORGAN_BANKS = "05.05", VET_BIO_COLLECTION = "05.06", VET_MOBILE_UNITS = "05.07", PET_CARE_AND_TRAINING = "05.08", VET_INSURANCE_PLANS = "05.09", BARBER_AND_HAIRDRESSER = "06.01", BEAUTY_TREATMENTS = "06.02", MASSAGES_AND_SAUNAS = "06.03", PHYSICAL_ACTIVITIES = "06.04", WEIGHT_LOSS_CENTERS = "06.05", BODY_ART_SERVICES = "06.06", ENGINEERING_AND_ARCHITECTURE = "07.01", CIVIL_WORKS_EXECUTION = "07.02", ENGINEERING_PROJECTS = "07.03", DEMOLITION_SERVICES = "07.04", REPAIR_AND_MAINTENANCE = "07.05", INSTALLATIONS = "07.06", FLOOR_TREATMENT = "07.07", CAULKING = "07.08", WASTE_MANAGEMENT = "07.09", PUBLIC_CLEANING = "07.10", GARDENING_AND_TREE_PRUNING = "07.11", WATER_TREATMENT = "07.12", PEST_CONTROL = "07.13", FORESTRY_AND_SEEDING = "07.16", SLOPE_CONTAINMENT = "07.17", DREDGING_SERVICES = "07.18", WORK_SUPERVISION = "07.19", GEO_SURVEYS_AND_MAPPING = "07.20", RESOURCE_EXPLORATION = "07.21", CLOUD_SEEDING = "07.22", REGULAR_EDUCATION = "08.01", TRAINING_AND_PEDAGOGY = "08.02", CREDIT_ANALYSIS = "08.03", HOTEL_ACCOMMODATION = "09.01", TOURISM_AGENCY_SERVICES = "09.02", TOUR_GUIDING = "09.03", SURVEYING_SERVICES = "09.04", BROKERAGE_EXCHANGE_INSURANCE_CARDS = "10.01", BROKERAGE_SECURITIES = "10.02", BROKERAGE_INTELLECTUAL_PROPERTY = "10.03", BROKERAGE_LEASING_FRANCHISE_FACTORING = "10.04", BROKERAGE_MOVABLE_IMMOVABLE_ASSETS = "10.05", MARITIME_AGENCY = "10.06", NEWS_AGENCY = "10.07", ADVERTISING_AGENCY = "10.08", GENERAL_REPRESENTATION = "10.09", THIRD_PARTY_DISTRIBUTION = "10.10", VEHICLE_PARKING = "11.01", SECURITY_AND_MONITORING = "11.02", ESCORT_SERVICES = "11.03", STORAGE_AND_HANDLING = "11.04", REMOTE_MONITORING_TRACKING = "11.05", THEATER_SHOWS = "12.01", CINEMA_SCREENINGS = "12.02", CIRCUS_SHOWS = "12.03", AUDITORIUM_PROGRAMS = "12.04", AMUSEMENT_PARKS = "12.05", NIGHTCLUBS_AND_SIMILAR = "12.06", ENTERTAINMENT_SHOWS = "12.07", FAIRS_AND_CONGRESSES = "12.08", GAMES_AND_RECREATION = "12.09", ANIMAL_RACES = "12.10", SPORTS_COMPETITIONS = "12.11", MUSIC_PERFORMANCE = "12.12", EVENT_PRODUCTION = "12.13", MUSIC_TRANSMISSION = "12.14", CARNIVAL_PARADES = "12.15", SHOWS_BROADCASTING = "12.16", PARTY_RECREATION_SERVICES = "12.17", TELECOMMUNICATIONS = "13.01", AUDIO_RECORDING = "13.02", PHOTO_AND_CINEMATOGRAPHY = "13.03", REPROGRAPHY_AND_DIGITALIZATION = "13.04", GRAPHIC_COMPOSITION = "13.05", MAINTENANCE_SERVICES_THIRD_PARTY = "14.01", TECHNICAL_ASSISTANCE = "14.02", ENGINE_RECONDITIONING = "14.03", TIRE_RETREADING = "14.04", RESTORATION_AND_FINISHING = "14.05", EQUIPMENT_INSTALLATION = "14.06", FRAME_PLACEMENT = "14.07", BOOK_BINDING = "14.08", TAILORING_WITH_CLIENT_MATERIAL = "14.09", LAUNDRY_AND_DYEING = "14.10", UPHOLSTERY_REPAIR = "14.11", BODYWORK_AND_PANELING = "14.12", CARPENTRY_AND_METALWORK = "14.13", TOWING_LIFTING_SERVICES = "14.14", FUND_AND_ACCOUNT_MANAGEMENT = "15.01", ACCOUNT_OPENING_AND_MAINTENANCE = "15.02", SAFE_BOX_AND_TERMINAL_RENTAL = "15.03", CERTIFICATE_ISSUANCE = "15.04", REGISTRY_MANAGEMENT = "15.05", DOCUMENT_HANDLING = "15.06", ACCOUNT_SERVICES_ANY_MEANS = "15.07", CREDIT_CONTRACT_SERVICES = "15.08", LEASING_SERVICES = "15.09", COLLECTION_AND_PAYMENT_SERVICES = "15.10", TITLE_MANAGEMENT = "15.11", CUSTODY_SERVICES = "15.12", FOREX_AND_RELATED_SERVICES = "15.13", CARD_SERVICES = "15.14", CHECKS_AND_WITHDRAWALS = "15.15", PAYMENT_ORDERS_AND_TRANSFERS = "15.16", CHECK_SERVICES = "15.17", REAL_ESTATE_CREDIT_SERVICES = "15.18", MUNICIPAL_TRANSPORT = "16.01", VEHICLE_REPAIR = "16.02", GENERAL_CONSULTING_SERVICES = "17.01", TYPING_AND_SECRETARIAL = "17.02", PLANNING_AND_COORDINATION = "17.03", RECRUITING_AND_STAFFING = "17.04", TEMPORARY_LABOR_SUPPLY = "17.05", MARKETING_AND_ADVERTISING = "17.06", FRANCHISING = "17.08", TECHNICAL_INSPECTIONS = "17.09", EVENT_ORGANIZATION = "17.10", PARTY_AND_CATERING = "17.11", GENERAL_ADMINISTRATION = "17.12", AUCTIONS = "17.13", LEGAL_SERVICES = "17.14", ARBITRATION = "17.15", AUDITING = "17.16", METHOD_ANALYSIS = "17.17", ACTUARY_AND_CALCULATIONS = "17.18", ACCOUNTING_SERVICES = "17.19", FINANCIAL_CONSULTING = "17.20", STATISTICS = "17.21", COLLECTION_SERVICES = "17.22", FACTORING_SUPPORT = "17.23", LECTURES_AND_CONFERENCES = "17.24", AD_INSERTION = "17.25", INSURANCE_RISK_MANAGEMENT = "18.01", LOTTERY_AND_GAMBLING_DISTRIBUTION = "19.01", PORT_AND_MARITIME_SERVICES = "20.01", AIRPORT_SERVICES = "20.02", TERMINAL_TRANSPORT_SERVICES = "20.03", PUBLIC_REGISTRY_AND_NOTARY = "21.01", HIGHWAY_OPERATION_SERVICES = "22.01", VISUAL_COMMUNICATION_AND_INDUSTRIAL_DESIGN = "23.01", SIGNAGE_AND_KEYMAKING_SERVICES = "24.01", FUNERAL_SERVICES = "25.01", CREMATION_SERVICES = "25.02", FUNERAL_PLANS = "25.03", GRAVE_AND_CEMETERY_MAINTENANCE = "25.04", CEMETERY_SPACE_CONCESSION = "25.05", MAIL_AND_DELIVERY_SERVICES = "26.01", SOCIAL_ASSISTANCE_SERVICES = "27.01", GOODS_AND_SERVICES_EVALUATION = "28.01", LIBRARY_SCIENCE_SERVICES = "29.01", BIOLOGY_BIOTECH_CHEMISTRY_SERVICES = "30.01", TECHNICAL_ENGINEERING_SERVICES = "31.01", TECHNICAL_DRAWING_SERVICES = "32.01", CUSTOMS_CLEARANCE_AND_BROKERAGE = "33.01", PRIVATE_INVESTIGATION_SERVICES = "34.01", JOURNALISM_AND_PUBLIC_RELATIONS = "35.01", METEOROLOGY_SERVICES = "36.01", ARTISTS_AND_MODELS_SERVICES = "37.01", MUSEOLOGY_SERVICES = "38.01", GOLDSMITH_AND_LAPIDARY_SERVICES = "39.01", COMMISSIONED_ARTWORK = "40.01", NOT_APPLICABLE = "" } declare namespace ServiceCodeEnum { function fromOldValue(value: string): ServiceCodeEnum | undefined; function fromNewValue(value: ServiceCodeEnum): string | undefined; } declare enum TaxTypeEnum { NOT_APPLICABLE = "", ICMS = "ICMS", ICMS_ST = "ICMS_ST", DIFAL_87_15 = "DIFAL_87_15", DIFAL_INBOUND = "DIFAL_INBOUND", ICMS_OUTRAS_UFS = "ICMS_OUTRAS_UFS", ICMS_PRESUMED_CREDIT = "ICMS_CREDITO_PRESUMIDO", IPI = "IPI", PIS = "PIS", PIS_ST = "PIS_ST", COFINS = "COFINS", COFINS_ST = "COFINS_ST", IMPORT_TAX = "IMPORT_TAX", INSS = "INSS", ISS = "ISS", IR = "IR", IRPJ = "IRPJ", IRRF = "IRRF", CSRF = "CSRF", CSLL = "CSLL", CIDE = "CIDE", IS = "IS", IBS_UF = "IBS_UF", IBS_UF_DEFERRAL = "IBS_UF_DEFERRAL", IBS_UF_RETURNED = "IBS_UF_RETURNED", IBS_UF_REDUCTION = "IBS_UF_REDUCTION", IBS_MONO = "IBS_MONO", IBS_MONO_DEFERRAL = "IBS_MONO_DEFERRAL", IBS_MONO_PREVIOUSLY = "IBS_MONO_PREVIOUSLY", IBS_TRANSFER = "IBS_TRANSFER", IBS_ADJUSTMENT = "IBS_ADJUSTMENT", IBS_REFUND = "IBS_REFUND", IBS_PRESUMED = "IBS_PRESUMED", IBS_MUN = "IBS_MUN", IBS_MUN_DEFERRAL = "IBS_MUN_DEFERRAL", IBS_MUN_RETURNED = "IBS_MUN_RETURNED", IBS_MUN_REDUCTION = "IBS_MUN_REDUCTION", CBS = "CBS", CBS_DEFERRAL = "CBS_DEFERRAL", CBS_RETURNED = "CBS_RETURNED", CBS_REDUCTION = "CBS_REDUCTION", CBS_MONO = "CBS_MONO", CBS_MONO_DEFERRAL = "CBS_MONO_DEFERRAL", CBS_MONO_PREVIOUSLY = "CBS_MONO_PREVIOUSLY", CBS_TRANSFER = "CBS_TRANSFER", CBS_ADJUSTMENT = "CBS_ADJUSTMENT", CBS_REFUND = "CBS_REFUND", CBS_PRESUMED = "CBS_PRESUMED" } declare class AccountingDocument implements Cloneable { private _id; private _number; get id(): string; set id(value: string); get number(): string; set number(value: string); clone(): this; } declare enum LayoutDateFormat { ISO_8601 = "YYYY-MM-DDTHH:mm:ssZ", RFC_3339 = "YYYY-MM-DDTHH:mm:ssZ", RFC_2822 = "ddd, DD MMM YYYY HH:mm:ss Z", RFC_1123 = "ddd, DD MMM YYYY HH:mm:ss Z", RFC_850 = "dddd, DD-MMM-YY HH:mm:ss Z", HTTP_DATE = "ddd, DD MMM YYYY HH:mm:ss Z", BR_DATE = "DD/MM/YYYY", US_DATE = "MM/DD/YYYY", EU_DATE = "YYYY-MM-DD", TIME_24H = "HH:mm:ss", TIME_12H = "hh:mm:ss a", FULL_PTB = "dddd, D de MMMM de YYYY", EXTENDED_TZ = "YYYY-MM-DDTHH:mm:ss zzzz (z) [tzzz] Z", BR_GOVERNMENT_FILE_DATE = "DDMMYYYY" } declare class OurDate extends Date { isZero(): boolean; isWeekend(): boolean; getMonthNumber(): number; private static pad; private static hour12; private static getAMPM; private static getMonthName; private static getWeekdayName; private static getTimeZoneId; private static getTimeZoneNameLong; private static getTimeZoneShort; private static getTimeZoneOffset; format(layout: string, locale?: string): string; } declare enum IntermediationTypeEnum { OWN_ACCOUNT = 1, ACCOUNT_AND_ORDER = 2, ON_BEHALF = 3, NOT_APPLICABLE = 0 } declare namespace IntermediationTypeEnum { function fromOldValue(value: string): IntermediationTypeEnum | undefined; function fromNewValue(value: IntermediationTypeEnum): string | undefined; } declare enum InternationalTransportTypeEnum { MARITIME = 1, FLUVIAL = 2, LACUSTRINE = 3, AIR = 4, POSTAL = 5, RAIL = 6, ROAD = 7, PIPELINE_NETWORK = 8, OWN_MEANS = 9, VIRTUAL_ENTRY_EXIT = 10, COURIER = 11, HANDCARRY = 12, NOT_APPLICABLE = 0 } declare namespace InternationalTransportTypeEnum { function fromOldValue(value: string): InternationalTransportTypeEnum | undefined; function fromNewValue(value: InternationalTransportTypeEnum): string | undefined; } declare class ImportDeclaration implements Cloneable { private _number; private _code; private _pis_amount; private _cofins_amount; private _drawback_concession_number; private _date_registration; private _customs_clearance_location; private _customs_clearance_state; private _customs_clearance_date; private _international_transport_type; private _exporter_code; private _afrmm_amount; private _intermediation_type; private _acquirer_cnpj; private _acquirer_state; private _additions; get number(): string; set number(value: string); get code(): string; set code(value: string); get pis_amount(): number; set pis_amount(value: number); get cofins_amount(): number; set cofins_amount(value: number); get drawback_concession_number(): string; set drawback_concession_number(value: string); get date_registration(): OurDate; set date_registration(value: OurDate); get customs_clearance_location(): string; set customs_clearance_location(value: string); get customs_clearance_state(): string; set customs_clearance_state(value: string); get customs_clearance_date(): OurDate; set customs_clearance_date(value: OurDate); get international_transport_type(): InternationalTransportTypeEnum; set international_transport_type(value: InternationalTransportTypeEnum); get exporter_code(): string; set exporter_code(value: string); get afrmm_amount(): number; set afrmm_amount(value: number); get intermediation_type(): IntermediationTypeEnum; set intermediation_type(value: IntermediationTypeEnum); get acquirer_cnpj(): string; set acquirer_cnpj(value: string); get acquirer_state(): string; set acquirer_state(value: string); get additions(): Addition[]; set additions(value: Addition[]); clone(): this; } declare enum ProductOriginEnum { NATIONAL_EXCEPT = "0", FOREIGN_DIRECT_IMPORT = "1", FOREIGN_DOMESTIC_MARKET = "2", NATIONAL_IMPORT_CONTENT_40_70 = "3", NATIONAL_BASIC_PRODUCTION_PROCESSES = "4", NATIONAL_IMPORT_CONTENT_UP_TO_40 = "5", FOREIGN_DIRECT_IMPORT_NO_DOMESTIC_SIMILAR = "6", FOREIGN_DOMESTIC_MARKET_NO_DOMESTIC_SIMILAR = "7", NATIONAL_IMPORT_CONTENT_OVER_70 = "8", NOT_APPLICABLE = "" } declare namespace ProductOriginEnum { function fromOldValue(value: string): ProductOriginEnum | undefined; function fromNewValue(value: ProductOriginEnum): string | undefined; } declare enum EnforceabilityOfISSEnum { TAXABLE_IN_MUNICIPALITY = 1, NON_INCIDENCE = 2, EXEMPT = 3, EXPORT = 4, IMMUNITY = 5, NOT_APPLICABLE = 0 } declare namespace EnforceabilityOfISSEnum { function fromOldValue(value: string): EnforceabilityOfISSEnum | undefined; function fromNewValue(value: EnforceabilityOfISSEnum): string | undefined; } declare enum DifalIcmsCategoryEnum { INTER = 1, INTRA = 2, NOT_APPLICABLE = 0 } declare enum DonationIndicatorEnum { DONATION = 1, NOT_APPLICABLE = 0 } declare enum ZfmPresumedCreditTypeEnum { NO_PRESUMED_CREDIT = "0", FINAL_CONSUMER_GOODS = "1", CAPITAL_GOODS = "2", INTERMEDIATE_GOODS = "3", IT_AND_LEGAL_DEFINED_GOODS = "4", NOT_APPLICABLE = "" } declare class Tax implements Cloneable { private _id; private _category; private _rate; private _rate_inter; private _rate_intra; private _classification_code; private _product_origin; private _other_base_value; private _exempt_non_taxed_base; private _value; private _non_taxable_value; private _base_amount; private _fcp_st_value; private _fcp_value; private _fcp_base; private _fcp_rate; private _base_deduction_value; private _withholding_tax; private _customs_expense_value; private _value_iof; private _triggering_fact; private _revenue_code; private _enforceability_of_iss; private _increased_rate; private _base_fcp_destination; private _rate_fcp_destination; private _fcp_value_destination; private _interstate_icms_tax_rate; private _icms_value_origin_uf; private _difal_icms_category; private _donation_indicator; private _tax_classification_code; private _zfm_presumed_credit_type; get id(): string; set id(value: string); get category(): TaxTypeEnum; set category(value: TaxTypeEnum); get rate(): number; set rate(value: number); get rate_inter(): number; set rate_inter(value: number); get rate_intra(): number; set rate_intra(value: number); get classification_code(): string; set classification_code(value: string); get product_origin(): ProductOriginEnum; set product_origin(value: ProductOriginEnum); get other_base_value(): number; set other_base_value(value: number); get exempt_non_taxed_base(): number; set exempt_non_taxed_base(value: number); get tax_value(): number; get value(): number; set value(value: number); get non_taxable_value(): number; set non_taxable_value(value: number); get base_amount(): number; set base_amount(value: number); get fcp_st_value(): number; set fcp_st_value(value: number); get fcp_value(): number; set fcp_value(value: number); get fcp_base(): number; set fcp_base(value: number); get fcp_rate(): number; set fcp_rate(value: number); get fcp_st_base_amount(): number; get base_deduction_value(): number; set base_deduction_value(value: number); get withholding_tax(): boolean; set withholding_tax(value: boolean); get base_fcp_destination(): number; set base_fcp_destination(value: number); get rate_fcp_destination(): number; set rate_fcp_destination(value: number); get fcp_value_destination(): number; set fcp_value_destination(value: number); get interstate_icms_tax_rate(): number; set interstate_icms_tax_rate(value: number); get icms_value_origin_uf(): number; set icms_value_origin_uf(value: number); get customs_expense_value(): number; set customs_expense_value(value: number); get value_iof(): number; set value_iof(value: number); get triggering_fact(): string; set triggering_fact(value: string); get revenue_code(): string; set revenue_code(value: string); get enforceability_of_iss(): EnforceabilityOfISSEnum; set enforceability_of_iss(value: EnforceabilityOfISSEnum); get increased_rate(): number; set increased_rate(value: number); set difal_icms_category(value: DifalIcmsCategoryEnum); get difal_icms_category(): DifalIcmsCategoryEnum; set donation_indicator(value: DonationIndicatorEnum); get donation_indicator(): DonationIndicatorEnum; set tax_classification_code(value: string); get tax_classification_code(): string; set zfm_presumed_credit_type(value: ZfmPresumedCreditTypeEnum); get zfm_presumed_credit_type(): ZfmPresumedCreditTypeEnum; clone(): this; } declare class Item implements Cloneable { private _id; private _cfop; private _previous_code; private _cest_code; private _code; private _classification_code; private _service_activity_code; private _account_code; private _barcode; private _municipal_tax_code; private _freight_contracted_nature_indicator; private _cost_center_code; private _genre_code; private _destination_municipality_code; private _origin_municipality_code; private _iss_incidence_municipality_code; private _service_municipality_code; private _service_code; private _ex_code; private _ncm_code; private _description; private _operation_nature_description; private _service_list; private _type; private _number; private _stock_unit; private _stock_quantity; private _total_amount; private _commercial_unit; private _commercial_quantity; private _accessory_expenses_value; private _non_taxable_deduction_value; private _discount_value; private _freight_value; private _insurance_value; private _third_party_value; private _accounting_value; private _taxes; private _import_declaration; private _conversion_factor; private _imported; private _accounting_document; get id(): string; set id(value: string); get cfop(): string; set cfop(value: string); get previous_code(): string; set previous_code(value: string); get description(): string; set description(value: string); get cest_code(): string; set cest_code(value: string); get code(): string; set code(value: string); get classification_code(): string; set classification_code(value: string); get service_activity_code(): string; set service_activity_code(value: string); get account_code(): string; set account_code(value: string); get accounting_document(): AccountingDocument; set accounting_document(value: AccountingDocument); get barcode(): string; set barcode(value: string); get municipal_tax_code(): string; set municipal_tax_code(value: string); get freight_contracted_nature_indicator(): FreightContractedNatureIndicatorEnum; set freight_contracted_nature_indicator(value: FreightContractedNatureIndicatorEnum); get cost_center_code(): string; set cost_center_code(value: string); get genre_code(): string; set genre_code(value: string); get destination_municipality_code(): string; set destination_municipality_code(value: string); get origin_municipality_code(): string; set origin_municipality_code(value: string); get iss_incidence_municipality_code(): string; set iss_incidence_municipality_code(value: string); get service_municipality_code(): string; set service_municipality_code(value: string); get service_code(): string; set service_code(value: string); get ex_code(): string; set ex_code(value: string); get ncm_code(): string; set ncm_code(value: string); get operation_nature_description(): string; set operation_nature_description(value: string); get service_list(): ServiceCodeEnum; set service_list(value: ServiceCodeEnum); get type(): ItemTypeEnum; set type(value: ItemTypeEnum); get number(): number; set number(value: number); get stock_unit(): string; set stock_unit(value: string); get stock_quantity(): number; set stock_quantity(value: number); get total_amount(): number; set total_amount(value: number); get commercial_unit(): string; set commercial_unit(value: string); get commercial_quantity(): number; set commercial_quantity(value: number); get accessory_expenses_value(): number; set accessory_expenses_value(value: number); get non_taxable_deduction_value(): number; set non_taxable_deduction_value(value: number); get discount_value(): number; set discount_value(value: number); get freight_value(): number; set freight_value(value: number); get insurance_value(): number; set insurance_value(value: number); get third_party_value(): number; set third_party_value(value: number); get taxes(): Tax[]; set taxes(value: Tax[]); get import_declaration(): ImportDeclaration; set import_declaration(value: ImportDeclaration); get conversion_factor(): ConversionFactor; set conversion_factor(value: ConversionFactor); getWithholdingTaxes(): Tax[]; getNonWithholdingTaxes(): Tax[]; getTaxByCategory(category: TaxTypeEnum, withhold: boolean): Tax | null; clone(): this; get imported(): boolean; set imported(value: boolean); get accounting_value(): number; set accounting_value(value: number); private isCSRFCompatible; getCSRF(): Tax | null; getCSRFTaxesComposition(): Tax[] | null; } declare enum StateRegistrationIndicatorEnum { CONTRIBUTOR = "1", EXEMPT = "2", NON_CONTRIBUTOR = "9", NOT_APPLICABLE = "" } declare namespace StateRegistrationIndicatorEnum { function fromOldValue(value: string): StateRegistrationIndicatorEnum | undefined; function fromNewValue(value: StateRegistrationIndicatorEnum): string | undefined; } declare enum TaxRegimeEnum { NOT_APPLICABLE = "", SIMPLES_NACIONAL = "1", SIMPLES_NACIONAL_EXCESSO = "2", REGIME_NORMAL = "3", MEI = "4" } declare namespace TaxRegimeEnum { function fromOldValue(value: string): TaxRegimeEnum; function fromNewValue(value: TaxRegimeEnum): string; } interface IdentificationNumber { isValid(): boolean; get rawValue(): string; get formattedValue(): string; validationErrors(): string[]; } declare class Email { private readonly _value; constructor(value: string); isValid(): boolean; validationErrors(): string[]; get rawValue(): string; get validValue(): string; } declare class Person implements Cloneable { private _identification_number; private _name; private _state_registration_number; private _municipal_registration_number; private _suframa_registration_number; private _state_registration_indicator; private _taxation_regime; private _cnae; private _address; private _email; get name(): string; set name(value: string); get state_registration_number(): string; set state_registration_number(value: string); get municipal_registration_number(): string; set municipal_registration_number(value: string); get suframa_registration_number(): string; set suframa_registration_number(value: string); get state_registration_indicator(): StateRegistrationIndicatorEnum; set state_registration_indicator(value: StateRegistrationIndicatorEnum); get cnae(): string; set cnae(value: string); get taxation_regime(): TaxRegimeEnum; set taxation_regime(value: TaxRegimeEnum); get address(): Address; set address(value: Address); clone(): this; isCompany(): boolean; get identification_number(): IdentificationNumber; set identification_number(value: IdentificationNumber); get street(): string; get number(): string; get supplement(): string; get neighborhood(): string; get municipality_code(): string; get municipality_code_number(): number; get country_code(): string; get postal_code(): string; get state(): string; get telephone(): string; set email(value: Email); get email(): Email; isForeignPartner(): boolean; } declare const CNPJ_RAW_REGEX: RegExp; declare const CNPJ_MASKED_REGEX: RegExp; declare const CNPJ_FLEXIBLE_REGEX: RegExp; declare class CNPJ implements IdentificationNumber { private readonly _value; constructor(cnpj: string); private removeInvalidDigits; isValid(): boolean; get rawValue(): string; get formattedValue(): string; validationErrors(): string[]; private allDigitsTheSame; private calculateDigit; private extractActualDigit; } declare const CPF_RAW_REGEX: RegExp; declare const CPF_MASKED_REGEX: RegExp; declare const CPF_FLEXIBLE_REGEX: RegExp; declare class CPF implements IdentificationNumber { private readonly _value; constructor(cpf: string); private removeNonDigits; isValid(): boolean; get rawValue(): string; get formattedValue(): string; validationErrors(): string[]; private allDigitsTheSame; private calculateDigit; private extractActualDigit; } declare class Telephone { private readonly _value; constructor(value: string); private removeInvalidDigits; isValid(): boolean; validationErrors(): string[]; get rawValue(): string; get validValue(): string; get formattedValue(): string; get rawValueWithoutDDI(): string; } declare class Document implements Cloneable { private _id; private _branch_id; private _tenant_id; private _type; private _access_key; private _replaced_access_key; private _verification_code; private _subscriber_type_code; private _issuance_date; private _release_date; private _due_date; private _payment_date; private _erp_id; private _operation_type; private _payment_type; private _revenue_type; private _freight_type; private _additional_information; private _model; private _number; private _accounting_additional_information; private _series; private _subseries; private _cte_type; private _total_amount; private _payment_value; private _issuer_indicator; private _rps_number; private _business_partner_id; private _issuer; private _recipient; private _items; private _fiscal_situation; private _erp_integration_status; private _manual_entry; private _version; private _created_at; private _updated_at; private _inactivated_at; private _created_by_name; private _updated_by_name; private _created_by_email; private _updated_by_email; get id(): string; set id(value: string); get branch_id(): string; set branch_id(value: string); get tenant_id(): string; set tenant_id(value: string); get type(): DocumentTypeEnum; set type(value: DocumentTypeEnum); get access_key(): string; set access_key(value: string); get replaced_access_key(): string; set replaced_access_key(value: string); get verification_code(): string; set verification_code(value: string); get subscriber_type_code(): string; set subscriber_type_code(value: string); get issuance_date(): OurDate; set issuance_date(value: OurDate); get release_date(): OurDate; set release_date(value: OurDate); get due_date(): OurDate; set due_date(value: OurDate); get payment_date(): OurDate; set payment_date(value: OurDate); get erp_id(): string; set erp_id(value: string); get operation_type(): OperationTypeEnum; set operation_type(value: OperationTypeEnum); get payment_type(): PaymentTypeEnum; set payment_type(value: PaymentTypeEnum); get revenue_type(): RevenueTypeEnum; set revenue_type(value: RevenueTypeEnum); get freight_type(): FreightTypeCodeEnum; set freight_type(value: FreightTypeCodeEnum); get additional_information(): string; set additional_information(value: string); get model(): string; set model(value: string); get number(): string; set number(value: string); get accounting_additional_information(): string; set accounting_additional_information(value: string); get series(): string; set series(value: string); get subseries(): string; set subseries(value: string); get cte_type(): CteTypeEnum; set cte_type(value: CteTypeEnum); get total_amount(): number; set total_amount(value: number); get payment_value(): number; set payment_value(value: number); get issuer_indicator(): IssuerIndicatorEnum; set issuer_indicator(value: IssuerIndicatorEnum); get rps_number(): string; set rps_number(value: string); get business_partner_id(): string; set business_partner_id(value: string); private get isInboundOwnIssuance(); get issuer(): Person; get issuerOrigin(): Person; set issuer(value: Person); get recipient(): Person; set recipient(value: Person); get items(): Item[]; set items(value: Item[]); get fiscal_situation(): CodeStatusEnum; set fiscal_situation(value: CodeStatusEnum); get erp_integration_status(): StatusDocumentEnum; set erp_integration_status(value: StatusDocumentEnum); get manual_entry(): boolean; set manual_entry(value: boolean); get version(): string; set version(value: string); get created_at(): OurDate; set created_at(value: OurDate); get updated_at(): OurDate; set updated_at(value: OurDate); get inactivated_at(): OurDate; set inactivated_at(value: OurDate); get created_by_name(): string; set created_by_name(value: string); get updated_by_name(): string; set updated_by_name(value: string); get created_by_email(): string; set created_by_email(value: string); get updated_by_email(): string; set updated_by_email(value: string); clone(): this; get isDBActive(): boolean; dbDeactivate(): void; dbActivate(): void; get fcp_value_destination(): number; get icms_value_destination_uf(): number; get icms_value_origin_uf(): number; getParties(): { issuer: Person; recipient: Person; }; getPartiesByPartnerCnpj(cnpj: CNPJ | string): { issuer: Person; recipient: Person; }; isInbound(): boolean; isOutbound(): boolean; getBusinessPartner(): Person; isCancelled(): boolean; } declare class BuilderAddition { private instance; constructor(); newInstance(): BuilderAddition; build(): Addition; withNumber(number: string): BuilderAddition; withAdditionSequenceNumber(addition_sequence_number: string): BuilderAddition; withManufacturerCode(manufacturer_code: string): BuilderAddition; withImportDiscountAmount(import_discount_amount: number): BuilderAddition; withDrawbackConcessionNumber(drawback_concession_number: string): BuilderAddition; } declare class BuilderAddress { private instance; constructor(); newInstance(): BuilderAddress; build(): Address; withNeighborhood(neighborhood: string): BuilderAddress; withMunicipalityCode(municipality_code: string): BuilderAddress; withMunicipality(municipality: Municipality): BuilderAddress; withCountryCode(country_code: string): BuilderAddress; withCountry(country: Country): BuilderAddress; withPostalCode(postal_code: string): BuilderAddress; withSupplement(supplement: string): BuilderAddress; withState(state: string): BuilderAddress; withStateObject(state: State): BuilderAddress; withStreet(street: string): BuilderAddress; withNumber(number: string): BuilderAddress; withTelephone(telephone: string): BuilderAddress; } declare class BuilderDocument { private instance; constructor(); newInstance(): BuilderDocument; build(): Document; basedOnLastBuild(): BuilderDocument; withId(id: string): BuilderDocument; withAccessKey(access_key: string): BuilderDocument; withReplacedAccessKey(replaced_access_key: string): BuilderDocument; withVerificationCode(verification_code: string): BuilderDocument; withSubscriberTypeCode(subscriber_type_code: string): BuilderDocument; withReleaseDate(release_date: Date): BuilderDocument; withDueDate(due_date: Date): BuilderDocument; withPaymentDate(payment_date: Date): BuilderDocument; withErpId(erp_id: string): BuilderDocument; withOperationType(operation_type: OperationTypeEnum): BuilderDocument; withPaymentType(payment_type: PaymentTypeEnum): BuilderDocument; withRevenueType(revenue_type: RevenueTypeEnum): BuilderDocument; withFreightType(freight_type: FreightTypeCodeEnum): BuilderDocument; withAdditionalInformation(additional_information: string): BuilderDocument; withModel(model: string): BuilderDocument; withAccountingAdditionalInformation(accounting_additional_information: string): BuilderDocument; withCteType(cte_type: CteTypeEnum): BuilderDocument; withIssuerIndicator(issuer_indicator: IssuerIndicatorEnum): BuilderDocument; withTotalAmount(total_amount: number): BuilderDocument; withPaymentValue(payment_value: number): BuilderDocument; withRpsNumber(rps_number: string): BuilderDocument; withBusinessPartnerId(business_partner_id: string): BuilderDocument; withFiscalSituation(fiscal_situation: CodeStatusEnum): BuilderDocument; withErpIntegrationStatus(erp_integration_status: StatusDocumentEnum): BuilderDocument; withManualEntry(manual_entry: boolean): BuilderDocument; withBranchId(branchId: string): BuilderDocument; withTenantId(tenantId: string): BuilderDocument; withType(documentType: DocumentTypeEnum): BuilderDocument; withIssuanceDate(issuance_date: Date): BuilderDocument; withNumber(number: string): BuilderDocument; withSeries(series: string): BuilderDocument; withSubseries(subseries: string): BuilderDocument; withIssuer(person: Person): BuilderDocument; withRecipient(person: Person): BuilderDocument; withItems(items: Item[]): BuilderDocument; withVersion(version: string): BuilderDocument; withCreatedAt(date: Date): BuilderDocument; withUpdatedAt(date: Date): BuilderDocument; withCreatedByName(created_by_name: string): BuilderDocument; withUpdatedByName(updated_by_name: string): BuilderDocument; withCreatedByEmail(created_by_email: string): BuilderDocument; withUpdatedByEmail(updated_by_email: string): BuilderDocument; withInactivatedAt(date: Date): this; } declare class BuilderImportDeclaration { private instance; constructor(); newInstance(): BuilderImportDeclaration; build(): ImportDeclaration; withNumber(number: string): BuilderImportDeclaration; withCode(code: string): BuilderImportDeclaration; withPisAmount(pis: number): BuilderImportDeclaration; withCofinsAmount(cofins: number): BuilderImportDeclaration; withDrawbackConcessionNumber(drawback: string): BuilderImportDeclaration; withDateRegistration(date_registration: Date): BuilderImportDeclaration; withCustomsClearanceLocation(location: string): BuilderImportDeclaration; withCustomsClearanceState(state: string): BuilderImportDeclaration; withCustomsClearanceDate(customs_clearance_date: Date): BuilderImportDeclaration; withInternationalTransportType(type: InternationalTransportTypeEnum): BuilderImportDeclaration; withExporterCode(code: string): BuilderImportDeclaration; withAfrmmAmount(amount: number): BuilderImportDeclaration; withIntermediationType(type: IntermediationTypeEnum): BuilderImportDeclaration; withAcquirerCnpj(cnpj: string): BuilderImportDeclaration; withAcquirerState(state: string): BuilderImportDeclaration; withAdditions(additions: Addition[]): BuilderImportDeclaration; } declare class BuilderItem { private instance; constructor(); newInstance(): BuilderItem; build(): Item; withId(_id: string): BuilderItem; withCfop(cfop: string): BuilderItem; withDescription(description: string): BuilderItem; withPreviousCode(previous_code: string): BuilderItem; withCestCode(cest_code: string): BuilderItem; withAccountCode(account_code: string): BuilderItem; withClassificationCode(classification_code: string): BuilderItem; withServiceActivityCode(service_activity_code: string): BuilderItem; withBarcode(barcode: string): BuilderItem; withMunicipalTaxCode(municipal_tax_code: string): BuilderItem; withFreightContractedNatureIndicator(freight_contracted_nature_indicator: FreightContractedNatureIndicatorEnum): BuilderItem; withCostCenterCode(cost_center_code: string): BuilderItem; withGenreCode(genre_code: string): BuilderItem; withDestinationMunicipalityCode(destination_municipality_code: string): BuilderItem; withOriginMunicipalityCode(origin_municipality_code: string): BuilderItem; withIssIncidenceMunicipalityCode(iss_incidence_municipality_code: string): BuilderItem; withServiceMunicipalityCode(service_municipality_code: string): BuilderItem; withServiceCode(service_code: string): BuilderItem; withExCode(ex_code: string): BuilderItem; withNcmCode(ncm_code: string): BuilderItem; withOperationNatureDescription(operation_nature_description: string): BuilderItem; withServiceList(service_list: ServiceCodeEnum): BuilderItem; withType(type: ItemTypeEnum): BuilderItem; withNumber(number: number): BuilderItem; withStockUnit(stock_unit: string): BuilderItem; withStockQuantity(stock_quantity: number): BuilderItem; withCommercialUnit(commercial_unit: string): BuilderItem; withCommercialQuantity(commercial_quantity: number): BuilderItem; withAccessoryExpensesValue(accessory_expenses_value: number): BuilderItem; withNonTaxableDeductionValue(non_taxable_deduction_value: number): BuilderItem; withDiscountValue(discount_value: number): BuilderItem; withFreightValue(freight_value: number): BuilderItem; withInsuranceValue(insurance_value: number): BuilderItem; withThirdPartyValue(third_party_value: number): BuilderItem; withCode(code: string): BuilderItem; withTotalAmount(total_amount: number): BuilderItem; withAccountingValue(accounting_value: number): BuilderItem; withTaxes(taxes: Tax[]): BuilderItem; withImportDeclaration(import_declaration: ImportDeclaration): BuilderItem; withConversionFactor(conversion_factor: ConversionFactor): BuilderItem; withImported(value: boolean): BuilderItem; withAccountingDocument(accounting_document: AccountingDocument): BuilderItem; } declare class BuilderAccountingDocument { private instance; constructor(); newInstance(): BuilderAccountingDocument; build(): AccountingDocument; withId(id: string): BuilderAccountingDocument; withNumber(number: string): BuilderAccountingDocument; } declare class BuilderPerson { private instance; constructor(); newInstance(): BuilderPerson; build(): Person; withCNPJ(cnpj: string): BuilderPerson; withCPF(cpf: string): BuilderPerson; withName(name: string): BuilderPerson; withEmail(email: string): BuilderPerson; withStateRegistrationNumber(state_registration_number: string, municipalityCode?: string): BuilderPerson; withMunicipalRegistrationNumber(municipal_registration_number: string): BuilderPerson; withSuframaRegistrationNumber(suframa_registration_number: string): BuilderPerson; withStateRegistrationIndicator(state_registration_indicator: StateRegistrationIndicatorEnum): BuilderPerson; withTaxationRegime(taxation_regime: TaxRegimeEnum): BuilderPerson; withCnae(cnae: string): BuilderPerson; withAddress(address: Address): BuilderPerson; } declare class BuilderTax { private instance; constructor(); newInstance(): BuilderTax; build(): Tax; withId(id: string): BuilderTax; withCategory(category: TaxTypeEnum): BuilderTax; withRate(rate: number): BuilderTax; withRateInter(rate_inter: number): BuilderTax; withRateIntra(rate_intra: number): BuilderTax; withClassificationCode(classification_code: string): BuilderTax; withProductOrigin(product_origin: ProductOriginEnum): BuilderTax; withOtherBaseValue(other_base_value: number): BuilderTax; withExemptNonTaxedBase(exempt_non_taxed_base: number): BuilderTax; withValue(value: number): BuilderTax; withNonTaxableValue(non_taxable_value: number): BuilderTax; withBaseAmount(base_amount: number): BuilderTax; withFcpStValue(fcp_st_value: number): BuilderTax; withFcpValue(fcp_value: number): BuilderTax; withFcpBase(fcp_base: number): BuilderTax; withFcpRate(fcp_rate: number): BuilderTax; withBaseDeductionValue(base_deduction_value: number): BuilderTax; withWithholdingTax(withholding_tax: boolean): BuilderTax; withCustomsExpenseValue(customs_expense_value: number): BuilderTax; withValueIof(value_iof: number): BuilderTax; withTriggeringFact(triggering_fact: string): BuilderTax; withRevenueCode(revenue_code: string): BuilderTax; withEnforceabilityOfISS(enforceability_of_iss: EnforceabilityOfISSEnum): BuilderTax; withIncreasedRate(increased_rate: number): BuilderTax; withBaseFcpDestination(base_fcp_destination: number): BuilderTax; withRateFcpDestination(rate_fcp_destination: number): BuilderTax; withFcpValueDestination(fcp_value_destination: number): BuilderTax; withInterstateIcmsTaxRate(interstate_icms_tax_rate: number): BuilderTax; withIcmsValueOriginUf(icms_value_origin_uf: number): BuilderTax; withDifalIcmsCategory(difal_icms_category: DifalIcmsCategoryEnum): BuilderTax; withDonationIndicator(donation_indicator: DonationIndicatorEnum): BuilderTax; withTaxClassificationCode(tax_classification_code: string): BuilderTax; withZfmPresumedCreditType(zfm_presumed_credit_type: ZfmPresumedCreditTypeEnum): BuilderTax; } declare class BuilderConversionFactor { private instance; constructor(); newInstance(): BuilderConversionFactor; build(): ConversionFactor; withUnit(unit: string): BuilderConversionFactor; withMultiply(multiply: number): BuilderConversionFactor; withBarcode(barcode: string): BuilderConversionFactor; } declare enum DescriptionStatusEnum { AUTHORIZED = "Autorizado", CANCELED = "Cancelado", LATE_REGULARIZED = "Denegado", LATE_CANCELED = "Inutilizado", NOT_APPLICABLE = "" } declare namespace DescriptionStatusEnum { function fromOldValue(value: DescriptionStatusEnum): CodeStatusEnum | undefined; function toCodeStatuses(value: DescriptionStatusEnum): CodeStatusEnum[]; function fromNewValue(value: CodeStatusEnum): DescriptionStatusEnum | undefined; } declare enum EventEnum { EMIT = "emit", CANCEL = "cancel", DISENABLE = "disenable", NOT_APPLICABLE = "" } declare namespace EventEnum { function fromOldValue(value: string): EventEnum | undefined; function fromNewValue(value: CodeStatusEnum): string | undefined; } declare enum PeriodDateFieldEnum { ISSUANCE_DATE = "issuance_date", RELEASE_DATE = "release_date" } interface FiltersDocument { active?: boolean; release_date?: Date; issuance_date?: Date; period_start?: Date; period_end?: Date; period_date_field?: PeriodDateFieldEnum; branch_ids?: string[]; type?: DocumentTypeEnum; types?: DocumentTypeEnum[]; model?: string; number?: string; tenant_id?: string; operation_type?: OperationTypeEnum; erp_integration_status?: StatusDocumentEnum | StatusDocumentEnum[]; fiscal_situation?: CodeStatusEnum | CodeStatusEnum[]; batch_size?: number; } interface PisCofinsOptions { exclude_non_credit_documents: boolean; zero_pis_cofins_by_cst: boolean; } interface DocumentRepository { getAll(filters: FiltersDocument): AsyncIterableIterator; getAllAuditingRetainedTax(filters: FiltersDocument): AsyncIterableIterator; getAllPisCofinsDocuments(filters: FiltersDocument, options: PisCofinsOptions): AsyncIterableIterator; } interface IBaseHeadersDTO { created_at: Date; updated_at: Date; created_by: string; updated_by: string; } declare function calculate_bases_values(percentage: number, value: number): number; declare function normalizeServiceCode(service_code: string): string | undefined; declare const ZERO_PIS_COFINS_BY_CST: string[]; interface IDocumentMongo { _id: any; active: boolean; inactivated_at?: Date; branch_id: string; tenant_id: string; type: DocumentTypeEnum; access_key: string; replaced_access_key: string; verification_code: string; subscriber_type_code: string; issuance_date: Date; release_date: Date; due_date: Date; payment_date: Date; erp_id: string; operation_type: OperationTypeEnum; payment_type: PaymentTypeEnum; revenue_type: RevenueTypeEnum; freight_type: FreightTypeCodeEnum; additional_information: string; model: string; number: string; accounting_additional_information: string; business_partner_id?: string; series: string; subseries: string; cte_type: CteTypeEnum; total_amount: number; payment_value: number; issuer_indicator: IssuerIndicatorEnum; rps_number: string; issuer: IPersonMongo; recipient: IPersonMongo; items: IItemMongo[]; fiscal_situation: CodeStatusEnum; erp_integration_status: StatusDocumentEnum; manual_entry: boolean; created_at?: Date; updated_at?: Date; created_by_name: string; updated_by_name: string; created_by_email: string; updated_by_email: string; } interface IPersonMongo { name: string; cnpj: string; cpf: string; cnae: string; email: string; state_registration_number: string; municipal_registration_number: string; suframa_registration_number: string; state_registration_indicator: StateRegistrationIndicatorEnum; taxation_regime: TaxRegimeEnum; address: IAddressMongo; } interface IAddressMongo { neighborhood: string; municipality_code: string; country_code: CountryCodeEnum; postal_code: string; supplement: string; state: string; street: string; number: string; telephone: string; } interface IAccountingDocumentMongo { id?: string; number: string; } interface IItemMongo { _id: string; cfop: string; previous_code: string; cest_code: string; code: string; classification_code: string; service_activity_code: string; account_code: string; barcode: string; description: string; municipal_tax_code: string; cost_center_code: string; genre_code: string; destination_municipality_code: string; origin_municipality_code: string; iss_incidence_municipality_code: string; service_municipality_code: string; service_code: string; ex_code: string; ncm_code: string; operation_nature_description: string; service_list: ServiceCodeEnum; type: ItemTypeEnum; number: number; stock_unit: string; stock_quantity: number; total_amount: number; commercial_unit: string; commercial_quantity: number; accessory_expenses_value: number; non_taxable_deduction_value: number; discount_value: number; freight_value: number; insurance_value: number; third_party_value: number; taxes: ITaxMongo[]; import_declaration: IImportDeclaration; conversion_factor: IConversionFactor; accounting_document: IAccountingDocumentMongo; imported: boolean; accounting_value: number; } interface ITaxMongo { _id: string; category: TaxTypeEnum; rate: number; rate_inter: number; rate_intra: number; classification_code: string; product_origin: ProductOriginEnum; other_base_value: number; exempt_non_taxed_base: number; value: number; non_taxable_value: number; base_amount: number; fcp_st_value: number; fcp_value: number; fcp_base: number; fcp_rate: number; base_deduction_value: number; withholding_tax: boolean; customs_expense_value: number; value_iof: number; triggering_fact: string; revenue_code: string; enforceability_of_iss: EnforceabilityOfISSEnum; increased_rate: number; base_fcp_destination: number; rate_fcp_destination: number; fcp_value_destination: number; interstate_icms_tax_rate: number; icms_value_origin_uf: number; difal_icms_category: DifalIcmsCategoryEnum; donation_indicator: DonationIndicatorEnum; tax_classification_code: string; zfm_presumed_credit_type: ZfmPresumedCreditTypeEnum; } interface IImportDeclaration { number: string; code: string; pis_amount: number; cofins_amount: number; drawback_concession_number: string; date_registration: Date; customs_clearance_location: string; customs_clearance_state: string; customs_clearance_date: Date; international_transport_type: InternationalTransportTypeEnum; exporter_code: string; afrmm_amount: number; intermediation_type: IntermediationTypeEnum; acquirer_cnpj: string; acquirer_state: string; additions: IAddition[]; } interface IAddition { number: string; addition_sequence_number: string; manufacturer_code: string; import_discount_amount: number; drawback_concession_number: string; } interface IConversionFactor { unit: string; multiply: number; barcode: string; } declare class MongoToDocumentBuilder { private instance; private buildPerson; private buildAddress; private buildAccountingDocument; private buildItem; private buildTax; private buildAddition; private buildImportDeclaration; private buildConversionFactor; private items; constructor(); newInstance(): MongoToDocumentBuilder; build(document: IDocumentMongo, exclude_non_credit_documents?: boolean, zero_pis_cofins_by_cst?: boolean): Document; withPerson(person: IPersonMongo): Person; withAddress(address: IAddressMongo): Address; withItems(item: IItemMongo, exclude_non_credit_documents?: boolean, zero_pis_cofins_by_cst?: boolean): void; private shouldIncludeItem; withAccountingDocument(accounting_document: IAccountingDocumentMongo): AccountingDocument; private getAdjustedPisCofinsValues; withTax(tax: ITaxMongo, zero_pis_cofins_by_cst?: boolean): Tax; withImportDeclaration(item: IItemMongo): ImportDeclaration; withAddition(addition: IAddition): Addition; withConversionFactor(item: IItemMongo): ConversionFactor; } type DateRange = { $gte: Date; $lte: Date; }; type MongoBaseFilter = { release_date?: DateRange; issuance_date?: DateRange; tenant_id?: string; branch_id?: string | { $in: string[]; }; type?: string | { $in: string[]; }; number?: string; model?: string; active?: boolean; operation_type?: string; erp_integration_status?: { $in: StatusDocumentEnum[]; }; fiscal_situation?: { $in: string[]; }; }; type MongoRetainedTaxFilter = MongoBaseFilter & { $or?: Array<{ release_date?: DateRange; issuance_date?: DateRange; 'items.taxes.category'?: TaxTypeEnum; }>; }; declare function buildMongoFilter(filters: FiltersDocument): MongoBaseFilter; declare function buildMongoFilterToRetainedTax(filters: FiltersDocument): MongoRetainedTaxFilter; declare class MongoRepository implements DocumentRepository { private readonly _client; private _isConnected; constructor(mongoConfig: MongoConfig); private isConnected; connect(): Promise; close(): Promise; getAll(filters: FiltersDocument): AsyncIterableIterator; getAllAuditingRetainedTax(filters: FiltersDocument): AsyncIterableIterator; findOne(id: string, tenant_id: string): Promise; getAllPisCofinsDocuments(filters: FiltersDocument, options: PisCofinsOptions): AsyncIterableIterator; } declare class ModelRollback { execute(document: any): any; } declare class ModelConverter { execute(document: any): Document; } interface IEcdSpecializedProfile { id: string; _id?: string; tenantid: string; profile_id: string; profile_alias?: string; cod_ent_ref: Array; cod_inscr?: string; num_ord: number; ind_esc: 'G' | 'R' | 'A' | 'B' | 'Z'; is_dlpa_dmpl?: boolean; referential_account_plan: string; ind_tip?: '0' | '1' | ''; } type Cod_ent_ref = '00' | '01' | '02' | '03' | '04' | '05' | 'AC' | 'AL' | 'AM' | 'AP' | 'BA' | 'DF' | 'CE' | 'ES' | 'GO' | 'MA' | 'MT' | 'MS' | 'MG' | 'PA' | 'PB' | 'PE' | 'PR' | 'PI' | 'RJ' | 'RN' | 'RS' | 'RR' | 'RO' | 'SC' | 'SP' | 'SE' | 'TO'; declare class EcdSpecializedProfile { protected _id: string; protected _tenantid: string; protected _profile_id: string; protected _profile_alias?: string; protected _cod_ent_ref: Array; protected _cod_inscr?: string; protected _num_ord: number; protected _ind_esc: 'G' | 'R' | 'A' | 'B' | 'Z'; protected _is_dlpa_dmpl?: boolean; protected _referential_account_plan: string; protected _ind_tip?: '0' | '1' | ''; set id(id: string); set tenantid(tenantid: string); set profile_id(profile_id: string); set profile_alias(profile_alias: string | undefined); set cod_ent_ref(cod_ent_ref: Array); set cod_inscr(cod_inscr: string | undefined); set num_ord(num_ord: number); set ind_esc(ind_esc: 'G' | 'R' | 'A' | 'B' | 'Z'); set is_dlpa_dmpl(is_dlpa_dmpl: boolean | undefined); set referential_account_plan(referential_account_plan: string); set ind_tip(ind_tip: '0' | '1' | '' | undefined); get id(): string; get tenantid(): string; get profile_id(): string; get profile_alias(): string | undefined; get cod_ent_ref(): Array; get cod_inscr(): string | undefined; get num_ord(): number; get ind_esc(): 'G' | 'R' | 'A' | 'B' | 'Z'; get is_dlpa_dmpl(): boolean | undefined; get referential_account_plan(): string; get ind_tip(): '0' | '1' | '' | undefined; } declare class EcfSpecializedProfile { protected _profile_id: string; protected _codigo_natureza_juridica: string; protected _metodo_avaliacao_estoque_final: string; protected _cnae_principal: string; protected _informar_centro_de_custos: boolean; protected _periodo_apuracao_irpj_csll: string; protected _qualificacao_pessoa_juridica: string; protected _forma_apuracao_jan: string; protected _forma_apuracao_fev: string; protected _forma_apuracao_mar: string; protected _forma_apuracao_abr: string; protected _forma_apuracao_mai: string; protected _forma_apuracao_jun: string; protected _forma_apuracao_jul: string; protected _forma_apuracao_ago: string; protected _forma_apuracao_set: string; protected _forma_apuracao_out: string; protected _forma_apuracao_nov: string; protected _forma_apuracao_dez: string; protected _escrituracao: string; protected _tipo_pessoa_juridica: string; protected _apuracao_irpj: string; protected _apuracao_csll: string; protected _pj_sujeito_aliquota_csll: string; protected _quantidade_total_scp_socio_ostensivo: string; protected _participacoes_consorcio_empresas: boolean; protected _administradora_fundos_e_clubes: boolean; protected _operacoes_exterior: boolean; protected _operacoes_pessoa_vinculada: boolean; protected _participacoes_exterior: boolean; protected _pj_artigos_48_49: boolean; protected _atividade_rural: boolean; protected _isencao_reducao_lucro_presumido: boolean; protected _lucro_exploracao: boolean; protected _ind_finor_finam: boolean; protected _pagamentos_exterior_ou_nao_residentes: boolean; protected _recebimentos_exterior_ou_nao_residentes: boolean; protected _ativos_exterior: boolean; protected _participacao_equivalencia_patrimonial: boolean; protected _royalties_recebidos_brasil_exterior: boolean; protected _royalties_pagos_brasil_exterior: boolean; protected _comercio_eletronico_e_ti: boolean; protected _rendimentos_relativos: boolean; protected _pagamentos_ou_remessa_brasil_exterior: boolean; protected _pj_habilitada: boolean; protected _capacitacao_informatica_e_inclusao: boolean; protected _inovacao_tec: boolean; protected _areas_livre_comercio: boolean; protected _polo_industrial_manaus_amazonia: boolean; protected _zonas_processamento_exportacao: boolean; protected _entidade_grupo_multinacional: boolean; protected _declaracao_moeda_estrangeira: boolean; protected _opcao_preco_transferencia_ano_calendario_2023: boolean; protected _percentual_irpj?: number; protected _percentual_csll?: number; protected _id?: string; protected _created_at: Date; protected _updated_at: Date; protected _tenantid: string; set profile_id(profile_id: string); set codigo_natureza_juridica(codigo_natureza_juridica: string); set metodo_avaliacao_estoque_final(metodo_avaliacao_estoque_final: string); set cnae_principal(cnae_principal: string); set informar_centro_de_custos(informar_centro_de_custos: boolean); set periodo_apuracao_irpj_csll(periodo_apuracao_irpj_csll: string); set qualificacao_pessoa_juridica(qualificacao_pessoa_juridica: string); set forma_apuracao_jan(forma_apuracao_jan: string); set forma_apuracao_fev(forma_apuracao_fev: string); set forma_apuracao_mar(forma_apuracao_mar: string); set forma_apuracao_abr(forma_apuracao_abr: string); set forma_apuracao_mai(forma_apuracao_mai: string); set forma_apuracao_jun(forma_apuracao_jun: string); set forma_apuracao_jul(forma_apuracao_jul: string); set forma_apuracao_ago(forma_apuracao_ago: string); set forma_apuracao_set(forma_apuracao_set: string); set forma_apuracao_out(forma_apuracao_out: string); set forma_apuracao_nov(forma_apuracao_nov: string); set forma_apuracao_dez(forma_apuracao_dez: string); set escrituracao(escrituracao: string); set tipo_pessoa_juridica(tipo_pessoa_juridica: string); set apuracao_irpj(apuracao_irpj: string); set apuracao_csll(apuracao_csll: string); set pj_sujeito_aliquota_csll(pj_sujeito_aliquota_csll: string); set quantidade_total_scp_socio_ostensivo(quantidade_total_scp_socio_ostensivo: string); set participacoes_consorcio_empresas(participacoes_consorcio_empresas: boolean); set administradora_fundos_e_clubes(administradora_fundos_e_clubes: boolean); set operacoes_exterior(operacoes_exterior: boolean); set operacoes_pessoa_vinculada(operacoes_pessoa_vinculada: boolean); set participacoes_exterior(participacoes_exterior: boolean); set pj_artigos_48_49(pj_artigos_48_49: boolean); set atividade_rural(atividade_rural: boolean); set isencao_reducao_lucro_presumido(isencao_reducao_lucro_presumido: boolean); set lucro_exploracao(lucro_exploracao: boolean); set ind_finor_finam(ind_finor_finam: boolean); set pagamentos_exterior_ou_nao_residentes(pagamentos_exterior_ou_nao_residentes: boolean); set recebimentos_exterior_ou_nao_residentes(recebimentos_exterior_ou_nao_residentes: boolean); set ativos_exterior(ativos_exterior: boolean); set participacao_equivalencia_patrimonial(participacao_equivalencia_patrimonial: boolean); set royalties_recebidos_brasil_exterior(royalties_recebidos_brasil_exterior: boolean); set royalties_pagos_brasil_exterior(royalties_pagos_brasil_exterior: boolean); set comercio_eletronico_e_ti(comercio_eletronico_e_ti: boolean); set rendimentos_relativos(rendimentos_relativos: boolean); set pagamentos_ou_remessa_brasil_exterior(pagamentos_ou_remessa_brasil_exterior: boolean); set pj_habilitada(pj_habilitada: boolean); set capacitacao_informatica_e_inclusao(capacitacao_informatica_e_inclusao: boolean); set inovacao_tec(inovacao_tec: boolean); set areas_livre_comercio(areas_livre_comercio: boolean); set polo_industrial_manaus_amazonia(polo_industrial_manaus_amazonia: boolean); set zonas_processamento_exportacao(zonas_processamento_exportacao: boolean); set entidade_grupo_multinacional(entidade_grupo_multinacional: boolean); set declaracao_moeda_estrangeira(declaracao_moeda_estrangeira: boolean); set opcao_preco_transferencia_ano_calendario_2023(opcao_preco_transferencia_ano_calendario_2023: boolean); set percentual_irpj(percentual_irpj: number | undefined); set percentual_csll(percentual_csll: number | undefined); set id(id: string | undefined); set created_at(created_at: Date); set updated_at(updated_at: Date); set tenantid(tenantid: string); get profile_id(): string; get codigo_natureza_juridica(): string; get metodo_avaliacao_estoque_final(): string; get cnae_principal(): string; get informar_centro_de_custos(): boolean; get periodo_apuracao_irpj_csll(): string; get qualificacao_pessoa_juridica(): string; get forma_apuracao_jan(): string; get forma_apuracao_fev(): string; get forma_apuracao_mar(): string; get forma_apuracao_abr(): string; get forma_apuracao_mai(): string; get forma_apuracao_jun(): string; get forma_apuracao_jul(): string; get forma_apuracao_ago(): string; get forma_apuracao_set(): string; get forma_apuracao_out(): string; get forma_apuracao_nov(): string; get forma_apuracao_dez(): string; get escrituracao(): string; get tipo_pessoa_juridica(): string; get apuracao_irpj(): string; get apuracao_csll(): string; get pj_sujeito_aliquota_csll(): string; get quantidade_total_scp_socio_ostensivo(): string; get participacoes_consorcio_empresas(): boolean; get administradora_fundos_e_clubes(): boolean; get operacoes_exterior(): boolean; get operacoes_pessoa_vinculada(): boolean; get participacoes_exterior(): boolean; get pj_artigos_48_49(): boolean; get atividade_rural(): boolean; get isencao_reducao_lucro_presumido(): boolean; get lucro_exploracao(): boolean; get ind_finor_finam(): boolean; get pagamentos_exterior_ou_nao_residentes(): boolean; get recebimentos_exterior_ou_nao_residentes(): boolean; get ativos_exterior(): boolean; get participacao_equivalencia_patrimonial(): boolean; get royalties_recebidos_brasil_exterior(): boolean; get royalties_pagos_brasil_exterior(): boolean; get comercio_eletronico_e_ti(): boolean; get rendimentos_relativos(): boolean; get pagamentos_ou_remessa_brasil_exterior(): boolean; get pj_habilitada(): boolean; get capacitacao_informatica_e_inclusao(): boolean; get inovacao_tec(): boolean; get areas_livre_comercio(): boolean; get polo_industrial_manaus_amazonia(): boolean; get zonas_processamento_exportacao(): boolean; get entidade_grupo_multinacional(): boolean; get declaracao_moeda_estrangeira(): boolean; get opcao_preco_transferencia_ano_calendario_2023(): boolean; get percentual_irpj(): number | undefined; get percentual_csll(): number | undefined; get id(): string | undefined; get created_at(): Date; get updated_at(): Date; get tenantid(): string; } interface IEfdContribSpecializedProfile { _id?: string; id: string; tenantid: string; ind_nat_pj: '00' | '01' | '02' | '03' | '04' | '05'; ind_apro_cred?: '1' | '2'; cod_tipo_cont?: '1' | '2'; exclude_non_credit_documents?: boolean; zero_pis_cofins_by_cst?: boolean; ind_reg_cum?: '1' | '2' | '9'; profile_id: string; profile_alias: string; establishment_id: string; establishment_alias: string; cod_inc_trib: '0' | '1' | '2'; cod_atv_econ: string; aliq_cont: number; cod_rec: string; } interface IRevenueNatureSettings { id: string; tenantid: string; profile_id: string; item_code?: string; item_description?: string; cst_pis_cofins: string; revenue_nature_code: string; revenue_nature_description: string; cfop?: string; accounts_plan: string; accounting_account: string; complementary_description?: string; active?: boolean; isMain?: boolean; logs?: { type: 'created' | 'deactivated' | 'activated'; date: Date; username: string; useremail: string; }[]; } declare enum NatureCode { '001' = "01", '002' = "02", '003' = "03", '004' = "04", '005' = "05", '006' = "06", '007' = "07", '008' = "08", '012' = "12", '013' = "13", '014' = "14", '015' = "15", '016' = "16", '017' = "17", '018' = "18" } declare enum CST { '050' = "50", '051' = "51", '052' = "52", '053' = "53", '054' = "54", '055' = "55", '056' = "56", '060' = "60", '061' = "61", '062' = "62", '063' = "63", '064' = "64", '065' = "65", '066' = "66" } type TaxRegimes = Record; interface ICalculationBasisNatureSetting { _id: string; active: true; name: string; tenantid: string; profiles: { id: string; alias: string; }[]; tax_settings: TaxRegimes; } declare class RevenueNatureSettings { protected _id: string; protected _tenantid: string; protected _profile_id: string; protected _item_code?: string; protected _item_description?: string; protected _cst_pis_cofins: string; protected _revenue_nature_code: string; protected _revenue_nature_description: string; protected _cfop?: string; protected _accounts_plan: string; protected _accounting_account: string; protected _complementary_description?: string; protected _active?: boolean; protected _isMain?: boolean; protected _logs?: { type: 'created' | 'deactivated' | 'activated'; date: Date; username: string; useremail: string; }[]; set id(id: string); set tenantid(tenantid: string); set profile_id(profile_id: string); set item_code(item_code: string | undefined); set item_description(item_description: string | undefined); set cst_pis_cofins(cst_pis_cofins: string); set revenue_nature_code(revenue_nature_code: string); set revenue_nature_description(revenue_nature_description: string); set cfop(cfop: string | undefined); set accounts_plan(accounts_plan: string); set accounting_account(accounting_account: string); set complementary_description(complementary_description: string | undefined); set active(active: boolean | undefined); set isMain(isMain: boolean | undefined); set logs(logs: { type: 'created' | 'deactivated' | 'activated'; date: Date; username: string; useremail: string; }[] | undefined); get id(): string; get tenantid(): string; get profile_id(): string; get item_code(): string | undefined; get item_description(): string | undefined; get cst_pis_cofins(): string; get revenue_nature_code(): string; get revenue_nature_description(): string; get cfop(): string | undefined; get accounts_plan(): string; get accounting_account(): string; get complementary_description(): string | undefined; get active(): boolean | undefined; get isMain(): boolean | undefined; get logs(): { type: 'created' | 'deactivated' | 'activated'; date: Date; username: string; useremail: string; }[] | undefined; } declare class CalculationBasisNatureSetting { protected _id: string; protected _tenantid: string; protected _profiles: { id: string; alias: string; }[]; protected _active: boolean; protected _tax_settings: TaxRegimes; protected _logs?: { type: 'create' | 'enable' | 'disable' | 'update'; date: Date; username: string; useremail: string; }[]; set id(id: string); set tenantid(tenantid: string); set profiles(profiles: { id: string; alias: string; }[]); set active(active: boolean); set tax_settings(tax_settings: TaxRegimes); set logs(logs: { type: 'create' | 'enable' | 'disable' | 'update'; date: Date; username: string; useremail: string; }[] | undefined); get active(): boolean; get id(): string; get tenantid(): string; get profiles(): { id: string; alias: string; }[]; get tax_settings(): TaxRegimes; get logs(): { type: 'create' | 'enable' | 'disable' | 'update'; date: Date; username: string; useremail: string; }[]; getNatureCode(cst: string, cfop: string): string; } declare class EfdContribSpecializedProfile { protected _id: string; protected _tenantid: string; protected _ind_nat_pj: '00' | '01' | '02' | '03' | '04' | '05'; protected _ind_apro_cred?: '1' | '2'; protected _cod_tipo_cont?: '1' | '2'; protected _ind_reg_cum?: '1' | '2' | '9'; protected _profile_id: string; protected _profile_alias: string; protected _establishment_id: string; protected _establishment_alias: string; protected _cod_inc_trib: '0' | '1' | '2'; protected _cod_atv_econ: string; protected _aliq_cont: number; protected _cod_rec: string; protected _exclude_non_credit_documents?: boolean; protected _zero_pis_cofins_by_cst?: boolean; protected _natureSettings: RevenueNatureSettings[]; protected _calculationBasisNature: CalculationBasisNatureSetting[]; set id(id: string); set tenantid(tenantid: string); set ind_nat_pj(ind_nat_pj: '00' | '01' | '02' | '03' | '04' | '05'); set ind_apro_cred(ind_apro_cred: '1' | '2' | undefined); set cod_tipo_cont(cod_tipo_cont: '1' | '2' | undefined); set ind_reg_cum(ind_reg_cum: '1' | '2' | '9' | undefined); set profile_id(profile_id: string); set profile_alias(profile_alias: string); set establishment_id(establishment_id: string); set establishment_alias(establishment_alias: string); set cod_inc_trib(cod_inc_trib: '0' | '1' | '2'); set cod_atv_econ(cod_atv_econ: string); set aliq_cont(aliq_cont: number); set cod_rec(cod_rec: string); set exclude_non_credit_documents(exclude_non_credit_documents: boolean); set zero_pis_cofins_by_cst(zero_pis_cofins_by_cst: boolean); set natureSettings(natureSettings: RevenueNatureSettings[]); set calculationBasisNature(calculationBasisNature: CalculationBasisNatureSetting[]); get id(): string; get tenantid(): string; get ind_nat_pj(): '00' | '01' | '02' | '03' | '04' | '05'; get ind_apro_cred(): '1' | '2' | undefined; get cod_tipo_cont(): '1' | '2' | undefined; get ind_reg_cum(): '1' | '2' | '9' | undefined; get profile_id(): string; get profile_alias(): string; get establishment_id(): string; get establishment_alias(): string; get cod_inc_trib(): '0' | '1' | '2'; get cod_atv_econ(): string; get aliq_cont(): number; get cod_rec(): string; get exclude_non_credit_documents(): boolean; get zero_pis_cofins_by_cst(): boolean; get natureSettings(): RevenueNatureSettings[]; get calculationBasisNature(): CalculationBasisNatureSetting[]; } declare enum IcmsAdjustmentGroupEnum { 'Outros débitos' = "0", 'Estorno de créditos' = "1", 'Outros créditos' = "2", 'Estorno de débitos' = "3", 'Deduções do imposto apurado' = "4", 'Débitos Especiais' = "5", NOT_APPLICABLE = "" } declare enum IcmsAdjustmentTaxTypeEnum { ICMS = "ICMS", ICMS_ST = "ICMS-ST", RET = "RET", NOT_APPLICABLE = "" } declare enum IcmsAdjustmentRegistryEnum { C197 = "C197", D197 = "D197", E111 = "E111", E115 = "E115", E220 = "E220", NOT_APPLICABLE = "" } declare enum IcmsCalculationIndicatorEnum { APURACAO_SEPARADA_GRUPO_1 = 3, APURACAO_SEPARADA_GRUPO_2 = 4, APURACAO_SEPARADA_GRUPO_3 = 5, APURACAO_SEPARADA_GRUPO_4 = 6, APURACAO_SEPARADA_GRUPO_5 = 7, APURACAO_SEPARADA_GRUPO_6 = 8, NOT_APPLICABLE = 0 } declare enum IcmsAdjustmentTypeEnum { CREDITO_IMOBILIZADO_CIAP = "0", DIFAL_COMPRA_CONSUMO_IMOBILIZADO = "1", DIFAL = "2", ADJUDICACAO_CREDITO_DIFAL = "3", NOT_APPLICABLE = "" } interface IIcmsAdjustmentExtraInfo { item_code: string; cfop: string; cfop_description: string; cst: string; rate: number; ncm: string; icms_taxpayer: boolean; difal_double_base: boolean; } interface IIcmsAdjustmentSetting { _id: string; active: boolean; tenantid: string; profile_id: string; establishment_id: string; code: number; tax_type: IcmsAdjustmentTaxTypeEnum; adjustment_type: IcmsAdjustmentTypeEnum; initial_date: string; final_date: string; description: string; group: IcmsAdjustmentGroupEnum; sefaz_adjustment_code: string; additional_info: string; icms_calculation_indicator: IcmsCalculationIndicatorEnum; registry: IcmsAdjustmentRegistryEnum; generate_e113: boolean; generate_sub_calculation?: boolean; infos: IIcmsAdjustmentExtraInfo[]; } declare enum ProfileTaxTypeEnum { ICMS = "ICMS", ICMS_ST = "ICMS-ST", DIFAL_FCP = "DIFAL/FCP", ICMS_SUB_APURACAO = "ICMS_SUB_APURACAO" } declare enum ObligationCodeEnum { ICMS_A_RECOLHER = "000", ICMS_DA_SUBSTITUICAO_TRIBUTARIA_PELAS_ENTRADAS = "001", ICMS_DA_SUBSTITUICAO_TRIBUTARIA_PELAS_SAIDAS_PARA_O_ESTADO = "002", ANTECIPACAO_DO_DIFERENCIAL_DE_ALIQUATAS_DO_ICMS = "003", ANTECIPACAO_DO_ICMS_DA_IMPORTACAO = "004", ANTECIPACAO_TRIBUTARIA = "005", ICMS_RESULTANTE_DA_ALIQUOTA_ADICIONAL_DOS_ITENS_INCLUIDOS_NO_FUNDO_DE_COMBATE_A_POBREZA = "006", OUTRAS_OBRIGACOES_DO_ICMS = "090", ICMS_DA_SUBSTITUICAO_TRIBUTARIA_PELAS_SAIDAS_PARA_OUTRO_ESTADO = "999" } declare enum ConfigTypeEnum { IMPOSTO_A_RECOLHER = "TAX_TO_COLLECTED", VALOR_EXTRA_APURACAO = "EXTRA_CALCULATION_VALUE" } declare enum JudicialProcessOriginEnum { SEFAZ = "0", JUSTICA_FEDERAL = "1", JUSTICA_ESTADUAL = "2", OUTROS = "9" } declare enum ActionTypeEnum { CREATE = "CREATE", UPDATE = "UPDATE", ACTIVATE = "ACTIVATE", INACTIVATE = "INACTIVATE", CREATE_JUDICIAL_PROCESS = "CREATE_JUDICIAL_PROCESS", UPDATE_JUDICIAL_PROCESS = "UPDATE_JUDICIAL_PROCESS", DELETE = "DELETE" } interface IEfdicmsipiAdditionalFields { branch_id: string; profile_id: string; profile_alias: string; establishment_id: string; establishment_alias: string; profile_indicator: string; ind_apur: string; zfm_alc: '0' | '1'; reg_trib: string; has_blockK: 'true' | 'false'; layout_k: '0' | '1' | '2'; tax_type_config: ITaxTypeConfig[]; has_blockH: 'true' | 'false'; blockH_movement_indicator: '0' | '1'; gia_st_layout_version: string; icms_credit_config?: IIcmsCreditBaseConfig; tenantid: string; id: string; _id: string; created_at: Date; updated_at: Date; } interface ITaxTypeConfigBase { tax_type: ProfileTaxTypeEnum; config_type: ConfigTypeEnum; obligation_code: ObligationCodeEnum; due_date: number; rec_code: string; judicial_process?: IJudicialProcess; uf?: Uf; tax_collection_type?: TaxCollectionType; active: boolean; fcp?: { due_date_fcp: number; rec_code_fcp: string; obligation_code: ObligationCodeEnum; }; } interface ITaxTypeConfig extends ITaxTypeConfigBase { log: ITaxTypeConfigLog[]; } interface IIcmsCreditBaseConfig { dont_allow_icms_imobilized_actives: boolean; allowed_cfops: AllowedCfopsCreditConfig; log: IIcmsCreditConfigLog[]; } interface AllowedCfopsCreditConfig { [cfop: string]: { action_type?: ActionTypeEnum; description: string; active: boolean; log: IIcmsCreditConfigLog[]; }; } interface IIcmsCreditConfigLog { action_type: ActionTypeEnum; action_date: Date; action_done_by_name: string; action_done_by_email: string; } interface IJudicialProcess { number: string; origin: JudicialProcessOriginEnum; description: string; } interface ITaxTypeConfigLog { action_type: ActionTypeEnum; action_date: Date; action_done_by_name: string; action_done_by_email: string; tax_type_config: ITaxTypeConfigBase; } interface ITaxTypeConfigCreateOrUpdate extends ITaxTypeConfig { action_type?: ActionTypeEnum; } declare enum Uf { AC = "AC", AL = "AL", AP = "AP", AM = "AM", BA = "BA", CE = "CE", DF = "DF", ES = "ES", GO = "GO", MA = "MA", MT = "MT", MS = "MS", MG = "MG", PA = "PA", PB = "PB", PR = "PR", PE = "PE", PI = "PI", RJ = "RJ", RN = "RN", RS = "RS", RO = "RO", RR = "RR", SC = "SC", SP = "SP", SE = "SE", TO = "TO" } declare enum TaxCollectionType { OPERATION = "OPERATION", APURATION = "APURATION" } type AuditTaxCollectionInfo = { solicitation_id: string; period: string; icms?: AuditTaxCollectionDetails; icms_sub_apuracao?: AuditTaxCollectionDetails; }; type AuditTaxCollectionDetails = { vl_recolher: number; deb_esp: number; details: TaxCollectionDetails[]; }; type TaxCollectionDetails = ITaxTypeConfigBase & { amount: number; due_period: string; txt_compl?: string; }; interface GetAuditTaxCollectionQuery { solicitation_id: string; select: keyof AuditTaxCollectionInfo; } declare class EfdIcmsIpiSpecializedProfile { protected _branch_id: string; protected _profile_id: string; protected _profile_alias: string; protected _establishment_id: string; protected _establishment_alias: string; protected _profile_indicator: string; protected _ind_apur: string; protected _zfm_alc: '0' | '1'; protected _reg_trib: string; protected _has_blockK: 'true' | 'false'; protected _layout_k: '0' | '1' | '2'; protected _tax_type_config: ITaxTypeConfig[]; protected _has_blockH: 'true' | 'false'; protected _blockH_movement_indicator: '0' | '1'; protected _icms_credit_config?: IIcmsCreditBaseConfig; protected _gia_st_layout_version?: string; protected _tenantid: string; protected _id: string; protected _created_at: Date; protected _updated_at: Date; protected _icmsAdjustmentSetting: IcmsAdjustmentSetting[]; set branch_id(branch_id: string); set profile_id(profile_id: string); set profile_alias(profile_alias: string); set establishment_id(establishment_id: string); set establishment_alias(establishment_alias: string); set profile_indicator(profile_indicator: string); set ind_apur(ind_apur: string); set zfm_alc(zfm_alc: '0' | '1'); set reg_trib(reg_trib: string); set has_blockK(has_blockK: 'true' | 'false'); set layout_k(layout_k: '0' | '1' | '2'); set tax_type_config(tax_type_config: ITaxTypeConfig[]); set has_blockH(has_blockH: 'true' | 'false'); set blockH_movement_indicator(blockH_movement_indicator: '0' | '1'); set icms_credit_config(icms_credit_config: IIcmsCreditBaseConfig); set tenantid(tenantid: string); set id(id: string); set created_at(created_at: Date); set updated_at(updated_at: Date); set gia_st_layout_version(gia_st_layout_version: string); set icmsAdjustmentSetting(icmsAdjustmentSetting: IcmsAdjustmentSetting[]); get branch_id(): string; get profile_id(): string; get profile_alias(): string; get establishment_id(): string; get establishment_alias(): string; get profile_indicator(): string; get ind_apur(): string; get zfm_alc(): '0' | '1'; get reg_trib(): string; get has_blockK(): 'true' | 'false'; get layout_k(): '0' | '1' | '2'; get tax_type_config(): ITaxTypeConfig[]; get has_blockH(): 'true' | 'false'; get blockH_movement_indicator(): '0' | '1'; get icms_credit_config(): IIcmsCreditBaseConfig; get tenantid(): string; get id(): string; get created_at(): Date; get updated_at(): Date; get gia_st_layout_version(): string; get icmsAdjustmentSetting(): IcmsAdjustmentSetting[]; } declare class IcmsAdjustmentSetting { protected _id: string; protected _active: boolean; protected _tenantid: string; protected _profile_id: string; protected _establishment_id: string; protected _code: number; protected _tax_type: IcmsAdjustmentTaxTypeEnum; protected _adjustment_type: IcmsAdjustmentTypeEnum; protected _initial_date: string; protected _final_date: string; protected _description: string; protected _group: IcmsAdjustmentGroupEnum; protected _sefaz_adjustment_code: string; protected _additional_info: string; protected _icms_calculation_indicator: IcmsCalculationIndicatorEnum; protected _registry: IcmsAdjustmentRegistryEnum; protected _generate_e113: boolean; protected _generate_sub_calculation: boolean; protected _infos: IIcmsAdjustmentExtraInfo[]; set id(_id: string); set active(value: boolean); set tenantid(tenantid: string); set profile_id(profile_id: string); set establishment_id(establishment_id: string); set code(code: number); set tax_type(value: IcmsAdjustmentTaxTypeEnum); set adjustment_type(value: IcmsAdjustmentTypeEnum); set initial_date(value: string); set final_date(value: string); set description(value: string); set group(value: IcmsAdjustmentGroupEnum); set sefaz_adjustment_code(value: string); set additional_info(value: string); set icms_calculation_indicator(value: IcmsCalculationIndicatorEnum); set registry(value: IcmsAdjustmentRegistryEnum); set generate_e113(value: boolean); set generate_sub_calculation(value: boolean); set infos(value: IIcmsAdjustmentExtraInfo[]); get id(): string; get active(): boolean; get tenantid(): string; get profile_id(): string; get establishment_id(): string; get code(): number; get tax_type(): IcmsAdjustmentTaxTypeEnum; get adjustment_type(): IcmsAdjustmentTypeEnum; get initial_date(): string; get final_date(): string; get description(): string; get group(): IcmsAdjustmentGroupEnum; get sefaz_adjustment_code(): string; get additional_info(): string; get icms_calculation_indicator(): IcmsCalculationIndicatorEnum; get registry(): IcmsAdjustmentRegistryEnum; get generate_e113(): boolean; get generate_sub_calculation(): boolean; get infos(): IIcmsAdjustmentExtraInfo[]; } declare enum SimpleNationalOption { SIM = "1", NAO = "0" } declare enum CprbOption { SIM = "1", NAO = "0" } declare enum TaxationType { LUCRO_REAL_TRIMESTAL = "0", LUCRO_REAL = "1", LUCRO_REAL_ARBITRADO = "2", LUCRO_PRESUMIDO_REAL = "3", LUCRO_PRESUMIDO_REAL_ARBITRADO = "4", LUCRO_PRESUMIDO = "5", LUCRO_ARBITRADO = "6", LUCRO_PRESUMIDO_ARBITRADO = "7", IMUNE_IRPJ = "8", ISENTA_IRPJ = "9", NAO_CONTRIBUINTE_IRPJ = "10", NAO_PREENCHIDO = "11" } declare enum CodIncTrib { NAO_CUMULATIVO = "1", CUMULATIVO = "2", MISTO = "3", NAO_APLICA = "4" } declare enum FiscalQualificationType { INDUSTRIAL = "0", SERVICO = "1", COMERCIO = "2", JURIDICO_ART_3_9718_1998 = "3", IMOBILIARIA = "4", OUTROS = "9" } declare enum StateCollectionSettingsTaxTypeEnum { ICMS = "ICMS", ICMS_ST = "ICMS_ST", ICMS_SUB_AUDITING = "ICMS_SUB_AUDITING", DIFAL_FCP = "DIFAL_FCP" } declare enum StateCollectionSettingsConfigTypeEnum { TAX_TO_COLLECTED = "TAX_TO_COLLECTED", EXTRA_VALUE_CALCULATION = "EXTRA_VALUE_CALCULATION" } declare enum TaxCollectionTypeEnum { OPERATION = "OPERATION", APURATION = "APURATION" } declare enum StartingCreditBalanceTypeEnum { ICMS = "icms", ICMS_ST = "icms-st", IPI = "ipi", DIFAL_FCP = "difal-fcp", PIS = "pis", COFINS = "cofins" } declare enum CreditBalanceOriginCreditTypeEnum { credit_balance = 0, tax_withheld = 1 } declare enum CreditBalanceRegimeTypeEnum { cumulative = 0, not_cumulative = 1 } declare enum DueDateAdjustmentEnum { ANTICIPATE = "ANTICIPATE", POSTPONE = "POSTPONE" } declare class EstablishmentEvent { protected _special_situation: '0' | '1' | '2' | '3' | '4' | '5' | '6'; protected _situation_date: Date; protected _establishmentId?: string; protected _id?: string; protected _created_at?: Date; protected _tenantid?: string; set special_situation(special_situation: '0' | '1' | '2' | '3' | '4' | '5' | '6'); set situation_date(situation_date: Date | string); set establishmentId(establishmentId: string | undefined); set id(id: string | undefined); set created_at(created_at: Date | undefined); set tenantid(tenantid: string | undefined); get special_situation(): '0' | '1' | '2' | '3' | '4' | '5' | '6'; get situation_date(): Date; get establishmentId(): string | undefined; get id(): string | undefined; get created_at(): Date | undefined; get tenantid(): string | undefined; } declare class Scp { protected _fiscal_id_number: CNPJ; protected _commercial_name: string; protected _description: string; protected _establishmentId: string; protected _complement?: string; protected _id?: string; protected _created_at?: Date; protected _tenantid?: string; protected _active?: boolean; protected _inactivation_date?: Date | null; set fiscal_id_number(fiscal_id_number: string); set commercial_name(commercial_name: string); set description(description: string); set establishmentId(establishmentId: string); set complement(complement: string | undefined); set id(id: string | undefined); set created_at(created_at: Date | undefined); set tenantid(tenantid: string | undefined); set active(active: boolean | undefined); set inactivation_date(inactivation_date: Date | null | undefined); get fiscal_id_number(): CNPJ; get commercial_name(): string; get description(): string; get establishmentId(): string; get complement(): string | undefined; get id(): string | undefined; get created_at(): Date | undefined; get tenantid(): string | undefined; get active(): boolean | undefined; get inactivation_date(): Date | null | undefined; } declare class Signatory { protected _name: string; protected _fiscal_id_number: IdentificationNumber; protected _number: string; protected _email: string; protected _phone: string; protected _address: string; protected _district: string; protected _zip: string; protected _establishmentId: string; protected _personType: string; protected _countyCode?: string; protected _fiscalOfficeIdNumber?: string; protected _complement?: string; protected _fax?: string; protected _crcIdNumber?: string; protected _crcRegYear?: string; protected _crcStateInitials?: string; protected _crcSequentialNumber?: string; protected _crcValidityDate?: string; protected _active?: boolean; protected _inactivationDate?: Date | null; protected _id?: string; protected _tenantid?: string; set name(name: string); set fiscal_id_number(fiscal_id_number: CNPJ); set number(number: string); set email(email: string); set phone(phone: string); set address(address: string); set district(district: string); set zip(zip: string); set establishmentId(establishmentId: string); set personType(personType: string); set countyCode(countyCode: string | undefined); set fiscalOfficeIdNumber(fiscalOfficeIdNumber: string | undefined); set complement(complement: string | undefined); set fax(fax: string | undefined); set crcIdNumber(crcIdNumber: string | undefined); set crcRegYear(crcRegYear: string | undefined); set crcStateInitials(crcStateInitials: string | undefined); set crcSequentialNumber(crcSequentialNumber: string | undefined); set crcValidityDate(crcValidityDate: string | undefined); set active(active: boolean | undefined); set inactivationDate(inactivationDate: Date | null | undefined); set id(id: string | undefined); set tenantid(tenantid: string | undefined); get name(): string; get fiscal_id_number(): IdentificationNumber; get address(): string; get zip(): string; get establishmentId(): string; get personType(): string; get phone(): string | undefined; get email(): string | undefined; get district(): string | undefined; get number(): string | undefined; get countyCode(): string | undefined; get fiscalOfficeIdNumber(): string | undefined; get complement(): string | undefined; get fax(): string | undefined; get crcIdNumber(): string | undefined; get crcStateInitials(): string | undefined; get crcSequentialNumber(): string | undefined; get crcValidityDate(): string | undefined; get crcRegYear(): string | undefined; get active(): boolean | undefined; get inactivationDate(): Date | null | undefined; get id(): string | undefined; get tenantid(): string | undefined; } declare class StateCollectionSettings { protected _id: string; protected _tenantid: string; protected _active: boolean; protected _inactivation_date: OurDate; protected _tax_type: string; protected _config_type: string; protected _obligation_code: string; protected _due_date: number; protected _revenue_code: string; protected _uf?: string; protected _config_fcp: boolean; protected _obligation_code_fcp?: string; protected _due_date_fcp?: number; protected _due_date_adjustment?: DueDateAdjustmentEnum; protected _withholding_tax_type?: string; protected _revenue_code_fcp?: string; protected _tax_collection_type?: string; protected _establishment_id?: string; protected _judicial_process_id?: string; protected _judicial_process_number?: string; protected _judicial_process_description?: string; protected _judicial_process_origin_indicator?: string; protected _created_at: Date; protected _updated_at: Date; protected _created_by_name: string; protected _created_by_email: string; protected _updated_by_name: string; protected _updated_by_email: string; set id(id: string); set tenantid(tenantid: string); set active(active: boolean); set inactivation_date(inactivation_date: OurDate); set tax_type(tax_type: string); set config_type(config_type: string); set obligation_code(obligation_code: string); set due_date(due_date: number); set revenue_code(revenue_code: string); set uf(uf: string | undefined); set config_fcp(config_fcp: boolean); set obligation_code_fcp(obligation_code_fcp: string | undefined); set due_date_fcp(due_date_fcp: number | undefined); set due_date_adjustment(due_date_adjustment: DueDateAdjustmentEnum | undefined); set withholding_tax_type(withholding_tax_type: string | undefined); set revenue_code_fcp(revenue_code_fcp: string | undefined); set tax_collection_type(tax_collection_type: string | undefined); set establishment_id(establishment_id: string | undefined); set judicial_process_id(judicial_process_id: string | undefined); set judicial_process_number(judicial_process_number: string | undefined); set judicial_process_description(judicial_process_description: string | undefined); set judicial_process_origin_indicator(judicial_process_origin_indicator: string | undefined); set created_at(created_at: Date); set updated_at(updated_at: Date); set created_by_name(created_by_name: string); set created_by_email(created_by_email: string); set updated_by_name(updated_by_name: string); set updated_by_email(updated_by_email: string); get id(): string; get tenantid(): string; get active(): boolean; get inactivation_date(): OurDate; get tax_type(): string; get config_type(): string; get obligation_code(): string; get due_date(): number; get revenue_code(): string; get uf(): string; get config_fcp(): boolean; get obligation_code_fcp(): string; get due_date_fcp(): number; get due_date_adjustment(): DueDateAdjustmentEnum; get withholding_tax_type(): string; get revenue_code_fcp(): string; get tax_collection_type(): string; get judicial_process_id(): string; get judicial_process_number(): string; get judicial_process_description(): string; get judicial_process_origin_indicator(): string; get created_at(): Date; get updated_at(): Date; get created_by_name(): string; get created_by_email(): string; get updated_by_name(): string; get updated_by_email(): string; } declare class StateRegistration { protected _id: string; protected _state: State; protected _number: string; protected _createdAt: Date; protected _inactiveAt: Date | null; protected _isTaxSubstitution: boolean; get id(): string; set id(value: string); get state(): State; set state(value: State); get number(): string; set number(value: string); get createdAt(): Date; set createdAt(value: Date); get inactiveAt(): Date | null; set inactiveAt(value: Date | null); get isTaxSubstitution(): boolean; set isTaxSubstitution(value: boolean); } declare class MunicipalRegistration { protected _id: string; protected _state: State; protected _number: string; protected _municipality: Municipality; protected _createdAt: Date; protected _inactiveAt: Date | null; get id(): string; set id(value: string); get state(): State; set state(value: State); get number(): string; set number(value: string); set municipality(value: Municipality); get municipality(): Municipality; get municipalityCode(): number; get createdAt(): Date; set createdAt(value: Date); get inactiveAt(): Date | null; set inactiveAt(value: Date | null); } declare enum ContactTypesEnum { email = "EMAIL", telephone = "PHONE" } declare class Contact { protected _type: ContactTypesEnum; protected _value: Telephone | Email; protected _description: string | undefined; protected _responsible: string | null; get type(): ContactTypesEnum; get value(): Telephone | Email; get responsible(): string | null; set type(type: ContactTypesEnum); set value(value: Telephone | Email); set responsible(responsible: string | null); set description(description: string | undefined); get description(): string | undefined; } declare class Establishment { protected _id: string; protected _fantasyName: string; protected _tenantid: string; protected _taxation_type: TaxationType; protected _cod_inc_trib: string; protected _single_national_option: string; protected _cprb_option: string; protected _fiscal_qualification_type: string; protected _exception_legal_type: string; protected _branchId: string; protected _profileId: string; protected _fiscal_id_number: CNPJ; protected _headerAccountPlanId: string; protected _created_at: Date; protected _active: boolean; protected _nire: string; protected _crt: number; protected _suframa: string; protected _mainEmail: Contact | undefined; protected _mainTelephone: Contact | undefined; protected _efdIcmsIpiSpecializedProfile: EfdIcmsIpiSpecializedProfile; protected _signatories: Signatory[]; protected _scps: Scp[]; protected _events: EstablishmentEvent[]; protected _stateCollectionsSettings: StateCollectionSettings[]; protected _stateRegistrations: StateRegistration[]; protected _municipalRegistrations: MunicipalRegistration[]; protected _addresses: Address[]; protected _contacts: Contact[]; get mainEmail(): Contact | undefined; set mainEmail(mainEmail: Contact); get mainTelephone(): Contact | undefined; set mainTelephone(mainTelephone: Contact); private hasContact; get alias(): string; get active(): boolean; set active(active: boolean); set alias(alias: string); get fantasyName(): string; set fantasyName(fantasyName: string); set tenantid(tenantid: string); set taxation_type(taxation_type: TaxationType); set cod_inc_trib(cod_inc_trib: string); set single_national_option(single_national_option: string); set cprb_option(cprb_option: string); set fiscal_qualification_type(fiscal_qualification_type: string); set exception_legal_type(exception_legal_type: string); set branchId(branchId: string); set profileId(profileId: string); set fiscal_id_number(fiscal_id_number: CNPJ); set headerAccountPlanId(headerAccountPlanId: string); set id(id: string); set created_at(created_at: Date); get tenantid(): string; get taxation_type(): TaxationType; get cod_inc_trib(): string; get single_national_option(): string; get cprbOption(): string; get fiscal_qualification_type(): string; get exception_legal_type(): string; get branchId(): string; get profileId(): string; get fiscal_id_number(): CNPJ; get headerAccountPlanId(): string; get id(): string; get created_at(): Date; get efdIcmsIpiSpecializedProfile(): EfdIcmsIpiSpecializedProfile; set efdIcmsIpiSpecializedProfile(specializedProfile: EfdIcmsIpiSpecializedProfile); set signatories(signatories: Signatory[]); get signatories(): Signatory[]; set scps(scps: Scp[]); get scps(): Scp[]; set events(events: EstablishmentEvent[]); get events(): EstablishmentEvent[]; set stateCollectionSettings(stateCollectionSettings: StateCollectionSettings[]); get stateCollectionSettings(): StateCollectionSettings[]; getStateCollectionSettingsByTaxType(tax_type: StateCollectionSettingsTaxTypeEnum): StateCollectionSettings[]; get nire(): string; set nire(value: string); get crt(): number; set crt(value: number); get suframa(): string; set suframa(value: string); addStateRegistration(establishmentStateRegistration: StateRegistration): void; addMunicipalRegistration(establishmentMunicipalRegistration: MunicipalRegistration): void; get stateRegistrations(): StateRegistration[]; get municipalRegistrations(): MunicipalRegistration[]; addAddress(establishmentAddress: Address): void; get addresses(): Address[]; get fiscalAddress(): Address | undefined; get billingAddress(): Address | undefined; addContact(establishmentContact: Contact): void; get contacts(): Contact[]; get telephoneContact(): Contact | undefined; get emailContact(): Contact | undefined; } declare class FederalCollectionSettings { protected _id: string; protected _tenantid: string; protected _active: boolean; protected _inactivation_date: OurDate; protected _tax_type: string; protected _withholding_tax_type: string; protected _due_date: number; protected _revenue_code: string; protected _due_date_adjustment: DueDateAdjustmentEnum; protected _is_cumulative: boolean; protected _profile_id: string; protected _created_at: Date; protected _updated_at: Date; protected _created_by_name: string; protected _created_by_email: string; protected _updated_by_name: string; protected _updated_by_email: string; set id(id: string); set tenantid(tenantid: string); set active(active: boolean); set inactivation_date(inactivation_date: OurDate); set tax_type(tax_type: string); set withholding_tax_type(withholding_tax_type: string); set due_date(due_date: number); set revenue_code(revenue_code: string); set due_date_adjustment(due_date_adjustment: DueDateAdjustmentEnum); set is_cumulative(is_cumulative: boolean); set profile_id(profile_id: string); set created_at(created_at: Date); set updated_at(updated_at: Date); set created_by_name(created_by_name: string); set created_by_email(created_by_email: string); set updated_by_name(updated_by_name: string); set updated_by_email(updated_by_email: string); get id(): string; get tenantid(): string; get active(): boolean; get inactivation_date(): OurDate; get tax_type(): string; get withholding_tax_type(): string; get due_date(): number; get revenue_code(): string; get due_date_adjustment(): DueDateAdjustmentEnum; get is_cumulative(): boolean; get created_at(): Date; get updated_at(): Date; get created_by_name(): string; get created_by_email(): string; get updated_by_name(): string; get updated_by_email(): string; } interface IReinfAdditionalFields { id: string; tenantid: string; profile_id: string; company_name: string; cnpj: string; tax_classification_taxpayer: string; ecd_required: boolean; payroll_exemption: string; international_agreement_exemption: boolean; softhouse_company_name?: string; softhouse_fiscal_number?: string; softhouse_contact_name?: string; softhouse_telephone?: string; softhouse_email?: string; tax_type: string; calculation_database: string; closing_type: string; expiration_condition?: string; reinf: boolean; dirf: boolean; r2060_by_documents?: boolean; irf_aliquot?: number; expiration_day?: string; layout_version: string; environment_identification: 1 | 2; solicitation_id?: string; active?: boolean; inactivation_date?: Date; created_at: Date; updated_at: Date; } interface ITable9 { id: string; code: string; ncm: string; aliquot: number; bookkeeping_start_date: Date; bookkeeping_end_date: Date; created_at: Date; updated_at: Date; } interface IGrossRevenueContributionHeader { id: string; tenantid: string; profile_id: string; profile_alias: string; establishment_id: string; establishment_alias: string; cnpj: string; activity_code: string; table9: ITable9; } interface INatureOfIncomeBusinessPartner { profile_id?: string; profile_alias?: string; establishment_id?: string; establishment_alias?: string; nature_of_income_id: string; business_partner_id: string | null; business_partner_name: string | null; business_partner_registration_number: string | null; service_code: string; nature_config_id?: string; } interface INatureConfig { tenantid: string; id: string; name: string; errors: string[]; establishments: Establishment[]; nature_configs: INatureOfIncomeBusinessPartner[]; income_natures: number[]; service_codes: string[]; business_partners: string[]; nature_totals: number; service_code_totals: number; business_partner_totals: number; establishment_totals: number; active: boolean; } declare class GrossRevenueContributionHeaders { protected _id: string; protected _tenantid: string; protected _profile_id: string; protected _profile_alias: string; protected _establishment_id: string; protected _establishment_alias: string; protected _cnpj: string; protected _activity_code: string; protected _table9?: ITable9; set id(id: string); set tenantid(tenantid: string); set profile_id(profile_id: string); set profile_alias(profile_alias: string); set establishment_id(establishment_id: string); set establishment_alias(establishment_alias: string); set cnpj(cnpj: string); set activity_code(activity_code: string); set table9(table9: ITable9 | undefined); get id(): string; get tenantid(): string; get profile_id(): string; get profile_alias(): string; get establishment_id(): string; get establishment_alias(): string; get cnpj(): string; get activity_code(): string; get table9(): ITable9 | undefined; } declare class NatureConfig { protected _id: string; protected _tenantid: string; protected _name: string; protected _errors: string[]; protected _establishments: Establishment[]; protected _nature_configs: INatureOfIncomeBusinessPartner[]; protected _income_natures: number[]; protected _business_partners: string[]; protected _nature_totals: number; protected _service_code_totals: number; protected _business_partner_totals: number; protected _establishment_totals: number; protected _active: boolean; set id(id: string); set tenantid(tenantid: string); set name(name: string); set errors(errors: string[]); set establishments(establishments: Establishment[]); set nature_configs(nature_configs: INatureOfIncomeBusinessPartner[]); set income_natures(income_natures: number[]); set business_partners(business_partners: string[]); set nature_totals(nature_totals: number); set service_code_totals(service_code_totals: number); set business_partner_totals(business_partner_totals: number); set establishment_totals(establishment_totals: number); set active(active: boolean); get id(): string; get tenantid(): string; get name(): string; get errors(): string[]; get establishments(): Establishment[]; get nature_configs(): INatureOfIncomeBusinessPartner[]; get income_natures(): number[]; get business_partners(): string[]; get nature_totals(): number; get service_code_totals(): number; get business_partner_totals(): number; get establishment_totals(): number; get active(): boolean; } declare class ReinfSpecializedProfile { protected _id: string; protected _tenantid: string; protected _profile_id: string; protected _company_name: string; protected _cnpj: string; protected _tax_classification_taxpayer: string; protected _ecd_required: boolean; protected _payroll_exemption: string; protected _international_agreement_exemption: boolean; protected _softhouse_company_name?: string; protected _softhouse_fiscal_number?: string; protected _softhouse_contact_name?: string; protected _softhouse_telephone?: string; protected _softhouse_email?: string; protected _tax_type: string; protected _calculation_database: string; protected _closing_type: string; protected _expiration_condition?: string; protected _reinf: boolean; protected _dirf: boolean; protected _r2060_by_documents?: boolean; protected _irf_aliquot?: number; protected _expiration_day?: string; protected _layout_version: string; protected _environment_identification: 1 | 2; protected _solicitation_id?: string; protected _active?: boolean; protected _inactivation_date?: Date; protected _created_at: Date; protected _updated_at: Date; protected _grossRevenueContributionHeaders: GrossRevenueContributionHeaders[]; protected _natureConfig: NatureConfig[]; set id(id: string); set tenantid(tenantid: string); set profile_id(profile_id: string); set company_name(company_name: string); set cnpj(cnpj: string); set tax_classification_taxpayer(tax_classification_taxpayer: string); set ecd_required(ecd_required: boolean); set payroll_exemption(payroll_exemption: string); set international_agreement_exemption(international_agreement_exemption: boolean); set softhouse_company_name(softhouse_company_name: string | undefined); set softhouse_fiscal_number(softhouse_fiscal_number: string | undefined); set softhouse_contact_name(softhouse_contact_name: string | undefined); set softhouse_telephone(softhouse_telephone: string | undefined); set softhouse_email(softhouse_email: string | undefined); set tax_type(tax_type: string); set calculation_database(calculation_database: string); set closing_type(closing_type: string); set expiration_condition(expiration_condition: string | undefined); set reinf(reinf: boolean); set dirf(dirf: boolean); set r2060_by_documents(r2060_by_documents: boolean | undefined); set irf_aliquot(irf_aliquot: number | undefined); set expiration_day(expiration_day: string | undefined); set layout_version(layout_version: string); set environment_identification(environment_identification: 1 | 2); set solicitation_id(solicitation_id: string | undefined); set active(active: boolean | undefined); set inactivation_date(inactivation_date: Date | undefined); set created_at(created_at: Date); set updated_at(updated_at: Date); set grossRevenueContributionHeaders(grossRevenueContributionHeaders: GrossRevenueContributionHeaders[]); set natureConfig(natureConfig: NatureConfig[]); get grossRevenueContributionHeaders(): GrossRevenueContributionHeaders[]; get natureConfig(): NatureConfig[]; get id(): string; get tenantid(): string; get profile_id(): string; get company_name(): string; get cnpj(): string; get tax_classification_taxpayer(): string; get ecd_required(): boolean; get payroll_exemption(): string; get international_agreement_exemption(): boolean; get softhouse_company_name(): string | undefined; get softhouse_fiscal_number(): string | undefined; get softhouse_contact_name(): string | undefined; get softhouse_telephone(): string | undefined; get softhouse_email(): string | undefined; get tax_type(): string; get calculation_database(): string; get closing_type(): string; get expiration_condition(): string | undefined; get reinf(): boolean; get dirf(): boolean; get r2060_by_documents(): boolean | undefined; get irf_aliquot(): number | undefined; get expiration_day(): string | undefined; get layout_version(): string; get environment_identification(): 1 | 2; get solicitation_id(): string | undefined; get active(): boolean | undefined; get inactivation_date(): Date | undefined; get created_at(): Date; get updated_at(): Date; } declare class StartingCreditBalance { protected _id: string; protected _tenantid: string; protected _period: string; protected _establishment_id: string; protected _establishment?: Establishment; protected _profile_id: string; protected _type: StartingCreditBalanceTypeEnum; protected _credit_balance_previous_period: number; protected _credit_balance_sub_auditing?: number; protected _credit_balance_previous_period_fcp?: number; protected _uf?: string; protected _credit_balance_control_id?: string; protected _withholding_nature_indicator?: string; protected _origin_credit?: CreditBalanceOriginCreditTypeEnum; protected _type_regime?: CreditBalanceRegimeTypeEnum; protected _total_value?: number; protected _credit_type?: string; protected _created_at: Date; get id(): string; set id(value: string); get tenantid(): string; set tenantid(value: string); get period(): string; set period(value: string); get establishment_id(): string; set establishment_id(value: string); get establishment(): Establishment | undefined; set establishment(value: Establishment | undefined); get profile_id(): string; set profile_id(value: string); get type(): StartingCreditBalanceTypeEnum; set type(value: StartingCreditBalanceTypeEnum); get credit_balance_previous_period(): number; set credit_balance_previous_period(value: number); get credit_balance_sub_auditing(): number | undefined; set credit_balance_sub_auditing(value: number | undefined); get credit_balance_previous_period_fcp(): number | undefined; set credit_balance_previous_period_fcp(value: number | undefined); get uf(): string | undefined; set uf(value: string | undefined); get credit_balance_control_id(): string | undefined; set credit_balance_control_id(value: string | undefined); get withholding_nature_indicator(): string | undefined; set withholding_nature_indicator(value: string | undefined); get origin_credit(): CreditBalanceOriginCreditTypeEnum | undefined; set origin_credit(value: CreditBalanceOriginCreditTypeEnum | undefined); get type_regime(): CreditBalanceRegimeTypeEnum | undefined; set type_regime(value: CreditBalanceRegimeTypeEnum | undefined); get total_value(): number | undefined; set total_value(value: number | undefined); get credit_type(): string | undefined; set credit_type(value: string | undefined); get created_at(): Date; set created_at(value: Date); } declare class Profile { protected _id: string; protected _active: boolean; protected _tenantid: string; protected _validFrom: Date; protected _validTo: Date | null; protected _mainEstablishment: Establishment; protected _mainEstablishmentId: string; protected _alias: string; protected _taxation_type: TaxationType; private _establishments; private _reinfSpecializedProfile; private _efdContribSpecializedProfile; private _ecdSpecializedProfile; private _ecfSpecializedProfile; private _startingCreditBalance; private _federalCollectionSettings; set id(id: string); set active(active: boolean); set tenantid(tenantid: string); set validFrom(validFrom: Date); set validTo(validTo: Date); set mainEstablishmentId(mainEstablishmentId: string); set alias(alias: string); get id(): string; get active(): boolean; get tenantid(): string; get taxation_type(): TaxationType; set taxation_type(taxation_type: TaxationType); get validFrom(): Date; get validTo(): Date; get mainEstablishmentId(): string; get alias(): string; get mainEstablishment(): Establishment | undefined; get establishments(): Establishment[]; set establishments(establishments: Establishment[]); findEstablishment(establishment_id: string): Establishment; findEstablishmentByBranchId(branchId: string): Establishment; checkValidityDate(generationPeriod: Date | string): boolean; get reinfSpecializedProfile(): ReinfSpecializedProfile; set setReinfSpecializedProfile(reinfSpecializedProfile: ReinfSpecializedProfile); set setEfdIcmsIpiSpecializedProfile(efdIcmsIpiSpecializedProfile: EfdIcmsIpiSpecializedProfile[]); get efdContribSpecializedProfile(): EfdContribSpecializedProfile; set setEfdContribSpecializedProfile(efdContribSpecializedProfile: EfdContribSpecializedProfile); get ecdSpecializedProfile(): EcdSpecializedProfile; set setEcdSpecializedProfile(ecdSpecializedProfile: EcdSpecializedProfile); get ecfSpecializedProfile(): EcfSpecializedProfile; set setEcfSpecializedProfile(ecfSpecializedProfile: EcfSpecializedProfile); get startingCreditBalance(): StartingCreditBalance[]; set startingCreditBalance(startingCreditBalance: StartingCreditBalance[]); get federalCollectionSettings(): FederalCollectionSettings[]; set collectionSettings(collectionsSettings: ICollectionSettings[]); private isFederalCollectionSetting; private mapDataToFederalCollectionSettings; private mapDataToStateCollectionSettings; } interface IProfileRepository { getProfileById(profile_id: string, tenantid: string, period?: string): Promise; } interface IStateCollectionSettingsRepository { getCollectionSettingsByProfileId(tenantid: string, profile_id: string): Promise; } interface ICollectionSettings { id: string; tenantid: string; active: boolean; inactivation_date: OurDate; tax_type: TaxTypeEnum; config_type?: string; obligation_code?: string; due_date: number; revenue_code: string; uf?: string; config_fcp: boolean; obligation_code_fcp?: string; due_date_fcp?: number; revenue_code_fcp?: string; tax_collection_type?: string; is_cumulative?: boolean; due_date_adjustment?: DueDateAdjustmentEnum; withholding_tax_type?: TaxTypeEnum; establishment_id?: string; profile_id: string; judicial_process_id?: string; judicial_process_number?: string; judicial_process_description?: string; judicial_process_origin_indicator?: string; created_at: Date; updated_at: Date; created_by_name: string; created_by_email: string; updated_by_name: string; updated_by_email: string; } interface IProfile { validFrom: string; alias: string; mainEstablishment?: IEstablishment; id?: string; created_at?: Date; tenantid?: string; mainEstablishmentId?: string | null; validTo?: string | null; active?: boolean; inactivation_date?: Date | null; taxation_type?: TaxationType; } interface IProfileServiceUrls { taxServiceUrl?: string; reinfBaseServiceUrl?: string; efdIcmsIpiBaseServiceUrl?: string; ecfBaseServiceUrl?: string; efdContribBaseServiceUrl?: string; ecdBaseServiceUrl?: string; partnerServiceUrl?: string; } interface IStartingCreditBalance { id: string; tenantid: string; period: string; establishment_id: string; profile_id: string; type: StartingCreditBalanceTypeEnum; credit_balance_previous_period?: number; credit_balance_sub_auditing?: number; credit_balance_previous_period_fcp?: number; uf?: string; credit_balance_control_id?: string; origin_credit?: CreditBalanceOriginCreditTypeEnum; type_regime?: CreditBalanceRegimeTypeEnum; credit_type?: string; total_value?: number; withholding_nature_indicator?: string; created_at: Date; } interface IEstablishment { alias: string; taxation_type: TaxationType; fiscal_qualification_type: string; exception_legal_type: string; branchId: string; profileId: string; fiscal_id_number: string; headerAccountPlanId?: string; tenantid: string; active?: boolean; inactivation_date?: Date; id?: string; created_at?: Date; profile?: IProfile; single_national_option?: SimpleNationalOption; cprb_option?: CprbOption; cod_inc_trib?: CodIncTrib; isMainEstablishment?: boolean; } interface ISignatory { name: string; fiscal_id_number: string; postal_code: string; address: string; number: string; district: string; establishmentId: string; person_type: string; phone?: string; email?: string; county_code?: string; fiscal_office_id_number?: string; complement?: string; fax?: string; crc_reg_year?: string; crc_id_number?: string; crc_state_initials?: string; crc_sequential_number?: string; crc_validity_date?: string; active?: boolean; inactivation_date?: Date | null; id?: string; created_at?: Date; tenantid?: string; } interface IScp { fiscal_id_number: string; commercial_name: string; description: string; establishmentId: string; complement?: string; establishment?: IEstablishment; id?: string; created_at?: Date; tenantid?: string; active?: boolean; inactivation_date?: Date | null; } interface IEstablishmentEvent { special_situation: '0' | '1' | '2' | '3' | '4' | '5' | '6'; situation_date: Date | string; establishment?: IEstablishment; id?: string; created_at?: Date; tenantid?: string; establishmentId?: string; } declare class ProfileRestRepository implements IProfileRepository { private readonly urls; private readonly stateSettingsRepository; private readonly masterDataRepository; constructor(urls: IProfileServiceUrls, stateSettingsRepository: IStateCollectionSettingsRepository, masterDataRepository?: Repository); getProfileById(profile_id: string, tenantid: string, period?: any): Promise; private getCollectionSettingsByProfileId; getProfileRestById(profile_id: string, tenantid: string): Promise; getStartingCreditByProfileId(profile_id: string, tenantid: string): Promise; private mapDataToStartingCreditBalance; getProfileByBranchId(branch_id: string, tenantid: string): Promise; getEstablishmentByProfileId(profile_id: string, tenantid: string): Promise; getSignatoryByProfileId(profile_id: string, tenantid: string): Promise; getScpByProfileId(profile_id: string, tenantid: string): Promise; getEventsByProfileId(profile_id: string, tenantid: string): Promise; private getAllPartners; getReinfSpecializedProfile(profile_id: string, tenantid: string): Promise; getEcdSpecializedProfile(profile_id: string, tenantid: string): Promise; getEcfSpecializedProfile(profile_id: string, tenantid: string): Promise; getEfdContribSpecializedProfile(profile_id: string, tenantid: string): Promise; getEfdIcmsIpiSpecializedProfile(profile_id: string, tenantid: string): Promise; private getJsonData; private mountEstablishment; private mountSignatories; private mountSCPs; private mountEvents; } interface IEcfSpecializedProfile { profile_id: string; codigo_natureza_juridica: string; metodo_avaliacao_estoque_final: string; cnae_principal: string; informar_centro_de_custos: boolean; periodo_apuracao_irpj_csll: string; qualificacao_pessoa_juridica: string; forma_apuracao_jan: string; forma_apuracao_fev: string; forma_apuracao_mar: string; forma_apuracao_abr: string; forma_apuracao_mai: string; forma_apuracao_jun: string; forma_apuracao_jul: string; forma_apuracao_ago: string; forma_apuracao_set: string; forma_apuracao_out: string; forma_apuracao_nov: string; forma_apuracao_dez: string; escrituracao: string; tipo_pessoa_juridica: string; apuracao_irpj: string; apuracao_csll: string; pj_sujeito_aliquota_csll: string; quantidade_total_scp_socio_ostensivo: string; participacoes_consorcio_empresas: boolean; administradora_fundos_e_clubes: boolean; operacoes_exterior: boolean; operacoes_pessoa_vinculada: boolean; participacoes_exterior: boolean; pj_artigos_48_49: boolean; atividade_rural: boolean; isencao_reducao_lucro_presumido: boolean; lucro_exploracao: boolean; ind_finor_finam: boolean; pagamentos_exterior_ou_nao_residentes: boolean; recebimentos_exterior_ou_nao_residentes: boolean; ativos_exterior: boolean; participacao_equivalencia_patrimonial: boolean; royalties_recebidos_brasil_exterior: boolean; royalties_pagos_brasil_exterior: boolean; comercio_eletronico_e_ti: boolean; rendimentos_relativos: boolean; pagamentos_ou_remessa_brasil_exterior: boolean; pj_habilitada: boolean; capacitacao_informatica_e_inclusao: boolean; inovacao_tec: boolean; areas_livre_comercio: boolean; polo_industrial_manaus_amazonia: boolean; zonas_processamento_exportacao: boolean; entidade_grupo_multinacional: boolean; declaracao_moeda_estrangeira: boolean; opcao_preco_transferencia_ano_calendario_2023: boolean; percentual_irpj?: number; percentual_csll?: number; id?: string; created_at: Date; updated_at: Date; tenantid: string; } declare class PostgresRepository implements IStateCollectionSettingsRepository { private readonly _client; private _isConnected; constructor(postgresConfig: PostgresConfig); private isConnected; connect(): Promise; close(): Promise; getCollectionSettingsByProfileId(profile_id: string, tenantid: string): Promise; } interface ProfileDbRepositoryConfig { taxServiceDb: PostgresConfig; efdContribDb?: MongoConfig; efdIcmsIpiDb?: MongoConfig; reinfDb?: PostgresConfig; ecfDb?: PostgresConfig; ecdDb?: MongoConfig; } declare class ProfileDbRepository implements IProfileRepository { private readonly _connections; private readonly _mongoClients; private readonly _pgPools; constructor(config: ProfileDbRepositoryConfig); getProfileById(profile_id: string, tenantid: string, period?: string): Promise; getEstablishments(profile_id: string, tenantid: string): Promise; private fetchProfile; private fetchStartingCreditBalance; private fetchEstablishments; private fetchReinf; private fetchEcd; private fetchEcf; private fetchEfdContrib; private fetchEfdIcmsIpi; private getEstablishmentsFromPostgres; private mapDataToProfile; private mapDataToStartingCreditBalance; private mapDataToEstablishments; private mapDataToSignatories; private mapDataToScps; private mapDataToEvents; private mapDataToReinf; private mapDataToEcd; private mapDataToEcf; private mapDataToEfdContrib; private mapDataToEfdIcmsIpi; } declare const keyCompositionMetadata: unique symbol; declare const onDuplicationStrategyMetadata: unique symbol; declare const MaximumNumericLength = 19; declare const DefaultAlphanumericLength = 255; declare const DefaultDecimalSeparator = ","; declare const DefaultDecimalLength = 2; declare enum FieldDataType { alphanumeric = 0, numeric = 1 } declare enum ValueProviderType { property = 0, method = 1 } interface FieldFormat { required: boolean; dataType: FieldDataType; maximumLength: number; maximumDecimalsLength: number; fillEntireLength: boolean; valueProvider: ValueProviderType; decimalSeparator: string; removeAccents: boolean; removeSpecialCharacters: boolean; } declare enum OnDuplicationStrategy { Error = 0, Ignore = 1, Overwrite = 2, Duplicate = 3 } declare function Numeric(required?: boolean, fillEntireLength?: boolean, maximumLength?: number): (target: any, propertyKey: any, other?: any) => void; declare function Decimal(required?: boolean, fillEntireLength?: boolean, maximumLength?: number, maximumDecimalsLength?: number, decimalSeparator?: string): (target: any, propertyKey: any, other?: any) => void; declare function Alphanumeric(required?: boolean, fillEntireLength?: boolean, maximumLength?: number, removeAccents?: boolean, removeSpecialCharacters?: boolean): (target: any, propertyKey: any, other?: any) => void; interface KeyComposition { fields: KeyFieldDefinition[]; } interface KeyFieldDefinition { fieldName: string; valueProvider: ValueProviderType; } declare function Key(): (target: any, propertyKey: any, other?: any) => void; declare function OnDuplication(strategy?: OnDuplicationStrategy): (constructor: Function) => void; interface RegisterSubscriber { eventHandler(eventData: RegisterEventData): void; } declare enum Event { REGISTER_CREATED = "register_created" } interface RegisterEventData { event: Event; dataTypeName: string; data: RegisterDefinition; } declare function newRegisterEventData(register: RegisterDefinition): RegisterEventData; interface RegisterEventNotifier { addSubscriber(subscriber: RegisterSubscriber): void; notifyEvent(eventData: RegisterEventData): void; } interface RegisterDefinition { [reg: string]: any; tagName(): string; getChildren(): RegisterDefinition[]; getKeyValue(): string; getChildrenByRegTag(tagName: string): RegisterDefinition[]; numberOfRegisters(): number; numberOfChildRegisters(): number; numberOfRegisterByTagName(): Map; getOnDuplicationStrategy(): OnDuplicationStrategy; } declare abstract class Register implements RegisterDefinition { [key: string]: any; private readonly _registerNotifier; private readonly _children; private readonly _childrenKeys; reg: string; constructor(registerTag: string, notifier: RegisterEventNotifier | null); tagName(): string; protected addChild(child: Register, checkDuplicates?: boolean): void; getChildren(): RegisterDefinition[]; getKeyValue(): string; getChildrenByRegTag(tagName: string): RegisterDefinition[]; numberOfRegisters(): number; numberOfChildRegisters(): number; numberOfRegisterByTagName(): Map; getOnDuplicationStrategy(): OnDuplicationStrategy; } interface RegisterPersist { has(regTag: string): boolean; get(regTag: string): RegisterDefinition[] | number | undefined; set(regTag: string, registers: RegisterDefinition[]): void; add(register: RegisterDefinition): void; all(): RegisterDefinition[]; hasRegisters(): boolean; getByKey(registerKey: string): RegisterDefinition | undefined; } declare abstract class RegisterSorter { abstract sort(registers: RegisterDefinition[]): RegisterDefinition[]; } declare class AlphabeticalRegisterSorter extends RegisterSorter { static createInstance(): AlphabeticalRegisterSorter; sort(registers: RegisterDefinition[]): RegisterDefinition[]; } declare class InsertionOrderRegisterSorter extends RegisterSorter { static createInstance(): InsertionOrderRegisterSorter; sort(registers: RegisterDefinition[]): RegisterDefinition[]; } declare const alphabeticalByReg: AlphabeticalRegisterSorter; declare const insertionOrder: InsertionOrderRegisterSorter; declare abstract class Block implements RegisterEventNotifier, RegisterSubscriber { private readonly _name; private eventEmitter; protected registersPersist: RegisterPersist; protected sortStrategy: RegisterSorter; protected constructor(name: string, regPersist: RegisterPersist, sortStrategy?: RegisterSorter); abstract eventHandler(eventData: RegisterEventData): void; notifyEvent(eventData: RegisterEventData): void; get name(): string; get registers(): RegisterDefinition[]; addSubscriber(subscriber: RegisterSubscriber): void; addRegister(register: T): void; hasContent(): boolean; getRegisterByKey(registerKey: string): RegisterDefinition; numberOfRegisters(): number; } declare class CounterBlock extends Block { constructor(regPersist: RegisterPersist, name?: string); eventHandler(eventData: RegisterEventData): void; } declare class CounterRegister implements RegisterDefinition { reg: string; reg_blc: string; qtd_reg_blc: number; constructor(qtd_reg_blc?: number, register?: string); [reg: string]: any; tagName(): string; getChildren(): RegisterDefinition[]; getKeyValue(): string; getChildrenByRegTag(tagName: string): RegisterDefinition[]; numberOfRegisters(): number; numberOfChildRegisters(): number; numberOfRegisterByTagName(): Map; getOnDuplicationStrategy(): OnDuplicationStrategy; } declare abstract class TaxReport { private readonly _blocks; protected constructor(); protected registerBlock(block: Block): TaxReport; protected getBlock(name: string): Block | undefined; get Blocks(): Block[]; } declare class TagCounter { private _blocksCounters; constructor(); countRegister(register: RegisterDefinition): void; getBlockRegistersTotal(blockLetter: string): number; getAllTagsCounters(): Map; } interface RegisterGenerator { generate(register: RegisterDefinition): void; save(): void; } interface NestedRegisterGenerator extends RegisterGenerator { beginRegister(register: RegisterDefinition): void; endRegister(register: RegisterDefinition): void; } interface ReportGenerationOptions { openSuffix: string; closeSuffix: string; openFileRegister: Register; registerGenerator: RegisterGenerator; } declare class CloseFile extends Register { qtd_lin: number; constructor(); } declare class OpenBlock extends Register { constructor(tag: string); ind_mov: number; } declare class CloseBlock extends Register { constructor(tag: string); qtd_lin: number; } declare class ReportGenerator { protected _options: ReportGenerationOptions; protected _counters: TagCounter; private constructor(); static defaultOptions(openFileRegister: Register, registerGenerator: RegisterGenerator): ReportGenerationOptions; static newWithDefaultOptions(openFileRegister: Register): ReportGenerator; static newWithOptions(options: ReportGenerationOptions): ReportGenerator; private beforeGeneration; private generation; private afterGeneration; protected beforeBlockGeneration(block: Block): void; protected blockGeneration(block: Block): void; protected beforeRegisterGeneration(register: RegisterDefinition): void; protected registerGeneration(register: RegisterDefinition): void; protected afterRegisterGeneration(register: RegisterDefinition): void; protected afterBlockGeneration(block: Block): void; private addBlock; private addRegister; generateFile(taxReport: TaxReport): void; } interface SimpleReportGenerationOptions { openFileRegister: Register | null; registerGenerator: RegisterGenerator; } declare class SimpleReportGenerator { protected _options: SimpleReportGenerationOptions; private constructor(); static defaultOptions(openFileRegister: Register | null, registerGenerator: RegisterGenerator): SimpleReportGenerationOptions; static newWithDefaultOptions(openFileRegister: Register | null): SimpleReportGenerator; static newWithOptions(options: SimpleReportGenerationOptions): SimpleReportGenerator; private beforeGeneration; private generation; private afterGeneration; protected beforeBlockGeneration(block: Block): void; protected blockGeneration(block: Block): void; protected beforeRegisterGeneration(register: RegisterDefinition): void; protected registerGeneration(register: RegisterDefinition): void; protected afterRegisterGeneration(register: RegisterDefinition): void; protected afterBlockGeneration(block: Block): void; private addBlock; private addRegister; generateFile(taxReport: TaxReport): void; } interface OutputWriter { write(content: string): void; save(): void; } declare class ConsoleOutput implements OutputWriter { private constructor(); static createInstance(): ConsoleOutput; write(content: string): void; save(): void; } declare class MemoryPersist implements RegisterPersist { private readonly registers; private readonly registersByKey; static createInstance(): MemoryPersist; private constructor(); getByKey(registerKey: string): Register | undefined; set(regTag: string, registers: Register[]): void; hasRegisters(): boolean; all(): Register[]; get(regTag: string): Register[] | undefined; has(regTag: string): boolean; add(register: Register): void; } declare class StringArrayOutput implements OutputWriter { private output; write(content: string): void; save(): void; get Output(): string[]; } type FieldOrder = 'legacy' | 'declaration'; declare class FieldKeyResolver { private readonly mode; private constructor(); static newWithOptions(mode?: FieldOrder): FieldKeyResolver; resolve(register: object): string[]; } interface TaxRegisterGenerationOptions { writer: OutputWriter; fieldSeparator: string; separatorAtTheRegisterStart: boolean; separatorAtTheRegisterEnd: boolean; writeRegisterTag: boolean; fieldOrder?: FieldOrder; } declare class TaxRegisterGenerator implements RegisterGenerator { protected _options: TaxRegisterGenerationOptions; private readonly fieldKeyResolver; private readonly fieldFormatter; private constructor(); save(): void; static defaultOptions(writer?: OutputWriter): TaxRegisterGenerationOptions; static newWithDefaultOptions(): TaxRegisterGenerator; static newWithOptions(options: TaxRegisterGenerationOptions): TaxRegisterGenerator; get writer(): OutputWriter; generate(register: Register): void; private alphanumericValue; private numericValue; } interface FormatValueContext { omitZeroWhenOptional: boolean; stripLeadingZeros: boolean; fieldSeparator?: string; } declare class FieldFormatter { private readonly ctx; private constructor(); static newWithOptions(ctx: FormatValueContext): FieldFormatter; alphanumericValue(metadata: FieldFormat, value: unknown): string; numericValue(metadata: FieldFormat, value: unknown, stripLeadingZeros?: boolean): string; } declare const XML_CHILD_DATA_TYPE: "child"; type XmlFieldKind = 'element' | 'attribute' | 'child'; type XmlDateFormat = 'date' | 'dateTime'; interface XmlFieldMeta { name: string; kind: XmlFieldKind; emitEmpty?: boolean; stripLeadingZeros?: boolean; dateFormat?: XmlDateFormat; } interface XmlTypeMeta { name: string; prefix?: string; } interface XmlNamespaces { default?: string; [prefix: string]: string | undefined; } interface StrictError { register: string; field: string; reason: string; } interface XmlReportGenerationOptions { writer: OutputWriter; rootElement: string; xmlDeclaration?: boolean; encoding?: string; namespaces?: XmlNamespaces; fieldOrder?: FieldOrder; indent?: string | false; strict?: boolean; } interface ResolvedXmlOptions { writer: OutputWriter; rootElement: string; xmlDeclaration: boolean; encoding: string; namespaces: XmlNamespaces; fieldOrder: FieldOrder; indent: string | false; strict: boolean; } interface XmlGenerationResult { xml: string; strictErrors: StrictError[]; } declare function XmlElement(name: string, opts?: Partial): PropertyDecorator; declare function XmlAttribute(name: string): PropertyDecorator; declare function XmlChild(): PropertyDecorator; declare function XmlComplexType(name: string, opts?: { prefix?: string; }): ClassDecorator; declare function XmlDate(): PropertyDecorator; declare function XmlDateTime(): PropertyDecorator; declare class XmlMetadata { static getType(register: object): XmlTypeMeta | undefined; static getField(register: object, prop: string): XmlFieldMeta | undefined; } declare class XmlFieldFormatter { private readonly numericFormatter; private constructor(); static newWithDefaultOptions(): XmlFieldFormatter; escape(value: string): string; isMissing(value: unknown): boolean; format(fmt: FieldFormat, xml: XmlFieldMeta, value: unknown, strictErrors: StrictError[] | undefined, registerName: string, field: string): string | undefined; private formatDate; private pad2; } declare class XmlStrictError extends Error { readonly strictErrors: StrictError[]; readonly xml: string; constructor(strictErrors: StrictError[], xml: string); } declare class XmlRegisterGenerator implements NestedRegisterGenerator { private readonly opts; private readonly writer; readonly strictErrors: StrictError[]; private readonly chunks; private readonly fieldKeyResolver; private readonly fieldFormatter; constructor(opts: ResolvedXmlOptions, writer: OutputWriter); get output(): string; generate(register: RegisterDefinition): void; save(): void; beginRegister(register: RegisterDefinition): void; endRegister(_register: RegisterDefinition): void; append(chunk: string): void; serializeRegister(register: RegisterDefinition, depth: number, inheritedPrefix?: string): void; private nl; private qualify; } declare class XmlReportGenerator { private readonly opts; private constructor(); static newWithOptions(opts: XmlReportGenerationOptions): XmlReportGenerator; get writer(): OutputWriter; generateFile(taxReport: TaxReport): XmlGenerationResult; private static resolveOptions; private namespaceDeclarations; } declare const MessageCode: { AUTH: { UNAUTHORIZED: string; TOKEN_EXPIRED: string; }; DATABASE: { CONNECTION_FAILED: string; QUERY_ERROR: string; }; VALIDATION: { INVALID_INPUT: string; MISSING_FIELD: string; }; INTERNAL: { INTERNAL_SERVER_ERROR: string; UNEXPECTED_ERROR: string; }; SETTING: { PROFILE_NOT_SET_UP: string; REINF_NOT_ENABLED: string; R2060_CONFIG_CONFLICT: string; }; }; type AuthCodeType = (typeof MessageCode.AUTH)[keyof typeof MessageCode.AUTH]; type DatabaseCodeType = (typeof MessageCode.DATABASE)[keyof typeof MessageCode.DATABASE]; type ValidationCodeType = (typeof MessageCode.VALIDATION)[keyof typeof MessageCode.VALIDATION]; type InternalCodeType = (typeof MessageCode.INTERNAL)[keyof typeof MessageCode.INTERNAL]; type SettingCodeType = (typeof MessageCode.SETTING)[keyof typeof MessageCode.SETTING]; type MessageCodeType = AuthCodeType | DatabaseCodeType | ValidationCodeType | InternalCodeType | SettingCodeType; declare enum MessageCategory { AUTH = "AUTH", DATABASE = "DB", VALIDATION = "VALID", INTERNAL = "INTERNAL", SETTING = "SETTING" } type Locale = 'pt-BR' | 'en-US' | 'es-ES'; declare const DEFAULT_LOCALE: Locale; interface MessageTemplate { key: MessageCodeType; category: MessageCategory; userMessage: Record; actionSuggestion: Record; technicalMessage: string; } declare const Messages: Record; interface AuthUnauthorizedParams { endpoint: string; } interface AuthTokenExpiredParams { endpoint: string; userId: string; } interface DatabaseConnectionFailedParams { error: string; } interface DatabaseQueryErrorParams { error: string; query: string; } interface ValidationInvalidInputParams { inputDetails: string; } interface ValidationMissingFieldParams { fieldName: string; } interface InternalServerErrorParams { error: string; endpoint: string; } interface SettingErrorParams { profileName?: string; branchName?: string; } interface ParameterTypes { } declare function formatMessage(template: string, params: T extends keyof ParameterTypes ? ParameterTypes[T] : Record): string; declare function logWithContext(messageCode: T, params: T extends keyof ParameterTypes ? ParameterTypes[T] : Record, additionalContext?: Record, locale?: Locale): { messageCode: T; userMessage: string; actionSuggestion: string; }; declare function cleanData(obj: any): any; declare function isEmptyObject(obj: object): boolean; declare function toSafeNumber(value: unknown, fallback?: number): number; declare function validationValue(field: any): any; declare enum DayOfWeek { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6 } declare const WEEKDAYS: DayOfWeek[]; type HolidayScope = 'COUNTRY' | 'STATE' | 'CITY'; type HolidayLocation = { country: string; state?: string; city?: string; }; type HolidayDefinition = { id: string; name: string; scope: HolidayScope; country: string; state?: string; city?: string; validFromYear?: number; validToYear?: number; } & ({ type: 'fixed'; month: number; day: number; } | { type: 'easter-offset'; offsetDays: number; }); type ResolvedHoliday = { id: string; name: string; date: string; scope: HolidayScope; }; declare class EasterCalculator { static getEasterSunday(year: number): Date; static getEasterBasedDate(year: number, offsetDays: number): Date; } declare class Calendar { private definitions; private workingDays; private cache; constructor(definitions: HolidayDefinition[], workingDays?: DayOfWeek[]); private resolveDate; private matchesLocation; private isValidForYear; private getResolved; private static pad; private static toDateString; isHoliday(date: Date, location: HolidayLocation): boolean; getHoliday(date: Date, location: HolidayLocation): ResolvedHoliday | undefined; isBusinessDay(date: Date, location: HolidayLocation): boolean; nextBusinessDay(date: Date, location: HolidayLocation): Date; previousBusinessDay(date: Date, location: HolidayLocation): Date; adjustDueDate(date: Date, adjustment: DueDateAdjustmentEnum, location: HolidayLocation): Date; addBusinessDays(date: Date, days: number, location: HolidayLocation): Date; static forBrazil(extraHolidays?: HolidayDefinition[], workingDays?: DayOfWeek[]): Calendar; } declare const BRAZIL_HOLIDAYS: HolidayDefinition[]; export { AccountServicePostgresRepository, AccountingDocument, ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, AlphabeticalRegisterSorter, Alphanumeric, type AuditAction, type AuditActorType, type AuditChangeSet, type AuditChangeSetType, type AuditContext, type AuditEvent, AuditEventBuilder, AuditEventService, type AuditFieldChange, type AuditServiceConfig, type AuditSourceType, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, BRAZIL_HOLIDAYS, Block, BuilderAccountingDocument, BuilderAddition, BuilderAddress, BuilderConversionFactor, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CNPJ_FLEXIBLE_REGEX, CNPJ_MASKED_REGEX, CNPJ_RAW_REGEX, CPF, CPF_FLEXIBLE_REGEX, CPF_MASKED_REGEX, CPF_RAW_REGEX, CST, CalculationBasisNatureSetting, Calendar, type Cloneable, CloseBlock, CloseFile, CodIncTrib, type Cod_ent_ref, CodeStatusEnum, type CompareOptions, type CompareResult, ConfigTypeEnum, ConsoleOutput, Contact, ContactTypesEnum, ConversionFactor, CounterBlock, CounterRegister, Country, CountryCodeEnum, CprbOption, CreditBalanceOriginCreditTypeEnum, CreditBalanceRegimeTypeEnum, CteTypeEnum, DEFAULT_LOCALE, type DatabaseConnectionFailedParams, type DatabaseQueryErrorParams, DayOfWeek, Decimal, DefaultAlphanumericLength, DefaultDecimalLength, DefaultDecimalSeparator, DescriptionStatusEnum, DifalIcmsCategoryEnum, Document, type DocumentRepository, DocumentTypeEnum, DonationIndicatorEnum, DueDateAdjustmentEnum, EasterCalculator, EcdSpecializedProfile, EcfSpecializedProfile, EfdContribSpecializedProfile, EfdIcmsIpiSpecializedProfile, Email, EnforceabilityOfISSEnum, EnrichmentField, Establishment, EstablishmentEvent, Event, EventEnum, FederalCollectionSettings, FieldDataType, type FieldEnricherFn, type FieldFormat, FieldFormatter, FieldKeyResolver, type FieldOrder, type FiltersDocument, FiscalQualificationType, type FormatValueContext, FreightContractedNatureIndicatorEnum, FreightTypeCodeEnum, FreightTypeEnum, type GetAuditTaxCollectionQuery, GrossRevenueContributionHeaders, type HolidayDefinition, type HolidayLocation, type HolidayScope, type IAccountingDocumentMongo, type IAddition, type IAddressMongo, type IAuditEventRepository, type IBaseHeadersDTO, type ICalculationBasisNatureSetting, type ICollectionSettings, type IConversionFactor, type IDocumentMongo, type IEcdSpecializedProfile, type IEcfSpecializedProfile, type IEfdContribSpecializedProfile, type IEfdicmsipiAdditionalFields, type IEstablishment, type IEstablishmentEvent, type IGrossRevenueContributionHeader, type IIcmsAdjustmentExtraInfo, type IIcmsAdjustmentSetting, type IIcmsCreditBaseConfig, type IIcmsCreditConfigLog, type IImportDeclaration, type IItemMongo, type IJudicialProcess, type INatureConfig, type INatureOfIncomeBusinessPartner, type IPersonMongo, type IProfile, type IProfileRepository, type IProfileServiceUrls, type IReinfAdditionalFields, type IRevenueNatureSettings, type IScp, type ISignatory, type IStartingCreditBalance, type IStateCollectionSettingsRepository, type ITable9, type ITaxMongo, type ITaxTypeConfig, type ITaxTypeConfigBase, type ITaxTypeConfigCreateOrUpdate, type ITaxTypeConfigLog, IcmsAdjustmentGroupEnum, IcmsAdjustmentRegistryEnum, IcmsAdjustmentSetting, IcmsAdjustmentTaxTypeEnum, IcmsAdjustmentTypeEnum, IcmsCalculationIndicatorEnum, type IdentificationNumber, ImportDeclaration, InsertionOrderRegisterSorter, IntermediationTypeEnum, type InternalServerErrorParams, InternationalTransportTypeEnum, IssuerIndicatorEnum, Item, ItemTypeEnum, JudicialProcessOriginEnum, Key, type KeyComposition, type KeyFieldDefinition, LayoutDateFormat, type Locale, MaximumNumericLength, MemoryMasterDataRepository, MemoryPersist, MessageCategory, MessageCode, type MessageCodeType, Messages, ModelConverter, ModelRollback, MongoAuditEventRepository, MongoConfig, MongoRepository, MongoToDocumentBuilder, MunicipalObligation, MunicipalObligationIdEnum, MunicipalObligationNameEnum, MunicipalObligationTypeEnum, MunicipalRegistration, Municipality, NameCountryEnum, NatureCode, NatureConfig, type NestedRegisterGenerator, Numeric, ObjectComparator, ObligationCodeEnum, OnDuplication, OnDuplicationStrategy, OpenBlock, OperationTypeEnum, OurDate, type OutputWriter, type ParameterTypes, PaymentTypeEnum, PeriodDateFieldEnum, Person, type PisCofinsOptions, PostgresConfig, PostgresRepository, ProductOriginEnum, Profile, ProfileDbRepository, ProfileRestRepository, ProfileTaxTypeEnum, Register, type RegisterDefinition, type RegisterEventData, type RegisterEventNotifier, type RegisterGenerator, type RegisterPersist, RegisterSorter, type RegisterSubscriber, ReinfSpecializedProfile, type ReportGenerationOptions, ReportGenerator, type Repository, type ResolvedHoliday, type ResolvedXmlOptions, RevenueNatureSettings, RevenueTypeEnum, Scp, ServiceCode, ServiceCodeEnum, type SettingErrorParams, Signatory, SimpleNationalOption, type SimpleReportGenerationOptions, SimpleReportGenerator, StartingCreditBalance, StartingCreditBalanceTypeEnum, State, StateCollectionSettings, StateCollectionSettingsConfigTypeEnum, StateCollectionSettingsTaxTypeEnum, StateEnum, StateRegistration, StateRegistrationIndicatorEnum, StatusDocumentEnum, type StrictError, StringArrayOutput, TagCounter, Tax, type TaxCollectionDetails, TaxCollectionType, TaxCollectionTypeEnum, TaxRegimeEnum, type TaxRegimes, type TaxRegisterGenerationOptions, TaxRegisterGenerator, TaxReport, TaxTypeEnum, TaxationType, Telephone, Uf, type ValidationInvalidInputParams, type ValidationMissingFieldParams, ValueProviderType, WEEKDAYS, XML_CHILD_DATA_TYPE, XmlAttribute, XmlChild, XmlComplexType, XmlDate, type XmlDateFormat, XmlDateTime, XmlElement, XmlFieldFormatter, type XmlFieldKind, type XmlFieldMeta, type XmlGenerationResult, XmlMetadata, type XmlNamespaces, XmlRegisterGenerator, type XmlReportGenerationOptions, XmlReportGenerator, XmlStrictError, type XmlTypeMeta, ZERO_PIS_COFINS_BY_CST, ZfmPresumedCreditTypeEnum, alphabeticalByReg, buildMongoFilter, buildMongoFilterToRetainedTax, calculate_bases_values, cleanData, createReferentialAccountPlanEnricher, formatMessage, insertionOrder, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };