@seidor-cloud-produtos/tax-core 1.0.14 → 1.0.15
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 +407 -198
- package/dist/index.d.ts +407 -198
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +38 -33
package/dist/index.d.mts
CHANGED
|
@@ -566,15 +566,16 @@ declare enum MunicipalObligationNameEnum {
|
|
|
566
566
|
NFTS = "NFTS",
|
|
567
567
|
DST = "DST",
|
|
568
568
|
DECLARACAO_SERVICOS_CONTRATADOS = "Declara\u00E7\u00E3o de Servi\u00E7os Contratados",
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
GIF_ST = "GIF-ST",
|
|
570
|
+
GIF_AJUSTE = "GIF-AJUSTE",
|
|
571
|
+
GISS_ONLINE = "GISS ONLINE"
|
|
571
572
|
}
|
|
572
573
|
|
|
573
574
|
declare enum MunicipalObligationTypeEnum {
|
|
574
|
-
NORMAL = "Normal (Original)"
|
|
575
|
-
CORRECTIVE = "Retificadora (Substitutiva)"
|
|
576
|
-
COMPLEMENTARY = "Complementar"
|
|
577
|
-
CANCELLATION = "Cancelamento"
|
|
575
|
+
NORMAL = "Normal (Original)",
|
|
576
|
+
CORRECTIVE = "Retificadora (Substitutiva)",
|
|
577
|
+
COMPLEMENTARY = "Complementar",
|
|
578
|
+
CANCELLATION = "Cancelamento",
|
|
578
579
|
ADJUSTMENT = "Ajuste"
|
|
579
580
|
}
|
|
580
581
|
|
|
@@ -593,6 +594,12 @@ declare class MunicipalObligation {
|
|
|
593
594
|
isVersionAvailable(version: string): boolean;
|
|
594
595
|
}
|
|
595
596
|
|
|
597
|
+
interface ILC116Code {
|
|
598
|
+
municipal_service_code: string;
|
|
599
|
+
description: string;
|
|
600
|
+
aliquot: number;
|
|
601
|
+
}
|
|
602
|
+
|
|
596
603
|
declare class Municipality {
|
|
597
604
|
protected _IBGE_code: number;
|
|
598
605
|
protected _name: string;
|
|
@@ -602,6 +609,7 @@ declare class Municipality {
|
|
|
602
609
|
protected _sedetec_code: string;
|
|
603
610
|
protected _rest_code: number;
|
|
604
611
|
protected _municipal_obligations: Map<string, MunicipalObligation>;
|
|
612
|
+
protected _lc116_codes: Map<string, ILC116Code>;
|
|
605
613
|
constructor(state: State, ibge_code: number, name: string, ddd: string);
|
|
606
614
|
set siafi_code(siafi_code: string);
|
|
607
615
|
set sedetec_code(sedetec_code: string);
|
|
@@ -616,6 +624,10 @@ declare class Municipality {
|
|
|
616
624
|
get rest_code(): number;
|
|
617
625
|
addMunicipalObligation(obligation: MunicipalObligation): void;
|
|
618
626
|
getMunicipalObligationById(obligationId: string): MunicipalObligation;
|
|
627
|
+
setLC116Codes(codes: Map<string, ILC116Code>): void;
|
|
628
|
+
hasLC116Codes(): boolean;
|
|
629
|
+
getLC116CodeInfo(lc116Code: string): ILC116Code | undefined;
|
|
630
|
+
getLC116EquivalentCode(lc116Code: string): string;
|
|
619
631
|
}
|
|
620
632
|
|
|
621
633
|
declare enum StateEnum {
|
|
@@ -672,6 +684,14 @@ declare class ServiceCode {
|
|
|
672
684
|
get description(): string;
|
|
673
685
|
}
|
|
674
686
|
|
|
687
|
+
declare class Country {
|
|
688
|
+
protected _code: number;
|
|
689
|
+
protected _name: string;
|
|
690
|
+
constructor(code: number, name: string);
|
|
691
|
+
get code(): number;
|
|
692
|
+
get name(): string;
|
|
693
|
+
}
|
|
694
|
+
|
|
675
695
|
interface Repository {
|
|
676
696
|
getAllStates(): State[];
|
|
677
697
|
getAllMunicipalities(): Municipality[];
|
|
@@ -680,6 +700,8 @@ interface Repository {
|
|
|
680
700
|
getMunicipalitiesWithMunicipalObligation(): Municipality[];
|
|
681
701
|
getAllServiceCodes(): ServiceCode[];
|
|
682
702
|
getServiceCodeByCode(code: string): ServiceCode | undefined;
|
|
703
|
+
getAllCountries(): Country[];
|
|
704
|
+
getCountryByCode(code: number): Country | undefined;
|
|
683
705
|
}
|
|
684
706
|
|
|
685
707
|
declare class MemoryMasterDataRepository implements Repository {
|
|
@@ -687,6 +709,7 @@ declare class MemoryMasterDataRepository implements Repository {
|
|
|
687
709
|
private states;
|
|
688
710
|
private municipalities;
|
|
689
711
|
private serviceCodes;
|
|
712
|
+
private countries;
|
|
690
713
|
private constructor();
|
|
691
714
|
static getInstance(): MemoryMasterDataRepository;
|
|
692
715
|
private loadData;
|
|
@@ -697,31 +720,44 @@ declare class MemoryMasterDataRepository implements Repository {
|
|
|
697
720
|
getMunicipalitiesWithMunicipalObligation(): Municipality[];
|
|
698
721
|
getMunicipalityByIBGECode(ibge_code: number): Municipality | undefined;
|
|
699
722
|
getStateByUF(uf: string): State | undefined;
|
|
723
|
+
getAllCountries(): Country[];
|
|
724
|
+
getCountryByCode(code: number): Country | undefined;
|
|
700
725
|
}
|
|
701
726
|
|
|
702
727
|
declare class Address implements Cloneable {
|
|
728
|
+
private _id;
|
|
703
729
|
private _neighborhood;
|
|
704
|
-
private
|
|
705
|
-
private
|
|
730
|
+
private _municipality;
|
|
731
|
+
private _country;
|
|
706
732
|
private _postal_code;
|
|
707
733
|
private _supplement;
|
|
708
734
|
private _state;
|
|
709
735
|
private _street;
|
|
710
736
|
private _number;
|
|
711
737
|
private _telephone;
|
|
738
|
+
private _category;
|
|
739
|
+
private _isMain;
|
|
740
|
+
set id(value: string);
|
|
741
|
+
get id(): string;
|
|
712
742
|
get neighborhood(): string;
|
|
713
743
|
set neighborhood(value: string);
|
|
714
744
|
get municipality_code(): string;
|
|
715
745
|
get municipality_code_number(): number;
|
|
716
746
|
set municipality_code(value: string);
|
|
747
|
+
get municipality(): Municipality | undefined;
|
|
748
|
+
set municipality(value: Municipality | undefined);
|
|
717
749
|
get country_code(): CountryCodeEnum;
|
|
718
750
|
set country_code(value: CountryCodeEnum);
|
|
751
|
+
get country(): Country | undefined;
|
|
752
|
+
set country(value: Country | undefined);
|
|
719
753
|
get postal_code(): string;
|
|
720
754
|
set postal_code(value: string);
|
|
721
755
|
get supplement(): string;
|
|
722
756
|
set supplement(value: string);
|
|
723
757
|
get state(): StateEnum;
|
|
724
758
|
set state(value: StateEnum);
|
|
759
|
+
get stateObject(): State | undefined;
|
|
760
|
+
set stateObject(value: State | undefined);
|
|
725
761
|
get street(): string;
|
|
726
762
|
set street(value: string);
|
|
727
763
|
get number(): string;
|
|
@@ -729,13 +765,17 @@ declare class Address implements Cloneable {
|
|
|
729
765
|
get telephone(): string;
|
|
730
766
|
set telephone(value: string);
|
|
731
767
|
clone(): this;
|
|
768
|
+
get category(): string;
|
|
769
|
+
set category(value: string);
|
|
770
|
+
get isMain(): boolean;
|
|
771
|
+
set isMain(value: boolean);
|
|
732
772
|
}
|
|
733
773
|
|
|
734
774
|
declare enum CodeStatusEnum {
|
|
735
|
-
AUTHORIZED = "00"
|
|
736
|
-
CANCELLED = "02"
|
|
737
|
-
LATE_REGULARIZED = "04"
|
|
738
|
-
LATE_CANCELLED = "05"
|
|
775
|
+
AUTHORIZED = "00",
|
|
776
|
+
CANCELLED = "02",
|
|
777
|
+
LATE_REGULARIZED = "04",
|
|
778
|
+
LATE_CANCELLED = "05",
|
|
739
779
|
NOT_APPLICABLE = ""
|
|
740
780
|
}
|
|
741
781
|
declare namespace CodeStatusEnum {
|
|
@@ -744,12 +784,12 @@ declare namespace CodeStatusEnum {
|
|
|
744
784
|
}
|
|
745
785
|
|
|
746
786
|
declare enum CteTypeEnum {
|
|
747
|
-
NORMAL = "0"
|
|
748
|
-
VALUE_COMPLEMENT = "1"
|
|
749
|
-
REPLACEMENT = "3"
|
|
750
|
-
METROPOLITAN_TRANSPORT = "4"
|
|
751
|
-
SIMPLIFIED = "5"
|
|
752
|
-
SIMPLIFIED_REPLACEMENT = "6"
|
|
787
|
+
NORMAL = "0",
|
|
788
|
+
VALUE_COMPLEMENT = "1",
|
|
789
|
+
REPLACEMENT = "3",
|
|
790
|
+
METROPOLITAN_TRANSPORT = "4",
|
|
791
|
+
SIMPLIFIED = "5",
|
|
792
|
+
SIMPLIFIED_REPLACEMENT = "6",
|
|
753
793
|
NOT_APPLICABLE = ""
|
|
754
794
|
}
|
|
755
795
|
declare namespace CteTypeEnum {
|
|
@@ -821,16 +861,16 @@ declare namespace PaymentTypeEnum {
|
|
|
821
861
|
}
|
|
822
862
|
|
|
823
863
|
declare enum RevenueTypeEnum {
|
|
824
|
-
OWN_SERVICES_PROVIDED = "0"
|
|
825
|
-
OWN_DEBT_COLLECTION = "1"
|
|
826
|
-
OWN_PREPAID_SERVICE_PAST_BILLING = "2"
|
|
827
|
-
OWN_PREPAID_SERVICE_CURRENT_BILLING = "3"
|
|
828
|
-
OTHER_OWN_COMMUNICATION_REVENUES = "4"
|
|
829
|
-
OWN_CO_BILLING = "5"
|
|
830
|
-
OWN_SERVICES_TO_BILL_FUTURE = "6"
|
|
831
|
-
OTHER_OWN_NON_CUMULATIVE_REVENUES = "7"
|
|
832
|
-
OTHER_THIRD_PARTY_REVENUES = "8"
|
|
833
|
-
OTHER_REVENUES = "9"
|
|
864
|
+
OWN_SERVICES_PROVIDED = "0",
|
|
865
|
+
OWN_DEBT_COLLECTION = "1",
|
|
866
|
+
OWN_PREPAID_SERVICE_PAST_BILLING = "2",
|
|
867
|
+
OWN_PREPAID_SERVICE_CURRENT_BILLING = "3",
|
|
868
|
+
OTHER_OWN_COMMUNICATION_REVENUES = "4",
|
|
869
|
+
OWN_CO_BILLING = "5",
|
|
870
|
+
OWN_SERVICES_TO_BILL_FUTURE = "6",
|
|
871
|
+
OTHER_OWN_NON_CUMULATIVE_REVENUES = "7",
|
|
872
|
+
OTHER_THIRD_PARTY_REVENUES = "8",
|
|
873
|
+
OTHER_REVENUES = "9",
|
|
834
874
|
NOT_APPLICABLE = ""
|
|
835
875
|
}
|
|
836
876
|
declare namespace RevenueTypeEnum {
|
|
@@ -863,13 +903,13 @@ declare class ConversionFactor implements Cloneable {
|
|
|
863
903
|
}
|
|
864
904
|
|
|
865
905
|
declare enum FreightContractedNatureIndicatorEnum {
|
|
866
|
-
SALE_SELLER_BEARING_COST = "0"
|
|
867
|
-
SALE_BUYER_BEARING_COST = "1"
|
|
868
|
-
PURCHASE_WITH_CREDIT = "2"
|
|
869
|
-
PURCHASE_WITHOUT_CREDIT = "3"
|
|
870
|
-
FINISHED_PRODUCT_TRANSFER = "4"
|
|
871
|
-
IN_PROCESS_PRODUCT_TRANSFER = "5"
|
|
872
|
-
OTHERS = "9"
|
|
906
|
+
SALE_SELLER_BEARING_COST = "0",
|
|
907
|
+
SALE_BUYER_BEARING_COST = "1",
|
|
908
|
+
PURCHASE_WITH_CREDIT = "2",
|
|
909
|
+
PURCHASE_WITHOUT_CREDIT = "3",
|
|
910
|
+
FINISHED_PRODUCT_TRANSFER = "4",
|
|
911
|
+
IN_PROCESS_PRODUCT_TRANSFER = "5",
|
|
912
|
+
OTHERS = "9",
|
|
873
913
|
NOT_APPLICABLE = ""
|
|
874
914
|
}
|
|
875
915
|
declare namespace FreightContractedNatureIndicatorEnum {
|
|
@@ -878,18 +918,18 @@ declare namespace FreightContractedNatureIndicatorEnum {
|
|
|
878
918
|
}
|
|
879
919
|
|
|
880
920
|
declare enum ItemTypeEnum {
|
|
881
|
-
GOODS_FOR_RESALE = "00"
|
|
882
|
-
RAW_MATERIAL = "01"
|
|
883
|
-
PACKAGING = "02"
|
|
884
|
-
PRODUCT_IN_PROCESS = "03"
|
|
885
|
-
FINISHED_PRODUCT = "04"
|
|
886
|
-
BYPRODUCT = "05"
|
|
887
|
-
INTERMEDIATE_PRODUCT = "06"
|
|
888
|
-
CONSUMABLE_MATERIAL = "07"
|
|
889
|
-
FIXED_ASSET = "08"
|
|
890
|
-
SERVICES = "09"
|
|
891
|
-
OTHER_INPUTS = "10"
|
|
892
|
-
OTHERS = "99"
|
|
921
|
+
GOODS_FOR_RESALE = "00",
|
|
922
|
+
RAW_MATERIAL = "01",
|
|
923
|
+
PACKAGING = "02",
|
|
924
|
+
PRODUCT_IN_PROCESS = "03",
|
|
925
|
+
FINISHED_PRODUCT = "04",
|
|
926
|
+
BYPRODUCT = "05",
|
|
927
|
+
INTERMEDIATE_PRODUCT = "06",
|
|
928
|
+
CONSUMABLE_MATERIAL = "07",
|
|
929
|
+
FIXED_ASSET = "08",
|
|
930
|
+
SERVICES = "09",
|
|
931
|
+
OTHER_INPUTS = "10",
|
|
932
|
+
OTHERS = "99",
|
|
893
933
|
NOT_APPLICABLE = ""
|
|
894
934
|
}
|
|
895
935
|
declare namespace ItemTypeEnum {
|
|
@@ -1191,9 +1231,9 @@ declare class OurDate extends Date {
|
|
|
1191
1231
|
}
|
|
1192
1232
|
|
|
1193
1233
|
declare enum IntermediationTypeEnum {
|
|
1194
|
-
OWN_ACCOUNT = 1
|
|
1195
|
-
ACCOUNT_AND_ORDER = 2
|
|
1196
|
-
ON_BEHALF = 3
|
|
1234
|
+
OWN_ACCOUNT = 1,
|
|
1235
|
+
ACCOUNT_AND_ORDER = 2,
|
|
1236
|
+
ON_BEHALF = 3,
|
|
1197
1237
|
NOT_APPLICABLE = 0
|
|
1198
1238
|
}
|
|
1199
1239
|
declare namespace IntermediationTypeEnum {
|
|
@@ -1202,18 +1242,18 @@ declare namespace IntermediationTypeEnum {
|
|
|
1202
1242
|
}
|
|
1203
1243
|
|
|
1204
1244
|
declare enum InternationalTransportTypeEnum {
|
|
1205
|
-
MARITIME = 1
|
|
1206
|
-
FLUVIAL = 2
|
|
1207
|
-
LACUSTRINE = 3
|
|
1208
|
-
AIR = 4
|
|
1209
|
-
POSTAL = 5
|
|
1210
|
-
RAIL = 6
|
|
1211
|
-
ROAD = 7
|
|
1212
|
-
PIPELINE_NETWORK = 8
|
|
1213
|
-
OWN_MEANS = 9
|
|
1214
|
-
VIRTUAL_ENTRY_EXIT = 10
|
|
1215
|
-
COURIER = 11
|
|
1216
|
-
HANDCARRY = 12
|
|
1245
|
+
MARITIME = 1,
|
|
1246
|
+
FLUVIAL = 2,
|
|
1247
|
+
LACUSTRINE = 3,
|
|
1248
|
+
AIR = 4,
|
|
1249
|
+
POSTAL = 5,
|
|
1250
|
+
RAIL = 6,
|
|
1251
|
+
ROAD = 7,
|
|
1252
|
+
PIPELINE_NETWORK = 8,
|
|
1253
|
+
OWN_MEANS = 9,
|
|
1254
|
+
VIRTUAL_ENTRY_EXIT = 10,
|
|
1255
|
+
COURIER = 11,
|
|
1256
|
+
HANDCARRY = 12,
|
|
1217
1257
|
NOT_APPLICABLE = 0
|
|
1218
1258
|
}
|
|
1219
1259
|
declare namespace InternationalTransportTypeEnum {
|
|
@@ -1291,11 +1331,11 @@ declare namespace ProductOriginEnum {
|
|
|
1291
1331
|
}
|
|
1292
1332
|
|
|
1293
1333
|
declare enum EnforceabilityOfISSEnum {
|
|
1294
|
-
TAXABLE_IN_MUNICIPALITY = 1
|
|
1295
|
-
NON_INCIDENCE = 2
|
|
1296
|
-
EXEMPT = 3
|
|
1297
|
-
EXPORT = 4
|
|
1298
|
-
IMMUNITY = 5
|
|
1334
|
+
TAXABLE_IN_MUNICIPALITY = 1,
|
|
1335
|
+
NON_INCIDENCE = 2,
|
|
1336
|
+
EXEMPT = 3,
|
|
1337
|
+
EXPORT = 4,
|
|
1338
|
+
IMMUNITY = 5,
|
|
1299
1339
|
NOT_APPLICABLE = 0
|
|
1300
1340
|
}
|
|
1301
1341
|
declare namespace EnforceabilityOfISSEnum {
|
|
@@ -1315,11 +1355,11 @@ declare enum DonationIndicatorEnum {
|
|
|
1315
1355
|
}
|
|
1316
1356
|
|
|
1317
1357
|
declare enum ZfmPresumedCreditTypeEnum {
|
|
1318
|
-
NO_PRESUMED_CREDIT = "0"
|
|
1319
|
-
FINAL_CONSUMER_GOODS = "1"
|
|
1320
|
-
CAPITAL_GOODS = "2"
|
|
1321
|
-
INTERMEDIATE_GOODS = "3"
|
|
1322
|
-
IT_AND_LEGAL_DEFINED_GOODS = "4"
|
|
1358
|
+
NO_PRESUMED_CREDIT = "0",
|
|
1359
|
+
FINAL_CONSUMER_GOODS = "1",
|
|
1360
|
+
CAPITAL_GOODS = "2",
|
|
1361
|
+
INTERMEDIATE_GOODS = "3",
|
|
1362
|
+
IT_AND_LEGAL_DEFINED_GOODS = "4",
|
|
1323
1363
|
NOT_APPLICABLE = ""
|
|
1324
1364
|
}
|
|
1325
1365
|
|
|
@@ -1562,9 +1602,9 @@ declare class Item implements Cloneable {
|
|
|
1562
1602
|
}
|
|
1563
1603
|
|
|
1564
1604
|
declare enum StateRegistrationIndicatorEnum {
|
|
1565
|
-
CONTRIBUTOR = "1"
|
|
1566
|
-
EXEMPT = "2"
|
|
1567
|
-
NON_CONTRIBUTOR = "9"
|
|
1605
|
+
CONTRIBUTOR = "1",
|
|
1606
|
+
EXEMPT = "2",
|
|
1607
|
+
NON_CONTRIBUTOR = "9",
|
|
1568
1608
|
NOT_APPLICABLE = ""
|
|
1569
1609
|
}
|
|
1570
1610
|
declare namespace StateRegistrationIndicatorEnum {
|
|
@@ -1573,10 +1613,10 @@ declare namespace StateRegistrationIndicatorEnum {
|
|
|
1573
1613
|
}
|
|
1574
1614
|
|
|
1575
1615
|
declare enum TaxRegimeEnum {
|
|
1576
|
-
NOT_APPLICABLE = ""
|
|
1577
|
-
SIMPLES_NACIONAL = "1"
|
|
1578
|
-
SIMPLES_NACIONAL_EXCESSO = "2"
|
|
1579
|
-
REGIME_NORMAL = "3"
|
|
1616
|
+
NOT_APPLICABLE = "",
|
|
1617
|
+
SIMPLES_NACIONAL = "1",
|
|
1618
|
+
SIMPLES_NACIONAL_EXCESSO = "2",
|
|
1619
|
+
REGIME_NORMAL = "3",
|
|
1580
1620
|
MEI = "4"
|
|
1581
1621
|
}
|
|
1582
1622
|
declare namespace TaxRegimeEnum {
|
|
@@ -1646,6 +1686,44 @@ declare class Person implements Cloneable {
|
|
|
1646
1686
|
isForeignPartner(): boolean;
|
|
1647
1687
|
}
|
|
1648
1688
|
|
|
1689
|
+
declare class CNPJ implements IdentificationNumber {
|
|
1690
|
+
private readonly _value;
|
|
1691
|
+
constructor(cnpj: string);
|
|
1692
|
+
private removeInvalidDigits;
|
|
1693
|
+
isValid(): boolean;
|
|
1694
|
+
get rawValue(): string;
|
|
1695
|
+
get formattedValue(): string;
|
|
1696
|
+
validationErrors(): string[];
|
|
1697
|
+
private allDigitsTheSame;
|
|
1698
|
+
private calculateDigit;
|
|
1699
|
+
private extractActualDigit;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
declare class CPF implements IdentificationNumber {
|
|
1703
|
+
private readonly _value;
|
|
1704
|
+
constructor(cpf: string);
|
|
1705
|
+
private removeNonDigits;
|
|
1706
|
+
isValid(): boolean;
|
|
1707
|
+
get rawValue(): string;
|
|
1708
|
+
get formattedValue(): string;
|
|
1709
|
+
validationErrors(): string[];
|
|
1710
|
+
private allDigitsTheSame;
|
|
1711
|
+
private calculateDigit;
|
|
1712
|
+
private extractActualDigit;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
declare class Telephone {
|
|
1716
|
+
private readonly _value;
|
|
1717
|
+
constructor(value: string);
|
|
1718
|
+
private removeInvalidDigits;
|
|
1719
|
+
isValid(): boolean;
|
|
1720
|
+
validationErrors(): string[];
|
|
1721
|
+
get rawValue(): string;
|
|
1722
|
+
get validValue(): string;
|
|
1723
|
+
get formattedValue(): string;
|
|
1724
|
+
get rawValueWithoutDDI(): string;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1649
1727
|
declare class Document implements Cloneable {
|
|
1650
1728
|
private _id;
|
|
1651
1729
|
private _branch_id;
|
|
@@ -1748,6 +1826,7 @@ declare class Document implements Cloneable {
|
|
|
1748
1826
|
set issuer_indicator(value: IssuerIndicatorEnum);
|
|
1749
1827
|
get rps_number(): string;
|
|
1750
1828
|
set rps_number(value: string);
|
|
1829
|
+
private get isInboundOwnIssuance();
|
|
1751
1830
|
get issuer(): Person;
|
|
1752
1831
|
get issuerOrigin(): Person;
|
|
1753
1832
|
set issuer(value: Person);
|
|
@@ -1784,6 +1863,14 @@ declare class Document implements Cloneable {
|
|
|
1784
1863
|
get fcp_value_destination(): number;
|
|
1785
1864
|
get icms_value_destination_uf(): number;
|
|
1786
1865
|
get icms_value_origin_uf(): number;
|
|
1866
|
+
getParties(): {
|
|
1867
|
+
issuer: Person;
|
|
1868
|
+
recipient: Person;
|
|
1869
|
+
};
|
|
1870
|
+
getPartiesByPartnerCnpj(cnpj: CNPJ | string): {
|
|
1871
|
+
issuer: Person;
|
|
1872
|
+
recipient: Person;
|
|
1873
|
+
};
|
|
1787
1874
|
isInbound(): boolean;
|
|
1788
1875
|
isOutbound(): boolean;
|
|
1789
1876
|
isCancelled(): boolean;
|
|
@@ -1808,10 +1895,13 @@ declare class BuilderAddress {
|
|
|
1808
1895
|
build(): Address;
|
|
1809
1896
|
withNeighborhood(neighborhood: string): BuilderAddress;
|
|
1810
1897
|
withMunicipalityCode(municipality_code: string): BuilderAddress;
|
|
1898
|
+
withMunicipality(municipality: Municipality): BuilderAddress;
|
|
1811
1899
|
withCountryCode(country_code: CountryCodeEnum): BuilderAddress;
|
|
1900
|
+
withCountry(country: Country): BuilderAddress;
|
|
1812
1901
|
withPostalCode(postal_code: string): BuilderAddress;
|
|
1813
1902
|
withSupplement(supplement: string): BuilderAddress;
|
|
1814
1903
|
withState(state: string): BuilderAddress;
|
|
1904
|
+
withStateObject(state: State): BuilderAddress;
|
|
1815
1905
|
withStreet(street: string): BuilderAddress;
|
|
1816
1906
|
withNumber(number: string): BuilderAddress;
|
|
1817
1907
|
withTelephone(telephone: string): BuilderAddress;
|
|
@@ -2008,10 +2098,10 @@ declare class BuilderConversionFactor {
|
|
|
2008
2098
|
}
|
|
2009
2099
|
|
|
2010
2100
|
declare enum DescriptionStatusEnum {
|
|
2011
|
-
AUTHORIZED = "Autorizado"
|
|
2012
|
-
CANCELED = "Cancelado"
|
|
2013
|
-
LATE_REGULARIZED = "Denegado"
|
|
2014
|
-
LATE_CANCELED = "Inutilizado"
|
|
2101
|
+
AUTHORIZED = "Autorizado",
|
|
2102
|
+
CANCELED = "Cancelado",
|
|
2103
|
+
LATE_REGULARIZED = "Denegado",
|
|
2104
|
+
LATE_CANCELED = "Inutilizado",
|
|
2015
2105
|
NOT_APPLICABLE = ""
|
|
2016
2106
|
}
|
|
2017
2107
|
declare namespace DescriptionStatusEnum {
|
|
@@ -2274,19 +2364,6 @@ declare class MongoConfig {
|
|
|
2274
2364
|
minPoolSize: number;
|
|
2275
2365
|
connectTimeoutMS: number;
|
|
2276
2366
|
socketTimeoutMS: number;
|
|
2277
|
-
/**
|
|
2278
|
-
* MongoDB configuration class.
|
|
2279
|
-
* @param host - The host of the MongoDB server.
|
|
2280
|
-
* @param port - The port of the MongoDB server.
|
|
2281
|
-
* @param database - The name of the database to connect to.
|
|
2282
|
-
* @param username - Optional username for authentication.
|
|
2283
|
-
* @param password - Optional password for authentication.
|
|
2284
|
-
* @param isSrv - Whether to use SRV connection string format (default: false).
|
|
2285
|
-
* @param maxPoolSize - Maximum number of connections in the pool (default: 20).
|
|
2286
|
-
* @param minPoolSize - Minimum number of connections in the pool (default: 5).
|
|
2287
|
-
* @param connectTimeoutMS - Connection timeout in milliseconds (default: 10000).
|
|
2288
|
-
* @param socketTimeoutMS - Socket timeout in milliseconds (default: 45000).
|
|
2289
|
-
*/
|
|
2290
2367
|
constructor(host: string, port: number, database: string, username?: string, password?: string, isSrv?: boolean, maxPoolSize?: number, minPoolSize?: number, connectTimeoutMS?: number, socketTimeoutMS?: number);
|
|
2291
2368
|
getConnectionString(): string;
|
|
2292
2369
|
getPoolOptions(): {
|
|
@@ -2308,15 +2385,6 @@ declare class PostgresConfig {
|
|
|
2308
2385
|
rejectUnauthorized: boolean;
|
|
2309
2386
|
};
|
|
2310
2387
|
};
|
|
2311
|
-
/**
|
|
2312
|
-
* PostgresDB configuration class.
|
|
2313
|
-
* @param user - The username for authentication.
|
|
2314
|
-
* @param host - The host of the PostgresDB server.
|
|
2315
|
-
* @param database - The name of the database to connect to.
|
|
2316
|
-
* @param password - The password for authentication.
|
|
2317
|
-
* @param port - The port of the PostgresDB server.
|
|
2318
|
-
* @param ssl - The ssl connection of the PostgresDB server.
|
|
2319
|
-
*/
|
|
2320
2388
|
constructor(config: {
|
|
2321
2389
|
user: string;
|
|
2322
2390
|
host: string;
|
|
@@ -2883,7 +2951,7 @@ interface IIcmsAdjustmentSetting {
|
|
|
2883
2951
|
tenantid: string;
|
|
2884
2952
|
profile_id: string;
|
|
2885
2953
|
establishment_id: string;
|
|
2886
|
-
|
|
2954
|
+
code: number;
|
|
2887
2955
|
tax_type: IcmsAdjustmentTaxTypeEnum;
|
|
2888
2956
|
adjustment_type: IcmsAdjustmentTypeEnum;
|
|
2889
2957
|
initial_date: string;
|
|
@@ -3044,56 +3112,20 @@ declare enum TaxCollectionType {
|
|
|
3044
3112
|
OPERATION = "OPERATION",
|
|
3045
3113
|
APURATION = "APURATION"
|
|
3046
3114
|
}
|
|
3047
|
-
/**
|
|
3048
|
-
* Represents the information of the audit tax collection.
|
|
3049
|
-
*/
|
|
3050
3115
|
type AuditTaxCollectionInfo = {
|
|
3051
|
-
/**
|
|
3052
|
-
* The ID of the audit's solicitation.
|
|
3053
|
-
*/
|
|
3054
3116
|
solicitation_id: string;
|
|
3055
|
-
/**
|
|
3056
|
-
* The period of the audit.
|
|
3057
|
-
*/
|
|
3058
3117
|
period: string;
|
|
3059
|
-
/**
|
|
3060
|
-
* Details of tax collection of ICMS Audit (Registry E116).
|
|
3061
|
-
*/
|
|
3062
3118
|
icms?: AuditTaxCollectionDetails;
|
|
3063
|
-
/**
|
|
3064
|
-
* Details of tax collection of ICMS Sub-Apuration of an ICMS Audit (Registry 1926).
|
|
3065
|
-
*/
|
|
3066
3119
|
icms_sub_apuracao?: AuditTaxCollectionDetails;
|
|
3067
3120
|
};
|
|
3068
|
-
/**
|
|
3069
|
-
* Represents the Audit Type.
|
|
3070
|
-
*/
|
|
3071
3121
|
type AuditTaxCollectionDetails = {
|
|
3072
|
-
/**
|
|
3073
|
-
* The total of value to be collected.
|
|
3074
|
-
*/
|
|
3075
3122
|
vl_recolher: number;
|
|
3076
|
-
/**
|
|
3077
|
-
* The total of special Debit.
|
|
3078
|
-
*/
|
|
3079
3123
|
deb_esp: number;
|
|
3080
|
-
/**
|
|
3081
|
-
* Details of the tax collection.
|
|
3082
|
-
*/
|
|
3083
3124
|
details: TaxCollectionDetails[];
|
|
3084
3125
|
};
|
|
3085
3126
|
type TaxCollectionDetails = ITaxTypeConfigBase & {
|
|
3086
|
-
/**
|
|
3087
|
-
* The amount to be collected.
|
|
3088
|
-
*/
|
|
3089
3127
|
amount: number;
|
|
3090
|
-
/**
|
|
3091
|
-
* The due period of the collection.
|
|
3092
|
-
*/
|
|
3093
3128
|
due_period: string;
|
|
3094
|
-
/**
|
|
3095
|
-
* Additional information.
|
|
3096
|
-
*/
|
|
3097
3129
|
txt_compl?: string;
|
|
3098
3130
|
};
|
|
3099
3131
|
interface GetAuditTaxCollectionQuery {
|
|
@@ -3172,7 +3204,7 @@ declare class IcmsAdjustmentSetting {
|
|
|
3172
3204
|
protected _tenantid: string;
|
|
3173
3205
|
protected _profile_id: string;
|
|
3174
3206
|
protected _establishment_id: string;
|
|
3175
|
-
protected
|
|
3207
|
+
protected _code: number;
|
|
3176
3208
|
protected _tax_type: IcmsAdjustmentTaxTypeEnum;
|
|
3177
3209
|
protected _adjustment_type: IcmsAdjustmentTypeEnum;
|
|
3178
3210
|
protected _initial_date: string;
|
|
@@ -3191,7 +3223,7 @@ declare class IcmsAdjustmentSetting {
|
|
|
3191
3223
|
set tenantid(tenantid: string);
|
|
3192
3224
|
set profile_id(profile_id: string);
|
|
3193
3225
|
set establishment_id(establishment_id: string);
|
|
3194
|
-
set
|
|
3226
|
+
set code(code: number);
|
|
3195
3227
|
set tax_type(value: IcmsAdjustmentTaxTypeEnum);
|
|
3196
3228
|
set adjustment_type(value: IcmsAdjustmentTypeEnum);
|
|
3197
3229
|
set initial_date(value: string);
|
|
@@ -3210,7 +3242,7 @@ declare class IcmsAdjustmentSetting {
|
|
|
3210
3242
|
get tenantid(): string;
|
|
3211
3243
|
get profile_id(): string;
|
|
3212
3244
|
get establishment_id(): string;
|
|
3213
|
-
get
|
|
3245
|
+
get code(): number;
|
|
3214
3246
|
get tax_type(): IcmsAdjustmentTaxTypeEnum;
|
|
3215
3247
|
get adjustment_type(): IcmsAdjustmentTypeEnum;
|
|
3216
3248
|
get initial_date(): string;
|
|
@@ -3264,33 +3296,37 @@ declare enum FiscalQualificationType {
|
|
|
3264
3296
|
}
|
|
3265
3297
|
|
|
3266
3298
|
declare enum StateCollectionSettingsTaxTypeEnum {
|
|
3267
|
-
ICMS = "ICMS"
|
|
3268
|
-
ICMS_ST = "ICMS_ST"
|
|
3269
|
-
ICMS_SUB_AUDITING = "ICMS_SUB_AUDITING"
|
|
3299
|
+
ICMS = "ICMS",
|
|
3300
|
+
ICMS_ST = "ICMS_ST",
|
|
3301
|
+
ICMS_SUB_AUDITING = "ICMS_SUB_AUDITING",
|
|
3270
3302
|
DIFAL_FCP = "DIFAL_FCP"
|
|
3271
3303
|
}
|
|
3272
3304
|
|
|
3273
3305
|
declare enum StateCollectionSettingsConfigTypeEnum {
|
|
3274
|
-
TAX_TO_COLLECTED = "TAX_TO_COLLECTED"
|
|
3306
|
+
TAX_TO_COLLECTED = "TAX_TO_COLLECTED",
|
|
3275
3307
|
EXTRA_VALUE_CALCULATION = "EXTRA_VALUE_CALCULATION"
|
|
3276
3308
|
}
|
|
3277
3309
|
|
|
3278
3310
|
declare enum TaxCollectionTypeEnum {
|
|
3279
|
-
OPERATION = "OPERATION"
|
|
3311
|
+
OPERATION = "OPERATION",
|
|
3280
3312
|
APURATION = "APURATION"
|
|
3281
3313
|
}
|
|
3282
3314
|
|
|
3283
|
-
declare
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3315
|
+
declare enum StartingCreditBalanceTypeEnum {
|
|
3316
|
+
ICMS = "icms",
|
|
3317
|
+
ICMS_ST = "icms-st",
|
|
3318
|
+
IPI = "ipi",
|
|
3319
|
+
DIFAL_FCP = "difal-fcp",
|
|
3320
|
+
PIS = "pis",
|
|
3321
|
+
COFINS = "cofins"
|
|
3322
|
+
}
|
|
3323
|
+
declare enum CreditBalanceOriginCreditTypeEnum {
|
|
3324
|
+
credit_balance = 0,
|
|
3325
|
+
tax_withheld = 1
|
|
3326
|
+
}
|
|
3327
|
+
declare enum CreditBalanceRegimeTypeEnum {
|
|
3328
|
+
cumulative = 0,
|
|
3329
|
+
not_cumulative = 1
|
|
3294
3330
|
}
|
|
3295
3331
|
|
|
3296
3332
|
declare class EstablishmentEvent {
|
|
@@ -3496,8 +3532,71 @@ declare class StateCollectionSettings {
|
|
|
3496
3532
|
get updated_by_email(): string;
|
|
3497
3533
|
}
|
|
3498
3534
|
|
|
3535
|
+
declare class StateRegistration {
|
|
3536
|
+
protected _id: string;
|
|
3537
|
+
protected _state: State;
|
|
3538
|
+
protected _number: string;
|
|
3539
|
+
protected _createdAt: Date;
|
|
3540
|
+
protected _inactiveAt: Date | null;
|
|
3541
|
+
protected _isTaxSubstitution: boolean;
|
|
3542
|
+
get id(): string;
|
|
3543
|
+
set id(value: string);
|
|
3544
|
+
get state(): State;
|
|
3545
|
+
set state(value: State);
|
|
3546
|
+
get number(): string;
|
|
3547
|
+
set number(value: string);
|
|
3548
|
+
get createdAt(): Date;
|
|
3549
|
+
set createdAt(value: Date);
|
|
3550
|
+
get inactiveAt(): Date | null;
|
|
3551
|
+
set inactiveAt(value: Date | null);
|
|
3552
|
+
get isTaxSubstitution(): boolean;
|
|
3553
|
+
set isTaxSubstitution(value: boolean);
|
|
3554
|
+
}
|
|
3555
|
+
|
|
3556
|
+
declare class MunicipalRegistration {
|
|
3557
|
+
protected _id: string;
|
|
3558
|
+
protected _state: State;
|
|
3559
|
+
protected _number: string;
|
|
3560
|
+
protected _municipality: Municipality;
|
|
3561
|
+
protected _createdAt: Date;
|
|
3562
|
+
protected _inactiveAt: Date | null;
|
|
3563
|
+
get id(): string;
|
|
3564
|
+
set id(value: string);
|
|
3565
|
+
get state(): State;
|
|
3566
|
+
set state(value: State);
|
|
3567
|
+
get number(): string;
|
|
3568
|
+
set number(value: string);
|
|
3569
|
+
set municipality(value: Municipality);
|
|
3570
|
+
get municipality(): Municipality;
|
|
3571
|
+
get municipalityCode(): number;
|
|
3572
|
+
get createdAt(): Date;
|
|
3573
|
+
set createdAt(value: Date);
|
|
3574
|
+
get inactiveAt(): Date | null;
|
|
3575
|
+
set inactiveAt(value: Date | null);
|
|
3576
|
+
}
|
|
3577
|
+
|
|
3578
|
+
declare enum ContactTypesEnum {
|
|
3579
|
+
email = "EMAIL",
|
|
3580
|
+
telephone = "PHONE"
|
|
3581
|
+
}
|
|
3582
|
+
declare class Contact {
|
|
3583
|
+
protected _type: ContactTypesEnum;
|
|
3584
|
+
protected _value: Telephone | Email;
|
|
3585
|
+
protected _description: string | undefined;
|
|
3586
|
+
protected _responsible: string | null;
|
|
3587
|
+
get type(): ContactTypesEnum;
|
|
3588
|
+
get value(): Telephone | Email;
|
|
3589
|
+
get responsible(): string | null;
|
|
3590
|
+
set type(type: ContactTypesEnum);
|
|
3591
|
+
set value(value: Telephone | Email);
|
|
3592
|
+
set responsible(responsible: string | null);
|
|
3593
|
+
set description(description: string | undefined);
|
|
3594
|
+
get description(): string | undefined;
|
|
3595
|
+
}
|
|
3596
|
+
|
|
3499
3597
|
declare class Establishment {
|
|
3500
|
-
protected
|
|
3598
|
+
protected _id: string;
|
|
3599
|
+
protected _fantasyName: string;
|
|
3501
3600
|
protected _tenantid: string;
|
|
3502
3601
|
protected _taxation_type: TaxationType;
|
|
3503
3602
|
protected _cod_inc_trib: string;
|
|
@@ -3509,15 +3608,33 @@ declare class Establishment {
|
|
|
3509
3608
|
protected _profileId: string;
|
|
3510
3609
|
protected _fiscal_id_number: CNPJ;
|
|
3511
3610
|
protected _headerAccountPlanId: string;
|
|
3512
|
-
protected _id: string;
|
|
3513
3611
|
protected _created_at: Date;
|
|
3612
|
+
protected _active: boolean;
|
|
3613
|
+
protected _nire: string;
|
|
3614
|
+
protected _crt: number;
|
|
3615
|
+
protected _suframa: string;
|
|
3616
|
+
protected _mainEmail: Contact | undefined;
|
|
3617
|
+
protected _mainTelephone: Contact | undefined;
|
|
3514
3618
|
protected _efdIcmsIpiSpecializedProfile: EfdIcmsIpiSpecializedProfile;
|
|
3515
3619
|
protected _signatories: Signatory[];
|
|
3516
3620
|
protected _scps: Scp[];
|
|
3517
3621
|
protected _events: EstablishmentEvent[];
|
|
3518
3622
|
protected _stateCollectionsSettings: StateCollectionSettings[];
|
|
3623
|
+
protected _stateRegistrations: StateRegistration[];
|
|
3624
|
+
protected _municipalRegistrations: MunicipalRegistration[];
|
|
3625
|
+
protected _addresses: Address[];
|
|
3626
|
+
protected _contacts: Contact[];
|
|
3627
|
+
get mainEmail(): Contact | undefined;
|
|
3628
|
+
set mainEmail(mainEmail: Contact);
|
|
3629
|
+
get mainTelephone(): Contact | undefined;
|
|
3630
|
+
set mainTelephone(mainTelephone: Contact);
|
|
3631
|
+
private hasContact;
|
|
3519
3632
|
get alias(): string;
|
|
3633
|
+
get active(): boolean;
|
|
3634
|
+
set active(active: boolean);
|
|
3520
3635
|
set alias(alias: string);
|
|
3636
|
+
get fantasyName(): string;
|
|
3637
|
+
set fantasyName(fantasyName: string);
|
|
3521
3638
|
set tenantid(tenantid: string);
|
|
3522
3639
|
set taxation_type(taxation_type: TaxationType);
|
|
3523
3640
|
set cod_inc_trib(cod_inc_trib: string);
|
|
@@ -3554,7 +3671,25 @@ declare class Establishment {
|
|
|
3554
3671
|
get events(): EstablishmentEvent[];
|
|
3555
3672
|
set stateCollectionSettings(stateCollectionSettings: StateCollectionSettings[]);
|
|
3556
3673
|
get stateCollectionSettings(): StateCollectionSettings[];
|
|
3557
|
-
getStateCollectionSettingsByTaxType(tax_type: StateCollectionSettingsTaxTypeEnum): StateCollectionSettings;
|
|
3674
|
+
getStateCollectionSettingsByTaxType(tax_type: StateCollectionSettingsTaxTypeEnum): StateCollectionSettings[];
|
|
3675
|
+
get nire(): string;
|
|
3676
|
+
set nire(value: string);
|
|
3677
|
+
get crt(): number;
|
|
3678
|
+
set crt(value: number);
|
|
3679
|
+
get suframa(): string;
|
|
3680
|
+
set suframa(value: string);
|
|
3681
|
+
addStateRegistration(establishmentStateRegistration: StateRegistration): void;
|
|
3682
|
+
addMunicipalRegistration(establishmentMunicipalRegistration: MunicipalRegistration): void;
|
|
3683
|
+
get stateRegistrations(): StateRegistration[];
|
|
3684
|
+
get municipalRegistrations(): MunicipalRegistration[];
|
|
3685
|
+
addAddress(establishmentAddress: Address): void;
|
|
3686
|
+
get addresses(): Address[];
|
|
3687
|
+
get fiscalAddress(): Address | undefined;
|
|
3688
|
+
get billingAddress(): Address | undefined;
|
|
3689
|
+
addContact(establishmentContact: Contact): void;
|
|
3690
|
+
get contacts(): Contact[];
|
|
3691
|
+
get telephoneContact(): Contact | undefined;
|
|
3692
|
+
get emailContact(): Contact | undefined;
|
|
3558
3693
|
}
|
|
3559
3694
|
|
|
3560
3695
|
interface IReinfAdditionalFields {
|
|
@@ -3808,27 +3943,88 @@ declare class ReinfSpecializedProfile {
|
|
|
3808
3943
|
get updated_at(): Date;
|
|
3809
3944
|
}
|
|
3810
3945
|
|
|
3946
|
+
declare class StartingCreditBalance {
|
|
3947
|
+
protected _id: string;
|
|
3948
|
+
protected _tenantid: string;
|
|
3949
|
+
protected _period: string;
|
|
3950
|
+
protected _establishment_id: string;
|
|
3951
|
+
protected _establishment?: Establishment;
|
|
3952
|
+
protected _profile_id: string;
|
|
3953
|
+
protected _type: StartingCreditBalanceTypeEnum;
|
|
3954
|
+
protected _credit_balance_previous_period: number;
|
|
3955
|
+
protected _credit_balance_sub_auditing?: number;
|
|
3956
|
+
protected _credit_balance_previous_period_fcp?: number;
|
|
3957
|
+
protected _uf?: string;
|
|
3958
|
+
protected _credit_balance_control_id?: string;
|
|
3959
|
+
protected _withholding_nature_indicator?: string;
|
|
3960
|
+
protected _origin_credit?: CreditBalanceOriginCreditTypeEnum;
|
|
3961
|
+
protected _type_regime?: CreditBalanceRegimeTypeEnum;
|
|
3962
|
+
protected _total_value?: number;
|
|
3963
|
+
protected _credit_type?: string;
|
|
3964
|
+
protected _created_at: Date;
|
|
3965
|
+
get id(): string;
|
|
3966
|
+
set id(value: string);
|
|
3967
|
+
get tenantid(): string;
|
|
3968
|
+
set tenantid(value: string);
|
|
3969
|
+
get period(): string;
|
|
3970
|
+
set period(value: string);
|
|
3971
|
+
get establishment_id(): string;
|
|
3972
|
+
set establishment_id(value: string);
|
|
3973
|
+
get establishment(): Establishment | undefined;
|
|
3974
|
+
set establishment(value: Establishment | undefined);
|
|
3975
|
+
get profile_id(): string;
|
|
3976
|
+
set profile_id(value: string);
|
|
3977
|
+
get type(): StartingCreditBalanceTypeEnum;
|
|
3978
|
+
set type(value: StartingCreditBalanceTypeEnum);
|
|
3979
|
+
get credit_balance_previous_period(): number;
|
|
3980
|
+
set credit_balance_previous_period(value: number);
|
|
3981
|
+
get credit_balance_sub_auditing(): number | undefined;
|
|
3982
|
+
set credit_balance_sub_auditing(value: number | undefined);
|
|
3983
|
+
get credit_balance_previous_period_fcp(): number | undefined;
|
|
3984
|
+
set credit_balance_previous_period_fcp(value: number | undefined);
|
|
3985
|
+
get uf(): string | undefined;
|
|
3986
|
+
set uf(value: string | undefined);
|
|
3987
|
+
get credit_balance_control_id(): string | undefined;
|
|
3988
|
+
set credit_balance_control_id(value: string | undefined);
|
|
3989
|
+
get withholding_nature_indicator(): string | undefined;
|
|
3990
|
+
set withholding_nature_indicator(value: string | undefined);
|
|
3991
|
+
get origin_credit(): CreditBalanceOriginCreditTypeEnum | undefined;
|
|
3992
|
+
set origin_credit(value: CreditBalanceOriginCreditTypeEnum | undefined);
|
|
3993
|
+
get type_regime(): CreditBalanceRegimeTypeEnum | undefined;
|
|
3994
|
+
set type_regime(value: CreditBalanceRegimeTypeEnum | undefined);
|
|
3995
|
+
get total_value(): number | undefined;
|
|
3996
|
+
set total_value(value: number | undefined);
|
|
3997
|
+
get credit_type(): string | undefined;
|
|
3998
|
+
set credit_type(value: string | undefined);
|
|
3999
|
+
get created_at(): Date;
|
|
4000
|
+
set created_at(value: Date);
|
|
4001
|
+
}
|
|
4002
|
+
|
|
3811
4003
|
declare class Profile {
|
|
3812
4004
|
protected _id: string;
|
|
4005
|
+
protected _active: boolean;
|
|
3813
4006
|
protected _tenantid: string;
|
|
3814
4007
|
protected _validFrom: Date;
|
|
3815
4008
|
protected _validTo: Date | null;
|
|
3816
4009
|
protected _mainEstablishment: Establishment;
|
|
3817
4010
|
protected _mainEstablishmentId: string;
|
|
3818
4011
|
protected _alias: string;
|
|
4012
|
+
protected _taxation_type: TaxationType;
|
|
3819
4013
|
private _establishments;
|
|
3820
4014
|
private _reinfSpecializedProfile;
|
|
3821
4015
|
private _efdContribSpecializedProfile;
|
|
3822
4016
|
private _ecdSpecializedProfile;
|
|
3823
4017
|
private _ecfSpecializedProfile;
|
|
3824
|
-
|
|
4018
|
+
private _startingCreditBalance;
|
|
3825
4019
|
set id(id: string);
|
|
4020
|
+
set active(active: boolean);
|
|
3826
4021
|
set tenantid(tenantid: string);
|
|
3827
4022
|
set validFrom(validFrom: Date);
|
|
3828
4023
|
set validTo(validTo: Date);
|
|
3829
4024
|
set mainEstablishmentId(mainEstablishmentId: string);
|
|
3830
4025
|
set alias(alias: string);
|
|
3831
4026
|
get id(): string;
|
|
4027
|
+
get active(): boolean;
|
|
3832
4028
|
get tenantid(): string;
|
|
3833
4029
|
get taxation_type(): TaxationType;
|
|
3834
4030
|
set taxation_type(taxation_type: TaxationType);
|
|
@@ -3840,6 +4036,7 @@ declare class Profile {
|
|
|
3840
4036
|
get establishments(): Establishment[];
|
|
3841
4037
|
set establishments(establishments: Establishment[]);
|
|
3842
4038
|
findEstablishment(establishment_id: string): Establishment;
|
|
4039
|
+
findEstablishmentByBranchId(branchId: string): Establishment;
|
|
3843
4040
|
checkValidityDate(generationPeriod: Date | string): boolean;
|
|
3844
4041
|
get reinfSpecializedProfile(): ReinfSpecializedProfile;
|
|
3845
4042
|
set setReinfSpecializedProfile(reinfSpecializedProfile: ReinfSpecializedProfile);
|
|
@@ -3850,6 +4047,8 @@ declare class Profile {
|
|
|
3850
4047
|
set setEcdSpecializedProfile(ecdSpecializedProfile: EcdSpecializedProfile);
|
|
3851
4048
|
get ecfSpecializedProfile(): EcfSpecializedProfile;
|
|
3852
4049
|
set setEcfSpecializedProfile(ecfSpecializedProfile: EcfSpecializedProfile);
|
|
4050
|
+
get startingCreditBalance(): StartingCreditBalance[];
|
|
4051
|
+
set startingCreditBalance(startingCreditBalance: StartingCreditBalance[]);
|
|
3853
4052
|
}
|
|
3854
4053
|
|
|
3855
4054
|
interface IProfileRepository {
|
|
@@ -3880,6 +4079,26 @@ interface IProfileServiceUrls {
|
|
|
3880
4079
|
ecfBaseServiceUrl?: string;
|
|
3881
4080
|
efdContribBaseServiceUrl?: string;
|
|
3882
4081
|
ecdBaseServiceUrl?: string;
|
|
4082
|
+
partnerServiceUrl?: string;
|
|
4083
|
+
}
|
|
4084
|
+
interface IStartingCreditBalance {
|
|
4085
|
+
id: string;
|
|
4086
|
+
tenantid: string;
|
|
4087
|
+
period: string;
|
|
4088
|
+
establishment_id: string;
|
|
4089
|
+
profile_id: string;
|
|
4090
|
+
type: StartingCreditBalanceTypeEnum;
|
|
4091
|
+
credit_balance_previous_period?: number;
|
|
4092
|
+
credit_balance_sub_auditing?: number;
|
|
4093
|
+
credit_balance_previous_period_fcp?: number;
|
|
4094
|
+
uf?: string;
|
|
4095
|
+
credit_balance_control_id?: string;
|
|
4096
|
+
origin_credit?: CreditBalanceOriginCreditTypeEnum;
|
|
4097
|
+
type_regime?: CreditBalanceRegimeTypeEnum;
|
|
4098
|
+
credit_type?: string;
|
|
4099
|
+
total_value?: number;
|
|
4100
|
+
withholding_nature_indicator?: string;
|
|
4101
|
+
created_at: Date;
|
|
3883
4102
|
}
|
|
3884
4103
|
|
|
3885
4104
|
interface IEstablishment {
|
|
@@ -3954,21 +4173,29 @@ interface IEstablishmentEvent {
|
|
|
3954
4173
|
declare class ProfileRestRepository implements IProfileRepository {
|
|
3955
4174
|
private readonly urls;
|
|
3956
4175
|
private readonly stateSettingsRepository;
|
|
3957
|
-
|
|
4176
|
+
private readonly masterDataRepository;
|
|
4177
|
+
constructor(urls: IProfileServiceUrls, stateSettingsRepository: IStateCollectionSettingsRepository, masterDataRepository?: Repository);
|
|
3958
4178
|
getProfileById(profile_id: string, tenantid: string, period?: any): Promise<Profile>;
|
|
3959
4179
|
private getStateCollectionSettings;
|
|
3960
4180
|
getProfileRestById(profile_id: string, tenantid: string): Promise<IProfile>;
|
|
4181
|
+
getStartingCreditByProfileId(profile_id: string, tenantid: string): Promise<StartingCreditBalance[]>;
|
|
4182
|
+
private mapDataToStartingCreditBalance;
|
|
3961
4183
|
getProfileByBranchId(branch_id: string, tenantid: string): Promise<IProfile[]>;
|
|
3962
4184
|
getEstablishmentByProfileId(profile_id: string, tenantid: string): Promise<Establishment[]>;
|
|
3963
4185
|
getSignatoryByProfileId(profile_id: string, tenantid: string): Promise<ISignatory[]>;
|
|
3964
4186
|
getScpByProfileId(profile_id: string, tenantid: string): Promise<IScp[]>;
|
|
3965
4187
|
getEventsByProfileId(profile_id: string, tenantid: string): Promise<IEstablishmentEvent[]>;
|
|
4188
|
+
private getAllPartners;
|
|
3966
4189
|
getReinfSpecializedProfile(profile_id: string, tenantid: string): Promise<ReinfSpecializedProfile>;
|
|
3967
4190
|
getEcdSpecializedProfile(profile_id: string, tenantid: string): Promise<EcdSpecializedProfile>;
|
|
3968
4191
|
getEcfSpecializedProfile(profile_id: string, tenantid: string): Promise<EcfSpecializedProfile>;
|
|
3969
4192
|
getEfdContribSpecializedProfile(profile_id: string, tenantid: string): Promise<EfdContribSpecializedProfile>;
|
|
3970
4193
|
getEfdIcmsIpiSpecializedProfile(profile_id: string, tenantid: string): Promise<EfdIcmsIpiSpecializedProfile[]>;
|
|
3971
4194
|
private getJsonData;
|
|
4195
|
+
private mountEstablishment;
|
|
4196
|
+
private mountSignatories;
|
|
4197
|
+
private mountSCPs;
|
|
4198
|
+
private mountEvents;
|
|
3972
4199
|
}
|
|
3973
4200
|
|
|
3974
4201
|
interface IEcfSpecializedProfile {
|
|
@@ -4060,6 +4287,7 @@ declare class ProfileDbRepository implements IProfileRepository {
|
|
|
4060
4287
|
getProfileById(profile_id: string, tenantid: string, period?: string): Promise<Profile>;
|
|
4061
4288
|
getEstablishments(profile_id: string, tenantid: string): Promise<Establishment[]>;
|
|
4062
4289
|
private fetchProfile;
|
|
4290
|
+
private fetchStartingCreditBalance;
|
|
4063
4291
|
private fetchEstablishments;
|
|
4064
4292
|
private fetchReinf;
|
|
4065
4293
|
private fetchEcd;
|
|
@@ -4068,6 +4296,7 @@ declare class ProfileDbRepository implements IProfileRepository {
|
|
|
4068
4296
|
private fetchEfdIcmsIpi;
|
|
4069
4297
|
private getEstablishmentsFromPostgres;
|
|
4070
4298
|
private mapDataToProfile;
|
|
4299
|
+
private mapDataToStartingCreditBalance;
|
|
4071
4300
|
private mapDataToEstablishments;
|
|
4072
4301
|
private mapDataToSignatories;
|
|
4073
4302
|
private mapDataToScps;
|
|
@@ -4079,19 +4308,6 @@ declare class ProfileDbRepository implements IProfileRepository {
|
|
|
4079
4308
|
private mapDataToEfdIcmsIpi;
|
|
4080
4309
|
}
|
|
4081
4310
|
|
|
4082
|
-
declare class CPF implements IdentificationNumber {
|
|
4083
|
-
private readonly _value;
|
|
4084
|
-
constructor(cpf: string);
|
|
4085
|
-
private removeNonDigits;
|
|
4086
|
-
isValid(): boolean;
|
|
4087
|
-
get rawValue(): string;
|
|
4088
|
-
get formattedValue(): string;
|
|
4089
|
-
validationErrors(): string[];
|
|
4090
|
-
private allDigitsTheSame;
|
|
4091
|
-
private calculateDigit;
|
|
4092
|
-
private extractActualDigit;
|
|
4093
|
-
}
|
|
4094
|
-
|
|
4095
4311
|
declare const keyCompositionMetadata: unique symbol;
|
|
4096
4312
|
declare const onDuplicationStrategyMetadata: unique symbol;
|
|
4097
4313
|
declare const MaximumNumericLength = 19;
|
|
@@ -4118,9 +4334,9 @@ interface FieldFormat {
|
|
|
4118
4334
|
removeSpecialCharacters: boolean;
|
|
4119
4335
|
}
|
|
4120
4336
|
declare enum OnDuplicationStrategy {
|
|
4121
|
-
Error = 0
|
|
4122
|
-
Ignore = 1
|
|
4123
|
-
Overwrite = 2
|
|
4337
|
+
Error = 0,
|
|
4338
|
+
Ignore = 1,
|
|
4339
|
+
Overwrite = 2,
|
|
4124
4340
|
Duplicate = 3
|
|
4125
4341
|
}
|
|
4126
4342
|
declare function Numeric(required?: boolean, fillEntireLength?: boolean, maximumLength?: number): (target: any, propertyKey: any, other?: any) => void;
|
|
@@ -4326,21 +4542,6 @@ declare class ConsoleOutput implements OutputWriter {
|
|
|
4326
4542
|
save(): void;
|
|
4327
4543
|
}
|
|
4328
4544
|
|
|
4329
|
-
/**
|
|
4330
|
-
* Optimized in-memory implementation of RegisterPersist.
|
|
4331
|
-
* Optimized for fast get(tag) operations while maintaining O(1) for all other operations.
|
|
4332
|
-
*
|
|
4333
|
-
* Performance characteristics:
|
|
4334
|
-
* - add(): O(1) for all duplication strategies (including Overwrite)
|
|
4335
|
-
* - getByKey(): O(1)
|
|
4336
|
-
* - get(tag): O(1) - returns array reference directly
|
|
4337
|
-
* - all(): O(N) where N is total number of registers
|
|
4338
|
-
* - set(tag): O(M) where M is number of registers being set
|
|
4339
|
-
*
|
|
4340
|
-
* Memory optimization:
|
|
4341
|
-
* - Registers stored once in arrays grouped by tag
|
|
4342
|
-
* - registersByKey maintains reverse index with O(1) lookup and update
|
|
4343
|
-
*/
|
|
4344
4545
|
declare class MemoryPersist implements RegisterPersist {
|
|
4345
4546
|
private readonly registers;
|
|
4346
4547
|
private readonly registersByKey;
|
|
@@ -4469,4 +4670,12 @@ declare function logWithContext<T extends MessageCodeType>(messageCode: T, param
|
|
|
4469
4670
|
actionSuggestion: string;
|
|
4470
4671
|
};
|
|
4471
4672
|
|
|
4472
|
-
|
|
4673
|
+
declare function cleanData(obj: any): any;
|
|
4674
|
+
|
|
4675
|
+
declare function isEmptyObject(obj: object): boolean;
|
|
4676
|
+
|
|
4677
|
+
declare function toSafeNumber(value: unknown, fallback?: number): number;
|
|
4678
|
+
|
|
4679
|
+
declare function validationValue(field: any): any;
|
|
4680
|
+
|
|
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 };
|