Skip to content

Commit

Permalink
Develop to qa (#618)
Browse files Browse the repository at this point in the history
* Initial changes to send email

Signed-off-by: Krishna <krishna.waske@ayanworks.com>

* Initial changes to send email

Signed-off-by: Krishna <krishna.waske@ayanworks.com>

* feat: email functionality via oob email

Signed-off-by: Krishna <krishna.waske@ayanworks.com>

* remove logs

Signed-off-by: Krishna <krishna.waske@ayanworks.com>

* fix: logging

Signed-off-by: Krishna <krishna.waske@ayanworks.com>

* refactor: agent token encryption

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* feat: support multiple did methods (#589)

* feat: support multiple did methods

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* refactor: removed the commented code

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

* fix: removed commented code

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

* fix: removed commented code agent-service

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

* fix: removed commented code agent-service

Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>

---------

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>
Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>
Co-authored-by: tipusinghaw <tipu.singh@ayanworks.com>

* Add shortening url for email verification

Signed-off-by: Krishna <krishna.waske@ayanworks.com>

* fix: refactored tables

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: reafctored json data

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* feat:add reuse connection

Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>

* fix: refactored tables (#592)

* fix: refactored tables

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: reafctored json data

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

---------

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix:changed validation message

Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>

* worked on the POST API of refresh token

Signed-off-by: Nishad <nishad.shirsat@ayanworks.com>

* fix: an incorrect message appears when delete the ecosystem invitation which is already deleted

Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>

* fix: added the token validation with encryption on the wallet and DID

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: schema id validations

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* feat: dedicated agent spin up

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: solved the platform-admin agent spin-up

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: schema validation

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: schema validations

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: solved the duplication code

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: removed unnecessary import

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: removed duplicated code

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: removed duplicated code

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: removed duplicated code

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* feat: implementation of DID document for did web method (#601)

* wip: did document

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* remove unnecessary code

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* wip: store did doc in org agents table

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

---------

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* make array size dynamic

Signed-off-by: Krishna <krishna.waske@ayanworks.com>

* fix: solved the sonar lint issues

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: solved the sonar lint issues

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* Solved verification interface issue

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* restricted client access to update org and create client credentials

Signed-off-by: Nishad <nishad.shirsat@ayanworks.com>

* fix: bug fixes

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: resolved sonarlint issues

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* Added the dotenv config package on the common-service

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: solved issue for oob verification with email

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* fix: modified interface name

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: applied validations

Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>

* fix: web didDoc updation in database (#617)

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

* remove space in common service

Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>

---------

Signed-off-by: Krishna <krishna.waske@ayanworks.com>
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>
Signed-off-by: tipusinghaw <tipu.singh@ayanworks.com>
Signed-off-by: pallavicoder <pallavi.ghule@ayanworks.com>
Signed-off-by: Nishad <nishad.shirsat@ayanworks.com>
Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
Co-authored-by: Krishna <krishna.waske@ayanworks.com>
Co-authored-by: bhavanakarwade <137506897+bhavanakarwade@users.noreply.github.com>
Co-authored-by: tipusinghaw <tipu.singh@ayanworks.com>
Co-authored-by: bhavanakarwade <bhavana.karwade@ayanworks.com>
Co-authored-by: pallavicoder <pallavi.ghule@ayanworks.com>
Co-authored-by: Nishad <nishad.shirsat@ayanworks.com>
Co-authored-by: pallavighule <61926403+pallavighule@users.noreply.github.com>
Co-authored-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
Co-authored-by: pranalidhanavade <137780597+pranalidhanavade@users.noreply.github.com>
Co-authored-by: Nishad Shirsat <103021375+nishad-ayanworks@users.noreply.github.com>
Co-authored-by: Krishna <74084119+GHkrishna@users.noreply.github.com>
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
  • Loading branch information
12 people authored and KulkarniShashank committed Sep 11, 2024
1 parent 8b62509 commit 4360629
Show file tree
Hide file tree
Showing 20 changed files with 487 additions and 543 deletions.
88 changes: 44 additions & 44 deletions apps/agent-service/src/agent-service.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller } from '@nestjs/common';
import { MessagePattern } from '@nestjs/microservices';
import { AgentServiceService } from './agent-service.service';
import { IAgentStatus, IConnectionDetails, IUserRequestInterface, ISendProofRequestPayload, IAgentSpinUpSatus, IGetCredDefAgentRedirection, IGetSchemaAgentRedirection, IAgentSpinupDto, IIssuanceCreateOffer, ITenantCredDef, ITenantDto, ITenantSchema, IOutOfBandCredentialOffer, IProofPresentation, IAgentProofRequest, IPresentation, IDidCreate, IWallet, ITenantRecord } from './interface/agent-service.interface';
import { IAgentStatus, IConnectionDetails, IUserRequestInterface, ISendProofRequestPayload, IAgentSpinUpSatus, IGetCredDefAgentRedirection, IGetSchemaAgentRedirection, IAgentSpinupDto, IIssuanceCreateOffer, ITenantCredDef, ITenantDto, ITenantSchema, IOutOfBandCredentialOffer, IAgentProofRequest, IDidCreate, IWallet, ITenantRecord } from './interface/agent-service.interface';
import { user } from '@prisma/client';
import { InvitationMessage } from '@credebl/common/interfaces/agent-service.interface';
import { AgentSpinUpStatus } from '@credebl/enum/enum';
Expand Down Expand Up @@ -76,24 +76,16 @@ export class AgentServiceController {

//DONE
@MessagePattern({ cmd: 'agent-create-connection-legacy-invitation' })
async createLegacyConnectionInvitation(payload: {
connectionPayload: IConnectionDetails;
url: string,
orgId: string,
}): Promise<InvitationMessage> {
return this.agentServiceService.createLegacyConnectionInvitation(
payload.connectionPayload,
payload.url,
payload.orgId
);
async createLegacyConnectionInvitation(payload: { connectionPayload: IConnectionDetails, url: string, orgId: string }): Promise<InvitationMessage> {
return this.agentServiceService.createLegacyConnectionInvitation(payload.connectionPayload, payload.url, payload.orgId);
}

//DONE
@MessagePattern({ cmd: 'agent-send-credential-create-offer' })
async sendCredentialCreateOffer(payload: {
issueData: IIssuanceCreateOffer;
url: string,
orgId: string,
url: string;
orgId: string;
}): Promise<object> {
return this.agentServiceService.sendCredentialCreateOffer(payload.issueData, payload.url, payload.orgId);
}
Expand All @@ -106,7 +98,7 @@ export class AgentServiceController {

//DONE
@MessagePattern({ cmd: 'agent-get-issued-credentials-by-credentialDefinitionId' })
async getIssueCredentialsbyCredentialRecordId(payload: { url: string, orgId: string }): Promise<object> {
async getIssueCredentialsbyCredentialRecordId(payload: { url: string; orgId: string }): Promise<object> {
return this.agentServiceService.getIssueCredentialsbyCredentialRecordId(payload.url, payload.orgId);
}
//DONE
Expand All @@ -117,28 +109,28 @@ export class AgentServiceController {

//DONE
@MessagePattern({ cmd: 'agent-get-proof-presentation-by-id' })
async getProofPresentationById(payload: { url: string, orgId: string }): Promise<object> {
async getProofPresentationById(payload: { url: string; orgId: string }): Promise<object> {
return this.agentServiceService.getProofPresentationById(payload.url, payload.orgId);
}

//DONE
@MessagePattern({ cmd: 'agent-send-proof-request' })
async sendProofRequest(payload: {
proofRequestPayload: ISendProofRequestPayload,
url: string,
orgId: string,
proofRequestPayload: ISendProofRequestPayload;
url: string;
orgId: string;
}): Promise<IAgentProofRequest> {
return this.agentServiceService.sendProofRequest(payload.proofRequestPayload, payload.url, payload.orgId);
}
//DONE
@MessagePattern({ cmd: 'agent-verify-presentation' })
async verifyPresentation(payload: { url: string, orgId: string }): Promise<object> {
async verifyPresentation(payload: { url: string; orgId: string }): Promise<object> {
return this.agentServiceService.verifyPresentation(payload.url, payload.orgId);
}

//DONE
@MessagePattern({ cmd: 'agent-get-all-connections' })
async getConnections(payload: { url: string, orgId: string }): Promise<object> {
async getConnections(payload: { url: string; orgId: string }): Promise<object> {
return this.agentServiceService.getConnections(payload.url, payload.orgId);
}

Expand All @@ -165,24 +157,24 @@ export class AgentServiceController {
//DONE
@MessagePattern({ cmd: 'agent-send-out-of-band-proof-request' })
async sendOutOfBandProofRequest(payload: {
proofRequestPayload: ISendProofRequestPayload,
url: string,
orgId: string,
proofRequestPayload: ISendProofRequestPayload;
url: string;
orgId: string;
}): Promise<object> {
return this.agentServiceService.sendOutOfBandProofRequest(payload.proofRequestPayload, payload.url, payload.orgId);
}

//DONE
@MessagePattern({ cmd: 'get-agent-verified-proof-details' })
async getVerifiedProofDetails(payload: { url: string, orgId: string }): Promise<object> {
async getVerifiedProofDetails(payload: { url: string; orgId: string }): Promise<object> {
return this.agentServiceService.getVerifiedProofDetails(payload.url, payload.orgId);
}

@MessagePattern({ cmd: 'agent-schema-endorsement-request' })
async schemaEndorsementRequest(payload: {
url: string,
orgId: string,
requestSchemaPayload: object,
url: string;
orgId: string;
requestSchemaPayload: object;
}): Promise<object> {
return this.agentServiceService.schemaEndorsementRequest(payload.url, payload.orgId, payload.requestSchemaPayload);
}
Expand All @@ -192,33 +184,29 @@ export class AgentServiceController {
orgId: string;
requestSchemaPayload: object;
}): Promise<object> {
return this.agentServiceService.credDefEndorsementRequest(payload.url, payload.orgId, payload.requestSchemaPayload);
return this.agentServiceService.credDefEndorsementRequest(
payload.url,
payload.orgId,
payload.requestSchemaPayload
);
}

//DONE
@MessagePattern({ cmd: 'agent-sign-transaction' })
async signTransaction(payload: { url: string, orgId: string, signEndorsementPayload: object }): Promise<object> {
async signTransaction(payload: { url: string; orgId: string; signEndorsementPayload: object }): Promise<object> {
return this.agentServiceService.signTransaction(payload.url, payload.orgId, payload.signEndorsementPayload);
}

//DONE
@MessagePattern({ cmd: 'agent-submit-transaction' })
async submitTransaction(payload: { url: string; orgId: string, submitEndorsementPayload: object }): Promise<object> {
async submitTransaction(payload: { url: string; orgId: string; submitEndorsementPayload: object }): Promise<object> {
return this.agentServiceService.sumbitTransaction(payload.url, payload.orgId, payload.submitEndorsementPayload);
}

//DONE
@MessagePattern({ cmd: 'agent-out-of-band-credential-offer' })
async outOfBandCredentialOffer(payload: {
outOfBandIssuancePayload: IOutOfBandCredentialOffer,
url: string,
orgId: string,
}): Promise<object> {
return this.agentServiceService.outOfBandCredentialOffer(
payload.outOfBandIssuancePayload,
payload.url,
payload.orgId
);
async outOfBandCredentialOffer(payload: { outOfBandIssuancePayload: IOutOfBandCredentialOffer, url: string, orgId: string }): Promise<object> {
return this.agentServiceService.outOfBandCredentialOffer(payload.outOfBandIssuancePayload, payload.url, payload.orgId);
}

//DONE
Expand All @@ -228,17 +216,30 @@ export class AgentServiceController {
}

@MessagePattern({ cmd: 'agent-receive-invitation-url' })
async receiveInvitationUrl(payload: { url, orgId, receiveInvitationUrl }): Promise<string> {
async receiveInvitationUrl(payload: {
url,
orgId,
receiveInvitationUrl
}): Promise<string> {
return this.agentServiceService.receiveInvitationUrl(payload.receiveInvitationUrl, payload.url, payload.orgId);
}

@MessagePattern({ cmd: 'agent-receive-invitation' })
async receiveInvitation(payload: { url, orgId, receiveInvitation }): Promise<string> {
async receiveInvitation(payload: {
url,
orgId,
receiveInvitation
}): Promise<string> {
return this.agentServiceService.receiveInvitation(payload.receiveInvitation, payload.url, payload.orgId);
}

@MessagePattern({ cmd: 'agent-send-question' })
async sendQuestion(payload: { url, orgId, questionPayload }): Promise<object> {
async sendQuestion(payload: {
url,
orgId,
questionPayload
}): Promise<object> {

return this.agentServiceService.sendQuestion(payload.questionPayload, payload.url, payload.orgId);
}

Expand All @@ -253,4 +254,3 @@ export class AgentServiceController {
}

}

Loading

0 comments on commit 4360629

Please sign in to comment.