Skip to end of banner
Go to start of banner

Spike: CIRC-436 - Delivery requests: support request preferences of user

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

CIRC-436 - Getting issue details... STATUS

The goal of the spike is to define the necessary steps to introduce Request Preferences per User in mod-circulation.

Spike results:

1. Storing request preferences in mod-circulation-storage:

We will add table user_request_preferences to mod-circulation-storage. user_request_preferences will store user preference fields in json format. 

Table definition in mod-circulation-storage:


user_request_preferences
{
  "tableName": "user_request_preferences",
  "withMetadata": true,
  "withAuditing": false,
  "uniqueIndex": [
    {
      "fieldName": "userId",
      "tOps": "ADD",
      "caseSensitive": false
    }
  ]
}

2. API for request preferences:

API endpoint will follow standard format for endpoints in folio:

1) GET /request-preference-storage/request-preference -  endpoint for searching, UI will get preferences related to user by sending request "GET /request-preference-storage/request-preference?query=userId==1e425b93-501e-44b0-a4c7-b3e66a25c42e"

2) POST /request-preference-storage/request-preference - create request preference

3) GET /request-preference-storage/request-preference/{id} - get request preference by id ("id" field is not the same as "userId")

4) DELETE /request-preference-storage/request-preference/{id} - delete request preference

5) PUT /request-preference-storage/request-preference/{id} - update request preference

Example of request preference:

Request preference
{
  "userId": "1e425b93-501e-44b0-a4c7-b3e66a25c42e",
  "holdShelf" : true,
  "delivery": true,
  "defaultServicePointId": "22beccec-8d77-4a97-906a-37cc26b070e5",
  "defaultDeliveryAddressTypeId": "27a1b086-20ac-4b1d-b6ac-3be353383f3d",
  "fulfillment": "Delivery"
}

  • No labels