Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Publishing/subscriptions configuration

Module

Publish/subscribe

Event type

Payload

mod-feesfines

publish

PATRON_FEE_FINE_BALANCE_CHANGE_EVENT

{
  "patronId": string,
  "balance": numeric,
"status": string
}

Example:

{
  "patronId": "1785d668-831e-11ea-bc55-0242ac130003",
  "balance": -15,
"status": "Aged to lost"
}
mod-circulationpublish

ITEM_CHECK_OUT_EVENT

{
  "patronId": string,
  "loanId": string,
  "dueDate": string
}
mod-circulationpublishITEM_CHECK_IN_EVENT
{
  "patronId": string,
"loanId": string
}
mod-circulationpublishITEM_DECLARED_LOST_EVENT
{
  "patronId": string,
"loanId": string
}
mod-circulationpublishLOAN_DUE_DATE_UPDATE_EVENT
{
  "patronId": string,
  "loanId": string,
  "dueDate": string,
"recall": boolean
}
mod-automatedblockssubscribe

PATRON_FEE_FINE_BALANCE_CHANGE_EVENT
ITEM_CHECK_OUT_EVENT
ITEM_CHECK_IN_EVENT
ITEM_DECLARED_LOST_EVENT
LOAN_DUE_DATE_UPDATE_EVENT


DB

Using the info from events mod-automated-blocks is subscribed to, we need to maintain one object per patron in the DB:

Code Block
{
  "patronId": string,
  "outstandingFeeFineBalance": numeric,
  "numberOfOpenFeesFinesForLostItems": numeric,
  "numberOfLostItems": numeric,
  "openLoans": [
    {
      "loanId": string,
      "dueDate": string,
      "recall": boolean
    }
  ]
}

API

mod-automated-blocks will provide one endpoint to