calcom/packages/app-store/vital/api/sleep.create.payload.example
alannnc 8c9096b55b
Vital App - Auto reschedule based on health data (#2500)
* Add vital integration

* Tidy up client_user_id creation

* Rename vital app to vitalother to follow name rules

* Added env var

* App vital reschedule

* Fix on app structure and api calls

* Implemented user identification from webhook

* WIP fix api call and read me

* Save vital settings via api

* Now saving userVitalSettings and trigger reschedule on selected param

* Added translations

* Fix type for vitalSettings

* Using api to get env vars required for url, fix display of vital settings

* Fix hours placeholder, translation not working

* Renames vital app

* Update seed-app-store.ts

* Update package.json

* Update yarn.lock

* Refactored env variables

* Update README.md

* Migrates to api_keys

* Extracts AppConfiguration

* vitalClient fixes

* Update index.ts

* Update metadata.ts

* Update index.ts

* Update metadata.ts

* Added namespace vital for translations

Co-authored-by: Maitham <maithamdib@gmail.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-05-06 17:21:30 +00:00

23 lines
No EOL
763 B
Text

https://docs.tryvital.io/summary-data#sleep-stream
{
event: {
event_type: 'daily.data.sleep.created',
data: {
id: 'a27b89dc-4a43-4f59-b72a-267fa9a93c8c',
date: '1974-12-15T18:28:10+00:00',
bedtime_start: '1980-07-11T22:10:32+00:00',
bedtime_stop: '1993-03-03T04:21:02+00:00',
duration: 7225, // seconds
total: 6909, // seconds
awake: 7763,
light: 2011, // Total amount of light sleep registered during the sleep period
rem: 8106, // Total amount of REM sleep registered during the sleep period, minutes
deep: 6553,
hr_lowest: 9085,
efficiency: 1780,
latency: 8519,
source: [Object],
user_id: 'a1dfefe0-ccdb-46b8-adac-35e9ba597496'
}
}
}