/** * @license * Copyright 2025 Vybestack LLC * SPDX-License-Identifier: Apache-2.0 */ import { z } from 'zod'; /** * Schema for a single quota bucket from the CodeAssist retrieveUserQuota API */ export declare const GeminiBucketInfoSchema: z.ZodObject<{ remainingAmount: z.ZodOptional; remainingFraction: z.ZodOptional; resetTime: z.ZodOptional; tokenType: z.ZodOptional; modelId: z.ZodOptional; }, "strip", z.ZodTypeAny, { modelId?: string | undefined; tokenType?: string | undefined; remainingAmount?: string | undefined; remainingFraction?: number | undefined; resetTime?: string | undefined; }, { modelId?: string | undefined; tokenType?: string | undefined; remainingAmount?: string | undefined; remainingFraction?: number | undefined; resetTime?: string | undefined; }>; /** * Schema for the full retrieveUserQuota response */ export declare const GeminiQuotaResponseSchema: z.ZodObject<{ buckets: z.ZodOptional; remainingFraction: z.ZodOptional; resetTime: z.ZodOptional; tokenType: z.ZodOptional; modelId: z.ZodOptional; }, "strip", z.ZodTypeAny, { modelId?: string | undefined; tokenType?: string | undefined; remainingAmount?: string | undefined; remainingFraction?: number | undefined; resetTime?: string | undefined; }, { modelId?: string | undefined; tokenType?: string | undefined; remainingAmount?: string | undefined; remainingFraction?: number | undefined; resetTime?: string | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { buckets?: { modelId?: string | undefined; tokenType?: string | undefined; remainingAmount?: string | undefined; remainingFraction?: number | undefined; resetTime?: string | undefined; }[] | undefined; }, { buckets?: { modelId?: string | undefined; tokenType?: string | undefined; remainingAmount?: string | undefined; remainingFraction?: number | undefined; resetTime?: string | undefined; }[] | undefined; }>; export type GeminiBucketInfo = z.infer; export type GeminiQuotaResponse = z.infer; /** * Fetch Gemini quota information from the CodeAssist retrieveUserQuota endpoint. * Requires a Google OAuth access token from the token store. * * Two-step process: * 1. Call loadCodeAssist to obtain the user's projectId * 2. Call retrieveUserQuota with that projectId to get per-model bucket quota info * * @param accessToken - Google OAuth access token * @returns Quota info if available, null on error */ export declare function fetchGeminiQuota(accessToken: string): Promise;