/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { OAuth2Client } from 'google-auth-library'; import { type CodeAssistGlobalUserSettingResponse, type LoadCodeAssistRequest, type LoadCodeAssistResponse, type LongRunningOperationResponse, type OnboardUserRequest, type RetrieveUserQuotaRequest, type RetrieveUserQuotaResponse, type SetCodeAssistGlobalUserSettingRequest } from './types.js'; import { type CountTokensParameters, CountTokensResponse, type EmbedContentParameters, EmbedContentResponse, type GenerateContentParameters, GenerateContentResponse } from '@google/genai'; import { type ContentGenerator } from '../core/contentGenerator.js'; import { UserTierId } from './types.js'; /** HTTP options to be used in each of the requests. */ export interface HttpOptions { /** Additional HTTP headers to be sent with the request. */ headers?: Record; } export declare const CODE_ASSIST_ENDPOINT = "https://cloudcode-pa.googleapis.com"; export declare const CODE_ASSIST_API_VERSION = "v1internal"; export declare class CodeAssistServer implements ContentGenerator { readonly client: OAuth2Client; readonly projectId?: string | undefined; readonly httpOptions: HttpOptions; readonly userTier?: UserTierId | undefined; readonly baseURL?: string | undefined; constructor(client: OAuth2Client, projectId?: string | undefined, httpOptions?: HttpOptions, userTier?: UserTierId | undefined, baseURL?: string | undefined); generateContentStream(req: GenerateContentParameters, userPromptId: string): Promise>; generateContent(req: GenerateContentParameters, userPromptId: string): Promise; onboardUser(req: OnboardUserRequest): Promise; loadCodeAssist(req: LoadCodeAssistRequest): Promise; getCodeAssistGlobalUserSetting(): Promise; setCodeAssistGlobalUserSetting(req: SetCodeAssistGlobalUserSettingRequest): Promise; retrieveUserQuota(req: RetrieveUserQuotaRequest): Promise; countTokens(req: CountTokensParameters): Promise; embedContent(_req: EmbedContentParameters): Promise; requestPost(method: string, req: object, signal?: AbortSignal): Promise; requestGet(method: string, signal?: AbortSignal): Promise; requestStreamingPost(method: string, req: object, signal?: AbortSignal): Promise>; getMethodUrl(method: string): string; }