Overview
This template is meant to be the starting point to build a new typescript project that implements an identification step to interact with the identification manager application.
Endpoints
The endpoints exposed are designed to be compatible with either Kafka or REST flow manager service, that means the responses are asynchronous.
The following events are sent by default by the service:
- identificationCompleted
- identificationError
- callbackReceived
Identification
This step will perform the following action:
- read request data on messagePayload object (e.g. mainFlowId)
- perform identification steps (e.g. call to external provider)
- send external response into the
messagePayload
object - send data mapped following the main saga data schema inside the object
mainFlowData
Response
{
"key": "{{mainFlowId}}",
"value": {
"messageLabel": "identificationCompleted",
"messagePayload": {
"mainFlowData": {}
}
}
}
This could be enabled through REST POST /identification
endpoint or Kafka consumer, data to Router is sent using the same mode.
POST /callback
This endpoint does the following actions:
- send callback data into the
messagePayload
object - send data mapped following the main saga data schema inside the object
mainFlowData
Response
{
"key": "{{mainFlowId}}",
"value": {
"messageLabel": "callbackReceived",
"messagePayload": {
"mainFlowData": {}
}
}
}
This is only available as REST endpoint, but data to Router can be sent using either REST ot Kafka.
Errors
If an error occurs the following response will be sent:
{
"key": "{{mainFlowId}}",
"value": {
"messageLabel": "identificationError",
"messagePayload": {
"error": "error message"
}
}
}