@silexpert/core 1.3.131-3 → 1.3.131
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/cjs/api/resources/Exercice.d.ts +0 -1
- package/dist/cjs/api/resources/Exercice.d.ts.map +1 -1
- package/dist/cjs/api/resources/Exercice.js +0 -3
- package/dist/cjs/api/resources/Exercice.js.map +1 -1
- package/dist/cjs/api/resources.d.ts +0 -2
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +0 -2
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.d.ts +0 -1
- package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/cjs/types/index.d.ts +0 -1
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +0 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/mjs/api/resources/Exercice.d.ts +0 -1
- package/dist/mjs/api/resources/Exercice.d.ts.map +1 -1
- package/dist/mjs/api/resources/Exercice.js +0 -3
- package/dist/mjs/api/resources/Exercice.js.map +1 -1
- package/dist/mjs/api/resources.d.ts +0 -2
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +0 -2
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.d.ts +0 -1
- package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/mjs/types/index.d.ts +0 -1
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +0 -1
- package/dist/mjs/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Exercice.ts +0 -4
- package/ts/api/resources.ts +0 -2
- package/ts/types/Interface/models/IUser.ts +0 -1
- package/ts/types/index.ts +0 -1
- package/dist/cjs/api/resources/Mfa.d.ts +0 -19
- package/dist/cjs/api/resources/Mfa.d.ts.map +0 -1
- package/dist/cjs/api/resources/Mfa.js +0 -26
- package/dist/cjs/api/resources/Mfa.js.map +0 -1
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +0 -7
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.js +0 -3
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.js.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/DisableMfa.dto.d.ts +0 -4
- package/dist/cjs/types/Interface/api/mfa/DisableMfa.dto.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/DisableMfa.dto.js +0 -21
- package/dist/cjs/types/Interface/api/mfa/DisableMfa.dto.js.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/SetupInit.dto.d.ts +0 -5
- package/dist/cjs/types/Interface/api/mfa/SetupInit.dto.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/SetupInit.dto.js +0 -25
- package/dist/cjs/types/Interface/api/mfa/SetupInit.dto.js.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/SetupVerify.dto.d.ts +0 -5
- package/dist/cjs/types/Interface/api/mfa/SetupVerify.dto.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/SetupVerify.dto.js +0 -25
- package/dist/cjs/types/Interface/api/mfa/SetupVerify.dto.js.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/VerifyCode.dto.d.ts +0 -5
- package/dist/cjs/types/Interface/api/mfa/VerifyCode.dto.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/VerifyCode.dto.js +0 -26
- package/dist/cjs/types/Interface/api/mfa/VerifyCode.dto.js.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.d.ts +0 -5
- package/dist/cjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.js +0 -26
- package/dist/cjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.js.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/mfa.d.ts +0 -19
- package/dist/cjs/types/Interface/api/mfa/mfa.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/mfa/mfa.js +0 -3
- package/dist/cjs/types/Interface/api/mfa/mfa.js.map +0 -1
- package/dist/cjs/types/Interface/models/IUserMfa.d.ts +0 -12
- package/dist/cjs/types/Interface/models/IUserMfa.d.ts.map +0 -1
- package/dist/cjs/types/Interface/models/IUserMfa.js +0 -3
- package/dist/cjs/types/Interface/models/IUserMfa.js.map +0 -1
- package/dist/cjs/types/Interface/models/IUserMfaRecoveryCode.d.ts +0 -9
- package/dist/cjs/types/Interface/models/IUserMfaRecoveryCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/models/IUserMfaRecoveryCode.js +0 -3
- package/dist/cjs/types/Interface/models/IUserMfaRecoveryCode.js.map +0 -1
- package/dist/mjs/api/resources/Mfa.d.ts +0 -19
- package/dist/mjs/api/resources/Mfa.d.ts.map +0 -1
- package/dist/mjs/api/resources/Mfa.js +0 -22
- package/dist/mjs/api/resources/Mfa.js.map +0 -1
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +0 -7
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.js +0 -2
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.js.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/DisableMfa.dto.d.ts +0 -4
- package/dist/mjs/types/Interface/api/mfa/DisableMfa.dto.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/DisableMfa.dto.js +0 -18
- package/dist/mjs/types/Interface/api/mfa/DisableMfa.dto.js.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/SetupInit.dto.d.ts +0 -5
- package/dist/mjs/types/Interface/api/mfa/SetupInit.dto.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/SetupInit.dto.js +0 -23
- package/dist/mjs/types/Interface/api/mfa/SetupInit.dto.js.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/SetupVerify.dto.d.ts +0 -5
- package/dist/mjs/types/Interface/api/mfa/SetupVerify.dto.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/SetupVerify.dto.js +0 -23
- package/dist/mjs/types/Interface/api/mfa/SetupVerify.dto.js.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/VerifyCode.dto.d.ts +0 -5
- package/dist/mjs/types/Interface/api/mfa/VerifyCode.dto.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/VerifyCode.dto.js +0 -24
- package/dist/mjs/types/Interface/api/mfa/VerifyCode.dto.js.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.d.ts +0 -5
- package/dist/mjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.js +0 -24
- package/dist/mjs/types/Interface/api/mfa/VerifyRecoveryCode.dto.js.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/mfa.d.ts +0 -19
- package/dist/mjs/types/Interface/api/mfa/mfa.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/mfa/mfa.js +0 -2
- package/dist/mjs/types/Interface/api/mfa/mfa.js.map +0 -1
- package/dist/mjs/types/Interface/models/IUserMfa.d.ts +0 -12
- package/dist/mjs/types/Interface/models/IUserMfa.d.ts.map +0 -1
- package/dist/mjs/types/Interface/models/IUserMfa.js +0 -2
- package/dist/mjs/types/Interface/models/IUserMfa.js.map +0 -1
- package/dist/mjs/types/Interface/models/IUserMfaRecoveryCode.d.ts +0 -9
- package/dist/mjs/types/Interface/models/IUserMfaRecoveryCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/models/IUserMfaRecoveryCode.js +0 -2
- package/dist/mjs/types/Interface/models/IUserMfaRecoveryCode.js.map +0 -1
- package/ts/api/resources/Mfa.ts +0 -28
- package/ts/types/Interface/api/authentification/AuthenticationResponse.ts +0 -6
- package/ts/types/Interface/api/mfa/DisableMfa.dto.ts +0 -6
- package/ts/types/Interface/api/mfa/SetupInit.dto.ts +0 -9
- package/ts/types/Interface/api/mfa/SetupVerify.dto.ts +0 -9
- package/ts/types/Interface/api/mfa/VerifyCode.dto.ts +0 -10
- package/ts/types/Interface/api/mfa/VerifyRecoveryCode.dto.ts +0 -10
- package/ts/types/Interface/api/mfa/mfa.ts +0 -21
- package/ts/types/Interface/api/mfa/setupInit +0 -0
- package/ts/types/Interface/models/IUserMfa.ts +0 -11
- package/ts/types/Interface/models/IUserMfaRecoveryCode.ts +0 -8
|
@@ -51,7 +51,6 @@ export interface IUser {
|
|
|
51
51
|
textMessageNumber?: string | null;
|
|
52
52
|
prefix?: string | null;
|
|
53
53
|
tokenLostPassword?: string | null;
|
|
54
|
-
twoFactorEnabled?: boolean | null;
|
|
55
54
|
tokenApi?: string | null;
|
|
56
55
|
tokenNotification?: string | null;
|
|
57
56
|
tokenSocket?: string | null;
|
package/ts/types/index.ts
CHANGED
|
@@ -558,7 +558,6 @@ export * from './Enum/PartneredAccountantServiceTypeId';
|
|
|
558
558
|
export * from './Enum/PaymentAttempt';
|
|
559
559
|
|
|
560
560
|
// Interfaces API
|
|
561
|
-
export * from './Interface/api/authentification/AuthenticationResponse';
|
|
562
561
|
export * from './Interface/api/exercice/ReadExercice';
|
|
563
562
|
export * from './Interface/api/balanceSheet/consistency/Read';
|
|
564
563
|
export * from './Interface/api/kilometricAllowance/ReadKilometricAllowance';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { MfaSetupInitResult, MfaSetupVerifyResult } from '../../types/Interface/api/mfa/mfa';
|
|
2
|
-
import { Resource } from '../Resource';
|
|
3
|
-
export declare class UserMfa extends Resource {
|
|
4
|
-
setupInit(userId: number, userEmail: string): Promise<MfaSetupInitResult>;
|
|
5
|
-
setupVerify(userId: number, code: string): Promise<MfaSetupVerifyResult>;
|
|
6
|
-
disable(userId: number): Promise<boolean>;
|
|
7
|
-
verifyCode(userId: number, code: string): Promise<{
|
|
8
|
-
success: boolean;
|
|
9
|
-
token?: string;
|
|
10
|
-
}>;
|
|
11
|
-
verifyRecoveryCode(userId: number, recoveryCode: string): Promise<{
|
|
12
|
-
success: boolean;
|
|
13
|
-
token?: string;
|
|
14
|
-
}>;
|
|
15
|
-
isMfaEnabled(userId: number): Promise<{
|
|
16
|
-
mfaEnabled: boolean;
|
|
17
|
-
}>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=Mfa.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mfa.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/Mfa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIzE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIxE,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAIvF,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAIvG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;CAG/D"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserMfa = void 0;
|
|
4
|
-
const Resource_1 = require("../Resource");
|
|
5
|
-
class UserMfa extends Resource_1.Resource {
|
|
6
|
-
setupInit(userId, userEmail) {
|
|
7
|
-
return this.axios.$post('/mfa/setup/init', { userId, userEmail });
|
|
8
|
-
}
|
|
9
|
-
setupVerify(userId, code) {
|
|
10
|
-
return this.axios.$post('/mfa/setup/verify', { userId, code });
|
|
11
|
-
}
|
|
12
|
-
disable(userId) {
|
|
13
|
-
return this.axios.$post('/mfa/disable', { userId });
|
|
14
|
-
}
|
|
15
|
-
verifyCode(userId, code) {
|
|
16
|
-
return this.axios.$post('/mfa/verify/code', { userId, code });
|
|
17
|
-
}
|
|
18
|
-
verifyRecoveryCode(userId, recoveryCode) {
|
|
19
|
-
return this.axios.$post('/mfa/verify/recovery-code', { userId, recoveryCode });
|
|
20
|
-
}
|
|
21
|
-
isMfaEnabled(userId) {
|
|
22
|
-
return this.axios.$get('/mfa/is-enabled', { params: { userId } });
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.UserMfa = UserMfa;
|
|
26
|
-
//# sourceMappingURL=Mfa.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mfa.js","sourceRoot":"","sources":["../../../../ts/api/resources/Mfa.ts"],"names":[],"mappings":";;;AACA,0CAAuC;AAEvC,MAAa,OAAQ,SAAQ,mBAAQ;IACnC,SAAS,CAAC,MAAc,EAAE,SAAiB;QACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,WAAW,CAAC,MAAc,EAAE,IAAY;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,MAAc;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,UAAU,CAAC,MAAc,EAAE,IAAY;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,kBAAkB,CAAC,MAAc,EAAE,YAAoB;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,2BAA2B,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,YAAY,CAAC,MAAc;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AAxBD,0BAwBC","sourcesContent":["import { MfaSetupInitResult, MfaSetupVerifyResult } from '../../types/Interface/api/mfa/mfa';\nimport { Resource } from '../Resource';\n\nexport class UserMfa extends Resource {\n setupInit(userId: number, userEmail: string): Promise<MfaSetupInitResult> {\n return this.axios.$post('/mfa/setup/init', { userId, userEmail });\n }\n\n setupVerify(userId: number, code: string): Promise<MfaSetupVerifyResult> {\n return this.axios.$post('/mfa/setup/verify', { userId, code });\n }\n\n disable(userId: number): Promise<boolean> {\n return this.axios.$post('/mfa/disable', { userId });\n }\n\n verifyCode(userId: number, code: string): Promise<{ success: boolean; token?: string }> {\n return this.axios.$post('/mfa/verify/code', { userId, code });\n }\n\n verifyRecoveryCode(userId: number, recoveryCode: string): Promise<{ success: boolean; token?: string }> {\n return this.axios.$post('/mfa/verify/recovery-code', { userId, recoveryCode });\n }\n\n isMfaEnabled(userId: number): Promise<{ mfaEnabled: boolean }> {\n return this.axios.$get('/mfa/is-enabled', { params: { userId } });\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationResponse.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/authentification/AuthenticationResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationResponse.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/authentification/AuthenticationResponse.ts"],"names":[],"mappings":"","sourcesContent":["export interface IAuthenticationResponse {\n requiresMfa?: boolean;\n userId?: number;\n message?: string;\n token?: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisableMfa.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/DisableMfa.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IAExB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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.MfaDisableDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class MfaDisableDto {
|
|
15
|
-
}
|
|
16
|
-
exports.MfaDisableDto = MfaDisableDto;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
19
|
-
__metadata("design:type", Number)
|
|
20
|
-
], MfaDisableDto.prototype, "userId", void 0);
|
|
21
|
-
//# sourceMappingURL=DisableMfa.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisableMfa.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/DisableMfa.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6C;AAE7C,MAAa,aAAa;CAGzB;AAHD,sCAGC;AADC;IADC,IAAA,4BAAU,GAAE;;6CACE","sourcesContent":["import { IsNotEmpty } from 'class-validator';\n\nexport class MfaDisableDto {\n @IsNotEmpty()\n userId: number;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupInit.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupInit.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAe;IAE1B,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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.MfaSetupInitDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class MfaSetupInitDto {
|
|
15
|
-
}
|
|
16
|
-
exports.MfaSetupInitDto = MfaSetupInitDto;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
19
|
-
__metadata("design:type", Number)
|
|
20
|
-
], MfaSetupInitDto.prototype, "userId", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsEmail)(),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], MfaSetupInitDto.prototype, "userEmail", void 0);
|
|
25
|
-
//# sourceMappingURL=SetupInit.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupInit.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupInit.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsD;AAEtD,MAAa,eAAe;CAM3B;AAND,0CAMC;AAJC;IADC,IAAA,4BAAU,GAAE;;+CACE;AAGf;IADC,IAAA,yBAAO,GAAE;;kDACQ","sourcesContent":["import { IsEmail, IsNotEmpty } from 'class-validator';\n\nexport class MfaSetupInitDto {\n @IsNotEmpty()\n userId: number;\n\n @IsEmail()\n userEmail: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupVerify.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupVerify.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAE5B,MAAM,EAAE,MAAM,CAAC;IAGf,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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.MfaSetupVerifyDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class MfaSetupVerifyDto {
|
|
15
|
-
}
|
|
16
|
-
exports.MfaSetupVerifyDto = MfaSetupVerifyDto;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
19
|
-
__metadata("design:type", Number)
|
|
20
|
-
], MfaSetupVerifyDto.prototype, "userId", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], MfaSetupVerifyDto.prototype, "code", void 0);
|
|
25
|
-
//# sourceMappingURL=SetupVerify.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupVerify.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupVerify.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6C;AAE7C,MAAa,iBAAiB;CAM7B;AAND,8CAMC;AAJC;IADC,IAAA,4BAAU,GAAE;;iDACE;AAGf;IADC,IAAA,4BAAU,GAAE;;+CACA","sourcesContent":["import { IsNotEmpty } from 'class-validator';\n\nexport class MfaSetupVerifyDto {\n @IsNotEmpty()\n userId: number;\n\n @IsNotEmpty()\n code: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyCode.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/VerifyCode.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAE3B,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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.MfaVerifyCodeDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class MfaVerifyCodeDto {
|
|
15
|
-
}
|
|
16
|
-
exports.MfaVerifyCodeDto = MfaVerifyCodeDto;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
19
|
-
__metadata("design:type", Number)
|
|
20
|
-
], MfaVerifyCodeDto.prototype, "userId", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsString)(),
|
|
23
|
-
(0, class_validator_1.Length)(6, 6),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], MfaVerifyCodeDto.prototype, "code", void 0);
|
|
26
|
-
//# sourceMappingURL=VerifyCode.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyCode.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/VerifyCode.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,gBAAgB;CAO5B;AAPD,4CAOC;AALC;IADC,IAAA,4BAAU,GAAE;;gDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,CAAC,CAAC;;8CACA","sourcesContent":["import { IsNotEmpty, IsString, Length } from 'class-validator';\n\nexport class MfaVerifyCodeDto {\n @IsNotEmpty()\n userId: number;\n\n @IsString()\n @Length(6, 6)\n code: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyRecoveryCode.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/VerifyRecoveryCode.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,wBAAwB;IAEnC,MAAM,EAAE,MAAM,CAAC;IAIf,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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.MfaVerifyRecoveryCodeDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class MfaVerifyRecoveryCodeDto {
|
|
15
|
-
}
|
|
16
|
-
exports.MfaVerifyRecoveryCodeDto = MfaVerifyRecoveryCodeDto;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
19
|
-
__metadata("design:type", Number)
|
|
20
|
-
], MfaVerifyRecoveryCodeDto.prototype, "userId", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, class_validator_1.IsString)(),
|
|
23
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], MfaVerifyRecoveryCodeDto.prototype, "recoveryCode", void 0);
|
|
26
|
-
//# sourceMappingURL=VerifyRecoveryCode.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyRecoveryCode.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/VerifyRecoveryCode.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,wBAAwB;CAOpC;AAPD,4DAOC;AALC;IADC,IAAA,4BAAU,GAAE;;wDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACQ","sourcesContent":["import { IsNotEmpty, IsString } from 'class-validator';\n\nexport class MfaVerifyRecoveryCodeDto {\n @IsNotEmpty()\n userId: number;\n\n @IsString()\n @IsNotEmpty()\n recoveryCode: string;\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface MfaSetupInitResult {
|
|
2
|
-
otpauthUri: string;
|
|
3
|
-
tempSecret: string;
|
|
4
|
-
label: string;
|
|
5
|
-
}
|
|
6
|
-
export interface MfaSetupVerifyResult {
|
|
7
|
-
success: boolean;
|
|
8
|
-
recoveryCodes: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface MfaAuthenticationResponse {
|
|
11
|
-
requiresMfa: boolean;
|
|
12
|
-
userId?: number;
|
|
13
|
-
token?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface MfaVerificationResponse {
|
|
16
|
-
success: boolean;
|
|
17
|
-
token?: string;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=mfa.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mfa.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/mfa.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mfa.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/mfa.ts"],"names":[],"mappings":"","sourcesContent":["export interface MfaSetupInitResult {\n otpauthUri: string;\n tempSecret: string;\n label: string;\n}\n\nexport interface MfaSetupVerifyResult {\n success: boolean;\n recoveryCodes: string[];\n}\n\nexport interface MfaAuthenticationResponse {\n requiresMfa: boolean;\n userId?: number;\n token?: string;\n}\n\nexport interface MfaVerificationResponse {\n success: boolean;\n token?: string;\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface IUserMfa {
|
|
2
|
-
idUserMfa: number;
|
|
3
|
-
idUser: number;
|
|
4
|
-
method: 'totp' | 'sms' | 'email';
|
|
5
|
-
secretEnc: string;
|
|
6
|
-
tempSecretEnc: string;
|
|
7
|
-
verifiedAt: Date;
|
|
8
|
-
isPrimary: boolean;
|
|
9
|
-
createdAt?: Date;
|
|
10
|
-
updatedAt?: Date;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=IUserMfa.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUserMfa.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUserMfa.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUserMfa.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUserMfa.ts"],"names":[],"mappings":"","sourcesContent":["export interface IUserMfa {\n idUserMfa: number;\n idUser: number;\n method: 'totp' | 'sms' | 'email';\n secretEnc: string;\n tempSecretEnc: string;\n verifiedAt: Date;\n isPrimary: boolean;\n createdAt?: Date;\n updatedAt?: Date;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUserMfaRecoveryCode.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUserMfaRecoveryCode.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUserMfaRecoveryCode.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUserMfaRecoveryCode.ts"],"names":[],"mappings":"","sourcesContent":["export interface IUserMfaRecoveryCode {\n id: number;\n idUserMfa: number;\n recoveryCodeEnc: string; // haché, jamais en clair\n usedAt: Date | null; // nullable\n createdAt?: Date;\n updatedAt?: Date;\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { MfaSetupInitResult, MfaSetupVerifyResult } from '../../types/Interface/api/mfa/mfa';
|
|
2
|
-
import { Resource } from '../Resource';
|
|
3
|
-
export declare class UserMfa extends Resource {
|
|
4
|
-
setupInit(userId: number, userEmail: string): Promise<MfaSetupInitResult>;
|
|
5
|
-
setupVerify(userId: number, code: string): Promise<MfaSetupVerifyResult>;
|
|
6
|
-
disable(userId: number): Promise<boolean>;
|
|
7
|
-
verifyCode(userId: number, code: string): Promise<{
|
|
8
|
-
success: boolean;
|
|
9
|
-
token?: string;
|
|
10
|
-
}>;
|
|
11
|
-
verifyRecoveryCode(userId: number, recoveryCode: string): Promise<{
|
|
12
|
-
success: boolean;
|
|
13
|
-
token?: string;
|
|
14
|
-
}>;
|
|
15
|
-
isMfaEnabled(userId: number): Promise<{
|
|
16
|
-
mfaEnabled: boolean;
|
|
17
|
-
}>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=Mfa.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mfa.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/Mfa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIzE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIxE,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAIvF,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAIvG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;CAG/D"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Resource } from '../Resource';
|
|
2
|
-
export class UserMfa extends Resource {
|
|
3
|
-
setupInit(userId, userEmail) {
|
|
4
|
-
return this.axios.$post('/mfa/setup/init', { userId, userEmail });
|
|
5
|
-
}
|
|
6
|
-
setupVerify(userId, code) {
|
|
7
|
-
return this.axios.$post('/mfa/setup/verify', { userId, code });
|
|
8
|
-
}
|
|
9
|
-
disable(userId) {
|
|
10
|
-
return this.axios.$post('/mfa/disable', { userId });
|
|
11
|
-
}
|
|
12
|
-
verifyCode(userId, code) {
|
|
13
|
-
return this.axios.$post('/mfa/verify/code', { userId, code });
|
|
14
|
-
}
|
|
15
|
-
verifyRecoveryCode(userId, recoveryCode) {
|
|
16
|
-
return this.axios.$post('/mfa/verify/recovery-code', { userId, recoveryCode });
|
|
17
|
-
}
|
|
18
|
-
isMfaEnabled(userId) {
|
|
19
|
-
return this.axios.$get('/mfa/is-enabled', { params: { userId } });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=Mfa.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mfa.js","sourceRoot":"","sources":["../../../../ts/api/resources/Mfa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,OAAO,OAAQ,SAAQ,QAAQ;IACnC,SAAS,CAAC,MAAc,EAAE,SAAiB;QACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,WAAW,CAAC,MAAc,EAAE,IAAY;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,MAAc;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,UAAU,CAAC,MAAc,EAAE,IAAY;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,kBAAkB,CAAC,MAAc,EAAE,YAAoB;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,2BAA2B,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,YAAY,CAAC,MAAc;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IACpE,CAAC;CACF","sourcesContent":["import { MfaSetupInitResult, MfaSetupVerifyResult } from '../../types/Interface/api/mfa/mfa';\nimport { Resource } from '../Resource';\n\nexport class UserMfa extends Resource {\n setupInit(userId: number, userEmail: string): Promise<MfaSetupInitResult> {\n return this.axios.$post('/mfa/setup/init', { userId, userEmail });\n }\n\n setupVerify(userId: number, code: string): Promise<MfaSetupVerifyResult> {\n return this.axios.$post('/mfa/setup/verify', { userId, code });\n }\n\n disable(userId: number): Promise<boolean> {\n return this.axios.$post('/mfa/disable', { userId });\n }\n\n verifyCode(userId: number, code: string): Promise<{ success: boolean; token?: string }> {\n return this.axios.$post('/mfa/verify/code', { userId, code });\n }\n\n verifyRecoveryCode(userId: number, recoveryCode: string): Promise<{ success: boolean; token?: string }> {\n return this.axios.$post('/mfa/verify/recovery-code', { userId, recoveryCode });\n }\n\n isMfaEnabled(userId: number): Promise<{ mfaEnabled: boolean }> {\n return this.axios.$get('/mfa/is-enabled', { params: { userId } });\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationResponse.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/authentification/AuthenticationResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationResponse.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/authentification/AuthenticationResponse.ts"],"names":[],"mappings":"","sourcesContent":["export interface IAuthenticationResponse {\n requiresMfa?: boolean;\n userId?: number;\n message?: string;\n token?: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisableMfa.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/DisableMfa.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IAExB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { IsNotEmpty } from 'class-validator';
|
|
11
|
-
export class MfaDisableDto {
|
|
12
|
-
userId;
|
|
13
|
-
}
|
|
14
|
-
__decorate([
|
|
15
|
-
IsNotEmpty(),
|
|
16
|
-
__metadata("design:type", Number)
|
|
17
|
-
], MfaDisableDto.prototype, "userId", void 0);
|
|
18
|
-
//# sourceMappingURL=DisableMfa.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisableMfa.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/DisableMfa.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,OAAO,aAAa;IAExB,MAAM,CAAS;CAChB;AADC;IADC,UAAU,EAAE;;6CACE","sourcesContent":["import { IsNotEmpty } from 'class-validator';\n\nexport class MfaDisableDto {\n @IsNotEmpty()\n userId: number;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupInit.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupInit.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAe;IAE1B,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { IsEmail, IsNotEmpty } from 'class-validator';
|
|
11
|
-
export class MfaSetupInitDto {
|
|
12
|
-
userId;
|
|
13
|
-
userEmail;
|
|
14
|
-
}
|
|
15
|
-
__decorate([
|
|
16
|
-
IsNotEmpty(),
|
|
17
|
-
__metadata("design:type", Number)
|
|
18
|
-
], MfaSetupInitDto.prototype, "userId", void 0);
|
|
19
|
-
__decorate([
|
|
20
|
-
IsEmail(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], MfaSetupInitDto.prototype, "userEmail", void 0);
|
|
23
|
-
//# sourceMappingURL=SetupInit.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupInit.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupInit.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,OAAO,eAAe;IAE1B,MAAM,CAAS;IAGf,SAAS,CAAS;CACnB;AAJC;IADC,UAAU,EAAE;;+CACE;AAGf;IADC,OAAO,EAAE;;kDACQ","sourcesContent":["import { IsEmail, IsNotEmpty } from 'class-validator';\n\nexport class MfaSetupInitDto {\n @IsNotEmpty()\n userId: number;\n\n @IsEmail()\n userEmail: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupVerify.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupVerify.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAE5B,MAAM,EAAE,MAAM,CAAC;IAGf,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { IsNotEmpty } from 'class-validator';
|
|
11
|
-
export class MfaSetupVerifyDto {
|
|
12
|
-
userId;
|
|
13
|
-
code;
|
|
14
|
-
}
|
|
15
|
-
__decorate([
|
|
16
|
-
IsNotEmpty(),
|
|
17
|
-
__metadata("design:type", Number)
|
|
18
|
-
], MfaSetupVerifyDto.prototype, "userId", void 0);
|
|
19
|
-
__decorate([
|
|
20
|
-
IsNotEmpty(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], MfaSetupVerifyDto.prototype, "code", void 0);
|
|
23
|
-
//# sourceMappingURL=SetupVerify.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupVerify.dto.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/SetupVerify.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,OAAO,iBAAiB;IAE5B,MAAM,CAAS;IAGf,IAAI,CAAS;CACd;AAJC;IADC,UAAU,EAAE;;iDACE;AAGf;IADC,UAAU,EAAE;;+CACA","sourcesContent":["import { IsNotEmpty } from 'class-validator';\n\nexport class MfaSetupVerifyDto {\n @IsNotEmpty()\n userId: number;\n\n @IsNotEmpty()\n code: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyCode.dto.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/mfa/VerifyCode.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAE3B,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,MAAM,CAAC;CACd"}
|