yazio-mcp 0.0.17 → 0.0.18
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/README.md +3 -0
- package/dist/api/schemas.d.ts +22 -0
- package/dist/api/types.d.ts +6 -2
- package/dist/api/yazio.d.ts +10 -2
- package/dist/index.js +502 -374
- package/dist/schemas.d.ts +23 -0
- package/dist/server.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,6 +121,9 @@ Easily log meals you forgot to track in the Yazio app directly from Claude or Cu
|
|
|
121
121
|
| `add_user_consumed_meal` | Log all items of a saved meal | `meal_id`, `date`, `daytime` |
|
|
122
122
|
| `add_user_weight` | Log a weight measurement in kg | `date`, `weight` |
|
|
123
123
|
| `delete_user_weight` | Delete a weight entry | `id` |
|
|
124
|
+
| `get_user_body_values` | Get every body value of a day | `date` (optional) |
|
|
125
|
+
| `add_user_body_value` | Log body fat, muscle, blood glucose or a circumference, in metric units | `type`, `date`, `value` |
|
|
126
|
+
| `delete_user_body_value` | Delete a body value entry | `id` |
|
|
124
127
|
| `add_user_exercise` | Log a Yazio training or a custom exercise | `date`, `name`, `duration`, `energy` |
|
|
125
128
|
| `delete_user_exercise` | Delete an exercise entry | `id` |
|
|
126
129
|
|
package/dist/api/schemas.d.ts
CHANGED
|
@@ -275,6 +275,28 @@ export declare const WeightEntrySchema: z.ZodObject<{
|
|
|
275
275
|
gateway: z.ZodNullable<z.ZodString>;
|
|
276
276
|
source: z.ZodNullable<z.ZodString>;
|
|
277
277
|
}, z.core.$loose>;
|
|
278
|
+
/**
|
|
279
|
+
* The keys POST /user/bodyvalues takes, read back from entries made in the app. Yazio refuses
|
|
280
|
+
* any other key as "not a valid type", without listing the valid ones. Every type but weight
|
|
281
|
+
* seems to need a PRO account: without one, the same keys are refused.
|
|
282
|
+
*/
|
|
283
|
+
export declare const BodyValueTypeSchema: z.ZodEnum<{
|
|
284
|
+
"circumference.arm": "circumference.arm";
|
|
285
|
+
"circumference.chest": "circumference.chest";
|
|
286
|
+
"circumference.hip": "circumference.hip";
|
|
287
|
+
"circumference.thigh": "circumference.thigh";
|
|
288
|
+
"circumference.waist": "circumference.waist";
|
|
289
|
+
glucoselevel: "glucoselevel";
|
|
290
|
+
"ratio.fat": "ratio.fat";
|
|
291
|
+
"ratio.muscle": "ratio.muscle";
|
|
292
|
+
weight: "weight";
|
|
293
|
+
}>;
|
|
294
|
+
/** One day's body values, keyed by type; a type without entries that day is left out */
|
|
295
|
+
export declare const BodyValuesSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
296
|
+
id: z.ZodString;
|
|
297
|
+
date: z.ZodPipe<z.ZodString, z.ZodTransform<`${string}-${string}-${string} ${string}:${string}:${string}`, string>>;
|
|
298
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
299
|
+
}, z.core.$loose>>>;
|
|
278
300
|
export declare const ExercisesSchema: z.ZodObject<{
|
|
279
301
|
training: z.ZodArray<z.ZodObject<{
|
|
280
302
|
id: z.ZodString;
|
package/dist/api/types.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export type YazioDailySummary = z.infer<typeof S.DailySummarySchema>;
|
|
|
8
8
|
export type YazioWeightEntry = z.infer<typeof S.WeightEntrySchema>;
|
|
9
9
|
export type YazioWeightHistory = z.infer<typeof S.WeightHistorySchema>;
|
|
10
10
|
export type YazioExercises = z.infer<typeof S.ExercisesSchema>;
|
|
11
|
+
export type YazioBodyValues = z.infer<typeof S.BodyValuesSchema>;
|
|
12
|
+
export type BodyValueType = z.infer<typeof S.BodyValueTypeSchema>;
|
|
11
13
|
export type YazioSuggestedProduct = z.infer<typeof S.SuggestedProductsSchema>[number];
|
|
12
14
|
export type YazioWaterIntake = z.infer<typeof S.WaterIntakeSchema>;
|
|
13
15
|
export type YazioConsumedItems = z.infer<typeof S.ConsumedItemsSchema>;
|
|
@@ -105,12 +107,14 @@ export interface CreateMealDto {
|
|
|
105
107
|
portion_count: number;
|
|
106
108
|
}[];
|
|
107
109
|
}
|
|
108
|
-
/**
|
|
109
|
-
export interface
|
|
110
|
+
/** Always metric, whatever units the app shows: kg, % (ratio.*), mg/dL (glucoselevel) or cm (circumference.*) */
|
|
111
|
+
export interface BodyValueDto {
|
|
110
112
|
id: string;
|
|
111
113
|
date: YazioDateTime;
|
|
112
114
|
value: number;
|
|
113
115
|
}
|
|
116
|
+
/** Weight in kg */
|
|
117
|
+
export type WeightDto = BodyValueDto;
|
|
114
118
|
/** The API stores 0 kcal when `energy` is missing */
|
|
115
119
|
export interface ExerciseDto<Name extends string = string> {
|
|
116
120
|
id: string;
|
package/dist/api/yazio.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { YazioHttp, type Credentials, type YazioHttpOptions } from './http.js';
|
|
2
|
-
import type { AddConsumedItemsDto, AddExercisesDto, CreateMealDto, CreateProductDto, CreateUserRecipeDto, Daytime, ProductSearchOptions, WaterIntakeEntry, WeightDto, YazioFeeling } from './types.js';
|
|
2
|
+
import type { AddConsumedItemsDto, AddExercisesDto, BodyValueDto, BodyValueType, CreateMealDto, CreateProductDto, CreateUserRecipeDto, Daytime, ProductSearchOptions, WaterIntakeEntry, WeightDto, YazioFeeling } from './types.js';
|
|
3
3
|
export declare const today: () => string;
|
|
4
4
|
export declare class YazioApi {
|
|
5
5
|
readonly http: YazioHttp;
|
|
@@ -165,8 +165,16 @@ export declare class YazioApi {
|
|
|
165
165
|
date: `${string}-${string}-${string} ${string}:${string}:${string}`;
|
|
166
166
|
value: number;
|
|
167
167
|
}[]>;
|
|
168
|
-
/**
|
|
168
|
+
/** Every body value of a day, by type */
|
|
169
|
+
getBodyValues: (date?: string) => Promise<Record<string, {
|
|
170
|
+
[x: string]: unknown;
|
|
171
|
+
id: string;
|
|
172
|
+
date: `${string}-${string}-${string} ${string}:${string}:${string}`;
|
|
173
|
+
value: number | null;
|
|
174
|
+
}[]>>;
|
|
169
175
|
addWeights: (entries: WeightDto[]) => Promise<void>;
|
|
176
|
+
/** The body is keyed by value type. Types other than weight seem to need a PRO account */
|
|
177
|
+
addBodyValues: (type: BodyValueType, entries: BodyValueDto[]) => Promise<void>;
|
|
170
178
|
/** Any body value IDs */
|
|
171
179
|
deleteBodyValues: (ids: string[]) => Promise<void>;
|
|
172
180
|
getExercises: (date?: string) => Promise<{
|