@experts_hub/shared 1.0.28 → 1.0.30
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/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +33 -0
- package/dist/index.mjs +36 -0
- package/dist/modules/authentication/dto/index.d.ts +3 -0
- package/dist/modules/authentication/dto/login.dto.d.ts +4 -0
- package/dist/modules/authentication/dto/logout.dto.d.ts +3 -0
- package/dist/modules/authentication/dto/refresh.dto.d.ts +3 -0
- package/dist/modules/authentication/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -10,6 +10,19 @@ declare const AUTHENTICATION_PATTERN: {
|
|
|
10
10
|
revokeSession: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
declare class LoginDto {
|
|
14
|
+
email: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class RefreshDto {
|
|
19
|
+
refreshToken: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class LogoutDto {
|
|
23
|
+
refreshToken: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
13
26
|
declare const UserTCPAdapter: () => MicroserviceOptions;
|
|
14
27
|
|
|
15
28
|
declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
@@ -70,4 +83,4 @@ declare class User extends BaseEntity {
|
|
|
70
83
|
refreshTokens: RefreshToken[];
|
|
71
84
|
}
|
|
72
85
|
|
|
73
|
-
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, RefreshToken, User, UserRMQAdapter, UserTCPAdapter };
|
|
86
|
+
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, LoginDto, LogoutDto, RefreshDto, RefreshToken, User, UserRMQAdapter, UserTCPAdapter };
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,19 @@ declare const AUTHENTICATION_PATTERN: {
|
|
|
10
10
|
revokeSession: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
declare class LoginDto {
|
|
14
|
+
email: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class RefreshDto {
|
|
19
|
+
refreshToken: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class LogoutDto {
|
|
23
|
+
refreshToken: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
13
26
|
declare const UserTCPAdapter: () => MicroserviceOptions;
|
|
14
27
|
|
|
15
28
|
declare const UserRMQAdapter: (mode?: string) => MicroserviceOptions;
|
|
@@ -70,4 +83,4 @@ declare class User extends BaseEntity {
|
|
|
70
83
|
refreshTokens: RefreshToken[];
|
|
71
84
|
}
|
|
72
85
|
|
|
73
|
-
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, RefreshToken, User, UserRMQAdapter, UserTCPAdapter };
|
|
86
|
+
export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, LoginDto, LogoutDto, RefreshDto, RefreshToken, User, UserRMQAdapter, UserTCPAdapter };
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,9 @@ __export(index_exports, {
|
|
|
31
31
|
AccountStatus: () => AccountStatus,
|
|
32
32
|
AccountType: () => AccountType,
|
|
33
33
|
BaseEntity: () => BaseEntity,
|
|
34
|
+
LoginDto: () => LoginDto,
|
|
35
|
+
LogoutDto: () => LogoutDto,
|
|
36
|
+
RefreshDto: () => RefreshDto,
|
|
34
37
|
RefreshToken: () => RefreshToken,
|
|
35
38
|
User: () => User,
|
|
36
39
|
UserRMQAdapter: () => UserRMQAdapter,
|
|
@@ -49,6 +52,33 @@ var AUTHENTICATION_PATTERN = {
|
|
|
49
52
|
revokeSession: "revoke.session"
|
|
50
53
|
};
|
|
51
54
|
|
|
55
|
+
// src/modules/authentication/dto/login.dto.ts
|
|
56
|
+
var import_class_validator = require("class-validator");
|
|
57
|
+
var LoginDto = class {
|
|
58
|
+
};
|
|
59
|
+
__decorateClass([
|
|
60
|
+
(0, import_class_validator.IsNotEmpty)({ message: "Please enter email." })
|
|
61
|
+
], LoginDto.prototype, "email", 2);
|
|
62
|
+
__decorateClass([
|
|
63
|
+
(0, import_class_validator.IsNotEmpty)({ message: "Please enter password." })
|
|
64
|
+
], LoginDto.prototype, "password", 2);
|
|
65
|
+
|
|
66
|
+
// src/modules/authentication/dto/refresh.dto.ts
|
|
67
|
+
var import_class_validator2 = require("class-validator");
|
|
68
|
+
var RefreshDto = class {
|
|
69
|
+
};
|
|
70
|
+
__decorateClass([
|
|
71
|
+
(0, import_class_validator2.IsNotEmpty)({ message: "Please provide refresh token." })
|
|
72
|
+
], RefreshDto.prototype, "refreshToken", 2);
|
|
73
|
+
|
|
74
|
+
// src/modules/authentication/dto/logout.dto.ts
|
|
75
|
+
var import_class_validator3 = require("class-validator");
|
|
76
|
+
var LogoutDto = class {
|
|
77
|
+
};
|
|
78
|
+
__decorateClass([
|
|
79
|
+
(0, import_class_validator3.IsNotEmpty)({ message: "Please provide refresh token." })
|
|
80
|
+
], LogoutDto.prototype, "refreshToken", 2);
|
|
81
|
+
|
|
52
82
|
// src/adapters/tcp/user.tcp.adapter.ts
|
|
53
83
|
var import_dotenv = require("dotenv");
|
|
54
84
|
var import_microservices = require("@nestjs/microservices");
|
|
@@ -284,6 +314,9 @@ User = __decorateClass([
|
|
|
284
314
|
AccountStatus,
|
|
285
315
|
AccountType,
|
|
286
316
|
BaseEntity,
|
|
317
|
+
LoginDto,
|
|
318
|
+
LogoutDto,
|
|
319
|
+
RefreshDto,
|
|
287
320
|
RefreshToken,
|
|
288
321
|
User,
|
|
289
322
|
UserRMQAdapter,
|
package/dist/index.mjs
CHANGED
|
@@ -20,6 +20,39 @@ var AUTHENTICATION_PATTERN = {
|
|
|
20
20
|
revokeSession: "revoke.session"
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
// src/modules/authentication/dto/login.dto.ts
|
|
24
|
+
import {
|
|
25
|
+
IsNotEmpty
|
|
26
|
+
} from "class-validator";
|
|
27
|
+
var LoginDto = class {
|
|
28
|
+
};
|
|
29
|
+
__decorateClass([
|
|
30
|
+
IsNotEmpty({ message: "Please enter email." })
|
|
31
|
+
], LoginDto.prototype, "email", 2);
|
|
32
|
+
__decorateClass([
|
|
33
|
+
IsNotEmpty({ message: "Please enter password." })
|
|
34
|
+
], LoginDto.prototype, "password", 2);
|
|
35
|
+
|
|
36
|
+
// src/modules/authentication/dto/refresh.dto.ts
|
|
37
|
+
import {
|
|
38
|
+
IsNotEmpty as IsNotEmpty2
|
|
39
|
+
} from "class-validator";
|
|
40
|
+
var RefreshDto = class {
|
|
41
|
+
};
|
|
42
|
+
__decorateClass([
|
|
43
|
+
IsNotEmpty2({ message: "Please provide refresh token." })
|
|
44
|
+
], RefreshDto.prototype, "refreshToken", 2);
|
|
45
|
+
|
|
46
|
+
// src/modules/authentication/dto/logout.dto.ts
|
|
47
|
+
import {
|
|
48
|
+
IsNotEmpty as IsNotEmpty3
|
|
49
|
+
} from "class-validator";
|
|
50
|
+
var LogoutDto = class {
|
|
51
|
+
};
|
|
52
|
+
__decorateClass([
|
|
53
|
+
IsNotEmpty3({ message: "Please provide refresh token." })
|
|
54
|
+
], LogoutDto.prototype, "refreshToken", 2);
|
|
55
|
+
|
|
23
56
|
// src/adapters/tcp/user.tcp.adapter.ts
|
|
24
57
|
import { config } from "dotenv";
|
|
25
58
|
import { Transport } from "@nestjs/microservices";
|
|
@@ -269,6 +302,9 @@ export {
|
|
|
269
302
|
AccountStatus,
|
|
270
303
|
AccountType,
|
|
271
304
|
BaseEntity,
|
|
305
|
+
LoginDto,
|
|
306
|
+
LogoutDto,
|
|
307
|
+
RefreshDto,
|
|
272
308
|
RefreshToken,
|
|
273
309
|
User,
|
|
274
310
|
UserRMQAdapter,
|