@molecule/api-wearable-oura 1.0.3 → 1.0.5

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.
Files changed (2) hide show
  1. package/README.md +15 -5
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-16T23:32:18.845Z
6
+ Generated: 2026-11-08T06:03:26.846Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-wearable-oura
@@ -396,6 +396,7 @@ error path must be sanitized.
396
396
  interface WearableProvider {
397
397
  /** Stable provider key used for credential-store segregation, e.g. `"fitbit"`. */
398
398
  readonly providerName: string
399
+
399
400
  /**
400
401
  * Reads the daily activity rollup for `(userId, date)`.
401
402
  *
@@ -404,6 +405,7 @@ interface WearableProvider {
404
405
  * @returns Normalized daily activity.
405
406
  */
406
407
  getDailyActivity(userId: string, date: WearableDate): Promise<DailyActivity>
408
+
407
409
  /**
408
410
  * Reads sleep sessions bucketed under `(userId, date)`. Most days return
409
411
  * a single primary session; multi-nap days return multiple.
@@ -413,6 +415,7 @@ interface WearableProvider {
413
415
  * @returns All sleep sessions bucketed under that day.
414
416
  */
415
417
  getDailySleep(userId: string, date: WearableDate): Promise<SleepSession[]>
418
+
416
419
  /**
417
420
  * Reads the daily heart-rate summary for `(userId, date)`.
418
421
  *
@@ -421,6 +424,7 @@ interface WearableProvider {
421
424
  * @returns Normalized daily heart-rate summary.
422
425
  */
423
426
  getDailyHeartRate(userId: string, date: WearableDate): Promise<HeartRateSummary>
427
+
424
428
  /**
425
429
  * Reads body-weight entries for the user across `range`. Providers cap
426
430
  * how far back a single call may reach — implementations should clamp
@@ -432,6 +436,7 @@ interface WearableProvider {
432
436
  * @returns Weight entries, ordered by `recordedAt` ascending.
433
437
  */
434
438
  getWeight(userId: string, range: WearableDateRange): Promise<WeightEntry[]>
439
+
435
440
  /**
436
441
  * Exchanges an OAuth authorization `code` for tokens and persists the
437
442
  * resulting {@link UserConnection} via the bond's credentials store.
@@ -441,6 +446,7 @@ interface WearableProvider {
441
446
  * @returns The freshly-minted connection (already persisted).
442
447
  */
443
448
  connect(userId: string, code: string): Promise<UserConnection>
449
+
444
450
  /**
445
451
  * Forces a refresh of the user's access token using the stored refresh
446
452
  * token. The rotated connection is persisted before being returned.
@@ -449,6 +455,7 @@ interface WearableProvider {
449
455
  * @returns The rotated connection (already persisted).
450
456
  */
451
457
  refreshConnection(userId: string): Promise<UserConnection>
458
+
452
459
  /**
453
460
  * Revokes (best-effort) and removes the user's connection record.
454
461
  *
@@ -495,7 +502,7 @@ type SleepStage = 'awake' | 'light' | 'deep' | 'rem' | 'restless' | 'asleep' | '
495
502
  Base64url-encodes the bytes (RFC 4648 §5 with `=` padding stripped).
496
503
 
497
504
  ```typescript
498
- function base64UrlEncode(bytes: Uint8Array<ArrayBufferLike>): string
505
+ function base64UrlEncode(bytes: Uint8Array): string
499
506
  ```
500
507
 
501
508
  - `bytes` — The bytes to encode.
@@ -509,7 +516,10 @@ normalized {@link DailyActivity} shape. Missing fields are
509
516
  zero-defaulted so handlers can sum across days without null guards.
510
517
 
511
518
  ```typescript
512
- function fromOuraActivity(date: string, entry: OuraDailyActivityEntry | undefined): DailyActivity
519
+ function fromOuraActivity(
520
+ date: WearableDate,
521
+ entry: OuraDailyActivityEntry | undefined,
522
+ ): DailyActivity
513
523
  ```
514
524
 
515
525
  - `date` — The calendar day requested.
@@ -562,7 +572,7 @@ sleep — the bond marks any matching session as `isMainSleep: true`,
562
572
  with naps and short sessions as `false`.
563
573
 
564
574
  ```typescript
565
- function fromOuraSleep(date: string, raw: OuraSleepResponse): SleepSession[]
575
+ function fromOuraSleep(date: WearableDate, raw: OuraSleepResponse): SleepSession[]
566
576
  ```
567
577
 
568
578
  - `date` — Calendar day requested.
@@ -581,7 +591,7 @@ from the minimum sample of the day. Zone data is not reported by this
581
591
  endpoint, so `zones` is left undefined.
582
592
 
583
593
  ```typescript
584
- function fromOuraHeartRate(date: string, raw: OuraHeartRateResponse): HeartRateSummary
594
+ function fromOuraHeartRate(date: WearableDate, raw: OuraHeartRateResponse): HeartRateSummary
585
595
  ```
586
596
 
587
597
  - `date` — Calendar day the response was requested for.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-wearable-oura",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Oura Ring Cloud API v2 bond for molecule.dev — daily activity, sleep (REM/deep/light), and heart-rate ingestion via OAuth 2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -38,8 +38,8 @@
38
38
  "@molecule/api-wearable": "^1.0.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@molecule/api-bond": "1.0.3",
42
- "@molecule/api-http": "1.0.3",
41
+ "@molecule/api-bond": "1.0.4",
42
+ "@molecule/api-http": "1.0.5",
43
43
  "@molecule/api-wearable": "1.0.3",
44
44
  "@types/node": "26.6.5",
45
45
  "typescript": "6.0.3",