Purpose:
Allow Lenders to initiate an event/message for the subject transaction with your integration
Sample Usage:
import host from '@elliemae/em-ssf-guest'
...
let transactionEvent = {
text: 'EVENT_TEXT',
type: 'urn:elli:epc:appraisal:hold',
comments: 'EVENT_COMMENTS',
resources: [
{
id: 'RESOURCE_ID',
name: 'RESOURCE_NAME',
mimeType: 'RESOURCE_MIMETYPE'
}
]
}
async function createTransactionEvent(transactionEvent) {
try {
const transactionObject = await host.getObject('transaction')
const transactionEventData = await transactionObject.createEvent(transactionEvent)
applicationState.events.push({
id: transactionEventData.id
})
} catch (error) {
console.log({error})
}
}
import host from '@elliemae/em-ssf-guest'
...
let transactionEvent = {
text: 'EVENT_TEXT',
type: 'urn:elli:epc:appraisal:hold',
comments: 'EVENT_COMMENTS',
resources: [
{
id: 'RESOURCE_ID',
name: 'RESOURCE_NAME',
mimeType: 'RESOURCE_MIMETYPE'
}
]
}
host.getObject('transaction')
.then(
(transactionObject) => {
transactionObject.createEvent(transactionEvent)
.then(
(eventData) => {
applicationState.events.push({
id: eventData.id
})
}
)
.catch(
(error) => {
console.log({error})
}
)
}
)
.catch(
(error) => {
console.log({error})
}
)
Interface:
Input
Type: Object
{
text: 'EVENT_TEXT',
type: 'urn:elli:epc:appraisal:hold',
comments: 'EVENT_COMMENTS',
resources: [
{
id: 'RESOURCE_ID',
name: 'RESOURCE_NAME',
mimeType: 'RESOURCE_MIMETYPE'
}
]
}
Returns:
Type: Promise
==> Resolved:
{
id: 'TRANSACTION_EVENT_ID'
}
==> Rejected:
An error is raised, containing a message attribute with details on the error that occurred
{
message: "{{ERROR_DETAILS}}"
}