@nomalism-com/types 0.45.66 → 0.46.1
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.cjs +255 -221
- package/dist/index.js +255 -221
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +4 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +5 -4
- package/dist/modules/supply/documentLine/interfaces.d.ts +2 -0
- package/dist/modules/supply/documentType/interfaces.d.ts +12 -0
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +1 -3
- package/dist/modules/user/providers/interface.d.ts +1 -1
- package/dist/modules/user/reasonForExemption/interface.d.ts +9 -0
- package/dist/modules/user/tenant/interface.d.ts +2 -0
- package/dist/shared/entities/stock.d.ts +6 -0
- package/dist/shared/entities/user.d.ts +3 -42
- package/package.json +4 -4
|
@@ -42,6 +42,7 @@ export interface ICreateRequest {
|
|
|
42
42
|
type_of_inventory?: string;
|
|
43
43
|
external_id?: string;
|
|
44
44
|
vat_tax_id?: string;
|
|
45
|
+
reason_for_exemption?: string | null;
|
|
45
46
|
weight?: number | null;
|
|
46
47
|
width?: number | null;
|
|
47
48
|
height?: number | null;
|
|
@@ -68,6 +69,8 @@ export interface IUpdateRequest {
|
|
|
68
69
|
state?: IProductSheetState;
|
|
69
70
|
price_cost?: number;
|
|
70
71
|
price_sale?: number;
|
|
72
|
+
vat_tax?: string;
|
|
73
|
+
reason_for_exemption?: string | null;
|
|
71
74
|
}
|
|
72
75
|
export interface IFindProductSheetByReference {
|
|
73
76
|
selector: string;
|
|
@@ -139,6 +142,7 @@ export interface IEntityMinified {
|
|
|
139
142
|
price_sale: number;
|
|
140
143
|
price_cost: number;
|
|
141
144
|
tax: number;
|
|
145
|
+
reason_for_exemption: string | null;
|
|
142
146
|
multimedia_id: string | null;
|
|
143
147
|
integer_only: boolean;
|
|
144
148
|
total: number;
|
|
@@ -20,8 +20,8 @@ export interface ITaxTable {
|
|
|
20
20
|
export interface IRsaHashData {
|
|
21
21
|
invoiceDate: string;
|
|
22
22
|
systemEntryDate: string;
|
|
23
|
-
invoiceNo:
|
|
24
|
-
grossTotal:
|
|
23
|
+
invoiceNo: string;
|
|
24
|
+
grossTotal: string;
|
|
25
25
|
previousHash: string;
|
|
26
26
|
}
|
|
27
27
|
export interface IFindOneBase extends Entity {
|
|
@@ -54,7 +54,6 @@ export interface ICreateFromHeaderMaturityDate {
|
|
|
54
54
|
export interface ICreateRequest {
|
|
55
55
|
document_type_id: number;
|
|
56
56
|
external_id?: string | null;
|
|
57
|
-
document_set_id: string;
|
|
58
57
|
pdf_link?: string | null;
|
|
59
58
|
external_pdf_link?: string | null;
|
|
60
59
|
google_sheet_id?: string | null;
|
|
@@ -117,6 +116,8 @@ export interface IDeliveryAdresses {
|
|
|
117
116
|
}
|
|
118
117
|
export interface ICreateFromHeaderRequest {
|
|
119
118
|
document_type_id: number;
|
|
119
|
+
document_set_id?: string;
|
|
120
|
+
external_document_name?: string;
|
|
120
121
|
emission_date?: Date;
|
|
121
122
|
account_code?: string | null;
|
|
122
123
|
from_header: string[];
|
|
@@ -127,10 +128,10 @@ export interface ICreateFromHeaderRequest {
|
|
|
127
128
|
email?: string;
|
|
128
129
|
maturity_date?: ICreateFromHeaderMaturityDate;
|
|
129
130
|
return_reason?: string;
|
|
130
|
-
provider_ref?: string;
|
|
131
131
|
global_discount?: number;
|
|
132
132
|
current_account?: boolean;
|
|
133
133
|
store_operator_id?: string | null;
|
|
134
|
+
copy_from_document?: string | null;
|
|
134
135
|
owner_ref_document?: string | null;
|
|
135
136
|
}
|
|
136
137
|
export interface IUpdateRequest {
|
|
@@ -81,6 +81,7 @@ export interface ICreateRequest {
|
|
|
81
81
|
quantity: number;
|
|
82
82
|
preco_venda: number;
|
|
83
83
|
client_tax: number;
|
|
84
|
+
client_tax_reason_for_exemption?: string | null;
|
|
84
85
|
client_discount: number;
|
|
85
86
|
preco_custo: number;
|
|
86
87
|
provider_tax: number;
|
|
@@ -93,6 +94,7 @@ export interface IUpdateRequest {
|
|
|
93
94
|
quantity?: number;
|
|
94
95
|
preco_venda?: number;
|
|
95
96
|
client_tax?: number;
|
|
97
|
+
client_tax_reason_for_exemption?: string | null;
|
|
96
98
|
client_discount?: number;
|
|
97
99
|
preco_custo?: number;
|
|
98
100
|
provider_tax?: number;
|
|
@@ -54,6 +54,18 @@ export declare const DocumentTypeCodeTypeEnum: {
|
|
|
54
54
|
RDP: 'RDP';
|
|
55
55
|
NRCL: 'NRCL';
|
|
56
56
|
FPM: 'FPM';
|
|
57
|
+
FTM: 'FTM';
|
|
58
|
+
FTD: 'FTD';
|
|
59
|
+
FRM: 'FRM';
|
|
60
|
+
FRD: 'FRD';
|
|
61
|
+
FSM: 'FSM';
|
|
62
|
+
FSD: 'FSD';
|
|
63
|
+
NCM: 'NCM';
|
|
64
|
+
NCD: 'NCD';
|
|
65
|
+
ADM: 'ADM';
|
|
66
|
+
ADD: 'ADD';
|
|
67
|
+
NCADM: 'NCADM';
|
|
68
|
+
NCADD: 'NCADD';
|
|
57
69
|
FTO: 'FTO';
|
|
58
70
|
FRO: 'FRO';
|
|
59
71
|
REO: 'REO';
|
|
@@ -2,14 +2,12 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { ExternalDocumentHeader } from '../../../shared/entities/stock';
|
|
3
3
|
export type Entity = ExternalDocumentHeader;
|
|
4
4
|
export declare const Route = "external_document_header";
|
|
5
|
-
export declare const UpperName = "ExternalDocumentHeader";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface IFindByOwnerIdItem {
|
|
8
6
|
external_document_header_id: string | null;
|
|
9
7
|
document_header_id: string;
|
|
10
8
|
label: string;
|
|
11
9
|
emission_date: Date;
|
|
12
|
-
|
|
10
|
+
certified: boolean;
|
|
13
11
|
pdf_link: string | null;
|
|
14
12
|
is_void: boolean;
|
|
15
13
|
created_by: string;
|
|
@@ -69,7 +69,7 @@ export interface IUpdateRequest {
|
|
|
69
69
|
export interface IFindByNumberRequest {
|
|
70
70
|
number: number;
|
|
71
71
|
}
|
|
72
|
-
export interface IFindByNumberResponse extends Pick<DocumentHeader, 'owner_id' | 'owner_name' | 'billing_persona_id' | 'billing_persona_name' | 'billing_persona_nif' | 'billing_persona_email' | 'billing_persona_telephone' | 'billing_persona_address_street' | 'billing_persona_address_postal_code' | 'billing_persona_address_locality' | 'billing_persona_address_country_id' | 'billing_persona_address_country_name' | 'reason_for_exemption_id' | 'reason_for_exemption' | 'delivery_persona_id' | 'delivery_persona_name' | 'delivery_persona_email' | 'delivery_persona_telephone' | 'delivery_persona_address_street' | 'delivery_persona_address_postal_code' | 'delivery_persona_address_locality' | 'delivery_persona_address_country_id' | 'delivery_persona_address_country_name' | 'delivery_method_id' | 'delivery_method' | 'vehicle_id' | 'vehicle' | 'payment_method_id' | 'payment_method' | 'maturity_date_id' | 'maturity_date'> {
|
|
72
|
+
export interface IFindByNumberResponse extends Pick<DocumentHeader, 'owner_id' | 'owner_name' | 'billing_persona_id' | 'billing_persona_name' | 'billing_persona_nif' | 'billing_persona_email' | 'billing_persona_telephone' | 'billing_persona_address_street' | 'billing_persona_address_postal_code' | 'billing_persona_address_locality' | 'billing_persona_address_country_id' | 'billing_persona_address_country_name' | 'reason_for_exemption_id' | 'reason_for_exemption' | 'delivery_persona_id' | 'delivery_persona_name' | 'delivery_persona_email' | 'delivery_persona_telephone' | 'delivery_persona_address_street' | 'delivery_persona_address_postal_code' | 'delivery_persona_address_locality' | 'delivery_persona_address_country_id' | 'delivery_persona_address_country_name' | 'delivery_method_id' | 'delivery_method' | 'vehicle_id' | 'vehicle' | 'payment_method_id' | 'payment_method' | 'maturity_date_id' | 'maturity_date' | 'maturity_date_days'> {
|
|
73
73
|
default_discount: number;
|
|
74
74
|
}
|
|
75
75
|
export interface IRepository {
|
|
@@ -2,6 +2,13 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { ReasonForExemption } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = ReasonForExemption;
|
|
4
4
|
export declare const Route = "reason_for_exemption";
|
|
5
|
+
export declare const ReasonForExemptionTypeEnum: {
|
|
6
|
+
product: 'product';
|
|
7
|
+
client: 'client';
|
|
8
|
+
tenant: 'tenant';
|
|
9
|
+
};
|
|
10
|
+
export type IReasonForExemptionType = (typeof ReasonForExemptionTypeEnum)[keyof typeof ReasonForExemptionTypeEnum];
|
|
11
|
+
export declare const reasonForExemptionTypes: string[];
|
|
5
12
|
type IFindDetailedResponse = Entity;
|
|
6
13
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
7
14
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -11,12 +18,14 @@ export interface IFindPaginatedRequest extends IFindRequest, IShared.IPagination
|
|
|
11
18
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
12
19
|
export interface ICreateRequest {
|
|
13
20
|
name: string;
|
|
21
|
+
type: IReasonForExemptionType;
|
|
14
22
|
description: string;
|
|
15
23
|
saft_code: string;
|
|
16
24
|
external_id: string;
|
|
17
25
|
}
|
|
18
26
|
export interface IUpdateRequest {
|
|
19
27
|
name?: string;
|
|
28
|
+
type?: IReasonForExemptionType;
|
|
20
29
|
description?: string;
|
|
21
30
|
saft_code?: string;
|
|
22
31
|
external_id?: string;
|
|
@@ -19,6 +19,7 @@ export interface ICreateRequest {
|
|
|
19
19
|
telephone?: string | null;
|
|
20
20
|
fax?: string | null;
|
|
21
21
|
website?: string | null;
|
|
22
|
+
vat_tax_zone_saft_code: string;
|
|
22
23
|
}
|
|
23
24
|
export interface IUpdateRequest {
|
|
24
25
|
name?: string;
|
|
@@ -37,6 +38,7 @@ export interface IUpdateRequest {
|
|
|
37
38
|
telephone?: string | null;
|
|
38
39
|
fax?: string | null;
|
|
39
40
|
website?: string | null;
|
|
41
|
+
vat_tax_zone_saft_code?: string;
|
|
40
42
|
}
|
|
41
43
|
export interface IRepository {
|
|
42
44
|
find(): Promise<Entity[]>;
|
|
@@ -276,6 +276,9 @@ export type DocumentHeader = {
|
|
|
276
276
|
pdf_link: string | null;
|
|
277
277
|
google_sheet_id: string | null;
|
|
278
278
|
emission_date: Date;
|
|
279
|
+
source_billing: string;
|
|
280
|
+
hash_control: string | null;
|
|
281
|
+
copy_from_document: string | null;
|
|
279
282
|
chat_document_header_id: string;
|
|
280
283
|
external_pdf_link: string | null;
|
|
281
284
|
external_data: unknown;
|
|
@@ -397,6 +400,7 @@ export type DocumentLine = {
|
|
|
397
400
|
provider_tax: number;
|
|
398
401
|
preco_venda: number;
|
|
399
402
|
client_tax: number;
|
|
403
|
+
client_tax_reason_for_exemption: string | null;
|
|
400
404
|
client_discount: number;
|
|
401
405
|
provider_estimated_delivery_date: Date | null;
|
|
402
406
|
sent_to_client: boolean;
|
|
@@ -459,6 +463,7 @@ export type DocumentSet = {
|
|
|
459
463
|
name: string;
|
|
460
464
|
document_set_id: number | null;
|
|
461
465
|
active_by_default: boolean;
|
|
466
|
+
include_in_saft: boolean;
|
|
462
467
|
created_at: Date;
|
|
463
468
|
updated_at: Date;
|
|
464
469
|
created_by: string;
|
|
@@ -679,6 +684,7 @@ export type ProductSheet = {
|
|
|
679
684
|
values: unknown;
|
|
680
685
|
imported_from_sheets: boolean;
|
|
681
686
|
vat_tax_id: string;
|
|
687
|
+
reason_for_exemption: string | null;
|
|
682
688
|
unit_of_measure_quantity_id: string;
|
|
683
689
|
cabide_product_color: string | null;
|
|
684
690
|
weight: number | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IPaymentMethodsSaftCodeEnum } from '../../modules/user/paymentMethods/interfaces';
|
|
2
|
+
import type { IReasonForExemptionType } from '../../modules/user/reasonForExemption/interface';
|
|
2
3
|
import type { SystemModuleEnum } from '../../modules/user/systemModule/interface';
|
|
3
4
|
import { IClockType, IRegistryType, ITimesheetState } from '../../modules/user/timeSheet/interfaces';
|
|
4
5
|
/**
|
|
@@ -39,48 +40,6 @@ export type Favorites = {
|
|
|
39
40
|
created_at: Date;
|
|
40
41
|
updated_at: Date;
|
|
41
42
|
};
|
|
42
|
-
/**
|
|
43
|
-
* Model Permissions
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
export type Permissions = {
|
|
47
|
-
id: number;
|
|
48
|
-
code: string;
|
|
49
|
-
description: string;
|
|
50
|
-
enable: boolean;
|
|
51
|
-
created_at: Date;
|
|
52
|
-
updated_at: Date;
|
|
53
|
-
created_by: string;
|
|
54
|
-
updated_by: string;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Model GroupPermissions
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
export type GroupPermissions = {
|
|
61
|
-
id: number;
|
|
62
|
-
code: string;
|
|
63
|
-
description: string;
|
|
64
|
-
enable: boolean;
|
|
65
|
-
created_at: Date;
|
|
66
|
-
updated_at: Date;
|
|
67
|
-
created_by: string;
|
|
68
|
-
updated_by: string;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Model UserPermissions
|
|
72
|
-
*
|
|
73
|
-
*/
|
|
74
|
-
export type UserPermissions = {
|
|
75
|
-
id: number;
|
|
76
|
-
user_id: string;
|
|
77
|
-
group_id: number;
|
|
78
|
-
permission_id: number;
|
|
79
|
-
created_at: Date;
|
|
80
|
-
updated_at: Date;
|
|
81
|
-
created_by: string;
|
|
82
|
-
updated_by: string;
|
|
83
|
-
};
|
|
84
43
|
/**
|
|
85
44
|
* Model Providers
|
|
86
45
|
*
|
|
@@ -306,6 +265,7 @@ export type Swift = {
|
|
|
306
265
|
*/
|
|
307
266
|
export type ReasonForExemption = {
|
|
308
267
|
id: string;
|
|
268
|
+
type: IReasonForExemptionType;
|
|
309
269
|
name: string;
|
|
310
270
|
description: string;
|
|
311
271
|
saft_code: string;
|
|
@@ -450,6 +410,7 @@ export type Tenant = {
|
|
|
450
410
|
telephone: string | null;
|
|
451
411
|
fax: string | null;
|
|
452
412
|
website: string | null;
|
|
413
|
+
vat_tax_zone_saft_code: string;
|
|
453
414
|
created_at: Date;
|
|
454
415
|
updated_at: Date;
|
|
455
416
|
created_by: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.46.1",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"joi": "^18.2.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@swc/core": "^1.15.
|
|
33
|
-
"@types/node": "^24.13.
|
|
32
|
+
"@swc/core": "^1.15.41",
|
|
33
|
+
"@types/node": "^24.13.2",
|
|
34
34
|
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
|
35
35
|
"@typescript-eslint/parser": "^8.61.0",
|
|
36
36
|
"eslint": "^9.39.4",
|
|
37
37
|
"eslint-config-prettier": "^10.1.8",
|
|
38
38
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
39
39
|
"eslint-plugin-prettier": "^5.5.6",
|
|
40
|
-
"prettier": "^3.8.
|
|
40
|
+
"prettier": "^3.8.4",
|
|
41
41
|
"tsup": "^8.5.1"
|
|
42
42
|
},
|
|
43
43
|
"repository": {
|