/** * January AI - Nutrition Intelligence APIs * Build food and metabolic intelligence into your product — one API for understanding what people eat and how food may affect them. **Clinical-grade precision, consumer-grade experiences.** January builds the infrastructure underneath the product: turning messy health and nutrition data into reliable intelligence, so your team spends its time on the experience instead of the foundation. **Security & compliance** — **SOC 2 Type II** · **HIPAA-aligned practices** · **BAA** and **Zero Data Retention (ZDR)** available **What you can build** - **Scan food** — photo and text food recognition: detect foods and nutrition, then correct results conversationally - **Search the food database** — by name or barcode — and get healthier alternatives for any food - **Log food, water and weight** — per-user diaries with day-range queries - **Predict glucose response** to any meal — no sensor required **Getting started** 1. Create an API key in the [Developer Dashboard](https://dashboard.january.ai) — the full key is shown once, at creation. 2. Send it as `Authorization: Bearer sk-…` — click **Authorize** here to make every example below a live request. 3. On the endpoints that read or write an end user\'s logs, say whose with the `January-End-User-ID` header — each one documents it. No other endpoint takes it: everything else either asks the shared food database a question or works on the body you send, and neither depends on who the food is for. **Calling from a mobile app** — your `sk-` key must never ship inside an app. Instead, exchange it on your backend for a *client token*: a credential that lasts up to two hours, acts as exactly one of your end users, and carries only the scopes you grant it (see the **authentication** section). Your app then calls these endpoints directly, with no proxy of your own in the request path. Both credentials travel in the same `Authorization: Bearer` header, and every endpoint below opens by saying which it accepts — **API key or client token**, or **API key only**. **Support** — [support@january.ai](mailto:support@january.ai) · [Discord community](https://discord.gg/cYQeh3UnC) · [docs.january.ai](https://docs.january.ai) * * The version of the OpenAPI document: 1.2 * Contact: support@january.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { FoodLogSummaryAverage } from './FoodLogSummaryAverage.js'; import type { FoodLogSummaryTotals } from './FoodLogSummaryTotals.js'; import type { FoodLogSummaryBucket } from './FoodLogSummaryBucket.js'; /** * * @export * @interface FoodLogSummary */ export interface FoodLogSummary { /** * The bucket size used, echoing the request. * @type {FoodLogSummaryGroupByEnum} * @memberof FoodLogSummary */ groupBy: FoodLogSummaryGroupByEnum; /** * The weekday week buckets begin on. Always present; `null` when `group_by=day`, where it does not apply. * @type {FoodLogSummaryWeekStartEnum} * @memberof FoodLogSummary */ weekStart: FoodLogSummaryWeekStartEnum | null; /** * The IANA timezone the buckets were cut in — the canonical spelling of what was requested. * @type {string} * @memberof FoodLogSummary */ timezone: string; /** * First local calendar date of the summarized range, echoing the request. * @type {Date} * @memberof FoodLogSummary */ startDate: Date; /** * Last local calendar date of the summarized range, inclusive. * @type {Date} * @memberof FoodLogSummary */ endDate: Date; /** * The buckets tiling the range, in chronological order and covering it end to end — a day or week with no logs is returned with zero counts rather than skipped. * @type {Array} * @memberof FoodLogSummary */ buckets: Array; /** * * @type {FoodLogSummaryTotals} * @memberof FoodLogSummary */ totals: FoodLogSummaryTotals; /** * * @type {FoodLogSummaryAverage} * @memberof FoodLogSummary */ averagePerLoggedDay: FoodLogSummaryAverage; } /** * @export */ export declare const FoodLogSummaryGroupByEnum: { readonly day: 'day'; readonly week: 'week'; readonly unknownDefaultOpenApi: '11184809'; }; export type FoodLogSummaryGroupByEnum = typeof FoodLogSummaryGroupByEnum[keyof typeof FoodLogSummaryGroupByEnum]; /** * @export */ export declare const FoodLogSummaryWeekStartEnum: { readonly monday: 'monday'; readonly sunday: 'sunday'; readonly unknownDefaultOpenApi: '11184809'; }; export type FoodLogSummaryWeekStartEnum = typeof FoodLogSummaryWeekStartEnum[keyof typeof FoodLogSummaryWeekStartEnum]; /** * Check if a given object implements the FoodLogSummary interface. */ export declare function instanceOfFoodLogSummary(value: object): value is FoodLogSummary; export declare function FoodLogSummaryFromJSON(json: any): FoodLogSummary; export declare function FoodLogSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodLogSummary; export declare function FoodLogSummaryToJSON(json: any): FoodLogSummary; export declare function FoodLogSummaryToJSONTyped(value?: FoodLogSummary | null, ignoreDiscriminator?: boolean): any; //# sourceMappingURL=FoodLogSummary.d.ts.map