@nomalism-com/types 0.9.493 → 0.9.495
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { Attribute, Product, ProductName, UnitOfMeasure, ProductSubCategory, ProductCategory, TypeOfInventory, ProductImage, VatTax, VatTaxZone, ProductVirtuals, ProductPromotionVirtuals, CabideProduct } from '../../../shared/entities';
|
|
2
|
+
import { Attribute, Product, ProductName, UnitOfMeasure, ProductSubCategory, ProductCategory, TypeOfInventory, ProductImage, VatTax, VatTaxZone, ProductVirtuals, ProductPromotionVirtuals, CabideProduct, Cabide } from '../../../shared/entities';
|
|
3
3
|
import * as IProductAttribute from '../productAttribute/interface';
|
|
4
4
|
import * as IPlot from '../plot/interface';
|
|
5
5
|
import * as IProductPart from '../productPart/interface';
|
|
@@ -31,6 +31,9 @@ export interface IEntityExtended extends IFindDetailedResponse {
|
|
|
31
31
|
product_parts: IProductPart.IFindByRefProduct[];
|
|
32
32
|
plots: IPlot.IFindDetailedResponse[];
|
|
33
33
|
origin_cabide_product: CabideProduct | null;
|
|
34
|
+
cabide_product: (CabideProduct & {
|
|
35
|
+
cabide: Cabide;
|
|
36
|
+
}) | null;
|
|
34
37
|
}
|
|
35
38
|
export type IFindByIdResponse = Omit<IEntityExtended, ''>;
|
|
36
39
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -229,6 +229,7 @@ var findByIdBodyResponseKeys = {
|
|
|
229
229
|
cabide_product_id: joi_1.default.string().uuid().allow(null).required(),
|
|
230
230
|
origin_cabide_product_id: joi_1.default.string().uuid().allow(null).required(),
|
|
231
231
|
origin_cabide_product: joi_1.default.any(),
|
|
232
|
+
cabide_product: joi_1.default.any(),
|
|
232
233
|
};
|
|
233
234
|
exports.findByIdBodyResponse = joi_1.default
|
|
234
235
|
.object()
|
|
@@ -8,17 +8,12 @@ export declare const UpperName = "CabideProduct";
|
|
|
8
8
|
export declare const LowerName = "cabideProduct";
|
|
9
9
|
export interface ICreateRequest {
|
|
10
10
|
cabide_id: string;
|
|
11
|
-
unit_of_measure_weight_id: string;
|
|
12
11
|
vat_tax_id: string;
|
|
13
12
|
designation: string;
|
|
14
13
|
margin: number;
|
|
15
14
|
price_sale: number;
|
|
16
15
|
price_cost: number;
|
|
17
|
-
weight: number;
|
|
18
16
|
width: number;
|
|
19
|
-
length: number;
|
|
20
|
-
height: number;
|
|
21
|
-
diameter: number;
|
|
22
17
|
preco_final_1: number;
|
|
23
18
|
preco_final_2: number;
|
|
24
19
|
}
|
|
@@ -8,17 +8,12 @@ var joi_1 = __importDefault(require("joi"));
|
|
|
8
8
|
var messages_1 = require("../../../shared/messages");
|
|
9
9
|
var createBodyKeys = {
|
|
10
10
|
cabide_id: joi_1.default.string().uuid().required(),
|
|
11
|
-
unit_of_measure_weight_id: joi_1.default.string().uuid().required(),
|
|
12
11
|
vat_tax_id: joi_1.default.string().uuid().required(),
|
|
13
12
|
designation: joi_1.default.string().required(),
|
|
14
13
|
margin: joi_1.default.number().required(),
|
|
15
14
|
price_cost: joi_1.default.number().required(),
|
|
16
15
|
price_sale: joi_1.default.number().required(),
|
|
17
|
-
weight: joi_1.default.number().required(),
|
|
18
16
|
width: joi_1.default.number().required(),
|
|
19
|
-
length: joi_1.default.number().required(),
|
|
20
|
-
height: joi_1.default.number().required(),
|
|
21
|
-
diameter: joi_1.default.number().required(),
|
|
22
17
|
preco_final_1: joi_1.default.number().positive().required(),
|
|
23
18
|
preco_final_2: joi_1.default.number().positive().required(),
|
|
24
19
|
};
|
package/package.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nomalism-com/types",
|
|
3
|
-
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"nomalism",
|
|
7
|
-
"api",
|
|
8
|
-
"types",
|
|
9
|
-
"typescript",
|
|
10
|
-
"helper"
|
|
11
|
-
],
|
|
12
|
-
"version": "0.9.
|
|
13
|
-
"main": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"browserslist": "> 0.25%, not dead",
|
|
19
|
-
"license": "UNLICENSED",
|
|
20
|
-
"homepage": "https://gitlab.com/nomalism-develop/types",
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://gitlab.com/nomalism-develop/types/issues"
|
|
23
|
-
},
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "git+https://gitlab.com/nomalism-develop/types.git"
|
|
27
|
-
},
|
|
28
|
-
"scripts": {
|
|
29
|
-
"lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
|
|
30
|
-
"build": "rm -rf dist && tsc --project tsconfig.json",
|
|
31
|
-
"start": "tsx --tsconfig ./tsconfig.json src/index.ts",
|
|
32
|
-
"prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"convert-units": "^2.3.4",
|
|
36
|
-
"joi": "^17.9.2",
|
|
37
|
-
"joi-to-swagger": "^6.2.0"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/convert-units": "^2.3.6",
|
|
41
|
-
"@types/node": "^18.16.19",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
43
|
-
"@typescript-eslint/parser": "^5.62.0",
|
|
44
|
-
"concurrently": "^8.2.0",
|
|
45
|
-
"eslint": "^8.44.0",
|
|
46
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
47
|
-
"eslint-config-prettier": "^8.8.0",
|
|
48
|
-
"eslint-import-resolver-typescript": "^3.5.5",
|
|
49
|
-
"eslint-plugin-import": "^2.27.5",
|
|
50
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
51
|
-
"prettier": "^2.8.8",
|
|
52
|
-
"tsx": "^3.12.7",
|
|
53
|
-
"typescript": "^5.1.6"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@nomalism-com/types",
|
|
3
|
+
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
+
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"nomalism",
|
|
7
|
+
"api",
|
|
8
|
+
"types",
|
|
9
|
+
"typescript",
|
|
10
|
+
"helper"
|
|
11
|
+
],
|
|
12
|
+
"version": "0.9.495",
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"browserslist": "> 0.25%, not dead",
|
|
19
|
+
"license": "UNLICENSED",
|
|
20
|
+
"homepage": "https://gitlab.com/nomalism-develop/types",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://gitlab.com/nomalism-develop/types/issues"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://gitlab.com/nomalism-develop/types.git"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
|
|
30
|
+
"build": "rm -rf dist && tsc --project tsconfig.json",
|
|
31
|
+
"start": "tsx --tsconfig ./tsconfig.json src/index.ts",
|
|
32
|
+
"prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"convert-units": "^2.3.4",
|
|
36
|
+
"joi": "^17.9.2",
|
|
37
|
+
"joi-to-swagger": "^6.2.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/convert-units": "^2.3.6",
|
|
41
|
+
"@types/node": "^18.16.19",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
43
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
44
|
+
"concurrently": "^8.2.0",
|
|
45
|
+
"eslint": "^8.44.0",
|
|
46
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
47
|
+
"eslint-config-prettier": "^8.8.0",
|
|
48
|
+
"eslint-import-resolver-typescript": "^3.5.5",
|
|
49
|
+
"eslint-plugin-import": "^2.27.5",
|
|
50
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
51
|
+
"prettier": "^2.8.8",
|
|
52
|
+
"tsx": "^3.12.7",
|
|
53
|
+
"typescript": "^5.1.6"
|
|
54
|
+
}
|
|
55
|
+
}
|