@experts_hub/shared 1.0.37 → 1.0.39
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/entities/index.d.ts +1 -0
- package/dist/entities/otp.entity.d.ts +13 -0
- package/dist/entities/user.entity.d.ts +2 -0
- package/dist/index.d.mts +25 -7
- package/dist/index.d.ts +25 -7
- package/dist/index.js +87 -29
- package/dist/index.mjs +92 -27
- package/dist/modules/user/subadmin/dto/create-subadmin.dto.d.ts +1 -0
- package/dist/modules/user/subadmin/dto/index.d.ts +1 -1
- package/dist/modules/user/subadmin/dto/update-subadmin-status.dto.d.ts +3 -0
- package/dist/modules/user/subadmin/dto/update-subadmin.dto.d.ts +1 -0
- package/dist/modules/user/subadmin/pattern/pattern.d.ts +1 -1
- package/dist/modules/user/subadmin/subadmin.interface.d.ts +5 -3
- package/package.json +1 -1
- package/dist/modules/user/subadmin/dto/toggle-subadmin-visibility.dto.d.ts +0 -3
package/dist/entities/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { User } from "./user.entity";
|
|
2
|
+
export declare class Otp {
|
|
3
|
+
id: number;
|
|
4
|
+
userId: number;
|
|
5
|
+
otp: string;
|
|
6
|
+
otpPurpose: string;
|
|
7
|
+
target: string;
|
|
8
|
+
expiresAt: Date;
|
|
9
|
+
isUsed: boolean;
|
|
10
|
+
resendCount: number;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
user: User;
|
|
13
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from './base.entity';
|
|
2
2
|
import { RefreshToken } from './refresh-token.entity';
|
|
3
3
|
import { ResumeParserLog } from './resume-parser-log.entity';
|
|
4
|
+
import { Otp } from './otp.entity';
|
|
4
5
|
export declare enum AccountType {
|
|
5
6
|
ADMIN = "ADMIN",
|
|
6
7
|
SUB_ADMIN = "SUB_ADMIN",
|
|
@@ -31,5 +32,6 @@ export declare class User extends BaseEntity {
|
|
|
31
32
|
lastLoginAt: Date;
|
|
32
33
|
lastLoginIp: string;
|
|
33
34
|
refreshTokens: RefreshToken[];
|
|
35
|
+
otps: Otp[];
|
|
34
36
|
resumeParserLogs: ResumeParserLog[];
|
|
35
37
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ declare const SUBADMIN_PATTERN: {
|
|
|
33
33
|
fetchSubAdminDropdown: string;
|
|
34
34
|
findSubAdminById: string;
|
|
35
35
|
createSubAdmin: string;
|
|
36
|
-
|
|
36
|
+
updateSubAdminAccountStatus: string;
|
|
37
37
|
updateSubAdmin: string;
|
|
38
38
|
deleteSubAdmin: string;
|
|
39
39
|
};
|
|
@@ -45,12 +45,13 @@ declare class CreateSubAdminDto {
|
|
|
45
45
|
lastName: string;
|
|
46
46
|
email: string;
|
|
47
47
|
mobile: string;
|
|
48
|
+
password: string;
|
|
48
49
|
accountType: string;
|
|
49
50
|
accountStatus: string;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
declare class
|
|
53
|
-
|
|
53
|
+
declare class UpdateSubAdminAccountStatusDto {
|
|
54
|
+
accountStatus: string;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
declare class UpdateSubAdminDto {
|
|
@@ -60,6 +61,7 @@ declare class UpdateSubAdminDto {
|
|
|
60
61
|
lastName: string;
|
|
61
62
|
email: string;
|
|
62
63
|
mobile: string;
|
|
64
|
+
password: string;
|
|
63
65
|
accountType: string;
|
|
64
66
|
accountStatus: string;
|
|
65
67
|
}
|
|
@@ -95,6 +97,7 @@ interface ICreateSubAdminPayload {
|
|
|
95
97
|
lastName: string;
|
|
96
98
|
email: string;
|
|
97
99
|
mobile: string;
|
|
100
|
+
password: string;
|
|
98
101
|
accountType: string;
|
|
99
102
|
accountStatus: string;
|
|
100
103
|
}
|
|
@@ -110,6 +113,7 @@ interface IUpdateSubAdminPayload {
|
|
|
110
113
|
lastName: string;
|
|
111
114
|
email: string;
|
|
112
115
|
mobile: string;
|
|
116
|
+
password: string;
|
|
113
117
|
accountType: string;
|
|
114
118
|
accountStatus: string;
|
|
115
119
|
}
|
|
@@ -118,10 +122,10 @@ interface IUpdateSubAdminResponse {
|
|
|
118
122
|
status: boolean;
|
|
119
123
|
message: string;
|
|
120
124
|
}
|
|
121
|
-
interface
|
|
122
|
-
|
|
125
|
+
interface IUpdateSubAdminAccountStatusPayload {
|
|
126
|
+
accountSatus: string;
|
|
123
127
|
}
|
|
124
|
-
interface
|
|
128
|
+
interface IUpdateSubAdminAccountStatusResponse {
|
|
125
129
|
statusCode: number;
|
|
126
130
|
status: boolean;
|
|
127
131
|
message: string;
|
|
@@ -181,6 +185,19 @@ declare class ResumeParserLog {
|
|
|
181
185
|
user: User;
|
|
182
186
|
}
|
|
183
187
|
|
|
188
|
+
declare class Otp {
|
|
189
|
+
id: number;
|
|
190
|
+
userId: number;
|
|
191
|
+
otp: string;
|
|
192
|
+
otpPurpose: string;
|
|
193
|
+
target: string;
|
|
194
|
+
expiresAt: Date;
|
|
195
|
+
isUsed: boolean;
|
|
196
|
+
resendCount: number;
|
|
197
|
+
createdAt: Date;
|
|
198
|
+
user: User;
|
|
199
|
+
}
|
|
200
|
+
|
|
184
201
|
declare enum AccountType {
|
|
185
202
|
ADMIN = "ADMIN",
|
|
186
203
|
SUB_ADMIN = "SUB_ADMIN",
|
|
@@ -211,7 +228,8 @@ declare class User extends BaseEntity {
|
|
|
211
228
|
lastLoginAt: Date;
|
|
212
229
|
lastLoginIp: string;
|
|
213
230
|
refreshTokens: RefreshToken[];
|
|
231
|
+
otps: Otp[];
|
|
214
232
|
resumeParserLogs: ResumeParserLog[];
|
|
215
233
|
}
|
|
216
234
|
|
|
217
|
-
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, CreateSubAdminDto, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type
|
|
235
|
+
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, CreateSubAdminDto, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JobRMQAdapter, JobTCPAdapter, LoginDto, LogoutDto, Otp, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare const SUBADMIN_PATTERN: {
|
|
|
33
33
|
fetchSubAdminDropdown: string;
|
|
34
34
|
findSubAdminById: string;
|
|
35
35
|
createSubAdmin: string;
|
|
36
|
-
|
|
36
|
+
updateSubAdminAccountStatus: string;
|
|
37
37
|
updateSubAdmin: string;
|
|
38
38
|
deleteSubAdmin: string;
|
|
39
39
|
};
|
|
@@ -45,12 +45,13 @@ declare class CreateSubAdminDto {
|
|
|
45
45
|
lastName: string;
|
|
46
46
|
email: string;
|
|
47
47
|
mobile: string;
|
|
48
|
+
password: string;
|
|
48
49
|
accountType: string;
|
|
49
50
|
accountStatus: string;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
declare class
|
|
53
|
-
|
|
53
|
+
declare class UpdateSubAdminAccountStatusDto {
|
|
54
|
+
accountStatus: string;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
declare class UpdateSubAdminDto {
|
|
@@ -60,6 +61,7 @@ declare class UpdateSubAdminDto {
|
|
|
60
61
|
lastName: string;
|
|
61
62
|
email: string;
|
|
62
63
|
mobile: string;
|
|
64
|
+
password: string;
|
|
63
65
|
accountType: string;
|
|
64
66
|
accountStatus: string;
|
|
65
67
|
}
|
|
@@ -95,6 +97,7 @@ interface ICreateSubAdminPayload {
|
|
|
95
97
|
lastName: string;
|
|
96
98
|
email: string;
|
|
97
99
|
mobile: string;
|
|
100
|
+
password: string;
|
|
98
101
|
accountType: string;
|
|
99
102
|
accountStatus: string;
|
|
100
103
|
}
|
|
@@ -110,6 +113,7 @@ interface IUpdateSubAdminPayload {
|
|
|
110
113
|
lastName: string;
|
|
111
114
|
email: string;
|
|
112
115
|
mobile: string;
|
|
116
|
+
password: string;
|
|
113
117
|
accountType: string;
|
|
114
118
|
accountStatus: string;
|
|
115
119
|
}
|
|
@@ -118,10 +122,10 @@ interface IUpdateSubAdminResponse {
|
|
|
118
122
|
status: boolean;
|
|
119
123
|
message: string;
|
|
120
124
|
}
|
|
121
|
-
interface
|
|
122
|
-
|
|
125
|
+
interface IUpdateSubAdminAccountStatusPayload {
|
|
126
|
+
accountSatus: string;
|
|
123
127
|
}
|
|
124
|
-
interface
|
|
128
|
+
interface IUpdateSubAdminAccountStatusResponse {
|
|
125
129
|
statusCode: number;
|
|
126
130
|
status: boolean;
|
|
127
131
|
message: string;
|
|
@@ -181,6 +185,19 @@ declare class ResumeParserLog {
|
|
|
181
185
|
user: User;
|
|
182
186
|
}
|
|
183
187
|
|
|
188
|
+
declare class Otp {
|
|
189
|
+
id: number;
|
|
190
|
+
userId: number;
|
|
191
|
+
otp: string;
|
|
192
|
+
otpPurpose: string;
|
|
193
|
+
target: string;
|
|
194
|
+
expiresAt: Date;
|
|
195
|
+
isUsed: boolean;
|
|
196
|
+
resendCount: number;
|
|
197
|
+
createdAt: Date;
|
|
198
|
+
user: User;
|
|
199
|
+
}
|
|
200
|
+
|
|
184
201
|
declare enum AccountType {
|
|
185
202
|
ADMIN = "ADMIN",
|
|
186
203
|
SUB_ADMIN = "SUB_ADMIN",
|
|
@@ -211,7 +228,8 @@ declare class User extends BaseEntity {
|
|
|
211
228
|
lastLoginAt: Date;
|
|
212
229
|
lastLoginIp: string;
|
|
213
230
|
refreshTokens: RefreshToken[];
|
|
231
|
+
otps: Otp[];
|
|
214
232
|
resumeParserLogs: ResumeParserLog[];
|
|
215
233
|
}
|
|
216
234
|
|
|
217
|
-
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, CreateSubAdminDto, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type
|
|
235
|
+
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, CreateSubAdminDto, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JobRMQAdapter, JobTCPAdapter, LoginDto, LogoutDto, Otp, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
|
package/dist/index.js
CHANGED
|
@@ -36,12 +36,13 @@ __export(index_exports, {
|
|
|
36
36
|
JobTCPAdapter: () => JobTCPAdapter,
|
|
37
37
|
LoginDto: () => LoginDto,
|
|
38
38
|
LogoutDto: () => LogoutDto,
|
|
39
|
+
Otp: () => Otp,
|
|
39
40
|
RESUME_PARSER_PATTERN: () => RESUME_PARSER_PATTERN,
|
|
40
41
|
RefreshDto: () => RefreshDto,
|
|
41
42
|
RefreshToken: () => RefreshToken,
|
|
42
43
|
ResumeParserLog: () => ResumeParserLog,
|
|
43
44
|
SUBADMIN_PATTERN: () => SUBADMIN_PATTERN,
|
|
44
|
-
|
|
45
|
+
UpdateSubAdminAccountStatusDto: () => UpdateSubAdminAccountStatusDto,
|
|
45
46
|
UpdateSubAdminDto: () => UpdateSubAdminDto,
|
|
46
47
|
User: () => User,
|
|
47
48
|
UserRMQAdapter: () => UserRMQAdapter,
|
|
@@ -99,7 +100,7 @@ var SUBADMIN_PATTERN = {
|
|
|
99
100
|
fetchSubAdminDropdown: "fetch.subadmin.dropdown",
|
|
100
101
|
findSubAdminById: "fetch.subadmin.by.id",
|
|
101
102
|
createSubAdmin: "create.subadmin",
|
|
102
|
-
|
|
103
|
+
updateSubAdminAccountStatus: "update.subadmin.account.status",
|
|
103
104
|
updateSubAdmin: "update.subadmin",
|
|
104
105
|
deleteSubAdmin: "delete.subadmin"
|
|
105
106
|
};
|
|
@@ -127,19 +128,22 @@ __decorateClass([
|
|
|
127
128
|
(0, import_class_validator4.IsNotEmpty)({ message: "Please enter mobile number." })
|
|
128
129
|
], CreateSubAdminDto.prototype, "mobile", 2);
|
|
129
130
|
__decorateClass([
|
|
130
|
-
(0, import_class_validator4.IsNotEmpty)({ message: "Please enter
|
|
131
|
+
(0, import_class_validator4.IsNotEmpty)({ message: "Please enter the password." })
|
|
132
|
+
], CreateSubAdminDto.prototype, "password", 2);
|
|
133
|
+
__decorateClass([
|
|
134
|
+
(0, import_class_validator4.IsNotEmpty)({ message: "Please enter account type." })
|
|
131
135
|
], CreateSubAdminDto.prototype, "accountType", 2);
|
|
132
136
|
__decorateClass([
|
|
133
137
|
(0, import_class_validator4.IsNotEmpty)({ message: "Please enter account status." })
|
|
134
138
|
], CreateSubAdminDto.prototype, "accountStatus", 2);
|
|
135
139
|
|
|
136
|
-
// src/modules/user/subadmin/dto/
|
|
140
|
+
// src/modules/user/subadmin/dto/update-subadmin-status.dto.ts
|
|
137
141
|
var import_class_validator5 = require("class-validator");
|
|
138
|
-
var
|
|
142
|
+
var UpdateSubAdminAccountStatusDto = class {
|
|
139
143
|
};
|
|
140
144
|
__decorateClass([
|
|
141
|
-
(0, import_class_validator5.
|
|
142
|
-
],
|
|
145
|
+
(0, import_class_validator5.IsString)()
|
|
146
|
+
], UpdateSubAdminAccountStatusDto.prototype, "accountStatus", 2);
|
|
143
147
|
|
|
144
148
|
// src/modules/user/subadmin/dto/update-subadmin.dto.ts
|
|
145
149
|
var import_class_validator6 = require("class-validator");
|
|
@@ -164,7 +168,10 @@ __decorateClass([
|
|
|
164
168
|
(0, import_class_validator6.IsNotEmpty)({ message: "Please enter mobile number." })
|
|
165
169
|
], UpdateSubAdminDto.prototype, "mobile", 2);
|
|
166
170
|
__decorateClass([
|
|
167
|
-
(0, import_class_validator6.IsNotEmpty)({ message: "Please enter
|
|
171
|
+
(0, import_class_validator6.IsNotEmpty)({ message: "Please enter the password." })
|
|
172
|
+
], UpdateSubAdminDto.prototype, "password", 2);
|
|
173
|
+
__decorateClass([
|
|
174
|
+
(0, import_class_validator6.IsNotEmpty)({ message: "Please enter account type." })
|
|
168
175
|
], UpdateSubAdminDto.prototype, "accountType", 2);
|
|
169
176
|
__decorateClass([
|
|
170
177
|
(0, import_class_validator6.IsNotEmpty)({ message: "Please enter account status." })
|
|
@@ -352,7 +359,7 @@ __decorateClass([
|
|
|
352
359
|
], BaseEntity.prototype, "deletedAt", 2);
|
|
353
360
|
|
|
354
361
|
// src/entities/user.entity.ts
|
|
355
|
-
var
|
|
362
|
+
var import_typeorm5 = require("typeorm");
|
|
356
363
|
|
|
357
364
|
// src/entities/refresh-token.entity.ts
|
|
358
365
|
var import_typeorm2 = require("typeorm");
|
|
@@ -426,6 +433,53 @@ ResumeParserLog = __decorateClass([
|
|
|
426
433
|
(0, import_typeorm3.Entity)("resume_parser_logs")
|
|
427
434
|
], ResumeParserLog);
|
|
428
435
|
|
|
436
|
+
// src/entities/otp.entity.ts
|
|
437
|
+
var import_typeorm4 = require("typeorm");
|
|
438
|
+
var Otp = class {
|
|
439
|
+
};
|
|
440
|
+
__decorateClass([
|
|
441
|
+
(0, import_typeorm4.PrimaryGeneratedColumn)("increment", { type: "integer" })
|
|
442
|
+
], Otp.prototype, "id", 2);
|
|
443
|
+
// individual index to find OTPs by user
|
|
444
|
+
__decorateClass([
|
|
445
|
+
(0, import_typeorm4.Column)({ name: "user_id", type: "integer", nullable: true }),
|
|
446
|
+
(0, import_typeorm4.Index)()
|
|
447
|
+
], Otp.prototype, "userId", 2);
|
|
448
|
+
__decorateClass([
|
|
449
|
+
(0, import_typeorm4.Column)({ name: "otp", type: "varchar", length: 4 }),
|
|
450
|
+
(0, import_typeorm4.Index)()
|
|
451
|
+
], Otp.prototype, "otp", 2);
|
|
452
|
+
__decorateClass([
|
|
453
|
+
(0, import_typeorm4.Column)({ name: "otp_purpose", type: "varchar", length: 50 })
|
|
454
|
+
], Otp.prototype, "otpPurpose", 2);
|
|
455
|
+
__decorateClass([
|
|
456
|
+
(0, import_typeorm4.Column)({ name: "target", type: "varchar", nullable: true }),
|
|
457
|
+
(0, import_typeorm4.Index)()
|
|
458
|
+
], Otp.prototype, "target", 2);
|
|
459
|
+
// support expiration checks
|
|
460
|
+
__decorateClass([
|
|
461
|
+
(0, import_typeorm4.Column)({ name: "expire_at", type: "timestamp" }),
|
|
462
|
+
(0, import_typeorm4.Index)()
|
|
463
|
+
], Otp.prototype, "expiresAt", 2);
|
|
464
|
+
__decorateClass([
|
|
465
|
+
(0, import_typeorm4.Column)({ name: "is_used", type: "boolean", default: false }),
|
|
466
|
+
(0, import_typeorm4.Index)()
|
|
467
|
+
], Otp.prototype, "isUsed", 2);
|
|
468
|
+
__decorateClass([
|
|
469
|
+
(0, import_typeorm4.Column)({ name: "resend_count", type: "int", default: 0 })
|
|
470
|
+
], Otp.prototype, "resendCount", 2);
|
|
471
|
+
__decorateClass([
|
|
472
|
+
(0, import_typeorm4.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
|
|
473
|
+
], Otp.prototype, "createdAt", 2);
|
|
474
|
+
__decorateClass([
|
|
475
|
+
(0, import_typeorm4.ManyToOne)(() => User, (user) => user.otps),
|
|
476
|
+
(0, import_typeorm4.JoinColumn)({ name: "user_id" })
|
|
477
|
+
], Otp.prototype, "user", 2);
|
|
478
|
+
Otp = __decorateClass([
|
|
479
|
+
(0, import_typeorm4.Entity)("otps"),
|
|
480
|
+
(0, import_typeorm4.Index)(["userId", "otp", "otp_purpose", "is_used"])
|
|
481
|
+
], Otp);
|
|
482
|
+
|
|
429
483
|
// src/entities/user.entity.ts
|
|
430
484
|
var AccountType = /* @__PURE__ */ ((AccountType2) => {
|
|
431
485
|
AccountType2["ADMIN"] = "ADMIN";
|
|
@@ -444,37 +498,37 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
|
444
498
|
var User = class extends BaseEntity {
|
|
445
499
|
};
|
|
446
500
|
__decorateClass([
|
|
447
|
-
(0,
|
|
501
|
+
(0, import_typeorm5.Column)({ name: "unique_id", type: "varchar", unique: true })
|
|
448
502
|
], User.prototype, "uniqueId", 2);
|
|
449
503
|
__decorateClass([
|
|
450
|
-
(0,
|
|
504
|
+
(0, import_typeorm5.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
|
|
451
505
|
], User.prototype, "username", 2);
|
|
452
506
|
__decorateClass([
|
|
453
|
-
(0,
|
|
507
|
+
(0, import_typeorm5.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
|
|
454
508
|
], User.prototype, "firstName", 2);
|
|
455
509
|
__decorateClass([
|
|
456
|
-
(0,
|
|
510
|
+
(0, import_typeorm5.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
|
|
457
511
|
], User.prototype, "lastName", 2);
|
|
458
512
|
__decorateClass([
|
|
459
|
-
(0,
|
|
513
|
+
(0, import_typeorm5.Column)({ name: "date_of_birth", type: "date", nullable: true })
|
|
460
514
|
], User.prototype, "dateOfBirth", 2);
|
|
461
515
|
__decorateClass([
|
|
462
|
-
(0,
|
|
516
|
+
(0, import_typeorm5.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
|
|
463
517
|
], User.prototype, "gender", 2);
|
|
464
518
|
__decorateClass([
|
|
465
|
-
(0,
|
|
519
|
+
(0, import_typeorm5.Column)({ name: "profile_picture_url", type: "text", nullable: true })
|
|
466
520
|
], User.prototype, "profilePictureUrl", 2);
|
|
467
521
|
__decorateClass([
|
|
468
|
-
(0,
|
|
522
|
+
(0, import_typeorm5.Column)({ name: "email", type: "varchar", unique: true })
|
|
469
523
|
], User.prototype, "email", 2);
|
|
470
524
|
__decorateClass([
|
|
471
|
-
(0,
|
|
525
|
+
(0, import_typeorm5.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
|
|
472
526
|
], User.prototype, "mobile", 2);
|
|
473
527
|
__decorateClass([
|
|
474
|
-
(0,
|
|
528
|
+
(0, import_typeorm5.Column)({ name: "password", type: "varchar" })
|
|
475
529
|
], User.prototype, "password", 2);
|
|
476
530
|
__decorateClass([
|
|
477
|
-
(0,
|
|
531
|
+
(0, import_typeorm5.Column)({
|
|
478
532
|
name: "account_type",
|
|
479
533
|
type: "enum",
|
|
480
534
|
enum: AccountType,
|
|
@@ -482,7 +536,7 @@ __decorateClass([
|
|
|
482
536
|
})
|
|
483
537
|
], User.prototype, "accountType", 2);
|
|
484
538
|
__decorateClass([
|
|
485
|
-
(0,
|
|
539
|
+
(0, import_typeorm5.Column)({
|
|
486
540
|
name: "account_status",
|
|
487
541
|
type: "enum",
|
|
488
542
|
enum: AccountStatus,
|
|
@@ -490,25 +544,28 @@ __decorateClass([
|
|
|
490
544
|
})
|
|
491
545
|
], User.prototype, "accountStatus", 2);
|
|
492
546
|
__decorateClass([
|
|
493
|
-
(0,
|
|
547
|
+
(0, import_typeorm5.Column)({ name: "is_email_verified", type: "boolean", default: false })
|
|
494
548
|
], User.prototype, "isEmailVerified", 2);
|
|
495
549
|
__decorateClass([
|
|
496
|
-
(0,
|
|
550
|
+
(0, import_typeorm5.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
|
|
497
551
|
], User.prototype, "isMobileVerified", 2);
|
|
498
552
|
__decorateClass([
|
|
499
|
-
(0,
|
|
553
|
+
(0, import_typeorm5.Column)({ name: "last_login_at", type: "timestamp with time zone", nullable: true })
|
|
500
554
|
], User.prototype, "lastLoginAt", 2);
|
|
501
555
|
__decorateClass([
|
|
502
|
-
(0,
|
|
556
|
+
(0, import_typeorm5.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
|
|
503
557
|
], User.prototype, "lastLoginIp", 2);
|
|
504
558
|
__decorateClass([
|
|
505
|
-
(0,
|
|
559
|
+
(0, import_typeorm5.OneToMany)(() => RefreshToken, (token) => token.user)
|
|
506
560
|
], User.prototype, "refreshTokens", 2);
|
|
507
561
|
__decorateClass([
|
|
508
|
-
(0,
|
|
562
|
+
(0, import_typeorm5.OneToMany)(() => Otp, (otp) => otp.user)
|
|
563
|
+
], User.prototype, "otps", 2);
|
|
564
|
+
__decorateClass([
|
|
565
|
+
(0, import_typeorm5.OneToMany)(() => ResumeParserLog, (resumeParser) => resumeParser.user)
|
|
509
566
|
], User.prototype, "resumeParserLogs", 2);
|
|
510
567
|
User = __decorateClass([
|
|
511
|
-
(0,
|
|
568
|
+
(0, import_typeorm5.Entity)("users")
|
|
512
569
|
], User);
|
|
513
570
|
// Annotate the CommonJS export names for ESM import in node:
|
|
514
571
|
0 && (module.exports = {
|
|
@@ -521,12 +578,13 @@ User = __decorateClass([
|
|
|
521
578
|
JobTCPAdapter,
|
|
522
579
|
LoginDto,
|
|
523
580
|
LogoutDto,
|
|
581
|
+
Otp,
|
|
524
582
|
RESUME_PARSER_PATTERN,
|
|
525
583
|
RefreshDto,
|
|
526
584
|
RefreshToken,
|
|
527
585
|
ResumeParserLog,
|
|
528
586
|
SUBADMIN_PATTERN,
|
|
529
|
-
|
|
587
|
+
UpdateSubAdminAccountStatusDto,
|
|
530
588
|
UpdateSubAdminDto,
|
|
531
589
|
User,
|
|
532
590
|
UserRMQAdapter,
|
package/dist/index.mjs
CHANGED
|
@@ -65,7 +65,7 @@ var SUBADMIN_PATTERN = {
|
|
|
65
65
|
fetchSubAdminDropdown: "fetch.subadmin.dropdown",
|
|
66
66
|
findSubAdminById: "fetch.subadmin.by.id",
|
|
67
67
|
createSubAdmin: "create.subadmin",
|
|
68
|
-
|
|
68
|
+
updateSubAdminAccountStatus: "update.subadmin.account.status",
|
|
69
69
|
updateSubAdmin: "update.subadmin",
|
|
70
70
|
deleteSubAdmin: "delete.subadmin"
|
|
71
71
|
};
|
|
@@ -95,19 +95,22 @@ __decorateClass([
|
|
|
95
95
|
IsNotEmpty4({ message: "Please enter mobile number." })
|
|
96
96
|
], CreateSubAdminDto.prototype, "mobile", 2);
|
|
97
97
|
__decorateClass([
|
|
98
|
-
IsNotEmpty4({ message: "Please enter
|
|
98
|
+
IsNotEmpty4({ message: "Please enter the password." })
|
|
99
|
+
], CreateSubAdminDto.prototype, "password", 2);
|
|
100
|
+
__decorateClass([
|
|
101
|
+
IsNotEmpty4({ message: "Please enter account type." })
|
|
99
102
|
], CreateSubAdminDto.prototype, "accountType", 2);
|
|
100
103
|
__decorateClass([
|
|
101
104
|
IsNotEmpty4({ message: "Please enter account status." })
|
|
102
105
|
], CreateSubAdminDto.prototype, "accountStatus", 2);
|
|
103
106
|
|
|
104
|
-
// src/modules/user/subadmin/dto/
|
|
105
|
-
import {
|
|
106
|
-
var
|
|
107
|
+
// src/modules/user/subadmin/dto/update-subadmin-status.dto.ts
|
|
108
|
+
import { IsString } from "class-validator";
|
|
109
|
+
var UpdateSubAdminAccountStatusDto = class {
|
|
107
110
|
};
|
|
108
111
|
__decorateClass([
|
|
109
|
-
|
|
110
|
-
],
|
|
112
|
+
IsString()
|
|
113
|
+
], UpdateSubAdminAccountStatusDto.prototype, "accountStatus", 2);
|
|
111
114
|
|
|
112
115
|
// src/modules/user/subadmin/dto/update-subadmin.dto.ts
|
|
113
116
|
import { IsNotEmpty as IsNotEmpty5 } from "class-validator";
|
|
@@ -132,7 +135,10 @@ __decorateClass([
|
|
|
132
135
|
IsNotEmpty5({ message: "Please enter mobile number." })
|
|
133
136
|
], UpdateSubAdminDto.prototype, "mobile", 2);
|
|
134
137
|
__decorateClass([
|
|
135
|
-
IsNotEmpty5({ message: "Please enter
|
|
138
|
+
IsNotEmpty5({ message: "Please enter the password." })
|
|
139
|
+
], UpdateSubAdminDto.prototype, "password", 2);
|
|
140
|
+
__decorateClass([
|
|
141
|
+
IsNotEmpty5({ message: "Please enter account type." })
|
|
136
142
|
], UpdateSubAdminDto.prototype, "accountType", 2);
|
|
137
143
|
__decorateClass([
|
|
138
144
|
IsNotEmpty5({ message: "Please enter account status." })
|
|
@@ -327,7 +333,7 @@ __decorateClass([
|
|
|
327
333
|
], BaseEntity.prototype, "deletedAt", 2);
|
|
328
334
|
|
|
329
335
|
// src/entities/user.entity.ts
|
|
330
|
-
import { Entity as
|
|
336
|
+
import { Entity as Entity4, Column as Column5, OneToMany } from "typeorm";
|
|
331
337
|
|
|
332
338
|
// src/entities/refresh-token.entity.ts
|
|
333
339
|
import {
|
|
@@ -416,6 +422,61 @@ ResumeParserLog = __decorateClass([
|
|
|
416
422
|
Entity2("resume_parser_logs")
|
|
417
423
|
], ResumeParserLog);
|
|
418
424
|
|
|
425
|
+
// src/entities/otp.entity.ts
|
|
426
|
+
import {
|
|
427
|
+
Entity as Entity3,
|
|
428
|
+
PrimaryGeneratedColumn as PrimaryGeneratedColumn4,
|
|
429
|
+
Column as Column4,
|
|
430
|
+
CreateDateColumn as CreateDateColumn4,
|
|
431
|
+
ManyToOne as ManyToOne3,
|
|
432
|
+
JoinColumn as JoinColumn3,
|
|
433
|
+
Index
|
|
434
|
+
} from "typeorm";
|
|
435
|
+
var Otp = class {
|
|
436
|
+
};
|
|
437
|
+
__decorateClass([
|
|
438
|
+
PrimaryGeneratedColumn4("increment", { type: "integer" })
|
|
439
|
+
], Otp.prototype, "id", 2);
|
|
440
|
+
// individual index to find OTPs by user
|
|
441
|
+
__decorateClass([
|
|
442
|
+
Column4({ name: "user_id", type: "integer", nullable: true }),
|
|
443
|
+
Index()
|
|
444
|
+
], Otp.prototype, "userId", 2);
|
|
445
|
+
__decorateClass([
|
|
446
|
+
Column4({ name: "otp", type: "varchar", length: 4 }),
|
|
447
|
+
Index()
|
|
448
|
+
], Otp.prototype, "otp", 2);
|
|
449
|
+
__decorateClass([
|
|
450
|
+
Column4({ name: "otp_purpose", type: "varchar", length: 50 })
|
|
451
|
+
], Otp.prototype, "otpPurpose", 2);
|
|
452
|
+
__decorateClass([
|
|
453
|
+
Column4({ name: "target", type: "varchar", nullable: true }),
|
|
454
|
+
Index()
|
|
455
|
+
], Otp.prototype, "target", 2);
|
|
456
|
+
// support expiration checks
|
|
457
|
+
__decorateClass([
|
|
458
|
+
Column4({ name: "expire_at", type: "timestamp" }),
|
|
459
|
+
Index()
|
|
460
|
+
], Otp.prototype, "expiresAt", 2);
|
|
461
|
+
__decorateClass([
|
|
462
|
+
Column4({ name: "is_used", type: "boolean", default: false }),
|
|
463
|
+
Index()
|
|
464
|
+
], Otp.prototype, "isUsed", 2);
|
|
465
|
+
__decorateClass([
|
|
466
|
+
Column4({ name: "resend_count", type: "int", default: 0 })
|
|
467
|
+
], Otp.prototype, "resendCount", 2);
|
|
468
|
+
__decorateClass([
|
|
469
|
+
CreateDateColumn4({ name: "created_at", type: "timestamp with time zone" })
|
|
470
|
+
], Otp.prototype, "createdAt", 2);
|
|
471
|
+
__decorateClass([
|
|
472
|
+
ManyToOne3(() => User, (user) => user.otps),
|
|
473
|
+
JoinColumn3({ name: "user_id" })
|
|
474
|
+
], Otp.prototype, "user", 2);
|
|
475
|
+
Otp = __decorateClass([
|
|
476
|
+
Entity3("otps"),
|
|
477
|
+
Index(["userId", "otp", "otp_purpose", "is_used"])
|
|
478
|
+
], Otp);
|
|
479
|
+
|
|
419
480
|
// src/entities/user.entity.ts
|
|
420
481
|
var AccountType = /* @__PURE__ */ ((AccountType2) => {
|
|
421
482
|
AccountType2["ADMIN"] = "ADMIN";
|
|
@@ -434,37 +495,37 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
|
|
|
434
495
|
var User = class extends BaseEntity {
|
|
435
496
|
};
|
|
436
497
|
__decorateClass([
|
|
437
|
-
|
|
498
|
+
Column5({ name: "unique_id", type: "varchar", unique: true })
|
|
438
499
|
], User.prototype, "uniqueId", 2);
|
|
439
500
|
__decorateClass([
|
|
440
|
-
|
|
501
|
+
Column5({ name: "username", type: "varchar", unique: true, nullable: true })
|
|
441
502
|
], User.prototype, "username", 2);
|
|
442
503
|
__decorateClass([
|
|
443
|
-
|
|
504
|
+
Column5({ name: "first_name", type: "varchar", length: 100, nullable: true })
|
|
444
505
|
], User.prototype, "firstName", 2);
|
|
445
506
|
__decorateClass([
|
|
446
|
-
|
|
507
|
+
Column5({ name: "last_name", type: "varchar", length: 100, nullable: true })
|
|
447
508
|
], User.prototype, "lastName", 2);
|
|
448
509
|
__decorateClass([
|
|
449
|
-
|
|
510
|
+
Column5({ name: "date_of_birth", type: "date", nullable: true })
|
|
450
511
|
], User.prototype, "dateOfBirth", 2);
|
|
451
512
|
__decorateClass([
|
|
452
|
-
|
|
513
|
+
Column5({ name: "gender", type: "varchar", length: 10, nullable: true })
|
|
453
514
|
], User.prototype, "gender", 2);
|
|
454
515
|
__decorateClass([
|
|
455
|
-
|
|
516
|
+
Column5({ name: "profile_picture_url", type: "text", nullable: true })
|
|
456
517
|
], User.prototype, "profilePictureUrl", 2);
|
|
457
518
|
__decorateClass([
|
|
458
|
-
|
|
519
|
+
Column5({ name: "email", type: "varchar", unique: true })
|
|
459
520
|
], User.prototype, "email", 2);
|
|
460
521
|
__decorateClass([
|
|
461
|
-
|
|
522
|
+
Column5({ name: "mobile", type: "varchar", unique: true, nullable: true })
|
|
462
523
|
], User.prototype, "mobile", 2);
|
|
463
524
|
__decorateClass([
|
|
464
|
-
|
|
525
|
+
Column5({ name: "password", type: "varchar" })
|
|
465
526
|
], User.prototype, "password", 2);
|
|
466
527
|
__decorateClass([
|
|
467
|
-
|
|
528
|
+
Column5({
|
|
468
529
|
name: "account_type",
|
|
469
530
|
type: "enum",
|
|
470
531
|
enum: AccountType,
|
|
@@ -472,7 +533,7 @@ __decorateClass([
|
|
|
472
533
|
})
|
|
473
534
|
], User.prototype, "accountType", 2);
|
|
474
535
|
__decorateClass([
|
|
475
|
-
|
|
536
|
+
Column5({
|
|
476
537
|
name: "account_status",
|
|
477
538
|
type: "enum",
|
|
478
539
|
enum: AccountStatus,
|
|
@@ -480,25 +541,28 @@ __decorateClass([
|
|
|
480
541
|
})
|
|
481
542
|
], User.prototype, "accountStatus", 2);
|
|
482
543
|
__decorateClass([
|
|
483
|
-
|
|
544
|
+
Column5({ name: "is_email_verified", type: "boolean", default: false })
|
|
484
545
|
], User.prototype, "isEmailVerified", 2);
|
|
485
546
|
__decorateClass([
|
|
486
|
-
|
|
547
|
+
Column5({ name: "is_mobile_verified", type: "boolean", default: false })
|
|
487
548
|
], User.prototype, "isMobileVerified", 2);
|
|
488
549
|
__decorateClass([
|
|
489
|
-
|
|
550
|
+
Column5({ name: "last_login_at", type: "timestamp with time zone", nullable: true })
|
|
490
551
|
], User.prototype, "lastLoginAt", 2);
|
|
491
552
|
__decorateClass([
|
|
492
|
-
|
|
553
|
+
Column5({ name: "last_login_ip", type: "varchar", nullable: true })
|
|
493
554
|
], User.prototype, "lastLoginIp", 2);
|
|
494
555
|
__decorateClass([
|
|
495
556
|
OneToMany(() => RefreshToken, (token) => token.user)
|
|
496
557
|
], User.prototype, "refreshTokens", 2);
|
|
558
|
+
__decorateClass([
|
|
559
|
+
OneToMany(() => Otp, (otp) => otp.user)
|
|
560
|
+
], User.prototype, "otps", 2);
|
|
497
561
|
__decorateClass([
|
|
498
562
|
OneToMany(() => ResumeParserLog, (resumeParser) => resumeParser.user)
|
|
499
563
|
], User.prototype, "resumeParserLogs", 2);
|
|
500
564
|
User = __decorateClass([
|
|
501
|
-
|
|
565
|
+
Entity4("users")
|
|
502
566
|
], User);
|
|
503
567
|
export {
|
|
504
568
|
AUTHENTICATION_PATTERN,
|
|
@@ -510,12 +574,13 @@ export {
|
|
|
510
574
|
JobTCPAdapter,
|
|
511
575
|
LoginDto,
|
|
512
576
|
LogoutDto,
|
|
577
|
+
Otp,
|
|
513
578
|
RESUME_PARSER_PATTERN,
|
|
514
579
|
RefreshDto,
|
|
515
580
|
RefreshToken,
|
|
516
581
|
ResumeParserLog,
|
|
517
582
|
SUBADMIN_PATTERN,
|
|
518
|
-
|
|
583
|
+
UpdateSubAdminAccountStatusDto,
|
|
519
584
|
UpdateSubAdminDto,
|
|
520
585
|
User,
|
|
521
586
|
UserRMQAdapter,
|
|
@@ -29,6 +29,7 @@ export interface ICreateSubAdminPayload {
|
|
|
29
29
|
lastName: string;
|
|
30
30
|
email: string;
|
|
31
31
|
mobile: string;
|
|
32
|
+
password: string;
|
|
32
33
|
accountType: string;
|
|
33
34
|
accountStatus: string;
|
|
34
35
|
}
|
|
@@ -44,6 +45,7 @@ export interface IUpdateSubAdminPayload {
|
|
|
44
45
|
lastName: string;
|
|
45
46
|
email: string;
|
|
46
47
|
mobile: string;
|
|
48
|
+
password: string;
|
|
47
49
|
accountType: string;
|
|
48
50
|
accountStatus: string;
|
|
49
51
|
}
|
|
@@ -52,10 +54,10 @@ export interface IUpdateSubAdminResponse {
|
|
|
52
54
|
status: boolean;
|
|
53
55
|
message: string;
|
|
54
56
|
}
|
|
55
|
-
export interface
|
|
56
|
-
|
|
57
|
+
export interface IUpdateSubAdminAccountStatusPayload {
|
|
58
|
+
accountSatus: string;
|
|
57
59
|
}
|
|
58
|
-
export interface
|
|
60
|
+
export interface IUpdateSubAdminAccountStatusResponse {
|
|
59
61
|
statusCode: number;
|
|
60
62
|
status: boolean;
|
|
61
63
|
message: string;
|
package/package.json
CHANGED