diff --git a/apps/api-gateway/src/interfaces/ISchemaSearch.interface.ts b/apps/api-gateway/src/interfaces/ISchemaSearch.interface.ts index c02f31c66..5d92e5b61 100644 --- a/apps/api-gateway/src/interfaces/ISchemaSearch.interface.ts +++ b/apps/api-gateway/src/interfaces/ISchemaSearch.interface.ts @@ -1,3 +1,4 @@ +import { SchemaType } from '@credebl/enum/enum'; import { IUserRequestInterface } from '../schema/interfaces'; export interface ISchemaSearchPayload { @@ -7,6 +8,7 @@ export interface ISchemaSearchPayload { sortField: string; sortBy: string; searchByText?: string; + schemaType?: SchemaType; user?: IUserRequestInterface } diff --git a/apps/api-gateway/src/platform/platform.controller.ts b/apps/api-gateway/src/platform/platform.controller.ts index 1359e1b45..980acfb02 100644 --- a/apps/api-gateway/src/platform/platform.controller.ts +++ b/apps/api-gateway/src/platform/platform.controller.ts @@ -12,7 +12,7 @@ import { ResponseMessages } from '@credebl/common/response-messages'; import { CustomExceptionFilter } from 'apps/api-gateway/common/exception-handler'; import { AuthGuard } from '@nestjs/passport'; import * as QRCode from 'qrcode'; -import { CredDefSortFields, SortFields } from '@credebl/enum/enum'; +import { CredDefSortFields, SchemaType, SortFields } from '@credebl/enum/enum'; import { GetAllPlatformCredDefsDto } from '../credential-definition/dto/get-all-platform-cred-defs.dto'; @Controller('') @@ -32,6 +32,11 @@ export class PlatformController { name: 'sortField', enum: SortFields, required: false + }) + @ApiQuery({ + name: 'schemaType', + enum: SchemaType, + required: false }) @ApiBearerAuth() @UseGuards(AuthGuard('jwt')) @@ -41,14 +46,15 @@ export class PlatformController { @Res() res: Response, @User() user: IUserRequestInterface ): Promise { - const { ledgerId, pageSize, searchByText, pageNumber, sorting, sortByValue } = getAllSchemaDto; + const { ledgerId, pageSize, searchByText, pageNumber, sorting, sortByValue, schemaType } = getAllSchemaDto; const schemaSearchCriteria: ISchemaSearchPayload = { ledgerId, pageNumber, searchByText, pageSize, sortField: sorting, - sortBy: sortByValue + sortBy: sortByValue, + schemaType }; const schemasResponse = await this.platformService.getAllSchema(schemaSearchCriteria, user); const finalResponse: IResponse = { diff --git a/apps/api-gateway/src/schema/dtos/get-all-schema.dto.ts b/apps/api-gateway/src/schema/dtos/get-all-schema.dto.ts index 3af21ac57..797f924cf 100644 --- a/apps/api-gateway/src/schema/dtos/get-all-schema.dto.ts +++ b/apps/api-gateway/src/schema/dtos/get-all-schema.dto.ts @@ -4,7 +4,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { Transform, Type } from 'class-transformer'; import { IsEnum, IsOptional, IsUUID, Min } from 'class-validator'; import { toNumber, trim } from '@credebl/common/cast.helper'; -import { CredDefSortFields, SortFields, SortValue } from '@credebl/enum/enum'; +import { CredDefSortFields, SchemaType, SortFields, SortValue } from '@credebl/enum/enum'; export class GetAllSchemaDto { @ApiProperty({ required: false }) @@ -121,5 +121,14 @@ export class GetAllSchemaByPlatformDto { @ApiProperty({ required: false }) @IsOptional() sortByValue: string = SortValue.DESC; + + @ApiProperty({ + type: SchemaType, + required: false + }) + @Transform(({ value }) => trim(value)) + @IsOptional() + @IsEnum(SchemaType) + schemaType: SchemaType; } \ No newline at end of file diff --git a/apps/ecosystem/templates/DeleteEcosystemMemberTemplate.ts b/apps/ecosystem/templates/DeleteEcosystemMemberTemplate.ts index cfe35fcfc..2cba626dd 100644 --- a/apps/ecosystem/templates/DeleteEcosystemMemberTemplate.ts +++ b/apps/ecosystem/templates/DeleteEcosystemMemberTemplate.ts @@ -27,7 +27,7 @@ export class DeleteEcosystemMemberTemplate { Hello ${email},

- We would like to inform you that the organization“${orgName}”, has removed their participation as a member from the "${ecosystemName}" ecsosystem on CREDEBL. + We would like to inform you that the organization “${orgName}”, has removed their participation as a member from the "${ecosystemName}" on CREDEBL.