law-common 12.6.3-beta.8 → 12.7.0
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/src/entities/index.d.ts +2 -0
- package/dist/src/entities/index.js +2 -0
- package/dist/src/entities/interface/entity.utils.interface.d.ts +0 -4
- package/dist/src/entities/interface/field-constraint/industry_field_constraints.interface.d.ts +13 -0
- package/dist/src/entities/interface/field-constraint/industry_field_constraints.interface.js +12 -0
- package/dist/src/entities/interface/field-constraint/task_field_constraints.interface.d.ts +8 -0
- package/dist/src/entities/interface/field-constraint/task_field_constraints.interface.js +12 -0
- package/dist/src/entities/interface/field-constraint/utils.d.ts +4 -0
- package/dist/src/entities/interface/field-constraint/utils.js +2 -0
- package/dist/src/entities/interface/industry.entity.interface.d.ts +1 -11
- package/dist/src/entities/interface/industry.entity.interface.js +0 -10
- package/dist/src/entities/interface/task.entity.interface.d.ts +1 -6
- package/dist/src/entities/interface/task.entity.interface.js +0 -10
- package/package.json +56 -56
|
@@ -272,3 +272,5 @@ export * from "./model/industry.entity.model";
|
|
|
272
272
|
export * from "./enums/task.action.enum";
|
|
273
273
|
export * from "./enums/task_status_enum";
|
|
274
274
|
export * from "./flow-configs/task_flow.config";
|
|
275
|
+
export * from "./interface/field-constraint/industry_field_constraints.interface";
|
|
276
|
+
export * from "./interface/field-constraint/task_field_constraints.interface";
|
|
@@ -289,3 +289,5 @@ __exportStar(require("./model/industry.entity.model"), exports);
|
|
|
289
289
|
__exportStar(require("./enums/task.action.enum"), exports);
|
|
290
290
|
__exportStar(require("./enums/task_status_enum"), exports);
|
|
291
291
|
__exportStar(require("./flow-configs/task_flow.config"), exports);
|
|
292
|
+
__exportStar(require("./interface/field-constraint/industry_field_constraints.interface"), exports);
|
|
293
|
+
__exportStar(require("./interface/field-constraint/task_field_constraints.interface"), exports);
|
|
@@ -458,7 +458,3 @@ export type IPremissionFilterConfig<T extends EntityEnum | VirtualEntityEnum> =
|
|
|
458
458
|
* @template T - The underlying value type.
|
|
459
459
|
*/
|
|
460
460
|
export type Nullable<T> = T | null;
|
|
461
|
-
export interface IFieldMinMaxConstraint {
|
|
462
|
-
min?: number;
|
|
463
|
-
max: number;
|
|
464
|
-
}
|
package/dist/src/entities/interface/field-constraint/industry_field_constraints.interface.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IEntityAuditColumn } from "../entity-audit-columns.interface";
|
|
2
|
+
import { IIndustryEntity } from "../industry.entity.interface";
|
|
3
|
+
import { IFieldMinMaxConstraint } from "./utils";
|
|
4
|
+
export type IIndustryFieldLengthConstraintsExclude = "status" | "id" | keyof IEntityAuditColumn;
|
|
5
|
+
/**
|
|
6
|
+
* since some fields are optional, but we still need their
|
|
7
|
+
* min & max length constraints, we need to make them required in this type
|
|
8
|
+
* hence we are using -? to make all properties required in this type
|
|
9
|
+
*/
|
|
10
|
+
export type IIndustryFieldMinMaxConstraints = {
|
|
11
|
+
[K in keyof Omit<IIndustryEntity, IIndustryFieldLengthConstraintsExclude>]-?: IFieldMinMaxConstraint;
|
|
12
|
+
};
|
|
13
|
+
export declare const industryFieldMinMaxConstraints: IIndustryFieldMinMaxConstraints;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IEntityAuditColumn } from "../entity-audit-columns.interface";
|
|
2
|
+
import { ITaskEntity } from "../task.entity.interface";
|
|
3
|
+
import { IFieldMinMaxConstraint } from "./utils";
|
|
4
|
+
export type ITaskFieldLengthConstraintsExclude = "status" | "type" | "id" | keyof IEntityAuditColumn;
|
|
5
|
+
export type ITaskFieldMinMaxConstraints = {
|
|
6
|
+
[K in keyof Omit<ITaskEntity, ITaskFieldLengthConstraintsExclude>]-?: IFieldMinMaxConstraint;
|
|
7
|
+
};
|
|
8
|
+
export declare const taskFieldMinMaxConstraints: ITaskFieldMinMaxConstraints;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IndustryStatusEnum } from "../enums/industry_status_enum";
|
|
2
2
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
|
-
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto,
|
|
3
|
+
import { IEntityCreateDto, IEntityFilterData, IEntityUpdateDto, Nullable } from "./entity.utils.interface";
|
|
4
4
|
export interface IIndustryEntity extends IEntityAuditColumn {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
@@ -13,13 +13,3 @@ export interface IIndustryEntityCreateDto extends Omit<IEntityCreateDto<IIndustr
|
|
|
13
13
|
export interface IIndustryEntityUpdateDto extends Omit<IEntityUpdateDto<IIndustryEntity>, IIndustryCreateDtoExculde> {
|
|
14
14
|
}
|
|
15
15
|
export type IIndustryEntityFilterData = IEntityFilterData<IIndustryEntity>;
|
|
16
|
-
export type IIndustryFieldLengthConstraintsExclude = "status" | "id" | keyof IEntityAuditColumn;
|
|
17
|
-
/**
|
|
18
|
-
* since description is options, but we still need its
|
|
19
|
-
* min & max length constraints, we need to make it required in this type
|
|
20
|
-
* hence we are using -? to make all properties required in this type
|
|
21
|
-
*/
|
|
22
|
-
export type IIndustryFieldMinMaxConstraints = {
|
|
23
|
-
[K in keyof Omit<IIndustryEntity, IIndustryFieldLengthConstraintsExclude>]-?: IFieldMinMaxConstraint;
|
|
24
|
-
};
|
|
25
|
-
export declare const industryFieldMinMaxConstraints: IIndustryFieldMinMaxConstraints;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TaskStatusEnum } from "../enums/task_status_enum";
|
|
2
2
|
import { TaskTypeEnum } from "../enums/task_type_enum";
|
|
3
3
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
|
-
import { IEntityFilterData
|
|
4
|
+
import { IEntityFilterData } from "./entity.utils.interface";
|
|
5
5
|
export interface ITaskEntity extends IEntityAuditColumn {
|
|
6
6
|
id: number;
|
|
7
7
|
name: string;
|
|
@@ -11,8 +11,3 @@ export interface ITaskEntity extends IEntityAuditColumn {
|
|
|
11
11
|
}
|
|
12
12
|
export interface ITaskEntityFilterDto extends IEntityFilterData<ITaskEntity> {
|
|
13
13
|
}
|
|
14
|
-
export type ITaskFieldLengthConstraintsExclude = "status" | "type" | "id" | keyof IEntityAuditColumn;
|
|
15
|
-
export type ITaskFieldMinMaxConstraints = {
|
|
16
|
-
[K in keyof Omit<ITaskEntity, ITaskFieldLengthConstraintsExclude>]-?: IFieldMinMaxConstraint;
|
|
17
|
-
};
|
|
18
|
-
export declare const taskFieldMinMaxConstraints: ITaskFieldMinMaxConstraints;
|
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "law-common",
|
|
3
|
-
"version": "12.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist/**/*"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"clean": "rm -rf dist",
|
|
11
|
-
"build": "npm run clean && tsc",
|
|
12
|
-
"publish:beta": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta",
|
|
13
|
-
"publish:beta:link": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta && npm run link",
|
|
14
|
-
"publish:patch": "npm version patch && git push && npm run build && npm publish",
|
|
15
|
-
"publish:minor": "npm version minor && git push && npm run build && npm publish",
|
|
16
|
-
"publish:major": "npm verYsion major && git push && npm run build && npm publish",
|
|
17
|
-
"link": "npm run build && npm link",
|
|
18
|
-
"link:backend": "npm run build && npm link && cd ../law-backend && npm link law-common && cd ../law-common",
|
|
19
|
-
"link:frontend": "npm run build && npm link && cd ../law-admin-web && npm link law-common && cd ../law-common",
|
|
20
|
-
"link:both": "npm run build && npm link && cd ../law-backend && npm link law-common && cd ../law-admin-web && npm link law-common && cd ../law-common",
|
|
21
|
-
"test": "jest",
|
|
22
|
-
"format": "prettier --write .",
|
|
23
|
-
"check-format": "prettier --check .",
|
|
24
|
-
"pull:link": "git pull && npm run link",
|
|
25
|
-
"check-version": "npm view law-common versions --json | jq -r '.[-1]'",
|
|
26
|
-
"script:publish": "node scripts/publish.js",
|
|
27
|
-
"script:publish:latest:beta": "npm run build && node scripts/publish.js prerelease beta && git push",
|
|
28
|
-
"script:publish:latest:patch": "npm run build && node scripts/publish.js patch && git push",
|
|
29
|
-
"script:nobuild:publish:latest:beta": "node scripts/publish.js prerelease beta && git push",
|
|
30
|
-
"install:version": "node scripts/install-version.js",
|
|
31
|
-
"script:publish:install:beta": "node scripts/publish-and-install.js prerelease beta",
|
|
32
|
-
"script:publish:install:patch": "node scripts/publish-and-install.js patch",
|
|
33
|
-
"script:publish:install:minor": "node scripts/publish-and-install.js minor",
|
|
34
|
-
"script:publish:install:major": "node scripts/publish-and-install.js major"
|
|
35
|
-
},
|
|
36
|
-
"keywords": [],
|
|
37
|
-
"author": "",
|
|
38
|
-
"license": "ISC",
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/jest": "^29.5.13",
|
|
41
|
-
"@types/lodash": "^4.17.21",
|
|
42
|
-
"@types/node": "^22.6.1",
|
|
43
|
-
"jest": "^29.7.0",
|
|
44
|
-
"prettier": "3.8.1",
|
|
45
|
-
"semver": "^7.8.1",
|
|
46
|
-
"ts-jest": "^29.2.5",
|
|
47
|
-
"ts-node": "^10.9.2",
|
|
48
|
-
"typescript": "^5.6.2"
|
|
49
|
-
},
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@types/express": "^5.0.0",
|
|
52
|
-
"@types/multer": "^1.4.12",
|
|
53
|
-
"date-fns": "^4.1.0",
|
|
54
|
-
"lodash": "4.17.21"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "law-common",
|
|
3
|
+
"version": "12.7.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/**/*"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"clean": "rm -rf dist",
|
|
11
|
+
"build": "npm run clean && tsc",
|
|
12
|
+
"publish:beta": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta",
|
|
13
|
+
"publish:beta:link": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta && npm run link",
|
|
14
|
+
"publish:patch": "npm version patch && git push && npm run build && npm publish",
|
|
15
|
+
"publish:minor": "npm version minor && git push && npm run build && npm publish",
|
|
16
|
+
"publish:major": "npm verYsion major && git push && npm run build && npm publish",
|
|
17
|
+
"link": "npm run build && npm link",
|
|
18
|
+
"link:backend": "npm run build && npm link && cd ../law-backend && npm link law-common && cd ../law-common",
|
|
19
|
+
"link:frontend": "npm run build && npm link && cd ../law-admin-web && npm link law-common && cd ../law-common",
|
|
20
|
+
"link:both": "npm run build && npm link && cd ../law-backend && npm link law-common && cd ../law-admin-web && npm link law-common && cd ../law-common",
|
|
21
|
+
"test": "jest",
|
|
22
|
+
"format": "prettier --write .",
|
|
23
|
+
"check-format": "prettier --check .",
|
|
24
|
+
"pull:link": "git pull && npm run link",
|
|
25
|
+
"check-version": "npm view law-common versions --json | jq -r '.[-1]'",
|
|
26
|
+
"script:publish": "node scripts/publish.js",
|
|
27
|
+
"script:publish:latest:beta": "npm run build && node scripts/publish.js prerelease beta && git push",
|
|
28
|
+
"script:publish:latest:patch": "npm run build && node scripts/publish.js patch && git push",
|
|
29
|
+
"script:nobuild:publish:latest:beta": "node scripts/publish.js prerelease beta && git push",
|
|
30
|
+
"install:version": "node scripts/install-version.js",
|
|
31
|
+
"script:publish:install:beta": "node scripts/publish-and-install.js prerelease beta",
|
|
32
|
+
"script:publish:install:patch": "node scripts/publish-and-install.js patch",
|
|
33
|
+
"script:publish:install:minor": "node scripts/publish-and-install.js minor",
|
|
34
|
+
"script:publish:install:major": "node scripts/publish-and-install.js major"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [],
|
|
37
|
+
"author": "",
|
|
38
|
+
"license": "ISC",
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/jest": "^29.5.13",
|
|
41
|
+
"@types/lodash": "^4.17.21",
|
|
42
|
+
"@types/node": "^22.6.1",
|
|
43
|
+
"jest": "^29.7.0",
|
|
44
|
+
"prettier": "3.8.1",
|
|
45
|
+
"semver": "^7.8.1",
|
|
46
|
+
"ts-jest": "^29.2.5",
|
|
47
|
+
"ts-node": "^10.9.2",
|
|
48
|
+
"typescript": "^5.6.2"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@types/express": "^5.0.0",
|
|
52
|
+
"@types/multer": "^1.4.12",
|
|
53
|
+
"date-fns": "^4.1.0",
|
|
54
|
+
"lodash": "4.17.21"
|
|
55
|
+
}
|
|
56
|
+
}
|