@seidor-cloud-produtos/tax-core 1.0.31 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -7
- package/dist/index.d.mts +133 -22
- package/dist/index.d.ts +133 -22
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,12 +104,15 @@ Objetos de valor reutilizáveis e imutáveis para conceitos fiscais brasileiros.
|
|
|
104
104
|
|
|
105
105
|
**Classes:**
|
|
106
106
|
- `CPF` - Validação e formatação de CPF (pessoa física)
|
|
107
|
-
- `CNPJ` - Validação e formatação de CNPJ (pessoa jurídica)
|
|
107
|
+
- `CNPJ` - Validação e formatação de CNPJ (pessoa jurídica), com suporte a CNPJ alfanumérico
|
|
108
108
|
- `Email` - Validação de e-mail
|
|
109
109
|
- `OurDate` - Manipulação de datas com formatos brasileiros
|
|
110
110
|
- Suporte a múltiplos formatos (`LayoutDateFormat`)
|
|
111
111
|
- Parsing e formatação
|
|
112
112
|
|
|
113
|
+
**CNPJ — regex exportadas (evitam reimplementar regex numérica em cada serviço):**
|
|
114
|
+
- `CNPJ_RAW_REGEX`, `CNPJ_MASKED_REGEX`, `CNPJ_FLEXIBLE_REGEX` - aceitam CNPJ alfanumérico, prontas para schemas (`yup`, `class-validator` `@Matches`, etc.). A validação completa (formato + dígito verificador) continua sendo feita pela classe `CNPJ` (`isValid()`/`validationErrors()`) — as regex servem para validação de formato na borda da API, antes de instanciar a classe.
|
|
115
|
+
|
|
113
116
|
---
|
|
114
117
|
|
|
115
118
|
### 7. **errors** - Gestão de Erros e Mensagens
|
|
@@ -174,7 +177,7 @@ A biblioteca é organizada em **arquitetura em camadas**:
|
|
|
174
177
|
### Instalação
|
|
175
178
|
|
|
176
179
|
```bash
|
|
177
|
-
npm install @seidor/
|
|
180
|
+
npm install @seidor-cloud-produtos/tax-core
|
|
178
181
|
```
|
|
179
182
|
|
|
180
183
|
### Uso Básico
|
|
@@ -182,7 +185,7 @@ npm install @seidor/br-fiscal
|
|
|
182
185
|
#### Criando um Documento Fiscal
|
|
183
186
|
|
|
184
187
|
```typescript
|
|
185
|
-
import { BuilderDocument, DocumentType, DocumentStatus } from '@seidor/
|
|
188
|
+
import { BuilderDocument, DocumentType, DocumentStatus } from '@seidor-cloud-produtos/tax-core';
|
|
186
189
|
|
|
187
190
|
const document = new BuilderDocument()
|
|
188
191
|
.setId('doc-123')
|
|
@@ -194,24 +197,48 @@ const document = new BuilderDocument()
|
|
|
194
197
|
|
|
195
198
|
#### Validando CNPJ/CPF
|
|
196
199
|
|
|
200
|
+
Suporta CNPJ numérico clássico e CNPJ alfanumérico (Receita Federal, 2026): os 12 primeiros caracteres podem conter letras maiúsculas, os 2 dígitos verificadores continuam numéricos.
|
|
201
|
+
|
|
197
202
|
```typescript
|
|
198
|
-
import { CNPJ, CPF } from '@seidor/
|
|
203
|
+
import { CNPJ, CPF } from '@seidor-cloud-produtos/tax-core';
|
|
199
204
|
|
|
200
205
|
const cnpj = new CNPJ('12.345.678/0001-90');
|
|
201
206
|
if (cnpj.isValid()) {
|
|
202
|
-
console.log('CNPJ válido:', cnpj.
|
|
207
|
+
console.log('CNPJ válido:', cnpj.formattedValue);
|
|
203
208
|
}
|
|
204
209
|
|
|
205
210
|
const cpf = new CPF('123.456.789-00');
|
|
206
211
|
if (cpf.isValid()) {
|
|
207
|
-
console.log('CPF válido:', cpf.
|
|
212
|
+
console.log('CPF válido:', cpf.formattedValue);
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Para validação de formato em schemas, sem instanciar a classe, use as regex exportadas em vez de escrever `/^\d{14}$/`:
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
import { CNPJ_FLEXIBLE_REGEX } from '@seidor-cloud-produtos/tax-core';
|
|
220
|
+
|
|
221
|
+
CNPJ_FLEXIBLE_REGEX.test('12.ABC.345/01DE-35'); // true — aceita mascarado ou não, com letras
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Em DTOs de serviços NestJS (`class-validator`), use a própria regex exportada com o decorator `@Matches` já existente, em vez de `@Matches(/^\d{14}$/)`:
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
import { Matches } from 'class-validator';
|
|
228
|
+
import { CNPJ_FLEXIBLE_REGEX } from '@seidor-cloud-produtos/tax-core';
|
|
229
|
+
|
|
230
|
+
class CreateEstablishmentDto {
|
|
231
|
+
@Matches(CNPJ_FLEXIBLE_REGEX, { message: 'CNPJ inválido' })
|
|
232
|
+
cnpj: string;
|
|
208
233
|
}
|
|
209
234
|
```
|
|
210
235
|
|
|
236
|
+
Em ambos os casos, a regex valida só o **formato**; o dígito verificador continua sendo checado pela classe `CNPJ` (`isValid()`).
|
|
237
|
+
|
|
211
238
|
#### Gerando Relatório SPED
|
|
212
239
|
|
|
213
240
|
```typescript
|
|
214
|
-
import { TaxReport, Block, Register } from '@seidor/
|
|
241
|
+
import { TaxReport, Block, Register } from '@seidor-cloud-produtos/tax-core';
|
|
215
242
|
|
|
216
243
|
// Consulte a documentação completa em lib/taxReport/README.md
|
|
217
244
|
```
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,132 @@
|
|
|
1
1
|
import { MongoClient } from 'mongodb';
|
|
2
2
|
import { ClientConfig, Pool } from 'pg';
|
|
3
3
|
|
|
4
|
+
type AuditAction = 'CREATED' | 'UPDATED' | 'DELETED' | 'INACTIVATED' | 'ACTIVATED' | 'STATUS_CHANGED' | 'IMPORTED' | 'REPROCESSED';
|
|
5
|
+
type AuditActorType = 'USER' | 'SYSTEM' | 'INTEGRATION';
|
|
6
|
+
type AuditSourceType = 'HTTP' | 'CONSUMER' | 'JOB' | 'WEBHOOK';
|
|
7
|
+
type AuditChangeSetType = 'PATCH' | 'BEFORE_AFTER' | 'NONE';
|
|
8
|
+
interface AuditFieldChange {
|
|
9
|
+
field: string;
|
|
10
|
+
previous?: unknown;
|
|
11
|
+
next?: unknown;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AuditChangeSet {
|
|
15
|
+
type: AuditChangeSetType;
|
|
16
|
+
changed_fields?: string[];
|
|
17
|
+
patch?: Record<string, unknown>;
|
|
18
|
+
before?: Record<string, unknown>;
|
|
19
|
+
after?: Record<string, unknown>;
|
|
20
|
+
field_changes?: AuditFieldChange[];
|
|
21
|
+
}
|
|
22
|
+
interface AuditEvent {
|
|
23
|
+
event_id: string;
|
|
24
|
+
service: string;
|
|
25
|
+
tenant_id: string;
|
|
26
|
+
action: AuditAction;
|
|
27
|
+
entity: string;
|
|
28
|
+
user: {
|
|
29
|
+
type: AuditActorType;
|
|
30
|
+
id?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
email?: string;
|
|
33
|
+
};
|
|
34
|
+
source: {
|
|
35
|
+
type: AuditSourceType;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
change_set?: AuditChangeSet;
|
|
39
|
+
created_at?: Date;
|
|
40
|
+
updated_at: Date;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface IAuditEventRepository {
|
|
44
|
+
insert(event: AuditEvent): Promise<AuditEvent>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class AuditEventBuilder {
|
|
48
|
+
private readonly event;
|
|
49
|
+
withEventId(value: string): this;
|
|
50
|
+
withEntity(value: string): this;
|
|
51
|
+
withUser(user: AuditEvent['user']): this;
|
|
52
|
+
withAction(action: AuditAction): this;
|
|
53
|
+
withTenant(tenantId: string): this;
|
|
54
|
+
withService(service: string): this;
|
|
55
|
+
withSource(type: AuditSourceType, name: string): this;
|
|
56
|
+
withChangeSet(changeSet: AuditChangeSet): this;
|
|
57
|
+
build(): AuditEvent;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface CompareOptions {
|
|
61
|
+
ignore?: string[];
|
|
62
|
+
}
|
|
63
|
+
interface CompareResult {
|
|
64
|
+
hasChanges: boolean;
|
|
65
|
+
fieldChanges: AuditFieldChange[];
|
|
66
|
+
changedFields: string[];
|
|
67
|
+
}
|
|
68
|
+
declare class ObjectComparator {
|
|
69
|
+
static compare<T extends Record<string, unknown>>(previous: T, next: T, options?: CompareOptions): CompareResult;
|
|
70
|
+
private static flatten;
|
|
71
|
+
private static isIgnored;
|
|
72
|
+
private static isEqual;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface AuditServiceConfig {
|
|
76
|
+
service: string;
|
|
77
|
+
source: {
|
|
78
|
+
type: AuditSourceType;
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
81
|
+
defaultIgnoredFields?: string[];
|
|
82
|
+
}
|
|
83
|
+
interface AuditContext {
|
|
84
|
+
tenantId: string;
|
|
85
|
+
user: AuditEvent['user'];
|
|
86
|
+
}
|
|
87
|
+
declare class AuditEventService {
|
|
88
|
+
private readonly repository;
|
|
89
|
+
private readonly config;
|
|
90
|
+
constructor(repository: IAuditEventRepository, config: AuditServiceConfig);
|
|
91
|
+
trackCreate<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext): Promise<AuditEvent>;
|
|
92
|
+
trackUpdate<T extends Record<string, unknown>>(entityType: string, eventId: string, before: T, after: T, context: AuditContext, compareOptions?: CompareOptions): Promise<AuditEvent | null>;
|
|
93
|
+
trackDelete<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext): Promise<AuditEvent>;
|
|
94
|
+
track(action: AuditAction, entityType: string, eventId: string, changeSet: AuditChangeSet, context: AuditContext): Promise<AuditEvent>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare class MongoConfig {
|
|
98
|
+
host: string;
|
|
99
|
+
port: number;
|
|
100
|
+
database: string;
|
|
101
|
+
username?: string;
|
|
102
|
+
password?: string;
|
|
103
|
+
isSrv: boolean;
|
|
104
|
+
maxPoolSize: number;
|
|
105
|
+
minPoolSize: number;
|
|
106
|
+
connectTimeoutMS: number;
|
|
107
|
+
socketTimeoutMS: number;
|
|
108
|
+
constructor(host: string, port: number, database: string, username?: string, password?: string, isSrv?: boolean, maxPoolSize?: number, minPoolSize?: number, connectTimeoutMS?: number, socketTimeoutMS?: number);
|
|
109
|
+
getConnectionString(): string;
|
|
110
|
+
getPoolOptions(): {
|
|
111
|
+
maxPoolSize: number;
|
|
112
|
+
minPoolSize: number;
|
|
113
|
+
connectTimeoutMS: number;
|
|
114
|
+
socketTimeoutMS: number;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare class MongoAuditEventRepository implements IAuditEventRepository {
|
|
119
|
+
private readonly mongoConfig;
|
|
120
|
+
private readonly collectionName;
|
|
121
|
+
private readonly _client;
|
|
122
|
+
private collection;
|
|
123
|
+
constructor(mongoConfig: MongoConfig, collectionName?: string);
|
|
124
|
+
private getCollection;
|
|
125
|
+
private ensureIndexes;
|
|
126
|
+
insert(event: AuditEvent): Promise<AuditEvent>;
|
|
127
|
+
disconnect(): Promise<void>;
|
|
128
|
+
}
|
|
129
|
+
|
|
4
130
|
interface Cloneable {
|
|
5
131
|
clone(): this;
|
|
6
132
|
}
|
|
@@ -1714,6 +1840,9 @@ declare class Person implements Cloneable {
|
|
|
1714
1840
|
isForeignPartner(): boolean;
|
|
1715
1841
|
}
|
|
1716
1842
|
|
|
1843
|
+
declare const CNPJ_RAW_REGEX: RegExp;
|
|
1844
|
+
declare const CNPJ_MASKED_REGEX: RegExp;
|
|
1845
|
+
declare const CNPJ_FLEXIBLE_REGEX: RegExp;
|
|
1717
1846
|
declare class CNPJ implements IdentificationNumber {
|
|
1718
1847
|
private readonly _value;
|
|
1719
1848
|
constructor(cnpj: string);
|
|
@@ -1727,6 +1856,9 @@ declare class CNPJ implements IdentificationNumber {
|
|
|
1727
1856
|
private extractActualDigit;
|
|
1728
1857
|
}
|
|
1729
1858
|
|
|
1859
|
+
declare const CPF_RAW_REGEX: RegExp;
|
|
1860
|
+
declare const CPF_MASKED_REGEX: RegExp;
|
|
1861
|
+
declare const CPF_FLEXIBLE_REGEX: RegExp;
|
|
1730
1862
|
declare class CPF implements IdentificationNumber {
|
|
1731
1863
|
private readonly _value;
|
|
1732
1864
|
constructor(cpf: string);
|
|
@@ -2443,27 +2575,6 @@ type MongoRetainedTaxFilter = MongoBaseFilter & {
|
|
|
2443
2575
|
declare function buildMongoFilter(filters: FiltersDocument): MongoBaseFilter;
|
|
2444
2576
|
declare function buildMongoFilterToRetainedTax(filters: FiltersDocument): MongoRetainedTaxFilter;
|
|
2445
2577
|
|
|
2446
|
-
declare class MongoConfig {
|
|
2447
|
-
host: string;
|
|
2448
|
-
port: number;
|
|
2449
|
-
database: string;
|
|
2450
|
-
username?: string;
|
|
2451
|
-
password?: string;
|
|
2452
|
-
isSrv: boolean;
|
|
2453
|
-
maxPoolSize: number;
|
|
2454
|
-
minPoolSize: number;
|
|
2455
|
-
connectTimeoutMS: number;
|
|
2456
|
-
socketTimeoutMS: number;
|
|
2457
|
-
constructor(host: string, port: number, database: string, username?: string, password?: string, isSrv?: boolean, maxPoolSize?: number, minPoolSize?: number, connectTimeoutMS?: number, socketTimeoutMS?: number);
|
|
2458
|
-
getConnectionString(): string;
|
|
2459
|
-
getPoolOptions(): {
|
|
2460
|
-
maxPoolSize: number;
|
|
2461
|
-
minPoolSize: number;
|
|
2462
|
-
connectTimeoutMS: number;
|
|
2463
|
-
socketTimeoutMS: number;
|
|
2464
|
-
};
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
2578
|
declare class PostgresConfig {
|
|
2468
2579
|
config: {
|
|
2469
2580
|
user: string;
|
|
@@ -4951,4 +5062,4 @@ declare class Calendar {
|
|
|
4951
5062
|
|
|
4952
5063
|
declare const BRAZIL_HOLIDAYS: HolidayDefinition[];
|
|
4953
5064
|
|
|
4954
|
-
export { AccountingDocument, ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, Alphanumeric, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, BRAZIL_HOLIDAYS, Block, BuilderAccountingDocument, BuilderAddition, BuilderAddress, BuilderConversionFactor, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CPF, CST, CalculationBasisNatureSetting, Calendar, type Cloneable, CloseBlock, CloseFile, CodIncTrib, type Cod_ent_ref, CodeStatusEnum, 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, Establishment, EstablishmentEvent, Event, EventEnum, FederalCollectionSettings, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, FreightContractedNatureIndicatorEnum, FreightTypeCodeEnum, FreightTypeEnum, type GetAuditTaxCollectionQuery, GrossRevenueContributionHeaders, type HolidayDefinition, type HolidayLocation, type HolidayScope, type IAccountingDocumentMongo, type IAddition, type IAddressMongo, 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, 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, MongoConfig, MongoRepository, MongoToDocumentBuilder, MunicipalObligation, MunicipalObligationIdEnum, MunicipalObligationNameEnum, MunicipalObligationTypeEnum, MunicipalRegistration, Municipality, NameCountryEnum, NatureCode, NatureConfig, Numeric, 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, type RegisterSubscriber, ReinfSpecializedProfile, type ReportGenerationOptions, ReportGenerator, type Repository, type ResolvedHoliday, RevenueNatureSettings, RevenueTypeEnum, Scp, ServiceCode, ServiceCodeEnum, type SettingErrorParams, Signatory, SimpleNationalOption, type SimpleReportGenerationOptions, SimpleReportGenerator, StartingCreditBalance, StartingCreditBalanceTypeEnum, State, StateCollectionSettings, StateCollectionSettingsConfigTypeEnum, StateCollectionSettingsTaxTypeEnum, StateEnum, StateRegistration, StateRegistrationIndicatorEnum, StatusDocumentEnum, StringArrayOutput, TagCounter, Tax, type TaxCollectionDetails, TaxCollectionType, TaxCollectionTypeEnum, TaxRegimeEnum, type TaxRegimes, type TaxRegisterGenerationOptions, TaxRegisterGenerator, TaxReport, TaxTypeEnum, TaxationType, Telephone, Uf, type ValidationInvalidInputParams, type ValidationMissingFieldParams, ValueProviderType, WEEKDAYS, ZERO_PIS_COFINS_BY_CST, ZfmPresumedCreditTypeEnum, buildMongoFilter, buildMongoFilterToRetainedTax, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|
|
5065
|
+
export { AccountingDocument, ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, 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, Establishment, EstablishmentEvent, Event, EventEnum, FederalCollectionSettings, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, 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, 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, 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, type RegisterSubscriber, ReinfSpecializedProfile, type ReportGenerationOptions, ReportGenerator, type Repository, type ResolvedHoliday, RevenueNatureSettings, RevenueTypeEnum, Scp, ServiceCode, ServiceCodeEnum, type SettingErrorParams, Signatory, SimpleNationalOption, type SimpleReportGenerationOptions, SimpleReportGenerator, StartingCreditBalance, StartingCreditBalanceTypeEnum, State, StateCollectionSettings, StateCollectionSettingsConfigTypeEnum, StateCollectionSettingsTaxTypeEnum, StateEnum, StateRegistration, StateRegistrationIndicatorEnum, StatusDocumentEnum, StringArrayOutput, TagCounter, Tax, type TaxCollectionDetails, TaxCollectionType, TaxCollectionTypeEnum, TaxRegimeEnum, type TaxRegimes, type TaxRegisterGenerationOptions, TaxRegisterGenerator, TaxReport, TaxTypeEnum, TaxationType, Telephone, Uf, type ValidationInvalidInputParams, type ValidationMissingFieldParams, ValueProviderType, WEEKDAYS, ZERO_PIS_COFINS_BY_CST, ZfmPresumedCreditTypeEnum, buildMongoFilter, buildMongoFilterToRetainedTax, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,132 @@
|
|
|
1
1
|
import { MongoClient } from 'mongodb';
|
|
2
2
|
import { ClientConfig, Pool } from 'pg';
|
|
3
3
|
|
|
4
|
+
type AuditAction = 'CREATED' | 'UPDATED' | 'DELETED' | 'INACTIVATED' | 'ACTIVATED' | 'STATUS_CHANGED' | 'IMPORTED' | 'REPROCESSED';
|
|
5
|
+
type AuditActorType = 'USER' | 'SYSTEM' | 'INTEGRATION';
|
|
6
|
+
type AuditSourceType = 'HTTP' | 'CONSUMER' | 'JOB' | 'WEBHOOK';
|
|
7
|
+
type AuditChangeSetType = 'PATCH' | 'BEFORE_AFTER' | 'NONE';
|
|
8
|
+
interface AuditFieldChange {
|
|
9
|
+
field: string;
|
|
10
|
+
previous?: unknown;
|
|
11
|
+
next?: unknown;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AuditChangeSet {
|
|
15
|
+
type: AuditChangeSetType;
|
|
16
|
+
changed_fields?: string[];
|
|
17
|
+
patch?: Record<string, unknown>;
|
|
18
|
+
before?: Record<string, unknown>;
|
|
19
|
+
after?: Record<string, unknown>;
|
|
20
|
+
field_changes?: AuditFieldChange[];
|
|
21
|
+
}
|
|
22
|
+
interface AuditEvent {
|
|
23
|
+
event_id: string;
|
|
24
|
+
service: string;
|
|
25
|
+
tenant_id: string;
|
|
26
|
+
action: AuditAction;
|
|
27
|
+
entity: string;
|
|
28
|
+
user: {
|
|
29
|
+
type: AuditActorType;
|
|
30
|
+
id?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
email?: string;
|
|
33
|
+
};
|
|
34
|
+
source: {
|
|
35
|
+
type: AuditSourceType;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
change_set?: AuditChangeSet;
|
|
39
|
+
created_at?: Date;
|
|
40
|
+
updated_at: Date;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface IAuditEventRepository {
|
|
44
|
+
insert(event: AuditEvent): Promise<AuditEvent>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class AuditEventBuilder {
|
|
48
|
+
private readonly event;
|
|
49
|
+
withEventId(value: string): this;
|
|
50
|
+
withEntity(value: string): this;
|
|
51
|
+
withUser(user: AuditEvent['user']): this;
|
|
52
|
+
withAction(action: AuditAction): this;
|
|
53
|
+
withTenant(tenantId: string): this;
|
|
54
|
+
withService(service: string): this;
|
|
55
|
+
withSource(type: AuditSourceType, name: string): this;
|
|
56
|
+
withChangeSet(changeSet: AuditChangeSet): this;
|
|
57
|
+
build(): AuditEvent;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface CompareOptions {
|
|
61
|
+
ignore?: string[];
|
|
62
|
+
}
|
|
63
|
+
interface CompareResult {
|
|
64
|
+
hasChanges: boolean;
|
|
65
|
+
fieldChanges: AuditFieldChange[];
|
|
66
|
+
changedFields: string[];
|
|
67
|
+
}
|
|
68
|
+
declare class ObjectComparator {
|
|
69
|
+
static compare<T extends Record<string, unknown>>(previous: T, next: T, options?: CompareOptions): CompareResult;
|
|
70
|
+
private static flatten;
|
|
71
|
+
private static isIgnored;
|
|
72
|
+
private static isEqual;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface AuditServiceConfig {
|
|
76
|
+
service: string;
|
|
77
|
+
source: {
|
|
78
|
+
type: AuditSourceType;
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
81
|
+
defaultIgnoredFields?: string[];
|
|
82
|
+
}
|
|
83
|
+
interface AuditContext {
|
|
84
|
+
tenantId: string;
|
|
85
|
+
user: AuditEvent['user'];
|
|
86
|
+
}
|
|
87
|
+
declare class AuditEventService {
|
|
88
|
+
private readonly repository;
|
|
89
|
+
private readonly config;
|
|
90
|
+
constructor(repository: IAuditEventRepository, config: AuditServiceConfig);
|
|
91
|
+
trackCreate<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext): Promise<AuditEvent>;
|
|
92
|
+
trackUpdate<T extends Record<string, unknown>>(entityType: string, eventId: string, before: T, after: T, context: AuditContext, compareOptions?: CompareOptions): Promise<AuditEvent | null>;
|
|
93
|
+
trackDelete<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext): Promise<AuditEvent>;
|
|
94
|
+
track(action: AuditAction, entityType: string, eventId: string, changeSet: AuditChangeSet, context: AuditContext): Promise<AuditEvent>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare class MongoConfig {
|
|
98
|
+
host: string;
|
|
99
|
+
port: number;
|
|
100
|
+
database: string;
|
|
101
|
+
username?: string;
|
|
102
|
+
password?: string;
|
|
103
|
+
isSrv: boolean;
|
|
104
|
+
maxPoolSize: number;
|
|
105
|
+
minPoolSize: number;
|
|
106
|
+
connectTimeoutMS: number;
|
|
107
|
+
socketTimeoutMS: number;
|
|
108
|
+
constructor(host: string, port: number, database: string, username?: string, password?: string, isSrv?: boolean, maxPoolSize?: number, minPoolSize?: number, connectTimeoutMS?: number, socketTimeoutMS?: number);
|
|
109
|
+
getConnectionString(): string;
|
|
110
|
+
getPoolOptions(): {
|
|
111
|
+
maxPoolSize: number;
|
|
112
|
+
minPoolSize: number;
|
|
113
|
+
connectTimeoutMS: number;
|
|
114
|
+
socketTimeoutMS: number;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare class MongoAuditEventRepository implements IAuditEventRepository {
|
|
119
|
+
private readonly mongoConfig;
|
|
120
|
+
private readonly collectionName;
|
|
121
|
+
private readonly _client;
|
|
122
|
+
private collection;
|
|
123
|
+
constructor(mongoConfig: MongoConfig, collectionName?: string);
|
|
124
|
+
private getCollection;
|
|
125
|
+
private ensureIndexes;
|
|
126
|
+
insert(event: AuditEvent): Promise<AuditEvent>;
|
|
127
|
+
disconnect(): Promise<void>;
|
|
128
|
+
}
|
|
129
|
+
|
|
4
130
|
interface Cloneable {
|
|
5
131
|
clone(): this;
|
|
6
132
|
}
|
|
@@ -1714,6 +1840,9 @@ declare class Person implements Cloneable {
|
|
|
1714
1840
|
isForeignPartner(): boolean;
|
|
1715
1841
|
}
|
|
1716
1842
|
|
|
1843
|
+
declare const CNPJ_RAW_REGEX: RegExp;
|
|
1844
|
+
declare const CNPJ_MASKED_REGEX: RegExp;
|
|
1845
|
+
declare const CNPJ_FLEXIBLE_REGEX: RegExp;
|
|
1717
1846
|
declare class CNPJ implements IdentificationNumber {
|
|
1718
1847
|
private readonly _value;
|
|
1719
1848
|
constructor(cnpj: string);
|
|
@@ -1727,6 +1856,9 @@ declare class CNPJ implements IdentificationNumber {
|
|
|
1727
1856
|
private extractActualDigit;
|
|
1728
1857
|
}
|
|
1729
1858
|
|
|
1859
|
+
declare const CPF_RAW_REGEX: RegExp;
|
|
1860
|
+
declare const CPF_MASKED_REGEX: RegExp;
|
|
1861
|
+
declare const CPF_FLEXIBLE_REGEX: RegExp;
|
|
1730
1862
|
declare class CPF implements IdentificationNumber {
|
|
1731
1863
|
private readonly _value;
|
|
1732
1864
|
constructor(cpf: string);
|
|
@@ -2443,27 +2575,6 @@ type MongoRetainedTaxFilter = MongoBaseFilter & {
|
|
|
2443
2575
|
declare function buildMongoFilter(filters: FiltersDocument): MongoBaseFilter;
|
|
2444
2576
|
declare function buildMongoFilterToRetainedTax(filters: FiltersDocument): MongoRetainedTaxFilter;
|
|
2445
2577
|
|
|
2446
|
-
declare class MongoConfig {
|
|
2447
|
-
host: string;
|
|
2448
|
-
port: number;
|
|
2449
|
-
database: string;
|
|
2450
|
-
username?: string;
|
|
2451
|
-
password?: string;
|
|
2452
|
-
isSrv: boolean;
|
|
2453
|
-
maxPoolSize: number;
|
|
2454
|
-
minPoolSize: number;
|
|
2455
|
-
connectTimeoutMS: number;
|
|
2456
|
-
socketTimeoutMS: number;
|
|
2457
|
-
constructor(host: string, port: number, database: string, username?: string, password?: string, isSrv?: boolean, maxPoolSize?: number, minPoolSize?: number, connectTimeoutMS?: number, socketTimeoutMS?: number);
|
|
2458
|
-
getConnectionString(): string;
|
|
2459
|
-
getPoolOptions(): {
|
|
2460
|
-
maxPoolSize: number;
|
|
2461
|
-
minPoolSize: number;
|
|
2462
|
-
connectTimeoutMS: number;
|
|
2463
|
-
socketTimeoutMS: number;
|
|
2464
|
-
};
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
2578
|
declare class PostgresConfig {
|
|
2468
2579
|
config: {
|
|
2469
2580
|
user: string;
|
|
@@ -4951,4 +5062,4 @@ declare class Calendar {
|
|
|
4951
5062
|
|
|
4952
5063
|
declare const BRAZIL_HOLIDAYS: HolidayDefinition[];
|
|
4953
5064
|
|
|
4954
|
-
export { AccountingDocument, ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, Alphanumeric, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, BRAZIL_HOLIDAYS, Block, BuilderAccountingDocument, BuilderAddition, BuilderAddress, BuilderConversionFactor, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CPF, CST, CalculationBasisNatureSetting, Calendar, type Cloneable, CloseBlock, CloseFile, CodIncTrib, type Cod_ent_ref, CodeStatusEnum, 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, Establishment, EstablishmentEvent, Event, EventEnum, FederalCollectionSettings, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, FreightContractedNatureIndicatorEnum, FreightTypeCodeEnum, FreightTypeEnum, type GetAuditTaxCollectionQuery, GrossRevenueContributionHeaders, type HolidayDefinition, type HolidayLocation, type HolidayScope, type IAccountingDocumentMongo, type IAddition, type IAddressMongo, 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, 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, MongoConfig, MongoRepository, MongoToDocumentBuilder, MunicipalObligation, MunicipalObligationIdEnum, MunicipalObligationNameEnum, MunicipalObligationTypeEnum, MunicipalRegistration, Municipality, NameCountryEnum, NatureCode, NatureConfig, Numeric, 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, type RegisterSubscriber, ReinfSpecializedProfile, type ReportGenerationOptions, ReportGenerator, type Repository, type ResolvedHoliday, RevenueNatureSettings, RevenueTypeEnum, Scp, ServiceCode, ServiceCodeEnum, type SettingErrorParams, Signatory, SimpleNationalOption, type SimpleReportGenerationOptions, SimpleReportGenerator, StartingCreditBalance, StartingCreditBalanceTypeEnum, State, StateCollectionSettings, StateCollectionSettingsConfigTypeEnum, StateCollectionSettingsTaxTypeEnum, StateEnum, StateRegistration, StateRegistrationIndicatorEnum, StatusDocumentEnum, StringArrayOutput, TagCounter, Tax, type TaxCollectionDetails, TaxCollectionType, TaxCollectionTypeEnum, TaxRegimeEnum, type TaxRegimes, type TaxRegisterGenerationOptions, TaxRegisterGenerator, TaxReport, TaxTypeEnum, TaxationType, Telephone, Uf, type ValidationInvalidInputParams, type ValidationMissingFieldParams, ValueProviderType, WEEKDAYS, ZERO_PIS_COFINS_BY_CST, ZfmPresumedCreditTypeEnum, buildMongoFilter, buildMongoFilterToRetainedTax, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|
|
5065
|
+
export { AccountingDocument, ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, 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, Establishment, EstablishmentEvent, Event, EventEnum, FederalCollectionSettings, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, 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, 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, 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, type RegisterSubscriber, ReinfSpecializedProfile, type ReportGenerationOptions, ReportGenerator, type Repository, type ResolvedHoliday, RevenueNatureSettings, RevenueTypeEnum, Scp, ServiceCode, ServiceCodeEnum, type SettingErrorParams, Signatory, SimpleNationalOption, type SimpleReportGenerationOptions, SimpleReportGenerator, StartingCreditBalance, StartingCreditBalanceTypeEnum, State, StateCollectionSettings, StateCollectionSettingsConfigTypeEnum, StateCollectionSettingsTaxTypeEnum, StateEnum, StateRegistration, StateRegistrationIndicatorEnum, StatusDocumentEnum, StringArrayOutput, TagCounter, Tax, type TaxCollectionDetails, TaxCollectionType, TaxCollectionTypeEnum, TaxRegimeEnum, type TaxRegimes, type TaxRegisterGenerationOptions, TaxRegisterGenerator, TaxReport, TaxTypeEnum, TaxationType, Telephone, Uf, type ValidationInvalidInputParams, type ValidationMissingFieldParams, ValueProviderType, WEEKDAYS, ZERO_PIS_COFINS_BY_CST, ZfmPresumedCreditTypeEnum, buildMongoFilter, buildMongoFilterToRetainedTax, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|