@metriport/api-sdk 6.0.1-alpha.1 → 6.0.1-alpha.2

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.
Files changed (53) hide show
  1. package/package.json +9 -3
  2. package/.eslintignore +0 -4
  3. package/.eslintrc.js +0 -7
  4. package/src/devices/client/metriport.ts +0 -261
  5. package/src/devices/client/models/get-connect-token-response.ts +0 -3
  6. package/src/devices/client/models/get-connected-users-response.ts +0 -5
  7. package/src/devices/client/models/get-metriport-user-id-response.ts +0 -3
  8. package/src/devices/client/models/settings-response.ts +0 -5
  9. package/src/devices/client/models/webhook-status-response.ts +0 -6
  10. package/src/devices/client/util/date-util.ts +0 -17
  11. package/src/devices/models/activity.ts +0 -22
  12. package/src/devices/models/biometrics.ts +0 -17
  13. package/src/devices/models/body.ts +0 -12
  14. package/src/devices/models/common/activity-durations.ts +0 -20
  15. package/src/devices/models/common/activity-log.ts +0 -33
  16. package/src/devices/models/common/activity-movement.ts +0 -15
  17. package/src/devices/models/common/aminos.ts +0 -22
  18. package/src/devices/models/common/blood-glucose.ts +0 -6
  19. package/src/devices/models/common/blood-pressure.ts +0 -10
  20. package/src/devices/models/common/connected-user-info.ts +0 -5
  21. package/src/devices/models/common/energy-expenditure.ts +0 -6
  22. package/src/devices/models/common/food.ts +0 -15
  23. package/src/devices/models/common/heart-rate-variability.ts +0 -12
  24. package/src/devices/models/common/heart-rate.ts +0 -9
  25. package/src/devices/models/common/lat-lon.ts +0 -4
  26. package/src/devices/models/common/macros.ts +0 -13
  27. package/src/devices/models/common/metadata.ts +0 -10
  28. package/src/devices/models/common/micros.ts +0 -27
  29. package/src/devices/models/common/provider-source.ts +0 -11
  30. package/src/devices/models/common/respiration.ts +0 -16
  31. package/src/devices/models/common/sample.ts +0 -7
  32. package/src/devices/models/common/sex.ts +0 -1
  33. package/src/devices/models/common/source-info.ts +0 -8
  34. package/src/devices/models/common/source-type.ts +0 -4
  35. package/src/devices/models/common/temperature.ts +0 -13
  36. package/src/devices/models/metriport-data.ts +0 -5
  37. package/src/devices/models/nutrition.ts +0 -10
  38. package/src/devices/models/sleep.ts +0 -29
  39. package/src/devices/models/user.ts +0 -14
  40. package/src/index.ts +0 -60
  41. package/src/medical/client/metriport.ts +0 -328
  42. package/src/medical/models/common/address.ts +0 -20
  43. package/src/medical/models/common/base-update.ts +0 -11
  44. package/src/medical/models/common/medical-data-source.ts +0 -3
  45. package/src/medical/models/common/us-data.ts +0 -56
  46. package/src/medical/models/demographics.ts +0 -63
  47. package/src/medical/models/document.ts +0 -49
  48. package/src/medical/models/facility.ts +0 -23
  49. package/src/medical/models/organization.ts +0 -24
  50. package/src/medical/models/patient.ts +0 -18
  51. package/src/shared.ts +0 -25
  52. package/tsconfig.json +0 -24
  53. package/tsconfig.ref.json +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/api-sdk",
3
- "version": "6.0.1-alpha.1",
3
+ "version": "6.0.1-alpha.2",
4
4
  "description": "Metriport helps you access and manage health and medical data, through a single open source API.",
5
5
  "author": "Metriport Inc. <contact@metriport.com>",
6
6
  "homepage": "https://metriport.com/",
@@ -10,6 +10,12 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
+ "files": [
14
+ "dist",
15
+ "README.md",
16
+ "LICENSE",
17
+ "package.json"
18
+ ],
13
19
  "exports": {
14
20
  ".": "./dist/index.js",
15
21
  "./devices/*": "./dist/devices/*.js",
@@ -48,7 +54,7 @@
48
54
  "url": "https://github.com/metriport/metriport/issues"
49
55
  },
50
56
  "dependencies": {
51
- "@metriport/commonwell-sdk": "^4.4.1-alpha.1",
57
+ "@metriport/commonwell-sdk": "*",
52
58
  "axios": "^1.3.4",
53
59
  "dayjs": "^1.11.7",
54
60
  "zod": "^3.20.2"
@@ -63,5 +69,5 @@
63
69
  "ts-essentials": "^9.3.1",
64
70
  "typescript": "^4.9.5"
65
71
  },
66
- "gitHead": "c77eacae50fdd3fcf56adb64af186ba914b0ff48"
72
+ "gitHead": "633052184c5afb4d76fdad7d7b91c8e9d9b57557"
67
73
  }
package/.eslintignore DELETED
@@ -1,4 +0,0 @@
1
- node_modules
2
- build
3
- dist
4
- lib
package/.eslintrc.js DELETED
@@ -1,7 +0,0 @@
1
- /*global module*/
2
- module.exports = {
3
- extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
4
- parser: '@typescript-eslint/parser',
5
- plugins: ['@typescript-eslint'],
6
- root: true,
7
- };
@@ -1,261 +0,0 @@
1
- import axios, { AxiosInstance } from "axios";
2
- import {
3
- API_KEY_HEADER,
4
- BASE_ADDRESS,
5
- BASE_ADDRESS_SANDBOX,
6
- DEFAULT_AXIOS_TIMEOUT_MILLIS,
7
- } from "../../shared";
8
- import { Activity } from "../models/activity";
9
- import { Biometrics } from "../models/biometrics";
10
- import { Body } from "../models/body";
11
- import { ProviderSource } from "../models/common/provider-source";
12
- import { Nutrition } from "../models/nutrition";
13
- import { Sleep } from "../models/sleep";
14
- import { User } from "../models/user";
15
- import { GetConnectTokenResponse } from "./models/get-connect-token-response";
16
- import { GetMetriportUserIDResponse } from "./models/get-metriport-user-id-response";
17
- import { SettingsResponse } from "./models/settings-response";
18
- import { WebhookStatusResponse } from "./models/webhook-status-response";
19
- import { GetConnectedUsersResponse } from "./models/get-connected-users-response";
20
- import { ConnectedUserInfo } from "../models/common/connected-user-info";
21
- import { dateIsValid } from "./util/date-util";
22
-
23
- export type Options = {
24
- sandbox?: boolean;
25
- timeout?: number;
26
- };
27
-
28
- export class MetriportDevicesApi {
29
- private api: AxiosInstance;
30
-
31
- /**
32
- * Creates a new instance of the Metriport Devices API client.
33
- *
34
- * @param apiKey - Your Metriport API key.
35
- * @param options - Optional parameters
36
- * @param options.sandbox - Indicates whether to connect to the sandbox, default false.
37
- * @param options.timeout - Connection timeout in milliseconds, default 20 seconds.
38
- */
39
- constructor(apiKey: string, options: Options = {}) {
40
- const { sandbox, timeout } = options;
41
- const baseURL = sandbox ? BASE_ADDRESS_SANDBOX : BASE_ADDRESS;
42
- this.api = axios.create({
43
- timeout: timeout ?? DEFAULT_AXIOS_TIMEOUT_MILLIS,
44
- baseURL,
45
- headers: { [API_KEY_HEADER]: apiKey },
46
- });
47
- }
48
-
49
- /**
50
- * For your given user ID, returns the Metriport user ID used for identifying
51
- * the user and making subsequent calls for the user's data.
52
- *
53
- * @param {string} appUserId - The unique ID for the user in your app.
54
- * @returns The userId of the user.
55
- */
56
- async getMetriportUserId(appUserId: string): Promise<string> {
57
- const resp = await this.api.post<GetMetriportUserIDResponse>("/user", null, {
58
- params: { appUserId: appUserId },
59
- });
60
- return resp.data.userId;
61
- }
62
-
63
- /**
64
- * For your given user ID, returns the user's connected providers
65
- *
66
- * @param {string} userId - The unique ID for the user in your app.
67
- * @returns Object containing array of connected providers.
68
- */
69
- async getConnectedProviders(userId: string): Promise<{ connectedProviders: string[] }> {
70
- const resp = await this.api.get<{ connectedProviders: string[] }>(
71
- `/user/${userId}/connected-providers`
72
- );
73
-
74
- return resp.data;
75
- }
76
-
77
- /**
78
- * Returns all your users and their connected providers.
79
- *
80
- * @returns List of connected users, containing their ids and providers.
81
- */
82
- async getConnectedUsers(): Promise<{ connectedUsers: ConnectedUserInfo[] }> {
83
- const resp = await this.api.get<GetConnectedUsersResponse>("/user");
84
- return resp.data;
85
- }
86
-
87
- /**
88
- * For the given user ID, get a token to be used for a Metriport Connect session.
89
- *
90
- * @param {string} userId - The user ID of the user that will be using the Connect widget.
91
- * @returns The Metriport Connect session token.
92
- */
93
- async getConnectToken(userId: string): Promise<string> {
94
- const resp = await this.api.get<GetConnectTokenResponse>("/user/connect/token", {
95
- params: { userId: userId },
96
- });
97
- return resp.data.token;
98
- }
99
-
100
- /**
101
- * For the given user ID, revokes the user's access to the specified provider.
102
- *
103
- * @param {string} userId - The user ID of the user for which to revoke access.
104
- * @param {ProviderSource} provider - The data provider to revoke access to.
105
- * @returns void.
106
- */
107
- async revokeUserAccessToProvider(userId: string, provider: ProviderSource): Promise<void> {
108
- await this.api.delete(`/user/${userId}/revoke`, {
109
- params: { provider: provider.toString() },
110
- });
111
- }
112
-
113
- /**
114
- * For the given user ID, revokes access tokens for all providers and deletes the user.
115
- *
116
- * @param {string} userId - The user ID of the user to be deleted.
117
- * @returns void.
118
- */
119
- async deleteUser(userId: string): Promise<void> {
120
- await this.api.delete(`/user/${userId}`);
121
- }
122
-
123
- /**
124
- * Gets the activity info for the specified user ID and date.
125
- *
126
- * @param {string} userId - The userId of the user you want to get data for.
127
- * @param {string} date - The date you want to get the data for (YYYY-MM-DD).
128
- * @returns An array of activity data from each connected provider.
129
- */
130
- async getActivityData(userId: string, date: string): Promise<Activity[]> {
131
- const resp = await this.api.get<Activity[]>("/activity", {
132
- params: this.validateAndBuildParams(userId, date),
133
- });
134
- return resp.data;
135
- }
136
-
137
- /**
138
- * Gets the body data for the specified user ID and date.
139
- *
140
- * @param {string} userId - The userId of the user you want to get data for.
141
- * @param {string} date - The date you want to get the data for (YYYY-MM-DD).
142
- * @returns An array of body data from each connected provider.
143
- */
144
- async getBodyData(userId: string, date: string): Promise<Body[]> {
145
- const resp = await this.api.get<Body[]>("/body", {
146
- params: this.validateAndBuildParams(userId, date),
147
- });
148
- return resp.data;
149
- }
150
-
151
- /**
152
- * Gets the biometrics data for the specified user ID and date.
153
- *
154
- * @param {string} userId - The userId of the user you want to get data for.
155
- * @param {string} date - The date you want to get the data for (YYYY-MM-DD).
156
- * @returns An array of biometrics data from each connected provider.
157
- */
158
- async getBiometricsData(userId: string, date: string): Promise<Biometrics[]> {
159
- const resp = await this.api.get<Biometrics[]>("/biometrics", {
160
- params: this.validateAndBuildParams(userId, date),
161
- });
162
- return resp.data;
163
- }
164
-
165
- /**
166
- * Gets the nutrition data for the specified user ID and date.
167
- *
168
- * @param {string} userId - The userId of the user you want to get data for.
169
- * @param {string} date - The date you want to get the data for (YYYY-MM-DD).
170
- * @returns An array of nutrition data from each connected provider.
171
- */
172
- async getNutritionData(userId: string, date: string): Promise<Nutrition[]> {
173
- const resp = await this.api.get<Nutrition[]>("/nutrition", {
174
- params: this.validateAndBuildParams(userId, date),
175
- });
176
- return resp.data;
177
- }
178
-
179
- /**
180
- * Gets the sleep data for the specified user ID and date.
181
- *
182
- * @param {string} userId - The userId of the user you want to get data for.
183
- * @param {string} date - The date you want to get the data for (YYYY-MM-DD).
184
- * @returns An array of sleep data from each connected provider.
185
- */
186
- async getSleepData(userId: string, date: string): Promise<Sleep[]> {
187
- const resp = await this.api.get<Sleep[]>("/sleep", {
188
- params: this.validateAndBuildParams(userId, date),
189
- });
190
- return resp.data;
191
- }
192
-
193
- /**
194
- * Gets the user info for the specified user ID and date.
195
- *
196
- * @param {string} userId - The userId of the user you want to get data for.
197
- * @param {string} date - The date you want to get the data for (YYYY-MM-DD).
198
- * @returns An array of user data from each connected provider.
199
- */
200
- async getUserData(userId: string, date: string): Promise<User[]> {
201
- const resp = await this.api.get<User[]>("/user", {
202
- params: this.validateAndBuildParams(userId, date),
203
- });
204
- return resp.data;
205
- }
206
-
207
- /**
208
- * If the userId is empty or the date is not in the correct format, throw an error. Otherwise, return
209
- * an object with the userId and date.
210
- *
211
- * @param {string} userId - The userId of the user you want to get the data for.
212
- * @param {string} date - The date to get the user's schedule for.
213
- * @returns an object with the userId and date properties.
214
- */
215
- private validateAndBuildParams(userId: string, date: string) {
216
- if (userId.trim().length < 1) throw Error(`userId must not be empty!`);
217
- if (!dateIsValid(date)) throw Error(`date must be in format YYYY-MM-DD!`);
218
- return { userId, date };
219
- }
220
-
221
- /**
222
- * Gets the settings for your account.
223
- *
224
- * @returns Your account settings.
225
- */
226
- async getSettings(): Promise<SettingsResponse> {
227
- const resp = await this.api.get<SettingsResponse>("/settings");
228
- return resp.data;
229
- }
230
-
231
- /**
232
- * Update the settings for your account.
233
- *
234
- * @returns Your updated account settings.
235
- */
236
- async updateSettings(webhookUrl: string): Promise<SettingsResponse> {
237
- const resp = await this.api.post<SettingsResponse>("/settings", {
238
- webhookUrl,
239
- });
240
- return resp.data;
241
- }
242
-
243
- /**
244
- * Gets the status of communication with your app's webhook.
245
- *
246
- * @returns The status of communication with your app's webhook.
247
- */
248
- async getWebhookStatus(): Promise<WebhookStatusResponse> {
249
- const resp = await this.api.get<WebhookStatusResponse>("/settings/webhook");
250
- return resp.data;
251
- }
252
-
253
- /**
254
- * Retries failed webhook requests.
255
- *
256
- * @returns void
257
- */
258
- async retryWebhookRequests(): Promise<void> {
259
- await this.api.post("/settings/webhook/retry");
260
- }
261
- }
@@ -1,3 +0,0 @@
1
- export interface GetConnectTokenResponse {
2
- token: string;
3
- }
@@ -1,5 +0,0 @@
1
- import { ConnectedUserInfo } from "../../models/common/connected-user-info";
2
-
3
- export interface GetConnectedUsersResponse {
4
- connectedUsers: ConnectedUserInfo[];
5
- }
@@ -1,3 +0,0 @@
1
- export interface GetMetriportUserIDResponse {
2
- userId: string;
3
- }
@@ -1,5 +0,0 @@
1
- export interface SettingsResponse {
2
- id: string;
3
- webhookUrl?: string | null;
4
- webhookKey?: string | null;
5
- }
@@ -1,6 +0,0 @@
1
- export interface WebhookStatusResponse {
2
- webhookEnabled: boolean;
3
- webhookStatusDetail?: string;
4
- webhookRequestsProcessing: number;
5
- webhookRequestsFailed: number;
6
- }
@@ -1,17 +0,0 @@
1
- export function dateIsValid(dateStr: string): boolean {
2
- const regex = /^\d{4}-\d{2}-\d{2}$/;
3
-
4
- if (dateStr.match(regex) === null) {
5
- return false;
6
- }
7
-
8
- const date = new Date(dateStr);
9
-
10
- const timestamp = date.getTime();
11
-
12
- if (typeof timestamp !== "number" || Number.isNaN(timestamp)) {
13
- return false;
14
- }
15
-
16
- return date.toISOString().startsWith(dateStr);
17
- }
@@ -1,22 +0,0 @@
1
- import { ActivityDurations } from "./common/activity-durations";
2
- import { ActivityLog } from "./common/activity-log";
3
- import { ActivityMovement } from "./common/activity-movement";
4
- import { EnergyExpenditure } from "./common/energy-expenditure";
5
- import { HeartRate } from "./common/heart-rate";
6
- import { HeartRateVariability } from "./common/heart-rate-variability";
7
- import { Respiration } from "./common/respiration";
8
- import { MetriportData } from "./metriport-data";
9
-
10
- export interface Activity extends MetriportData {
11
- summary?: {
12
- durations?: ActivityDurations;
13
- energy_expenditure?: EnergyExpenditure;
14
- movement?: ActivityMovement;
15
- biometrics?: {
16
- heart_rate?: HeartRate;
17
- hrv?: HeartRateVariability;
18
- respiration?: Respiration;
19
- };
20
- };
21
- activity_logs?: ActivityLog[];
22
- }
@@ -1,17 +0,0 @@
1
- import { BloodGlucose } from "./common/blood-glucose";
2
- import { BloodPressure } from "./common/blood-pressure";
3
- import { HeartRate } from "./common/heart-rate";
4
- import { HeartRateVariability } from "./common/heart-rate-variability";
5
- import { Respiration } from "./common/respiration";
6
- import { Temperature } from "./common/temperature";
7
- import { MetriportData } from "./metriport-data";
8
-
9
- export interface Biometrics extends MetriportData {
10
- blood_glucose?: BloodGlucose;
11
- blood_pressure?: BloodPressure;
12
- heart_rate?: HeartRate;
13
- hrv?: HeartRateVariability;
14
- respiration?: Respiration;
15
- temperature?: Temperature;
16
- // todo: ecg?
17
- }
@@ -1,12 +0,0 @@
1
- import { MetriportData } from "./metriport-data";
2
- import { Sample } from "./common/sample";
3
- export interface Body extends MetriportData {
4
- body_fat_pct?: number;
5
- height_cm?: number;
6
- weight_kg?: number;
7
- bone_mass_kg?: number;
8
- muscle_mass_kg?: number;
9
- lean_mass_kg?: number;
10
- max_possible_heart_rate_bpm?: number;
11
- weight_samples_kg?: Sample[];
12
- }
@@ -1,20 +0,0 @@
1
- export interface ActivityDurations {
2
- active_seconds?: number;
3
- // also referred to as metabolic-equivalent minutes
4
- intensity?: {
5
- rest_seconds?: number;
6
- very_low_seconds?: number;
7
- low_seconds?: number;
8
- med_seconds?: number;
9
- high_seconds?: number;
10
- };
11
- // also referred to as stress
12
- strain?: {
13
- rest_seconds?: number;
14
- very_low_seconds?: number;
15
- low_seconds?: number;
16
- med_seconds?: number;
17
- high_seconds?: number;
18
- very_high_seconds?: number;
19
- };
20
- }
@@ -1,33 +0,0 @@
1
- import { ActivityDurations } from "./activity-durations";
2
- import { ActivityMovement } from "./activity-movement";
3
- import { EnergyExpenditure } from "./energy-expenditure";
4
- import { HeartRate } from "./heart-rate";
5
- import { HeartRateVariability } from "./heart-rate-variability";
6
- import { LatLon } from "./lat-lon";
7
- import { Metadata } from "./metadata";
8
- import { Respiration } from "./respiration";
9
-
10
- export interface ActivityLog {
11
- metadata: Metadata;
12
- name?: string;
13
- type?: string;
14
- start_time?: string;
15
- end_time?: string;
16
- durations?: ActivityDurations;
17
- energy_expenditure?: EnergyExpenditure;
18
- movement?: ActivityMovement;
19
- location?: {
20
- start_lat_lon_deg?: LatLon;
21
- end_lat_lon_deg?: LatLon;
22
- polystring?: string;
23
- city?: string;
24
- country?: string;
25
- region?: string; // can be state, province, etc.
26
- };
27
- biometrics?: {
28
- heart_rate?: HeartRate;
29
- hrv?: HeartRateVariability;
30
- respiration?: Respiration;
31
- };
32
- // todo: laps + more time samples thoughout the models?
33
- }
@@ -1,15 +0,0 @@
1
- export interface ActivityMovement {
2
- steps_count?: number;
3
- floors_count?: number;
4
- elevation?: {
5
- gain_meters?: number;
6
- min_meters?: number;
7
- max_meters?: number;
8
- };
9
- speed?: {
10
- max_km_h?: number;
11
- avg_km_h?: number;
12
- };
13
- avg_cadence?: number;
14
- distance_meters?: number;
15
- }
@@ -1,22 +0,0 @@
1
- export interface Aminos {
2
- alanine_g?: number;
3
- arginine_g?: number;
4
- asparagine_g?: number;
5
- aspartic_acid_g?: number;
6
- cysteine_g?: number;
7
- glutamine_g?: number;
8
- glutamic_acid_g?: number;
9
- glycine_g?: number;
10
- histidine_g?: number;
11
- isoleucine_g?: number;
12
- leucine_g?: number;
13
- lysine_g?: number;
14
- methionine_g?: number;
15
- phenylalanine_g?: number;
16
- proline_g?: number;
17
- serine_g?: number;
18
- threonine_g?: number;
19
- tryptophan_g?: number;
20
- tyrosine_g?: number;
21
- valine_g?: number;
22
- }
@@ -1,6 +0,0 @@
1
- import { Sample } from "./sample";
2
-
3
- export interface BloodGlucose {
4
- avg_mg_dL?: number;
5
- samples_mg_dL: Sample[];
6
- }
@@ -1,10 +0,0 @@
1
- import { Sample } from "./sample";
2
-
3
- export interface BloodPressure {
4
- diastolic_mm_Hg?: {
5
- samples?: Sample[];
6
- };
7
- systolic_mm_Hg?: {
8
- samples?: Sample[];
9
- };
10
- }
@@ -1,5 +0,0 @@
1
- export type ConnectedUserInfo = {
2
- metriportUserId: string;
3
- appUserId: string;
4
- connectedProviders?: string[];
5
- };
@@ -1,6 +0,0 @@
1
- export interface EnergyExpenditure {
2
- active_kcal?: number;
3
- basal_metabolic_rate_kcal?: number;
4
- total_watts?: number;
5
- avg_watts?: number;
6
- }
@@ -1,15 +0,0 @@
1
- import { Aminos } from "./aminos";
2
- import { Macros } from "./macros";
3
- import { Micros } from "./micros";
4
-
5
- export interface Food {
6
- name?: string;
7
- brand?: string;
8
- amount?: number;
9
- unit?: string;
10
- nutrition_facts?: {
11
- macros?: Macros;
12
- micros?: Micros;
13
- aminos?: Aminos;
14
- };
15
- }
@@ -1,12 +0,0 @@
1
- import { Sample } from "./sample";
2
-
3
- export interface HeartRateVariability {
4
- rmssd?: {
5
- avg_millis?: number;
6
- samples_millis?: Sample[];
7
- };
8
- sdnn?: {
9
- avg_millis?: number;
10
- samples_millis?: Sample[];
11
- };
12
- }
@@ -1,9 +0,0 @@
1
- import { Sample } from "./sample";
2
-
3
- export interface HeartRate {
4
- min_bpm?: number;
5
- max_bpm?: number;
6
- avg_bpm?: number;
7
- resting_bpm?: number;
8
- samples_bpm?: Sample[];
9
- }
@@ -1,4 +0,0 @@
1
- export interface LatLon {
2
- lat: number;
3
- lon: number;
4
- }
@@ -1,13 +0,0 @@
1
- export interface Macros {
2
- alcohol_g?: number;
3
- carbs_g?: number;
4
- cholesterol_mg?: number;
5
- energy_kcal?: number;
6
- fat_g?: number;
7
- fiber_g?: number;
8
- protein_g?: number;
9
- sodium_mg?: number;
10
- sugar_g?: number;
11
- trans_fat_g?: number;
12
- water_ml?: number;
13
- }
@@ -1,10 +0,0 @@
1
- import { ProviderSource } from "./provider-source";
2
- import { SourceInfo } from "./source-info";
3
-
4
- export interface Metadata {
5
- date: string;
6
- hour?: string;
7
- source: ProviderSource;
8
- data_source?: SourceInfo;
9
- error?: string;
10
- }
@@ -1,27 +0,0 @@
1
- export interface Micros {
2
- biotin_mg?: number;
3
- caffeine_mg?: number;
4
- calcium_mg?: number;
5
- copper_mg?: number;
6
- folate_mg?: number;
7
- folic_acid_mg?: number;
8
- iodine_mg?: number;
9
- iron_mg?: number;
10
- magnesium_mg?: number;
11
- manganese_mg?: number;
12
- phosphorus_mg?: number;
13
- potassium_mg?: number;
14
- selenium_mg?: number;
15
- vitamin_A_mg?: number;
16
- vitamin_B1_mg?: number;
17
- vitamin_B2_mg?: number;
18
- vitamin_B3_mg?: number;
19
- vitamin_B5_mg?: number;
20
- vitamin_B6_mg?: number;
21
- vitamin_B12_mg?: number;
22
- vitamin_C_mg?: number;
23
- vitamin_D_mg?: number;
24
- vitamin_E_mg?: number;
25
- vitamin_K_mg?: number;
26
- zinc_mg?: number;
27
- }
@@ -1,11 +0,0 @@
1
- export enum ProviderSource {
2
- apple = "apple",
3
- cronometer = "cronometer",
4
- dexcom = "dexcom",
5
- fitbit = "fitbit",
6
- garmin = "garmin",
7
- google = "google",
8
- oura = "oura",
9
- whoop = "whoop",
10
- withings = "withings",
11
- }
@@ -1,16 +0,0 @@
1
- import { Sample } from "./sample";
2
-
3
- export interface Respiration {
4
- vo2_max?: number;
5
- spo2?: {
6
- // blood oxygen
7
- min_pct?: number;
8
- max_pct?: number;
9
- avg_pct?: number;
10
- };
11
- avg_breaths_per_minute?: number;
12
- /**
13
- * Samples of respiration readings, breaths per minute over time.
14
- */
15
- samples_breaths_per_minute?: Sample[];
16
- }