@nomalism-com/types 0.40.39 → 0.40.40
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 +7 -7
- package/dist/index.js +7 -7
- package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +0 -1
- package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +0 -1
- package/dist/modules/integration/projectInfo/interfaces.d.ts +5 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +0 -1
- package/dist/modules/user/providers/interface.d.ts +0 -3
- package/dist/shared/entities/integration.d.ts +3 -1
- package/dist/shared/entities/stock.d.ts +0 -1
- package/dist/shared/entities/user.d.ts +0 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1528,8 +1528,7 @@ var createFromHeaderBodyKeys = {
|
|
|
1528
1528
|
provider_ref: joi10.string().optional(),
|
|
1529
1529
|
global_discount: joi10.number().min(0).max(100).optional(),
|
|
1530
1530
|
current_account: joi10.boolean().optional(),
|
|
1531
|
-
store_operator_id: joi10.string().uuid().allow(null).optional()
|
|
1532
|
-
account_code: joi10.number().integer().positive().max(999999999).allow(null).optional()
|
|
1531
|
+
store_operator_id: joi10.string().uuid().allow(null).optional()
|
|
1533
1532
|
};
|
|
1534
1533
|
var createFromHeaderBody = joi10.object().keys(createFromHeaderBodyKeys).messages(messages);
|
|
1535
1534
|
var findQueryKeys6 = {
|
|
@@ -1804,7 +1803,6 @@ var valueByVatTaxKeys = {
|
|
|
1804
1803
|
var createProviderFinancialCreditNoteBodyKeys = {
|
|
1805
1804
|
emission_date: joi16.date().required(),
|
|
1806
1805
|
external_document_name: joi16.string().required(),
|
|
1807
|
-
account_code: joi16.number().integer().positive().max(999999999).allow(null).optional(),
|
|
1808
1806
|
provider_id: joi16.string().uuid().required(),
|
|
1809
1807
|
parent_document_header_id: joi16.string().uuid().optional().allow(null, ""),
|
|
1810
1808
|
observations: joi16.string().allow(null, "").required(),
|
|
@@ -1829,7 +1827,6 @@ var createProviderServiceInvoiceBodyKeys = {
|
|
|
1829
1827
|
provider_id: joi17.string().uuid().required(),
|
|
1830
1828
|
emission_date: joi17.date().required(),
|
|
1831
1829
|
external_document_name: joi17.string().required(),
|
|
1832
|
-
account_code: joi17.number().integer().positive().max(999999999).allow(null).optional(),
|
|
1833
1830
|
observations: joi17.string().allow(null, "").required(),
|
|
1834
1831
|
values: joi17.array().unique("taxPercentage").items(joi17.object().keys(valueByVatTaxKeys2).required()).required()
|
|
1835
1832
|
};
|
|
@@ -2814,7 +2811,6 @@ var createBodyKeys28 = {
|
|
|
2814
2811
|
inactive: joi40.boolean().default(false).optional(),
|
|
2815
2812
|
default_discount: joi40.number().positive().allow(0).default(0).max(100).optional(),
|
|
2816
2813
|
exemption_reason_id: joi40.string().uuid().allow(null).optional(),
|
|
2817
|
-
default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
|
|
2818
2814
|
main_persona: joi40.object().keys(createMainPersonaKeys3).required(),
|
|
2819
2815
|
provider_type_id: joi40.string().uuid().allow(null).optional(),
|
|
2820
2816
|
country_id: joi40.string().uuid().allow(null).optional(),
|
|
@@ -2832,8 +2828,6 @@ var updateBodyKeys24 = {
|
|
|
2832
2828
|
manufacturer: joi40.boolean().optional(),
|
|
2833
2829
|
inactive: joi40.boolean().optional(),
|
|
2834
2830
|
default_discount: joi40.number().positive().allow(0).max(100).optional(),
|
|
2835
|
-
exemption_reason_id: joi40.string().uuid().allow(null).optional(),
|
|
2836
|
-
default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
|
|
2837
2831
|
provider_type_id: joi40.string().uuid().allow(null).optional(),
|
|
2838
2832
|
country_id: joi40.string().uuid().allow(null).optional(),
|
|
2839
2833
|
language_id: joi40.string().uuid().allow(null).optional(),
|
|
@@ -4442,6 +4436,12 @@ var senEmailBodyKeys = {
|
|
|
4442
4436
|
description: joi80.string().required(),
|
|
4443
4437
|
telephone: joi80.string().required(),
|
|
4444
4438
|
type: joi80.string().valid("particular", "professional", "company"),
|
|
4439
|
+
budget_options: joi80.object().keys({
|
|
4440
|
+
retificacao: joi80.boolean().required(),
|
|
4441
|
+
retificacao_aconselhamento: joi80.boolean().required(),
|
|
4442
|
+
montagem: joi80.boolean().required()
|
|
4443
|
+
}),
|
|
4444
|
+
address: joi80.string().required(),
|
|
4445
4445
|
email: joi80.string().trim(true).lowercase().email({ tlds: { allow: false } })
|
|
4446
4446
|
};
|
|
4447
4447
|
var sendEmailBody = joi80.object().keys(senEmailBodyKeys).messages(messages);
|
package/dist/index.js
CHANGED
|
@@ -1528,8 +1528,7 @@ var createFromHeaderBodyKeys = {
|
|
|
1528
1528
|
provider_ref: joi10.string().optional(),
|
|
1529
1529
|
global_discount: joi10.number().min(0).max(100).optional(),
|
|
1530
1530
|
current_account: joi10.boolean().optional(),
|
|
1531
|
-
store_operator_id: joi10.string().uuid().allow(null).optional()
|
|
1532
|
-
account_code: joi10.number().integer().positive().max(999999999).allow(null).optional()
|
|
1531
|
+
store_operator_id: joi10.string().uuid().allow(null).optional()
|
|
1533
1532
|
};
|
|
1534
1533
|
var createFromHeaderBody = joi10.object().keys(createFromHeaderBodyKeys).messages(messages);
|
|
1535
1534
|
var findQueryKeys6 = {
|
|
@@ -1804,7 +1803,6 @@ var valueByVatTaxKeys = {
|
|
|
1804
1803
|
var createProviderFinancialCreditNoteBodyKeys = {
|
|
1805
1804
|
emission_date: joi16.date().required(),
|
|
1806
1805
|
external_document_name: joi16.string().required(),
|
|
1807
|
-
account_code: joi16.number().integer().positive().max(999999999).allow(null).optional(),
|
|
1808
1806
|
provider_id: joi16.string().uuid().required(),
|
|
1809
1807
|
parent_document_header_id: joi16.string().uuid().optional().allow(null, ""),
|
|
1810
1808
|
observations: joi16.string().allow(null, "").required(),
|
|
@@ -1829,7 +1827,6 @@ var createProviderServiceInvoiceBodyKeys = {
|
|
|
1829
1827
|
provider_id: joi17.string().uuid().required(),
|
|
1830
1828
|
emission_date: joi17.date().required(),
|
|
1831
1829
|
external_document_name: joi17.string().required(),
|
|
1832
|
-
account_code: joi17.number().integer().positive().max(999999999).allow(null).optional(),
|
|
1833
1830
|
observations: joi17.string().allow(null, "").required(),
|
|
1834
1831
|
values: joi17.array().unique("taxPercentage").items(joi17.object().keys(valueByVatTaxKeys2).required()).required()
|
|
1835
1832
|
};
|
|
@@ -2814,7 +2811,6 @@ var createBodyKeys28 = {
|
|
|
2814
2811
|
inactive: joi40.boolean().default(false).optional(),
|
|
2815
2812
|
default_discount: joi40.number().positive().allow(0).default(0).max(100).optional(),
|
|
2816
2813
|
exemption_reason_id: joi40.string().uuid().allow(null).optional(),
|
|
2817
|
-
default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
|
|
2818
2814
|
main_persona: joi40.object().keys(createMainPersonaKeys3).required(),
|
|
2819
2815
|
provider_type_id: joi40.string().uuid().allow(null).optional(),
|
|
2820
2816
|
country_id: joi40.string().uuid().allow(null).optional(),
|
|
@@ -2832,8 +2828,6 @@ var updateBodyKeys24 = {
|
|
|
2832
2828
|
manufacturer: joi40.boolean().optional(),
|
|
2833
2829
|
inactive: joi40.boolean().optional(),
|
|
2834
2830
|
default_discount: joi40.number().positive().allow(0).max(100).optional(),
|
|
2835
|
-
exemption_reason_id: joi40.string().uuid().allow(null).optional(),
|
|
2836
|
-
default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
|
|
2837
2831
|
provider_type_id: joi40.string().uuid().allow(null).optional(),
|
|
2838
2832
|
country_id: joi40.string().uuid().allow(null).optional(),
|
|
2839
2833
|
language_id: joi40.string().uuid().allow(null).optional(),
|
|
@@ -4442,6 +4436,12 @@ var senEmailBodyKeys = {
|
|
|
4442
4436
|
description: joi80.string().required(),
|
|
4443
4437
|
telephone: joi80.string().required(),
|
|
4444
4438
|
type: joi80.string().valid("particular", "professional", "company"),
|
|
4439
|
+
budget_options: joi80.object().keys({
|
|
4440
|
+
retificacao: joi80.boolean().required(),
|
|
4441
|
+
retificacao_aconselhamento: joi80.boolean().required(),
|
|
4442
|
+
montagem: joi80.boolean().required()
|
|
4443
|
+
}),
|
|
4444
|
+
address: joi80.string().required(),
|
|
4445
4445
|
email: joi80.string().trim(true).lowercase().email({ tlds: { allow: false } })
|
|
4446
4446
|
};
|
|
4447
4447
|
var sendEmailBody = joi80.object().keys(senEmailBodyKeys).messages(messages);
|
|
@@ -16,7 +16,6 @@ export interface ICreateProviderFinancialCreditNoteRequest {
|
|
|
16
16
|
external_document_name: string;
|
|
17
17
|
provider_id: string;
|
|
18
18
|
parent_document_header_id: string | null;
|
|
19
|
-
account_code: number | null;
|
|
20
19
|
emission_date: Date;
|
|
21
20
|
observations: string;
|
|
22
21
|
values: IValueByVatTax[];
|
|
@@ -8,6 +8,11 @@ export declare const IProjectInfoTypeEnum: {
|
|
|
8
8
|
professional: 'professional';
|
|
9
9
|
company: 'company';
|
|
10
10
|
};
|
|
11
|
+
export type IBudgetOptionsType = {
|
|
12
|
+
retificacao: boolean;
|
|
13
|
+
retificacao_aconselhamento: boolean;
|
|
14
|
+
montagem: boolean;
|
|
15
|
+
};
|
|
11
16
|
export type IProjectInfoType = (typeof IProjectInfoTypeEnum)[keyof typeof IProjectInfoTypeEnum];
|
|
12
17
|
export declare const projectInfoTypes: string[];
|
|
13
18
|
export type ISendEmail = Omit<Entity, 'created_at' | 'updated_at' | 'document_header_id' | 'id' | 'email_log'>;
|
|
@@ -117,7 +117,6 @@ export interface IDeliveryAdresses {
|
|
|
117
117
|
export interface ICreateFromHeaderRequest {
|
|
118
118
|
document_type_id: number;
|
|
119
119
|
emission_date?: Date;
|
|
120
|
-
account_code?: number | null;
|
|
121
120
|
from_header: string[];
|
|
122
121
|
from_lines: string[];
|
|
123
122
|
payments: (IPayment.ICreateRequest | IPayment.ICreateForThisDocumentHeaderRequest)[];
|
|
@@ -40,7 +40,6 @@ export interface ICreateRequest {
|
|
|
40
40
|
inactive?: boolean;
|
|
41
41
|
default_discount?: number;
|
|
42
42
|
exemption_reason_id?: string | null;
|
|
43
|
-
default_account_code?: number | null;
|
|
44
43
|
main_persona: ICreateMainPersona;
|
|
45
44
|
provider_type_id?: string | null;
|
|
46
45
|
country_id?: string | null;
|
|
@@ -67,8 +66,6 @@ export interface IUpdateRequest {
|
|
|
67
66
|
default_maturity_date_id?: string;
|
|
68
67
|
default_delivery_method_id?: string;
|
|
69
68
|
default_vehicle_id?: string | null;
|
|
70
|
-
exemption_reason_id?: string | null;
|
|
71
|
-
default_account_code?: number | null;
|
|
72
69
|
}
|
|
73
70
|
export interface IFindByNumberRequest {
|
|
74
71
|
number: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IProjectInfoType } from '../../modules/integration/projectInfo/interfaces';
|
|
1
|
+
import { IProjectInfoType, IBudgetOptionsType } from '../../modules/integration/projectInfo/interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* Model Observation
|
|
4
4
|
*
|
|
@@ -59,6 +59,8 @@ export type ProjectInfo = {
|
|
|
59
59
|
name: string;
|
|
60
60
|
email: string;
|
|
61
61
|
telephone: string;
|
|
62
|
+
address: string;
|
|
63
|
+
budget_options: IBudgetOptionsType;
|
|
62
64
|
description: string;
|
|
63
65
|
document_header_id: string;
|
|
64
66
|
email_log: string;
|
|
@@ -269,7 +269,6 @@ export type DocumentHeader = {
|
|
|
269
269
|
owner_id: string;
|
|
270
270
|
owner_number: number;
|
|
271
271
|
owner_name: string | null;
|
|
272
|
-
account_code: number | null;
|
|
273
272
|
billing_persona_id: string | null;
|
|
274
273
|
billing_persona_nif: string | null;
|
|
275
274
|
billing_persona_name: string | null;
|
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.40.
|
|
4
|
+
"version": "0.40.40",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@swc/core": "^1.15.3",
|
|
33
|
-
"@types/node": "^24.10.
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
35
|
-
"@typescript-eslint/parser": "^8.
|
|
33
|
+
"@types/node": "^24.10.1",
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^8.48.1",
|
|
35
|
+
"@typescript-eslint/parser": "^8.48.1",
|
|
36
36
|
"eslint": "^9.39.1",
|
|
37
37
|
"eslint-config-prettier": "^10.1.8",
|
|
38
38
|
"eslint-import-resolver-typescript": "^4.4.4",
|