Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: out of band issuance #363

Merged
merged 95 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
2d536ab
feat:NATS Configuration SetUp with Nkeys and Seed
pallavighule Oct 23, 2023
ad9d90d
Worked on NATs security setup with nkeys
nishad-ayanworks Nov 7, 2023
273acf1
Merge branch 'develop' of https://github.com/credebl/platform into na…
nishad-ayanworks Nov 7, 2023
22bcbdc
Merge branch 'develop' of https://github.com/credebl/platform into na…
nishad-ayanworks Nov 8, 2023
8d9fb52
Feat:NATS-Security setup authenticating with Nkeys
pallavighule Nov 8, 2023
82c306e
worked on the ecosystem organization model mapping
nishad-ayanworks Nov 29, 2023
58e9203
Merge pull request #316 from credebl/313-map-organization-ecosystem
KulkarniShashank Nov 29, 2023
704b648
refactor migration file for ecosystem-orgs
nishad-ayanworks Nov 29, 2023
b263e60
Merge pull request #319 from credebl/313-map-organization-ecosystem
KulkarniShashank Nov 29, 2023
2bcc6c6
feat: oob issuance for multiple records
bhavanakarwade Dec 1, 2023
47a8249
Merge pull request #320 from credebl/oob-issuance-multiple-records
KulkarniShashank Dec 1, 2023
abeab2c
feat:NATS-Security-Authenticating-with-NKeys
pallavighule Dec 1, 2023
9b44c29
refactor: content on certificates templates (#321)
bhavanakarwade Dec 3, 2023
1a2a422
refactor:API-response-refactor
MoulikaKulkarni Dec 4, 2023
74501ca
Merge branch 'develop' of https://github.com/credebl/platform into ap…
MoulikaKulkarni Dec 4, 2023
adec4af
Merge branch 'develop' of https://github.com/credebl/platform into ap…
MoulikaKulkarni Dec 4, 2023
7b7c963
Merge pull request #324 from credebl/api-response
nishad-ayanworks Dec 4, 2023
e3434fe
refactor: get api of connection
bhavanakarwade Dec 4, 2023
53835c2
fix:added seed inside connection service
pallavighule Dec 4, 2023
62c5dce
Merge branch 'develop' of https://github.com/credebl/platform into na…
pallavighule Dec 4, 2023
fb3e490
refactor: API-response-refactor
MoulikaKulkarni Dec 4, 2023
fc32c13
Merge branch 'develop' of https://github.com/credebl/platform into ap…
MoulikaKulkarni Dec 4, 2023
69f9de3
Merge pull request #328 from credebl/api-response
nishad-ayanworks Dec 4, 2023
df71b4a
Merge branch 'develop' of https://github.com/credebl/platform into na…
pallavighule Dec 4, 2023
da1f273
refactor: get API of fetch all connection
bhavanakarwade Dec 5, 2023
c3115fc
Merge branch 'develop' of https://github.com/credebl/platform into so…
bhavanakarwade Dec 5, 2023
148e978
refactor: API-response-refactor
MoulikaKulkarni Dec 5, 2023
a88fd71
Merge branch 'develop' of https://github.com/credebl/platform into ap…
MoulikaKulkarni Dec 5, 2023
20705a7
Merge pull request #330 from credebl/api-response
nishad-ayanworks Dec 5, 2023
ff6d842
refact:added nkeys inside cred-def and schema service
pallavighule Dec 5, 2023
5b5fe53
refactor: API-response-refactor
MoulikaKulkarni Dec 5, 2023
2a45e28
Merge branch 'develop' of https://github.com/credebl/platform into ap…
MoulikaKulkarni Dec 5, 2023
98c6028
refactor: API-response-refactor
MoulikaKulkarni Dec 5, 2023
091e054
refactor: API-response-refactor
MoulikaKulkarni Dec 5, 2023
cd55d14
Merge branch 'develop' of https://github.com/credebl/platform into na…
pallavighule Dec 5, 2023
fd8ed50
chore:removed commented code
pallavighule Dec 5, 2023
832e33c
Merge pull request #332 from credebl/nats-security-configuration
nishad-ayanworks Dec 5, 2023
1049b6a
Merge pull request #331 from credebl/api-response
nishad-ayanworks Dec 5, 2023
0023469
feat: added pagination and sorting features
bhavanakarwade Dec 5, 2023
40b22e1
Merge branch 'develop' of https://github.com/credebl/platform into so…
bhavanakarwade Dec 5, 2023
6f714d4
worked on the schema name version validations
nishad-ayanworks Dec 6, 2023
170a2fe
Merge pull request #333 from credebl/329-major-critical-bugs
KulkarniShashank Dec 6, 2023
231ea7a
feat: applied pagination and sorting feature for connections issuance…
bhavanakarwade Dec 6, 2023
8467cd5
Merge branch 'develop' of https://github.com/credebl/platform into so…
bhavanakarwade Dec 6, 2023
e065ad4
refactor:API response
MoulikaKulkarni Dec 6, 2023
07af2c2
Merge pull request #336 from credebl/api-response
nishad-ayanworks Dec 7, 2023
95a3f1f
refactor: applied trim validations on oob issuance payload
bhavanakarwade Dec 7, 2023
8f75bc5
Merge branch 'develop' of https://github.com/credebl/platform into tr…
bhavanakarwade Dec 7, 2023
49ea78b
resolved sonar lint checks
bhavanakarwade Dec 7, 2023
cfc5959
resolved comments
bhavanakarwade Dec 7, 2023
42b04e8
Merge pull request #338 from credebl/trim-validation-on-request-body
nishad-ayanworks Dec 8, 2023
1e5e0ab
fix: retrieve a list of schemas by network
bhavanakarwade Dec 11, 2023
2240df5
added class validator in dto
bhavanakarwade Dec 11, 2023
cf5a386
Merge branch 'develop' of https://github.com/credebl/platform into so…
bhavanakarwade Dec 11, 2023
59e919a
worked on the ecosystem ledgers restrictions
nishad-ayanworks Dec 11, 2023
93a6444
worked on the fetch ledger details for ecosystem.
nishad-ayanworks Dec 12, 2023
1c94883
added ecosystem & org role guard
nishad-ayanworks Dec 12, 2023
749c20c
Merge pull request #342 from credebl/339-ecosystem-ledger-restrictions
KulkarniShashank Dec 13, 2023
870e454
feat: masked pi data
bhavanakarwade Dec 13, 2023
608392c
Merge branch 'develop' of https://github.com/credebl/platform into cr…
bhavanakarwade Dec 13, 2023
4c0d566
Merge branch 'develop' of https://github.com/credebl/platform into so…
bhavanakarwade Dec 13, 2023
35595ae
feat: applied pagination and sorting
bhavanakarwade Dec 13, 2023
2e58301
resolved sonarlint checks
bhavanakarwade Dec 13, 2023
7d28e9f
removed unnecessary code
bhavanakarwade Dec 13, 2023
c323438
refactor:api response
pranalidhanavade Dec 13, 2023
b04660c
Merge branch 'develop' of https://github.com/credebl/platform into re…
pranalidhanavade Dec 13, 2023
5802010
Merge pull request #341 from credebl/cross-network-selection
KulkarniShashank Dec 13, 2023
89ec8ba
Merge branch 'develop' of https://github.com/credebl/platform into so…
bhavanakarwade Dec 13, 2023
abcda45
Merge pull request #343 from credebl/sorting-pagination
KulkarniShashank Dec 13, 2023
fbda26d
fix: schema validations bugs
bhavanakarwade Dec 13, 2023
1bce65e
refactor:api response
pranalidhanavade Dec 14, 2023
f341285
worked on the ecosystem invitation reject
nishad-ayanworks Dec 14, 2023
4e272fc
Merge branch 'develop' of https://github.com/credebl/platform into 33…
nishad-ayanworks Dec 14, 2023
f8e5ecd
refactor:api response
pranalidhanavade Dec 14, 2023
60b9a23
worked on the ledger details match function
nishad-ayanworks Dec 14, 2023
425cd9a
cosmetic changes
nishad-ayanworks Dec 14, 2023
ad17250
Merge pull request #348 from credebl/339-ecosystem-ledger-restrictions
KulkarniShashank Dec 14, 2023
3568fd3
fix: resolved pagination values
bhavanakarwade Dec 14, 2023
35de74d
Merge branch 'develop' of https://github.com/credebl/platform into sc…
bhavanakarwade Dec 14, 2023
8e2a68b
fix: aaded request id
bhavanakarwade Dec 14, 2023
e96f776
refactor:api response
pranalidhanavade Dec 14, 2023
0610866
added missing parameter
bhavanakarwade Dec 14, 2023
8595c55
Merge branch 'develop' of https://github.com/credebl/platform into re…
pranalidhanavade Dec 14, 2023
4d4dfc5
Merge pull request #349 from credebl/fix-request-id
KulkarniShashank Dec 14, 2023
f1595c3
Merge branch 'develop' of https://github.com/credebl/platform into sc…
bhavanakarwade Dec 14, 2023
94a65ef
refactor:api response refactoring
pranalidhanavade Dec 14, 2023
5bdd12e
Merge branch 'develop' of https://github.com/credebl/platform into re…
pranalidhanavade Dec 14, 2023
875b3d9
refactor: refactor pagination and sorting feature
bhavanakarwade Dec 15, 2023
c617c90
refactor:api response refactoring of user module
pranalidhanavade Dec 15, 2023
9d25794
Merge pull request #346 from credebl/schema-validations
nishad-ayanworks Dec 15, 2023
16c8147
Merge branch 'develop' of https://github.com/credebl/platform into re…
pranalidhanavade Dec 15, 2023
0fafcac
refactor:api refactoring of user module
pranalidhanavade Dec 15, 2023
bf3c732
Merge pull request #344 from credebl/refactor-api-response
vivekayanworks Dec 18, 2023
3cb813a
Merge branch 'develop' of https://github.com/credebl/platform into de…
bhavanakarwade Dec 20, 2023
5a46c85
removed unnecessary qr-code function
bhavanakarwade Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ coverage
libs/prisma-service/prisma/data/credebl-master-table.json
uploadedFles/exports
uploadedFles/import
uploadedFles/export
uploadedFles/export
nats-server.conf
7 changes: 3 additions & 4 deletions apps/agent-provisioning/src/agent-provisioning.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ import { AgentProvisioningController } from './agent-provisioning.controller';
import { AgentProvisioningService } from './agent-provisioning.service';
import { ClientsModule, Transport } from '@nestjs/microservices';
import { ConfigModule } from '@nestjs/config';

import { getNatsOptions } from '@credebl/common/nats.config';
@Module({
imports: [
ConfigModule.forRoot(),
ClientsModule.register([
{
name: 'NATS_CLIENT',
transport: Transport.NATS,
options: {
servers: [`${process.env.NATS_URL}`]
}
options: getNatsOptions(process.env.AGENT_PROVISIONING_NKEY_SEED)

}
])
],
Expand Down
6 changes: 2 additions & 4 deletions apps/agent-provisioning/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import { HttpExceptionFilter } from 'libs/http-exception.filter';
import { Logger } from '@nestjs/common';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { AgentProvisioningModule } from './agent-provisioning.module';

import { getNatsOptions } from '@credebl/common/nats.config';
const logger = new Logger();

async function bootstrap(): Promise<void> {

const app = await NestFactory.createMicroservice<MicroserviceOptions>(AgentProvisioningModule, {
transport: Transport.NATS,
options: {
servers: [`${process.env.NATS_URL}`]
}
options: getNatsOptions(process.env.AGENT_PROVISIONING_NKEY_SEED)
});
app.useGlobalFilters(new HttpExceptionFilter());

Expand Down
5 changes: 2 additions & 3 deletions apps/agent-service/src/agent-service.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { AgentServiceRepository } from './repositories/agent-service.repository'
import { ConfigModule } from '@nestjs/config';
import { ConnectionService } from 'apps/connection/src/connection.service';
import { ConnectionRepository } from 'apps/connection/src/connection.repository';
import { getNatsOptions } from '@credebl/common/nats.config';

@Module({
imports: [
Expand All @@ -16,9 +17,7 @@ import { ConnectionRepository } from 'apps/connection/src/connection.repository'
{
name: 'NATS_CLIENT',
transport: Transport.NATS,
options: {
servers: [`${process.env.NATS_URL}`]
}
options: getNatsOptions(process.env.AGENT_SERVICE_NKEY_SEED)
}
]),
CommonModule
Expand Down
6 changes: 3 additions & 3 deletions apps/agent-service/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AgentServiceModule } from './agent-service.module';
import { AgentServiceService } from './agent-service.service';
import { IAgentSpinupDto, IUserRequestInterface } from './interface/agent-service.interface';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { getNatsOptions } from '@credebl/common/nats.config';
import { CommonConstants } from '@credebl/common/common.constant';
import { Ledgers } from '@credebl/enum/enum';

Expand All @@ -14,9 +15,8 @@ async function bootstrap(): Promise<void> {

const app = await NestFactory.createMicroservice<MicroserviceOptions>(AgentServiceModule, {
transport: Transport.NATS,
options: {
servers: [`${process.env.NATS_URL}`]
}
options: getNatsOptions(process.env.AGENT_SERVICE_NKEY_SEED)

});
app.useGlobalFilters(new HttpExceptionFilter());

Expand Down
63 changes: 41 additions & 22 deletions apps/api-gateway/common/exception-handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Catch, ArgumentsHost, HttpException, HttpStatus, Logger } from '@nestjs/common';
import { BaseExceptionFilter } from '@nestjs/core';
import { isArray } from 'class-validator';

@Catch()
export class CustomExceptionFilter extends BaseExceptionFilter {
Expand All @@ -20,12 +21,18 @@ export class CustomExceptionFilter extends BaseExceptionFilter {
}

let errorResponse;
if (exception && exception["statusCode"] === HttpStatus.INTERNAL_SERVER_ERROR) {
if (exception.message && exception.message["message"]) {
if (isArray(exception)) {
errorResponse = {
statusCode: status,
message: exception[0],
error: exception[0]
};
} else if (exception && exception['statusCode'] === HttpStatus.INTERNAL_SERVER_ERROR) {
if (exception.message && exception.message['message']) {
errorResponse = {
statusCode: status,
message: exception.message["message"],
error: exception.message["message"]
message: exception.message['message'],
error: exception.message['message']
};
} else {
errorResponse = {
Expand All @@ -34,45 +41,57 @@ export class CustomExceptionFilter extends BaseExceptionFilter {
error: 'Oops! Something went wrong. Please try again'
};
}
} else if (exception && exception["error"] && exception["error"].message && (exception["error"].statusCode || exception["error"].code)) {

const statusCode = exception["error"].statusCode || exception["error"].code || status;
} else if (
exception &&
exception['error'] &&
exception['error'].message &&
(exception['error'].statusCode || exception['error'].code)
) {
const statusCode = exception['error'].statusCode || exception['error'].code || status;
errorResponse = {
statusCode,
message: exception["error"].message || 'Internal server error',
error: exception["error"].message || 'Internal server error'
message: exception['error'].message || 'Internal server error',
error: exception['error'].message || 'Internal server error'
};
} else if (exception && exception["statusCode"] === undefined && status === HttpStatus.INTERNAL_SERVER_ERROR) {
} else if (exception && exception['statusCode'] === undefined && status === HttpStatus.INTERNAL_SERVER_ERROR) {
errorResponse = {
statusCode: status,
message: 'Oops! Something went wrong. Please try again',
error: 'Oops! Something went wrong. Please try again'
};
} else {
if (exception && exception["response"] && exception.message) {

if (Array.isArray(exception["response"].message)) {

if (exception && exception['response'] && exception.message) {
if (Array.isArray(exception['response'].message)) {
errorResponse = {
statusCode: exception["statusCode"] ? exception["statusCode"] : status,
statusCode: exception['statusCode'] ? exception['statusCode'] : status,
message: exception.message ? exception.message : 'Internal server error',
error: exception["response"].message ? exception["response"].message : exception["response"] ? exception["response"] : 'Internal server error'
error: exception['response'].message
? exception['response'].message
: exception['response']
? exception['response']
: 'Internal server error'
};
} else {
errorResponse = {
statusCode: exception["statusCode"] ? exception["statusCode"] : status,
message: exception["response"].message ? exception["response"].message : exception["response"] ? exception["response"] : 'Internal server error',
error: exception["response"].message ? exception["response"].message : exception["response"] ? exception["response"] : 'Internal server error'
statusCode: exception['statusCode'] ? exception['statusCode'] : status,
message: exception['response'].message
? exception['response'].message
: exception['response']
? exception['response']
: 'Internal server error',
error: exception['response'].message
? exception['response'].message
: exception['response']
? exception['response']
: 'Internal server error'
};
}
} else if (exception && exception.message) {

errorResponse = {
statusCode: exception["statusCode"] ? exception["statusCode"] : status,
statusCode: exception['statusCode'] ? exception['statusCode'] : status,
message: exception.message || 'Internal server error',
error: exception.message || 'Internal server error'
};

}
}

Expand Down
6 changes: 3 additions & 3 deletions apps/api-gateway/src/agent-service/agent-service.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { CommonService } from '../../../../libs/common/src/common.service';
import { ConfigModule } from '@nestjs/config';
import { AgentController } from './agent-service.controller';
import { AgentService } from './agent-service.service';
import { getNatsOptions } from '@credebl/common/nats.config';

@Module({
imports: [
Expand All @@ -15,9 +16,8 @@ import { AgentService } from './agent-service.service';
{
name: 'NATS_CLIENT',
transport: Transport.NATS,
options: {
servers: [`${process.env.NATS_URL}`]
}
options: getNatsOptions(process.env.API_GATEWAY_NKEY_SEED)

},
CommonModule
])
Expand Down
8 changes: 5 additions & 3 deletions apps/api-gateway/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AuthzMiddleware } from './authz/authz.middleware';
import { AuthzModule } from './authz/authz.module';
import { ClientsModule } from '@nestjs/microservices';
import { ClientsModule, Transport } from '@nestjs/microservices';
import { ConfigModule } from '@nestjs/config';
import { CredentialDefinitionModule } from './credential-definition/credential-definition.module';
import { FidoModule } from './fido/fido.module';
Expand All @@ -16,10 +16,11 @@ import { VerificationModule } from './verification/verification.module';
import { RevocationController } from './revocation/revocation.controller';
import { RevocationModule } from './revocation/revocation.module';
import { SchemaModule } from './schema/schema.module';
import { commonNatsOptions } from 'libs/service/nats.options';
// import { commonNatsOptions } from 'libs/service/nats.options';
import { UserModule } from './user/user.module';
import { ConnectionModule } from './connection/connection.module';
import { EcosystemModule } from './ecosystem/ecosystem.module';
import { getNatsOptions } from '@credebl/common/nats.config';
import { BullModule } from '@nestjs/bull';
import { CacheModule } from '@nestjs/cache-manager';
import * as redisStore from 'cache-manager-redis-store';
Expand All @@ -30,7 +31,8 @@ import * as redisStore from 'cache-manager-redis-store';
ClientsModule.register([
{
name: 'NATS_CLIENT',
...commonNatsOptions('AGENT_SERVICE:REQUESTER')
transport: Transport.NATS,
options: getNatsOptions(process.env.API_GATEWAY_NKEY_SEED)
}
]),
AgentModule,
Expand Down
7 changes: 2 additions & 5 deletions apps/api-gateway/src/authz/authz.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { UserModule } from '../user/user.module';
import { UserService } from '../user/user.service';
import { VerificationService } from '../verification/verification.service';
import { EcosystemService } from '../ecosystem/ecosystem.service';

//import { WebhookService } from "../../../platform-service/src/webhook/webhook.service";
import { getNatsOptions } from '@credebl/common/nats.config';

@Module({
imports: [
Expand All @@ -31,9 +30,7 @@ import { EcosystemService } from '../ecosystem/ecosystem.service';
{
name: 'NATS_CLIENT',
transport: Transport.NATS,
options: {
servers: [`${process.env.NATS_URL}`]
}
options: getNatsOptions(process.env.API_GATEWAY_NKEY_SEED)
},
CommonModule
]),
Expand Down
71 changes: 39 additions & 32 deletions apps/api-gateway/src/connection/connection.controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IResponseType from '@credebl/common/interfaces/response.interface';
import { ResponseMessages } from '@credebl/common/response-messages';
import { Controller, Logger, Post, Body, UseGuards, HttpStatus, Res, Get, Param, Query, UseFilters } from '@nestjs/common';
import { Controller, Logger, Post, Body, UseGuards, HttpStatus, Res, Get, Param, UseFilters, Query } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { ApiBearerAuth, ApiExcludeEndpoint, ApiForbiddenResponse, ApiOperation, ApiQuery, ApiResponse, ApiTags, ApiUnauthorizedResponse } from '@nestjs/swagger';
import { User } from '../authz/decorators/user.decorator';
Expand All @@ -11,12 +11,13 @@ import { ConnectionService } from './connection.service';
import { ConnectionDto, CreateConnectionDto } from './dtos/connection.dto';
import { IUserRequestInterface } from './interfaces';
import { Response } from 'express';
import { Connections } from './enums/connections.enum';
import { IUserRequest } from '@credebl/user-request/user-request.interface';
import { CustomExceptionFilter } from 'apps/api-gateway/common/exception-handler';
import { OrgRoles } from 'libs/org-roles/enums';
import { Roles } from '../authz/decorators/roles.decorator';
import { OrgRolesGuard } from '../authz/guards/org-roles.guard';
import { GetAllConnectionsDto } from './dtos/get-all-connections.dto';
import { IConnectionSearchinterface } from '../interfaces/ISchemaSearch.interface';

@UseFilters(CustomExceptionFilter)
@Controller()
Expand Down Expand Up @@ -64,9 +65,6 @@ export class ConnectionController {
/**
* Description: Get all connections
* @param user
* @param threadId
* @param connectionId
* @param state
* @param orgId
*
*/
Expand All @@ -77,40 +75,48 @@ export class ConnectionController {
summary: `Fetch all connection details`,
description: `Fetch all connection details`
})
@ApiQuery({
name: 'pageNumber',
type: Number,
required: false
})
@ApiQuery({
name: 'searchByText',
type: String,
required: false
})
@ApiQuery({
name: 'pageSize',
type: Number,
required: false
})
@ApiQuery({
name: 'sorting',
type: String,
required: false
})
@ApiQuery({
name: 'sortByValue',
type: String,
required: false
})
@ApiResponse({ status: 200, description: 'Success', type: AuthTokenResponse })
@ApiQuery(
{ name: 'outOfBandId', required: false }
)
@ApiQuery(
{ name: 'alias', required: false }
)
@ApiQuery(
{ name: 'state', enum: Connections, required: false }
)
@ApiQuery(
{ name: 'myDid', required: false }
)
@ApiQuery(
{ name: 'theirDid', required: false }
)
@ApiQuery(
{ name: 'theirLabel', required: false }
)
async getConnections(
@Query() getAllConnectionsDto: GetAllConnectionsDto,
@User() user: IUserRequest,
@Query('outOfBandId') outOfBandId: string,
@Query('alias') alias: string,
@Query('state') state: string,
@Query('myDid') myDid: string,
@Query('theirDid') theirDid: string,
@Query('theirLabel') theirLabel: string,
@Param('orgId') orgId: string,
@Res() res: Response
): Promise<Response> {

// eslint-disable-next-line no-param-reassign
state = state || undefined;
const connectionDetails = await this.connectionService.getConnections(user, outOfBandId, alias, state, myDid, theirDid, theirLabel, orgId);
const { pageSize, searchByText, pageNumber, sorting, sortByValue } = getAllConnectionsDto;
const connectionSearchCriteria: IConnectionSearchinterface = {
pageNumber,
searchByText,
pageSize,
sorting,
sortByValue
};
const connectionDetails = await this.connectionService.getConnections(connectionSearchCriteria, user, orgId);

const finalResponse: IResponseType = {
statusCode: HttpStatus.OK,
Expand Down Expand Up @@ -149,6 +155,7 @@ export class ConnectionController {

}


/**
* Catch connection webhook responses.
* @Body connectionDto
Expand Down
5 changes: 2 additions & 3 deletions apps/api-gateway/src/connection/connection.module.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getNatsOptions } from '@credebl/common/nats.config';
import { ConnectionController } from './connection.controller';
import { ConnectionService } from './connection.service';
import { Module } from '@nestjs/common';
Expand All @@ -10,9 +11,7 @@ import { ClientsModule, Transport } from '@nestjs/microservices';
{
name: 'NATS_CLIENT',
transport: Transport.NATS,
options: {
servers: [`${process.env.NATS_URL}`]
}
options: getNatsOptions(process.env.API_GATEWAY_NKEY_SEED)
}
])
],
Expand Down
Loading
Loading