@lenne.tech/nest-server 11.6.2 → 11.7.0
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/config.env.js +2 -11
- package/dist/config.env.js.map +1 -1
- package/dist/core/common/helpers/filter.helper.d.ts +9 -9
- package/dist/core/common/helpers/filter.helper.js +2 -4
- package/dist/core/common/helpers/filter.helper.js.map +1 -1
- package/dist/core/common/helpers/gridfs.helper.js +3 -3
- package/dist/core/common/helpers/gridfs.helper.js.map +1 -1
- package/dist/core/common/interfaces/server-options.interface.d.ts +4 -3
- package/dist/core/common/services/crud.service.d.ts +16 -16
- package/dist/core/common/services/crud.service.js +1 -1
- package/dist/core/common/services/crud.service.js.map +1 -1
- package/dist/core/modules/better-auth/better-auth-models.d.ts +0 -1
- package/dist/core/modules/better-auth/better-auth-models.js +0 -4
- package/dist/core/modules/better-auth/better-auth-models.js.map +1 -1
- package/dist/core/modules/better-auth/better-auth.config.js +3 -0
- package/dist/core/modules/better-auth/better-auth.config.js.map +1 -1
- package/dist/core/modules/better-auth/better-auth.module.d.ts +10 -2
- package/dist/core/modules/better-auth/better-auth.module.js +40 -52
- package/dist/core/modules/better-auth/better-auth.module.js.map +1 -1
- package/dist/core/modules/better-auth/better-auth.resolver.d.ts +8 -12
- package/dist/core/modules/better-auth/better-auth.resolver.js +33 -351
- package/dist/core/modules/better-auth/better-auth.resolver.js.map +1 -1
- package/dist/core/modules/better-auth/better-auth.service.d.ts +0 -1
- package/dist/core/modules/better-auth/better-auth.service.js +0 -3
- package/dist/core/modules/better-auth/better-auth.service.js.map +1 -1
- package/dist/core/modules/better-auth/better-auth.types.d.ts +9 -8
- package/dist/core/modules/better-auth/better-auth.types.js +14 -3
- package/dist/core/modules/better-auth/better-auth.types.js.map +1 -1
- package/dist/core/modules/better-auth/core-better-auth.controller.d.ts +66 -0
- package/dist/core/modules/better-auth/core-better-auth.controller.js +491 -0
- package/dist/core/modules/better-auth/core-better-auth.controller.js.map +1 -0
- package/dist/core/modules/better-auth/core-better-auth.resolver.d.ts +59 -0
- package/dist/core/modules/better-auth/core-better-auth.resolver.js +538 -0
- package/dist/core/modules/better-auth/core-better-auth.resolver.js.map +1 -0
- package/dist/core/modules/better-auth/index.d.ts +2 -0
- package/dist/core/modules/better-auth/index.js +2 -0
- package/dist/core/modules/better-auth/index.js.map +1 -1
- package/dist/core.module.js +1 -1
- package/dist/core.module.js.map +1 -1
- package/dist/server/modules/better-auth/better-auth.controller.d.ts +10 -0
- package/dist/server/modules/better-auth/better-auth.controller.js +36 -0
- package/dist/server/modules/better-auth/better-auth.controller.js.map +1 -0
- package/dist/server/modules/better-auth/better-auth.module.d.ts +9 -0
- package/dist/server/modules/better-auth/better-auth.module.js +44 -0
- package/dist/server/modules/better-auth/better-auth.module.js.map +1 -0
- package/dist/server/modules/better-auth/better-auth.resolver.d.ts +45 -0
- package/dist/server/modules/better-auth/better-auth.resolver.js +221 -0
- package/dist/server/modules/better-auth/better-auth.resolver.js.map +1 -0
- package/dist/server/modules/file/file-info.model.d.ts +71 -3
- package/dist/server/modules/user/user.model.d.ts +169 -3
- package/dist/server/server.module.js +6 -1
- package/dist/server/server.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +20 -29
- package/src/config.env.ts +2 -11
- package/src/core/common/helpers/filter.helper.ts +15 -17
- package/src/core/common/helpers/gridfs.helper.ts +5 -5
- package/src/core/common/interfaces/server-options.interface.ts +47 -14
- package/src/core/common/services/crud.service.ts +22 -22
- package/src/core/modules/better-auth/README.md +365 -39
- package/src/core/modules/better-auth/better-auth-models.ts +0 -3
- package/src/core/modules/better-auth/better-auth.config.ts +5 -0
- package/src/core/modules/better-auth/better-auth.module.ts +107 -66
- package/src/core/modules/better-auth/better-auth.resolver.ts +88 -553
- package/src/core/modules/better-auth/better-auth.service.ts +0 -9
- package/src/core/modules/better-auth/better-auth.types.ts +25 -10
- package/src/core/modules/better-auth/core-better-auth.controller.ts +605 -0
- package/src/core/modules/better-auth/core-better-auth.resolver.ts +705 -0
- package/src/core/modules/better-auth/index.ts +8 -1
- package/src/core.module.ts +3 -2
- package/src/server/modules/better-auth/better-auth.controller.ts +41 -0
- package/src/server/modules/better-auth/better-auth.module.ts +88 -0
- package/src/server/modules/better-auth/better-auth.resolver.ts +201 -0
- package/src/server/server.module.ts +10 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BetterAuthController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const roles_decorator_1 = require("../../../core/common/decorators/roles.decorator");
|
|
15
|
+
const role_enum_1 = require("../../../core/common/enums/role.enum");
|
|
16
|
+
const config_service_1 = require("../../../core/common/services/config.service");
|
|
17
|
+
const better_auth_user_mapper_1 = require("../../../core/modules/better-auth/better-auth-user.mapper");
|
|
18
|
+
const better_auth_service_1 = require("../../../core/modules/better-auth/better-auth.service");
|
|
19
|
+
const core_better_auth_controller_1 = require("../../../core/modules/better-auth/core-better-auth.controller");
|
|
20
|
+
let BetterAuthController = class BetterAuthController extends core_better_auth_controller_1.CoreBetterAuthController {
|
|
21
|
+
constructor(betterAuthService, userMapper, configService) {
|
|
22
|
+
super(betterAuthService, userMapper, configService);
|
|
23
|
+
this.betterAuthService = betterAuthService;
|
|
24
|
+
this.userMapper = userMapper;
|
|
25
|
+
this.configService = configService;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.BetterAuthController = BetterAuthController;
|
|
29
|
+
exports.BetterAuthController = BetterAuthController = __decorate([
|
|
30
|
+
(0, common_1.Controller)('iam'),
|
|
31
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
32
|
+
__metadata("design:paramtypes", [better_auth_service_1.BetterAuthService,
|
|
33
|
+
better_auth_user_mapper_1.BetterAuthUserMapper,
|
|
34
|
+
config_service_1.ConfigService])
|
|
35
|
+
], BetterAuthController);
|
|
36
|
+
//# sourceMappingURL=better-auth.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"better-auth.controller.js","sourceRoot":"","sources":["../../../../src/server/modules/better-auth/better-auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,qFAAwE;AACxE,oEAAgE;AAChE,iFAA6E;AAC7E,uGAAiG;AACjG,+FAA0F;AAC1F,+GAAyG;AAyBlG,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,sDAAwB;IAChE,YAC8B,iBAAoC,EACpC,UAAgC,EAChC,aAA4B;QAExD,KAAK,CAAC,iBAAiB,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;QAJxB,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,eAAU,GAAV,UAAU,CAAsB;QAChC,kBAAa,GAAb,aAAa,CAAe;IAG1D,CAAC;CACF,CAAA;AARY,oDAAoB;+BAApB,oBAAoB;IAFhC,IAAA,mBAAU,EAAC,KAAK,CAAC;IACjB,IAAA,uBAAK,EAAC,oBAAQ,CAAC,KAAK,CAAC;qCAG6B,uCAAiB;QACxB,8CAAoB;QACjB,8BAAa;GAJ/C,oBAAoB,CAQhC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { IBetterAuth } from '../../../core/common/interfaces/server-options.interface';
|
|
3
|
+
export interface ServerBetterAuthModuleOptions {
|
|
4
|
+
config: IBetterAuth;
|
|
5
|
+
fallbackSecrets?: (string | undefined)[];
|
|
6
|
+
}
|
|
7
|
+
export declare class BetterAuthModule {
|
|
8
|
+
static forRoot(options: ServerBetterAuthModuleOptions): DynamicModule;
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var BetterAuthModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.BetterAuthModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const better_auth_module_1 = require("../../../core/modules/better-auth/better-auth.module");
|
|
13
|
+
const better_auth_controller_1 = require("./better-auth.controller");
|
|
14
|
+
const better_auth_resolver_1 = require("./better-auth.resolver");
|
|
15
|
+
let BetterAuthModule = BetterAuthModule_1 = class BetterAuthModule {
|
|
16
|
+
static forRoot(options) {
|
|
17
|
+
const { config, fallbackSecrets } = options;
|
|
18
|
+
if (config?.enabled === false) {
|
|
19
|
+
return {
|
|
20
|
+
exports: [],
|
|
21
|
+
module: BetterAuthModule_1,
|
|
22
|
+
providers: [],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
exports: [better_auth_module_1.BetterAuthModule],
|
|
27
|
+
imports: [
|
|
28
|
+
better_auth_module_1.BetterAuthModule.forRoot({
|
|
29
|
+
config,
|
|
30
|
+
controller: better_auth_controller_1.BetterAuthController,
|
|
31
|
+
fallbackSecrets,
|
|
32
|
+
resolver: better_auth_resolver_1.BetterAuthResolver,
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
module: BetterAuthModule_1,
|
|
36
|
+
providers: [],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.BetterAuthModule = BetterAuthModule;
|
|
41
|
+
exports.BetterAuthModule = BetterAuthModule = BetterAuthModule_1 = __decorate([
|
|
42
|
+
(0, common_1.Module)({})
|
|
43
|
+
], BetterAuthModule);
|
|
44
|
+
//# sourceMappingURL=better-auth.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"better-auth.module.js","sourceRoot":"","sources":["../../../../src/server/modules/better-auth/better-auth.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AAGvD,6FAAgH;AAChH,qEAAgE;AAChE,iEAA4D;AAiDrD,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAO3B,MAAM,CAAC,OAAO,CAAC,OAAsC;QACnD,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;QAG5C,IAAI,MAAM,EAAE,OAAO,KAAK,KAAK,EAAE,CAAC;YAC9B,OAAO;gBACL,OAAO,EAAE,EAAE;gBACX,MAAM,EAAE,kBAAgB;gBACxB,SAAS,EAAE,EAAE;aACd,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC,qCAAoB,CAAC;YAC/B,OAAO,EAAE;gBACP,qCAAoB,CAAC,OAAO,CAAC;oBAC3B,MAAM;oBACN,UAAU,EAAE,6CAAoB;oBAChC,eAAe;oBACf,QAAQ,EAAE,yCAAkB;iBAC7B,CAAC;aACH;YACD,MAAM,EAAE,kBAAgB;YACxB,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;CACF,CAAA;AAjCY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gBAAgB,CAiC5B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Request, Response } from 'express';
|
|
2
|
+
import { BetterAuthAuthModel } from '../../../core/modules/better-auth/better-auth-auth.model';
|
|
3
|
+
import { BetterAuth2FASetupModel, BetterAuthFeaturesModel, BetterAuthPasskeyChallengeModel, BetterAuthPasskeyModel, BetterAuthSessionModel } from '../../../core/modules/better-auth/better-auth-models';
|
|
4
|
+
import { BetterAuthUserMapper } from '../../../core/modules/better-auth/better-auth-user.mapper';
|
|
5
|
+
import { BetterAuthService } from '../../../core/modules/better-auth/better-auth.service';
|
|
6
|
+
import { CoreBetterAuthResolver } from '../../../core/modules/better-auth/core-better-auth.resolver';
|
|
7
|
+
export declare class BetterAuthResolver extends CoreBetterAuthResolver {
|
|
8
|
+
protected readonly betterAuthService: BetterAuthService;
|
|
9
|
+
protected readonly userMapper: BetterAuthUserMapper;
|
|
10
|
+
constructor(betterAuthService: BetterAuthService, userMapper: BetterAuthUserMapper);
|
|
11
|
+
betterAuthSession(ctx: {
|
|
12
|
+
req: Request;
|
|
13
|
+
}): Promise<BetterAuthSessionModel | null>;
|
|
14
|
+
betterAuthEnabled(): boolean;
|
|
15
|
+
betterAuthFeatures(): BetterAuthFeaturesModel;
|
|
16
|
+
betterAuthListPasskeys(ctx: {
|
|
17
|
+
req: Request;
|
|
18
|
+
}): Promise<BetterAuthPasskeyModel[] | null>;
|
|
19
|
+
betterAuthSignIn(email: string, password: string, ctx: {
|
|
20
|
+
req: Request;
|
|
21
|
+
res: Response;
|
|
22
|
+
}): Promise<BetterAuthAuthModel>;
|
|
23
|
+
betterAuthSignUp(email: string, password: string, name?: string): Promise<BetterAuthAuthModel>;
|
|
24
|
+
betterAuthSignOut(ctx: {
|
|
25
|
+
req: Request;
|
|
26
|
+
}): Promise<boolean>;
|
|
27
|
+
betterAuthVerify2FA(code: string, ctx: {
|
|
28
|
+
req: Request;
|
|
29
|
+
}): Promise<BetterAuthAuthModel>;
|
|
30
|
+
betterAuthEnable2FA(password: string, ctx: {
|
|
31
|
+
req: Request;
|
|
32
|
+
}): Promise<BetterAuth2FASetupModel>;
|
|
33
|
+
betterAuthDisable2FA(password: string, ctx: {
|
|
34
|
+
req: Request;
|
|
35
|
+
}): Promise<boolean>;
|
|
36
|
+
betterAuthGenerateBackupCodes(ctx: {
|
|
37
|
+
req: Request;
|
|
38
|
+
}): Promise<null | string[]>;
|
|
39
|
+
betterAuthGetPasskeyChallenge(ctx: {
|
|
40
|
+
req: Request;
|
|
41
|
+
}): Promise<BetterAuthPasskeyChallengeModel>;
|
|
42
|
+
betterAuthDeletePasskey(passkeyId: string, ctx: {
|
|
43
|
+
req: Request;
|
|
44
|
+
}): Promise<boolean>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.BetterAuthResolver = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
18
|
+
const roles_decorator_1 = require("../../../core/common/decorators/roles.decorator");
|
|
19
|
+
const role_enum_1 = require("../../../core/common/enums/role.enum");
|
|
20
|
+
const auth_guard_strategy_enum_1 = require("../../../core/modules/auth/auth-guard-strategy.enum");
|
|
21
|
+
const auth_guard_1 = require("../../../core/modules/auth/guards/auth.guard");
|
|
22
|
+
const better_auth_auth_model_1 = require("../../../core/modules/better-auth/better-auth-auth.model");
|
|
23
|
+
const better_auth_models_1 = require("../../../core/modules/better-auth/better-auth-models");
|
|
24
|
+
const better_auth_user_mapper_1 = require("../../../core/modules/better-auth/better-auth-user.mapper");
|
|
25
|
+
const better_auth_service_1 = require("../../../core/modules/better-auth/better-auth.service");
|
|
26
|
+
const core_better_auth_resolver_1 = require("../../../core/modules/better-auth/core-better-auth.resolver");
|
|
27
|
+
let BetterAuthResolver = class BetterAuthResolver extends core_better_auth_resolver_1.CoreBetterAuthResolver {
|
|
28
|
+
constructor(betterAuthService, userMapper) {
|
|
29
|
+
super(betterAuthService, userMapper);
|
|
30
|
+
this.betterAuthService = betterAuthService;
|
|
31
|
+
this.userMapper = userMapper;
|
|
32
|
+
}
|
|
33
|
+
async betterAuthSession(ctx) {
|
|
34
|
+
return super.betterAuthSession(ctx);
|
|
35
|
+
}
|
|
36
|
+
betterAuthEnabled() {
|
|
37
|
+
return super.betterAuthEnabled();
|
|
38
|
+
}
|
|
39
|
+
betterAuthFeatures() {
|
|
40
|
+
return super.betterAuthFeatures();
|
|
41
|
+
}
|
|
42
|
+
async betterAuthListPasskeys(ctx) {
|
|
43
|
+
return super.betterAuthListPasskeys(ctx);
|
|
44
|
+
}
|
|
45
|
+
async betterAuthSignIn(email, password, ctx) {
|
|
46
|
+
return super.betterAuthSignIn(email, password, ctx);
|
|
47
|
+
}
|
|
48
|
+
async betterAuthSignUp(email, password, name) {
|
|
49
|
+
return super.betterAuthSignUp(email, password, name);
|
|
50
|
+
}
|
|
51
|
+
async betterAuthSignOut(ctx) {
|
|
52
|
+
return super.betterAuthSignOut(ctx);
|
|
53
|
+
}
|
|
54
|
+
async betterAuthVerify2FA(code, ctx) {
|
|
55
|
+
return super.betterAuthVerify2FA(code, ctx);
|
|
56
|
+
}
|
|
57
|
+
async betterAuthEnable2FA(password, ctx) {
|
|
58
|
+
return super.betterAuthEnable2FA(password, ctx);
|
|
59
|
+
}
|
|
60
|
+
async betterAuthDisable2FA(password, ctx) {
|
|
61
|
+
return super.betterAuthDisable2FA(password, ctx);
|
|
62
|
+
}
|
|
63
|
+
async betterAuthGenerateBackupCodes(ctx) {
|
|
64
|
+
return super.betterAuthGenerateBackupCodes(ctx);
|
|
65
|
+
}
|
|
66
|
+
async betterAuthGetPasskeyChallenge(ctx) {
|
|
67
|
+
return super.betterAuthGetPasskeyChallenge(ctx);
|
|
68
|
+
}
|
|
69
|
+
async betterAuthDeletePasskey(passkeyId, ctx) {
|
|
70
|
+
return super.betterAuthDeletePasskey(passkeyId, ctx);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.BetterAuthResolver = BetterAuthResolver;
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, graphql_1.Query)(() => better_auth_models_1.BetterAuthSessionModel, {
|
|
76
|
+
description: 'Get current Better-Auth session',
|
|
77
|
+
nullable: true,
|
|
78
|
+
}),
|
|
79
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
80
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
81
|
+
__param(0, (0, graphql_1.Context)()),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [Object]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], BetterAuthResolver.prototype, "betterAuthSession", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, graphql_1.Query)(() => Boolean, { description: 'Check if Better-Auth is enabled' }),
|
|
88
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", []),
|
|
91
|
+
__metadata("design:returntype", Boolean)
|
|
92
|
+
], BetterAuthResolver.prototype, "betterAuthEnabled", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, graphql_1.Query)(() => better_auth_models_1.BetterAuthFeaturesModel, { description: 'Get enabled Better-Auth features' }),
|
|
95
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", []),
|
|
98
|
+
__metadata("design:returntype", better_auth_models_1.BetterAuthFeaturesModel)
|
|
99
|
+
], BetterAuthResolver.prototype, "betterAuthFeatures", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, graphql_1.Query)(() => [better_auth_models_1.BetterAuthPasskeyModel], {
|
|
102
|
+
description: 'List passkeys for the current user',
|
|
103
|
+
nullable: true,
|
|
104
|
+
}),
|
|
105
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
106
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
107
|
+
__param(0, (0, graphql_1.Context)()),
|
|
108
|
+
__metadata("design:type", Function),
|
|
109
|
+
__metadata("design:paramtypes", [Object]),
|
|
110
|
+
__metadata("design:returntype", Promise)
|
|
111
|
+
], BetterAuthResolver.prototype, "betterAuthListPasskeys", null);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, graphql_1.Mutation)(() => better_auth_auth_model_1.BetterAuthAuthModel, {
|
|
114
|
+
description: 'Sign in via Better-Auth (email/password)',
|
|
115
|
+
}),
|
|
116
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
117
|
+
__param(0, (0, graphql_1.Args)('email')),
|
|
118
|
+
__param(1, (0, graphql_1.Args)('password')),
|
|
119
|
+
__param(2, (0, graphql_1.Context)()),
|
|
120
|
+
__metadata("design:type", Function),
|
|
121
|
+
__metadata("design:paramtypes", [String, String, Object]),
|
|
122
|
+
__metadata("design:returntype", Promise)
|
|
123
|
+
], BetterAuthResolver.prototype, "betterAuthSignIn", null);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, graphql_1.Mutation)(() => better_auth_auth_model_1.BetterAuthAuthModel, {
|
|
126
|
+
description: 'Sign up via Better-Auth (email/password)',
|
|
127
|
+
}),
|
|
128
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
129
|
+
__param(0, (0, graphql_1.Args)('email')),
|
|
130
|
+
__param(1, (0, graphql_1.Args)('password')),
|
|
131
|
+
__param(2, (0, graphql_1.Args)('name', { nullable: true })),
|
|
132
|
+
__metadata("design:type", Function),
|
|
133
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
134
|
+
__metadata("design:returntype", Promise)
|
|
135
|
+
], BetterAuthResolver.prototype, "betterAuthSignUp", null);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, graphql_1.Mutation)(() => Boolean, { description: 'Sign out via Better-Auth' }),
|
|
138
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
139
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
140
|
+
__param(0, (0, graphql_1.Context)()),
|
|
141
|
+
__metadata("design:type", Function),
|
|
142
|
+
__metadata("design:paramtypes", [Object]),
|
|
143
|
+
__metadata("design:returntype", Promise)
|
|
144
|
+
], BetterAuthResolver.prototype, "betterAuthSignOut", null);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, graphql_1.Mutation)(() => better_auth_auth_model_1.BetterAuthAuthModel, {
|
|
147
|
+
description: 'Verify 2FA code during sign-in',
|
|
148
|
+
}),
|
|
149
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_EVERYONE),
|
|
150
|
+
__param(0, (0, graphql_1.Args)('code')),
|
|
151
|
+
__param(1, (0, graphql_1.Context)()),
|
|
152
|
+
__metadata("design:type", Function),
|
|
153
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
154
|
+
__metadata("design:returntype", Promise)
|
|
155
|
+
], BetterAuthResolver.prototype, "betterAuthVerify2FA", null);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, graphql_1.Mutation)(() => better_auth_models_1.BetterAuth2FASetupModel, {
|
|
158
|
+
description: 'Enable 2FA for the current user',
|
|
159
|
+
}),
|
|
160
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
161
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
162
|
+
__param(0, (0, graphql_1.Args)('password')),
|
|
163
|
+
__param(1, (0, graphql_1.Context)()),
|
|
164
|
+
__metadata("design:type", Function),
|
|
165
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
166
|
+
__metadata("design:returntype", Promise)
|
|
167
|
+
], BetterAuthResolver.prototype, "betterAuthEnable2FA", null);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, graphql_1.Mutation)(() => Boolean, {
|
|
170
|
+
description: 'Disable 2FA for the current user',
|
|
171
|
+
}),
|
|
172
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
173
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
174
|
+
__param(0, (0, graphql_1.Args)('password')),
|
|
175
|
+
__param(1, (0, graphql_1.Context)()),
|
|
176
|
+
__metadata("design:type", Function),
|
|
177
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
178
|
+
__metadata("design:returntype", Promise)
|
|
179
|
+
], BetterAuthResolver.prototype, "betterAuthDisable2FA", null);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, graphql_1.Mutation)(() => [String], {
|
|
182
|
+
description: 'Generate new backup codes for 2FA',
|
|
183
|
+
nullable: true,
|
|
184
|
+
}),
|
|
185
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
186
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
187
|
+
__param(0, (0, graphql_1.Context)()),
|
|
188
|
+
__metadata("design:type", Function),
|
|
189
|
+
__metadata("design:paramtypes", [Object]),
|
|
190
|
+
__metadata("design:returntype", Promise)
|
|
191
|
+
], BetterAuthResolver.prototype, "betterAuthGenerateBackupCodes", null);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, graphql_1.Mutation)(() => better_auth_models_1.BetterAuthPasskeyChallengeModel, {
|
|
194
|
+
description: 'Get passkey registration challenge for WebAuthn',
|
|
195
|
+
}),
|
|
196
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
197
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
198
|
+
__param(0, (0, graphql_1.Context)()),
|
|
199
|
+
__metadata("design:type", Function),
|
|
200
|
+
__metadata("design:paramtypes", [Object]),
|
|
201
|
+
__metadata("design:returntype", Promise)
|
|
202
|
+
], BetterAuthResolver.prototype, "betterAuthGetPasskeyChallenge", null);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, graphql_1.Mutation)(() => Boolean, {
|
|
205
|
+
description: 'Delete a passkey by ID',
|
|
206
|
+
}),
|
|
207
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.S_USER),
|
|
208
|
+
(0, common_1.UseGuards)((0, auth_guard_1.AuthGuard)(auth_guard_strategy_enum_1.AuthGuardStrategy.JWT)),
|
|
209
|
+
__param(0, (0, graphql_1.Args)('passkeyId')),
|
|
210
|
+
__param(1, (0, graphql_1.Context)()),
|
|
211
|
+
__metadata("design:type", Function),
|
|
212
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
213
|
+
__metadata("design:returntype", Promise)
|
|
214
|
+
], BetterAuthResolver.prototype, "betterAuthDeletePasskey", null);
|
|
215
|
+
exports.BetterAuthResolver = BetterAuthResolver = __decorate([
|
|
216
|
+
(0, graphql_1.Resolver)(() => better_auth_auth_model_1.BetterAuthAuthModel),
|
|
217
|
+
(0, roles_decorator_1.Roles)(role_enum_1.RoleEnum.ADMIN),
|
|
218
|
+
__metadata("design:paramtypes", [better_auth_service_1.BetterAuthService,
|
|
219
|
+
better_auth_user_mapper_1.BetterAuthUserMapper])
|
|
220
|
+
], BetterAuthResolver);
|
|
221
|
+
//# sourceMappingURL=better-auth.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"better-auth.resolver.js","sourceRoot":"","sources":["../../../../src/server/modules/better-auth/better-auth.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6CAA2E;AAG3E,qFAAwE;AACxE,oEAAgE;AAChE,kGAAwF;AACxF,6EAAyE;AACzE,qGAA+F;AAC/F,6FAM8D;AAC9D,uGAAiG;AACjG,+FAA0F;AAC1F,2GAAqG;AA4B9F,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,kDAAsB;IAC5D,YAC8B,iBAAoC,EACpC,UAAgC;QAE5D,KAAK,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;QAHT,sBAAiB,GAAjB,iBAAiB,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M,CAAC;IACtB,IAAA,kBAAS,EAAC,IAAA,sBAAS,EAAC,4CAAiB,CAAC,GAAG,CAAC,CAAC;IAEzC,WAAA,IAAA,iBAAO,GAAE,CAAA;;;;uEAGX;AAOc;IALd,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE;QACvB,WAAW,EAAE,wBAAwB;KACtC,CAAC;IACD,IAAA,uBAAK,EAAC,oBAAQ,CAAC,MAAM,CAAC;IACtB,IAAA,kBAAS,EAAC,IAAA,sBAAS,EAAC,4CAAiB,CAAC,GAAG,CAAC,CAAC;IAEzC,WAAA,IAAA,cAAI,EAAC,WAAW,CAAC,CAAA;IACjB,WAAA,IAAA,iBAAO,GAAE,CAAA;;;;iEAGX;6BAzJU,kBAAkB;IAF9B,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,4CAAmB,CAAC;IACnC,IAAA,uBAAK,EAAC,oBAAQ,CAAC,KAAK,CAAC;qCAG6B,uCAAiB;QACxB,8CAAoB;GAHnD,kBAAkB,CA0J9B"}
|
|
@@ -1,12 +1,80 @@
|
|
|
1
1
|
import { CoreFileInfo } from '../../../core/modules/file/core-file-info.model';
|
|
2
2
|
export declare class FileInfo extends CoreFileInfo {
|
|
3
3
|
}
|
|
4
|
-
export declare const FileInfoSchema: import("mongoose").Schema<FileInfo, import("mongoose").Model<FileInfo, any, any, any, import("mongoose").Document<unknown, any, FileInfo, any,
|
|
4
|
+
export declare const FileInfoSchema: import("mongoose").Schema<FileInfo, import("mongoose").Model<FileInfo, any, any, any, import("mongoose").Document<unknown, any, FileInfo, any, import("mongoose").DefaultSchemaOptions> & FileInfo & Required<{
|
|
5
5
|
_id: import("mongoose").Types.ObjectId;
|
|
6
6
|
}> & {
|
|
7
7
|
__v: number;
|
|
8
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileInfo, import("mongoose").Document<unknown, {},
|
|
8
|
+
}, any, FileInfo>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
9
9
|
_id: import("mongoose").Types.ObjectId;
|
|
10
10
|
}> & {
|
|
11
11
|
__v: number;
|
|
12
|
-
}
|
|
12
|
+
}, {
|
|
13
|
+
readonly _id?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
14
|
+
_id: import("mongoose").Types.ObjectId;
|
|
15
|
+
}> & {
|
|
16
|
+
__v: number;
|
|
17
|
+
}>;
|
|
18
|
+
id?: import("mongoose").SchemaDefinitionProperty<string, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
19
|
+
_id: import("mongoose").Types.ObjectId;
|
|
20
|
+
}> & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}>;
|
|
23
|
+
chunkSize?: import("mongoose").SchemaDefinitionProperty<number, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
24
|
+
_id: import("mongoose").Types.ObjectId;
|
|
25
|
+
}> & {
|
|
26
|
+
__v: number;
|
|
27
|
+
}>;
|
|
28
|
+
contentType?: import("mongoose").SchemaDefinitionProperty<string, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
29
|
+
_id: import("mongoose").Types.ObjectId;
|
|
30
|
+
}> & {
|
|
31
|
+
__v: number;
|
|
32
|
+
}>;
|
|
33
|
+
filename?: import("mongoose").SchemaDefinitionProperty<string, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
34
|
+
_id: import("mongoose").Types.ObjectId;
|
|
35
|
+
}> & {
|
|
36
|
+
__v: number;
|
|
37
|
+
}>;
|
|
38
|
+
length?: import("mongoose").SchemaDefinitionProperty<number, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
39
|
+
_id: import("mongoose").Types.ObjectId;
|
|
40
|
+
}> & {
|
|
41
|
+
__v: number;
|
|
42
|
+
}>;
|
|
43
|
+
uploadDate?: import("mongoose").SchemaDefinitionProperty<Date, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
44
|
+
_id: import("mongoose").Types.ObjectId;
|
|
45
|
+
}> & {
|
|
46
|
+
__v: number;
|
|
47
|
+
}>;
|
|
48
|
+
init?: import("mongoose").SchemaDefinitionProperty<(...args: any[]) => FileInfo, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
49
|
+
_id: import("mongoose").Types.ObjectId;
|
|
50
|
+
}> & {
|
|
51
|
+
__v: number;
|
|
52
|
+
}>;
|
|
53
|
+
map?: import("mongoose").SchemaDefinitionProperty<(data: Record<string, any> | Partial<FileInfo>, options?: {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
cloneDeep?: boolean;
|
|
56
|
+
funcAllowed?: boolean;
|
|
57
|
+
init?: any;
|
|
58
|
+
mapId?: boolean;
|
|
59
|
+
}) => FileInfo, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
60
|
+
_id: import("mongoose").Types.ObjectId;
|
|
61
|
+
}> & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}>;
|
|
64
|
+
mapDeep?: import("mongoose").SchemaDefinitionProperty<(data: Record<string, any> | Partial<FileInfo>, options?: {
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
cloneDeep?: boolean;
|
|
67
|
+
funcAllowed?: boolean;
|
|
68
|
+
init?: any;
|
|
69
|
+
mapId?: boolean;
|
|
70
|
+
}) => FileInfo, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
71
|
+
_id: import("mongoose").Types.ObjectId;
|
|
72
|
+
}> & {
|
|
73
|
+
__v: number;
|
|
74
|
+
}>;
|
|
75
|
+
securityCheck?: import("mongoose").SchemaDefinitionProperty<(user: any, force?: boolean) => FileInfo, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & FileInfo & Required<{
|
|
76
|
+
_id: import("mongoose").Types.ObjectId;
|
|
77
|
+
}> & {
|
|
78
|
+
__v: number;
|
|
79
|
+
}>;
|
|
80
|
+
}, FileInfo>;
|