@drakulavich/oura-cli 0.5.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +17 -4
- package/dist/index.js +754 -138
- package/docs/schemas/battery.json +21 -0
- package/docs/schemas/doctor.json +1 -1
- package/docs/schemas/resilience.json +26 -0
- package/docs/schemas/rest-mode.json +26 -0
- package/docs/schemas/ring.json +20 -0
- package/docs/schemas/session.json +26 -0
- package/docs/schemas/sleep-time.json +26 -0
- package/docs/schemas/tags.json +26 -0
- package/docs/schemas/vo2max.json +26 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/battery.json",
|
|
4
|
+
"title": "oura-cli fetch battery output",
|
|
5
|
+
"description": "Ring battery level events (percent) with charging state",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"timestamp"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"timestamp": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "date-time",
|
|
17
|
+
"description": "ISO 8601 timestamp of the event"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/docs/schemas/doctor.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"required": ["id", "status", "detail"],
|
|
14
14
|
"additionalProperties": false,
|
|
15
15
|
"properties": {
|
|
16
|
-
"id": { "type": "string", "enum": ["token", "token-valid", "database", "data"] },
|
|
16
|
+
"id": { "type": "string", "enum": ["token", "token-valid", "database", "integrity", "data"] },
|
|
17
17
|
"status": { "type": "string", "enum": ["ok", "warn", "fail", "skip"] },
|
|
18
18
|
"detail": { "type": "string" },
|
|
19
19
|
"fix": { "type": "string" }
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/resilience.json",
|
|
4
|
+
"title": "oura-cli fetch resilience output",
|
|
5
|
+
"description": "Daily resilience level with its sleep-recovery, daytime-recovery and stress contributors",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"id",
|
|
12
|
+
"day"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Oura record id"
|
|
18
|
+
},
|
|
19
|
+
"day": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date",
|
|
22
|
+
"description": "Date the record applies to (YYYY-MM-DD)"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/rest-mode.json",
|
|
4
|
+
"title": "oura-cli fetch rest-mode output",
|
|
5
|
+
"description": "Rest mode periods; `day` is the period start day, episodes are kept as JSON",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"id",
|
|
12
|
+
"start_day"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Oura record id"
|
|
18
|
+
},
|
|
19
|
+
"start_day": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date",
|
|
22
|
+
"description": "First day of the period (YYYY-MM-DD)"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/ring.json",
|
|
4
|
+
"title": "oura-cli fetch ring output",
|
|
5
|
+
"description": "Ring hardware, colour, size, firmware and set-up time; a snapshot list, not a day range",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"id"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"id": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Oura ring id"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/session.json",
|
|
4
|
+
"title": "oura-cli fetch session output",
|
|
5
|
+
"description": "Guided sessions (meditation, breathing, naps, rest) with their sample series as JSON",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"id",
|
|
12
|
+
"day"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Oura record id"
|
|
18
|
+
},
|
|
19
|
+
"day": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date",
|
|
22
|
+
"description": "Date the session belongs to (YYYY-MM-DD)"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/sleep-time.json",
|
|
4
|
+
"title": "oura-cli fetch sleep-time output",
|
|
5
|
+
"description": "Suggested bedtime window (offsets in seconds from midnight) with status and recommendation",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"id",
|
|
12
|
+
"day"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Oura record id"
|
|
18
|
+
},
|
|
19
|
+
"day": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date",
|
|
22
|
+
"description": "Date the record applies to (YYYY-MM-DD)"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/tags.json",
|
|
4
|
+
"title": "oura-cli fetch tags output",
|
|
5
|
+
"description": "Tags the user added in the app; `day` is the tag start day",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"id",
|
|
12
|
+
"start_day"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Oura record id"
|
|
18
|
+
},
|
|
19
|
+
"start_day": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date",
|
|
22
|
+
"description": "Day the tag starts on (YYYY-MM-DD)"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/drakulavich/oura-cli/blob/main/docs/schemas/vo2max.json",
|
|
4
|
+
"title": "oura-cli fetch vo2max output",
|
|
5
|
+
"description": "Daily VO2 max estimate",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": true,
|
|
10
|
+
"required": [
|
|
11
|
+
"id",
|
|
12
|
+
"day"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Oura record id"
|
|
18
|
+
},
|
|
19
|
+
"day": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date",
|
|
22
|
+
"description": "Date the record applies to (YYYY-MM-DD)"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
package/package.json
CHANGED