@nativesquare/soma 0.8.0 → 0.9.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/dist/client/index.d.ts +7 -128
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +31 -112
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +80 -4
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +135 -261
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/garmin/private.d.ts +475 -0
- package/dist/component/garmin/private.d.ts.map +1 -0
- package/dist/component/garmin/private.js +1614 -0
- package/dist/component/garmin/private.js.map +1 -0
- package/dist/component/garmin/public.d.ts +155 -0
- package/dist/component/garmin/public.d.ts.map +1 -0
- package/dist/component/garmin/public.js +787 -0
- package/dist/component/garmin/public.js.map +1 -0
- package/dist/component/garmin/schemas/activity.d.ts +94 -0
- package/dist/component/garmin/schemas/activity.d.ts.map +1 -0
- package/dist/component/garmin/schemas/activity.js +27 -0
- package/dist/component/garmin/schemas/activity.js.map +1 -0
- package/dist/component/garmin/schemas/activityDetails.d.ts +146 -0
- package/dist/component/garmin/schemas/activityDetails.d.ts.map +1 -0
- package/dist/component/garmin/schemas/activityDetails.js +27 -0
- package/dist/component/garmin/schemas/activityDetails.js.map +1 -0
- package/dist/component/garmin/schemas/bloodPressure.d.ts +38 -0
- package/dist/component/garmin/schemas/bloodPressure.d.ts.map +1 -0
- package/dist/component/garmin/schemas/bloodPressure.js +27 -0
- package/dist/component/garmin/schemas/bloodPressure.js.map +1 -0
- package/dist/component/garmin/schemas/bodyCompositions.d.ts +42 -0
- package/dist/component/garmin/schemas/bodyCompositions.d.ts.map +1 -0
- package/dist/component/garmin/schemas/bodyCompositions.js +27 -0
- package/dist/component/garmin/schemas/bodyCompositions.js.map +1 -0
- package/dist/component/garmin/schemas/dailies.d.ts +98 -0
- package/dist/component/garmin/schemas/dailies.d.ts.map +1 -0
- package/dist/component/garmin/schemas/dailies.js +27 -0
- package/dist/component/garmin/schemas/dailies.js.map +1 -0
- package/dist/component/garmin/schemas/epochs.d.ts +54 -0
- package/dist/component/garmin/schemas/epochs.d.ts.map +1 -0
- package/dist/component/garmin/schemas/epochs.js +27 -0
- package/dist/component/garmin/schemas/epochs.js.map +1 -0
- package/dist/component/garmin/schemas/healthSnapshot.d.ts +48 -0
- package/dist/component/garmin/schemas/healthSnapshot.d.ts.map +1 -0
- package/dist/component/garmin/schemas/healthSnapshot.js +27 -0
- package/dist/component/garmin/schemas/healthSnapshot.js.map +1 -0
- package/dist/component/garmin/schemas/hrvSummary.d.ts +40 -0
- package/dist/component/garmin/schemas/hrvSummary.d.ts.map +1 -0
- package/dist/component/garmin/schemas/hrvSummary.js +27 -0
- package/dist/component/garmin/schemas/hrvSummary.js.map +1 -0
- package/dist/component/garmin/schemas/manuallyUpdatedActivities.d.ts +94 -0
- package/dist/component/garmin/schemas/manuallyUpdatedActivities.d.ts.map +1 -0
- package/dist/component/garmin/schemas/manuallyUpdatedActivities.js +27 -0
- package/dist/component/garmin/schemas/manuallyUpdatedActivities.js.map +1 -0
- package/dist/component/garmin/schemas/menstrualCycleTracking.d.ts +100 -0
- package/dist/component/garmin/schemas/menstrualCycleTracking.d.ts.map +1 -0
- package/dist/component/garmin/schemas/menstrualCycleTracking.js +28 -0
- package/dist/component/garmin/schemas/menstrualCycleTracking.js.map +1 -0
- package/dist/component/garmin/schemas/moveIQ.d.ts +40 -0
- package/dist/component/garmin/schemas/moveIQ.d.ts.map +1 -0
- package/dist/component/garmin/schemas/moveIQ.js +27 -0
- package/dist/component/garmin/schemas/moveIQ.js.map +1 -0
- package/dist/component/garmin/schemas/pulseOx.d.ts +38 -0
- package/dist/component/garmin/schemas/pulseOx.d.ts.map +1 -0
- package/dist/component/garmin/schemas/pulseOx.js +28 -0
- package/dist/component/garmin/schemas/pulseOx.js.map +1 -0
- package/dist/component/garmin/schemas/respiration.d.ts +34 -0
- package/dist/component/garmin/schemas/respiration.d.ts.map +1 -0
- package/dist/component/garmin/schemas/respiration.js +28 -0
- package/dist/component/garmin/schemas/respiration.js.map +1 -0
- package/dist/component/garmin/schemas/skinTemperature.d.ts +36 -0
- package/dist/component/garmin/schemas/skinTemperature.d.ts.map +1 -0
- package/dist/component/garmin/schemas/skinTemperature.js +28 -0
- package/dist/component/garmin/schemas/skinTemperature.js.map +1 -0
- package/dist/component/garmin/schemas/sleeps.d.ts +88 -0
- package/dist/component/garmin/schemas/sleeps.d.ts.map +1 -0
- package/dist/component/garmin/schemas/sleeps.js +27 -0
- package/dist/component/garmin/schemas/sleeps.js.map +1 -0
- package/dist/component/garmin/schemas/stress.d.ts +70 -0
- package/dist/component/garmin/schemas/stress.d.ts.map +1 -0
- package/dist/component/garmin/schemas/stress.js +28 -0
- package/dist/component/garmin/schemas/stress.js.map +1 -0
- package/dist/component/garmin/schemas/userMetrics.d.ts +36 -0
- package/dist/component/garmin/schemas/userMetrics.d.ts.map +1 -0
- package/dist/component/garmin/schemas/userMetrics.js +28 -0
- package/dist/component/garmin/schemas/userMetrics.js.map +1 -0
- package/dist/component/garmin/transform/activity.d.ts +13 -0
- package/dist/component/garmin/transform/activity.d.ts.map +1 -0
- package/dist/component/garmin/transform/activity.js +111 -0
- package/dist/component/garmin/transform/activity.js.map +1 -0
- package/dist/component/garmin/transform/activityDetails.d.ts +13 -0
- package/dist/component/garmin/transform/activityDetails.d.ts.map +1 -0
- package/dist/component/garmin/transform/activityDetails.js +173 -0
- package/dist/component/garmin/transform/activityDetails.js.map +1 -0
- package/dist/component/garmin/transform/bloodPressure.d.ts +12 -0
- package/dist/component/garmin/transform/bloodPressure.d.ts.map +1 -0
- package/dist/component/garmin/transform/bloodPressure.js +33 -0
- package/dist/component/garmin/transform/bloodPressure.js.map +1 -0
- package/dist/component/garmin/transform/bodyCompositions.d.ts +12 -0
- package/dist/component/garmin/transform/bodyCompositions.d.ts.map +1 -0
- package/dist/component/garmin/transform/bodyCompositions.js +42 -0
- package/dist/component/garmin/transform/bodyCompositions.js.map +1 -0
- package/dist/component/garmin/transform/dailies.d.ts +12 -0
- package/dist/component/garmin/transform/dailies.d.ts.map +1 -0
- package/dist/component/garmin/transform/dailies.js +132 -0
- package/dist/component/garmin/transform/dailies.js.map +1 -0
- package/dist/component/garmin/transform/epochs.d.ts +13 -0
- package/dist/component/garmin/transform/epochs.d.ts.map +1 -0
- package/dist/component/garmin/transform/epochs.js +76 -0
- package/dist/component/garmin/transform/epochs.js.map +1 -0
- package/dist/component/garmin/transform/healthSnapshot.d.ts +12 -0
- package/dist/component/garmin/transform/healthSnapshot.d.ts.map +1 -0
- package/dist/component/garmin/transform/healthSnapshot.js +111 -0
- package/dist/component/garmin/transform/healthSnapshot.js.map +1 -0
- package/dist/component/garmin/transform/hrvSummary.d.ts +12 -0
- package/dist/component/garmin/transform/hrvSummary.d.ts.map +1 -0
- package/dist/component/garmin/transform/hrvSummary.js +45 -0
- package/dist/component/garmin/transform/hrvSummary.js.map +1 -0
- package/dist/component/garmin/transform/manuallyUpdatedActivities.d.ts +11 -0
- package/dist/component/garmin/transform/manuallyUpdatedActivities.d.ts.map +1 -0
- package/dist/component/garmin/transform/manuallyUpdatedActivities.js +20 -0
- package/dist/component/garmin/transform/manuallyUpdatedActivities.js.map +1 -0
- package/dist/component/garmin/transform/menstrualCycleTracking.d.ts +10 -0
- package/dist/component/garmin/transform/menstrualCycleTracking.d.ts.map +1 -0
- package/dist/component/garmin/transform/menstrualCycleTracking.js +43 -0
- package/dist/component/garmin/transform/menstrualCycleTracking.js.map +1 -0
- package/dist/component/garmin/transform/moveIQ.d.ts +17 -0
- package/dist/component/garmin/transform/moveIQ.d.ts.map +1 -0
- package/dist/component/garmin/transform/moveIQ.js +41 -0
- package/dist/component/garmin/transform/moveIQ.js.map +1 -0
- package/dist/component/garmin/transform/pulseOx.d.ts +12 -0
- package/dist/component/garmin/transform/pulseOx.d.ts.map +1 -0
- package/dist/component/garmin/transform/pulseOx.js +46 -0
- package/dist/component/garmin/transform/pulseOx.js.map +1 -0
- package/dist/component/garmin/transform/respiration.d.ts +12 -0
- package/dist/component/garmin/transform/respiration.d.ts.map +1 -0
- package/dist/component/garmin/transform/respiration.js +54 -0
- package/dist/component/garmin/transform/respiration.js.map +1 -0
- package/dist/component/garmin/transform/skinTemperature.d.ts +12 -0
- package/dist/component/garmin/transform/skinTemperature.d.ts.map +1 -0
- package/dist/component/garmin/transform/skinTemperature.js +38 -0
- package/dist/component/garmin/transform/skinTemperature.js.map +1 -0
- package/dist/component/garmin/transform/sleeps.d.ts +55 -0
- package/dist/component/garmin/transform/sleeps.d.ts.map +1 -0
- package/dist/component/garmin/transform/sleeps.js +120 -0
- package/dist/component/garmin/transform/sleeps.js.map +1 -0
- package/dist/component/garmin/transform/stress.d.ts +12 -0
- package/dist/component/garmin/transform/stress.d.ts.map +1 -0
- package/dist/component/garmin/transform/stress.js +56 -0
- package/dist/component/garmin/transform/stress.js.map +1 -0
- package/dist/component/garmin/transform/userMetrics.d.ts +12 -0
- package/dist/component/garmin/transform/userMetrics.d.ts.map +1 -0
- package/dist/component/garmin/transform/userMetrics.js +48 -0
- package/dist/component/garmin/transform/userMetrics.js.map +1 -0
- package/dist/component/garmin/types/garmin.d.ts +21 -0
- package/dist/component/garmin/types/garmin.d.ts.map +1 -0
- package/dist/component/garmin/types/garmin.js +6 -0
- package/dist/component/garmin/types/garmin.js.map +1 -0
- package/dist/component/garmin/types/zod/zod.gen.d.ts +1319 -0
- package/dist/component/garmin/types/zod/zod.gen.d.ts.map +1 -0
- package/dist/component/garmin/types/zod/zod.gen.js +784 -0
- package/dist/component/garmin/types/zod/zod.gen.js.map +1 -0
- package/dist/component/garmin/webhooks.d.ts +141 -0
- package/dist/component/garmin/webhooks.d.ts.map +1 -0
- package/dist/component/garmin/webhooks.js +766 -0
- package/dist/component/garmin/webhooks.js.map +1 -0
- package/dist/component/private.d.ts +4 -4
- package/dist/component/public.d.ts +333 -333
- package/dist/component/schema.d.ts +133 -133
- package/dist/component/strava/private.d.ts +30 -0
- package/dist/component/strava/private.d.ts.map +1 -0
- package/dist/component/strava/private.js +71 -0
- package/dist/component/strava/private.js.map +1 -0
- package/dist/component/{strava.d.ts → strava/public.d.ts} +3 -31
- package/dist/component/strava/public.d.ts.map +1 -0
- package/dist/component/{strava.js → strava/public.js} +22 -101
- package/dist/component/strava/public.js.map +1 -0
- package/dist/component/validators/activity.d.ts +6 -0
- package/dist/component/validators/activity.d.ts.map +1 -1
- package/dist/component/validators/activity.js.map +1 -1
- package/dist/component/validators/body.d.ts +20 -14
- package/dist/component/validators/body.d.ts.map +1 -1
- package/dist/component/validators/body.js.map +1 -1
- package/dist/component/validators/daily.d.ts +6 -0
- package/dist/component/validators/daily.d.ts.map +1 -1
- package/dist/component/validators/daily.js.map +1 -1
- package/dist/component/validators/enums.d.ts +1 -1
- package/dist/component/validators/menstruation.d.ts +5 -0
- package/dist/component/validators/menstruation.d.ts.map +1 -1
- package/dist/component/validators/menstruation.js.map +1 -1
- package/dist/garmin/client.js.map +1 -1
- package/dist/garmin/index.d.ts +0 -2
- package/dist/garmin/index.d.ts.map +1 -1
- package/dist/garmin/index.js +0 -1
- package/dist/garmin/index.js.map +1 -1
- package/dist/garmin/sync.d.ts.map +1 -1
- package/dist/garmin/sync.js +3 -2
- package/dist/garmin/sync.js.map +1 -1
- package/dist/garmin/types.d.ts +1 -1
- package/dist/garmin/types.d.ts.map +1 -1
- package/dist/validators.d.ts +31 -28
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +2 -2
- package/dist/validators.js.map +1 -1
- package/package.json +4 -7
- package/src/client/index.ts +41 -172
- package/src/component/_generated/api.ts +96 -4
- package/src/component/_generated/component.ts +252 -284
- package/src/{garmin → component/garmin}/auth.ts +8 -1
- package/src/component/garmin/client.ts +39 -0
- package/src/component/garmin/private.ts +1798 -0
- package/src/component/garmin/public.ts +938 -0
- package/src/component/garmin/schemas/activity.ts +40 -0
- package/src/component/garmin/schemas/activityDetails.ts +45 -0
- package/src/component/garmin/schemas/bloodPressure.ts +38 -0
- package/src/component/garmin/schemas/bodyCompositions.ts +38 -0
- package/src/component/garmin/schemas/dailies.ts +38 -0
- package/src/component/garmin/schemas/epochs.ts +38 -0
- package/src/component/garmin/schemas/healthSnapshot.ts +38 -0
- package/src/component/garmin/schemas/hrvSummary.ts +38 -0
- package/src/component/garmin/schemas/manuallyUpdatedActivities.ts +49 -0
- package/src/component/garmin/schemas/menstrualCycleTracking.ts +39 -0
- package/src/component/garmin/schemas/moveIQ.ts +38 -0
- package/src/component/garmin/schemas/pulseOx.ts +39 -0
- package/src/component/garmin/schemas/respiration.ts +39 -0
- package/src/component/garmin/schemas/skinTemperature.ts +39 -0
- package/src/component/garmin/schemas/sleeps.ts +38 -0
- package/src/component/garmin/schemas/stress.ts +43 -0
- package/src/component/garmin/schemas/userMetrics.ts +39 -0
- package/src/component/garmin/transform/activity.ts +143 -0
- package/src/component/garmin/transform/activityDetails.ts +236 -0
- package/src/{garmin → component/garmin/transform}/bloodPressure.ts +39 -41
- package/src/component/garmin/transform/bodyCompositions.ts +51 -0
- package/src/component/garmin/transform/dailies.ts +179 -0
- package/src/component/garmin/transform/epochs.ts +94 -0
- package/src/component/garmin/transform/healthSnapshot.ts +152 -0
- package/src/component/garmin/transform/hrvSummary.ts +56 -0
- package/src/component/garmin/transform/manuallyUpdatedActivities.ts +27 -0
- package/src/{garmin/maps/activity-type.ts → component/garmin/transform/maps/activityType.ts} +116 -116
- package/src/{garmin/maps/sleep-level.ts → component/garmin/transform/maps/sleepLevel.ts} +22 -22
- package/src/component/garmin/transform/menstrualCycleTracking.ts +48 -0
- package/src/component/garmin/transform/moveIQ.ts +48 -0
- package/src/{garmin → component/garmin/transform}/plannedWorkout.ts +328 -333
- package/src/component/garmin/transform/pulseOx.ts +64 -0
- package/src/component/garmin/transform/respiration.ts +73 -0
- package/src/component/garmin/transform/skinTemperature.ts +44 -0
- package/src/component/garmin/transform/sleeps.ts +159 -0
- package/src/component/garmin/transform/stress.ts +78 -0
- package/src/component/garmin/transform/userMetrics.ts +56 -0
- package/src/component/garmin/types/specs/training-api-workouts.json +699 -0
- package/src/component/garmin/types/trainingApiWorkouts/client/client.gen.ts +290 -0
- package/src/component/garmin/types/trainingApiWorkouts/client/index.ts +25 -0
- package/src/component/garmin/types/trainingApiWorkouts/client/types.gen.ts +214 -0
- package/src/component/garmin/types/trainingApiWorkouts/client/utils.gen.ts +316 -0
- package/src/component/garmin/types/trainingApiWorkouts/client.gen.ts +16 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/auth.gen.ts +41 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/bodySerializer.gen.ts +82 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/params.gen.ts +169 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/pathSerializer.gen.ts +171 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/queryKeySerializer.gen.ts +117 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/serverSentEvents.gen.ts +243 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/types.gen.ts +104 -0
- package/src/component/garmin/types/trainingApiWorkouts/core/utils.gen.ts +140 -0
- package/src/component/garmin/types/trainingApiWorkouts/index.ts +4 -0
- package/src/component/garmin/types/trainingApiWorkouts/sdk.gen.ts +126 -0
- package/src/component/garmin/types/trainingApiWorkouts/types.gen.ts +387 -0
- package/src/component/garmin/types/trainingApiWorkouts/zod.gen.ts +423 -0
- package/src/component/garmin/types/wellnessApi/client/client.gen.ts +290 -0
- package/src/component/garmin/types/wellnessApi/client/index.ts +25 -0
- package/src/component/garmin/types/wellnessApi/client/types.gen.ts +214 -0
- package/src/component/garmin/types/wellnessApi/client/utils.gen.ts +316 -0
- package/src/component/garmin/types/wellnessApi/client.gen.ts +16 -0
- package/src/component/garmin/types/wellnessApi/core/auth.gen.ts +41 -0
- package/src/component/garmin/types/wellnessApi/core/bodySerializer.gen.ts +82 -0
- package/src/component/garmin/types/wellnessApi/core/params.gen.ts +169 -0
- package/src/component/garmin/types/wellnessApi/core/pathSerializer.gen.ts +171 -0
- package/src/component/garmin/types/wellnessApi/core/queryKeySerializer.gen.ts +117 -0
- package/src/component/garmin/types/wellnessApi/core/serverSentEvents.gen.ts +243 -0
- package/src/component/garmin/types/wellnessApi/core/types.gen.ts +104 -0
- package/src/component/garmin/types/wellnessApi/core/utils.gen.ts +140 -0
- package/src/component/garmin/types/wellnessApi/index.ts +4 -0
- package/src/component/garmin/types/wellnessApi/sdk.gen.ts +207 -0
- package/src/component/garmin/types/wellnessApi/types.gen.ts +2942 -0
- package/src/component/garmin/types/wellnessApi/zod.gen.ts +878 -0
- package/src/component/garmin/utils.ts +25 -0
- package/src/component/garmin/webhooks.ts +852 -0
- package/src/component/strava/private.ts +89 -0
- package/src/component/{strava.ts → strava/public.ts} +341 -404
- package/src/component/validators/activity.ts +5 -0
- package/src/component/validators/body.ts +5 -0
- package/src/component/validators/daily.ts +5 -0
- package/src/component/validators/menstruation.ts +5 -1
- package/src/component/validators/plannedWorkout.ts +5 -0
- package/src/validators.ts +12 -2
- package/dist/component/garmin.d.ts +0 -366
- package/dist/component/garmin.d.ts.map +0 -1
- package/dist/component/garmin.js +0 -1481
- package/dist/component/garmin.js.map +0 -1
- package/dist/component/strava.d.ts.map +0 -1
- package/dist/component/strava.js.map +0 -1
- package/dist/garmin/activity.d.ts +0 -92
- package/dist/garmin/activity.d.ts.map +0 -1
- package/dist/garmin/activity.js +0 -201
- package/dist/garmin/activity.js.map +0 -1
- package/src/component/garmin.ts +0 -1722
- package/src/garmin/activity.test.ts +0 -170
- package/src/garmin/activity.ts +0 -265
- package/src/garmin/auth.test.ts +0 -103
- package/src/garmin/body.ts +0 -59
- package/src/garmin/client.ts +0 -886
- package/src/garmin/daily.ts +0 -215
- package/src/garmin/hrv.ts +0 -57
- package/src/garmin/index.ts +0 -145
- package/src/garmin/maps/activity-type.test.ts +0 -78
- package/src/garmin/menstruation.ts +0 -44
- package/src/garmin/pulseOx.ts +0 -45
- package/src/garmin/respiration.ts +0 -55
- package/src/garmin/skinTemp.ts +0 -42
- package/src/garmin/sleep.test.ts +0 -109
- package/src/garmin/sleep.ts +0 -176
- package/src/garmin/stressDetails.ts +0 -71
- package/src/garmin/sync.ts +0 -566
- package/src/garmin/types.ts +0 -268
- package/src/garmin/userMetrics.ts +0 -50
- package/src/garmin/wellness-api.d.ts +0 -5637
- /package/src/{garmin/spec → component/garmin/types/specs}/wellness-api.json +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import type { BodySerializer, QuerySerializer } from './bodySerializer.gen';
|
|
4
|
+
import {
|
|
5
|
+
type ArraySeparatorStyle,
|
|
6
|
+
serializeArrayParam,
|
|
7
|
+
serializeObjectParam,
|
|
8
|
+
serializePrimitiveParam,
|
|
9
|
+
} from './pathSerializer.gen';
|
|
10
|
+
|
|
11
|
+
export interface PathSerializer {
|
|
12
|
+
path: Record<string, unknown>;
|
|
13
|
+
url: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
17
|
+
|
|
18
|
+
export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => {
|
|
19
|
+
let url = _url;
|
|
20
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
21
|
+
if (matches) {
|
|
22
|
+
for (const match of matches) {
|
|
23
|
+
let explode = false;
|
|
24
|
+
let name = match.substring(1, match.length - 1);
|
|
25
|
+
let style: ArraySeparatorStyle = 'simple';
|
|
26
|
+
|
|
27
|
+
if (name.endsWith('*')) {
|
|
28
|
+
explode = true;
|
|
29
|
+
name = name.substring(0, name.length - 1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (name.startsWith('.')) {
|
|
33
|
+
name = name.substring(1);
|
|
34
|
+
style = 'label';
|
|
35
|
+
} else if (name.startsWith(';')) {
|
|
36
|
+
name = name.substring(1);
|
|
37
|
+
style = 'matrix';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const value = path[name];
|
|
41
|
+
|
|
42
|
+
if (value === undefined || value === null) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (typeof value === 'object') {
|
|
52
|
+
url = url.replace(
|
|
53
|
+
match,
|
|
54
|
+
serializeObjectParam({
|
|
55
|
+
explode,
|
|
56
|
+
name,
|
|
57
|
+
style,
|
|
58
|
+
value: value as Record<string, unknown>,
|
|
59
|
+
valueOnly: true,
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (style === 'matrix') {
|
|
66
|
+
url = url.replace(
|
|
67
|
+
match,
|
|
68
|
+
`;${serializePrimitiveParam({
|
|
69
|
+
name,
|
|
70
|
+
value: value as string,
|
|
71
|
+
})}`,
|
|
72
|
+
);
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const replaceValue = encodeURIComponent(
|
|
77
|
+
style === 'label' ? `.${value as string}` : (value as string),
|
|
78
|
+
);
|
|
79
|
+
url = url.replace(match, replaceValue);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return url;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const getUrl = ({
|
|
86
|
+
baseUrl,
|
|
87
|
+
path,
|
|
88
|
+
query,
|
|
89
|
+
querySerializer,
|
|
90
|
+
url: _url,
|
|
91
|
+
}: {
|
|
92
|
+
baseUrl?: string;
|
|
93
|
+
path?: Record<string, unknown>;
|
|
94
|
+
query?: Record<string, unknown>;
|
|
95
|
+
querySerializer: QuerySerializer;
|
|
96
|
+
url: string;
|
|
97
|
+
}) => {
|
|
98
|
+
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
99
|
+
let url = (baseUrl ?? '') + pathUrl;
|
|
100
|
+
if (path) {
|
|
101
|
+
url = defaultPathSerializer({ path, url });
|
|
102
|
+
}
|
|
103
|
+
let search = query ? querySerializer(query) : '';
|
|
104
|
+
if (search.startsWith('?')) {
|
|
105
|
+
search = search.substring(1);
|
|
106
|
+
}
|
|
107
|
+
if (search) {
|
|
108
|
+
url += `?${search}`;
|
|
109
|
+
}
|
|
110
|
+
return url;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export function getValidRequestBody(options: {
|
|
114
|
+
body?: unknown;
|
|
115
|
+
bodySerializer?: BodySerializer | null;
|
|
116
|
+
serializedBody?: unknown;
|
|
117
|
+
}) {
|
|
118
|
+
const hasBody = options.body !== undefined;
|
|
119
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
120
|
+
|
|
121
|
+
if (isSerializedBody) {
|
|
122
|
+
if ('serializedBody' in options) {
|
|
123
|
+
const hasSerializedBody =
|
|
124
|
+
options.serializedBody !== undefined && options.serializedBody !== '';
|
|
125
|
+
|
|
126
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// not all clients implement a serializedBody property (i.e., client-axios)
|
|
130
|
+
return options.body !== '' ? options.body : null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// plain/text body
|
|
134
|
+
if (hasBody) {
|
|
135
|
+
return options.body;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// no body was provided
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
export { activityDetails, dereg, getActivities, getActivityFile, getBackfillActivities, getBackfillActivityDetails, getBackfillAutoActivityMoveiq, getBackfillBloodPressures, getBackfillBodycomps, getBackfillDailies, getBackfillEpochs, getBackfillHealthSnapshot, getBackfillHrv, getBackfillMct, getBackfillPulseox, getBackfillRespirationEpoch, getBackfillSkinTemp, getBackfillSleeps, getBackfillStressDetails, getBackfillUserMetrics, getBloodPressures, getBodyComps, getDailies, getEpochs, getHealthsnapshot, getHrv, getManuallyUpdatedActivities, getMct, getMoveIq, getPulseox, getRespiration, getSkinTemp, getSleeps, getSolar, getStressDetails, getUserMetrics, getUserPermissions, type Options, userId } from './sdk.gen';
|
|
4
|
+
export type { ActivityDetailsData, ActivityDetailsError, ActivityDetailsErrors, ActivityDetailsResponse, ActivityDetailsResponses, BodyBatteryActivityEvent, BodyBatteryDynamicFeedbackEvent, ClientActivity, ClientActivityDetail, ClientAutoActivityMoveIq, ClientBloodGlucose, ClientBloodPressure, ClientBodyComp, ClientConsumerPermissions, ClientDaily, ClientDailySpo2Acclimation, ClientEpoch, ClientHealthSnapshot, ClientHrvSummary, ClientLap, ClientNaps, ClientOptions, ClientPregnancySnapshot, ClientRespiration, ClientSkinTemp, ClientSleep, ClientSleepScoreItem, ClientSolar, ClientSolarReading, ClientStress, ClientSummarizedMenstrualCycle, ClientSummarizedMenstrualCycleWritable, ClientUserId, ClientUserMetrics, ClientWeightGoalUserInput, DeregData, DeregError, DeregErrors, DeregResponse, DeregResponses, ErrorBody, GetActivitiesData, GetActivitiesError, GetActivitiesErrors, GetActivitiesResponse, GetActivitiesResponses, GetActivityFileData, GetActivityFileError, GetActivityFileErrors, GetActivityFileResponse, GetActivityFileResponses, GetBackfillActivitiesData, GetBackfillActivitiesError, GetBackfillActivitiesErrors, GetBackfillActivitiesResponses, GetBackfillActivityDetailsData, GetBackfillActivityDetailsError, GetBackfillActivityDetailsErrors, GetBackfillActivityDetailsResponses, GetBackfillAutoActivityMoveiqData, GetBackfillAutoActivityMoveiqError, GetBackfillAutoActivityMoveiqErrors, GetBackfillAutoActivityMoveiqResponses, GetBackfillBloodPressuresData, GetBackfillBloodPressuresError, GetBackfillBloodPressuresErrors, GetBackfillBloodPressuresResponses, GetBackfillBodycompsData, GetBackfillBodycompsError, GetBackfillBodycompsErrors, GetBackfillBodycompsResponses, GetBackfillDailiesData, GetBackfillDailiesError, GetBackfillDailiesErrors, GetBackfillDailiesResponses, GetBackfillEpochsData, GetBackfillEpochsError, GetBackfillEpochsErrors, GetBackfillEpochsResponses, GetBackfillHealthSnapshotData, GetBackfillHealthSnapshotError, GetBackfillHealthSnapshotErrors, GetBackfillHealthSnapshotResponses, GetBackfillHrvData, GetBackfillHrvError, GetBackfillHrvErrors, GetBackfillHrvResponses, GetBackfillMctData, GetBackfillMctError, GetBackfillMctErrors, GetBackfillMctResponses, GetBackfillPulseoxData, GetBackfillPulseoxError, GetBackfillPulseoxErrors, GetBackfillPulseoxResponses, GetBackfillRespirationEpochData, GetBackfillRespirationEpochError, GetBackfillRespirationEpochErrors, GetBackfillRespirationEpochResponses, GetBackfillSkinTempData, GetBackfillSkinTempError, GetBackfillSkinTempErrors, GetBackfillSkinTempResponses, GetBackfillSleepsData, GetBackfillSleepsError, GetBackfillSleepsErrors, GetBackfillSleepsResponses, GetBackfillStressDetailsData, GetBackfillStressDetailsError, GetBackfillStressDetailsErrors, GetBackfillStressDetailsResponses, GetBackfillUserMetricsData, GetBackfillUserMetricsError, GetBackfillUserMetricsErrors, GetBackfillUserMetricsResponses, GetBloodPressuresData, GetBloodPressuresError, GetBloodPressuresErrors, GetBloodPressuresResponse, GetBloodPressuresResponses, GetBodyCompsData, GetBodyCompsError, GetBodyCompsErrors, GetBodyCompsResponse, GetBodyCompsResponses, GetDailiesData, GetDailiesError, GetDailiesErrors, GetDailiesResponse, GetDailiesResponses, GetEpochsData, GetEpochsError, GetEpochsErrors, GetEpochsResponse, GetEpochsResponses, GetHealthsnapshotData, GetHealthsnapshotError, GetHealthsnapshotErrors, GetHealthsnapshotResponse, GetHealthsnapshotResponses, GetHrvData, GetHrvError, GetHrvErrors, GetHrvResponse, GetHrvResponses, GetManuallyUpdatedActivitiesData, GetManuallyUpdatedActivitiesError, GetManuallyUpdatedActivitiesErrors, GetManuallyUpdatedActivitiesResponse, GetManuallyUpdatedActivitiesResponses, GetMctData, GetMctError, GetMctErrors, GetMctResponse, GetMctResponses, GetMoveIqData, GetMoveIqError, GetMoveIqErrors, GetMoveIqResponse, GetMoveIqResponses, GetPulseoxData, GetPulseoxError, GetPulseoxErrors, GetPulseoxResponse, GetPulseoxResponses, GetRespirationData, GetRespirationError, GetRespirationErrors, GetRespirationResponse, GetRespirationResponses, GetSkinTempData, GetSkinTempError, GetSkinTempErrors, GetSkinTempResponse, GetSkinTempResponses, GetSleepsData, GetSleepsError, GetSleepsErrors, GetSleepsResponse, GetSleepsResponses, GetSolarData, GetSolarError, GetSolarErrors, GetSolarResponse, GetSolarResponses, GetStressDetailsData, GetStressDetailsError, GetStressDetailsErrors, GetStressDetailsResponse, GetStressDetailsResponses, GetUserMetricsData, GetUserMetricsError, GetUserMetricsErrors, GetUserMetricsResponse, GetUserMetricsResponses, GetUserPermissionsData, GetUserPermissionsError, GetUserPermissionsErrors, GetUserPermissionsResponse, GetUserPermissionsResponses, HealthSnapshotSummary, Sample, ServiceFailure, TimeRange, UserIdData, UserIdError, UserIdErrors, UserIdResponse, UserIdResponses } from './types.gen';
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import type { Client, Options as Options2, TDataShape } from './client';
|
|
4
|
+
import { client } from './client.gen';
|
|
5
|
+
import type { ActivityDetailsData, ActivityDetailsErrors, ActivityDetailsResponses, DeregData, DeregErrors, DeregResponses, GetActivitiesData, GetActivitiesErrors, GetActivitiesResponses, GetActivityFileData, GetActivityFileErrors, GetActivityFileResponses, GetBackfillActivitiesData, GetBackfillActivitiesErrors, GetBackfillActivitiesResponses, GetBackfillActivityDetailsData, GetBackfillActivityDetailsErrors, GetBackfillActivityDetailsResponses, GetBackfillAutoActivityMoveiqData, GetBackfillAutoActivityMoveiqErrors, GetBackfillAutoActivityMoveiqResponses, GetBackfillBloodPressuresData, GetBackfillBloodPressuresErrors, GetBackfillBloodPressuresResponses, GetBackfillBodycompsData, GetBackfillBodycompsErrors, GetBackfillBodycompsResponses, GetBackfillDailiesData, GetBackfillDailiesErrors, GetBackfillDailiesResponses, GetBackfillEpochsData, GetBackfillEpochsErrors, GetBackfillEpochsResponses, GetBackfillHealthSnapshotData, GetBackfillHealthSnapshotErrors, GetBackfillHealthSnapshotResponses, GetBackfillHrvData, GetBackfillHrvErrors, GetBackfillHrvResponses, GetBackfillMctData, GetBackfillMctErrors, GetBackfillMctResponses, GetBackfillPulseoxData, GetBackfillPulseoxErrors, GetBackfillPulseoxResponses, GetBackfillRespirationEpochData, GetBackfillRespirationEpochErrors, GetBackfillRespirationEpochResponses, GetBackfillSkinTempData, GetBackfillSkinTempErrors, GetBackfillSkinTempResponses, GetBackfillSleepsData, GetBackfillSleepsErrors, GetBackfillSleepsResponses, GetBackfillStressDetailsData, GetBackfillStressDetailsErrors, GetBackfillStressDetailsResponses, GetBackfillUserMetricsData, GetBackfillUserMetricsErrors, GetBackfillUserMetricsResponses, GetBloodPressuresData, GetBloodPressuresErrors, GetBloodPressuresResponses, GetBodyCompsData, GetBodyCompsErrors, GetBodyCompsResponses, GetDailiesData, GetDailiesErrors, GetDailiesResponses, GetEpochsData, GetEpochsErrors, GetEpochsResponses, GetHealthsnapshotData, GetHealthsnapshotErrors, GetHealthsnapshotResponses, GetHrvData, GetHrvErrors, GetHrvResponses, GetManuallyUpdatedActivitiesData, GetManuallyUpdatedActivitiesErrors, GetManuallyUpdatedActivitiesResponses, GetMctData, GetMctErrors, GetMctResponses, GetMoveIqData, GetMoveIqErrors, GetMoveIqResponses, GetPulseoxData, GetPulseoxErrors, GetPulseoxResponses, GetRespirationData, GetRespirationErrors, GetRespirationResponses, GetSkinTempData, GetSkinTempErrors, GetSkinTempResponses, GetSleepsData, GetSleepsErrors, GetSleepsResponses, GetSolarData, GetSolarErrors, GetSolarResponses, GetStressDetailsData, GetStressDetailsErrors, GetStressDetailsResponses, GetUserMetricsData, GetUserMetricsErrors, GetUserMetricsResponses, GetUserPermissionsData, GetUserPermissionsErrors, GetUserPermissionsResponses, UserIdData, UserIdErrors, UserIdResponses } from './types.gen';
|
|
6
|
+
|
|
7
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
8
|
+
/**
|
|
9
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
10
|
+
* individual options. This might be also useful if you want to implement a
|
|
11
|
+
* custom client.
|
|
12
|
+
*/
|
|
13
|
+
client?: Client;
|
|
14
|
+
/**
|
|
15
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
16
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
17
|
+
*/
|
|
18
|
+
meta?: Record<string, unknown>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* User Metrics are per-user calculations performed by Garmin based on the underlying data uploaded from the user’s device.
|
|
23
|
+
* This data can be specific to a single device and field availability is dependent on device model support
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export const getUserMetrics = <ThrowOnError extends boolean = false>(options?: Options<GetUserMetricsData, ThrowOnError>) => (options?.client ?? client).get<GetUserMetricsResponses, GetUserMetricsErrors, ThrowOnError>({ url: '/rest/userMetrics', ...options });
|
|
27
|
+
|
|
28
|
+
export const getUserPermissions = <ThrowOnError extends boolean = false>(options?: Options<GetUserPermissionsData, ThrowOnError>) => (options?.client ?? client).get<GetUserPermissionsResponses, GetUserPermissionsErrors, ThrowOnError>({ url: '/rest/user/permissions', ...options });
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get the Health API ID for this user. This ID will persist across multiple User Access Tokens generated by the same user.
|
|
32
|
+
*/
|
|
33
|
+
export const userId = <ThrowOnError extends boolean = false>(options?: Options<UserIdData, ThrowOnError>) => (options?.client ?? client).get<UserIdResponses, UserIdErrors, ThrowOnError>({ url: '/rest/user/id', ...options });
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Stress Details summaries contain the user’s stress level values for a given day.
|
|
37
|
+
* Stress levels are provided as 3-minute averages of the real-time stress scores generated on the device.
|
|
38
|
+
* Stress values from the Health API are exactly the stress values shown on Garmin Connect.
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
export const getStressDetails = <ThrowOnError extends boolean = false>(options?: Options<GetStressDetailsData, ThrowOnError>) => (options?.client ?? client).get<GetStressDetailsResponses, GetStressDetailsErrors, ThrowOnError>({ url: '/rest/stressDetails', ...options });
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* retrieve a list of Solar summary
|
|
45
|
+
*/
|
|
46
|
+
export const getSolar = <ThrowOnError extends boolean = false>(options?: Options<GetSolarData, ThrowOnError>) => (options?.client ?? client).get<GetSolarResponses, GetSolarErrors, ThrowOnError>({ url: '/rest/solarIntensity', ...options });
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Sleep summaries are data records representing how long the user slept and the automatically classified sleep levels during that sleep event
|
|
50
|
+
* (e.g. light, deep periods) based on data generated by the user’s device.
|
|
51
|
+
* Unlike Daily summaries which are associated with a given day on a midnight-to-midnight basis,
|
|
52
|
+
* Sleep summaries are associated with a user’s overnight sleep range. Most will start on one calendar day and end on the next calendar day,
|
|
53
|
+
* but it is possible for two different Sleep summaries to begin on the same day if, for example,
|
|
54
|
+
* the user goes to bed after midnight, wakes up, and then goes to bed prior to midnight the next evening.
|
|
55
|
+
*
|
|
56
|
+
* Tip: Many Garmin devices attempt to auto-sync data during the night while the user is asleep and the smartphone is charging.
|
|
57
|
+
* This may result in an incomplete Sleep summary record. It is important to update sleep data with the most recent
|
|
58
|
+
* data provided on subsequent ping notifications to get an accurate and full representation of the sleep window. See the “validation” parameter for more details.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export const getSleeps = <ThrowOnError extends boolean = false>(options?: Options<GetSleepsData, ThrowOnError>) => (options?.client ?? client).get<GetSleepsResponses, GetSleepsErrors, ThrowOnError>({ url: '/rest/sleeps', ...options });
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* retrieve a list of skin temp summary
|
|
65
|
+
*/
|
|
66
|
+
export const getSkinTemp = <ThrowOnError extends boolean = false>(options?: Options<GetSkinTempData, ThrowOnError>) => (options?.client ?? client).get<GetSkinTempResponses, GetSkinTempErrors, ThrowOnError>({ url: '/rest/skinTemp', ...options });
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Respiration is a feature available on some Garmin devices that tracks breathing rate throughout the day, during sleep, and during activities.
|
|
70
|
+
*/
|
|
71
|
+
export const getRespiration = <ThrowOnError extends boolean = false>(options?: Options<GetRespirationData, ThrowOnError>) => (options?.client ?? client).get<GetRespirationResponses, GetRespirationErrors, ThrowOnError>({ url: '/rest/respiration', ...options });
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Pulse Ox summaries contain blood oxygen saturation data.
|
|
75
|
+
*/
|
|
76
|
+
export const getPulseox = <ThrowOnError extends boolean = false>(options?: Options<GetPulseoxData, ThrowOnError>) => (options?.client ?? client).get<GetPulseoxResponses, GetPulseoxErrors, ThrowOnError>({ url: '/rest/pulseOx', ...options });
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Move IQ Event summaries are a feed of activities which have been automatically detected by the device based on movement patterns,
|
|
80
|
+
* like running or biking. These are not activities initiated by the user. Please note that wellness data, like steps and distance,
|
|
81
|
+
* from Move IQ events are already included in the Daily and Epoch summaries.
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
export const getMoveIq = <ThrowOnError extends boolean = false>(options?: Options<GetMoveIqData, ThrowOnError>) => (options?.client ?? client).get<GetMoveIqResponses, GetMoveIqErrors, ThrowOnError>({ url: '/rest/moveiq', ...options });
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The Menstrual Cycle Tracking feature available on some Garmin devices allows users to track information
|
|
88
|
+
* about their cycle schedule and log symptoms. The MCT Summary only returns information related to cycle
|
|
89
|
+
* schedule and does not make the information about symptoms available.
|
|
90
|
+
*
|
|
91
|
+
*/
|
|
92
|
+
export const getMct = <ThrowOnError extends boolean = false>(options?: Options<GetMctData, ThrowOnError>) => (options?.client ?? client).get<GetMctResponses, GetMctErrors, ThrowOnError>({ url: '/rest/mct', ...options });
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Manual activities are created or edited by the user directly on the Connect site and not uploaded from a device.
|
|
96
|
+
* Manual activities can be identified by the property ‘manual’ = true and are separated out in to their own summary data type to allow greater control.
|
|
97
|
+
* This field will only exist if the activity is manually created or edited.
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
export const getManuallyUpdatedActivities = <ThrowOnError extends boolean = false>(options?: Options<GetManuallyUpdatedActivitiesData, ThrowOnError>) => (options?.client ?? client).get<GetManuallyUpdatedActivitiesResponses, GetManuallyUpdatedActivitiesErrors, ThrowOnError>({ url: '/rest/manuallyUpdatedActivities', ...options });
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Heart rate variability (HRV) refers to beat-to-beat variations in heart rate and is data collected during
|
|
104
|
+
* the overnight sleep window for select devices. To gain a deeper understanding of your overall health,
|
|
105
|
+
* recovery and training performance through heart rate variability while you sleep.
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
export const getHrv = <ThrowOnError extends boolean = false>(options?: Options<GetHrvData, ThrowOnError>) => (options?.client ?? client).get<GetHrvResponses, GetHrvErrors, ThrowOnError>({ url: '/rest/hrv', ...options });
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The Garmin Health Snapshot is a collection of key health-related insights recorded during a two-minute session on a compatible device.
|
|
112
|
+
* Heart rate (HR), heart rate variability (HRV), Pulse Ox, respiration, and stress are the metrics included this summary,
|
|
113
|
+
* which collectively provide you a glimpse of your overall cardiovascular status.
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
export const getHealthsnapshot = <ThrowOnError extends boolean = false>(options?: Options<GetHealthsnapshotData, ThrowOnError>) => (options?.client ?? client).get<GetHealthsnapshotResponses, GetHealthsnapshotErrors, ThrowOnError>({ url: '/rest/healthSnapshot', ...options });
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* This service provides the ability to retrieve a list of summaries containing wellness data for a specific time range.
|
|
120
|
+
* Epoch summary records contain much of the same data available in Daily summaries, but with 15-minute time-slice granularity.
|
|
121
|
+
* There is one record for each activity type monitored within an individual epoch.
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
export const getEpochs = <ThrowOnError extends boolean = false>(options?: Options<GetEpochsData, ThrowOnError>) => (options?.client ?? client).get<GetEpochsResponses, GetEpochsErrors, ThrowOnError>({ url: '/rest/epochs', ...options });
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Daily summaries offer a high-level view of the user’s entire day.
|
|
128
|
+
*/
|
|
129
|
+
export const getDailies = <ThrowOnError extends boolean = false>(options?: Options<GetDailiesData, ThrowOnError>) => (options?.client ?? client).get<GetDailiesResponses, GetDailiesErrors, ThrowOnError>({ url: '/rest/dailies', ...options });
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Body Composition summaries contain information about the user’s biometric data, like weight or body mass index.
|
|
133
|
+
*/
|
|
134
|
+
export const getBodyComps = <ThrowOnError extends boolean = false>(options?: Options<GetBodyCompsData, ThrowOnError>) => (options?.client ?? client).get<GetBodyCompsResponses, GetBodyCompsErrors, ThrowOnError>({ url: '/rest/bodyComps', ...options });
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* retrieve a list of one or more blood pressure summaries
|
|
138
|
+
*/
|
|
139
|
+
export const getBloodPressures = <ThrowOnError extends boolean = false>(options?: Options<GetBloodPressuresData, ThrowOnError>) => (options?.client ?? client).get<GetBloodPressuresResponses, GetBloodPressuresErrors, ThrowOnError>({ url: '/rest/bloodPressures', ...options });
|
|
140
|
+
|
|
141
|
+
export const getBackfillUserMetrics = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillUserMetricsData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillUserMetricsResponses, GetBackfillUserMetricsErrors, ThrowOnError>({ url: '/rest/backfill/userMetrics', ...options });
|
|
142
|
+
|
|
143
|
+
export const getBackfillStressDetails = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillStressDetailsData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillStressDetailsResponses, GetBackfillStressDetailsErrors, ThrowOnError>({ url: '/rest/backfill/stressDetails', ...options });
|
|
144
|
+
|
|
145
|
+
export const getBackfillSleeps = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillSleepsData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillSleepsResponses, GetBackfillSleepsErrors, ThrowOnError>({ url: '/rest/backfill/sleeps', ...options });
|
|
146
|
+
|
|
147
|
+
export const getBackfillSkinTemp = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillSkinTempData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillSkinTempResponses, GetBackfillSkinTempErrors, ThrowOnError>({ url: '/rest/backfill/skinTemp', ...options });
|
|
148
|
+
|
|
149
|
+
export const getBackfillRespirationEpoch = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillRespirationEpochData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillRespirationEpochResponses, GetBackfillRespirationEpochErrors, ThrowOnError>({ url: '/rest/backfill/respiration', ...options });
|
|
150
|
+
|
|
151
|
+
export const getBackfillPulseox = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillPulseoxData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillPulseoxResponses, GetBackfillPulseoxErrors, ThrowOnError>({ url: '/rest/backfill/pulseOx', ...options });
|
|
152
|
+
|
|
153
|
+
export const getBackfillAutoActivityMoveiq = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillAutoActivityMoveiqData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillAutoActivityMoveiqResponses, GetBackfillAutoActivityMoveiqErrors, ThrowOnError>({ url: '/rest/backfill/moveiq', ...options });
|
|
154
|
+
|
|
155
|
+
export const getBackfillMct = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillMctData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillMctResponses, GetBackfillMctErrors, ThrowOnError>({ url: '/rest/backfill/mct', ...options });
|
|
156
|
+
|
|
157
|
+
export const getBackfillHrv = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillHrvData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillHrvResponses, GetBackfillHrvErrors, ThrowOnError>({ url: '/rest/backfill/hrv', ...options });
|
|
158
|
+
|
|
159
|
+
export const getBackfillHealthSnapshot = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillHealthSnapshotData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillHealthSnapshotResponses, GetBackfillHealthSnapshotErrors, ThrowOnError>({ url: '/rest/backfill/healthSnapshot', ...options });
|
|
160
|
+
|
|
161
|
+
export const getBackfillEpochs = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillEpochsData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillEpochsResponses, GetBackfillEpochsErrors, ThrowOnError>({ url: '/rest/backfill/epochs', ...options });
|
|
162
|
+
|
|
163
|
+
export const getBackfillDailies = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillDailiesData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillDailiesResponses, GetBackfillDailiesErrors, ThrowOnError>({ url: '/rest/backfill/dailies', ...options });
|
|
164
|
+
|
|
165
|
+
export const getBackfillBodycomps = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillBodycompsData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillBodycompsResponses, GetBackfillBodycompsErrors, ThrowOnError>({ url: '/rest/backfill/bodyComps', ...options });
|
|
166
|
+
|
|
167
|
+
export const getBackfillBloodPressures = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillBloodPressuresData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillBloodPressuresResponses, GetBackfillBloodPressuresErrors, ThrowOnError>({ url: '/rest/backfill/bloodPressures', ...options });
|
|
168
|
+
|
|
169
|
+
export const getBackfillActivityDetails = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillActivityDetailsData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillActivityDetailsResponses, GetBackfillActivityDetailsErrors, ThrowOnError>({ url: '/rest/backfill/activityDetails', ...options });
|
|
170
|
+
|
|
171
|
+
export const getBackfillActivities = <ThrowOnError extends boolean = false>(options?: Options<GetBackfillActivitiesData, ThrowOnError>) => (options?.client ?? client).get<GetBackfillActivitiesResponses, GetBackfillActivitiesErrors, ThrowOnError>({ url: '/rest/backfill/activities', ...options });
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Activity details are also available as raw FIT, TCX, or GPX files. These are the actual files recorded by
|
|
175
|
+
* the wearable as part of the Fitness Activity, including GPS coordinates, all recorded sensor data,
|
|
176
|
+
* and any product-specific data that may not be exposed as part of the parsed Activity Details.
|
|
177
|
+
*
|
|
178
|
+
* Parsing of raw files is the responsibility of the partner. When deciding between Activity Details
|
|
179
|
+
* Summaries and Activity Files it is generally recommended to only choose Files if there are specific required fields or details in the Files that are not available in the Summaries
|
|
180
|
+
* Unlike normal Summaries, Activity Files are not available as a Push integration. Files are only available in response to a Ping by calling the specified callbackURL.
|
|
181
|
+
*
|
|
182
|
+
*/
|
|
183
|
+
export const getActivityFile = <ThrowOnError extends boolean = false>(options?: Options<GetActivityFileData, ThrowOnError>) => (options?.client ?? client).get<GetActivityFileResponses, GetActivityFileErrors, ThrowOnError>({ url: '/rest/activityFile', ...options });
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* This request is to retrieve a list of one or more fitness activity details summaries from the API.
|
|
187
|
+
* Fitness activity details summaries represent detailed information about discrete fitness activities,
|
|
188
|
+
* such as running or swimming, that are specifically and intentionally started by the user on their device.
|
|
189
|
+
* Activity details summaries include all data recorded by the device as part of the Fitness Activity, including GPS coordinates and all recorded sensor data.
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
export const activityDetails = <ThrowOnError extends boolean = false>(options?: Options<ActivityDetailsData, ThrowOnError>) => (options?.client ?? client).get<ActivityDetailsResponses, ActivityDetailsErrors, ThrowOnError>({ url: '/rest/activityDetails', ...options });
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* This request is to retrieve a list of one or more fitness activity summaries from the API.
|
|
196
|
+
*
|
|
197
|
+
* Fitness activity summaries represent high-level information from discrete fitness activities,
|
|
198
|
+
* such as running or swimming, that are specifically and intentionally started by the user on their device.
|
|
199
|
+
* For detailed activity information (e.g. heart rate, GPS track log, or other sensor information) see the Activity Details summary type.
|
|
200
|
+
*
|
|
201
|
+
*/
|
|
202
|
+
export const getActivities = <ThrowOnError extends boolean = false>(options?: Options<GetActivitiesData, ThrowOnError>) => (options?.client ?? client).get<GetActivitiesResponses, GetActivitiesErrors, ThrowOnError>({ url: '/rest/activities', ...options });
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Delete the provided user access token, removing the association between the user and the calling app
|
|
206
|
+
*/
|
|
207
|
+
export const dereg = <ThrowOnError extends boolean = false>(options?: Options<DeregData, ThrowOnError>) => (options?.client ?? client).delete<DeregResponses, DeregErrors, ThrowOnError>({ url: '/rest/user/registration', ...options });
|