@nativesquare/soma 0.12.0 → 0.13.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/garmin.d.ts +5 -1
- package/dist/client/garmin.d.ts.map +1 -1
- package/dist/client/garmin.js +148 -0
- package/dist/client/garmin.js.map +1 -1
- package/dist/client/index.d.ts +5 -6
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +5 -211
- package/dist/client/index.js.map +1 -1
- package/dist/client/strava.d.ts +11 -6
- package/dist/client/strava.d.ts.map +1 -1
- package/dist/client/strava.js +64 -0
- package/dist/client/strava.js.map +1 -1
- package/dist/client/types.d.ts +93 -20
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/component.d.ts +24 -5
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/garmin/private.d.ts +53 -68
- package/dist/component/garmin/private.d.ts.map +1 -1
- package/dist/component/garmin/private.js +87 -85
- package/dist/component/garmin/private.js.map +1 -1
- package/dist/component/garmin/public.d.ts +97 -43
- package/dist/component/garmin/public.d.ts.map +1 -1
- package/dist/component/garmin/public.js +75 -51
- package/dist/component/garmin/public.js.map +1 -1
- package/dist/component/garmin/webhooks.d.ts +22 -20
- package/dist/component/garmin/webhooks.d.ts.map +1 -1
- package/dist/component/garmin/webhooks.js +115 -76
- package/dist/component/garmin/webhooks.js.map +1 -1
- package/dist/component/public.d.ts +15 -15
- package/dist/component/schema.d.ts +25 -25
- package/dist/component/strava/public.d.ts +12 -8
- package/dist/component/strava/public.d.ts.map +1 -1
- package/dist/component/strava/public.js +7 -7
- package/dist/component/strava/public.js.map +1 -1
- package/dist/component/validators/activity.d.ts +4 -4
- package/dist/component/validators/body.d.ts +4 -4
- package/dist/component/validators/daily.d.ts +4 -4
- package/dist/component/validators/nutrition.d.ts +3 -3
- package/dist/component/validators/samples.d.ts +4 -4
- package/dist/component/validators/shared.d.ts +13 -4
- package/dist/component/validators/shared.d.ts.map +1 -1
- package/dist/component/validators/shared.js +7 -0
- package/dist/component/validators/shared.js.map +1 -1
- package/dist/component/validators/sleep.d.ts +5 -5
- package/dist/validators.d.ts +41 -40
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +1 -0
- package/dist/validators.js.map +1 -1
- package/package.json +1 -1
- package/src/client/garmin.ts +692 -487
- package/src/client/index.ts +10 -279
- package/src/client/strava.ts +199 -108
- package/src/client/types.ts +303 -215
- package/src/component/_generated/component.ts +19 -19
- package/src/component/garmin/private.ts +1872 -1870
- package/src/component/garmin/public.ts +104 -80
- package/src/component/garmin/webhooks.ts +122 -81
- package/src/component/strava/public.ts +393 -393
- package/src/component/validators/shared.ts +9 -0
- package/src/validators.ts +1 -0
|
@@ -1,131 +1,133 @@
|
|
|
1
|
+
/** Shape returned by every public webhook handler action to the HTTP layer. */
|
|
1
2
|
type WebhookResult = {
|
|
2
|
-
processed: number;
|
|
3
3
|
errors: Array<{
|
|
4
4
|
type: string;
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
6
|
+
message: string;
|
|
7
7
|
}>;
|
|
8
|
-
|
|
9
|
-
userId: string;
|
|
8
|
+
items: Array<{
|
|
10
9
|
connectionId: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
data: Record<string, unknown>;
|
|
11
12
|
}>;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* Handle a webhook for Garmin activities (push or ping mode).
|
|
15
16
|
*/
|
|
16
17
|
export declare const handleGarminWebhookActivities: import("convex/server").RegisteredAction<"public", {
|
|
18
|
+
autoIngest?: boolean | undefined;
|
|
17
19
|
payload: any;
|
|
18
20
|
}, Promise<WebhookResult>>;
|
|
19
21
|
/**
|
|
20
22
|
* Handle a webhook for Garmin activity details (push or ping mode).
|
|
21
23
|
*/
|
|
22
24
|
export declare const handleGarminWebhookActivityDetails: import("convex/server").RegisteredAction<"public", {
|
|
25
|
+
autoIngest?: boolean | undefined;
|
|
23
26
|
payload: any;
|
|
24
27
|
}, Promise<WebhookResult>>;
|
|
25
28
|
/**
|
|
26
29
|
* Handle a webhook for Garmin manually updated activities (push or ping mode).
|
|
27
30
|
*/
|
|
28
31
|
export declare const handleGarminWebhookManuallyUpdatedActivities: import("convex/server").RegisteredAction<"public", {
|
|
32
|
+
autoIngest?: boolean | undefined;
|
|
29
33
|
payload: any;
|
|
30
34
|
}, Promise<WebhookResult>>;
|
|
31
35
|
/**
|
|
32
36
|
* Handle a webhook for Garmin Move IQ auto-detected activities (push or ping mode).
|
|
33
37
|
*/
|
|
34
38
|
export declare const handleGarminWebhookMoveIQ: import("convex/server").RegisteredAction<"public", {
|
|
39
|
+
autoIngest?: boolean | undefined;
|
|
35
40
|
payload: any;
|
|
36
41
|
}, Promise<WebhookResult>>;
|
|
37
42
|
/**
|
|
38
43
|
* Handle a webhook for Garmin blood pressure summaries (push or ping mode).
|
|
39
44
|
*/
|
|
40
45
|
export declare const handleGarminWebhookBloodPressures: import("convex/server").RegisteredAction<"public", {
|
|
46
|
+
autoIngest?: boolean | undefined;
|
|
41
47
|
payload: any;
|
|
42
48
|
}, Promise<WebhookResult>>;
|
|
43
49
|
/**
|
|
44
50
|
* Handle a webhook for Garmin body composition summaries (push or ping mode).
|
|
45
51
|
*/
|
|
46
52
|
export declare const handleGarminWebhookBodyCompositions: import("convex/server").RegisteredAction<"public", {
|
|
53
|
+
autoIngest?: boolean | undefined;
|
|
47
54
|
payload: any;
|
|
48
55
|
}, Promise<WebhookResult>>;
|
|
49
56
|
/**
|
|
50
57
|
* Handle a webhook for Garmin daily summaries (push or ping mode).
|
|
51
58
|
*/
|
|
52
59
|
export declare const handleGarminWebhookDailies: import("convex/server").RegisteredAction<"public", {
|
|
60
|
+
autoIngest?: boolean | undefined;
|
|
53
61
|
payload: any;
|
|
54
62
|
}, Promise<WebhookResult>>;
|
|
55
63
|
/**
|
|
56
64
|
* Handle a webhook for Garmin epoch summaries (push or ping mode).
|
|
57
65
|
*/
|
|
58
66
|
export declare const handleGarminWebhookEpochs: import("convex/server").RegisteredAction<"public", {
|
|
67
|
+
autoIngest?: boolean | undefined;
|
|
59
68
|
payload: any;
|
|
60
69
|
}, Promise<WebhookResult>>;
|
|
61
70
|
/**
|
|
62
71
|
* Handle a webhook for Garmin health snapshot summaries (push or ping mode).
|
|
63
72
|
*/
|
|
64
73
|
export declare const handleGarminWebhookHealthSnapshot: import("convex/server").RegisteredAction<"public", {
|
|
74
|
+
autoIngest?: boolean | undefined;
|
|
65
75
|
payload: any;
|
|
66
76
|
}, Promise<WebhookResult>>;
|
|
67
77
|
/**
|
|
68
78
|
* Handle a webhook for Garmin sleep summaries (push or ping mode).
|
|
69
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
70
|
-
* to internal actions for processing.
|
|
71
79
|
*/
|
|
72
80
|
export declare const handleGarminWebhookSleeps: import("convex/server").RegisteredAction<"public", {
|
|
81
|
+
autoIngest?: boolean | undefined;
|
|
73
82
|
payload: any;
|
|
74
83
|
}, Promise<WebhookResult>>;
|
|
75
84
|
/**
|
|
76
85
|
* Handle a webhook for Garmin skin temperature summaries (push or ping mode).
|
|
77
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
78
|
-
* to internal actions for processing.
|
|
79
86
|
*/
|
|
80
87
|
export declare const handleGarminWebhookSkinTemp: import("convex/server").RegisteredAction<"public", {
|
|
88
|
+
autoIngest?: boolean | undefined;
|
|
81
89
|
payload: any;
|
|
82
90
|
}, Promise<WebhookResult>>;
|
|
83
91
|
/**
|
|
84
92
|
* Handle a webhook for Garmin user metrics (push or ping mode).
|
|
85
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
86
|
-
* to internal actions for processing.
|
|
87
93
|
*/
|
|
88
94
|
export declare const handleGarminWebhookUserMetrics: import("convex/server").RegisteredAction<"public", {
|
|
95
|
+
autoIngest?: boolean | undefined;
|
|
89
96
|
payload: any;
|
|
90
97
|
}, Promise<WebhookResult>>;
|
|
91
98
|
/**
|
|
92
99
|
* Handle a webhook for Garmin menstrual cycle tracking (push or ping mode).
|
|
93
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
94
|
-
* to internal actions for processing.
|
|
95
100
|
*/
|
|
96
101
|
export declare const handleGarminWebhookMenstrualCycleTracking: import("convex/server").RegisteredAction<"public", {
|
|
102
|
+
autoIngest?: boolean | undefined;
|
|
97
103
|
payload: any;
|
|
98
104
|
}, Promise<WebhookResult>>;
|
|
99
105
|
/**
|
|
100
106
|
* Handle a webhook for Garmin HRV summaries (push or ping mode).
|
|
101
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
102
|
-
* to internal actions for processing.
|
|
103
107
|
*/
|
|
104
108
|
export declare const handleGarminWebhookHRVSummary: import("convex/server").RegisteredAction<"public", {
|
|
109
|
+
autoIngest?: boolean | undefined;
|
|
105
110
|
payload: any;
|
|
106
111
|
}, Promise<WebhookResult>>;
|
|
107
112
|
/**
|
|
108
113
|
* Handle a webhook for Garmin stress detail summaries (push or ping mode).
|
|
109
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
110
|
-
* to internal actions for processing.
|
|
111
114
|
*/
|
|
112
115
|
export declare const handleGarminWebhookStress: import("convex/server").RegisteredAction<"public", {
|
|
116
|
+
autoIngest?: boolean | undefined;
|
|
113
117
|
payload: any;
|
|
114
118
|
}, Promise<WebhookResult>>;
|
|
115
119
|
/**
|
|
116
120
|
* Handle a webhook for Garmin pulse oximetry (SpO2) summaries (push or ping mode).
|
|
117
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
118
|
-
* to internal actions for processing.
|
|
119
121
|
*/
|
|
120
122
|
export declare const handleGarminWebhookPulseOx: import("convex/server").RegisteredAction<"public", {
|
|
123
|
+
autoIngest?: boolean | undefined;
|
|
121
124
|
payload: any;
|
|
122
125
|
}, Promise<WebhookResult>>;
|
|
123
126
|
/**
|
|
124
127
|
* Handle a webhook for Garmin respiration summaries (push or ping mode).
|
|
125
|
-
* Follows the structured dispatch pattern: validates with Zod, then delegates
|
|
126
|
-
* to internal actions for processing.
|
|
127
128
|
*/
|
|
128
129
|
export declare const handleGarminWebhookRespiration: import("convex/server").RegisteredAction<"public", {
|
|
130
|
+
autoIngest?: boolean | undefined;
|
|
129
131
|
payload: any;
|
|
130
132
|
}, Promise<WebhookResult>>;
|
|
131
133
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../src/component/garmin/webhooks.ts"],"names":[],"mappings":"AAyGA,KAAK,aAAa,GAAG;IACnB,
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../src/component/garmin/webhooks.ts"],"names":[],"mappings":"AAyGA,+EAA+E;AAC/E,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,KAAK,EAAE,KAAK,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CACvF,CAAC;AA8DF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;0BA8BxC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kCAAkC;;;0BAsC7C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,4CAA4C;;;0BA4CvD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;0BAsCpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;0BAsC5C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;0BAsC9C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;0BAsCrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;0BAsCpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;0BAsC5C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;0BAsCpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;0BAsCtC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;0BAsCzC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yCAAyC;;;0BAsCpD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;0BAsCxC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;0BAsCpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;0BAsCrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;0BAsCzC,CAAC"}
|