This commit is contained in:
Chris Trevino 2021-03-30 16:16:01 -07:00
Родитель 62df93b874
Коммит 1d245802b3
2 изменённых файлов: 42 добавлений и 30 удалений

3
.spelling Normal file
Просмотреть файл

@ -0,0 +1,3 @@
Greenlight
CBO
CBOs

Просмотреть файл

@ -3,43 +3,52 @@
## Endpoints
`/api/orgs`
* Orgs are CBOs
- Organizations are CBOs
`/api/orgs/{id}`
* Unassigned org?
- Unassigned org?
`/api/orgs/{id}/contacts`
* View queue of contacts for this org
- View queue of contacts for this org
`/api/users`
* Users are Navigators, Admins, members of CBOs
- Users are Navigators, Admins, members of CBOs
`/api/users/{id}`
`/api/users/{id}/contacts`
* view queue of contacts for this user
- view queue of contacts for this user
`/api/contacts?status=<unassigned>` (basic intake form)
* Contacts are client dossiers, their public info, audit log
- Contacts are client dossiers, their public info, audit log
`/api/contacts/{id}`
`/api/contacts/{id}/assignments`
* active assignments with a non-closed status
* Assign to Organization Inbox (multi-assign possible)
* Assign to Individual in Org (multi-assign possible)
- active assignments with a non-closed status
- Assign to Organization Inbox (multi-assign possible)
- Assign to Individual in Org (multi-assign possible)
`/api/contacts/{id}/comments`
* text comments regarding a contact
- text comments regarding a contact
`/api/contacts/{id}/engagements`
* Record of engagements with CBOs and an individual contact, created from assignments when complete
* Date, name of CBO, other fields may/may not be accessible per engagement
- Record of engagements with CBOs and an individual contact, created from assignments when complete
- Date, name of CBO, other fields may/may not be accessible per engagement
## Data Models
### Contact
```json
{
"id": "<generated_id>",
@ -53,43 +62,43 @@
{ "whatsapp": ".." }
],
"addresses": [
{
{
// address data
}
],
]
},
"additional_data": {
"<org_id>": {
// data hash - encrypted, differential access to view
}
"<org_id>": {
// data hash - encrypted, differential access to view
}
},
"engagements": [
"engagement_url"
]
"engagements": ["engagement_url"]
}
```
### Comment
```json
{
{
"id": "<generated_id>",
"data": {
"data": {
"author": "user id",
"timestamp": "<ISO 8601 timestamp>",
"text": "this guy was a jerk",
"timestamp": "<ISO 8601 timestamp>",
"text": "this guy was a jerk"
}
}
```
### Engagement
```json
{
{
"id": "<generated_id>",
"data": {
// mandatory data
"start_timestamp": "<ISO 8601 timestamp>",
"end_timestamp": "<ISO 8601 timestamp>",
"comments": "this guy was a jerk",
"end_timestamp": "<ISO 8601 timestamp>",
"comments": "this guy was a jerk"
},
"additional_data": {
// CBO DATA fields
@ -104,7 +113,7 @@
{
"id": "<generated_id",
"data": {
"name": "Cureamericas",
"name": "Cureamericas"
}
}
```
```