shared-dto 1.0.29 → 1.0.32
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/package.json +22 -22
- package/src/Apartment.dto.ts +46 -46
- package/src/Duty.dto.ts +74 -74
- package/src/Task.dto.ts +111 -111
- package/src/UserDTO.dto.ts +33 -33
- package/src/index.ts +3 -3
- package/tsconfig.json +37 -37
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "shared-dto",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"types": "dist/index.d.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "tsc",
|
|
8
|
-
"version-bump": "npm version patch",
|
|
9
|
-
"publish-lib": "npm publish --access public",
|
|
10
|
-
"update-frontend": "cd ../front_end && npm install shared-dto@latest",
|
|
11
|
-
"update-backend": "cd ../back_end && npm install shared-dto@latest",
|
|
12
|
-
"update-all": "npm run build && npm run version-bump && npm run publish-lib && npm run update-frontend && npm run update-backend"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"typescript": "^5.6.2"
|
|
16
|
-
},
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"class-transformer": "^0.5.1",
|
|
19
|
-
"class-validator": "^0.14.1",
|
|
20
|
-
"reflect-metadata": "^0.2.2"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "shared-dto",
|
|
3
|
+
"version": "1.0.32",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc",
|
|
8
|
+
"version-bump": "npm version patch",
|
|
9
|
+
"publish-lib": "npm publish --access public",
|
|
10
|
+
"update-frontend": "cd ../front_end && npm install shared-dto@latest",
|
|
11
|
+
"update-backend": "cd ../back_end && npm install shared-dto@latest",
|
|
12
|
+
"update-all": "npm run build && npm run version-bump && npm run publish-lib && npm run update-frontend && npm run update-backend"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"typescript": "^5.6.2"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"class-transformer": "^0.5.1",
|
|
19
|
+
"class-validator": "^0.14.1",
|
|
20
|
+
"reflect-metadata": "^0.2.2"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/Apartment.dto.ts
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { DutyType } from "./Duty.dto";
|
|
2
|
-
|
|
3
|
-
export class ApartmentDTO {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
city: string;
|
|
7
|
-
street: string;
|
|
8
|
-
number: string;
|
|
9
|
-
selectedWashing: string;
|
|
10
|
-
selectedBit: string;
|
|
11
|
-
fromDate: string | undefined |null;
|
|
12
|
-
toDate: string | undefined | null;
|
|
13
|
-
partnersNumber: string;
|
|
14
|
-
rent: string;
|
|
15
|
-
apartmentDuties?: ApartmentDutyDTO[];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class createApartmentDTO extends ApartmentDTO {
|
|
19
|
-
createDutyDTO?: createDutyDTO[] ;
|
|
20
|
-
}
|
|
21
|
-
export class createDutyDTO {
|
|
22
|
-
type: DutyType;
|
|
23
|
-
days: WeekDay[];
|
|
24
|
-
description?: string;
|
|
25
|
-
}
|
|
26
|
-
export class ApartmentDutyDTO {
|
|
27
|
-
id: string;
|
|
28
|
-
type: DutyType;
|
|
29
|
-
days: WeekDay[];
|
|
30
|
-
description?: string;
|
|
31
|
-
assignedUsers: string[];
|
|
32
|
-
apartmentId: string;
|
|
33
|
-
createdAt?: Date;
|
|
34
|
-
updatedAt?: Date;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export enum WeekDay {
|
|
39
|
-
SUNDAY = 'SUNDAY',
|
|
40
|
-
MONDAY = 'MONDAY',
|
|
41
|
-
TUESDAY = 'TUESDAY',
|
|
42
|
-
WEDNESDAY = 'WEDNESDAY',
|
|
43
|
-
THURSDAY = 'THURSDAY',
|
|
44
|
-
FRIDAY = 'FRIDAY',
|
|
45
|
-
SATURDAY = 'SATURDAY'
|
|
46
|
-
}
|
|
1
|
+
import { DutyType } from "./Duty.dto";
|
|
2
|
+
|
|
3
|
+
export class ApartmentDTO {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
city: string;
|
|
7
|
+
street: string;
|
|
8
|
+
number: string;
|
|
9
|
+
selectedWashing: string;
|
|
10
|
+
selectedBit: string;
|
|
11
|
+
fromDate: string | undefined |null;
|
|
12
|
+
toDate: string | undefined | null;
|
|
13
|
+
partnersNumber: string;
|
|
14
|
+
rent: string;
|
|
15
|
+
apartmentDuties?: ApartmentDutyDTO[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class createApartmentDTO extends ApartmentDTO {
|
|
19
|
+
createDutyDTO?: createDutyDTO[] ;
|
|
20
|
+
}
|
|
21
|
+
export class createDutyDTO {
|
|
22
|
+
type: DutyType;
|
|
23
|
+
days: WeekDay[];
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
26
|
+
export class ApartmentDutyDTO {
|
|
27
|
+
id: string;
|
|
28
|
+
type: DutyType;
|
|
29
|
+
days: WeekDay[];
|
|
30
|
+
description?: string;
|
|
31
|
+
assignedUsers: string[];
|
|
32
|
+
apartmentId: string;
|
|
33
|
+
createdAt?: Date;
|
|
34
|
+
updatedAt?: Date;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
export enum WeekDay {
|
|
39
|
+
SUNDAY = 'SUNDAY',
|
|
40
|
+
MONDAY = 'MONDAY',
|
|
41
|
+
TUESDAY = 'TUESDAY',
|
|
42
|
+
WEDNESDAY = 'WEDNESDAY',
|
|
43
|
+
THURSDAY = 'THURSDAY',
|
|
44
|
+
FRIDAY = 'FRIDAY',
|
|
45
|
+
SATURDAY = 'SATURDAY'
|
|
46
|
+
}
|
package/src/Duty.dto.ts
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { IsString ,IsNotEmpty ,IsEnum ,IsBoolean ,IsDate ,IsOptional} from "class-validator";
|
|
2
|
-
|
|
3
|
-
export enum DutyType {
|
|
4
|
-
CLEANING = 'CLEANING',
|
|
5
|
-
DISHES = 'DISHES',
|
|
6
|
-
SHOPPING = 'SHOPPING',
|
|
7
|
-
DOG_WALKING = 'DOG_WALKING',
|
|
8
|
-
OTHER = 'OTHER'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class CreateDutyDto {
|
|
12
|
-
@IsEnum(DutyType)
|
|
13
|
-
@IsNotEmpty()
|
|
14
|
-
type: DutyType;
|
|
15
|
-
|
|
16
|
-
@IsOptional()
|
|
17
|
-
@IsString()
|
|
18
|
-
description?: string;
|
|
19
|
-
|
|
20
|
-
@IsBoolean()
|
|
21
|
-
@IsOptional()
|
|
22
|
-
isDone?: boolean;
|
|
23
|
-
|
|
24
|
-
@IsString()
|
|
25
|
-
@IsNotEmpty()
|
|
26
|
-
userUid: string;
|
|
27
|
-
|
|
28
|
-
@IsString()
|
|
29
|
-
@IsNotEmpty()
|
|
30
|
-
apartmentId: string;
|
|
31
|
-
|
|
32
|
-
@IsDate()
|
|
33
|
-
@IsOptional()
|
|
34
|
-
dutyDate?: Date;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export class UpdateDutyDto extends CreateDutyDto {
|
|
38
|
-
@IsString()
|
|
39
|
-
@IsNotEmpty()
|
|
40
|
-
id: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export class DutyDTO {
|
|
44
|
-
@IsString()
|
|
45
|
-
@IsNotEmpty()
|
|
46
|
-
id: string;
|
|
47
|
-
|
|
48
|
-
@IsEnum(DutyType)
|
|
49
|
-
@IsNotEmpty()
|
|
50
|
-
type: DutyType;
|
|
51
|
-
|
|
52
|
-
@IsOptional()
|
|
53
|
-
@IsString()
|
|
54
|
-
description?: string;
|
|
55
|
-
|
|
56
|
-
@IsBoolean()
|
|
57
|
-
isDone: boolean;
|
|
58
|
-
|
|
59
|
-
@IsString()
|
|
60
|
-
@IsNotEmpty()
|
|
61
|
-
userId: string;
|
|
62
|
-
|
|
63
|
-
@IsString()
|
|
64
|
-
@IsNotEmpty()
|
|
65
|
-
apartmentId: string;
|
|
66
|
-
|
|
67
|
-
@IsDate()
|
|
68
|
-
dutyDate: Date;
|
|
69
|
-
|
|
70
|
-
@IsDate()
|
|
71
|
-
createdAt: Date;
|
|
72
|
-
|
|
73
|
-
@IsDate()
|
|
74
|
-
updatedAt: Date;
|
|
1
|
+
import { IsString ,IsNotEmpty ,IsEnum ,IsBoolean ,IsDate ,IsOptional} from "class-validator";
|
|
2
|
+
|
|
3
|
+
export enum DutyType {
|
|
4
|
+
CLEANING = 'CLEANING',
|
|
5
|
+
DISHES = 'DISHES',
|
|
6
|
+
SHOPPING = 'SHOPPING',
|
|
7
|
+
DOG_WALKING = 'DOG_WALKING',
|
|
8
|
+
OTHER = 'OTHER'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class CreateDutyDto {
|
|
12
|
+
@IsEnum(DutyType)
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
type: DutyType;
|
|
15
|
+
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
description?: string;
|
|
19
|
+
|
|
20
|
+
@IsBoolean()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
isDone?: boolean;
|
|
23
|
+
|
|
24
|
+
@IsString()
|
|
25
|
+
@IsNotEmpty()
|
|
26
|
+
userUid: string;
|
|
27
|
+
|
|
28
|
+
@IsString()
|
|
29
|
+
@IsNotEmpty()
|
|
30
|
+
apartmentId: string;
|
|
31
|
+
|
|
32
|
+
@IsDate()
|
|
33
|
+
@IsOptional()
|
|
34
|
+
dutyDate?: Date;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class UpdateDutyDto extends CreateDutyDto {
|
|
38
|
+
@IsString()
|
|
39
|
+
@IsNotEmpty()
|
|
40
|
+
id: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class DutyDTO {
|
|
44
|
+
@IsString()
|
|
45
|
+
@IsNotEmpty()
|
|
46
|
+
id: string;
|
|
47
|
+
|
|
48
|
+
@IsEnum(DutyType)
|
|
49
|
+
@IsNotEmpty()
|
|
50
|
+
type: DutyType;
|
|
51
|
+
|
|
52
|
+
@IsOptional()
|
|
53
|
+
@IsString()
|
|
54
|
+
description?: string;
|
|
55
|
+
|
|
56
|
+
@IsBoolean()
|
|
57
|
+
isDone: boolean;
|
|
58
|
+
|
|
59
|
+
@IsString()
|
|
60
|
+
@IsNotEmpty()
|
|
61
|
+
userId: string;
|
|
62
|
+
|
|
63
|
+
@IsString()
|
|
64
|
+
@IsNotEmpty()
|
|
65
|
+
apartmentId: string;
|
|
66
|
+
|
|
67
|
+
@IsDate()
|
|
68
|
+
dutyDate: Date;
|
|
69
|
+
|
|
70
|
+
@IsDate()
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
|
|
73
|
+
@IsDate()
|
|
74
|
+
updatedAt: Date;
|
|
75
75
|
}
|
package/src/Task.dto.ts
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
// src/tasks/dto/create-task.dto.ts
|
|
2
|
-
import { IsString, IsNotEmpty, IsOptional, IsEnum, IsDate, IsArray } from 'class-validator';
|
|
3
|
-
|
|
4
|
-
export enum TaskStatus {
|
|
5
|
-
PENDING = 'PENDING',
|
|
6
|
-
IN_PROGRESS = 'IN_PROGRESS',
|
|
7
|
-
COMPLETED = 'COMPLETED',
|
|
8
|
-
CANCELLED = 'CANCELLED',
|
|
9
|
-
ON_HOLD = 'ON_HOLD'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum Priority {
|
|
13
|
-
LOW = 'LOW',
|
|
14
|
-
MEDIUM = 'MEDIUM',
|
|
15
|
-
HIGH = 'HIGH',
|
|
16
|
-
URGENT = 'URGENT'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class CreateTaskDto {
|
|
20
|
-
@IsString()
|
|
21
|
-
@IsNotEmpty()
|
|
22
|
-
title: string;
|
|
23
|
-
|
|
24
|
-
@IsString()
|
|
25
|
-
@IsNotEmpty()
|
|
26
|
-
description: string;
|
|
27
|
-
|
|
28
|
-
@IsEnum(TaskStatus)
|
|
29
|
-
status: TaskStatus;
|
|
30
|
-
|
|
31
|
-
@IsOptional()
|
|
32
|
-
@IsDate()
|
|
33
|
-
dueDate?: Date;
|
|
34
|
-
|
|
35
|
-
@IsOptional()
|
|
36
|
-
@IsEnum(Priority)
|
|
37
|
-
priority?: Priority;
|
|
38
|
-
|
|
39
|
-
@IsString()
|
|
40
|
-
@IsNotEmpty()
|
|
41
|
-
apartmentId: string;
|
|
42
|
-
|
|
43
|
-
@IsArray()
|
|
44
|
-
@IsString({ each: true })
|
|
45
|
-
assignedUserIds: string[];
|
|
46
|
-
|
|
47
|
-
@IsString()
|
|
48
|
-
@IsNotEmpty()
|
|
49
|
-
createdById: string;
|
|
50
|
-
|
|
51
|
-
@IsOptional()
|
|
52
|
-
@IsArray()
|
|
53
|
-
@IsString({ each: true })
|
|
54
|
-
attachments?: string[];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export class updatedTaskDTO extends CreateTaskDto {
|
|
58
|
-
|
|
59
|
-
@IsString()
|
|
60
|
-
@IsNotEmpty()
|
|
61
|
-
id: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
export class TaskDTO {
|
|
66
|
-
@IsString()
|
|
67
|
-
@IsNotEmpty()
|
|
68
|
-
id: string;
|
|
69
|
-
|
|
70
|
-
@IsString()
|
|
71
|
-
@IsNotEmpty()
|
|
72
|
-
title: string;
|
|
73
|
-
|
|
74
|
-
@IsString()
|
|
75
|
-
@IsNotEmpty()
|
|
76
|
-
description: string;
|
|
77
|
-
|
|
78
|
-
@IsEnum(TaskStatus)
|
|
79
|
-
@IsNotEmpty()
|
|
80
|
-
status: TaskStatus;
|
|
81
|
-
|
|
82
|
-
@IsDate()
|
|
83
|
-
createdAt: Date;
|
|
84
|
-
|
|
85
|
-
@IsDate()
|
|
86
|
-
updatedAt: Date;
|
|
87
|
-
|
|
88
|
-
@IsOptional()
|
|
89
|
-
@IsDate()
|
|
90
|
-
dueDate?: Date;
|
|
91
|
-
|
|
92
|
-
@IsOptional()
|
|
93
|
-
@IsEnum(Priority)
|
|
94
|
-
priority?: Priority;
|
|
95
|
-
|
|
96
|
-
@IsString()
|
|
97
|
-
@IsNotEmpty()
|
|
98
|
-
apartmentId: string;
|
|
99
|
-
|
|
100
|
-
@IsArray()
|
|
101
|
-
@IsString({ each: true })
|
|
102
|
-
assignedUserIds: string[];
|
|
103
|
-
|
|
104
|
-
@IsString()
|
|
105
|
-
@IsNotEmpty()
|
|
106
|
-
createdById: string;
|
|
107
|
-
|
|
108
|
-
@IsOptional()
|
|
109
|
-
@IsArray()
|
|
110
|
-
@IsString({ each: true })
|
|
111
|
-
attachments?: string[];
|
|
1
|
+
// src/tasks/dto/create-task.dto.ts
|
|
2
|
+
import { IsString, IsNotEmpty, IsOptional, IsEnum, IsDate, IsArray } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export enum TaskStatus {
|
|
5
|
+
PENDING = 'PENDING',
|
|
6
|
+
IN_PROGRESS = 'IN_PROGRESS',
|
|
7
|
+
COMPLETED = 'COMPLETED',
|
|
8
|
+
CANCELLED = 'CANCELLED',
|
|
9
|
+
ON_HOLD = 'ON_HOLD'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum Priority {
|
|
13
|
+
LOW = 'LOW',
|
|
14
|
+
MEDIUM = 'MEDIUM',
|
|
15
|
+
HIGH = 'HIGH',
|
|
16
|
+
URGENT = 'URGENT'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class CreateTaskDto {
|
|
20
|
+
@IsString()
|
|
21
|
+
@IsNotEmpty()
|
|
22
|
+
title: string;
|
|
23
|
+
|
|
24
|
+
@IsString()
|
|
25
|
+
@IsNotEmpty()
|
|
26
|
+
description: string;
|
|
27
|
+
|
|
28
|
+
@IsEnum(TaskStatus)
|
|
29
|
+
status: TaskStatus;
|
|
30
|
+
|
|
31
|
+
@IsOptional()
|
|
32
|
+
@IsDate()
|
|
33
|
+
dueDate?: Date;
|
|
34
|
+
|
|
35
|
+
@IsOptional()
|
|
36
|
+
@IsEnum(Priority)
|
|
37
|
+
priority?: Priority;
|
|
38
|
+
|
|
39
|
+
@IsString()
|
|
40
|
+
@IsNotEmpty()
|
|
41
|
+
apartmentId: string;
|
|
42
|
+
|
|
43
|
+
@IsArray()
|
|
44
|
+
@IsString({ each: true })
|
|
45
|
+
assignedUserIds: string[];
|
|
46
|
+
|
|
47
|
+
@IsString()
|
|
48
|
+
@IsNotEmpty()
|
|
49
|
+
createdById: string;
|
|
50
|
+
|
|
51
|
+
@IsOptional()
|
|
52
|
+
@IsArray()
|
|
53
|
+
@IsString({ each: true })
|
|
54
|
+
attachments?: string[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export class updatedTaskDTO extends CreateTaskDto {
|
|
58
|
+
|
|
59
|
+
@IsString()
|
|
60
|
+
@IsNotEmpty()
|
|
61
|
+
id: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
export class TaskDTO {
|
|
66
|
+
@IsString()
|
|
67
|
+
@IsNotEmpty()
|
|
68
|
+
id: string;
|
|
69
|
+
|
|
70
|
+
@IsString()
|
|
71
|
+
@IsNotEmpty()
|
|
72
|
+
title: string;
|
|
73
|
+
|
|
74
|
+
@IsString()
|
|
75
|
+
@IsNotEmpty()
|
|
76
|
+
description: string;
|
|
77
|
+
|
|
78
|
+
@IsEnum(TaskStatus)
|
|
79
|
+
@IsNotEmpty()
|
|
80
|
+
status: TaskStatus;
|
|
81
|
+
|
|
82
|
+
@IsDate()
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
|
|
85
|
+
@IsDate()
|
|
86
|
+
updatedAt: Date;
|
|
87
|
+
|
|
88
|
+
@IsOptional()
|
|
89
|
+
@IsDate()
|
|
90
|
+
dueDate?: Date;
|
|
91
|
+
|
|
92
|
+
@IsOptional()
|
|
93
|
+
@IsEnum(Priority)
|
|
94
|
+
priority?: Priority;
|
|
95
|
+
|
|
96
|
+
@IsString()
|
|
97
|
+
@IsNotEmpty()
|
|
98
|
+
apartmentId: string;
|
|
99
|
+
|
|
100
|
+
@IsArray()
|
|
101
|
+
@IsString({ each: true })
|
|
102
|
+
assignedUserIds: string[];
|
|
103
|
+
|
|
104
|
+
@IsString()
|
|
105
|
+
@IsNotEmpty()
|
|
106
|
+
createdById: string;
|
|
107
|
+
|
|
108
|
+
@IsOptional()
|
|
109
|
+
@IsArray()
|
|
110
|
+
@IsString({ each: true })
|
|
111
|
+
attachments?: string[];
|
|
112
112
|
}
|
package/src/UserDTO.dto.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { IsNotEmpty, IsString } from "class-validator";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export class UserDTO {
|
|
5
|
-
uid:string;
|
|
6
|
-
email: string | null | undefined;
|
|
7
|
-
name: string | null | undefined;
|
|
8
|
-
phone: string | null | undefined;
|
|
9
|
-
profileURL: string | null | undefined;
|
|
10
|
-
userType: string | null | undefined;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class BaseUserDto {
|
|
14
|
-
@IsString()
|
|
15
|
-
@IsNotEmpty()
|
|
16
|
-
uid: string;
|
|
17
|
-
|
|
18
|
-
@IsString()
|
|
19
|
-
@IsNotEmpty()
|
|
20
|
-
name: string;
|
|
21
|
-
|
|
22
|
-
@IsString()
|
|
23
|
-
@IsNotEmpty()
|
|
24
|
-
aprtmontID: string;
|
|
25
|
-
|
|
26
|
-
@IsString()
|
|
27
|
-
@IsNotEmpty()
|
|
28
|
-
profileURL: string;
|
|
29
|
-
|
|
30
|
-
@IsString()
|
|
31
|
-
@IsNotEmpty()
|
|
32
|
-
userType:string;
|
|
33
|
-
}
|
|
1
|
+
import { IsNotEmpty, IsString } from "class-validator";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export class UserDTO {
|
|
5
|
+
uid:string;
|
|
6
|
+
email: string | null | undefined;
|
|
7
|
+
name: string | null | undefined;
|
|
8
|
+
phone: string | null | undefined;
|
|
9
|
+
profileURL: string | null | undefined;
|
|
10
|
+
userType: string | null | undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class BaseUserDto {
|
|
14
|
+
@IsString()
|
|
15
|
+
@IsNotEmpty()
|
|
16
|
+
uid: string;
|
|
17
|
+
|
|
18
|
+
@IsString()
|
|
19
|
+
@IsNotEmpty()
|
|
20
|
+
name: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
@IsNotEmpty()
|
|
24
|
+
aprtmontID: string;
|
|
25
|
+
|
|
26
|
+
@IsString()
|
|
27
|
+
@IsNotEmpty()
|
|
28
|
+
profileURL: string;
|
|
29
|
+
|
|
30
|
+
@IsString()
|
|
31
|
+
@IsNotEmpty()
|
|
32
|
+
userType:string;
|
|
33
|
+
}
|
|
34
34
|
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './UserDTO.dto';
|
|
2
|
-
export * from './Apartment.dto';
|
|
3
|
-
export * from './Task.dto';
|
|
1
|
+
export * from './UserDTO.dto';
|
|
2
|
+
export * from './Apartment.dto';
|
|
3
|
+
export * from './Task.dto';
|
|
4
4
|
export * from './Duty.dto'
|
package/tsconfig.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"moduleResolution": "node",
|
|
4
|
-
|
|
5
|
-
"strictPropertyInitialization": false,
|
|
6
|
-
/* Language and Environment */
|
|
7
|
-
"target": "es2016",
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"emitDecoratorMetadata": true,
|
|
10
|
-
"module": "commonjs",
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"strict": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
|
|
16
|
-
/* Emit */
|
|
17
|
-
"declaration": true,
|
|
18
|
-
"declarationMap": true,
|
|
19
|
-
"outDir": "./dist",
|
|
20
|
-
"removeComments": true,
|
|
21
|
-
"sourceMap": true,
|
|
22
|
-
"baseUrl": ".",
|
|
23
|
-
"paths": {
|
|
24
|
-
"shared-dto": ["node_modules/shared-dto/dist/index"]
|
|
25
|
-
|
|
26
|
-
// "shared-dto": ["dist/index"],
|
|
27
|
-
// "shared-dto/*": ["dist/*"]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"include": [
|
|
31
|
-
"src/**/*.ts"
|
|
32
|
-
],
|
|
33
|
-
"exclude": [
|
|
34
|
-
"node_modules",
|
|
35
|
-
"dist"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"moduleResolution": "node",
|
|
4
|
+
|
|
5
|
+
"strictPropertyInitialization": false,
|
|
6
|
+
/* Language and Environment */
|
|
7
|
+
"target": "es2016",
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
10
|
+
"module": "commonjs",
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
|
|
16
|
+
/* Emit */
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"removeComments": true,
|
|
21
|
+
"sourceMap": true,
|
|
22
|
+
"baseUrl": ".",
|
|
23
|
+
"paths": {
|
|
24
|
+
"shared-dto": ["node_modules/shared-dto/dist/index"]
|
|
25
|
+
|
|
26
|
+
// "shared-dto": ["dist/index"],
|
|
27
|
+
// "shared-dto/*": ["dist/*"]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"src/**/*.ts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": [
|
|
34
|
+
"node_modules",
|
|
35
|
+
"dist"
|
|
36
|
+
]
|
|
37
|
+
}
|