@openlifelog/sdk 1.0.0 → 1.0.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.
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
- package/types/food.ts +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -150,6 +150,7 @@ interface NutritionalInformation {
|
|
|
150
150
|
interface ServingSize {
|
|
151
151
|
name: string;
|
|
152
152
|
grams: number;
|
|
153
|
+
ml?: number;
|
|
153
154
|
isDefault: boolean;
|
|
154
155
|
}
|
|
155
156
|
interface Food {
|
|
@@ -203,6 +204,7 @@ interface FoodLog {
|
|
|
203
204
|
createdAt: DateTime;
|
|
204
205
|
foodName?: string;
|
|
205
206
|
foodBrand?: string;
|
|
207
|
+
foodType?: 'food' | 'beverage' | 'meal';
|
|
206
208
|
}
|
|
207
209
|
interface CreateFoodLogRequest {
|
|
208
210
|
foodId: UUID;
|
|
@@ -218,6 +220,7 @@ type UpdateFoodLogRequest = Partial<CreateFoodLogRequest>;
|
|
|
218
220
|
interface ListFoodLogsParams extends ListParams, DateRangeParams {
|
|
219
221
|
date?: DateString;
|
|
220
222
|
mealType?: MealType;
|
|
223
|
+
timezone?: string;
|
|
221
224
|
}
|
|
222
225
|
interface DailyNutritionSummary {
|
|
223
226
|
date: DateString;
|
|
@@ -232,6 +235,7 @@ interface DailyNutritionSummary {
|
|
|
232
235
|
interface GetDailySummaryParams {
|
|
233
236
|
date?: DateString;
|
|
234
237
|
mealType?: MealType;
|
|
238
|
+
timezone?: string;
|
|
235
239
|
}
|
|
236
240
|
interface QuickEntryFoodLogRequest {
|
|
237
241
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ interface NutritionalInformation {
|
|
|
150
150
|
interface ServingSize {
|
|
151
151
|
name: string;
|
|
152
152
|
grams: number;
|
|
153
|
+
ml?: number;
|
|
153
154
|
isDefault: boolean;
|
|
154
155
|
}
|
|
155
156
|
interface Food {
|
|
@@ -203,6 +204,7 @@ interface FoodLog {
|
|
|
203
204
|
createdAt: DateTime;
|
|
204
205
|
foodName?: string;
|
|
205
206
|
foodBrand?: string;
|
|
207
|
+
foodType?: 'food' | 'beverage' | 'meal';
|
|
206
208
|
}
|
|
207
209
|
interface CreateFoodLogRequest {
|
|
208
210
|
foodId: UUID;
|
|
@@ -218,6 +220,7 @@ type UpdateFoodLogRequest = Partial<CreateFoodLogRequest>;
|
|
|
218
220
|
interface ListFoodLogsParams extends ListParams, DateRangeParams {
|
|
219
221
|
date?: DateString;
|
|
220
222
|
mealType?: MealType;
|
|
223
|
+
timezone?: string;
|
|
221
224
|
}
|
|
222
225
|
interface DailyNutritionSummary {
|
|
223
226
|
date: DateString;
|
|
@@ -232,6 +235,7 @@ interface DailyNutritionSummary {
|
|
|
232
235
|
interface GetDailySummaryParams {
|
|
233
236
|
date?: DateString;
|
|
234
237
|
mealType?: MealType;
|
|
238
|
+
timezone?: string;
|
|
235
239
|
}
|
|
236
240
|
interface QuickEntryFoodLogRequest {
|
|
237
241
|
name: string;
|
package/package.json
CHANGED
package/types/food.ts
CHANGED
|
@@ -69,6 +69,7 @@ export interface NutritionalInformation {
|
|
|
69
69
|
export interface ServingSize {
|
|
70
70
|
name: string;
|
|
71
71
|
grams: number;
|
|
72
|
+
ml?: number; // Optional: volume in ml (for beverages)
|
|
72
73
|
isDefault: boolean;
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -142,6 +143,7 @@ export interface FoodLog {
|
|
|
142
143
|
createdAt: DateTime;
|
|
143
144
|
foodName?: string;
|
|
144
145
|
foodBrand?: string;
|
|
146
|
+
foodType?: 'food' | 'beverage' | 'meal';
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
/**
|
|
@@ -169,6 +171,7 @@ export type UpdateFoodLogRequest = Partial<CreateFoodLogRequest>;
|
|
|
169
171
|
export interface ListFoodLogsParams extends ListParams, DateRangeParams {
|
|
170
172
|
date?: DateString;
|
|
171
173
|
mealType?: MealType;
|
|
174
|
+
timezone?: string; // IANA timezone string (e.g., "America/Denver")
|
|
172
175
|
}
|
|
173
176
|
|
|
174
177
|
/**
|
|
@@ -191,6 +194,7 @@ export interface DailyNutritionSummary {
|
|
|
191
194
|
export interface GetDailySummaryParams {
|
|
192
195
|
date?: DateString;
|
|
193
196
|
mealType?: MealType;
|
|
197
|
+
timezone?: string; // IANA timezone string (e.g., "America/Denver")
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
/**
|