-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fetch all credential definitions from platform (#684)
* feat: get all platform cred defs Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> * reafctor: modify get all platform cred defs dto Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com> --------- Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>
- Loading branch information
1 parent
d292a94
commit 5e6c2dd
Showing
12 changed files
with
192 additions
and
26 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
apps/api-gateway/src/credential-definition/dto/get-all-platform-cred-defs.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,30 @@ | ||
import { trim } from '@credebl/common/cast.helper'; | ||
import { PaginationDto } from '@credebl/common/dtos/pagination.dto'; | ||
import { CredDefSortFields, SortValue } from '@credebl/enum/enum'; | ||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { Transform } from 'class-transformer'; | ||
import { IsEnum, IsOptional, IsUUID } from 'class-validator'; | ||
|
||
export class GetAllPlatformCredDefsDto extends PaginationDto { | ||
|
||
@ApiProperty({ example: '1a7eac11-ff05-40d7-8351-4d7467687cad'}) | ||
@Transform(({ value }) => trim(value)) | ||
@ApiPropertyOptional() | ||
@IsOptional() | ||
@IsUUID('4', { message: 'Invalid format of ledgerId' }) | ||
ledgerId: string; | ||
|
||
@ApiProperty({ | ||
required: false | ||
}) | ||
@Transform(({ value }) => trim(value)) | ||
@IsOptional() | ||
@IsEnum(CredDefSortFields) | ||
sortField: string = CredDefSortFields.CREATED_DATE_TIME; | ||
|
||
@ApiProperty({ required: false }) | ||
@Transform(({ value }) => trim(value)) | ||
@IsOptional() | ||
sortBy: string = SortValue.DESC; | ||
|
||
} |
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
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
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