@seidor-cloud-produtos/tax-core 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +46 -28
- package/dist/index.d.ts +46 -28
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MongoClient } from 'mongodb';
|
|
2
1
|
import { ClientConfig, Pool } from 'pg';
|
|
2
|
+
import { MongoClient } from 'mongodb';
|
|
3
3
|
|
|
4
4
|
type AuditAction = 'CREATED' | 'UPDATED' | 'DELETED' | 'INACTIVATED' | 'ACTIVATED' | 'STATUS_CHANGED' | 'IMPORTED' | 'REPROCESSED';
|
|
5
5
|
type AuditActorType = 'USER' | 'SYSTEM' | 'INTEGRATION';
|
|
@@ -57,6 +57,15 @@ declare class AuditEventBuilder {
|
|
|
57
57
|
build(): AuditEvent;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
declare const EnrichmentField: {
|
|
61
|
+
readonly REFERENTIAL_ACCOUNT_PLAN: "referential_account_plan";
|
|
62
|
+
};
|
|
63
|
+
type EnrichmentField = (typeof EnrichmentField)[keyof typeof EnrichmentField];
|
|
64
|
+
type FieldEnricherFn = (before: Record<string, unknown>, after: Record<string, unknown>, context: AuditContext) => Promise<{
|
|
65
|
+
previous?: unknown;
|
|
66
|
+
next?: unknown;
|
|
67
|
+
}>;
|
|
68
|
+
|
|
60
69
|
interface CompareOptions {
|
|
61
70
|
ignore?: string[];
|
|
62
71
|
}
|
|
@@ -88,10 +97,11 @@ declare class AuditEventService {
|
|
|
88
97
|
private readonly repository;
|
|
89
98
|
private readonly config;
|
|
90
99
|
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>;
|
|
100
|
+
trackCreate<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext, enrichers?: Map<EnrichmentField, FieldEnricherFn>): Promise<AuditEvent>;
|
|
101
|
+
trackUpdate<T extends Record<string, unknown>>(entityType: string, eventId: string, before: T, after: T, context: AuditContext, compareOptions?: CompareOptions, enrichers?: Map<EnrichmentField, FieldEnricherFn>): Promise<AuditEvent | null>;
|
|
93
102
|
trackDelete<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext): Promise<AuditEvent>;
|
|
94
103
|
track(action: AuditAction, entityType: string, eventId: string, changeSet: AuditChangeSet, context: AuditContext): Promise<AuditEvent>;
|
|
104
|
+
private applyEnrichers;
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
declare class MongoConfig {
|
|
@@ -127,6 +137,38 @@ declare class MongoAuditEventRepository implements IAuditEventRepository {
|
|
|
127
137
|
disconnect(): Promise<void>;
|
|
128
138
|
}
|
|
129
139
|
|
|
140
|
+
declare class PostgresConfig {
|
|
141
|
+
config: {
|
|
142
|
+
user: string;
|
|
143
|
+
host: string;
|
|
144
|
+
database: string;
|
|
145
|
+
password: string;
|
|
146
|
+
port: number;
|
|
147
|
+
ssl?: {
|
|
148
|
+
rejectUnauthorized: boolean;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
constructor(config: {
|
|
152
|
+
user: string;
|
|
153
|
+
host: string;
|
|
154
|
+
database: string;
|
|
155
|
+
password: string;
|
|
156
|
+
port: number;
|
|
157
|
+
ssl?: {
|
|
158
|
+
rejectUnauthorized: boolean;
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
getConnection(): ClientConfig;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
declare class AccountServicePostgresRepository {
|
|
165
|
+
private readonly pool;
|
|
166
|
+
constructor(config: PostgresConfig);
|
|
167
|
+
getReferentialAccountPlanAlias(id: string): Promise<string | null>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare function createReferentialAccountPlanEnricher(config: PostgresConfig, fieldName?: EnrichmentField): FieldEnricherFn;
|
|
171
|
+
|
|
130
172
|
interface Cloneable {
|
|
131
173
|
clone(): this;
|
|
132
174
|
}
|
|
@@ -2589,30 +2631,6 @@ type MongoRetainedTaxFilter = MongoBaseFilter & {
|
|
|
2589
2631
|
declare function buildMongoFilter(filters: FiltersDocument): MongoBaseFilter;
|
|
2590
2632
|
declare function buildMongoFilterToRetainedTax(filters: FiltersDocument): MongoRetainedTaxFilter;
|
|
2591
2633
|
|
|
2592
|
-
declare class PostgresConfig {
|
|
2593
|
-
config: {
|
|
2594
|
-
user: string;
|
|
2595
|
-
host: string;
|
|
2596
|
-
database: string;
|
|
2597
|
-
password: string;
|
|
2598
|
-
port: number;
|
|
2599
|
-
ssl?: {
|
|
2600
|
-
rejectUnauthorized: boolean;
|
|
2601
|
-
};
|
|
2602
|
-
};
|
|
2603
|
-
constructor(config: {
|
|
2604
|
-
user: string;
|
|
2605
|
-
host: string;
|
|
2606
|
-
database: string;
|
|
2607
|
-
password: string;
|
|
2608
|
-
port: number;
|
|
2609
|
-
ssl?: {
|
|
2610
|
-
rejectUnauthorized: boolean;
|
|
2611
|
-
};
|
|
2612
|
-
});
|
|
2613
|
-
getConnection(): ClientConfig;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
2634
|
declare class MongoRepository implements DocumentRepository {
|
|
2617
2635
|
private readonly _client;
|
|
2618
2636
|
private _isConnected;
|
|
@@ -5076,4 +5094,4 @@ declare class Calendar {
|
|
|
5076
5094
|
|
|
5077
5095
|
declare const BRAZIL_HOLIDAYS: HolidayDefinition[];
|
|
5078
5096
|
|
|
5079
|
-
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 };
|
|
5097
|
+
export { AccountServicePostgresRepository, 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, EnrichmentField, Establishment, EstablishmentEvent, Event, EventEnum, FederalCollectionSettings, FieldDataType, type FieldEnricherFn, 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, createReferentialAccountPlanEnricher, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MongoClient } from 'mongodb';
|
|
2
1
|
import { ClientConfig, Pool } from 'pg';
|
|
2
|
+
import { MongoClient } from 'mongodb';
|
|
3
3
|
|
|
4
4
|
type AuditAction = 'CREATED' | 'UPDATED' | 'DELETED' | 'INACTIVATED' | 'ACTIVATED' | 'STATUS_CHANGED' | 'IMPORTED' | 'REPROCESSED';
|
|
5
5
|
type AuditActorType = 'USER' | 'SYSTEM' | 'INTEGRATION';
|
|
@@ -57,6 +57,15 @@ declare class AuditEventBuilder {
|
|
|
57
57
|
build(): AuditEvent;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
declare const EnrichmentField: {
|
|
61
|
+
readonly REFERENTIAL_ACCOUNT_PLAN: "referential_account_plan";
|
|
62
|
+
};
|
|
63
|
+
type EnrichmentField = (typeof EnrichmentField)[keyof typeof EnrichmentField];
|
|
64
|
+
type FieldEnricherFn = (before: Record<string, unknown>, after: Record<string, unknown>, context: AuditContext) => Promise<{
|
|
65
|
+
previous?: unknown;
|
|
66
|
+
next?: unknown;
|
|
67
|
+
}>;
|
|
68
|
+
|
|
60
69
|
interface CompareOptions {
|
|
61
70
|
ignore?: string[];
|
|
62
71
|
}
|
|
@@ -88,10 +97,11 @@ declare class AuditEventService {
|
|
|
88
97
|
private readonly repository;
|
|
89
98
|
private readonly config;
|
|
90
99
|
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>;
|
|
100
|
+
trackCreate<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext, enrichers?: Map<EnrichmentField, FieldEnricherFn>): Promise<AuditEvent>;
|
|
101
|
+
trackUpdate<T extends Record<string, unknown>>(entityType: string, eventId: string, before: T, after: T, context: AuditContext, compareOptions?: CompareOptions, enrichers?: Map<EnrichmentField, FieldEnricherFn>): Promise<AuditEvent | null>;
|
|
93
102
|
trackDelete<T extends Record<string, unknown>>(entityType: string, eventId: string, entity: T, context: AuditContext): Promise<AuditEvent>;
|
|
94
103
|
track(action: AuditAction, entityType: string, eventId: string, changeSet: AuditChangeSet, context: AuditContext): Promise<AuditEvent>;
|
|
104
|
+
private applyEnrichers;
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
declare class MongoConfig {
|
|
@@ -127,6 +137,38 @@ declare class MongoAuditEventRepository implements IAuditEventRepository {
|
|
|
127
137
|
disconnect(): Promise<void>;
|
|
128
138
|
}
|
|
129
139
|
|
|
140
|
+
declare class PostgresConfig {
|
|
141
|
+
config: {
|
|
142
|
+
user: string;
|
|
143
|
+
host: string;
|
|
144
|
+
database: string;
|
|
145
|
+
password: string;
|
|
146
|
+
port: number;
|
|
147
|
+
ssl?: {
|
|
148
|
+
rejectUnauthorized: boolean;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
constructor(config: {
|
|
152
|
+
user: string;
|
|
153
|
+
host: string;
|
|
154
|
+
database: string;
|
|
155
|
+
password: string;
|
|
156
|
+
port: number;
|
|
157
|
+
ssl?: {
|
|
158
|
+
rejectUnauthorized: boolean;
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
getConnection(): ClientConfig;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
declare class AccountServicePostgresRepository {
|
|
165
|
+
private readonly pool;
|
|
166
|
+
constructor(config: PostgresConfig);
|
|
167
|
+
getReferentialAccountPlanAlias(id: string): Promise<string | null>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare function createReferentialAccountPlanEnricher(config: PostgresConfig, fieldName?: EnrichmentField): FieldEnricherFn;
|
|
171
|
+
|
|
130
172
|
interface Cloneable {
|
|
131
173
|
clone(): this;
|
|
132
174
|
}
|
|
@@ -2589,30 +2631,6 @@ type MongoRetainedTaxFilter = MongoBaseFilter & {
|
|
|
2589
2631
|
declare function buildMongoFilter(filters: FiltersDocument): MongoBaseFilter;
|
|
2590
2632
|
declare function buildMongoFilterToRetainedTax(filters: FiltersDocument): MongoRetainedTaxFilter;
|
|
2591
2633
|
|
|
2592
|
-
declare class PostgresConfig {
|
|
2593
|
-
config: {
|
|
2594
|
-
user: string;
|
|
2595
|
-
host: string;
|
|
2596
|
-
database: string;
|
|
2597
|
-
password: string;
|
|
2598
|
-
port: number;
|
|
2599
|
-
ssl?: {
|
|
2600
|
-
rejectUnauthorized: boolean;
|
|
2601
|
-
};
|
|
2602
|
-
};
|
|
2603
|
-
constructor(config: {
|
|
2604
|
-
user: string;
|
|
2605
|
-
host: string;
|
|
2606
|
-
database: string;
|
|
2607
|
-
password: string;
|
|
2608
|
-
port: number;
|
|
2609
|
-
ssl?: {
|
|
2610
|
-
rejectUnauthorized: boolean;
|
|
2611
|
-
};
|
|
2612
|
-
});
|
|
2613
|
-
getConnection(): ClientConfig;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
2634
|
declare class MongoRepository implements DocumentRepository {
|
|
2617
2635
|
private readonly _client;
|
|
2618
2636
|
private _isConnected;
|
|
@@ -5076,4 +5094,4 @@ declare class Calendar {
|
|
|
5076
5094
|
|
|
5077
5095
|
declare const BRAZIL_HOLIDAYS: HolidayDefinition[];
|
|
5078
5096
|
|
|
5079
|
-
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 };
|
|
5097
|
+
export { AccountServicePostgresRepository, 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, EnrichmentField, Establishment, EstablishmentEvent, Event, EventEnum, FederalCollectionSettings, FieldDataType, type FieldEnricherFn, 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, createReferentialAccountPlanEnricher, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|