@nativesquare/soma 0.16.3 → 0.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/healthkit.d.ts +1 -1
- package/dist/client/healthkit.js +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/component/_generated/component.d.ts +123 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/healthkit/public.d.ts +1 -1
- package/dist/component/healthkit/public.js +3 -3
- package/dist/component/healthkit/public.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 +17 -1
- package/dist/component/validators/connection.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/healthkit.ts +1 -1
- package/src/client/index.ts +34 -0
- package/src/component/_generated/component.ts +42 -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 +19 -1
|
@@ -3,6 +3,36 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
3
3
|
providerUserId?: string | undefined;
|
|
4
4
|
active?: boolean | undefined;
|
|
5
5
|
lastDataUpdate?: string | undefined;
|
|
6
|
+
stats?: {
|
|
7
|
+
body: {
|
|
8
|
+
count: number;
|
|
9
|
+
oldest: string | null;
|
|
10
|
+
};
|
|
11
|
+
daily: {
|
|
12
|
+
count: number;
|
|
13
|
+
oldest: string | null;
|
|
14
|
+
};
|
|
15
|
+
menstruation: {
|
|
16
|
+
count: number;
|
|
17
|
+
oldest: string | null;
|
|
18
|
+
};
|
|
19
|
+
sleep: {
|
|
20
|
+
count: number;
|
|
21
|
+
oldest: string | null;
|
|
22
|
+
};
|
|
23
|
+
activities: {
|
|
24
|
+
count: number;
|
|
25
|
+
oldest: string | null;
|
|
26
|
+
};
|
|
27
|
+
nutrition: {
|
|
28
|
+
count: number;
|
|
29
|
+
oldest: string | null;
|
|
30
|
+
};
|
|
31
|
+
plannedWorkouts: {
|
|
32
|
+
count: number;
|
|
33
|
+
oldest: string | null;
|
|
34
|
+
};
|
|
35
|
+
} | undefined;
|
|
6
36
|
userId: string;
|
|
7
37
|
provider: string;
|
|
8
38
|
}, {
|
|
@@ -11,7 +41,87 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
11
41
|
providerUserId: import("convex/values").VString<string | undefined, "optional">;
|
|
12
42
|
active: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
13
43
|
lastDataUpdate: import("convex/values").VString<string | undefined, "optional">;
|
|
14
|
-
|
|
44
|
+
stats: import("convex/values").VObject<{
|
|
45
|
+
body: {
|
|
46
|
+
count: number;
|
|
47
|
+
oldest: string | null;
|
|
48
|
+
};
|
|
49
|
+
daily: {
|
|
50
|
+
count: number;
|
|
51
|
+
oldest: string | null;
|
|
52
|
+
};
|
|
53
|
+
menstruation: {
|
|
54
|
+
count: number;
|
|
55
|
+
oldest: string | null;
|
|
56
|
+
};
|
|
57
|
+
sleep: {
|
|
58
|
+
count: number;
|
|
59
|
+
oldest: string | null;
|
|
60
|
+
};
|
|
61
|
+
activities: {
|
|
62
|
+
count: number;
|
|
63
|
+
oldest: string | null;
|
|
64
|
+
};
|
|
65
|
+
nutrition: {
|
|
66
|
+
count: number;
|
|
67
|
+
oldest: string | null;
|
|
68
|
+
};
|
|
69
|
+
plannedWorkouts: {
|
|
70
|
+
count: number;
|
|
71
|
+
oldest: string | null;
|
|
72
|
+
};
|
|
73
|
+
} | undefined, {
|
|
74
|
+
activities: import("convex/values").VObject<{
|
|
75
|
+
count: number;
|
|
76
|
+
oldest: string | null;
|
|
77
|
+
}, {
|
|
78
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
79
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
80
|
+
}, "required", "count" | "oldest">;
|
|
81
|
+
sleep: import("convex/values").VObject<{
|
|
82
|
+
count: number;
|
|
83
|
+
oldest: string | null;
|
|
84
|
+
}, {
|
|
85
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
86
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
87
|
+
}, "required", "count" | "oldest">;
|
|
88
|
+
body: import("convex/values").VObject<{
|
|
89
|
+
count: number;
|
|
90
|
+
oldest: string | null;
|
|
91
|
+
}, {
|
|
92
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
93
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
94
|
+
}, "required", "count" | "oldest">;
|
|
95
|
+
daily: import("convex/values").VObject<{
|
|
96
|
+
count: number;
|
|
97
|
+
oldest: string | null;
|
|
98
|
+
}, {
|
|
99
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
100
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
101
|
+
}, "required", "count" | "oldest">;
|
|
102
|
+
nutrition: import("convex/values").VObject<{
|
|
103
|
+
count: number;
|
|
104
|
+
oldest: string | null;
|
|
105
|
+
}, {
|
|
106
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
107
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
108
|
+
}, "required", "count" | "oldest">;
|
|
109
|
+
menstruation: import("convex/values").VObject<{
|
|
110
|
+
count: number;
|
|
111
|
+
oldest: string | null;
|
|
112
|
+
}, {
|
|
113
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
114
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
115
|
+
}, "required", "count" | "oldest">;
|
|
116
|
+
plannedWorkouts: import("convex/values").VObject<{
|
|
117
|
+
count: number;
|
|
118
|
+
oldest: string | null;
|
|
119
|
+
}, {
|
|
120
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
121
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
122
|
+
}, "required", "count" | "oldest">;
|
|
123
|
+
}, "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">;
|
|
124
|
+
}, "required", "userId" | "provider" | "providerUserId" | "active" | "lastDataUpdate" | "stats" | "stats.body" | "stats.daily" | "stats.menstruation" | "stats.sleep" | "stats.activities" | "stats.nutrition" | "stats.plannedWorkouts" | "stats.body.count" | "stats.body.oldest" | "stats.daily.count" | "stats.daily.oldest" | "stats.menstruation.count" | "stats.menstruation.oldest" | "stats.sleep.count" | "stats.sleep.oldest" | "stats.activities.count" | "stats.activities.oldest" | "stats.nutrition.count" | "stats.nutrition.oldest" | "stats.plannedWorkouts.count" | "stats.plannedWorkouts.oldest">, {
|
|
15
125
|
by_userId: ["userId", "_creationTime"];
|
|
16
126
|
by_provider: ["provider", "_creationTime"];
|
|
17
127
|
by_userId_provider: ["userId", "provider", "_creationTime"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,wBAqHG"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MutationCtx } from "./_generated/server.js";
|
|
2
|
+
import type { Id } from "./_generated/dataModel.js";
|
|
1
3
|
/**
|
|
2
4
|
* Normalized result from any provider's OAuth refresh-token call.
|
|
3
5
|
* Each provider's `refreshToken` maps its raw API response into this shape.
|
|
@@ -12,4 +14,29 @@ export interface OAuthRefreshResult {
|
|
|
12
14
|
* Generate a random state parameter for CSRF protection.
|
|
13
15
|
*/
|
|
14
16
|
export declare function generateState(): string;
|
|
17
|
+
export type StatsTable = "activities" | "sleep" | "body" | "daily" | "nutrition" | "menstruation" | "plannedWorkouts";
|
|
18
|
+
export interface StatsEntry {
|
|
19
|
+
count: number;
|
|
20
|
+
oldest: string | null;
|
|
21
|
+
}
|
|
22
|
+
export type ConnectionStats = Record<StatsTable, StatsEntry>;
|
|
23
|
+
export declare function defaultStats(): ConnectionStats;
|
|
24
|
+
/**
|
|
25
|
+
* Fill in any missing sub-objects with zeroed defaults so callers always
|
|
26
|
+
* see every table key populated.
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeStats(stats: Partial<ConnectionStats> | undefined): ConnectionStats;
|
|
29
|
+
/**
|
|
30
|
+
* Update the denormalized stats on a connection after an ingest mutation.
|
|
31
|
+
*
|
|
32
|
+
* On a new insert: increment `count` and min-check `oldest`.
|
|
33
|
+
* On an upsert (existing row): only min-check `oldest` — in case the provider
|
|
34
|
+
* supplied an earlier `start_time` than what was first ingested.
|
|
35
|
+
*
|
|
36
|
+
* No-ops if the connection row is missing, so ingests remain resilient against
|
|
37
|
+
* dangling connectionIds. Safe under concurrent ingests: Convex mutations are
|
|
38
|
+
* serializable (OCC with retry), so parallel patches on the same connection
|
|
39
|
+
* do not race.
|
|
40
|
+
*/
|
|
41
|
+
export declare function updateStatsOnIngest(ctx: MutationCtx, connectionId: Id<"connections">, table: StatsTable, oldestCandidate: string | undefined, isNewInsert: boolean): Promise<void>;
|
|
15
42
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/component/utils.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAItC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/component/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAItC;AAID,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,OAAO,GACP,MAAM,GACN,OAAO,GACP,WAAW,GACX,cAAc,GACd,iBAAiB,CAAC;AAEtB,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAY7D,wBAAgB,YAAY,IAAI,eAAe,CAU9C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,GAC1C,eAAe,CAQjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,WAAW,EAChB,YAAY,EAAE,EAAE,CAAC,aAAa,CAAC,EAC/B,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,IAAI,CAAC,CAef"}
|
package/dist/component/utils.js
CHANGED
|
@@ -8,4 +8,68 @@ export function generateState() {
|
|
|
8
8
|
crypto.getRandomValues(bytes);
|
|
9
9
|
return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
10
10
|
}
|
|
11
|
+
const STATS_TABLES = [
|
|
12
|
+
"activities",
|
|
13
|
+
"sleep",
|
|
14
|
+
"body",
|
|
15
|
+
"daily",
|
|
16
|
+
"nutrition",
|
|
17
|
+
"menstruation",
|
|
18
|
+
"plannedWorkouts",
|
|
19
|
+
];
|
|
20
|
+
export function defaultStats() {
|
|
21
|
+
return {
|
|
22
|
+
activities: { count: 0, oldest: null },
|
|
23
|
+
sleep: { count: 0, oldest: null },
|
|
24
|
+
body: { count: 0, oldest: null },
|
|
25
|
+
daily: { count: 0, oldest: null },
|
|
26
|
+
nutrition: { count: 0, oldest: null },
|
|
27
|
+
menstruation: { count: 0, oldest: null },
|
|
28
|
+
plannedWorkouts: { count: 0, oldest: null },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Fill in any missing sub-objects with zeroed defaults so callers always
|
|
33
|
+
* see every table key populated.
|
|
34
|
+
*/
|
|
35
|
+
export function normalizeStats(stats) {
|
|
36
|
+
const base = defaultStats();
|
|
37
|
+
if (!stats)
|
|
38
|
+
return base;
|
|
39
|
+
for (const t of STATS_TABLES) {
|
|
40
|
+
const entry = stats[t];
|
|
41
|
+
if (entry)
|
|
42
|
+
base[t] = { count: entry.count, oldest: entry.oldest };
|
|
43
|
+
}
|
|
44
|
+
return base;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Update the denormalized stats on a connection after an ingest mutation.
|
|
48
|
+
*
|
|
49
|
+
* On a new insert: increment `count` and min-check `oldest`.
|
|
50
|
+
* On an upsert (existing row): only min-check `oldest` — in case the provider
|
|
51
|
+
* supplied an earlier `start_time` than what was first ingested.
|
|
52
|
+
*
|
|
53
|
+
* No-ops if the connection row is missing, so ingests remain resilient against
|
|
54
|
+
* dangling connectionIds. Safe under concurrent ingests: Convex mutations are
|
|
55
|
+
* serializable (OCC with retry), so parallel patches on the same connection
|
|
56
|
+
* do not race.
|
|
57
|
+
*/
|
|
58
|
+
export async function updateStatsOnIngest(ctx, connectionId, table, oldestCandidate, isNewInsert) {
|
|
59
|
+
const connection = await ctx.db.get(connectionId);
|
|
60
|
+
if (!connection)
|
|
61
|
+
return;
|
|
62
|
+
const next = normalizeStats(connection.stats);
|
|
63
|
+
const sub = { ...next[table] };
|
|
64
|
+
if (isNewInsert)
|
|
65
|
+
sub.count += 1;
|
|
66
|
+
if (oldestCandidate !== undefined) {
|
|
67
|
+
sub.oldest =
|
|
68
|
+
sub.oldest === null || oldestCandidate < sub.oldest
|
|
69
|
+
? oldestCandidate
|
|
70
|
+
: sub.oldest;
|
|
71
|
+
}
|
|
72
|
+
next[table] = sub;
|
|
73
|
+
await ctx.db.patch(connectionId, { stats: next });
|
|
74
|
+
}
|
|
11
75
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/component/utils.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/component/utils.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAgB9E;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5E,CAAC;AAoBD,MAAM,YAAY,GAA0B;IAC1C,YAAY;IACZ,OAAO;IACP,MAAM;IACN,OAAO;IACP,WAAW;IACX,cAAc;IACd,iBAAiB;CAClB,CAAC;AAEF,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EA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IAC9C,MAAM,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IAC/B,IAAI,WAAW;QAAE,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;IAChC,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAClC,GAAG,CAAC,MAAM;YACR,GAAG,CAAC,MAAM,KAAK,IAAI,IAAI,eAAe,GAAG,GAAG,CAAC,MAAM;gBACjD,CAAC,CAAC,eAAe;gBACjB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;IAClB,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,8 +1,168 @@
|
|
|
1
|
+
export declare const statsValidator: import("convex/values").VObject<{
|
|
2
|
+
body: {
|
|
3
|
+
count: number;
|
|
4
|
+
oldest: string | null;
|
|
5
|
+
};
|
|
6
|
+
daily: {
|
|
7
|
+
count: number;
|
|
8
|
+
oldest: string | null;
|
|
9
|
+
};
|
|
10
|
+
menstruation: {
|
|
11
|
+
count: number;
|
|
12
|
+
oldest: string | null;
|
|
13
|
+
};
|
|
14
|
+
sleep: {
|
|
15
|
+
count: number;
|
|
16
|
+
oldest: string | null;
|
|
17
|
+
};
|
|
18
|
+
activities: {
|
|
19
|
+
count: number;
|
|
20
|
+
oldest: string | null;
|
|
21
|
+
};
|
|
22
|
+
nutrition: {
|
|
23
|
+
count: number;
|
|
24
|
+
oldest: string | null;
|
|
25
|
+
};
|
|
26
|
+
plannedWorkouts: {
|
|
27
|
+
count: number;
|
|
28
|
+
oldest: string | null;
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
activities: import("convex/values").VObject<{
|
|
32
|
+
count: number;
|
|
33
|
+
oldest: string | null;
|
|
34
|
+
}, {
|
|
35
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
36
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
37
|
+
}, "required", "count" | "oldest">;
|
|
38
|
+
sleep: import("convex/values").VObject<{
|
|
39
|
+
count: number;
|
|
40
|
+
oldest: string | null;
|
|
41
|
+
}, {
|
|
42
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
43
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
44
|
+
}, "required", "count" | "oldest">;
|
|
45
|
+
body: import("convex/values").VObject<{
|
|
46
|
+
count: number;
|
|
47
|
+
oldest: string | null;
|
|
48
|
+
}, {
|
|
49
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
50
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
51
|
+
}, "required", "count" | "oldest">;
|
|
52
|
+
daily: import("convex/values").VObject<{
|
|
53
|
+
count: number;
|
|
54
|
+
oldest: string | null;
|
|
55
|
+
}, {
|
|
56
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
57
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
58
|
+
}, "required", "count" | "oldest">;
|
|
59
|
+
nutrition: import("convex/values").VObject<{
|
|
60
|
+
count: number;
|
|
61
|
+
oldest: string | null;
|
|
62
|
+
}, {
|
|
63
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
64
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
65
|
+
}, "required", "count" | "oldest">;
|
|
66
|
+
menstruation: import("convex/values").VObject<{
|
|
67
|
+
count: number;
|
|
68
|
+
oldest: string | null;
|
|
69
|
+
}, {
|
|
70
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
71
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
72
|
+
}, "required", "count" | "oldest">;
|
|
73
|
+
plannedWorkouts: import("convex/values").VObject<{
|
|
74
|
+
count: number;
|
|
75
|
+
oldest: string | null;
|
|
76
|
+
}, {
|
|
77
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
78
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
79
|
+
}, "required", "count" | "oldest">;
|
|
80
|
+
}, "required", "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">;
|
|
1
81
|
export declare const connectionValidator: {
|
|
2
82
|
userId: import("convex/values").VString<string, "required">;
|
|
3
83
|
provider: import("convex/values").VString<string, "required">;
|
|
4
84
|
providerUserId: import("convex/values").VString<string | undefined, "optional">;
|
|
5
85
|
active: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
6
86
|
lastDataUpdate: import("convex/values").VString<string | undefined, "optional">;
|
|
87
|
+
stats: import("convex/values").VObject<{
|
|
88
|
+
body: {
|
|
89
|
+
count: number;
|
|
90
|
+
oldest: string | null;
|
|
91
|
+
};
|
|
92
|
+
daily: {
|
|
93
|
+
count: number;
|
|
94
|
+
oldest: string | null;
|
|
95
|
+
};
|
|
96
|
+
menstruation: {
|
|
97
|
+
count: number;
|
|
98
|
+
oldest: string | null;
|
|
99
|
+
};
|
|
100
|
+
sleep: {
|
|
101
|
+
count: number;
|
|
102
|
+
oldest: string | null;
|
|
103
|
+
};
|
|
104
|
+
activities: {
|
|
105
|
+
count: number;
|
|
106
|
+
oldest: string | null;
|
|
107
|
+
};
|
|
108
|
+
nutrition: {
|
|
109
|
+
count: number;
|
|
110
|
+
oldest: string | null;
|
|
111
|
+
};
|
|
112
|
+
plannedWorkouts: {
|
|
113
|
+
count: number;
|
|
114
|
+
oldest: string | null;
|
|
115
|
+
};
|
|
116
|
+
} | undefined, {
|
|
117
|
+
activities: import("convex/values").VObject<{
|
|
118
|
+
count: number;
|
|
119
|
+
oldest: string | null;
|
|
120
|
+
}, {
|
|
121
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
122
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
123
|
+
}, "required", "count" | "oldest">;
|
|
124
|
+
sleep: import("convex/values").VObject<{
|
|
125
|
+
count: number;
|
|
126
|
+
oldest: string | null;
|
|
127
|
+
}, {
|
|
128
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
129
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
130
|
+
}, "required", "count" | "oldest">;
|
|
131
|
+
body: import("convex/values").VObject<{
|
|
132
|
+
count: number;
|
|
133
|
+
oldest: string | null;
|
|
134
|
+
}, {
|
|
135
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
136
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
137
|
+
}, "required", "count" | "oldest">;
|
|
138
|
+
daily: import("convex/values").VObject<{
|
|
139
|
+
count: number;
|
|
140
|
+
oldest: string | null;
|
|
141
|
+
}, {
|
|
142
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
143
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
144
|
+
}, "required", "count" | "oldest">;
|
|
145
|
+
nutrition: import("convex/values").VObject<{
|
|
146
|
+
count: number;
|
|
147
|
+
oldest: string | null;
|
|
148
|
+
}, {
|
|
149
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
150
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
151
|
+
}, "required", "count" | "oldest">;
|
|
152
|
+
menstruation: import("convex/values").VObject<{
|
|
153
|
+
count: number;
|
|
154
|
+
oldest: string | null;
|
|
155
|
+
}, {
|
|
156
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
157
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
158
|
+
}, "required", "count" | "oldest">;
|
|
159
|
+
plannedWorkouts: import("convex/values").VObject<{
|
|
160
|
+
count: number;
|
|
161
|
+
oldest: string | null;
|
|
162
|
+
}, {
|
|
163
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
164
|
+
oldest: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
165
|
+
}, "required", "count" | "oldest">;
|
|
166
|
+
}, "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">;
|
|
7
167
|
};
|
|
8
168
|
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../src/component/validators/connection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../src/component/validators/connection.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qYAQzB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc/B,CAAC"}
|
|
@@ -3,10 +3,23 @@ import { v } from "convex/values";
|
|
|
3
3
|
// Represents a link between a host app user and a wearable provider.
|
|
4
4
|
// Provider-agnostic: Soma doesn't care if data comes via Terra, direct API, etc.
|
|
5
5
|
// One document per user-provider pair.
|
|
6
|
+
const statsEntryValidator = v.object({
|
|
7
|
+
count: v.number(),
|
|
8
|
+
oldest: v.union(v.string(), v.null()),
|
|
9
|
+
});
|
|
10
|
+
export const statsValidator = v.object({
|
|
11
|
+
activities: statsEntryValidator,
|
|
12
|
+
sleep: statsEntryValidator,
|
|
13
|
+
body: statsEntryValidator,
|
|
14
|
+
daily: statsEntryValidator,
|
|
15
|
+
nutrition: statsEntryValidator,
|
|
16
|
+
menstruation: statsEntryValidator,
|
|
17
|
+
plannedWorkouts: statsEntryValidator,
|
|
18
|
+
});
|
|
6
19
|
export const connectionValidator = {
|
|
7
20
|
// Host app's user identifier (their user ID, Clerk ID, etc.)
|
|
8
21
|
userId: v.string(),
|
|
9
|
-
// The wearable provider: "FITBIT", "GARMIN", "
|
|
22
|
+
// The wearable provider: "FITBIT", "GARMIN", "HEALTHKIT", "OURA", etc.
|
|
10
23
|
provider: v.string(),
|
|
11
24
|
// The provider's external user ID (e.g. Garmin's userId for webhook mapping)
|
|
12
25
|
providerUserId: v.optional(v.string()),
|
|
@@ -14,5 +27,8 @@ export const connectionValidator = {
|
|
|
14
27
|
active: v.optional(v.boolean()),
|
|
15
28
|
// ISO-8601 timestamp of last data update
|
|
16
29
|
lastDataUpdate: v.optional(v.string()),
|
|
30
|
+
// Per-table denormalized counters maintained by ingest mutations.
|
|
31
|
+
// `oldest` is the earliest metadata.start_time (or planned_date) observed.
|
|
32
|
+
stats: v.optional(statsValidator),
|
|
17
33
|
};
|
|
18
34
|
//# sourceMappingURL=connection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/component/validators/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,gFAAgF;AAChF,qEAAqE;AACrE,iFAAiF;AACjF,uCAAuC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,6DAA6D;IAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/component/validators/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,gFAAgF;AAChF,qEAAqE;AACrE,iFAAiF;AACjF,uCAAuC;AACvC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;CACtC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,mBAAmB;IAC/B,KAAK,EAAE,mBAAmB;IAC1B,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,YAAY,EAAE,mBAAmB;IACjC,eAAe,EAAE,mBAAmB;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,6DAA6D;IAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,uEAAuE;IACvE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,6EAA6E;IAC7E,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,mCAAmC;IACnC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC/B,yCAAyC;IACzC,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,kEAAkE;IAClE,2EAA2E;IAC3E,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;CAClC,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,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64
|
*
|
|
65
65
|
* Call this once after the React Native HealthKit library confirms
|
|
66
|
-
* permissions were granted. Creates the
|
|
66
|
+
* permissions were granted. Creates the HEALTHKIT connection if missing,
|
|
67
67
|
* or re-activates it if previously disconnected. Idempotent.
|
|
68
68
|
*
|
|
69
69
|
* @param ctx - Mutation context from the host app
|