@seidor-cloud-produtos/tax-core 1.0.5 → 1.0.7
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 +262 -88
- package/dist/index.d.ts +262 -88
- package/dist/index.js +44 -2
- package/dist/index.mjs +44 -2
- package/package.json +5 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MongoClient } from 'mongodb';
|
|
2
|
+
import { PoolConfig } from 'pg';
|
|
2
3
|
|
|
3
4
|
interface Cloneable {
|
|
4
5
|
clone(): this;
|
|
@@ -838,6 +839,19 @@ declare namespace StatusDocumentEnum {
|
|
|
838
839
|
function fromNewValue(value: StatusDocumentEnum): string | undefined;
|
|
839
840
|
}
|
|
840
841
|
|
|
842
|
+
declare class ConversionFactor implements Cloneable {
|
|
843
|
+
private _unit;
|
|
844
|
+
private _multiply;
|
|
845
|
+
private _barcode;
|
|
846
|
+
get unit(): string;
|
|
847
|
+
set unit(value: string);
|
|
848
|
+
get multiply(): number;
|
|
849
|
+
set multiply(value: number);
|
|
850
|
+
get barcode(): string;
|
|
851
|
+
set barcode(value: string);
|
|
852
|
+
clone(): this;
|
|
853
|
+
}
|
|
854
|
+
|
|
841
855
|
declare enum FreightContractedNatureIndicatorEnum {
|
|
842
856
|
SALE_SELLER_BEARING_COST = "0",// Operações de vendas, com ônus suportado pelo estabelecimento vendedor
|
|
843
857
|
SALE_BUYER_BEARING_COST = "1",// Operações de vendas, com ônus suportado pelo adquirente
|
|
@@ -1086,6 +1100,7 @@ declare namespace ServiceCodeEnum {
|
|
|
1086
1100
|
}
|
|
1087
1101
|
|
|
1088
1102
|
declare enum TaxTypeEnum {
|
|
1103
|
+
NOT_APPLICABLE = "",
|
|
1089
1104
|
ICMS = "ICMS",
|
|
1090
1105
|
ICMS_ST = "ICMS_ST",
|
|
1091
1106
|
DIFAL_87_15 = "DIFAL_87_15",
|
|
@@ -1104,7 +1119,33 @@ declare enum TaxTypeEnum {
|
|
|
1104
1119
|
CSRF = "CSRF",
|
|
1105
1120
|
CSLL = "CSLL",
|
|
1106
1121
|
CIDE = "CIDE",
|
|
1107
|
-
|
|
1122
|
+
IS = "IS",
|
|
1123
|
+
IBS_UF = "IBS_UF",
|
|
1124
|
+
IBS_UF_DEFERRAL = "IBS_UF_DEFERRAL",
|
|
1125
|
+
IBS_UF_RETURNED = "IBS_UF_RETURNED",
|
|
1126
|
+
IBS_UF_REDUCTION = "IBS_UF_REDUCTION",
|
|
1127
|
+
IBS_MONO = "IBS_MONO",
|
|
1128
|
+
IBS_MONO_DEFERRAL = "IBS_MONO_DEFERRAL",
|
|
1129
|
+
IBS_MONO_PREVIOUSLY = "IBS_MONO_PREVIOUSLY",
|
|
1130
|
+
IBS_TRANSFER = "IBS_TRANSFER",
|
|
1131
|
+
IBS_ADJUSTMENT = "IBS_ADJUSTMENT",
|
|
1132
|
+
IBS_REFUND = "IBS_REFUND",
|
|
1133
|
+
IBS_PRESUMED = "IBS_PRESUMED",
|
|
1134
|
+
IBS_MUN = "IBS_MUN",
|
|
1135
|
+
IBS_MUN_DEFERRAL = "IBS_MUN_DEFERRAL",
|
|
1136
|
+
IBS_MUN_RETURNED = "IBS_MUN_RETURNED",
|
|
1137
|
+
IBS_MUN_REDUCTION = "IBS_MUN_REDUCTION",
|
|
1138
|
+
CBS = "CBS",
|
|
1139
|
+
CBS_DEFERRAL = "CBS_DEFERRAL",
|
|
1140
|
+
CBS_RETURNED = "CBS_RETURNED",
|
|
1141
|
+
CBS_REDUCTION = "CBS_REDUCTION",
|
|
1142
|
+
CBS_MONO = "CBS_MONO",
|
|
1143
|
+
CBS_MONO_DEFERRAL = "CBS_MONO_DEFERRAL",
|
|
1144
|
+
CBS_MONO_PREVIOUSLY = "CBS_MONO_PREVIOUSLY",
|
|
1145
|
+
CBS_TRANSFER = "CBS_TRANSFER",
|
|
1146
|
+
CBS_ADJUSTMENT = "CBS_ADJUSTMENT",
|
|
1147
|
+
CBS_REFUND = "CBS_REFUND",
|
|
1148
|
+
CBS_PRESUMED = "CBS_PRESUMED"
|
|
1108
1149
|
}
|
|
1109
1150
|
|
|
1110
1151
|
declare enum LayoutDateFormat {
|
|
@@ -1258,6 +1299,20 @@ declare enum DifalIcmsCategoryEnum {
|
|
|
1258
1299
|
NOT_APPLICABLE = 0
|
|
1259
1300
|
}
|
|
1260
1301
|
|
|
1302
|
+
declare enum DonationIndicatorEnum {
|
|
1303
|
+
DONATION = 1,
|
|
1304
|
+
NOT_APPLICABLE = 0
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
declare enum ZfmPresumedCreditTypeEnum {
|
|
1308
|
+
NO_PRESUMED_CREDIT = "0",// 0 - Sem Crédito Presumido
|
|
1309
|
+
FINAL_CONSUMER_GOODS = "1",// 1 - Bens de consumo final (55%)
|
|
1310
|
+
CAPITAL_GOODS = "2",// 2 - Bens de capital (75%)
|
|
1311
|
+
INTERMEDIATE_GOODS = "3",// 3 - Bens intermediários (90.25%)
|
|
1312
|
+
IT_AND_LEGAL_DEFINED_GOODS = "4",// 4 - Bens de informática e outros definidos em legislação (100%)
|
|
1313
|
+
NOT_APPLICABLE = ""
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1261
1316
|
declare class Tax implements Cloneable {
|
|
1262
1317
|
private _id;
|
|
1263
1318
|
private _category;
|
|
@@ -1289,6 +1344,9 @@ declare class Tax implements Cloneable {
|
|
|
1289
1344
|
private _interstate_icms_tax_rate;
|
|
1290
1345
|
private _icms_value_origin_uf;
|
|
1291
1346
|
private _difal_icms_category;
|
|
1347
|
+
private _donation_indicator;
|
|
1348
|
+
private _tax_classification_code;
|
|
1349
|
+
private _zfm_presumed_credit_type;
|
|
1292
1350
|
get id(): string;
|
|
1293
1351
|
set id(value: string);
|
|
1294
1352
|
get category(): TaxTypeEnum;
|
|
@@ -1351,6 +1409,12 @@ declare class Tax implements Cloneable {
|
|
|
1351
1409
|
set increased_rate(value: number);
|
|
1352
1410
|
set difal_icms_category(value: DifalIcmsCategoryEnum);
|
|
1353
1411
|
get difal_icms_category(): DifalIcmsCategoryEnum;
|
|
1412
|
+
set donation_indicator(value: DonationIndicatorEnum);
|
|
1413
|
+
get donation_indicator(): DonationIndicatorEnum;
|
|
1414
|
+
set tax_classification_code(value: string);
|
|
1415
|
+
get tax_classification_code(): string;
|
|
1416
|
+
set zfm_presumed_credit_type(value: ZfmPresumedCreditTypeEnum);
|
|
1417
|
+
get zfm_presumed_credit_type(): ZfmPresumedCreditTypeEnum;
|
|
1354
1418
|
clone(): this;
|
|
1355
1419
|
}
|
|
1356
1420
|
|
|
@@ -1394,6 +1458,7 @@ declare class Item implements Cloneable {
|
|
|
1394
1458
|
private _accounting_value;
|
|
1395
1459
|
private _taxes;
|
|
1396
1460
|
private _import_declaration;
|
|
1461
|
+
private _conversion_factor;
|
|
1397
1462
|
private _imported;
|
|
1398
1463
|
get id(): string;
|
|
1399
1464
|
set id(value: string);
|
|
@@ -1471,6 +1536,8 @@ declare class Item implements Cloneable {
|
|
|
1471
1536
|
set taxes(value: Tax[]);
|
|
1472
1537
|
get import_declaration(): ImportDeclaration;
|
|
1473
1538
|
set import_declaration(value: ImportDeclaration);
|
|
1539
|
+
get conversion_factor(): ConversionFactor;
|
|
1540
|
+
set conversion_factor(value: ConversionFactor);
|
|
1474
1541
|
getWithholdingTaxes(): Tax[];
|
|
1475
1542
|
getNonWithholdingTaxes(): Tax[];
|
|
1476
1543
|
getTaxByCategory(category: TaxTypeEnum, withhold: boolean): Tax | null;
|
|
@@ -1858,6 +1925,7 @@ declare class BuilderItem {
|
|
|
1858
1925
|
withAccountingValue(accounting_value: number): BuilderItem;
|
|
1859
1926
|
withTaxes(taxes: Tax[]): BuilderItem;
|
|
1860
1927
|
withImportDeclaration(import_declaration: ImportDeclaration): BuilderItem;
|
|
1928
|
+
withConversionFactor(conversion_factor: ConversionFactor): BuilderItem;
|
|
1861
1929
|
withImported(value: boolean): BuilderItem;
|
|
1862
1930
|
}
|
|
1863
1931
|
|
|
@@ -1913,6 +1981,19 @@ declare class BuilderTax {
|
|
|
1913
1981
|
withInterstateIcmsTaxRate(interstate_icms_tax_rate: number): BuilderTax;
|
|
1914
1982
|
withIcmsValueOriginUf(icms_value_origin_uf: number): BuilderTax;
|
|
1915
1983
|
withDifalIcmsCategory(difal_icms_category: DifalIcmsCategoryEnum): BuilderTax;
|
|
1984
|
+
withDonationIndicator(donation_indicator: DonationIndicatorEnum): BuilderTax;
|
|
1985
|
+
withTaxClassificationCode(tax_classification_code: string): BuilderTax;
|
|
1986
|
+
withZfmPresumedCreditType(zfm_presumed_credit_type: ZfmPresumedCreditTypeEnum): BuilderTax;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
declare class BuilderConversionFactor {
|
|
1990
|
+
private instance;
|
|
1991
|
+
constructor();
|
|
1992
|
+
newInstance(): BuilderConversionFactor;
|
|
1993
|
+
build(): ConversionFactor;
|
|
1994
|
+
withUnit(unit: string): BuilderConversionFactor;
|
|
1995
|
+
withMultiply(multiply: number): BuilderConversionFactor;
|
|
1996
|
+
withBarcode(barcode: string): BuilderConversionFactor;
|
|
1916
1997
|
}
|
|
1917
1998
|
|
|
1918
1999
|
declare enum DescriptionStatusEnum {
|
|
@@ -2109,6 +2190,7 @@ interface IItemMongo {
|
|
|
2109
2190
|
third_party_value: number;
|
|
2110
2191
|
taxes: ITaxMongo[];
|
|
2111
2192
|
import_declaration: IImportDeclaration;
|
|
2193
|
+
conversion_factor: IConversionFactor;
|
|
2112
2194
|
imported: boolean;
|
|
2113
2195
|
accounting_value: number;
|
|
2114
2196
|
}
|
|
@@ -2169,6 +2251,11 @@ interface IAddition {
|
|
|
2169
2251
|
import_discount_amount: number;
|
|
2170
2252
|
drawback_concession_number: string;
|
|
2171
2253
|
}
|
|
2254
|
+
interface IConversionFactor {
|
|
2255
|
+
unit: string;
|
|
2256
|
+
multiply: number;
|
|
2257
|
+
barcode: string;
|
|
2258
|
+
}
|
|
2172
2259
|
|
|
2173
2260
|
declare class MongoToDocumentBuilder {
|
|
2174
2261
|
private instance;
|
|
@@ -2178,6 +2265,7 @@ declare class MongoToDocumentBuilder {
|
|
|
2178
2265
|
private buildTax;
|
|
2179
2266
|
private buildAddition;
|
|
2180
2267
|
private buildImportDeclaration;
|
|
2268
|
+
private buildConversionFactor;
|
|
2181
2269
|
private items;
|
|
2182
2270
|
constructor();
|
|
2183
2271
|
newInstance(): MongoToDocumentBuilder;
|
|
@@ -2188,10 +2276,34 @@ declare class MongoToDocumentBuilder {
|
|
|
2188
2276
|
withTax(tax: ITaxMongo): Tax;
|
|
2189
2277
|
withImportDeclaration(item: IItemMongo): ImportDeclaration;
|
|
2190
2278
|
withAddition(addition: IAddition): Addition;
|
|
2279
|
+
withConversionFactor(item: IItemMongo): ConversionFactor;
|
|
2191
2280
|
}
|
|
2192
2281
|
|
|
2193
2282
|
declare function buildMongoFilter(filters: FiltersDocument): any;
|
|
2194
2283
|
|
|
2284
|
+
declare class PostgresConfig {
|
|
2285
|
+
host: string;
|
|
2286
|
+
port: number;
|
|
2287
|
+
database: string;
|
|
2288
|
+
user?: string;
|
|
2289
|
+
password?: string;
|
|
2290
|
+
private readonly _poolConfig;
|
|
2291
|
+
/**
|
|
2292
|
+
* PostgreSQL configuration class.
|
|
2293
|
+
* @param host - The host of the PostgreSQL server.
|
|
2294
|
+
* @param port - The port of the PostgreSQL server.
|
|
2295
|
+
* @param database - The name of the database to connect to.
|
|
2296
|
+
* @param user - Username for authentication.
|
|
2297
|
+
* @param password - Password for authentication.
|
|
2298
|
+
* @param max - Maximum number of clients in the pool (default: 20).
|
|
2299
|
+
* @param idleTimeoutMillis - How long a client is allowed to remain idle before being closed (default: 10000).
|
|
2300
|
+
* @param connectionTimeoutMillis - How long to wait for a client from the pool (default: 10000).
|
|
2301
|
+
*/
|
|
2302
|
+
constructor(host: string, port: number, database: string, user?: string, password?: string);
|
|
2303
|
+
getPoolConfig(): PoolConfig;
|
|
2304
|
+
getConnectionString(): string;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2195
2307
|
interface IBaseHeadersDTO {
|
|
2196
2308
|
created_at: Date;
|
|
2197
2309
|
updated_at: Date;
|
|
@@ -2522,6 +2634,7 @@ type TaxRegimes = Record<string, {
|
|
|
2522
2634
|
}>;
|
|
2523
2635
|
interface ICalculationBasisNatureSetting {
|
|
2524
2636
|
_id: string;
|
|
2637
|
+
active: true;
|
|
2525
2638
|
name: string;
|
|
2526
2639
|
tenantid: string;
|
|
2527
2640
|
profiles: {
|
|
@@ -2600,7 +2713,7 @@ declare class CalculationBasisNatureSetting {
|
|
|
2600
2713
|
id: string;
|
|
2601
2714
|
alias: string;
|
|
2602
2715
|
}[];
|
|
2603
|
-
protected
|
|
2716
|
+
protected _active: boolean;
|
|
2604
2717
|
protected _tax_settings: TaxRegimes;
|
|
2605
2718
|
protected _logs?: {
|
|
2606
2719
|
type: 'create' | 'enable' | 'disable' | 'update';
|
|
@@ -2614,7 +2727,7 @@ declare class CalculationBasisNatureSetting {
|
|
|
2614
2727
|
id: string;
|
|
2615
2728
|
alias: string;
|
|
2616
2729
|
}[]);
|
|
2617
|
-
set
|
|
2730
|
+
set active(active: boolean);
|
|
2618
2731
|
set tax_settings(tax_settings: TaxRegimes);
|
|
2619
2732
|
set logs(logs: {
|
|
2620
2733
|
type: 'create' | 'enable' | 'disable' | 'update';
|
|
@@ -2622,7 +2735,7 @@ declare class CalculationBasisNatureSetting {
|
|
|
2622
2735
|
username: string;
|
|
2623
2736
|
useremail: string;
|
|
2624
2737
|
}[] | undefined);
|
|
2625
|
-
get
|
|
2738
|
+
get active(): boolean;
|
|
2626
2739
|
get id(): string;
|
|
2627
2740
|
get tenantid(): string;
|
|
2628
2741
|
get profiles(): {
|
|
@@ -2688,51 +2801,74 @@ declare class EfdContribSpecializedProfile {
|
|
|
2688
2801
|
get calculationBasisNature(): CalculationBasisNatureSetting[];
|
|
2689
2802
|
}
|
|
2690
2803
|
|
|
2691
|
-
declare enum
|
|
2692
|
-
'Outros débitos' = 0,
|
|
2693
|
-
'Estorno de créditos' = 1,
|
|
2694
|
-
'Outros créditos' = 2,
|
|
2695
|
-
'Estorno de débitos' = 3,
|
|
2696
|
-
'Deduções do imposto apurado' = 4,
|
|
2697
|
-
'Débitos Especiais' = 5
|
|
2698
|
-
|
|
2699
|
-
|
|
2804
|
+
declare enum IcmsAdjustmentGroupEnum {
|
|
2805
|
+
'Outros débitos' = "0",
|
|
2806
|
+
'Estorno de créditos' = "1",
|
|
2807
|
+
'Outros créditos' = "2",
|
|
2808
|
+
'Estorno de débitos' = "3",
|
|
2809
|
+
'Deduções do imposto apurado' = "4",
|
|
2810
|
+
'Débitos Especiais' = "5",
|
|
2811
|
+
NOT_APPLICABLE = ""
|
|
2812
|
+
}
|
|
2813
|
+
declare enum IcmsAdjustmentTaxTypeEnum {
|
|
2700
2814
|
ICMS = "ICMS",
|
|
2701
|
-
IPI = "IPI",
|
|
2702
2815
|
ICMS_ST = "ICMS-ST",
|
|
2703
|
-
RET = "RET"
|
|
2816
|
+
RET = "RET",
|
|
2817
|
+
NOT_APPLICABLE = ""
|
|
2704
2818
|
}
|
|
2705
|
-
declare enum
|
|
2819
|
+
declare enum IcmsAdjustmentRegistryEnum {
|
|
2706
2820
|
C197 = "C197",
|
|
2707
|
-
D197 = "D197"
|
|
2821
|
+
D197 = "D197",
|
|
2822
|
+
E111 = "E111",
|
|
2823
|
+
E115 = "E115",
|
|
2824
|
+
E220 = "E220",
|
|
2825
|
+
NOT_APPLICABLE = ""
|
|
2708
2826
|
}
|
|
2709
|
-
declare enum
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2827
|
+
declare enum IcmsCalculationIndicatorEnum {
|
|
2828
|
+
APURACAO_SEPARADA_GRUPO_1 = 3,
|
|
2829
|
+
APURACAO_SEPARADA_GRUPO_2 = 4,
|
|
2830
|
+
APURACAO_SEPARADA_GRUPO_3 = 5,
|
|
2831
|
+
APURACAO_SEPARADA_GRUPO_4 = 6,
|
|
2832
|
+
APURACAO_SEPARADA_GRUPO_5 = 7,
|
|
2833
|
+
APURACAO_SEPARADA_GRUPO_6 = 8,
|
|
2834
|
+
NOT_APPLICABLE = 0
|
|
2716
2835
|
}
|
|
2717
|
-
|
|
2718
|
-
|
|
2836
|
+
declare enum IcmsAdjustmentTypeEnum {
|
|
2837
|
+
CREDITO_IMOBILIZADO_CIAP = "0",
|
|
2838
|
+
DIFAL_COMPRA_CONSUMO_IMOBILIZADO = "1",
|
|
2839
|
+
DIFAL = "2",
|
|
2840
|
+
ADJUDICACAO_CREDITO_DIFAL = "3",
|
|
2841
|
+
NOT_APPLICABLE = ""
|
|
2842
|
+
}
|
|
2843
|
+
interface IIcmsAdjustmentExtraInfo {
|
|
2844
|
+
item_code: string;
|
|
2845
|
+
cfop: string;
|
|
2846
|
+
cfop_description: string;
|
|
2847
|
+
cst: string;
|
|
2848
|
+
rate: number;
|
|
2849
|
+
ncm: string;
|
|
2850
|
+
icms_taxpayer: boolean;
|
|
2851
|
+
difal_double_base: boolean;
|
|
2852
|
+
}
|
|
2853
|
+
interface IIcmsAdjustmentSetting {
|
|
2854
|
+
_id: string;
|
|
2855
|
+
active: boolean;
|
|
2719
2856
|
tenantid: string;
|
|
2720
2857
|
profile_id: string;
|
|
2721
2858
|
establishment_id: string;
|
|
2722
|
-
|
|
2723
|
-
|
|
2859
|
+
tax_type: IcmsAdjustmentTaxTypeEnum;
|
|
2860
|
+
adjustment_type: IcmsAdjustmentTypeEnum;
|
|
2861
|
+
initial_date: string;
|
|
2862
|
+
final_date: string;
|
|
2724
2863
|
description: string;
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
icms_taxpayer?: boolean;
|
|
2734
|
-
records: FiscalRecordTypes[];
|
|
2735
|
-
icmsApurationIndicator?: keyof typeof IcmsApurationIndicator;
|
|
2864
|
+
group: IcmsAdjustmentGroupEnum;
|
|
2865
|
+
sefaz_adjustment_code: string;
|
|
2866
|
+
additional_info: string;
|
|
2867
|
+
icms_calculation_indicator: IcmsCalculationIndicatorEnum;
|
|
2868
|
+
registry: IcmsAdjustmentRegistryEnum;
|
|
2869
|
+
generate_e113: boolean;
|
|
2870
|
+
generate_sub_calculation?: boolean;
|
|
2871
|
+
infos: IIcmsAdjustmentExtraInfo[];
|
|
2736
2872
|
}
|
|
2737
2873
|
|
|
2738
2874
|
declare enum ProfileTaxTypeEnum {
|
|
@@ -2835,7 +2971,7 @@ interface IIcmsCreditConfigLog {
|
|
|
2835
2971
|
interface IJudicialProcess {
|
|
2836
2972
|
number: string;
|
|
2837
2973
|
origin: JudicialProcessOriginEnum;
|
|
2838
|
-
description:
|
|
2974
|
+
description: string;
|
|
2839
2975
|
}
|
|
2840
2976
|
interface ITaxTypeConfigLog {
|
|
2841
2977
|
action_type: ActionTypeEnum;
|
|
@@ -2958,7 +3094,7 @@ declare class EfdIcmsIpiSpecializedProfile {
|
|
|
2958
3094
|
protected _id: string;
|
|
2959
3095
|
protected _created_at: Date;
|
|
2960
3096
|
protected _updated_at: Date;
|
|
2961
|
-
protected
|
|
3097
|
+
protected _icmsAdjustmentSetting: IcmsAdjustmentSetting[];
|
|
2962
3098
|
set branch_id(branch_id: string);
|
|
2963
3099
|
set profile_id(profile_id: string);
|
|
2964
3100
|
set profile_alias(profile_alias: string);
|
|
@@ -2973,13 +3109,13 @@ declare class EfdIcmsIpiSpecializedProfile {
|
|
|
2973
3109
|
set tax_type_config(tax_type_config: ITaxTypeConfig[]);
|
|
2974
3110
|
set has_blockH(has_blockH: 'true' | 'false');
|
|
2975
3111
|
set blockH_movement_indicator(blockH_movement_indicator: '0' | '1');
|
|
2976
|
-
set icms_credit_config(icms_credit_config: IIcmsCreditBaseConfig
|
|
3112
|
+
set icms_credit_config(icms_credit_config: IIcmsCreditBaseConfig);
|
|
2977
3113
|
set tenantid(tenantid: string);
|
|
2978
3114
|
set id(id: string);
|
|
2979
3115
|
set created_at(created_at: Date);
|
|
2980
3116
|
set updated_at(updated_at: Date);
|
|
2981
3117
|
set gia_st_layout_version(gia_st_layout_version: string);
|
|
2982
|
-
set
|
|
3118
|
+
set icmsAdjustmentSetting(icmsAdjustmentSetting: IcmsAdjustmentSetting[]);
|
|
2983
3119
|
get branch_id(): string;
|
|
2984
3120
|
get profile_id(): string;
|
|
2985
3121
|
get profile_alias(): string;
|
|
@@ -2994,69 +3130,69 @@ declare class EfdIcmsIpiSpecializedProfile {
|
|
|
2994
3130
|
get tax_type_config(): ITaxTypeConfig[];
|
|
2995
3131
|
get has_blockH(): 'true' | 'false';
|
|
2996
3132
|
get blockH_movement_indicator(): '0' | '1';
|
|
2997
|
-
get icms_credit_config(): IIcmsCreditBaseConfig
|
|
3133
|
+
get icms_credit_config(): IIcmsCreditBaseConfig;
|
|
2998
3134
|
get tenantid(): string;
|
|
2999
3135
|
get id(): string;
|
|
3000
3136
|
get created_at(): Date;
|
|
3001
3137
|
get updated_at(): Date;
|
|
3002
3138
|
get gia_st_layout_version(): string;
|
|
3003
|
-
get
|
|
3139
|
+
get icmsAdjustmentSetting(): IcmsAdjustmentSetting[];
|
|
3004
3140
|
}
|
|
3005
|
-
declare class
|
|
3141
|
+
declare class IcmsAdjustmentSetting {
|
|
3006
3142
|
protected _id: string;
|
|
3143
|
+
protected _active: boolean;
|
|
3007
3144
|
protected _tenantid: string;
|
|
3008
3145
|
protected _profile_id: string;
|
|
3009
3146
|
protected _establishment_id: string;
|
|
3010
|
-
protected
|
|
3011
|
-
protected
|
|
3147
|
+
protected _tax_type: IcmsAdjustmentTaxTypeEnum;
|
|
3148
|
+
protected _adjustment_type: IcmsAdjustmentTypeEnum;
|
|
3149
|
+
protected _initial_date: string;
|
|
3150
|
+
protected _final_date: string;
|
|
3012
3151
|
protected _description: string;
|
|
3013
|
-
protected
|
|
3014
|
-
protected
|
|
3015
|
-
protected
|
|
3016
|
-
protected
|
|
3017
|
-
protected
|
|
3018
|
-
protected
|
|
3019
|
-
protected
|
|
3020
|
-
protected
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
protected _icmsApurationIndicator?: keyof typeof IcmsApurationIndicator;
|
|
3024
|
-
set id(id: string);
|
|
3152
|
+
protected _group: IcmsAdjustmentGroupEnum;
|
|
3153
|
+
protected _sefaz_adjustment_code: string;
|
|
3154
|
+
protected _additional_info: string;
|
|
3155
|
+
protected _icms_calculation_indicator: IcmsCalculationIndicatorEnum;
|
|
3156
|
+
protected _registry: IcmsAdjustmentRegistryEnum;
|
|
3157
|
+
protected _generate_e113: boolean;
|
|
3158
|
+
protected _generate_sub_calculation: boolean;
|
|
3159
|
+
protected _infos: IIcmsAdjustmentExtraInfo[];
|
|
3160
|
+
set id(_id: string);
|
|
3161
|
+
set active(value: boolean);
|
|
3025
3162
|
set tenantid(tenantid: string);
|
|
3026
3163
|
set profile_id(profile_id: string);
|
|
3027
3164
|
set establishment_id(establishment_id: string);
|
|
3028
|
-
set
|
|
3029
|
-
set
|
|
3030
|
-
set
|
|
3031
|
-
set
|
|
3032
|
-
set
|
|
3033
|
-
set
|
|
3034
|
-
set
|
|
3035
|
-
set
|
|
3036
|
-
set
|
|
3037
|
-
set
|
|
3038
|
-
set
|
|
3039
|
-
set
|
|
3040
|
-
set
|
|
3041
|
-
set icmsApurationIndicator(icmsApurationIndicator: keyof typeof IcmsApurationIndicator | undefined);
|
|
3165
|
+
set tax_type(value: IcmsAdjustmentTaxTypeEnum);
|
|
3166
|
+
set adjustment_type(value: IcmsAdjustmentTypeEnum);
|
|
3167
|
+
set initial_date(value: string);
|
|
3168
|
+
set final_date(value: string);
|
|
3169
|
+
set description(value: string);
|
|
3170
|
+
set group(value: IcmsAdjustmentGroupEnum);
|
|
3171
|
+
set sefaz_adjustment_code(value: string);
|
|
3172
|
+
set additional_info(value: string);
|
|
3173
|
+
set icms_calculation_indicator(value: IcmsCalculationIndicatorEnum);
|
|
3174
|
+
set registry(value: IcmsAdjustmentRegistryEnum);
|
|
3175
|
+
set generate_e113(value: boolean);
|
|
3176
|
+
set generate_sub_calculation(value: boolean);
|
|
3177
|
+
set infos(value: IIcmsAdjustmentExtraInfo[]);
|
|
3042
3178
|
get id(): string;
|
|
3179
|
+
get active(): boolean;
|
|
3043
3180
|
get tenantid(): string;
|
|
3044
3181
|
get profile_id(): string;
|
|
3045
3182
|
get establishment_id(): string;
|
|
3046
|
-
get
|
|
3047
|
-
get
|
|
3183
|
+
get tax_type(): IcmsAdjustmentTaxTypeEnum;
|
|
3184
|
+
get adjustment_type(): IcmsAdjustmentTypeEnum;
|
|
3185
|
+
get initial_date(): string;
|
|
3186
|
+
get final_date(): string;
|
|
3048
3187
|
get description(): string;
|
|
3049
|
-
get
|
|
3050
|
-
get
|
|
3051
|
-
get
|
|
3052
|
-
get
|
|
3053
|
-
get
|
|
3054
|
-
get
|
|
3055
|
-
get
|
|
3056
|
-
get
|
|
3057
|
-
get icms_taxpayer(): boolean | undefined;
|
|
3058
|
-
get records(): FiscalRecordTypes[];
|
|
3059
|
-
get icmsApurationIndicator(): keyof typeof IcmsApurationIndicator | undefined;
|
|
3188
|
+
get group(): IcmsAdjustmentGroupEnum;
|
|
3189
|
+
get sefaz_adjustment_code(): string;
|
|
3190
|
+
get additional_info(): string;
|
|
3191
|
+
get icms_calculation_indicator(): IcmsCalculationIndicatorEnum;
|
|
3192
|
+
get registry(): IcmsAdjustmentRegistryEnum;
|
|
3193
|
+
get generate_e113(): boolean;
|
|
3194
|
+
get generate_sub_calculation(): boolean;
|
|
3195
|
+
get infos(): IIcmsAdjustmentExtraInfo[];
|
|
3060
3196
|
}
|
|
3061
3197
|
|
|
3062
3198
|
declare class CNPJ implements IdentificationNumber {
|
|
@@ -3218,6 +3354,8 @@ declare class Signatory {
|
|
|
3218
3354
|
get personType(): string;
|
|
3219
3355
|
get phone(): string | undefined;
|
|
3220
3356
|
get email(): string | undefined;
|
|
3357
|
+
get district(): string | undefined;
|
|
3358
|
+
get number(): string | undefined;
|
|
3221
3359
|
get countyCode(): string | undefined;
|
|
3222
3360
|
get fiscalOfficeIdNumber(): string | undefined;
|
|
3223
3361
|
get complement(): string | undefined;
|
|
@@ -3759,6 +3897,42 @@ interface IEcfSpecializedProfile {
|
|
|
3759
3897
|
tenantid: string;
|
|
3760
3898
|
}
|
|
3761
3899
|
|
|
3900
|
+
interface ProfileDbRepositoryConfig {
|
|
3901
|
+
taxServiceDb: PostgresConfig;
|
|
3902
|
+
efdContribDb?: MongoConfig;
|
|
3903
|
+
efdIcmsIpiDb?: MongoConfig;
|
|
3904
|
+
reinfDb?: PostgresConfig;
|
|
3905
|
+
ecfDb?: PostgresConfig;
|
|
3906
|
+
ecdDb?: MongoConfig;
|
|
3907
|
+
}
|
|
3908
|
+
|
|
3909
|
+
declare class ProfileDbRepository implements IProfileRepository {
|
|
3910
|
+
private readonly _connections;
|
|
3911
|
+
private readonly _mongoClients;
|
|
3912
|
+
private readonly _pgPools;
|
|
3913
|
+
constructor(config: ProfileDbRepositoryConfig);
|
|
3914
|
+
getProfileById(profile_id: string, tenantid: string, period?: string): Promise<Profile>;
|
|
3915
|
+
getEstablishments(profile_id: string, tenantid: string): Promise<Establishment[]>;
|
|
3916
|
+
private fetchProfile;
|
|
3917
|
+
private fetchEstablishments;
|
|
3918
|
+
private fetchReinf;
|
|
3919
|
+
private fetchEcd;
|
|
3920
|
+
private fetchEcf;
|
|
3921
|
+
private fetchEfdContrib;
|
|
3922
|
+
private fetchEfdIcmsIpi;
|
|
3923
|
+
private getEstablishmentsFromPostgres;
|
|
3924
|
+
private mapDataToProfile;
|
|
3925
|
+
private mapDataToEstablishments;
|
|
3926
|
+
private mapDataToSignatories;
|
|
3927
|
+
private mapDataToScps;
|
|
3928
|
+
private mapDataToEvents;
|
|
3929
|
+
private mapDataToReinf;
|
|
3930
|
+
private mapDataToEcd;
|
|
3931
|
+
private mapDataToEcf;
|
|
3932
|
+
private mapDataToEfdContrib;
|
|
3933
|
+
private mapDataToEfdIcmsIpi;
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3762
3936
|
declare class CPF implements IdentificationNumber {
|
|
3763
3937
|
private readonly _value;
|
|
3764
3938
|
constructor(cpf: string);
|
|
@@ -4149,4 +4323,4 @@ declare function logWithContext<T extends MessageCodeType>(messageCode: T, param
|
|
|
4149
4323
|
actionSuggestion: string;
|
|
4150
4324
|
};
|
|
4151
4325
|
|
|
4152
|
-
export { ActionTypeEnum, Addition, Address, type AllowedCfopsCreditConfig, Alphanumeric, type AuditTaxCollectionDetails, type AuditTaxCollectionInfo, type AuthTokenExpiredParams, type AuthUnauthorizedParams, Block, BuilderAddition, BuilderAddress, BuilderDocument, BuilderImportDeclaration, BuilderItem, BuilderPerson, BuilderTax, CNPJ, CPF, CST, CalculationBasisNatureSetting, type Cloneable, CloseBlock, CloseFile, CodIncTrib, type Cod_ent_ref, CodeStatusEnum, ConfigTypeEnum, ConsoleOutput, CounterBlock, CounterRegister, CountryCodeEnum, CprbOption, CteTypeEnum, DEFAULT_LOCALE, type DatabaseConnectionFailedParams, type DatabaseQueryErrorParams, Decimal, DefaultAlphanumericLength, DefaultDecimalLength, DefaultDecimalSeparator, DescriptionStatusEnum, DifalIcmsCategoryEnum, Document, type DocumentRepository, DocumentTypeEnum, EcdSpecializedProfile, EcfSpecializedProfile, EfdContribSpecializedProfile, EfdIcmsIpiSpecializedProfile, Email, EnforceabilityOfISSEnum, Establishment, EstablishmentEvent, Event, EventEnum, FieldDataType, type FieldFormat, type FiltersDocument, FiscalQualificationType,
|
|
4326
|
+
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, ConversionFactor, CounterBlock, CounterRegister, CountryCodeEnum, CprbOption, 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 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, Municipality, NameCountryEnum, NatureCode, NatureConfig, Numeric, ObligationCodeEnum, OnDuplication, OnDuplicationStrategy, OpenBlock, OperationTypeEnum, OurDate, type OutputWriter, type ParameterTypes, PaymentTypeEnum, Person, PostgresConfig, 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, State, StateEnum, StateRegistrationIndicatorEnum, StatusDocumentEnum, StringArrayOutput, TagCounter, Tax, type TaxCollectionDetails, TaxCollectionType, TaxRegimeEnum, type TaxRegimes, type TaxRegisterGenerationOptions, TaxRegisterGenerator, TaxReport, TaxTypeEnum, TaxationType, Uf, type ValidationInvalidInputParams, type ValidationMissingFieldParams, ValueProviderType, ZfmPresumedCreditTypeEnum, buildMongoFilter, calculate_bases_values, formatMessage, keyCompositionMetadata, logWithContext, newRegisterEventData, normalizeServiceCode, onDuplicationStrategyMetadata, parseState };
|