@lenne.tech/nest-server 10.8.4 → 10.8.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/core/modules/auth/core-auth.controller.js +17 -11
- package/dist/core/modules/auth/core-auth.controller.js.map +1 -1
- package/dist/core/modules/auth/core-auth.model.js +17 -3
- package/dist/core/modules/auth/core-auth.model.js.map +1 -1
- package/dist/core/modules/auth/inputs/core-auth-sign-in.input.js +18 -4
- package/dist/core/modules/auth/inputs/core-auth-sign-in.input.js.map +1 -1
- package/dist/core/modules/user/core-user.model.js +73 -12
- package/dist/core/modules/user/core-user.model.js.map +1 -1
- package/dist/server/modules/auth/auth.module.js +2 -1
- package/dist/server/modules/auth/auth.module.js.map +1 -1
- package/dist/server/server.module.js +2 -1
- package/dist/server/server.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/src/core/modules/auth/core-auth.controller.ts +16 -11
- package/src/core/modules/auth/core-auth.model.ts +18 -4
- package/src/core/modules/auth/inputs/core-auth-sign-in.input.ts +18 -4
- package/src/core/modules/user/core-user.model.ts +73 -12
- package/src/server/modules/auth/auth.module.ts +2 -1
- package/src/server/server.module.ts +2 -1
|
@@ -14,12 +14,13 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CoreAuthController = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
-
const
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
18
|
const current_user_decorator_1 = require("../../common/decorators/current-user.decorator");
|
|
19
19
|
const roles_decorator_1 = require("../../common/decorators/roles.decorator");
|
|
20
20
|
const role_enum_1 = require("../../common/enums/role.enum");
|
|
21
21
|
const config_service_1 = require("../../common/services/config.service");
|
|
22
22
|
const auth_guard_strategy_enum_1 = require("./auth-guard-strategy.enum");
|
|
23
|
+
const core_auth_model_1 = require("./core-auth.model");
|
|
23
24
|
const auth_guard_1 = require("./guards/auth.guard");
|
|
24
25
|
const core_auth_sign_in_input_1 = require("./inputs/core-auth-sign-in.input");
|
|
25
26
|
const core_auth_sign_up_input_1 = require("./inputs/core-auth-sign-up.input");
|
|
@@ -67,42 +68,47 @@ let CoreAuthController = class CoreAuthController {
|
|
|
67
68
|
};
|
|
68
69
|
exports.CoreAuthController = CoreAuthController;
|
|
69
70
|
__decorate([
|
|
71
|
+
(0, swagger_1.ApiOperation)({ description: 'Logs a user out from a specific device' }),
|
|
72
|
+
(0, common_1.Get)('logout'),
|
|
70
73
|
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
71
74
|
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
72
|
-
(0, common_1.Get)(),
|
|
73
75
|
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
74
76
|
__param(1, (0, tokens_decorator_1.Tokens)('token')),
|
|
75
|
-
__param(2, (0, common_1.Res)()),
|
|
76
|
-
__param(3, (0, common_1.
|
|
77
|
+
__param(2, (0, common_1.Res)({ passthrough: true })),
|
|
78
|
+
__param(3, (0, common_1.Query)('allDevices', common_1.ParseBoolPipe)),
|
|
77
79
|
__metadata("design:type", Function),
|
|
78
80
|
__metadata("design:paramtypes", [Object, String, Object, Boolean]),
|
|
79
81
|
__metadata("design:returntype", Promise)
|
|
80
82
|
], CoreAuthController.prototype, "logout", null);
|
|
81
83
|
__decorate([
|
|
84
|
+
(0, swagger_1.ApiResponse)({ type: core_auth_model_1.CoreAuthModel }),
|
|
85
|
+
(0, common_1.Get)('refresh-token'),
|
|
82
86
|
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
83
87
|
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT_REFRESH)),
|
|
84
|
-
(0, common_1.Get)(),
|
|
85
88
|
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
86
89
|
__param(1, (0, tokens_decorator_1.Tokens)('refreshToken')),
|
|
87
|
-
__param(2, (0, common_1.Res)()),
|
|
90
|
+
__param(2, (0, common_1.Res)({ passthrough: true })),
|
|
88
91
|
__metadata("design:type", Function),
|
|
89
92
|
__metadata("design:paramtypes", [Object, String, Object]),
|
|
90
93
|
__metadata("design:returntype", Promise)
|
|
91
94
|
], CoreAuthController.prototype, "refreshToken", null);
|
|
92
95
|
__decorate([
|
|
96
|
+
(0, swagger_1.ApiOperation)({ description: 'Sign in via email and password' }),
|
|
97
|
+
(0, common_1.Post)('signin'),
|
|
93
98
|
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
94
|
-
(0, common_1.
|
|
95
|
-
__param(
|
|
96
|
-
__param(1, (0, common_1.Body)('input')),
|
|
99
|
+
__param(0, (0, common_1.Res)({ passthrough: true })),
|
|
100
|
+
__param(1, (0, common_1.Body)()),
|
|
97
101
|
__metadata("design:type", Function),
|
|
98
102
|
__metadata("design:paramtypes", [Object, core_auth_sign_in_input_1.CoreAuthSignInInput]),
|
|
99
103
|
__metadata("design:returntype", Promise)
|
|
100
104
|
], CoreAuthController.prototype, "signIn", null);
|
|
101
105
|
__decorate([
|
|
106
|
+
(0, swagger_1.ApiBody)({ type: core_auth_sign_up_input_1.CoreAuthSignUpInput }),
|
|
107
|
+
(0, swagger_1.ApiOperation)({ description: 'Sign up via email and password' }),
|
|
108
|
+
(0, common_1.Post)('signup'),
|
|
102
109
|
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
103
|
-
(0, common_1.Post)(),
|
|
104
110
|
__param(0, (0, common_1.Res)()),
|
|
105
|
-
__param(1, (0,
|
|
111
|
+
__param(1, (0, common_1.Body)()),
|
|
106
112
|
__metadata("design:type", Function),
|
|
107
113
|
__metadata("design:paramtypes", [Object, core_auth_sign_up_input_1.CoreAuthSignUpInput]),
|
|
108
114
|
__metadata("design:returntype", Promise)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth.controller.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmG;AACnG,
|
|
1
|
+
{"version":3,"file":"core-auth.controller.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmG;AACnG,6CAAqE;AAGrE,2FAA6E;AAC7E,6EAAgE;AAChE,4DAAwD;AACxD,yEAAqE;AACrE,yEAA+D;AAC/D,uDAAkD;AAClD,oDAAgD;AAChD,8EAAuE;AACvE,8EAAuE;AAEvE,oEAA+D;AAC/D,yDAA4C;AAIrC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAI7B,YACqB,WAA4B,EAC5B,aAA4B;QAD5B,gBAAW,GAAX,WAAW,CAAiB;QAC5B,kBAAa,GAAb,aAAa,CAAe;IAC9C,CAAC;IASE,AAAN,KAAK,CAAC,MAAM,CACK,WAA0B,EACxB,KAAa,EACF,GAAiB,EACT,UAAoB;QAExD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IASK,AAAN,KAAK,CAAC,YAAY,CACD,IAAmB,EACV,YAAoB,EAChB,GAAiB;QAE7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAQK,AAAN,KAAK,CAAC,MAAM,CAA6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;;6CAAQ,6CAAmB;;gDAG7F;AASK;IAJL,IAAA,iBAAO,EAAC,EAAE,IAAI,EAAE,6CAAmB,EAAE,CAAC;IACtC,IAAA,sBAAY,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAC/D,IAAA,aAAI,EAAC,QAAQ,CAAC;IACd,IAAA,uBAAK,EAAC,oBAAQ,CAAC,UAAU,CAAC;IACb,WAAA,IAAA,YAAG,GAAE,CAAA;IAAqB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAQ,6CAAmB;;gDAGxE;6BA/DU,kBAAkB;IAF9B,IAAA,uBAAK,EAAC,oBAAQ,CAAC,KAAK,CAAC;IACrB,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAMiB,mCAAe;QACb,8BAAa;GANtC,kBAAkB,CAgG9B"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CoreAuthModel = void 0;
|
|
13
13
|
const graphql_1 = require("@nestjs/graphql");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
const restricted_decorator_1 = require("../../common/decorators/restricted.decorator");
|
|
15
16
|
const role_enum_1 = require("../../common/enums/role.enum");
|
|
16
17
|
const core_model_model_1 = require("../../common/models/core-model.model");
|
|
@@ -33,18 +34,31 @@ let CoreAuthModel = class CoreAuthModel extends core_model_model_1.CoreModel {
|
|
|
33
34
|
};
|
|
34
35
|
exports.CoreAuthModel = CoreAuthModel;
|
|
35
36
|
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({
|
|
38
|
+
description: 'JSON Web Token(JWT) used for auth',
|
|
39
|
+
example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
|
|
40
|
+
}),
|
|
41
|
+
(0, graphql_1.Field)({ description: 'JSON Web Token(JWT)', nullable: true }),
|
|
36
42
|
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
37
|
-
(0, graphql_1.Field)({ description: 'JavaScript Web Token (JWT)', nullable: true }),
|
|
38
43
|
__metadata("design:type", String)
|
|
39
44
|
], CoreAuthModel.prototype, "token", void 0);
|
|
40
45
|
__decorate([
|
|
41
|
-
(0,
|
|
46
|
+
(0, swagger_1.ApiProperty)({
|
|
47
|
+
description: 'Refresh JSON Web Token(JWT) used for auth',
|
|
48
|
+
example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
|
|
49
|
+
}),
|
|
42
50
|
(0, graphql_1.Field)({ description: 'Refresh token', nullable: true }),
|
|
51
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
43
52
|
__metadata("design:type", String)
|
|
44
53
|
], CoreAuthModel.prototype, "refreshToken", void 0);
|
|
45
54
|
__decorate([
|
|
46
|
-
(0,
|
|
55
|
+
(0, swagger_1.ApiProperty)({
|
|
56
|
+
description: 'User who signed in',
|
|
57
|
+
required: true,
|
|
58
|
+
type: () => core_user_model_1.CoreUserModel,
|
|
59
|
+
}),
|
|
47
60
|
(0, graphql_1.Field)({ description: 'Current user' }),
|
|
61
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
48
62
|
__metadata("design:type", core_user_model_1.CoreUserModel)
|
|
49
63
|
], CoreAuthModel.prototype, "user", void 0);
|
|
50
64
|
exports.CoreAuthModel = CoreAuthModel = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth.model.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAoD;
|
|
1
|
+
{"version":3,"file":"core-auth.model.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAoD;AACpD,6CAA8C;AAE9C,uFAA0E;AAC1E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UAAU,CAAC;IAC/B,IAAA,oBAAU,EAAC,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;GAC7C,aAAa,CA6DzB"}
|
|
@@ -11,6 +11,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CoreAuthSignInInput = void 0;
|
|
13
13
|
const graphql_1 = require("@nestjs/graphql");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
14
16
|
const restricted_decorator_1 = require("../../../common/decorators/restricted.decorator");
|
|
15
17
|
const role_enum_1 = require("../../../common/enums/role.enum");
|
|
16
18
|
const core_input_input_1 = require("../../../common/inputs/core-input.input");
|
|
@@ -25,23 +27,35 @@ let CoreAuthSignInInput = class CoreAuthSignInInput extends core_input_input_1.C
|
|
|
25
27
|
};
|
|
26
28
|
exports.CoreAuthSignInInput = CoreAuthSignInInput;
|
|
27
29
|
__decorate([
|
|
28
|
-
(0,
|
|
30
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Device ID (is created automatically if it is not set)' }),
|
|
29
31
|
(0, graphql_1.Field)({ description: 'Device ID (is created automatically if it is not set)', nullable: true }),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
30
35
|
__metadata("design:type", String)
|
|
31
36
|
], CoreAuthSignInInput.prototype, "deviceId", void 0);
|
|
32
37
|
__decorate([
|
|
33
|
-
(0,
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Device description' }),
|
|
34
39
|
(0, graphql_1.Field)({ description: 'Device description', nullable: true }),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
35
43
|
__metadata("design:type", String)
|
|
36
44
|
], CoreAuthSignInInput.prototype, "deviceDescription", void 0);
|
|
37
45
|
__decorate([
|
|
38
|
-
(0,
|
|
46
|
+
(0, swagger_1.ApiProperty)(),
|
|
39
47
|
(0, graphql_1.Field)({ description: 'Email', nullable: false }),
|
|
48
|
+
(0, class_validator_1.IsEmail)(),
|
|
49
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
50
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
40
51
|
__metadata("design:type", String)
|
|
41
52
|
], CoreAuthSignInInput.prototype, "email", void 0);
|
|
42
53
|
__decorate([
|
|
43
|
-
(0,
|
|
54
|
+
(0, swagger_1.ApiProperty)(),
|
|
44
55
|
(0, graphql_1.Field)({ description: 'Password', nullable: false }),
|
|
56
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
45
59
|
__metadata("design:type", String)
|
|
46
60
|
], CoreAuthSignInInput.prototype, "password", void 0);
|
|
47
61
|
exports.CoreAuthSignInInput = CoreAuthSignInInput = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth-sign-in.input.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/inputs/core-auth-sign-in.input.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmD;
|
|
1
|
+
{"version":3,"file":"core-auth-sign-in.input.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/inputs/core-auth-sign-in.input.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmD;AACnD,6CAAmE;AACnE,qDAA4E;AAE5E,0FAA6E;AAC7E,+DAA2D;AAC3D,8EAAoE;AAO7D,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,S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,CAAC,UAAU,CAAC;IAC/B,IAAA,mBAAS,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;GAC/B,mBAAmB,CAgC/B"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CoreUserModel = void 0;
|
|
13
13
|
const graphql_1 = require("@nestjs/graphql");
|
|
14
14
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
16
|
const class_validator_1 = require("class-validator");
|
|
16
17
|
const restricted_decorator_1 = require("../../common/decorators/restricted.decorator");
|
|
17
18
|
const role_enum_1 = require("../../common/enums/role.enum");
|
|
@@ -62,78 +63,138 @@ let CoreUserModel = class CoreUserModel extends core_persistence_model_1.CorePer
|
|
|
62
63
|
};
|
|
63
64
|
exports.CoreUserModel = CoreUserModel;
|
|
64
65
|
__decorate([
|
|
65
|
-
(0,
|
|
66
|
+
(0, swagger_1.ApiProperty)(),
|
|
66
67
|
(0, graphql_1.Field)({ description: 'Email of the user', nullable: true }),
|
|
67
68
|
(0, mongoose_1.Prop)({ index: true, lowercase: true, trim: true }),
|
|
69
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
68
70
|
__metadata("design:type", String)
|
|
69
71
|
], CoreUserModel.prototype, "email", void 0);
|
|
70
72
|
__decorate([
|
|
71
|
-
(0,
|
|
73
|
+
(0, swagger_1.ApiProperty)(),
|
|
72
74
|
(0, graphql_1.Field)({ description: 'First name of the user', nullable: true }),
|
|
73
75
|
(0, class_validator_1.IsOptional)(),
|
|
74
76
|
(0, mongoose_1.Prop)(),
|
|
77
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
75
78
|
__metadata("design:type", String)
|
|
76
79
|
], CoreUserModel.prototype, "firstName", void 0);
|
|
77
80
|
__decorate([
|
|
78
|
-
(0,
|
|
81
|
+
(0, swagger_1.ApiProperty)(),
|
|
79
82
|
(0, graphql_1.Field)({ description: 'Last name of the user', nullable: true }),
|
|
80
83
|
(0, class_validator_1.IsOptional)(),
|
|
81
84
|
(0, mongoose_1.Prop)(),
|
|
85
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
82
86
|
__metadata("design:type", String)
|
|
83
87
|
], CoreUserModel.prototype, "lastName", void 0);
|
|
84
88
|
__decorate([
|
|
85
|
-
(0,
|
|
89
|
+
(0, swagger_1.ApiProperty)(),
|
|
86
90
|
(0, mongoose_1.Prop)(),
|
|
91
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_NO_ONE),
|
|
87
92
|
__metadata("design:type", String)
|
|
88
93
|
], CoreUserModel.prototype, "password", void 0);
|
|
89
94
|
__decorate([
|
|
90
|
-
(0,
|
|
95
|
+
(0, swagger_1.ApiProperty)(),
|
|
91
96
|
(0, graphql_1.Field)(type => [String], { description: 'Roles of the user', nullable: true }),
|
|
92
97
|
(0, class_validator_1.IsOptional)(),
|
|
93
98
|
(0, mongoose_1.Prop)([String]),
|
|
99
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
94
100
|
__metadata("design:type", Array)
|
|
95
101
|
], CoreUserModel.prototype, "roles", void 0);
|
|
96
102
|
__decorate([
|
|
97
|
-
(0,
|
|
103
|
+
(0, swagger_1.ApiProperty)(),
|
|
98
104
|
(0, graphql_1.Field)({ description: 'Username of the user', nullable: true }),
|
|
99
105
|
(0, class_validator_1.IsOptional)(),
|
|
100
106
|
(0, mongoose_1.Prop)(),
|
|
107
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
101
108
|
__metadata("design:type", String)
|
|
102
109
|
], CoreUserModel.prototype, "username", void 0);
|
|
103
110
|
__decorate([
|
|
104
|
-
(0,
|
|
111
|
+
(0, swagger_1.ApiProperty)(),
|
|
105
112
|
(0, class_validator_1.IsOptional)(),
|
|
106
113
|
(0, mongoose_1.Prop)(),
|
|
114
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_NO_ONE),
|
|
107
115
|
__metadata("design:type", String)
|
|
108
116
|
], CoreUserModel.prototype, "passwordResetToken", void 0);
|
|
109
117
|
__decorate([
|
|
110
|
-
(0,
|
|
118
|
+
(0, swagger_1.ApiProperty)({ isArray: true }),
|
|
111
119
|
(0, class_validator_1.IsOptional)(),
|
|
112
120
|
(0, mongoose_1.Prop)((0, mongoose_1.raw)({})),
|
|
121
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_NO_ONE),
|
|
122
|
+
(0, swagger_1.ApiProperty)({
|
|
123
|
+
additionalProperties: {
|
|
124
|
+
properties: {
|
|
125
|
+
deviceDescription: { description: 'Description of the device from which the token was generated', nullable: true, type: 'string' },
|
|
126
|
+
deviceId: { description: 'ID of the device from which the token was generated', nullable: true, type: 'string' },
|
|
127
|
+
tokenId: { description: 'Token ID to make sure that there is only one RefreshToken for each device', nullable: false, type: 'string' },
|
|
128
|
+
},
|
|
129
|
+
type: 'object',
|
|
130
|
+
},
|
|
131
|
+
description: 'Refresh tokens for devices (key: Token, value: TokenData)',
|
|
132
|
+
example: {
|
|
133
|
+
'49b5c7d6-94ae-4efe-b377-9b50d1a9c2cb': {
|
|
134
|
+
deviceDescription: null,
|
|
135
|
+
deviceId: '49b5c7d6-94ae-4efe-b377-9b50d1a9c2cb',
|
|
136
|
+
tokenId: '50937407-4282-480e-8679-14ecc113f9c7',
|
|
137
|
+
},
|
|
138
|
+
'e9e60a3e-2004-479f-8e79-13a0d1981d76': {
|
|
139
|
+
deviceDescription: null,
|
|
140
|
+
deviceId: 'e9e60a3e-2004-479f-8e79-13a0d1981d76',
|
|
141
|
+
tokenId: '0604aa59-4fc8-4848-9fe7-c12d9cdf6ec0',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
type: 'object',
|
|
145
|
+
}),
|
|
113
146
|
__metadata("design:type", Object)
|
|
114
147
|
], CoreUserModel.prototype, "refreshTokens", void 0);
|
|
115
148
|
__decorate([
|
|
116
|
-
(0,
|
|
149
|
+
(0, swagger_1.ApiProperty)(),
|
|
117
150
|
(0, class_validator_1.IsOptional)(),
|
|
118
151
|
(0, mongoose_1.Prop)((0, mongoose_1.raw)({})),
|
|
152
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_NO_ONE),
|
|
153
|
+
(0, swagger_1.ApiProperty)({
|
|
154
|
+
additionalProperties: {
|
|
155
|
+
properties: {
|
|
156
|
+
createdAt: { description: 'Token Created At', example: 1740037703939, format: 'int64', nullable: true, type: 'number' },
|
|
157
|
+
deviceId: { description: 'ID of the device from which the token was generated', nullable: true, type: 'string' },
|
|
158
|
+
tokenId: { description: 'Token ID to make sure that there is only one RefreshToken for each device', nullable: false, type: 'string' },
|
|
159
|
+
},
|
|
160
|
+
type: 'object',
|
|
161
|
+
},
|
|
162
|
+
description: 'Temporary token for parallel requests during the token refresh process',
|
|
163
|
+
example: {
|
|
164
|
+
'49b5c7d6-94ae-4efe-b377-9b50d1a9c2cb': {
|
|
165
|
+
createdAt: 1740037703939,
|
|
166
|
+
deviceId: '49b5c7d6-94ae-4efe-b377-9b50d1a9c2cb',
|
|
167
|
+
tokenId: '50937407-4282-480e-8679-14ecc113f9c7',
|
|
168
|
+
},
|
|
169
|
+
'f83ae5f6-90bf-4b4e-b318-651e0eaa67ae': {
|
|
170
|
+
createdAt: 1740037703940,
|
|
171
|
+
deviceId: 'f83ae5f6-90bf-4b4e-b318-651e0eaa67ae',
|
|
172
|
+
tokenId: '4f0dc3c5-e74e-41f4-9bd9-642869462c1e',
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
type: 'object',
|
|
176
|
+
}),
|
|
119
177
|
__metadata("design:type", Object)
|
|
120
178
|
], CoreUserModel.prototype, "tempTokens", void 0);
|
|
121
179
|
__decorate([
|
|
122
|
-
(0,
|
|
180
|
+
(0, swagger_1.ApiProperty)(),
|
|
123
181
|
(0, class_validator_1.IsOptional)(),
|
|
124
182
|
(0, mongoose_1.Prop)(),
|
|
183
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_NO_ONE),
|
|
125
184
|
__metadata("design:type", String)
|
|
126
185
|
], CoreUserModel.prototype, "verificationToken", void 0);
|
|
127
186
|
__decorate([
|
|
128
|
-
(0,
|
|
187
|
+
(0, swagger_1.ApiProperty)(),
|
|
129
188
|
(0, graphql_1.Field)(type => Boolean, { description: 'Verification state of the user', nullable: true }),
|
|
130
189
|
(0, mongoose_1.Prop)({ type: Boolean }),
|
|
190
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
131
191
|
__metadata("design:type", Boolean)
|
|
132
192
|
], CoreUserModel.prototype, "verified", void 0);
|
|
133
193
|
__decorate([
|
|
134
|
-
(0,
|
|
194
|
+
(0, swagger_1.ApiProperty)(),
|
|
135
195
|
(0, graphql_1.Field)({ description: 'Verified date', nullable: true }),
|
|
136
196
|
(0, mongoose_1.Prop)(),
|
|
197
|
+
(0, restricted_decorator_1.Restricted)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
137
198
|
__metadata("design:type", Date)
|
|
138
199
|
], CoreUserModel.prototype, "verifiedAt", void 0);
|
|
139
200
|
exports.CoreUserModel = CoreUserModel = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-user.model.js","sourceRoot":"","sources":["../../../../src/core/modules/user/core-user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAoD;AACpD,+CAAuE;AACvE,qDAA6C;AAG7C,uFAA0E;AAC1E,4DAAwD;AACxD,uFAAkF;AAW3E,IAAe,aAAa,GAA5B,MAAe,aAAc,SAAQ,6CAAoB;IAAzD;;
|
|
1
|
+
{"version":3,"file":"core-user.model.js","sourceRoot":"","sources":["../../../../src/core/modules/user/core-user.model.ts"],"names":[],"mappings":";;;;;;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= AuthModule_1 = class AuthModule {
|
|
20
20
|
static forRoot(options) {
|
|
21
21
|
return {
|
|
22
|
-
|
|
22
|
+
controllers: [auth_controller_1.AuthController],
|
|
23
|
+
exports: [auth_controller_1.AuthController, auth_resolver_1.AuthResolver, core_auth_module_1.CoreAuthModule, auth_service_1.AuthService],
|
|
23
24
|
imports: [
|
|
24
25
|
core_auth_module_1.CoreAuthModule.forRoot(user_module_1.UserModule, user_service_1.UserService, {
|
|
25
26
|
...options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../../src/server/modules/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AAGvD,+EAA2E;AAC3E,kFAA6E;AAC7E,qDAAiD;AACjD,uDAAmD;AACnD,uDAAmD;AACnD,mDAA+C;AAC/C,iDAA6C;AAMtC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IAKrB,MAAM,CAAC,OAAO,CAAC,OAAyB;QACtC,OAAO;YACL,OAAO,EAAE,CAAC,gCAAc,EAAE,4BAAY,EAAE,iCAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../../src/server/modules/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AAGvD,+EAA2E;AAC3E,kFAA6E;AAC7E,qDAAiD;AACjD,uDAAmD;AACnD,uDAAmD;AACnD,mDAA+C;AAC/C,iDAA6C;AAMtC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IAKrB,MAAM,CAAC,OAAO,CAAC,OAAyB;QACtC,OAAO;YACL,WAAW,EAAE,CAAC,gCAAc,CAAC;YAC7B,OAAO,EAAE,CAAC,gCAAc,EAAE,4BAAY,EAAE,iCAAc,EAAE,0BAAW,CAAC;YACpE,OAAO,EAAE;gBACP,iCAAc,CAAC,OAAO,CAAC,wBAAU,EAAE,0BAAW,EAAE;oBAC9C,GAAG,OAAO;oBACV,GAAG,EAGF;iBACF,CAAC;aACH;YACD,MAAM,EAAE,YAAU;YAClB,SAAS,EAAE,CAAC,gCAAc,EAAE,4BAAY,EAAE,0BAAW,EAAE,4BAAY,CAAC;SACrE,CAAC;IACJ,CAAC;CACF,CAAA;AAtBY,gCAAU;qBAAV,UAAU;IADtB,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CAsBtB"}
|
|
@@ -16,6 +16,7 @@ const date_scalar_1 = require("../core/common/scalars/date.scalar");
|
|
|
16
16
|
const json_scalar_1 = require("../core/common/scalars/json.scalar");
|
|
17
17
|
const core_auth_service_1 = require("../core/modules/auth/services/core-auth.service");
|
|
18
18
|
const cron_jobs_service_1 = require("./common/services/cron-jobs.service");
|
|
19
|
+
const auth_controller_1 = require("./modules/auth/auth.controller");
|
|
19
20
|
const auth_module_1 = require("./modules/auth/auth.module");
|
|
20
21
|
const file_module_1 = require("./modules/file/file.module");
|
|
21
22
|
const server_controller_1 = require("./server.controller");
|
|
@@ -24,7 +25,7 @@ let ServerModule = class ServerModule {
|
|
|
24
25
|
exports.ServerModule = ServerModule;
|
|
25
26
|
exports.ServerModule = ServerModule = __decorate([
|
|
26
27
|
(0, common_1.Module)({
|
|
27
|
-
controllers: [server_controller_1.ServerController],
|
|
28
|
+
controllers: [server_controller_1.ServerController, auth_controller_1.AuthController],
|
|
28
29
|
exports: [core_module_1.CoreModule, auth_module_1.AuthModule, file_module_1.FileModule],
|
|
29
30
|
imports: [
|
|
30
31
|
core_module_1.CoreModule.forRoot(core_auth_service_1.CoreAuthService, auth_module_1.AuthModule.forRoot(config_env_1.default.jwt), config_env_1.default),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.module.js","sourceRoot":"","sources":["../../src/server/server.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAElD,8CAAsC;AACtC,gDAA4C;AAC5C,kEAAwD;AACxD,oEAAgE;AAChE,oEAA0D;AAC1D,uFAAkF;AAClF,2EAA+D;AAC/D,4DAAwD;AACxD,4DAAwD;AACxD,2DAAuD;AAiChD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAzBxB,IAAA,eAAM,EAAC;QAEN,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAG/
|
|
1
|
+
{"version":3,"file":"server.module.js","sourceRoot":"","sources":["../../src/server/server.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAElD,8CAAsC;AACtC,gDAA4C;AAC5C,kEAAwD;AACxD,oEAAgE;AAChE,oEAA0D;AAC1D,uFAAkF;AAClF,2EAA+D;AAC/D,oEAAgE;AAChE,4DAAwD;AACxD,4DAAwD;AACxD,2DAAuD;AAiChD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAzBxB,IAAA,eAAM,EAAC;QAEN,WAAW,EAAE,CAAC,oCAAgB,EAAE,gCAAc,CAAC;QAG/C,OAAO,EAAE,CAAC,wBAAU,EAAE,wBAAU,EAAE,wBAAU,CAAC;QAG7C,OAAO,EAAE;YAEP,wBAAU,CAAC,OAAO,CAAC,mCAAe,EAAE,wBAAU,CAAC,OAAO,CAAC,oBAAS,CAAC,GAAG,CAAC,EAAE,oBAAS,CAAC;YAGjF,yBAAc,CAAC,OAAO,EAAE;YAIxB,wBAAU,CAAC,OAAO,CAAC,oBAAS,CAAC,GAAG,CAAC;YAGjC,wBAAU;SACX;QAED,SAAS,EAAE,CAAC,gBAAG,EAAE,4BAAQ,EAAE,wBAAU,EAAE,kBAAI,CAAC;KAC7C,CAAC;GACW,YAAY,CAAG"}
|