@nativesquare/soma 0.16.4 → 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.
@@ -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":"AAMA,eAAO,MAAM,mBAAmB;;;;;;CAW/B,CAAC"}
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,6 +3,19 @@ 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(),
@@ -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,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;CACvC,CAAC"}
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"}
@@ -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">;
@@ -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,SAA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AAI5E,YAAY,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,SAAS,GACV,CAAC"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "bugs": {
7
7
  "url": "https://github.com/NativeSquare/soma/issues"
8
8
  },
9
- "version": "0.16.4",
9
+ "version": "0.16.5",
10
10
  "license": "Apache-2.0",
11
11
  "keywords": [
12
12
  "convex",
@@ -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
  *
@@ -866,6 +866,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
866
866
  lastDataUpdate?: string;
867
867
  provider: string;
868
868
  providerUserId?: string;
869
+ stats?: {
870
+ activities: { count: number; oldest: string | null };
871
+ body: { count: number; oldest: string | null };
872
+ daily: { count: number; oldest: string | null };
873
+ menstruation: { count: number; oldest: string | null };
874
+ nutrition: { count: number; oldest: string | null };
875
+ plannedWorkouts: { count: number; oldest: string | null };
876
+ sleep: { count: number; oldest: string | null };
877
+ };
869
878
  userId: string;
870
879
  },
871
880
  Name
@@ -881,6 +890,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
881
890
  lastDataUpdate?: string;
882
891
  provider: string;
883
892
  providerUserId?: string;
893
+ stats?: {
894
+ activities: { count: number; oldest: string | null };
895
+ body: { count: number; oldest: string | null };
896
+ daily: { count: number; oldest: string | null };
897
+ menstruation: { count: number; oldest: string | null };
898
+ nutrition: { count: number; oldest: string | null };
899
+ plannedWorkouts: { count: number; oldest: string | null };
900
+ sleep: { count: number; oldest: string | null };
901
+ };
884
902
  userId: string;
885
903
  },
886
904
  Name
@@ -892,6 +910,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
892
910
  any,
893
911
  Name
894
912
  >;
913
+ getProviderStats: FunctionReference<
914
+ "query",
915
+ "internal",
916
+ { provider: string; userId: string },
917
+ null | {
918
+ activities: { count: number; oldest: string | null };
919
+ body: { count: number; oldest: string | null };
920
+ daily: { count: number; oldest: string | null };
921
+ menstruation: { count: number; oldest: string | null };
922
+ nutrition: { count: number; oldest: string | null };
923
+ plannedWorkouts: { count: number; oldest: string | null };
924
+ sleep: { count: number; oldest: string | null };
925
+ },
926
+ Name
927
+ >;
895
928
  ingestActivity: FunctionReference<
896
929
  "mutation",
897
930
  "internal",
@@ -2021,6 +2054,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
2021
2054
  lastDataUpdate?: string;
2022
2055
  provider: string;
2023
2056
  providerUserId?: string;
2057
+ stats?: {
2058
+ activities: { count: number; oldest: string | null };
2059
+ body: { count: number; oldest: string | null };
2060
+ daily: { count: number; oldest: string | null };
2061
+ menstruation: { count: number; oldest: string | null };
2062
+ nutrition: { count: number; oldest: string | null };
2063
+ plannedWorkouts: { count: number; oldest: string | null };
2064
+ sleep: { count: number; oldest: string | null };
2065
+ };
2024
2066
  userId: string;
2025
2067
  }>,
2026
2068
  Name