export declare const FoodCategory: { readonly generic: 'generic'; /** @deprecated Use generic. */ readonly general: 'generic'; readonly branded: 'branded'; readonly recipe: 'recipe'; }; export type FoodCategory = typeof FoodCategory[keyof typeof FoodCategory]; export declare const AutocompleteFoodCategory: { readonly generic: 'generic'; /** @deprecated Use generic. */ readonly general: 'generic'; readonly branded: 'branded'; }; export type AutocompleteFoodCategory = typeof AutocompleteFoodCategory[keyof typeof AutocompleteFoodCategory]; export interface AutocompleteFoodsRequest { query: string; category?: AutocompleteFoodCategory; limit?: number; endUserId?: string; signal?: AbortSignal; } export interface FoodSuggestion { id: ContractFoodSuggestion['id']; name: ContractFoodSuggestion['name']; brandName: ContractFoodSuggestion['brandName']; photoUrl: ContractFoodSuggestion['imageUrl']; nutrients: NutritionFacts | null; } export interface AutocompleteFoodsResponse { items: FoodSuggestion[]; } export interface GetFoodRequest { foodId: ContractFoodSearchItem['id']; endUserId?: string; signal?: AbortSignal; } export interface SearchFoodsRequest { query: string; category?: FoodCategory; /** Results per call, 1–50 (default 10). */ limit?: number; /** Results to skip for paging (default 0). A page shorter than `limit` is the last one. */ offset?: number; endUserId?: string; signal?: AbortSignal; } export interface FoodSearchResults { totalCount: number; items: FoodSearchItem[]; } export interface FoodSearchItem { id: ContractFoodSearchItem['id']; type: FoodCategory; name: ContractFoodSearchItem['name']; brandName: ContractFoodSearchItem['brandName']; calories: number | null; protein: number | null; carbohydrates: number | null; netCarbohydrates: number | null; totalFat: number | null; saturatedFat: number | null; fiber: number | null; totalSugars: number | null; addedSugars: number | null; sodium: number | null; potassium: number | null; cholesterol: number | null; glycemicIndex: ContractFoodSearchItem['glycemicIndex']; glycemicLoad: ContractFoodSearchItem['glycemicLoad']; photoUrl: ContractFoodSearchItem['imageUrl']; barcode: ContractFoodSearchItem['barcode']; servings: ServingOption[]; nutrients: NutritionFacts | null; } export interface ServingOption { id: ContractServingOption['id']; quantity: ContractServingOption['quantity']; unit: ContractServingOption['unit']; scalingFactor: ContractServingOption['scalingFactor']; weightGrams: ContractServingOption['weightGrams']; isPrimary: ContractServingOption['isPrimary']; } export interface NutrientAmount { value: number; unit: string; } export interface CompleteScanNutritionFacts { calories?: NutrientAmount; protein?: NutrientAmount; carbohydrates?: NutrientAmount; netCarbohydrates?: NutrientAmount; totalFat?: NutrientAmount; saturatedFat?: NutrientAmount; fiber?: NutrientAmount; totalSugars?: NutrientAmount; addedSugars?: NutrientAmount; sodium?: NutrientAmount; } export interface NutritionFacts extends CompleteScanNutritionFacts { transFat?: NutrientAmount; cholesterol?: NutrientAmount; calcium?: NutrientAmount; iron?: NutrientAmount; potassium?: NutrientAmount; vitaminD?: NutrientAmount; } export interface LookupFoodByBarcodeRequest { upc: string; endUserId?: string; signal?: AbortSignal; } export interface SearchFoodsByNaturalLanguageRequest { query: string; endUserId?: string; signal?: AbortSignal; } export declare const DietRestriction: { readonly gluten: 'gluten'; readonly lactose: 'lactose'; readonly yeast: 'yeast'; readonly treeNuts: 'tree_nuts'; readonly peanuts: 'peanuts'; readonly dairy: 'dairy'; readonly eggs: 'eggs'; readonly sulfites: 'sulfites'; readonly soy: 'soy'; readonly wheat: 'wheat'; readonly shellfish: 'shellfish'; readonly fish: 'fish'; readonly mushrooms: 'mushrooms'; readonly sesame: 'sesame'; readonly monosodiumGlutamate: 'msg'; readonly caffeine: 'caffeine'; readonly fodmaps: 'fodmaps'; }; export type DietRestriction = typeof DietRestriction[keyof typeof DietRestriction]; export declare const DietPreference: { readonly vegetarian: 'vegetarian'; readonly vegan: 'vegan'; readonly keto: 'keto'; readonly paleo: 'paleo'; readonly pescatarian: 'pescatarian'; readonly lowCarbohydrate: 'low_carbohydrate'; readonly highProtein: 'high_protein'; readonly kosher: 'kosher'; readonly halal: 'halal'; }; export type DietPreference = typeof DietPreference[keyof typeof DietPreference]; export interface SuggestFoodAlternativesRequest { foodId: string; dietRestrictions: DietRestriction[]; dietPreferences: DietPreference[]; endUserId?: string; signal?: AbortSignal; } /** * The catalog serving a detected or alternative food is expressed in. `quantity` is the size of * one serving, not the amount eaten; `weightGrams` is that serving's weight, or null when unknown. */ export interface ServingSummary { id: string; quantity: number; unit: string | null; weightGrams: number | null; } /** @deprecated Use ServingSummary. The amount eaten is now DetectedFood.quantity. */ export type DetectedServing = ServingSummary; /** * A food recognized from a photo or a description. `serving` is the selected catalog serving and * `quantity` is how many of that serving were eaten (0.4 for 40 g of a 100 g serving), so together * they are ready to use as a food-log entry. `nutrients` are already scaled to `quantity`. */ export interface DetectedFood { id: string; name: string | null; brandName?: string | null; nutrients: CompleteScanNutritionFacts; serving: ServingSummary; quantity: number; } /** A healthier alternative to a food, with the servings its nutrition can be read against. */ export interface AlternativeFood { id: string; name: string | null; brandName?: string | null; nutrients: CompleteScanNutritionFacts; servings: ServingSummary[]; } export type FoodAlternative = AlternativeFood; export interface SuggestFoodAlternativesResponse { alternatives: AlternativeFood[]; } export interface GetRestaurantMenuItemsRequest { restaurantId: ContractRestaurant['id']; limit?: number; offset?: number; endUserId?: string; signal?: AbortSignal; } export interface SearchRestaurantsRequest { query: string; latitude: number; longitude: number; radius?: number; limit?: number; endUserId?: string; signal?: AbortSignal; } export declare const RestaurantResultType: { readonly restaurant: 'restaurant'; readonly menuItem: 'menu_item'; }; export type RestaurantResultType = typeof RestaurantResultType[keyof typeof RestaurantResultType]; export interface Restaurant { type: RestaurantResultType; id: ContractRestaurant['id']; name: ContractRestaurant['name']; isChain?: ContractRestaurant['isChain']; /** Distance from the searched point, in meters. */ distance?: ContractRestaurant['distanceMeters']; city?: ContractRestaurant['city']; address1?: ContractRestaurant['address1']; address2?: ContractRestaurant['address2']; } export interface SearchRestaurantsResponse { totalCount: number; items: Restaurant[]; } export interface RestaurantMenuItem { type: ContractRestaurantMenuItem['type']; id: ContractRestaurantMenuItem['id']; name: ContractRestaurantMenuItem['name']; restaurantName: ContractRestaurantMenuItem['restaurantName']; isChain?: boolean | null; energy?: number | null; protein?: number | null; carbs?: number | null; netCarbs?: number | null; fat?: number | null; fiber?: number | null; sugars?: number | null; addedSugars?: number | null; gi?: number | null; gl?: number | null; photoUrl?: string | null; /** Distance from the searched point, in meters. */ distance?: number | null; servings: ServingOption[]; } export interface SearchRestaurantMenuItemsResponse { totalCount: number; items: RestaurantMenuItem[]; } export interface RestaurantMenuEntry { id: string; name: string | null; energy?: number | null; protein?: number | null; carbs?: number | null; netCarbs?: number | null; fat?: number | null; fiber?: number | null; sugars?: number | null; addedSugars?: number | null; gi?: number | null; gl?: number | null; servings: ServingOption[]; } export interface GetRestaurantMenuItemsResponse { items: RestaurantMenuEntry[]; } /** How much analysis effort a photo scan uses. Both modes return the same FoodScan shape and cost the same. */ export declare const AnalysisEffort: { readonly none: 'none'; readonly xhigh: 'xhigh'; }; export type AnalysisEffort = typeof AnalysisEffort[keyof typeof AnalysisEffort]; export interface ScanFoodPhotoRequest { image: string; endUserId?: string; /** Omit or `xhigh` for the reasoning-based analyzer (the API default); `none` for the standard one. */ reasoningEffort?: AnalysisEffort; signal?: AbortSignal; } export interface FoodDetection { confidenceScore?: string; food: DetectedFood; } export interface GlucosePredictionPoint { minutes: number; value: number; } export interface FoodScanGlucoseImpact { impactScore: string; prediction: GlucosePredictionPoint[]; } export interface FoodScan { mealName: string | null; totalNutrients: CompleteScanNutritionFacts; detections: FoodDetection[]; } /** @deprecated Use FoodScan. */ export type PhotoScan = FoodScan; /** @deprecated Use FoodScanGlucoseImpact. */ export type PhotoScanGlucoseImpact = FoodScanGlucoseImpact; /** * Sends a scan back for correction. Pass the `FoodScan` exactly as it was returned: every * detection, its serving, quantity, and nutrients are forwarded unchanged. */ export interface CorrectPhotoScanRequest { analysis: FoodScan; instruction: string; endUserId?: string; signal?: AbortSignal; } export interface ServingSelection { id: ContractFoodLogInputFood['servingId']; /** How many of the serving were eaten: 2 for 12 oz of a "6 oz" serving, not 12. */ quantity: ContractFoodLogInputFood['quantity']; } export interface FoodSelection { id: ContractFoodLogInputFood['foodId']; serving: ServingSelection; } export interface PartnerUserContext { endUserId: string; endUserTimezone?: string; } /** @deprecated Use PartnerUserContext. */ export type FoodLogUserContext = PartnerUserContext; export interface CreateFoodLogRequest extends PartnerUserContext { foods: FoodSelection[]; timestampUtc?: string; name?: string; signal?: AbortSignal; } export interface ListFoodLogsRequest extends PartnerUserContext { start: string; end: string; signal?: AbortSignal; } /** At least one of `foods`, `timestampUtc`, or `name` is required; omitted fields are left unchanged. */ export interface UpdateFoodLogRequest extends PartnerUserContext { logId: string; foods?: FoodSelection[]; timestampUtc?: string; name?: string; signal?: AbortSignal; } export interface GetFoodLogRequest extends PartnerUserContext { logId: string; signal?: AbortSignal; } /** Bucket size for a food-log summary. */ export declare const FoodLogSummaryGrouping: { readonly day: 'day'; readonly week: 'week'; }; export type FoodLogSummaryGrouping = typeof FoodLogSummaryGrouping[keyof typeof FoodLogSummaryGrouping]; /** Which weekday a week bucket begins on. Ignored when grouping by day. */ export declare const WeekStart: { readonly monday: 'monday'; readonly sunday: 'sunday'; }; export type WeekStart = typeof WeekStart[keyof typeof WeekStart]; /** * Summarizes the logs between `start` and `end` (inclusive calendar dates in the user's timezone, * at most 366 days) into day or week buckets with summed nutrients. */ export interface GetFoodLogSummaryRequest extends PartnerUserContext { start: string; end: string; groupBy?: FoodLogSummaryGrouping; weekStart?: WeekStart; signal?: AbortSignal; } /** One day or week of a food-log summary. Buckets tile the requested range, so an empty period is present with zero counts. */ export interface FoodLogSummaryBucket { startDate: string; endDate: string; logsCount: number; daysWithLogs: number; /** Nutrients summed over the bucket. Sparse: a key is absent when nothing could be totalled. */ nutrients: NutritionFacts; } export interface FoodLogSummaryTotals { logsCount: number; daysWithLogs: number; nutrients: NutritionFacts; } /** Totals divided by the number of days that have at least one log. */ export interface FoodLogSummaryAverage { nutrients: NutritionFacts; } export interface FoodLogSummary { groupBy: FoodLogSummaryGrouping; /** Null when grouped by day. */ weekStart: WeekStart | null; timezone: string; startDate: string; endDate: string; buckets: FoodLogSummaryBucket[]; totals: FoodLogSummaryTotals; averagePerLoggedDay: FoodLogSummaryAverage; } export interface DeleteFoodLogRequest extends PartnerUserContext { logId: string; signal?: AbortSignal; } export interface ConsumedServing { id: string; quantity: number | null; } /** The catalog serving a logged food refers to; `weightGrams` is null when unknown. */ export interface ServingDetails { id: string; quantity: number; unit: string | null; weightGrams: number | null; } export interface LoggedFood { id: string; name: string | null; brandName?: string | null; imageUrl?: string | null; glycemicIndex?: number | null; glycemicLoad?: number | null; nutrients: NutritionFacts; consumedServing: ConsumedServing; servingDetails: ServingDetails; } export interface FoodLog { id: string | null; foods: LoggedFood[]; timestampUtc: string; name?: string | null; } export interface ListFoodLogsResponse { totalCount: number; items: FoodLog[]; } export type DeleteFoodLogResponse = void; export declare const Sex: { readonly male: 'male'; readonly female: 'female'; }; export type Sex = typeof Sex[keyof typeof Sex]; export declare const Gender: { readonly male: 'male'; readonly female: 'female'; }; export type Gender = Sex; export declare const HeightUnit: { readonly inches: 'in'; readonly centimeters: 'cm'; }; export type HeightUnit = typeof HeightUnit[keyof typeof HeightUnit]; export interface Height { value: number; unit: HeightUnit; } export declare const WeightUnit: { readonly pounds: 'lb'; readonly kilograms: 'kg'; }; export type WeightUnit = typeof WeightUnit[keyof typeof WeightUnit]; /** A weight to send: the unit must be one of `WeightUnit`. */ export interface Weight { value: number; unit: WeightUnit; } /** A weight as January stored it. `unit` is a `WeightUnit` today; a value added later is passed through as a string. */ export interface WeightMeasurement { value: number; unit: WeightUnit | (string & {}); } export declare const ActivityLevel: { readonly sedentary: 'sedentary'; readonly lightlyActive: 'lightly_active'; readonly moderatelyActive: 'moderately_active'; readonly veryActive: 'very_active'; }; export type ActivityLevel = typeof ActivityLevel[keyof typeof ActivityLevel]; export declare const MedicalCondition: { readonly type2Diabetes: 'type_2_diabetes'; readonly prediabetes: 'prediabetes'; }; export type MedicalCondition = typeof MedicalCondition[keyof typeof MedicalCondition]; export interface GlucosePredictionProfile { age: number; sex: Sex; height: Height; weight: Weight; activityLevel?: ActivityLevel; healthConditions?: MedicalCondition[]; } export interface CgmReading { timestamp: string; value: number; } export interface ConsumedHistoricalServing { id: string; quantity: number; } export interface ConsumedHistoricalFood { timestamp: string; id: string; serving: ConsumedHistoricalServing; } export interface PredictGlucoseRequest { userProfile: GlucosePredictionProfile; foods: FoodSelection[]; startTime: Date; cgmData?: CgmReading[]; consumedFoods?: ConsumedHistoricalFood[]; endUserId?: string; endUserTimezone?: string; signal?: AbortSignal; } export interface GlucoseChart { min: number | null; max: number | null; } export interface GlucosePrediction { prediction: GlucosePredictionPoint[]; impact: string | null; chart: GlucoseChart; } export declare const VolumeUnit: { readonly fluidOunces: 'fl_oz'; readonly milliliters: 'ml'; readonly cups: 'cup'; }; export type VolumeUnit = typeof VolumeUnit[keyof typeof VolumeUnit]; /** An amount of water to log: 1–811.5 fl oz, 30–24,000 ml, or 0.1–101.4 US cups (8 fl oz each). */ export interface WaterAmount { value: number; unit: VolumeUnit; } /** A volume as January reports it. `unit` is a `VolumeUnit` today; a value added later is passed through as a string. */ export interface Volume { value: number; unit: VolumeUnit | (string & {}); } /** Logs one amount of water. `consumedAt` defaults to now; its local day is the one the 24 L daily cap counts it against. */ export interface CreateWaterLogRequest extends PartnerUserContext { amount: WaterAmount; consumedAt?: string; signal?: AbortSignal; } /** One water intake as stored. Keep `id` to delete it. */ export interface WaterLog { id: string; amount: Volume; consumedAt: string; } /** * Daily water totals between `start` and `end` (inclusive calendar dates in the user's * timezone, at most 100 days with water logged are returned), in `unit`. */ export interface ListWaterLogsRequest extends PartnerUserContext { start: string; end: string; unit: VolumeUnit; signal?: AbortSignal; } /** Everything logged on one local calendar day. Days with nothing logged are absent. */ export interface DailyWaterTotal { date: string; total: Volume; } export interface ListWaterLogsResponse { items: DailyWaterTotal[]; } /** Deleting an unknown or already-deleted log succeeds too, so a retry is safe. */ export interface DeleteWaterLogRequest extends PartnerUserContext { logId: string; signal?: AbortSignal; } export type DeleteWaterLogResponse = void; /** Logs one weight measurement: 10–1,000 lb or 4.5–453.6 kg. `measuredAt` defaults to now. */ export interface CreateWeightLogRequest extends PartnerUserContext { weight: Weight; measuredAt?: string; signal?: AbortSignal; } /** One weight measurement as stored. */ export interface WeightLog { weight: WeightMeasurement; measuredAt: string; } /** Daily weights between `start` and `end` (inclusive calendar dates in the user's timezone). */ export interface ListWeightLogsRequest extends PartnerUserContext { start: string; end: string; signal?: AbortSignal; } /** The latest weight measured on one local calendar day. Days without a weight are absent. */ export interface DailyWeight { date: string; weight: WeightMeasurement; } export interface ListWeightLogsResponse { items: DailyWeight[]; } import type { FoodLogInputFood as ContractFoodLogInputFood } from './internal/transport/models/FoodLogInputFood.js'; import type { FoodSearchItem as ContractFoodSearchItem } from './internal/transport/models/FoodSearchItem.js'; import type { FoodSuggestion as ContractFoodSuggestion } from './internal/transport/models/FoodSuggestion.js'; import type { Restaurant as ContractRestaurant } from './internal/transport/models/Restaurant.js'; import type { RestaurantMenuSearchItem as ContractRestaurantMenuItem } from './internal/transport/models/RestaurantMenuSearchItem.js'; import type { ServingOption as ContractServingOption } from './internal/transport/models/ServingOption.js'; //# sourceMappingURL=models.d.ts.map