-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from tidepool-org/BACK-2500-add-ability-to-sen…
…d-care-partner-invites [BACK-2500] add ability to send care partner invites
- Loading branch information
Showing
6 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Alerts API | ||
version: '1.0' | ||
description: |- | ||
The Tidepool API is an HTTP REST API used by Tidepool clients to communicate with the Tidepool Platform. | ||
For more information, see the [Getting Started](../docs/quick-start.md) section. | ||
termsOfService: https://developer.tidepool.org/terms-of-use/ | ||
contact: | ||
name: API Support | ||
url: https://support.tidepool.org/ | ||
email: support@tidepool.org | ||
license: | ||
name: BSD-2-Clause | ||
url: https://github.com/tidepool-org/hydrophone/blob/master/LICENSE | ||
x-tidepool-service: https://github.com/tidepool-org/hydrophone | ||
|
||
servers: | ||
- url: 'https://external.integration.tidepool.org' | ||
description: integration | ||
- url: 'https://api.tidepool.org' | ||
description: production | ||
- url: 'https://dev1.dev.tidepool.org' | ||
description: dev1 | ||
- url: 'https://qa1.development.tidepool.org' | ||
description: qa1 | ||
- url: 'https://qa2.development.tidepool.org' | ||
description: qa2 | ||
|
||
security: | ||
- sessionToken: [] | ||
|
||
tags: | ||
- name: Alerts | ||
description: >- | ||
Endpoints related to alert configuration and management. | ||
paths: | ||
/v1/users/{userId}/followers/{followerUserId}/alerts: | ||
parameters: | ||
- $ref: '#/components/parameters/userId' | ||
- $ref: '#/components/parameters/followerUserId' | ||
|
||
delete: | ||
summary: Delete an alerts configuration | ||
description: >- | ||
Delete an existing alerts configuration. | ||
operationId: DeleteAlertsConfiguration | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/OK' | ||
'400': | ||
$ref: '#/components/responses/BadRequest' | ||
'401': | ||
$ref: '#/components/responses/Unauthorized' | ||
'403': | ||
$ref: '#/components/responses/Forbidden' | ||
'404': | ||
$ref: '#/components/responses/NotFound' | ||
'500': | ||
$ref: '#/components/responses/ServerError' | ||
tags: | ||
- Alerts | ||
|
||
get: | ||
summary: Get an alerts configuration | ||
description: >- | ||
Retrieve an existing alerts configuration. | ||
operationId: GetAlertsConfiguration | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/AlertsConfig' | ||
'400': | ||
$ref: '#/components/responses/BadRequest' | ||
'401': | ||
$ref: '#/components/responses/Unauthorized' | ||
'403': | ||
$ref: '#/components/responses/Forbidden' | ||
'404': | ||
$ref: '#/components/responses/NotFound' | ||
'500': | ||
$ref: '#/components/responses/ServerError' | ||
tags: | ||
- Alerts | ||
|
||
post: | ||
summary: Create or update an alerts configuration | ||
description: >- | ||
Create or update an alerts configuration. | ||
If no alerts configuration exists, it will be created. | ||
operationId: UpsertAlertsConfiguration | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './common/models/alertsconfig.v1.yaml' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/OK' | ||
'400': | ||
$ref: '#/components/responses/BadRequest' | ||
'401': | ||
$ref: '#/components/responses/Unauthorized' | ||
'403': | ||
$ref: '#/components/responses/Forbidden' | ||
'404': | ||
$ref: '#/components/responses/NotFound' | ||
'500': | ||
$ref: '#/components/responses/ServerError' | ||
tags: | ||
- Alerts | ||
|
||
|
||
components: | ||
securitySchemes: | ||
sessionToken: | ||
$ref: ./common/security/tidepoolsessiontoken.v1.yaml | ||
|
||
responses: | ||
OK: | ||
description: 'OK' | ||
|
||
BadRequest: | ||
description: 'Bad Request' | ||
|
||
Unauthorized: | ||
description: 'Unauthorized' | ||
|
||
Forbidden: | ||
description: 'Forbidden' | ||
|
||
NotFound: | ||
description: 'Not Found' | ||
|
||
ServerError: | ||
description: 'Server Error' | ||
|
||
AlertsConfig: | ||
description: Alerts Config | ||
content: | ||
'application/json': | ||
schema: | ||
$ref: './common/models/alertsconfig.v1.yaml' | ||
|
||
parameters: | ||
userId: | ||
name: userId | ||
description: >- | ||
Tidepool User ID of the user who granted follow access. | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/tidepoolUserId' | ||
|
||
|
||
followerUserId: | ||
name: followerUserId | ||
description: >- | ||
Tidepool User ID of the care partner to receive alerts. | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/tidepoolUserId' | ||
|
||
schemas: | ||
tidepoolUserId: | ||
$ref: './common/models/tidepooluserid.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# intended as a mix-in to build complete alert specs | ||
type: object | ||
properties: | ||
enabled: | ||
type: boolean | ||
default: false | ||
description: >- | ||
A toggle for disabling the alert. | ||
repeat: | ||
type: integer | ||
default: 0 | ||
minimum: 0 | ||
maximum: 240 | ||
description: >- | ||
Duration in minutes, after which an alert will be repeated. | ||
A value of 0 disables the repeat functionality. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# intended as a mix-in to build complete alert specs | ||
type: object | ||
properties: | ||
delay: | ||
type: integer | ||
default: 0 | ||
minimum: 0 | ||
maximum: 120 | ||
description: >- | ||
Duration in minutes to wait before alerting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# intended as a mix-in to build complete alert specs | ||
type: object | ||
properties: | ||
threshold: | ||
$ref: '../../../data/models/blood/glucose/glucose.v1.yaml' | ||
required: | ||
- threshold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
type: object | ||
properties: | ||
urgentLow: | ||
allOf: | ||
- $ref: './alerts/base.v1.yaml' | ||
- $ref: './alerts/glucosethreshold.v1.yaml' | ||
- type: object | ||
description: >- | ||
Blood glucose measurements at or below this value will trigger an immediate and urgent alert. | ||
low: | ||
allOf: | ||
- $ref: './alerts/base.v1.yaml' | ||
- $ref: './alerts/delay.v1.yaml' | ||
- $ref: './alerts/glucosethreshold.v1.yaml' | ||
- type: object | ||
description: >- | ||
Blood glucose measurements at or below this value will trigger an alert. | ||
high: | ||
allOf: | ||
- $ref: './alerts/base.v1.yaml' | ||
- $ref: './alerts/delay.v1.yaml' | ||
- $ref: './alerts/glucosethreshold.v1.yaml' | ||
- type: object | ||
description: >- | ||
Blood glucose measurements at or above this value will trigger an alert. | ||
noCommunication: | ||
allOf: | ||
- $ref: './alerts/base.v1.yaml' | ||
- $ref: './alerts/delay.v1.yaml' | ||
- type: object | ||
description: >- | ||
An alert sent when issues prevent the display of CGM data. | ||
notLooping: | ||
allOf: | ||
- $ref: './alerts/base.v1.yaml' | ||
- $ref: './alerts/delay.v1.yaml' | ||
- type: object | ||
description: >- | ||
An alert sent when the Tidepool Loop app is unable to loop. | ||
minProperties: 1 | ||
description: >- | ||
Configuration for alerts triggered in response to the status of a user's | ||
device and data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters