@nativesquare/soma 0.14.0 → 0.16.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.
Files changed (164) hide show
  1. package/dist/client/garmin.d.ts +31 -0
  2. package/dist/client/garmin.d.ts.map +1 -1
  3. package/dist/client/garmin.js +34 -0
  4. package/dist/client/garmin.js.map +1 -1
  5. package/dist/client/healthkit.d.ts +267 -0
  6. package/dist/client/healthkit.d.ts.map +1 -0
  7. package/dist/client/healthkit.js +600 -0
  8. package/dist/client/healthkit.js.map +1 -0
  9. package/dist/client/index.d.ts +4 -1
  10. package/dist/client/index.d.ts.map +1 -1
  11. package/dist/client/index.js +4 -0
  12. package/dist/client/index.js.map +1 -1
  13. package/dist/client/types.d.ts +3 -2
  14. package/dist/client/types.d.ts.map +1 -1
  15. package/dist/component/_generated/api.d.ts +26 -0
  16. package/dist/component/_generated/api.d.ts.map +1 -1
  17. package/dist/component/_generated/api.js.map +1 -1
  18. package/dist/component/_generated/component.d.ts +7 -0
  19. package/dist/component/_generated/component.d.ts.map +1 -1
  20. package/dist/component/garmin/private.d.ts +18 -85
  21. package/dist/component/garmin/private.d.ts.map +1 -1
  22. package/dist/component/garmin/private.js +12 -12
  23. package/dist/component/garmin/private.js.map +1 -1
  24. package/dist/component/garmin/public.d.ts +38 -65
  25. package/dist/component/garmin/public.d.ts.map +1 -1
  26. package/dist/component/garmin/public.js +132 -10
  27. package/dist/component/garmin/public.js.map +1 -1
  28. package/dist/component/garmin/utils.d.ts +48 -0
  29. package/dist/component/garmin/utils.d.ts.map +1 -1
  30. package/dist/component/garmin/utils.js +65 -0
  31. package/dist/component/garmin/utils.js.map +1 -1
  32. package/dist/component/garmin/webhooks.d.ts +1 -11
  33. package/dist/component/garmin/webhooks.d.ts.map +1 -1
  34. package/dist/component/garmin/webhooks.js.map +1 -1
  35. package/dist/component/healthkit/index.d.ts +14 -0
  36. package/dist/component/healthkit/index.d.ts.map +1 -0
  37. package/dist/{healthkit → component/healthkit}/index.js +11 -11
  38. package/dist/component/healthkit/index.js.map +1 -0
  39. package/dist/component/healthkit/transform/activity.d.ts +19 -0
  40. package/dist/component/healthkit/transform/activity.d.ts.map +1 -0
  41. package/dist/{healthkit → component/healthkit/transform}/activity.js +1 -1
  42. package/dist/component/healthkit/transform/activity.js.map +1 -0
  43. package/dist/{healthkit → component/healthkit/transform}/athlete.d.ts +3 -9
  44. package/dist/component/healthkit/transform/athlete.d.ts.map +1 -0
  45. package/dist/component/healthkit/transform/athlete.js.map +1 -0
  46. package/dist/component/healthkit/transform/body.d.ts +25 -0
  47. package/dist/component/healthkit/transform/body.d.ts.map +1 -0
  48. package/dist/component/healthkit/transform/body.js.map +1 -0
  49. package/dist/component/healthkit/transform/daily.d.ts +36 -0
  50. package/dist/component/healthkit/transform/daily.d.ts.map +1 -0
  51. package/dist/component/healthkit/transform/daily.js.map +1 -0
  52. package/dist/{healthkit/maps/activity-type.d.ts → component/healthkit/transform/maps/activityType.d.ts} +1 -1
  53. package/dist/component/healthkit/transform/maps/activityType.d.ts.map +1 -0
  54. package/dist/{healthkit/maps/activity-type.js → component/healthkit/transform/maps/activityType.js} +1 -1
  55. package/dist/component/healthkit/transform/maps/activityType.js.map +1 -0
  56. package/dist/{healthkit/maps/menstruation-flow.d.ts → component/healthkit/transform/maps/menstruationFlow.d.ts} +1 -1
  57. package/dist/component/healthkit/transform/maps/menstruationFlow.d.ts.map +1 -0
  58. package/dist/{healthkit/maps/menstruation-flow.js → component/healthkit/transform/maps/menstruationFlow.js} +2 -2
  59. package/dist/component/healthkit/transform/maps/menstruationFlow.js.map +1 -0
  60. package/dist/{healthkit/maps/sleep-level.d.ts → component/healthkit/transform/maps/sleepLevel.d.ts} +1 -1
  61. package/dist/component/healthkit/transform/maps/sleepLevel.d.ts.map +1 -0
  62. package/dist/{healthkit/maps/sleep-level.js → component/healthkit/transform/maps/sleepLevel.js} +2 -2
  63. package/dist/component/healthkit/transform/maps/sleepLevel.js.map +1 -0
  64. package/dist/{healthkit → component/healthkit/transform}/menstruation.d.ts +3 -17
  65. package/dist/component/healthkit/transform/menstruation.d.ts.map +1 -0
  66. package/dist/{healthkit → component/healthkit/transform}/menstruation.js +1 -1
  67. package/dist/component/healthkit/transform/menstruation.js.map +1 -0
  68. package/dist/component/healthkit/transform/nutrition.d.ts +25 -0
  69. package/dist/component/healthkit/transform/nutrition.d.ts.map +1 -0
  70. package/dist/component/healthkit/transform/nutrition.js.map +1 -0
  71. package/dist/component/healthkit/transform/sleep.d.ts +22 -0
  72. package/dist/component/healthkit/transform/sleep.d.ts.map +1 -0
  73. package/dist/{healthkit → component/healthkit/transform}/sleep.js +2 -2
  74. package/dist/component/healthkit/transform/sleep.js.map +1 -0
  75. package/dist/{healthkit → component/healthkit/transform}/utils.d.ts +1 -1
  76. package/dist/component/healthkit/transform/utils.d.ts.map +1 -0
  77. package/dist/component/healthkit/transform/utils.js.map +1 -0
  78. package/dist/component/healthkit/types.d.ts.map +1 -0
  79. package/dist/component/healthkit/types.js.map +1 -0
  80. package/dist/component/public.d.ts +3 -3
  81. package/dist/component/schema.d.ts +4 -4
  82. package/dist/component/strava/public.d.ts +4 -15
  83. package/dist/component/strava/public.d.ts.map +1 -1
  84. package/dist/component/strava/public.js +4 -3
  85. package/dist/component/strava/public.js.map +1 -1
  86. package/dist/component/strava/webhooks.d.ts +3 -10
  87. package/dist/component/strava/webhooks.d.ts.map +1 -1
  88. package/dist/component/strava/webhooks.js.map +1 -1
  89. package/dist/component/validators/daily.d.ts +2 -2
  90. package/dist/component/validators/shared.d.ts +16 -3
  91. package/dist/component/validators/shared.d.ts.map +1 -1
  92. package/dist/component/validators/shared.js +1 -1
  93. package/dist/component/validators/shared.js.map +1 -1
  94. package/dist/validators.d.ts +5 -4
  95. package/dist/validators.d.ts.map +1 -1
  96. package/dist/validators.js.map +1 -1
  97. package/package.json +3 -3
  98. package/src/client/garmin.ts +42 -0
  99. package/src/client/healthkit.ts +791 -0
  100. package/src/client/index.ts +5 -0
  101. package/src/client/types.ts +4 -2
  102. package/src/component/_generated/api.ts +26 -0
  103. package/src/component/_generated/component.ts +13 -0
  104. package/src/component/garmin/private.ts +12 -12
  105. package/src/component/garmin/public.ts +166 -11
  106. package/src/component/garmin/utils.ts +102 -0
  107. package/src/component/garmin/webhooks.ts +1 -7
  108. package/src/{healthkit → component/healthkit}/index.ts +46 -59
  109. package/src/component/healthkit/transform/activity.ts +115 -0
  110. package/src/{healthkit → component/healthkit/transform}/athlete.ts +4 -8
  111. package/src/{healthkit → component/healthkit/transform}/body.ts +3 -7
  112. package/src/{healthkit → component/healthkit/transform}/daily.ts +4 -10
  113. package/src/{healthkit/maps/menstruation-flow.ts → component/healthkit/transform/maps/menstruationFlow.ts} +1 -1
  114. package/src/{healthkit/maps/sleep-level.ts → component/healthkit/transform/maps/sleepLevel.ts} +1 -1
  115. package/src/{healthkit → component/healthkit/transform}/menstruation.ts +4 -8
  116. package/src/{healthkit → component/healthkit/transform}/nutrition.ts +3 -7
  117. package/src/{healthkit → component/healthkit/transform}/sleep.ts +5 -9
  118. package/src/{healthkit → component/healthkit/transform}/utils.ts +1 -1
  119. package/src/component/strava/public.ts +6 -5
  120. package/src/component/strava/webhooks.ts +9 -11
  121. package/src/component/validators/shared.ts +47 -4
  122. package/src/validators.ts +1 -0
  123. package/dist/healthkit/activity.d.ts +0 -75
  124. package/dist/healthkit/activity.d.ts.map +0 -1
  125. package/dist/healthkit/activity.js.map +0 -1
  126. package/dist/healthkit/athlete.d.ts.map +0 -1
  127. package/dist/healthkit/athlete.js.map +0 -1
  128. package/dist/healthkit/body.d.ts +0 -102
  129. package/dist/healthkit/body.d.ts.map +0 -1
  130. package/dist/healthkit/body.js.map +0 -1
  131. package/dist/healthkit/daily.d.ts +0 -119
  132. package/dist/healthkit/daily.d.ts.map +0 -1
  133. package/dist/healthkit/daily.js.map +0 -1
  134. package/dist/healthkit/index.d.ts +0 -21
  135. package/dist/healthkit/index.d.ts.map +0 -1
  136. package/dist/healthkit/index.js.map +0 -1
  137. package/dist/healthkit/maps/activity-type.d.ts.map +0 -1
  138. package/dist/healthkit/maps/activity-type.js.map +0 -1
  139. package/dist/healthkit/maps/menstruation-flow.d.ts.map +0 -1
  140. package/dist/healthkit/maps/menstruation-flow.js.map +0 -1
  141. package/dist/healthkit/maps/sleep-level.d.ts.map +0 -1
  142. package/dist/healthkit/maps/sleep-level.js.map +0 -1
  143. package/dist/healthkit/menstruation.d.ts.map +0 -1
  144. package/dist/healthkit/menstruation.js.map +0 -1
  145. package/dist/healthkit/nutrition.d.ts +0 -77
  146. package/dist/healthkit/nutrition.d.ts.map +0 -1
  147. package/dist/healthkit/nutrition.js.map +0 -1
  148. package/dist/healthkit/sleep.d.ts +0 -60
  149. package/dist/healthkit/sleep.d.ts.map +0 -1
  150. package/dist/healthkit/sleep.js.map +0 -1
  151. package/dist/healthkit/types.d.ts.map +0 -1
  152. package/dist/healthkit/types.js.map +0 -1
  153. package/dist/healthkit/utils.d.ts.map +0 -1
  154. package/dist/healthkit/utils.js.map +0 -1
  155. package/src/healthkit/activity.ts +0 -120
  156. /package/dist/{healthkit → component/healthkit/transform}/athlete.js +0 -0
  157. /package/dist/{healthkit → component/healthkit/transform}/body.js +0 -0
  158. /package/dist/{healthkit → component/healthkit/transform}/daily.js +0 -0
  159. /package/dist/{healthkit → component/healthkit/transform}/nutrition.js +0 -0
  160. /package/dist/{healthkit → component/healthkit/transform}/utils.js +0 -0
  161. /package/dist/{healthkit → component/healthkit}/types.d.ts +0 -0
  162. /package/dist/{healthkit → component/healthkit}/types.js +0 -0
  163. /package/src/{healthkit/maps/activity-type.ts → component/healthkit/transform/maps/activityType.ts} +0 -0
  164. /package/src/{healthkit → component/healthkit}/types.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"validators.js","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,iEAAiE;AACjE,EAAE;AACF,2CAA2C;AAC3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AE,CAAC;AAC1E,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,GAAG,wBAAwB;IAC3B,GAAG,QAAQ;CACZ,CAAC;AAEF,gFAAgF;AAEhF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC,kBAAkB,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,cAAc,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAClE,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC,wBAAwB,CAAC,CAAC"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "bugs": {
7
7
  "url": "https://github.com/NativeSquare/soma/issues"
8
8
  },
9
- "version": "0.14.0",
9
+ "version": "0.16.0",
10
10
  "license": "Apache-2.0",
11
11
  "keywords": [
12
12
  "convex",
@@ -56,8 +56,8 @@
56
56
  "default": "./dist/react/index.js"
57
57
  },
58
58
  "./healthkit": {
59
- "types": "./dist/healthkit/index.d.ts",
60
- "default": "./dist/healthkit/index.js"
59
+ "types": "./dist/component/healthkit/index.d.ts",
60
+ "default": "./dist/component/healthkit/index.js"
61
61
  },
62
62
  "./strava/client": {
63
63
  "types": "./dist/component/strava/client.d.ts",
@@ -403,6 +403,48 @@ export class SomaGarmin {
403
403
  });
404
404
  }
405
405
 
406
+ /**
407
+ * Request historical data from Garmin's backfill API for all summary types.
408
+ *
409
+ * Unlike pull methods (which query by upload time with a 24h max window),
410
+ * backfill requests data by the time it was *recorded* on the device.
411
+ * Garmin processes backfill asynchronously (HTTP 202) and delivers data
412
+ * via push/ping webhooks — no data is returned synchronously.
413
+ *
414
+ * Health endpoints accept up to 90 days per request.
415
+ * Activity endpoints accept up to 30 days per request (auto-chunked).
416
+ *
417
+ * Defaults to the last 90 days when no time range is provided.
418
+ *
419
+ * @param ctx - Action context from the host app
420
+ * @param args.userId - The host app's user identifier
421
+ * @param args.startTimeInSeconds - Optional Unix epoch lower bound (when data was recorded)
422
+ * @param args.endTimeInSeconds - Optional Unix epoch upper bound (when data was recorded)
423
+ *
424
+ * @example
425
+ * ```ts
426
+ * // Request last 90 days of historical data
427
+ * const result = await soma.garmin.backfillAll(ctx, { userId: "user_123" });
428
+ * // Data arrives async via push webhooks
429
+ * console.log(result.data.requested); // ["dailies", "sleeps", ...]
430
+ * ```
431
+ */
432
+ async backfillAll(
433
+ ctx: ActionCtx,
434
+ args: {
435
+ userId: string;
436
+ startTimeInSeconds?: number;
437
+ endTimeInSeconds?: number;
438
+ },
439
+ ) {
440
+ const config = this.requireConfig();
441
+ return await ctx.runAction(this.component.garmin.public.backfillAll, {
442
+ ...args,
443
+ clientId: config.clientId,
444
+ clientSecret: config.clientSecret,
445
+ });
446
+ }
447
+
406
448
  /**
407
449
  * Push a planned workout to Garmin Connect.
408
450
  *