@nativesquare/soma 0.16.4 → 0.16.6
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/garmin.d.ts.map +1 -1
- package/dist/client/garmin.js +2 -0
- package/dist/client/garmin.js.map +1 -1
- package/dist/client/index.d.ts +150 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +30 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/types.d.ts +3 -3
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/api.d.ts +2 -0
- 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 +127 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/garmin/schemas/deregistration.d.ts +8 -0
- package/dist/component/garmin/schemas/deregistration.d.ts.map +1 -0
- package/dist/component/garmin/schemas/deregistration.js +12 -0
- package/dist/component/garmin/schemas/deregistration.js.map +1 -0
- package/dist/component/garmin/webhooks.d.ts +14 -0
- package/dist/component/garmin/webhooks.d.ts.map +1 -1
- package/dist/component/garmin/webhooks.js +65 -0
- package/dist/component/garmin/webhooks.js.map +1 -1
- package/dist/component/private.d.ts +90 -0
- package/dist/component/private.d.ts.map +1 -1
- package/dist/component/public.d.ts +118 -6
- package/dist/component/public.d.ts.map +1 -1
- package/dist/component/public.js +91 -21
- package/dist/component/public.js.map +1 -1
- package/dist/component/schema.d.ts +111 -1
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/utils.d.ts +27 -0
- package/dist/component/utils.d.ts.map +1 -1
- package/dist/component/utils.js +64 -0
- package/dist/component/utils.js.map +1 -1
- package/dist/component/validators/connection.d.ts +160 -0
- package/dist/component/validators/connection.d.ts.map +1 -1
- package/dist/component/validators/connection.js +16 -0
- package/dist/component/validators/connection.js.map +1 -1
- package/dist/component/validators/shared.d.ts +1 -1
- package/dist/component/validators/shared.d.ts.map +1 -1
- package/dist/component/validators/shared.js.map +1 -1
- package/dist/validators.d.ts +80 -0
- package/dist/validators.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/garmin.ts +3 -1
- package/src/client/index.ts +34 -0
- package/src/client/types.ts +4 -3
- package/src/component/_generated/api.ts +2 -0
- package/src/component/_generated/component.ts +49 -0
- package/src/component/garmin/schemas/deregistration.ts +14 -0
- package/src/component/garmin/webhooks.ts +84 -0
- package/src/component/healthkit/public.ts +597 -597
- package/src/component/public.ts +130 -21
- package/src/component/utils.ts +116 -22
- package/src/component/validators/connection.ts +18 -0
- package/src/component/validators/shared.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/component/validators/shared.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,aAAa,GAErB,UAAU,GACV,iBAAiB,GACjB,SAAS,GACT,eAAe,GACf,MAAM,GACN,OAAO,GACP,QAAQ,GACR,gBAAgB,GAChB,KAAK,GACL,2BAA2B,GAC3B,cAAc,GACd,QAAQ,GACR,SAAS,GACT,aAAa,GACb,iBAAiB,GACjB,OAAO,GACP,eAAe,GACf,aAAa,GAEb,gBAAgB,GAChB,eAAe,GACf,QAAQ,GACR,cAAc,GACd,aAAa,CAAC;AAIlB,gFAAgF;AAChF,eAAO,MAAM,kBAAkB;;;;;;;;yCAI7B,CAAC;AAEH,8CAA8C;AAC9C,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,MAAM,MAAM,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC3D,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,CAAA;KAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iwBAkDjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/component/validators/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/component/validators/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAiClC,+EAA+E;AAE/E,gFAAgF;AAChF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAiBH,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,+EAA+E;AAC/E,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;CAC9B,CAAC,CAAC;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACrC,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAA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M,EAAE,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACnC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,qBAAqB;IACrB,qBAAqB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7C,qBAAqB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,gBAAgB;IAChB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACjC,CAAC,CAAC"}
|
package/dist/validators.d.ts
CHANGED
|
@@ -14,6 +14,86 @@ export declare const connectionValidator: {
|
|
|
14
14
|
providerUserId: import("convex/values").VString<string | undefined, "optional">;
|
|
15
15
|
active: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
16
16
|
lastDataUpdate: import("convex/values").VString<string | undefined, "optional">;
|
|
17
|
+
stats: import("convex/values").VObject<{
|
|
18
|
+
body: {
|
|
19
|
+
count: number;
|
|
20
|
+
oldest: string | null;
|
|
21
|
+
};
|
|
22
|
+
daily: {
|
|
23
|
+
count: number;
|
|
24
|
+
oldest: string | null;
|
|
25
|
+
};
|
|
26
|
+
menstruation: {
|
|
27
|
+
count: number;
|
|
28
|
+
oldest: string | null;
|
|
29
|
+
};
|
|
30
|
+
sleep: {
|
|
31
|
+
count: number;
|
|
32
|
+
oldest: string | null;
|
|
33
|
+
};
|
|
34
|
+
activities: {
|
|
35
|
+
count: number;
|
|
36
|
+
oldest: string | null;
|
|
37
|
+
};
|
|
38
|
+
nutrition: {
|
|
39
|
+
count: number;
|
|
40
|
+
oldest: string | null;
|
|
41
|
+
};
|
|
42
|
+
plannedWorkouts: {
|
|
43
|
+
count: number;
|
|
44
|
+
oldest: string | null;
|
|
45
|
+
};
|
|
46
|
+
} | undefined, {
|
|
47
|
+
activities: import("convex/values").VObject<{
|
|
48
|
+
count: number;
|
|
49
|
+
oldest: string | null;
|
|
50
|
+
}, {
|
|
51
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
52
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
53
|
+
}, "required", "count" | "oldest">;
|
|
54
|
+
sleep: import("convex/values").VObject<{
|
|
55
|
+
count: number;
|
|
56
|
+
oldest: string | null;
|
|
57
|
+
}, {
|
|
58
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
59
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
60
|
+
}, "required", "count" | "oldest">;
|
|
61
|
+
body: import("convex/values").VObject<{
|
|
62
|
+
count: number;
|
|
63
|
+
oldest: string | null;
|
|
64
|
+
}, {
|
|
65
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
66
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
67
|
+
}, "required", "count" | "oldest">;
|
|
68
|
+
daily: import("convex/values").VObject<{
|
|
69
|
+
count: number;
|
|
70
|
+
oldest: string | null;
|
|
71
|
+
}, {
|
|
72
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
73
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
74
|
+
}, "required", "count" | "oldest">;
|
|
75
|
+
nutrition: import("convex/values").VObject<{
|
|
76
|
+
count: number;
|
|
77
|
+
oldest: string | null;
|
|
78
|
+
}, {
|
|
79
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
80
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
81
|
+
}, "required", "count" | "oldest">;
|
|
82
|
+
menstruation: import("convex/values").VObject<{
|
|
83
|
+
count: number;
|
|
84
|
+
oldest: string | null;
|
|
85
|
+
}, {
|
|
86
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
87
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
88
|
+
}, "required", "count" | "oldest">;
|
|
89
|
+
plannedWorkouts: import("convex/values").VObject<{
|
|
90
|
+
count: number;
|
|
91
|
+
oldest: string | null;
|
|
92
|
+
}, {
|
|
93
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
94
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
95
|
+
}, "required", "count" | "oldest">;
|
|
96
|
+
}, "optional", "body" | "daily" | "menstruation" | "sleep" | "activities" | "nutrition" | "plannedWorkouts" | "body.count" | "body.oldest" | "daily.count" | "daily.oldest" | "menstruation.count" | "menstruation.oldest" | "sleep.count" | "sleep.oldest" | "activities.count" | "activities.oldest" | "nutrition.count" | "nutrition.oldest" | "plannedWorkouts.count" | "plannedWorkouts.oldest">;
|
|
17
97
|
};
|
|
18
98
|
export declare const athleteValidator: {
|
|
19
99
|
connectionId: import("convex/values").VString<string, "required">;
|
package/dist/validators.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,KAAK,QAAQ,EACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,0CAA0C,CAAC;AAiBlD,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,KAAK,QAAQ,EACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,w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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAA4C,CAAC;AAI5E,YAAY,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,SAAS,GACV,CAAC"}
|
package/package.json
CHANGED
package/src/client/garmin.ts
CHANGED
|
@@ -651,6 +651,8 @@ export class SomaGarmin {
|
|
|
651
651
|
{ dataType: "activity-details", action: component.garmin.webhooks.handleGarminWebhookActivityDetails },
|
|
652
652
|
{ dataType: "manually-updated-activities", action: component.garmin.webhooks.handleGarminWebhookManuallyUpdatedActivities },
|
|
653
653
|
{ dataType: "move-iq", action: component.garmin.webhooks.handleGarminWebhookMoveIQ },
|
|
654
|
+
// COMMON category
|
|
655
|
+
{ dataType: "deregistration", action: component.garmin.webhooks.handleGarminWebhookDeregistration },
|
|
654
656
|
// HEALTH category
|
|
655
657
|
{ dataType: "blood-pressures", action: component.garmin.webhooks.handleGarminWebhookBloodPressures },
|
|
656
658
|
{ dataType: "body-compositions", action: component.garmin.webhooks.handleGarminWebhookBodyCompositions },
|
|
@@ -689,7 +691,7 @@ export class SomaGarmin {
|
|
|
689
691
|
? payload.length
|
|
690
692
|
: payload && typeof payload === "object"
|
|
691
693
|
? (Object.values(payload)[0] as unknown[] | undefined)
|
|
692
|
-
|
|
694
|
+
?.length ?? 0
|
|
693
695
|
: 0;
|
|
694
696
|
console.log(
|
|
695
697
|
`[soma:garmin:webhook] received dataType=${dataType} items=${rawItemCount}`,
|
package/src/client/index.ts
CHANGED
|
@@ -207,6 +207,40 @@ export class Soma {
|
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
/**
|
|
211
|
+
* Get per-table row counts and oldest-data timestamps for a user–provider pair.
|
|
212
|
+
*
|
|
213
|
+
* Returns an object with one entry per data table (activities, sleep, body,
|
|
214
|
+
* daily, nutrition, menstruation, plannedWorkouts). Each entry has a `count`
|
|
215
|
+
* and an `oldest` timestamp (ISO-8601 for time-series tables, YYYY-MM-DD for
|
|
216
|
+
* plannedWorkouts). `oldest` is `null` when the table has no rows.
|
|
217
|
+
*
|
|
218
|
+
* Stats are maintained automatically by ingest mutations, so this is an O(1)
|
|
219
|
+
* read regardless of how much data has been ingested.
|
|
220
|
+
*
|
|
221
|
+
* Returns `null` if the user has never connected to that provider.
|
|
222
|
+
*
|
|
223
|
+
* @param ctx - Query context from the host app
|
|
224
|
+
* @param args.userId - The host app's user identifier
|
|
225
|
+
* @param args.provider - The wearable provider name
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```ts
|
|
229
|
+
* const stats = await soma.getProviderStats(ctx, {
|
|
230
|
+
* userId: "user_123",
|
|
231
|
+
* provider: "GARMIN",
|
|
232
|
+
* });
|
|
233
|
+
* // { activities: { count: 1203, oldest: "2023-02-14T06:12:00Z" },
|
|
234
|
+
* // sleep: { count: 412, oldest: "2023-02-14T23:01:00Z" }, ... }
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
async getProviderStats(
|
|
238
|
+
ctx: QueryCtx,
|
|
239
|
+
args: { userId: string; provider: string },
|
|
240
|
+
) {
|
|
241
|
+
return await ctx.runQuery(this.component.public.getProviderStats, args);
|
|
242
|
+
}
|
|
243
|
+
|
|
210
244
|
/**
|
|
211
245
|
* List all connections for a user (active and inactive).
|
|
212
246
|
*
|
package/src/client/types.ts
CHANGED
|
@@ -167,8 +167,8 @@ export interface GarminWebhookItem {
|
|
|
167
167
|
connectionId: string;
|
|
168
168
|
/** The host app's user ID. */
|
|
169
169
|
userId: string;
|
|
170
|
-
/** The transformed data in Soma's normalized format. */
|
|
171
|
-
data: Record<string, unknown
|
|
170
|
+
/** The transformed data in Soma's normalized format, or null for terminal events like deregistration. */
|
|
171
|
+
data: Record<string, unknown> | null;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
/**
|
|
@@ -202,7 +202,8 @@ export type GarminWebhookEventName =
|
|
|
202
202
|
| "activities" | "activity-details" | "manually-updated-activities" | "move-iq"
|
|
203
203
|
| "blood-pressures" | "body-compositions" | "dailies" | "epochs"
|
|
204
204
|
| "health-snapshot" | "sleeps" | "hrv" | "stress" | "pulse-ox"
|
|
205
|
-
| "respiration" | "skin-temp" | "user-metrics" | "menstrual-cycle-tracking"
|
|
205
|
+
| "respiration" | "skin-temp" | "user-metrics" | "menstrual-cycle-tracking"
|
|
206
|
+
| "deregistration";
|
|
206
207
|
|
|
207
208
|
/** Handler for a specific webhook event or the catch-all `onEvent`. */
|
|
208
209
|
export type GarminWebhookHandler = (
|
|
@@ -17,6 +17,7 @@ import type * as garmin_schemas_activityDetails from "../garmin/schemas/activity
|
|
|
17
17
|
import type * as garmin_schemas_bloodPressure from "../garmin/schemas/bloodPressure.js";
|
|
18
18
|
import type * as garmin_schemas_bodyCompositions from "../garmin/schemas/bodyCompositions.js";
|
|
19
19
|
import type * as garmin_schemas_dailies from "../garmin/schemas/dailies.js";
|
|
20
|
+
import type * as garmin_schemas_deregistration from "../garmin/schemas/deregistration.js";
|
|
20
21
|
import type * as garmin_schemas_epochs from "../garmin/schemas/epochs.js";
|
|
21
22
|
import type * as garmin_schemas_healthSnapshot from "../garmin/schemas/healthSnapshot.js";
|
|
22
23
|
import type * as garmin_schemas_hrvSummary from "../garmin/schemas/hrvSummary.js";
|
|
@@ -114,6 +115,7 @@ const fullApi: ApiFromModules<{
|
|
|
114
115
|
"garmin/schemas/bloodPressure": typeof garmin_schemas_bloodPressure;
|
|
115
116
|
"garmin/schemas/bodyCompositions": typeof garmin_schemas_bodyCompositions;
|
|
116
117
|
"garmin/schemas/dailies": typeof garmin_schemas_dailies;
|
|
118
|
+
"garmin/schemas/deregistration": typeof garmin_schemas_deregistration;
|
|
117
119
|
"garmin/schemas/epochs": typeof garmin_schemas_epochs;
|
|
118
120
|
"garmin/schemas/healthSnapshot": typeof garmin_schemas_healthSnapshot;
|
|
119
121
|
"garmin/schemas/hrvSummary": typeof garmin_schemas_hrvSummary;
|
|
@@ -321,6 +321,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
321
321
|
any,
|
|
322
322
|
Name
|
|
323
323
|
>;
|
|
324
|
+
handleGarminWebhookDeregistration: FunctionReference<
|
|
325
|
+
"action",
|
|
326
|
+
"internal",
|
|
327
|
+
{ autoIngest?: boolean; payload: any },
|
|
328
|
+
any,
|
|
329
|
+
Name
|
|
330
|
+
>;
|
|
324
331
|
handleGarminWebhookEpochs: FunctionReference<
|
|
325
332
|
"action",
|
|
326
333
|
"internal",
|
|
@@ -866,6 +873,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
866
873
|
lastDataUpdate?: string;
|
|
867
874
|
provider: string;
|
|
868
875
|
providerUserId?: string;
|
|
876
|
+
stats?: {
|
|
877
|
+
activities: { count: number; oldest: string | null };
|
|
878
|
+
body: { count: number; oldest: string | null };
|
|
879
|
+
daily: { count: number; oldest: string | null };
|
|
880
|
+
menstruation: { count: number; oldest: string | null };
|
|
881
|
+
nutrition: { count: number; oldest: string | null };
|
|
882
|
+
plannedWorkouts: { count: number; oldest: string | null };
|
|
883
|
+
sleep: { count: number; oldest: string | null };
|
|
884
|
+
};
|
|
869
885
|
userId: string;
|
|
870
886
|
},
|
|
871
887
|
Name
|
|
@@ -881,6 +897,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
881
897
|
lastDataUpdate?: string;
|
|
882
898
|
provider: string;
|
|
883
899
|
providerUserId?: string;
|
|
900
|
+
stats?: {
|
|
901
|
+
activities: { count: number; oldest: string | null };
|
|
902
|
+
body: { count: number; oldest: string | null };
|
|
903
|
+
daily: { count: number; oldest: string | null };
|
|
904
|
+
menstruation: { count: number; oldest: string | null };
|
|
905
|
+
nutrition: { count: number; oldest: string | null };
|
|
906
|
+
plannedWorkouts: { count: number; oldest: string | null };
|
|
907
|
+
sleep: { count: number; oldest: string | null };
|
|
908
|
+
};
|
|
884
909
|
userId: string;
|
|
885
910
|
},
|
|
886
911
|
Name
|
|
@@ -892,6 +917,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
892
917
|
any,
|
|
893
918
|
Name
|
|
894
919
|
>;
|
|
920
|
+
getProviderStats: FunctionReference<
|
|
921
|
+
"query",
|
|
922
|
+
"internal",
|
|
923
|
+
{ provider: string; userId: string },
|
|
924
|
+
null | {
|
|
925
|
+
activities: { count: number; oldest: string | null };
|
|
926
|
+
body: { count: number; oldest: string | null };
|
|
927
|
+
daily: { count: number; oldest: string | null };
|
|
928
|
+
menstruation: { count: number; oldest: string | null };
|
|
929
|
+
nutrition: { count: number; oldest: string | null };
|
|
930
|
+
plannedWorkouts: { count: number; oldest: string | null };
|
|
931
|
+
sleep: { count: number; oldest: string | null };
|
|
932
|
+
},
|
|
933
|
+
Name
|
|
934
|
+
>;
|
|
895
935
|
ingestActivity: FunctionReference<
|
|
896
936
|
"mutation",
|
|
897
937
|
"internal",
|
|
@@ -2021,6 +2061,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2021
2061
|
lastDataUpdate?: string;
|
|
2022
2062
|
provider: string;
|
|
2023
2063
|
providerUserId?: string;
|
|
2064
|
+
stats?: {
|
|
2065
|
+
activities: { count: number; oldest: string | null };
|
|
2066
|
+
body: { count: number; oldest: string | null };
|
|
2067
|
+
daily: { count: number; oldest: string | null };
|
|
2068
|
+
menstruation: { count: number; oldest: string | null };
|
|
2069
|
+
nutrition: { count: number; oldest: string | null };
|
|
2070
|
+
plannedWorkouts: { count: number; oldest: string | null };
|
|
2071
|
+
sleep: { count: number; oldest: string | null };
|
|
2072
|
+
};
|
|
2024
2073
|
userId: string;
|
|
2025
2074
|
}>,
|
|
2026
2075
|
Name
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// Garmin POSTs `{ deregistrations: [ { userId, userAccessToken? } ] }` to the
|
|
4
|
+
// configured deregistration endpoint when a user revokes access at
|
|
5
|
+
// connect.garmin.com. We only need `userId` (Garmin's UUID) to look up the
|
|
6
|
+
// matching Soma connection.
|
|
7
|
+
export const garminDeregistrationPayloadSchema = z.object({
|
|
8
|
+
deregistrations: z.array(
|
|
9
|
+
z.object({
|
|
10
|
+
userId: z.string(),
|
|
11
|
+
userAccessToken: z.string().optional(),
|
|
12
|
+
}),
|
|
13
|
+
),
|
|
14
|
+
});
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
import { v } from "convex/values";
|
|
7
7
|
import { action, type ActionCtx } from "../_generated/server";
|
|
8
8
|
import { api, internal } from "../_generated/api";
|
|
9
|
+
import type { Doc } from "../_generated/dataModel";
|
|
9
10
|
import type { SomaError, WebhookResult } from "../validators/shared.js";
|
|
11
|
+
import { garminDeregistrationPayloadSchema } from "./schemas/deregistration.js";
|
|
10
12
|
import {
|
|
11
13
|
garminSkinTemperaturePingPayloadSchema,
|
|
12
14
|
garminSkinTemperaturePushPayloadSchema,
|
|
@@ -873,4 +875,86 @@ export const handleGarminWebhookRespiration = action({
|
|
|
873
875
|
);
|
|
874
876
|
return { errors: [], items: [] };
|
|
875
877
|
},
|
|
878
|
+
});
|
|
879
|
+
|
|
880
|
+
// Deregistration uses WebhookResult with nullable data (terminal event with no
|
|
881
|
+
// payload to ingest), mirroring Strava's athlete-deauthorize convention.
|
|
882
|
+
type GarminDeregistrationResult = WebhookResult<Record<string, unknown> | null>;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Handle a Garmin deregistration notification.
|
|
886
|
+
*
|
|
887
|
+
* Garmin POSTs this when a user revokes access at connect.garmin.com. We mirror
|
|
888
|
+
* Strava's `athlete-deauthorize`: clear stored tokens and mark the connection
|
|
889
|
+
* inactive. Proceeds even when the connection is already inactive (e.g. a user
|
|
890
|
+
* who deregisters after a prior in-app disconnect).
|
|
891
|
+
*/
|
|
892
|
+
export const handleGarminWebhookDeregistration = action({
|
|
893
|
+
args: { payload: v.any(), autoIngest: v.optional(v.boolean()) },
|
|
894
|
+
handler: async (ctx, args): Promise<GarminDeregistrationResult> => {
|
|
895
|
+
const shouldIngest = args.autoIngest !== false;
|
|
896
|
+
|
|
897
|
+
const parsed = garminDeregistrationPayloadSchema.safeParse(args.payload);
|
|
898
|
+
if (!parsed.success) {
|
|
899
|
+
console.warn(
|
|
900
|
+
`[garmin:webhook:deregistration] Payload did not match schema`,
|
|
901
|
+
);
|
|
902
|
+
return { errors: [], items: [] };
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
const errors: SomaError[] = [];
|
|
906
|
+
const items: GarminDeregistrationResult["items"] = [];
|
|
907
|
+
|
|
908
|
+
for (const entry of parsed.data.deregistrations) {
|
|
909
|
+
const garminUserId = entry.userId;
|
|
910
|
+
|
|
911
|
+
const connection: Doc<"connections"> | null = await ctx.runQuery(
|
|
912
|
+
internal.private.getConnectionByProviderUserId,
|
|
913
|
+
{ providerUserId: garminUserId, provider: "GARMIN" },
|
|
914
|
+
);
|
|
915
|
+
|
|
916
|
+
if (!connection) {
|
|
917
|
+
errors.push({
|
|
918
|
+
type: "deregistration",
|
|
919
|
+
id: garminUserId,
|
|
920
|
+
message:
|
|
921
|
+
`No Soma connection found for Garmin userId "${garminUserId}". ` +
|
|
922
|
+
"The user may have been disconnected already, or never finished OAuth.",
|
|
923
|
+
});
|
|
924
|
+
continue;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
if (shouldIngest) {
|
|
928
|
+
try {
|
|
929
|
+
await ctx.runMutation(internal.private.deleteTokens, {
|
|
930
|
+
connectionId: connection._id,
|
|
931
|
+
});
|
|
932
|
+
await ctx.runMutation(api.public.disconnect, {
|
|
933
|
+
userId: connection.userId,
|
|
934
|
+
provider: "GARMIN",
|
|
935
|
+
});
|
|
936
|
+
} catch (err) {
|
|
937
|
+
errors.push({
|
|
938
|
+
type: "deregistration",
|
|
939
|
+
id: garminUserId,
|
|
940
|
+
message: err instanceof Error ? err.message : String(err),
|
|
941
|
+
});
|
|
942
|
+
items.push({
|
|
943
|
+
connectionId: connection._id,
|
|
944
|
+
userId: connection.userId,
|
|
945
|
+
data: null,
|
|
946
|
+
});
|
|
947
|
+
continue;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
items.push({
|
|
952
|
+
connectionId: connection._id,
|
|
953
|
+
userId: connection.userId,
|
|
954
|
+
data: null,
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
return { errors, items };
|
|
959
|
+
},
|
|
876
960
|
});
|