From a8f7367f7fea559f668962e4cb0626d7287f0a9c Mon Sep 17 00:00:00 2001 From: Ankita Patidar <35130088+ankita-p17@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:15:43 +0530 Subject: [PATCH] Feat/oob credential issuance verification (#476) * fix: removed the unnecessary logger from the agent-service module (#419) Signed-off-by: KulkarniShashank * WIP:OOB Proof Request Signed-off-by: ankita_patidar * WIP:OOB Proof Request Signed-off-by: ankita_patidar * fix:OOB Credential Offer restore changes Signed-off-by: ankita_patidar * fix:add email as optional Signed-off-by: ankita_patidar * fix:take response from presentation request payload Signed-off-by: ankita_patidar --------- Signed-off-by: KulkarniShashank Signed-off-by: ankita_patidar Co-authored-by: Nishad Shirsat <103021375+nishad-ayanworks@users.noreply.github.com> Co-authored-by: Nishad Co-authored-by: Shashank Kulkarni <44693969+KulkarniShashank@users.noreply.github.com> Co-authored-by: bhavanakarwade <137506897+bhavanakarwade@users.noreply.github.com> Signed-off-by: KulkarniShashank --- apps/agent-service/src/interface/agent-service.interface.ts | 3 ++- apps/api-gateway/src/verification/dto/request-proof.dto.ts | 3 ++- apps/verification/src/interfaces/verification.interface.ts | 5 +++-- apps/verification/src/verification.service.ts | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/agent-service/src/interface/agent-service.interface.ts b/apps/agent-service/src/interface/agent-service.interface.ts index 2c6e7f4c9..f94307ea5 100644 --- a/apps/agent-service/src/interface/agent-service.interface.ts +++ b/apps/agent-service/src/interface/agent-service.interface.ts @@ -266,7 +266,8 @@ interface IRequestedPredicatesName { } interface IRequestedRestriction { - cred_def_id: string; + cred_def_id?: string; + schema_id?: string; } export interface IAgentSpinUpSatus { diff --git a/apps/api-gateway/src/verification/dto/request-proof.dto.ts b/apps/api-gateway/src/verification/dto/request-proof.dto.ts index 4fc42b148..31e6176c9 100644 --- a/apps/api-gateway/src/verification/dto/request-proof.dto.ts +++ b/apps/api-gateway/src/verification/dto/request-proof.dto.ts @@ -10,7 +10,7 @@ export class ProofRequestAttribute { @IsString() @IsNotEmpty({ message: 'schemaId is required.' }) - schemaId: string; + schemaId?: string; @IsString() @IsOptional() @@ -91,6 +91,7 @@ export class OutOfBandRequestProof { @IsNotEmpty({ message: 'Email is required' }) @Transform(({ value }) => trim(value)) @IsString({ each: true, message: 'Each emailId in the array should be a string' }) + @IsOptional() emailId?: string | string[]; @ApiProperty() diff --git a/apps/verification/src/interfaces/verification.interface.ts b/apps/verification/src/interfaces/verification.interface.ts index 1995d9438..c6a967728 100644 --- a/apps/verification/src/interfaces/verification.interface.ts +++ b/apps/verification/src/interfaces/verification.interface.ts @@ -5,7 +5,7 @@ interface IProofRequestAttribute { condition?: string; value?: string; credDefId?: string; - schemaId: string; + schemaId?: string; credentialName: string; } @@ -75,7 +75,8 @@ interface IRequestedPredicatesName { } interface IRequestedRestriction { - cred_def_id: string; + cred_def_id?: string; + schema_id?: string; } export interface ISendProofRequestPayload { diff --git a/apps/verification/src/verification.service.ts b/apps/verification/src/verification.service.ts index 1b7044712..f892b5e14 100644 --- a/apps/verification/src/verification.service.ts +++ b/apps/verification/src/verification.service.ts @@ -397,7 +397,7 @@ export class VerificationService { if (!getProofPresentation) { throw new Error(ResponseMessages.verification.error.proofPresentationNotFound); } - return getProofPresentation; + return getProofPresentation.response; }