@seidor-cloud-produtos/tax-core 1.0.18 → 1.0.20
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 +68 -6
- package/dist/index.d.ts +68 -6
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1198,6 +1198,16 @@ declare enum TaxTypeEnum {
|
|
|
1198
1198
|
CBS_PRESUMED = "CBS_PRESUMED"
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
|
+
declare class AccountingDocument implements Cloneable {
|
|
1202
|
+
private _id;
|
|
1203
|
+
private _number;
|
|
1204
|
+
get id(): string;
|
|
1205
|
+
set id(value: string);
|
|
1206
|
+
get number(): string;
|
|
1207
|
+
set number(value: string);
|
|
1208
|
+
clone(): this;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1201
1211
|
declare enum LayoutDateFormat {
|
|
1202
1212
|
ISO_8601 = "YYYY-MM-DDTHH:mm:ssZ",
|
|
1203
1213
|
RFC_3339 = "YYYY-MM-DDTHH:mm:ssZ",
|
|
@@ -1510,6 +1520,7 @@ declare class Item implements Cloneable {
|
|
|
1510
1520
|
private _import_declaration;
|
|
1511
1521
|
private _conversion_factor;
|
|
1512
1522
|
private _imported;
|
|
1523
|
+
private _accounting_document;
|
|
1513
1524
|
get id(): string;
|
|
1514
1525
|
set id(value: string);
|
|
1515
1526
|
get cfop(): string;
|
|
@@ -1528,6 +1539,8 @@ declare class Item implements Cloneable {
|
|
|
1528
1539
|
set service_activity_code(value: string);
|
|
1529
1540
|
get account_code(): string;
|
|
1530
1541
|
set account_code(value: string);
|
|
1542
|
+
get accounting_document(): AccountingDocument;
|
|
1543
|
+
set accounting_document(value: AccountingDocument);
|
|
1531
1544
|
get barcode(): string;
|
|
1532
1545
|
set barcode(value: string);
|
|
1533
1546
|
get municipal_tax_code(): string;
|
|
@@ -1745,7 +1758,6 @@ declare class Document implements Cloneable {
|
|
|
1745
1758
|
private _additional_information;
|
|
1746
1759
|
private _model;
|
|
1747
1760
|
private _number;
|
|
1748
|
-
private _header_accounting_entry_id;
|
|
1749
1761
|
private _accounting_additional_information;
|
|
1750
1762
|
private _series;
|
|
1751
1763
|
private _subseries;
|
|
@@ -1808,8 +1820,6 @@ declare class Document implements Cloneable {
|
|
|
1808
1820
|
set model(value: string);
|
|
1809
1821
|
get number(): string;
|
|
1810
1822
|
set number(value: string);
|
|
1811
|
-
get header_accounting_entry_id(): string;
|
|
1812
|
-
set header_accounting_entry_id(value: string);
|
|
1813
1823
|
get accounting_additional_information(): string;
|
|
1814
1824
|
set accounting_additional_information(value: string);
|
|
1815
1825
|
get series(): string;
|
|
@@ -1943,7 +1953,6 @@ declare class BuilderDocument {
|
|
|
1943
1953
|
withIssuanceDate(issuance_date: Date): BuilderDocument;
|
|
1944
1954
|
withNumber(number: string): BuilderDocument;
|
|
1945
1955
|
withSeries(series: string): BuilderDocument;
|
|
1946
|
-
withHeaderAccountingEntryId(header_accounting_entry_id: string): BuilderDocument;
|
|
1947
1956
|
withSubseries(subseries: string): BuilderDocument;
|
|
1948
1957
|
withIssuer(person: Person): BuilderDocument;
|
|
1949
1958
|
withRecipient(person: Person): BuilderDocument;
|
|
@@ -2027,6 +2036,16 @@ declare class BuilderItem {
|
|
|
2027
2036
|
withImportDeclaration(import_declaration: ImportDeclaration): BuilderItem;
|
|
2028
2037
|
withConversionFactor(conversion_factor: ConversionFactor): BuilderItem;
|
|
2029
2038
|
withImported(value: boolean): BuilderItem;
|
|
2039
|
+
withAccountingDocument(accounting_document: AccountingDocument): BuilderItem;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
declare class BuilderAccountingDocument {
|
|
2043
|
+
private instance;
|
|
2044
|
+
constructor();
|
|
2045
|
+
newInstance(): BuilderAccountingDocument;
|
|
2046
|
+
build(): AccountingDocument;
|
|
2047
|
+
withId(id: string): BuilderAccountingDocument;
|
|
2048
|
+
withNumber(number: string): BuilderAccountingDocument;
|
|
2030
2049
|
}
|
|
2031
2050
|
|
|
2032
2051
|
declare class BuilderPerson {
|
|
@@ -2140,6 +2159,7 @@ interface FiltersDocument {
|
|
|
2140
2159
|
}
|
|
2141
2160
|
interface DocumentRepository {
|
|
2142
2161
|
getAll(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2162
|
+
getAllAuditingRetainedTax(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2143
2163
|
}
|
|
2144
2164
|
|
|
2145
2165
|
interface IBaseHeadersDTO {
|
|
@@ -2221,6 +2241,10 @@ interface IAddressMongo {
|
|
|
2221
2241
|
number: string;
|
|
2222
2242
|
telephone: string;
|
|
2223
2243
|
}
|
|
2244
|
+
interface IAccountingDocumentMongo {
|
|
2245
|
+
id?: string;
|
|
2246
|
+
number: string;
|
|
2247
|
+
}
|
|
2224
2248
|
interface IItemMongo {
|
|
2225
2249
|
_id: string;
|
|
2226
2250
|
cfop: string;
|
|
@@ -2260,6 +2284,7 @@ interface IItemMongo {
|
|
|
2260
2284
|
taxes: ITaxMongo[];
|
|
2261
2285
|
import_declaration: IImportDeclaration;
|
|
2262
2286
|
conversion_factor: IConversionFactor;
|
|
2287
|
+
accounting_document: IAccountingDocumentMongo;
|
|
2263
2288
|
imported: boolean;
|
|
2264
2289
|
accounting_value: number;
|
|
2265
2290
|
}
|
|
@@ -2333,6 +2358,7 @@ declare class MongoToDocumentBuilder {
|
|
|
2333
2358
|
private instance;
|
|
2334
2359
|
private buildPerson;
|
|
2335
2360
|
private buildAddress;
|
|
2361
|
+
private buildAccountingDocument;
|
|
2336
2362
|
private buildItem;
|
|
2337
2363
|
private buildTax;
|
|
2338
2364
|
private buildAddition;
|
|
@@ -2345,13 +2371,48 @@ declare class MongoToDocumentBuilder {
|
|
|
2345
2371
|
withPerson(person: IPersonMongo): Person;
|
|
2346
2372
|
withAddress(address: IAddressMongo): Address;
|
|
2347
2373
|
withItems(item: IItemMongo): void;
|
|
2374
|
+
withAccountingDocument(accounting_document: IAccountingDocumentMongo): AccountingDocument;
|
|
2348
2375
|
withTax(tax: ITaxMongo): Tax;
|
|
2349
2376
|
withImportDeclaration(item: IItemMongo): ImportDeclaration;
|
|
2350
2377
|
withAddition(addition: IAddition): Addition;
|
|
2351
2378
|
withConversionFactor(item: IItemMongo): ConversionFactor;
|
|
2352
2379
|
}
|
|
2353
2380
|
|
|
2354
|
-
|
|
2381
|
+
type DateRange = {
|
|
2382
|
+
$gte: Date;
|
|
2383
|
+
$lte: Date;
|
|
2384
|
+
};
|
|
2385
|
+
type MongoBaseFilter = {
|
|
2386
|
+
release_date?: DateRange;
|
|
2387
|
+
issuance_date?: DateRange;
|
|
2388
|
+
tenant_id?: string;
|
|
2389
|
+
branch_id?: string | {
|
|
2390
|
+
$in: string[];
|
|
2391
|
+
};
|
|
2392
|
+
type?: string | {
|
|
2393
|
+
$in: string[];
|
|
2394
|
+
};
|
|
2395
|
+
number?: string;
|
|
2396
|
+
model?: string;
|
|
2397
|
+
active?: boolean;
|
|
2398
|
+
operation_type?: string;
|
|
2399
|
+
erp_integration_status?: {
|
|
2400
|
+
$in: StatusDocumentEnum[];
|
|
2401
|
+
};
|
|
2402
|
+
fiscal_situation?: {
|
|
2403
|
+
$in: string[];
|
|
2404
|
+
};
|
|
2405
|
+
};
|
|
2406
|
+
type MongoRetainedTaxFilter = MongoBaseFilter & {
|
|
2407
|
+
$or?: Array<{
|
|
2408
|
+
release_date?: DateRange;
|
|
2409
|
+
issuance_date?: DateRange;
|
|
2410
|
+
'items.taxes.category'?: TaxTypeEnum;
|
|
2411
|
+
}>;
|
|
2412
|
+
};
|
|
2413
|
+
|
|
2414
|
+
declare function buildMongoFilter(filters: FiltersDocument): MongoBaseFilter;
|
|
2415
|
+
declare function buildMongoFilterToRetainedTax(filters: FiltersDocument): MongoRetainedTaxFilter;
|
|
2355
2416
|
|
|
2356
2417
|
declare class MongoConfig {
|
|
2357
2418
|
host: string;
|
|
@@ -2406,6 +2467,7 @@ declare class MongoRepository implements DocumentRepository {
|
|
|
2406
2467
|
connect(): Promise<MongoClient>;
|
|
2407
2468
|
close(): Promise<void>;
|
|
2408
2469
|
getAll(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2470
|
+
getAllAuditingRetainedTax(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2409
2471
|
findOne(id: string, tenant_id: string): Promise<Document>;
|
|
2410
2472
|
}
|
|
2411
2473
|
|
|
@@ -4678,4 +4740,4 @@ declare function toSafeNumber(value: unknown, fallback?: number): number;
|
|
|
4678
4740
|
|
|
4679
4741
|
declare function validationValue(field: any): any;
|
|
4680
4742
|
|
|
4681
|
-
export { ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, Alphanumeric, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, Block, BuilderAddition, BuilderAddress, BuilderConversionFactor, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CPF, CST, CalculationBasisNatureSetting, 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, Decimal, DefaultAlphanumericLength, DefaultDecimalLength, DefaultDecimalSeparator, DescriptionStatusEnum, DifalIcmsCategoryEnum, Document, type DocumentRepository, DocumentTypeEnum, DonationIndicatorEnum, EcdSpecializedProfile, EcfSpecializedProfile, EfdContribSpecializedProfile, EfdIcmsIpiSpecializedProfile, Email, EnforceabilityOfISSEnum, Establishment, EstablishmentEvent, Event, EventEnum, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, FreightContractedNatureIndicatorEnum, FreightTypeEnum, type GetAuditTaxCollectionQuery, GrossRevenueContributionHeaders, type IAddition, type IAddressMongo, type IBaseHeadersDTO, type ICalculationBasisNatureSetting, 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, Person, 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, 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, ZfmPresumedCreditTypeEnum, buildMongoFilter, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|
|
4743
|
+
export { AccountingDocument, ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, Alphanumeric, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, Block, BuilderAccountingDocument, BuilderAddition, BuilderAddress, BuilderConversionFactor, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CPF, CST, CalculationBasisNatureSetting, 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, Decimal, DefaultAlphanumericLength, DefaultDecimalLength, DefaultDecimalSeparator, DescriptionStatusEnum, DifalIcmsCategoryEnum, Document, type DocumentRepository, DocumentTypeEnum, DonationIndicatorEnum, EcdSpecializedProfile, EcfSpecializedProfile, EfdContribSpecializedProfile, EfdIcmsIpiSpecializedProfile, Email, EnforceabilityOfISSEnum, Establishment, EstablishmentEvent, Event, EventEnum, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, FreightContractedNatureIndicatorEnum, FreightTypeEnum, type GetAuditTaxCollectionQuery, GrossRevenueContributionHeaders, type IAccountingDocumentMongo, type IAddition, type IAddressMongo, type IBaseHeadersDTO, type ICalculationBasisNatureSetting, 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, Person, 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, 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, ZfmPresumedCreditTypeEnum, buildMongoFilter, buildMongoFilterToRetainedTax, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1198,6 +1198,16 @@ declare enum TaxTypeEnum {
|
|
|
1198
1198
|
CBS_PRESUMED = "CBS_PRESUMED"
|
|
1199
1199
|
}
|
|
1200
1200
|
|
|
1201
|
+
declare class AccountingDocument implements Cloneable {
|
|
1202
|
+
private _id;
|
|
1203
|
+
private _number;
|
|
1204
|
+
get id(): string;
|
|
1205
|
+
set id(value: string);
|
|
1206
|
+
get number(): string;
|
|
1207
|
+
set number(value: string);
|
|
1208
|
+
clone(): this;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1201
1211
|
declare enum LayoutDateFormat {
|
|
1202
1212
|
ISO_8601 = "YYYY-MM-DDTHH:mm:ssZ",
|
|
1203
1213
|
RFC_3339 = "YYYY-MM-DDTHH:mm:ssZ",
|
|
@@ -1510,6 +1520,7 @@ declare class Item implements Cloneable {
|
|
|
1510
1520
|
private _import_declaration;
|
|
1511
1521
|
private _conversion_factor;
|
|
1512
1522
|
private _imported;
|
|
1523
|
+
private _accounting_document;
|
|
1513
1524
|
get id(): string;
|
|
1514
1525
|
set id(value: string);
|
|
1515
1526
|
get cfop(): string;
|
|
@@ -1528,6 +1539,8 @@ declare class Item implements Cloneable {
|
|
|
1528
1539
|
set service_activity_code(value: string);
|
|
1529
1540
|
get account_code(): string;
|
|
1530
1541
|
set account_code(value: string);
|
|
1542
|
+
get accounting_document(): AccountingDocument;
|
|
1543
|
+
set accounting_document(value: AccountingDocument);
|
|
1531
1544
|
get barcode(): string;
|
|
1532
1545
|
set barcode(value: string);
|
|
1533
1546
|
get municipal_tax_code(): string;
|
|
@@ -1745,7 +1758,6 @@ declare class Document implements Cloneable {
|
|
|
1745
1758
|
private _additional_information;
|
|
1746
1759
|
private _model;
|
|
1747
1760
|
private _number;
|
|
1748
|
-
private _header_accounting_entry_id;
|
|
1749
1761
|
private _accounting_additional_information;
|
|
1750
1762
|
private _series;
|
|
1751
1763
|
private _subseries;
|
|
@@ -1808,8 +1820,6 @@ declare class Document implements Cloneable {
|
|
|
1808
1820
|
set model(value: string);
|
|
1809
1821
|
get number(): string;
|
|
1810
1822
|
set number(value: string);
|
|
1811
|
-
get header_accounting_entry_id(): string;
|
|
1812
|
-
set header_accounting_entry_id(value: string);
|
|
1813
1823
|
get accounting_additional_information(): string;
|
|
1814
1824
|
set accounting_additional_information(value: string);
|
|
1815
1825
|
get series(): string;
|
|
@@ -1943,7 +1953,6 @@ declare class BuilderDocument {
|
|
|
1943
1953
|
withIssuanceDate(issuance_date: Date): BuilderDocument;
|
|
1944
1954
|
withNumber(number: string): BuilderDocument;
|
|
1945
1955
|
withSeries(series: string): BuilderDocument;
|
|
1946
|
-
withHeaderAccountingEntryId(header_accounting_entry_id: string): BuilderDocument;
|
|
1947
1956
|
withSubseries(subseries: string): BuilderDocument;
|
|
1948
1957
|
withIssuer(person: Person): BuilderDocument;
|
|
1949
1958
|
withRecipient(person: Person): BuilderDocument;
|
|
@@ -2027,6 +2036,16 @@ declare class BuilderItem {
|
|
|
2027
2036
|
withImportDeclaration(import_declaration: ImportDeclaration): BuilderItem;
|
|
2028
2037
|
withConversionFactor(conversion_factor: ConversionFactor): BuilderItem;
|
|
2029
2038
|
withImported(value: boolean): BuilderItem;
|
|
2039
|
+
withAccountingDocument(accounting_document: AccountingDocument): BuilderItem;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
declare class BuilderAccountingDocument {
|
|
2043
|
+
private instance;
|
|
2044
|
+
constructor();
|
|
2045
|
+
newInstance(): BuilderAccountingDocument;
|
|
2046
|
+
build(): AccountingDocument;
|
|
2047
|
+
withId(id: string): BuilderAccountingDocument;
|
|
2048
|
+
withNumber(number: string): BuilderAccountingDocument;
|
|
2030
2049
|
}
|
|
2031
2050
|
|
|
2032
2051
|
declare class BuilderPerson {
|
|
@@ -2140,6 +2159,7 @@ interface FiltersDocument {
|
|
|
2140
2159
|
}
|
|
2141
2160
|
interface DocumentRepository {
|
|
2142
2161
|
getAll(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2162
|
+
getAllAuditingRetainedTax(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2143
2163
|
}
|
|
2144
2164
|
|
|
2145
2165
|
interface IBaseHeadersDTO {
|
|
@@ -2221,6 +2241,10 @@ interface IAddressMongo {
|
|
|
2221
2241
|
number: string;
|
|
2222
2242
|
telephone: string;
|
|
2223
2243
|
}
|
|
2244
|
+
interface IAccountingDocumentMongo {
|
|
2245
|
+
id?: string;
|
|
2246
|
+
number: string;
|
|
2247
|
+
}
|
|
2224
2248
|
interface IItemMongo {
|
|
2225
2249
|
_id: string;
|
|
2226
2250
|
cfop: string;
|
|
@@ -2260,6 +2284,7 @@ interface IItemMongo {
|
|
|
2260
2284
|
taxes: ITaxMongo[];
|
|
2261
2285
|
import_declaration: IImportDeclaration;
|
|
2262
2286
|
conversion_factor: IConversionFactor;
|
|
2287
|
+
accounting_document: IAccountingDocumentMongo;
|
|
2263
2288
|
imported: boolean;
|
|
2264
2289
|
accounting_value: number;
|
|
2265
2290
|
}
|
|
@@ -2333,6 +2358,7 @@ declare class MongoToDocumentBuilder {
|
|
|
2333
2358
|
private instance;
|
|
2334
2359
|
private buildPerson;
|
|
2335
2360
|
private buildAddress;
|
|
2361
|
+
private buildAccountingDocument;
|
|
2336
2362
|
private buildItem;
|
|
2337
2363
|
private buildTax;
|
|
2338
2364
|
private buildAddition;
|
|
@@ -2345,13 +2371,48 @@ declare class MongoToDocumentBuilder {
|
|
|
2345
2371
|
withPerson(person: IPersonMongo): Person;
|
|
2346
2372
|
withAddress(address: IAddressMongo): Address;
|
|
2347
2373
|
withItems(item: IItemMongo): void;
|
|
2374
|
+
withAccountingDocument(accounting_document: IAccountingDocumentMongo): AccountingDocument;
|
|
2348
2375
|
withTax(tax: ITaxMongo): Tax;
|
|
2349
2376
|
withImportDeclaration(item: IItemMongo): ImportDeclaration;
|
|
2350
2377
|
withAddition(addition: IAddition): Addition;
|
|
2351
2378
|
withConversionFactor(item: IItemMongo): ConversionFactor;
|
|
2352
2379
|
}
|
|
2353
2380
|
|
|
2354
|
-
|
|
2381
|
+
type DateRange = {
|
|
2382
|
+
$gte: Date;
|
|
2383
|
+
$lte: Date;
|
|
2384
|
+
};
|
|
2385
|
+
type MongoBaseFilter = {
|
|
2386
|
+
release_date?: DateRange;
|
|
2387
|
+
issuance_date?: DateRange;
|
|
2388
|
+
tenant_id?: string;
|
|
2389
|
+
branch_id?: string | {
|
|
2390
|
+
$in: string[];
|
|
2391
|
+
};
|
|
2392
|
+
type?: string | {
|
|
2393
|
+
$in: string[];
|
|
2394
|
+
};
|
|
2395
|
+
number?: string;
|
|
2396
|
+
model?: string;
|
|
2397
|
+
active?: boolean;
|
|
2398
|
+
operation_type?: string;
|
|
2399
|
+
erp_integration_status?: {
|
|
2400
|
+
$in: StatusDocumentEnum[];
|
|
2401
|
+
};
|
|
2402
|
+
fiscal_situation?: {
|
|
2403
|
+
$in: string[];
|
|
2404
|
+
};
|
|
2405
|
+
};
|
|
2406
|
+
type MongoRetainedTaxFilter = MongoBaseFilter & {
|
|
2407
|
+
$or?: Array<{
|
|
2408
|
+
release_date?: DateRange;
|
|
2409
|
+
issuance_date?: DateRange;
|
|
2410
|
+
'items.taxes.category'?: TaxTypeEnum;
|
|
2411
|
+
}>;
|
|
2412
|
+
};
|
|
2413
|
+
|
|
2414
|
+
declare function buildMongoFilter(filters: FiltersDocument): MongoBaseFilter;
|
|
2415
|
+
declare function buildMongoFilterToRetainedTax(filters: FiltersDocument): MongoRetainedTaxFilter;
|
|
2355
2416
|
|
|
2356
2417
|
declare class MongoConfig {
|
|
2357
2418
|
host: string;
|
|
@@ -2406,6 +2467,7 @@ declare class MongoRepository implements DocumentRepository {
|
|
|
2406
2467
|
connect(): Promise<MongoClient>;
|
|
2407
2468
|
close(): Promise<void>;
|
|
2408
2469
|
getAll(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2470
|
+
getAllAuditingRetainedTax(filters: FiltersDocument): AsyncIterableIterator<Document>;
|
|
2409
2471
|
findOne(id: string, tenant_id: string): Promise<Document>;
|
|
2410
2472
|
}
|
|
2411
2473
|
|
|
@@ -4678,4 +4740,4 @@ declare function toSafeNumber(value: unknown, fallback?: number): number;
|
|
|
4678
4740
|
|
|
4679
4741
|
declare function validationValue(field: any): any;
|
|
4680
4742
|
|
|
4681
|
-
export { ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, Alphanumeric, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, Block, BuilderAddition, BuilderAddress, BuilderConversionFactor, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CPF, CST, CalculationBasisNatureSetting, 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, Decimal, DefaultAlphanumericLength, DefaultDecimalLength, DefaultDecimalSeparator, DescriptionStatusEnum, DifalIcmsCategoryEnum, Document, type DocumentRepository, DocumentTypeEnum, DonationIndicatorEnum, EcdSpecializedProfile, EcfSpecializedProfile, EfdContribSpecializedProfile, EfdIcmsIpiSpecializedProfile, Email, EnforceabilityOfISSEnum, Establishment, EstablishmentEvent, Event, EventEnum, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, FreightContractedNatureIndicatorEnum, FreightTypeEnum, type GetAuditTaxCollectionQuery, GrossRevenueContributionHeaders, type IAddition, type IAddressMongo, type IBaseHeadersDTO, type ICalculationBasisNatureSetting, 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, Person, 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, 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, ZfmPresumedCreditTypeEnum, buildMongoFilter, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|
|
4743
|
+
export { AccountingDocument, ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, Alphanumeric, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, Block, BuilderAccountingDocument, BuilderAddition, BuilderAddress, BuilderConversionFactor, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CPF, CST, CalculationBasisNatureSetting, 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, Decimal, DefaultAlphanumericLength, DefaultDecimalLength, DefaultDecimalSeparator, DescriptionStatusEnum, DifalIcmsCategoryEnum, Document, type DocumentRepository, DocumentTypeEnum, DonationIndicatorEnum, EcdSpecializedProfile, EcfSpecializedProfile, EfdContribSpecializedProfile, EfdIcmsIpiSpecializedProfile, Email, EnforceabilityOfISSEnum, Establishment, EstablishmentEvent, Event, EventEnum, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType, FreightContractedNatureIndicatorEnum, FreightTypeEnum, type GetAuditTaxCollectionQuery, GrossRevenueContributionHeaders, type IAccountingDocumentMongo, type IAddition, type IAddressMongo, type IBaseHeadersDTO, type ICalculationBasisNatureSetting, 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, Person, 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, 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, ZfmPresumedCreditTypeEnum, buildMongoFilter, buildMongoFilterToRetainedTax, calculate_bases_values, cleanData, formatMessage, isEmptyObject, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState, toSafeNumber, validationValue };
|