@nomalism-com/types 0.9.483 → 0.9.485

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.
@@ -168,6 +168,7 @@ export interface ICreateInventoryRequest {
168
168
  plot_id: string | null;
169
169
  registered_quantity: number;
170
170
  inventory_quantity: number;
171
+ new_plot_id: string;
171
172
  }
172
173
  export interface IRepository {
173
174
  findById(id: string): Promise<Entity | null>;
@@ -91,6 +91,7 @@ var createInventoryRequestKeys = {
91
91
  plot_id: joi_1.default.string().uuid().allow(null).required(),
92
92
  registered_quantity: joi_1.default.number().positive().allow(0).optional(),
93
93
  inventory_quantity: joi_1.default.number().positive().allow(0).required(),
94
+ new_plot_id: joi_1.default.string().uuid().required(),
94
95
  };
95
96
  exports.createInventoryRequest = joi_1.default
96
97
  .object()
@@ -57,11 +57,15 @@ export interface IBasicSearchRequest extends IShared.IPaginationRequest {
57
57
  search_value: string | null;
58
58
  inactive?: boolean;
59
59
  }
60
+ export interface IBasicSearchResponse extends Pick<Entity, 'id' | 'origin_id' | 'code'> {
61
+ reference: string;
62
+ product_counter: number;
63
+ }
60
64
  export interface IRepository {
61
65
  create(data: ICreateRequest): Promise<Entity>;
62
66
  find(data: IFindRequest): Promise<IFindResponse[]>;
63
67
  findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
64
- findByBasicSearch(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IFindResponse>>;
68
+ findByBasicSearch(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
65
69
  findCabideProviders(search_value: IShared.IFindMinifiedRequest): Promise<IFindCabideProvidersResponse[]>;
66
70
  findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
67
71
  findByIdProvider(selector: IFindByIdProviderRequest): Promise<IFindByIdProviderResponse[]>;
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.483",
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.61.0",
43
- "@typescript-eslint/parser": "^5.61.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.485",
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.61.0",
43
+ "@typescript-eslint/parser": "^5.61.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
+ }