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: #82 allow search by user guid #83

Merged
merged 14 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
121 changes: 2 additions & 119 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^7.1.10",
"dotenv": "^16.1.4",
"helmet": "^7.0.0",
"nest-winston": "^1.9.1",
"rimraf": "^5.0.0",
"rxjs": "^7.8.0",
"soap": "^1.0.0",
"swagger-ui-express": "^5.0.0",
"winston": "^3.8.2",
"nest-winston": "^1.9.1",
"helmet": "^7.0.0"
"winston": "^3.8.2"
},
"devDependencies": {
"@nestjs/schematics": "^10.0.0",
Expand All @@ -50,7 +50,7 @@
"eslint-config-prettier": "^8.6.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^16.0.0",
MCatherine1994 marked this conversation as resolved.
Show resolved Hide resolved
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.1.1",
"istanbul-badges-readme": "^1.8.4",
Expand Down Expand Up @@ -102,4 +102,4 @@
"overrides": {
"minimist@<1.2.6": "1.2.6"
}
}
}
27 changes: 25 additions & 2 deletions backend/src/modules/idim-webservice/idim-webservice.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ApiResponse, ApiQuery, ApiTags, ApiSecurity } from '@nestjs/swagger';
import { AuthGuard } from '../auth/auth.guard';
import { IdimWebserviceService } from './idim-webservice.service';
import {
SearchUserParameterType,
IDIRUserResponse,
BCEIDUserResponse,
RequesterAccountTypeCode,
Expand All @@ -34,7 +35,7 @@ export class IdimWebserviceController {
@Query('userId') userId: string,
@Query('requesterUserId') requesterUserId: string,
@Query('requesterAccountTypeCode')
requesterAccountTypeCode: string
requesterAccountTypeCode: RequesterAccountTypeCode
): Promise<HttpException | IDIRUserResponse> {
return this.idimWebserviceService.verifyIdirUser(
userId,
Expand All @@ -53,12 +54,34 @@ export class IdimWebserviceController {
@Query('userId') userId: string,
@Query('requesterUserGuid') requesterUserGuid: string,
@Query('requesterAccountTypeCode')
requesterAccountTypeCode: string
requesterAccountTypeCode: RequesterAccountTypeCode
): Promise<HttpException | BCEIDUserResponse> {
return this.idimWebserviceService.verifyBceidUser(
userId,
requesterUserGuid,
requesterAccountTypeCode
);
}

@Get('businessBceid')
@ApiResponse({ status: HttpStatus.OK, type: BCEIDUserResponse })
@ApiQuery({
name: 'requesterAccountTypeCode',
enum: RequesterAccountTypeCode,
})
@ApiQuery({ name: 'searchUserBy', enum: SearchUserParameterType })
async verifyBusinessBceidUser(
@Query('searchUserBy') searchUserBy: SearchUserParameterType,
@Query('searchValue') searchValue: string,
@Query('requesterUserGuid') requesterUserGuid: string,
@Query('requesterAccountTypeCode')
requesterAccountTypeCode: RequesterAccountTypeCode
): Promise<HttpException | BCEIDUserResponse> {
return this.idimWebserviceService.verifyBusinessBceidUser(
searchUserBy,
searchValue,
requesterUserGuid,
requesterAccountTypeCode
);
}
}
5 changes: 5 additions & 0 deletions backend/src/modules/idim-webservice/idim-webservice.dto.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { ApiProperty } from '@nestjs/swagger';

export enum SearchUserParameterType {
UserGuid = "userGuid",
UserId = "userId"
}

export enum RequesterAccountTypeCode {
Internal = 'Internal',
Business = 'Business'
Expand Down
Loading