@managemint-solutions/entities 1.0.4 → 1.0.6
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/auth/index.d.ts +5 -1
- package/dist/clients/index.d.ts +12 -12
- package/dist/users/enum/index.d.ts +15 -0
- package/dist/users/index.d.ts +13 -46
- package/package.json +8 -1
- package/dist/auth.types.d.ts +0 -4
- package/dist/clients.types.d.ts +0 -38
- package/dist/index.d.ts +0 -4
- package/dist/status.types.d.ts +0 -6
- package/dist/user.types.d.ts +0 -174
package/dist/auth/index.d.ts
CHANGED
package/dist/clients/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { UUID } from 'crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { UserIdentity } from '../users';
|
|
3
3
|
import { Status } from '../status';
|
|
4
|
-
export type
|
|
4
|
+
export type ClientIdentity = {
|
|
5
5
|
mms_id: UUID;
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
8
|
+
export type ClientSummary = {
|
|
9
9
|
mms_id: UUID;
|
|
10
10
|
created_at: Date;
|
|
11
11
|
name: string;
|
|
12
12
|
email: string;
|
|
13
13
|
status: Status | null;
|
|
14
|
-
created_by:
|
|
15
|
-
}
|
|
16
|
-
export type
|
|
14
|
+
created_by: UserIdentity;
|
|
15
|
+
};
|
|
16
|
+
export type ClientEntity = {
|
|
17
17
|
mms_id: UUID;
|
|
18
18
|
created_at: Date;
|
|
19
19
|
name: string;
|
|
@@ -23,16 +23,16 @@ export type Client = {
|
|
|
23
23
|
contract_client: boolean;
|
|
24
24
|
contracted_hours: number | null;
|
|
25
25
|
updated_at: Date | null;
|
|
26
|
-
last_updated_by:
|
|
27
|
-
created_by:
|
|
26
|
+
last_updated_by: UserIdentity | null;
|
|
27
|
+
created_by: UserIdentity;
|
|
28
28
|
archived: boolean;
|
|
29
29
|
archived_at: Date | null;
|
|
30
|
-
archived_by:
|
|
30
|
+
archived_by: UserIdentity | null;
|
|
31
31
|
unarchived_at: Date | null;
|
|
32
|
-
unarchived_by:
|
|
32
|
+
unarchived_by: UserIdentity | null;
|
|
33
33
|
deleted: boolean;
|
|
34
34
|
deleted_at: Date | null;
|
|
35
|
-
deleted_by:
|
|
35
|
+
deleted_by: UserIdentity | null;
|
|
36
36
|
restored_at: Date | null;
|
|
37
|
-
restored_by:
|
|
37
|
+
restored_by: UserIdentity | null;
|
|
38
38
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum EmploymentType {
|
|
2
|
+
FULL_TIME = "full_time",
|
|
3
|
+
PART_TIME = "part_time",
|
|
4
|
+
CONTRACTOR = "contractor",
|
|
5
|
+
INTERN = "intern",
|
|
6
|
+
TEMPORARY = "temporary"
|
|
7
|
+
}
|
|
8
|
+
export declare enum EmergencyContactRelationship {
|
|
9
|
+
SPOUSE = "spouse",
|
|
10
|
+
PARENT = "parent",
|
|
11
|
+
SIBLING = "sibling",
|
|
12
|
+
FRIEND = "friend",
|
|
13
|
+
PARTNER = "partner",
|
|
14
|
+
OTHER = "other"
|
|
15
|
+
}
|
package/dist/users/index.d.ts
CHANGED
|
@@ -1,45 +1,12 @@
|
|
|
1
1
|
import type { UUID } from 'crypto';
|
|
2
|
-
|
|
2
|
+
import { EmergencyContactRelationship, EmploymentType } from './enum';
|
|
3
|
+
export interface UserIdentity {
|
|
3
4
|
mms_id: UUID;
|
|
4
5
|
name: string;
|
|
5
6
|
surname: string;
|
|
6
7
|
email: string;
|
|
7
8
|
profile_image: string | null;
|
|
8
9
|
}
|
|
9
|
-
export interface UserEntity {
|
|
10
|
-
id: number;
|
|
11
|
-
mms_id: string;
|
|
12
|
-
created_at: Date;
|
|
13
|
-
created_by: string | null;
|
|
14
|
-
profile_image: string | null;
|
|
15
|
-
name: string;
|
|
16
|
-
surname: string;
|
|
17
|
-
email: string;
|
|
18
|
-
phone: string;
|
|
19
|
-
last_logged_in: Date | null;
|
|
20
|
-
organization_id: UUID;
|
|
21
|
-
updated_at: Date | null;
|
|
22
|
-
last_updated_by: string | null;
|
|
23
|
-
country_code: string | null;
|
|
24
|
-
manager_id: string | null;
|
|
25
|
-
active: boolean;
|
|
26
|
-
start_date: Date;
|
|
27
|
-
end_date: Date | null;
|
|
28
|
-
job_title: string | null;
|
|
29
|
-
employment_type: string;
|
|
30
|
-
birthday: Date | null;
|
|
31
|
-
social_facebook: string | null;
|
|
32
|
-
social_linkedin: string | null;
|
|
33
|
-
social_twitter: string | null;
|
|
34
|
-
social_instagram: string | null;
|
|
35
|
-
social_github: string | null;
|
|
36
|
-
social_website: string | null;
|
|
37
|
-
emergency_contact_name: string | null;
|
|
38
|
-
emergency_contact_relationship: string | null;
|
|
39
|
-
emergency_contact_phone: string | null;
|
|
40
|
-
emergency_contact_email: string | null;
|
|
41
|
-
supporting_files: string[];
|
|
42
|
-
}
|
|
43
10
|
export interface User {
|
|
44
11
|
mms_id: string;
|
|
45
12
|
name: string;
|
|
@@ -49,25 +16,25 @@ export interface User {
|
|
|
49
16
|
profile_image: string | null;
|
|
50
17
|
active: boolean;
|
|
51
18
|
created_at: Date;
|
|
52
|
-
created_by:
|
|
19
|
+
created_by: UserIdentity | null;
|
|
53
20
|
last_logged_in: Date | null;
|
|
54
21
|
country_code: string | null;
|
|
55
22
|
updated_at: Date | null;
|
|
56
|
-
last_updated_by:
|
|
57
|
-
manager:
|
|
23
|
+
last_updated_by: UserIdentity | null;
|
|
24
|
+
manager: UserIdentity | null;
|
|
58
25
|
birthday: Date | null;
|
|
59
|
-
employment_type:
|
|
26
|
+
employment_type: EmploymentType;
|
|
60
27
|
job_title: string | null;
|
|
61
28
|
start_date: Date;
|
|
62
29
|
end_date: Date | null;
|
|
63
|
-
social_facebook:
|
|
64
|
-
social_linkedin:
|
|
65
|
-
social_twitter:
|
|
66
|
-
social_instagram:
|
|
67
|
-
social_github:
|
|
68
|
-
social_website:
|
|
30
|
+
social_facebook: URL | null;
|
|
31
|
+
social_linkedin: URL | null;
|
|
32
|
+
social_twitter: URL | null;
|
|
33
|
+
social_instagram: URL | null;
|
|
34
|
+
social_github: URL | null;
|
|
35
|
+
social_website: URL | null;
|
|
69
36
|
emergency_contact_name: string | null;
|
|
70
|
-
emergency_contact_relationship:
|
|
37
|
+
emergency_contact_relationship: EmergencyContactRelationship | null;
|
|
71
38
|
emergency_contact_phone: string | null;
|
|
72
39
|
emergency_contact_email: string | null;
|
|
73
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@managemint-solutions/entities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Entity types used by both the api and portal",
|
|
5
5
|
"homepage": "https://github.com/ManageMint-Solutions/managemint-solutions-entities#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"types": "./dist/auth/dto/index.d.ts",
|
|
23
23
|
"default": "./dist/auth/dto/index.js"
|
|
24
24
|
},
|
|
25
|
+
|
|
25
26
|
"./clients": {
|
|
26
27
|
"types": "./dist/clients/index.d.ts",
|
|
27
28
|
"default": "./dist/clients/index.js"
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
"types": "./dist/clients/dto/index.d.ts",
|
|
31
32
|
"default": "./dist/clients/dto/index.js"
|
|
32
33
|
},
|
|
34
|
+
|
|
33
35
|
"./status": {
|
|
34
36
|
"types": "./dist/status/index.d.ts",
|
|
35
37
|
"default": "./dist/status/index.js"
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
"types": "./dist/status/dto/index.d.ts",
|
|
39
41
|
"default": "./dist/status/dto/index.js"
|
|
40
42
|
},
|
|
43
|
+
|
|
41
44
|
"./users": {
|
|
42
45
|
"types": "./dist/users/index.d.ts",
|
|
43
46
|
"default": "./dist/users/index.js"
|
|
@@ -45,6 +48,10 @@
|
|
|
45
48
|
"./users/dto": {
|
|
46
49
|
"types": "./dist/users/dto/index.d.ts",
|
|
47
50
|
"default": "./dist/users/dto/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./users/enum": {
|
|
53
|
+
"types": "./dist/users/enum/index.d.ts",
|
|
54
|
+
"default": "./dist/users/enum/index.js"
|
|
48
55
|
}
|
|
49
56
|
},
|
|
50
57
|
"scripts": {
|
package/dist/auth.types.d.ts
DELETED
package/dist/clients.types.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
2
|
-
import { ShorthandUser } from './user.types';
|
|
3
|
-
import { Status } from './status.types';
|
|
4
|
-
export type ClientShorthand = {
|
|
5
|
-
mms_id: UUID;
|
|
6
|
-
name: string;
|
|
7
|
-
};
|
|
8
|
-
export type ClientList = {
|
|
9
|
-
mms_id: UUID;
|
|
10
|
-
created_at: Date;
|
|
11
|
-
name: string;
|
|
12
|
-
email: string;
|
|
13
|
-
status: Status | null;
|
|
14
|
-
created_by: ShorthandUser | null;
|
|
15
|
-
}[];
|
|
16
|
-
export type Client = {
|
|
17
|
-
mms_id: UUID;
|
|
18
|
-
created_at: Date;
|
|
19
|
-
name: string;
|
|
20
|
-
email: string;
|
|
21
|
-
phone: string;
|
|
22
|
-
status: Status | null;
|
|
23
|
-
contract_client: boolean;
|
|
24
|
-
contracted_hours: number | null;
|
|
25
|
-
updated_at: Date | null;
|
|
26
|
-
last_updated_by: ShorthandUser | null;
|
|
27
|
-
created_by: ShorthandUser | null;
|
|
28
|
-
archived: boolean;
|
|
29
|
-
archived_at: Date | null;
|
|
30
|
-
archived_by: ShorthandUser | null;
|
|
31
|
-
unarchived_at: Date | null;
|
|
32
|
-
unarchived_by: ShorthandUser | null;
|
|
33
|
-
deleted: boolean;
|
|
34
|
-
deleted_at: Date | null;
|
|
35
|
-
deleted_by: ShorthandUser | null;
|
|
36
|
-
restored_at: Date | null;
|
|
37
|
-
restored_by: ShorthandUser | null;
|
|
38
|
-
};
|
package/dist/index.d.ts
DELETED
package/dist/status.types.d.ts
DELETED
package/dist/user.types.d.ts
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import type { UUID } from 'crypto';
|
|
2
|
-
export interface ShorthandUser {
|
|
3
|
-
mms_id: UUID;
|
|
4
|
-
name: string;
|
|
5
|
-
surname: string;
|
|
6
|
-
email: string;
|
|
7
|
-
profile_image: string | null;
|
|
8
|
-
}
|
|
9
|
-
export interface UserEntity {
|
|
10
|
-
id: number;
|
|
11
|
-
mms_id: string;
|
|
12
|
-
created_at: Date;
|
|
13
|
-
created_by: string | null;
|
|
14
|
-
profile_image: string | null;
|
|
15
|
-
name: string;
|
|
16
|
-
surname: string;
|
|
17
|
-
email: string;
|
|
18
|
-
phone: string;
|
|
19
|
-
last_logged_in: Date | null;
|
|
20
|
-
organization_id: UUID;
|
|
21
|
-
updated_at: Date | null;
|
|
22
|
-
last_updated_by: string | null;
|
|
23
|
-
country_code: string | null;
|
|
24
|
-
manager_id: string | null;
|
|
25
|
-
active: boolean;
|
|
26
|
-
start_date: Date;
|
|
27
|
-
end_date: Date | null;
|
|
28
|
-
job_title: string | null;
|
|
29
|
-
employment_type: string;
|
|
30
|
-
birthday: Date | null;
|
|
31
|
-
social_facebook: string | null;
|
|
32
|
-
social_linkedin: string | null;
|
|
33
|
-
social_twitter: string | null;
|
|
34
|
-
social_instagram: string | null;
|
|
35
|
-
social_github: string | null;
|
|
36
|
-
social_website: string | null;
|
|
37
|
-
emergency_contact_name: string | null;
|
|
38
|
-
emergency_contact_relationship: string | null;
|
|
39
|
-
emergency_contact_phone: string | null;
|
|
40
|
-
emergency_contact_email: string | null;
|
|
41
|
-
supporting_files: string[];
|
|
42
|
-
}
|
|
43
|
-
export interface User {
|
|
44
|
-
mms_id: string;
|
|
45
|
-
name: string;
|
|
46
|
-
surname: string;
|
|
47
|
-
email: string;
|
|
48
|
-
phone: string;
|
|
49
|
-
profile_image: string | null;
|
|
50
|
-
active: boolean;
|
|
51
|
-
created_at: Date;
|
|
52
|
-
created_by: ShorthandUser | null;
|
|
53
|
-
last_logged_in: Date | null;
|
|
54
|
-
country_code: string | null;
|
|
55
|
-
updated_at: Date | null;
|
|
56
|
-
last_updated_by: ShorthandUser | null;
|
|
57
|
-
manager: ShorthandUser | null;
|
|
58
|
-
birthday: Date | null;
|
|
59
|
-
employment_type: string;
|
|
60
|
-
job_title: string | null;
|
|
61
|
-
start_date: Date;
|
|
62
|
-
end_date: Date | null;
|
|
63
|
-
social_facebook: string | null;
|
|
64
|
-
social_linkedin: string | null;
|
|
65
|
-
social_twitter: string | null;
|
|
66
|
-
social_instagram: string | null;
|
|
67
|
-
social_github: string | null;
|
|
68
|
-
social_website: string | null;
|
|
69
|
-
emergency_contact_name: string | null;
|
|
70
|
-
emergency_contact_relationship: string | null;
|
|
71
|
-
emergency_contact_phone: string | null;
|
|
72
|
-
emergency_contact_email: string | null;
|
|
73
|
-
}
|
|
74
|
-
export interface CrudPermission {
|
|
75
|
-
read: boolean;
|
|
76
|
-
create: boolean;
|
|
77
|
-
update: boolean;
|
|
78
|
-
delete: boolean;
|
|
79
|
-
}
|
|
80
|
-
export interface PermissionsEntity {
|
|
81
|
-
id: number;
|
|
82
|
-
mms_id: string;
|
|
83
|
-
user_id: string;
|
|
84
|
-
organization_id: string;
|
|
85
|
-
is_admin: boolean;
|
|
86
|
-
is_owner: boolean;
|
|
87
|
-
view_dashboard: boolean;
|
|
88
|
-
create_clients: boolean;
|
|
89
|
-
read_clients: boolean;
|
|
90
|
-
update_clients: boolean;
|
|
91
|
-
delete_clients: boolean;
|
|
92
|
-
create_projects: boolean;
|
|
93
|
-
read_projects: boolean;
|
|
94
|
-
update_projects: boolean;
|
|
95
|
-
delete_projects: boolean;
|
|
96
|
-
create_budgets: boolean;
|
|
97
|
-
read_budgets: boolean;
|
|
98
|
-
update_budgets: boolean;
|
|
99
|
-
delete_budgets: boolean;
|
|
100
|
-
create_tasks: boolean;
|
|
101
|
-
read_tasks: boolean;
|
|
102
|
-
update_tasks: boolean;
|
|
103
|
-
delete_tasks: boolean;
|
|
104
|
-
create_timesheets: boolean;
|
|
105
|
-
read_timesheets: boolean;
|
|
106
|
-
update_timesheets: boolean;
|
|
107
|
-
delete_timesheets: boolean;
|
|
108
|
-
create_documents: boolean;
|
|
109
|
-
read_docuemnts: boolean;
|
|
110
|
-
update_documents: boolean;
|
|
111
|
-
delete_documents: boolean;
|
|
112
|
-
create_leave: boolean;
|
|
113
|
-
read_leave: boolean;
|
|
114
|
-
update_leave: boolean;
|
|
115
|
-
delete_leave: boolean;
|
|
116
|
-
create_leave_types: boolean;
|
|
117
|
-
read_leave_types: boolean;
|
|
118
|
-
update_leave_types: boolean;
|
|
119
|
-
delete_leave_types: boolean;
|
|
120
|
-
create_leave_requests: boolean;
|
|
121
|
-
read_leave_requests: boolean;
|
|
122
|
-
update_leave_requests: boolean;
|
|
123
|
-
delete_leave_requests: boolean;
|
|
124
|
-
create_invoices: boolean;
|
|
125
|
-
read_invoices: boolean;
|
|
126
|
-
update_invoices: boolean;
|
|
127
|
-
delete_invoices: boolean;
|
|
128
|
-
create_users: boolean;
|
|
129
|
-
read_users: boolean;
|
|
130
|
-
update_users: boolean;
|
|
131
|
-
delete_users: boolean;
|
|
132
|
-
create_user_permissions: boolean;
|
|
133
|
-
read_user_permissions: boolean;
|
|
134
|
-
update_user_permissions: boolean;
|
|
135
|
-
delete_user_permissions: boolean;
|
|
136
|
-
create_organizations: boolean;
|
|
137
|
-
read_organizations: boolean;
|
|
138
|
-
update_organizations: boolean;
|
|
139
|
-
delete_organizations: boolean;
|
|
140
|
-
create_payments: boolean;
|
|
141
|
-
read_payments: boolean;
|
|
142
|
-
update_payments: boolean;
|
|
143
|
-
delete_payments: boolean;
|
|
144
|
-
create_notifications: boolean;
|
|
145
|
-
read_notifications: boolean;
|
|
146
|
-
update_notifications: boolean;
|
|
147
|
-
delete_notifications: boolean;
|
|
148
|
-
create_subscriptions: boolean;
|
|
149
|
-
read_subscriptions: boolean;
|
|
150
|
-
update_subscriptions: boolean;
|
|
151
|
-
delete_subscriptions: boolean;
|
|
152
|
-
}
|
|
153
|
-
export interface Permissions {
|
|
154
|
-
permissions: {
|
|
155
|
-
dashboard: Omit<CrudPermission, 'create' | 'update' | 'delete'>;
|
|
156
|
-
clients: CrudPermission;
|
|
157
|
-
projects: CrudPermission;
|
|
158
|
-
project_budgets: CrudPermission;
|
|
159
|
-
tasks: CrudPermission;
|
|
160
|
-
invoices: Omit<CrudPermission, 'create' | 'update' | 'delete'>;
|
|
161
|
-
users: CrudPermission;
|
|
162
|
-
user_permissions: Omit<CrudPermission, 'create' | 'delete'>;
|
|
163
|
-
organization: Omit<CrudPermission, 'create' | 'delete'>;
|
|
164
|
-
subscription: Omit<CrudPermission, 'read' | 'create' | 'delete'>;
|
|
165
|
-
payments: Omit<CrudPermission, 'read' | 'update' | 'delete'>;
|
|
166
|
-
};
|
|
167
|
-
roles: {
|
|
168
|
-
admin: boolean;
|
|
169
|
-
owner: boolean;
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
export interface LoggedInUser extends User, Permissions {
|
|
173
|
-
alerts: Record<string, boolean>;
|
|
174
|
-
}
|