-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workflows): add review endpoint (#28)
* feat: add review endpoint Signed-off-by: ShikharBhatt <[email protected]> * Revert "feat: add review endpoint" This reverts commit e93196d. * feat: add review endpoint Signed-off-by: ShikharBhatt <[email protected]> * fix: e2e tests Signed-off-by: ShikharBhatt <[email protected]> * refactor: OnlyRedirect is duplicate of RedirectUrl Signed-off-by: John Henderson <[email protected]> --------- Signed-off-by: ShikharBhatt <[email protected]> Signed-off-by: John Henderson <[email protected]> Co-authored-by: John Henderson <[email protected]>
- Loading branch information
1 parent
85b3b87
commit 36d1276
Showing
8 changed files
with
133 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
32 changes: 32 additions & 0 deletions
32
apps/vc-api/src/vc-api/workflows/dtos/submission-review.dto.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2021 - 2023 Energy Web Foundation | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { Type } from 'class-transformer'; | ||
import { IsEnum, IsOptional, ValidateNested } from 'class-validator'; | ||
import { VerifiablePresentationDto } from '../../credentials/dtos/verifiable-presentation.dto'; | ||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | ||
|
||
export enum ReviewResult { | ||
approved = 'approved', | ||
rejected = 'rejected' | ||
} | ||
|
||
export class SubmissionReviewDto { | ||
@IsEnum(ReviewResult) | ||
@ApiProperty({ | ||
description: 'The judgement made by the reviewer', | ||
enum: ReviewResult, | ||
enumName: 'ReviewResult' | ||
}) | ||
result: ReviewResult; | ||
|
||
@ValidateNested() | ||
@IsOptional() | ||
@Type(() => VerifiablePresentationDto) | ||
@ApiPropertyOptional({ | ||
description: 'A reviewer may want to include credentials (wrapped in a VP) to the holder' | ||
}) | ||
vp?: VerifiablePresentationDto; | ||
} |
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
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
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
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