@nomalism-com/types 0.40.50 → 0.40.52
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
CHANGED
|
@@ -1828,10 +1828,12 @@ var valueByVatTaxKeys2 = {
|
|
|
1828
1828
|
total: joi17.number().positive().required()
|
|
1829
1829
|
};
|
|
1830
1830
|
var createProviderServiceInvoiceBodyKeys = {
|
|
1831
|
-
provider_id: joi17.string().uuid().
|
|
1832
|
-
|
|
1831
|
+
provider_id: joi17.string().uuid().optional(),
|
|
1832
|
+
nif: joi17.string().optional(),
|
|
1833
1833
|
external_document_name: joi17.string().required(),
|
|
1834
1834
|
account_code: joi17.string().allow(null, "").empty("").optional(),
|
|
1835
|
+
auto_pay: joi17.boolean().default(false).optional(),
|
|
1836
|
+
emission_date: joi17.date().required(),
|
|
1835
1837
|
observations: joi17.string().allow(null, "").required(),
|
|
1836
1838
|
values: joi17.array().unique("taxPercentage").items(joi17.object().keys(valueByVatTaxKeys2).required()).required()
|
|
1837
1839
|
};
|
package/dist/index.js
CHANGED
|
@@ -1828,10 +1828,12 @@ var valueByVatTaxKeys2 = {
|
|
|
1828
1828
|
total: joi17.number().positive().required()
|
|
1829
1829
|
};
|
|
1830
1830
|
var createProviderServiceInvoiceBodyKeys = {
|
|
1831
|
-
provider_id: joi17.string().uuid().
|
|
1832
|
-
|
|
1831
|
+
provider_id: joi17.string().uuid().optional(),
|
|
1832
|
+
nif: joi17.string().optional(),
|
|
1833
1833
|
external_document_name: joi17.string().required(),
|
|
1834
1834
|
account_code: joi17.string().allow(null, "").empty("").optional(),
|
|
1835
|
+
auto_pay: joi17.boolean().default(false).optional(),
|
|
1836
|
+
emission_date: joi17.date().required(),
|
|
1835
1837
|
observations: joi17.string().allow(null, "").required(),
|
|
1836
1838
|
values: joi17.array().unique("taxPercentage").items(joi17.object().keys(valueByVatTaxKeys2).required()).required()
|
|
1837
1839
|
};
|
|
@@ -4,9 +4,11 @@ export interface IValueByVatTax {
|
|
|
4
4
|
total: number;
|
|
5
5
|
}
|
|
6
6
|
export interface ICreateProviderServiceInvoiceRequest {
|
|
7
|
-
provider_id
|
|
7
|
+
provider_id?: string;
|
|
8
|
+
nif?: string;
|
|
8
9
|
external_document_name: string;
|
|
9
10
|
account_code?: string | null;
|
|
11
|
+
auto_pay?: boolean;
|
|
10
12
|
emission_date: Date;
|
|
11
13
|
observations: string;
|
|
12
14
|
values: IValueByVatTax[];
|
|
@@ -81,11 +81,17 @@ export interface ISyncResponse {
|
|
|
81
81
|
provider_tax: number;
|
|
82
82
|
lines: ISyncLines[];
|
|
83
83
|
}
|
|
84
|
+
export interface IFindPurchasedOrdersSummaryResponse {
|
|
85
|
+
y: number;
|
|
86
|
+
m: number;
|
|
87
|
+
v: number;
|
|
88
|
+
}
|
|
84
89
|
export interface IRepository {
|
|
85
90
|
findUnpaidMaterialEntrance(selector: IShared.IFindByIdRequest): Promise<IUnpaidMaterialEntranceResponse>;
|
|
86
91
|
findUnpaidMaterialEntranceProviders(): Promise<IShared.IFindMinifiedResponse[]>;
|
|
87
92
|
purchaseFromProvider(data: IPurchaseFromProviderRequest): Promise<void>;
|
|
88
93
|
sync(data: ISyncRequest): Promise<ISyncResponse>;
|
|
94
|
+
findPurchasedOrdersSummary(params: IShared.IFindByOwnerIdRequest): Promise<IFindPurchasedOrdersSummaryResponse[]>;
|
|
89
95
|
}
|
|
90
96
|
export type IApi = IRepository;
|
|
91
97
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
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.52",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"joi": "^18.0.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@swc/core": "^1.15.
|
|
32
|
+
"@swc/core": "^1.15.5",
|
|
33
33
|
"@types/node": "^24.10.4",
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
35
|
-
"@typescript-eslint/parser": "^8.
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
|
35
|
+
"@typescript-eslint/parser": "^8.50.0",
|
|
36
36
|
"eslint": "^9.39.2",
|
|
37
37
|
"eslint-config-prettier": "^10.1.8",
|
|
38
38
|
"eslint-import-resolver-typescript": "^4.4.4",
|