From b3e1a17c07e927f69f9253cc9d7a3e4a56d95de8 Mon Sep 17 00:00:00 2001 From: bhavanakarwade <137506897+bhavanakarwade@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:13:34 +0530 Subject: [PATCH] merge: DEV to QA (27-08-2024) (#945) * refactor: applied validations on issuance date (#934) * fix: fetch schema details Signed-off-by: bhavanakarwade * fix: applied validations for issuance using connection Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade * fix: encrypt clientId and client secret Signed-off-by: KulkarniShashank * fix:collect reuse connection events Signed-off-by: pallavicoder * feat: reuse connection usinginvitation DID (#940) Signed-off-by: tipusinghaw * fix: unable to use platform archieved schema Signed-off-by: Krishna Waske * fix: solved the clientId dcryption in verification email Signed-off-by: KulkarniShashank * feat: basic message (#848) * WIP : Implementation of basic message protocol wrapper Signed-off-by: Ankita Patidar * feat: basic message Signed-off-by: tipusinghaw * changed response message Signed-off-by: tipusinghaw * fix: sonar lint Signed-off-by: tipusinghaw * fix: seperated URL creation logic Signed-off-by: tipusinghaw * fix: changed error message Signed-off-by: tipusinghaw --------- Signed-off-by: Ankita Patidar Signed-off-by: tipusinghaw Co-authored-by: Ankita Patidar * refactor: fetch proof details function (#943) * fix: fetch schema details Signed-off-by: bhavanakarwade * fix: applied validations for issuance using connection Signed-off-by: bhavanakarwade * fix: multiple schemas in verified proof details api Signed-off-by: bhavanakarwade * refactor: description Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade * fix: basic message url (#944) Signed-off-by: tipusinghaw --------- Signed-off-by: bhavanakarwade Signed-off-by: KulkarniShashank Signed-off-by: pallavicoder Signed-off-by: tipusinghaw Signed-off-by: Krishna Waske Signed-off-by: Ankita Patidar Co-authored-by: Ganesh Nawle Co-authored-by: KulkarniShashank Co-authored-by: pallavicoder Co-authored-by: Shashank Kulkarni <44693969+KulkarniShashank@users.noreply.github.com> Co-authored-by: pallavighule <61926403+pallavighule@users.noreply.github.com> Co-authored-by: tipusinghaw <126460794+tipusinghaw@users.noreply.github.com> Co-authored-by: Krishna Waske Co-authored-by: Krishna <74084119+GHkrishna@users.noreply.github.com> Co-authored-by: Ankita Patidar Signed-off-by: KulkarniShashank --- .../src/connection/connection.service.ts | 10 ++++++++++ apps/connection/src/connection.service.ts | 20 +++++++++++++++++-- apps/user/src/user.service.ts | 2 +- apps/verification/src/verification.service.ts | 1 - 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/apps/api-gateway/src/connection/connection.service.ts b/apps/api-gateway/src/connection/connection.service.ts index bb7877a80..55802cb80 100644 --- a/apps/api-gateway/src/connection/connection.service.ts +++ b/apps/api-gateway/src/connection/connection.service.ts @@ -24,6 +24,16 @@ export class ConnectionService extends BaseService { } } + sendBasicMessage( + basicMessageDto: BasicMessageDto + ): Promise { + try { + return this.sendNatsMessage(this.connectionServiceProxy, 'send-basic-message', basicMessageDto); + } catch (error) { + throw new RpcException(error.response); + } + } + getConnectionWebhook( connectionDto: ConnectionDto, orgId: string diff --git a/apps/connection/src/connection.service.ts b/apps/connection/src/connection.service.ts index 62f4469c6..3373b50dd 100644 --- a/apps/connection/src/connection.service.ts +++ b/apps/connection/src/connection.service.ts @@ -618,7 +618,8 @@ export class ConnectionService { orgId, routing, recipientKey, - invitationDid + invitationDid, + IsReuseConnection } = payload?.createOutOfBandConnectionInvitation; const agentDetails = await this.connectionRepository.getAgentEndPoint( @@ -630,6 +631,21 @@ export class ConnectionService { if (!agentDetails) { throw new NotFoundException(ResponseMessages.connection.error.agentEndPointNotFound); } + + let legacyinvitationDid; + if (IsReuseConnection) { + const data: agent_invitations[] = await this.connectionRepository.getInvitationDidByOrgId(orgId); + if (data && 0 < data.length) { + const [firstElement] = data; + legacyinvitationDid = firstElement?.invitationDid ?? undefined; + + this.logger.log('legacyinvitationDid:', legacyinvitationDid); + } + } + const connectionInvitationDid = invitationDid ? invitationDid : legacyinvitationDid; + + this.logger.log('connectionInvitationDid:', connectionInvitationDid); + this.logger.log(`logoUrl:::, ${organisation.logoUrl}`); const connectionPayload = { @@ -646,7 +662,7 @@ export class ConnectionService { routing: routing || undefined, messages: messages || undefined, recipientKey: recipientKey || undefined, - invitationDid: invitationDid || undefined + invitationDid: connectionInvitationDid || undefined }; const createConnectionInvitationFlag = 'connection-invitation'; diff --git a/apps/user/src/user.service.ts b/apps/user/src/user.service.ts index c8b2feef9..cf47485db 100644 --- a/apps/user/src/user.service.ts +++ b/apps/user/src/user.service.ts @@ -127,7 +127,7 @@ export class UserService { throw new NotFoundException(ResponseMessages.user.error.redirectUrlNotFound); } - sendVerificationMail = await this.sendEmailForVerification(email, verifyCode, redirectUrl, decryptClientId, brandLogoUrl, platformName); + sendVerificationMail = await this.sendEmailForVerification(email, verifyCode, redirectUrl, clientId, brandLogoUrl, platformName); } catch (error) { throw new InternalServerErrorException(ResponseMessages.user.error.emailSend); } diff --git a/apps/verification/src/verification.service.ts b/apps/verification/src/verification.service.ts index e5ddd8948..32a76ca75 100644 --- a/apps/verification/src/verification.service.ts +++ b/apps/verification/src/verification.service.ts @@ -813,7 +813,6 @@ export class VerificationService { } }); } - // For Indy format if (getProofPresentationById?.response?.request?.indy) { const requestedAttributes = getProofPresentationById?.response?.request?.indy?.requested_attributes;