/** * Dexcom Developer API client (sandbox + production). * Docs: https://developer.dexcom.com/docs/dexcomv2/overview * * v0.1 ships: * - OAuth authorize URL builder * - Token exchange (auth_code → access_token) * - EGV (estimated glucose value) read * - Mock mode when no token is present */ import { type DexcomEnv } from "../constants.js"; import type { GlucoseReading } from "./glucose-engine.js"; export interface DexcomTokens { access_token: string; refresh_token: string; expires_at: string; scope: string; } export interface DexcomClientOptions { env?: DexcomEnv; clientId?: string; clientSecret?: string; redirectUri?: string; fetchImpl?: typeof fetch; accessToken?: string; } export declare class DexcomClient { readonly env: DexcomEnv; readonly baseUrl: string; readonly clientId?: string; readonly clientSecret?: string; readonly redirectUri?: string; readonly accessToken?: string; private readonly fetchImpl; constructor(opts?: DexcomClientOptions); hasAuth(): boolean; buildAuthorizeUrl(state?: string, scope?: string): string; exchangeAuthCode(code: string): Promise; getEgvs(startDate: string, endDate: string): Promise; }