-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb5a3f2
commit 54901bd
Showing
4 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
13 changes: 9 additions & 4 deletions
13
packages/runtime/src/extensibility/facades/transport/IdentityRecoveryKitsFacade.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import { Result } from "@js-soft/ts-utils"; | ||
import { Inject } from "@nmshd/typescript-ioc"; | ||
import { TokenDTO } from "../../../types"; | ||
import { CreateIdentityRecoveryKitRequest, CreateIdentityRecoveryKitUseCase, DoesIdentityRecoveryKitExistResponse, DoesIdentityRecoveryKitExistUseCase } from "../../../useCases"; | ||
import { | ||
CheckForExistingIdentityRecoveryKitResponse, | ||
CheckForExistingIdentityRecoveryKitUseCase, | ||
CreateIdentityRecoveryKitRequest, | ||
CreateIdentityRecoveryKitUseCase | ||
} from "../../../useCases"; | ||
|
||
export class IdentityRecoveryKitsFacade { | ||
public constructor( | ||
@Inject private readonly createIdentityRecoveryKitUseCase: CreateIdentityRecoveryKitUseCase, | ||
@Inject private readonly existsIdentityRecoveryKitUseCase: DoesIdentityRecoveryKitExistUseCase | ||
@Inject private readonly checkForExistingIdentityRecoveryKitUseCase: CheckForExistingIdentityRecoveryKitUseCase | ||
) {} | ||
|
||
public async createIdentityRecoveryKit(request: CreateIdentityRecoveryKitRequest): Promise<Result<TokenDTO>> { | ||
return await this.createIdentityRecoveryKitUseCase.execute(request); | ||
} | ||
|
||
public async doesIdentityRecoveryKitExist(): Promise<Result<DoesIdentityRecoveryKitExistResponse>> { | ||
return await this.existsIdentityRecoveryKitUseCase.execute(); | ||
public async checkForExistingIdentityRecoveryKit(): Promise<Result<CheckForExistingIdentityRecoveryKitResponse>> { | ||
return await this.checkForExistingIdentityRecoveryKitUseCase.execute(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/runtime/src/useCases/transport/identityRecoveryKits/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from "./CheckForExistingIdentityRecoveryKit"; | ||
export * from "./CreateIdentityRecoveryKit"; | ||
export * from "./DoesIdentityRecoveryKitExist"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters