Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rupal Singla authored and Rupal Singla committed Feb 3, 2025
1 parent 057ce6f commit c45aec8
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 1 deletion.
10 changes: 10 additions & 0 deletions constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,16 @@ export const IGMApiSequence = {
LSP_ON_ISSUE_STATUS: 'lsp_on_issue_status',
}

export const IGM2Flows ={
FLOW_1: 'FLOW_1',
FLOW_2: 'FLOW_2',
FLOW_3: 'FLOW_3',
}
export const IGM2apiSequence = {
// ISSUE_1:
}


export const RSFapiSequence = {
RECEIVER_RECON: 'receiver_recon',
ON_RECEIVER_RECON: 'on_receiver_recon',
Expand Down
30 changes: 30 additions & 0 deletions controller/validate/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,41 @@ const validateIGM = async (payload: string, version: string) => {
}

break

default:
message = ERROR_MESSAGE.LOG_VERIFICATION_INVALID_VERSION
logger.warn('Invalid Version!!')
}



return { response, success, message }
}


const validateIGM2 = async (payload: string, version: string) =>
let response
let success = false
let message = ERROR_MESSAGE.LOG_VERIFICATION_UNSUCCESSFUL

switch (version) {
case '2.0.0':
response = IGM2validateLogs(payload)

if (_.isEmpty(response)) {
success = true
message = ERROR_MESSAGE.LOG_VERIFICATION_SUCCESSFUL
}

break

default:
message = ERROR_MESSAGE.LOG_VERIFICATION_INVALID_VERSION
logger.warn('Invalid Version!!')
}



return { response, success, message }
}
const validateRSF = async (payload: string, version: string) => {
Expand Down
13 changes: 12 additions & 1 deletion controller/validate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,18 @@ const controller = {
const { response, success, message } = await helper.validateIGM(payload, version)
result = { response, success, message }
break
case DOMAIN.RSF:
case DOMAIN.IGM2:
// eslint-disable-next-line no-case-declarations
const { response, success, message } = await helper.validateIGM2(payload, version)
result = { response, success, message }
break






case DOMAIN.RSF:
{
const { response, success, message } = await helper.validateRSF(payload, version)
result = { response, success, message }
Expand Down
1 change: 1 addition & 0 deletions routes/validate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const router = express.Router()
router.post('/validate', validateController.validate)
router.post('/validate/fis', validateController.validate)
router.post('/validate/igm', validateController.validate)
router.post('/validate/igm2', validateController.validate)
router.post('/validate/trv', validateController.validate)
router.post('/validate-schema', validateController.validateSingleAction)
router.post('/validate/token', validateController.validateToken)
Expand Down
Empty file added utils/igm/igm2/issue.ts
Empty file.
Empty file added utils/igm/igm2/on_issue.ts
Empty file.

0 comments on commit c45aec8

Please sign in to comment.