UNPKG

adk-typescript

Version:

TypeScript port of Google's Agent Development Kit (ADK)

74 lines (73 loc) 2.41 kB
import { GoogleApiTool, RestApiTool } from './GoogleApiTool'; /** * OpenAPIToolset interface (placeholder for actual implementation) */ export interface OpenAPIToolset { getTools: () => RestApiTool[]; } /** * OpenIdConnectWithConfig interface */ export interface OpenIdConnectWithConfig { authorizationEndpoint: string; tokenEndpoint: string; userinfoEndpoint: string; revocationEndpoint: string; tokenEndpointAuthMethodsSupported: string[]; grantTypesSupported: string[]; scopes: string[]; } /** * GoogleApiToOpenApiConverter interface (placeholder for actual implementation) */ export interface GoogleApiToOpenApiConverter { convert: () => Promise<Record<string, any>>; } /** * GoogleApiToolSet class * Manages a set of GoogleApiTool instances for interacting with Google APIs */ export declare class GoogleApiToolSet { private tools; /** * Create a new GoogleApiToolSet * @param tools The underlying RestApiTool instances to wrap */ constructor(tools: RestApiTool[]); /** * Get all tools in the toolset * @returns All GoogleApiTool instances in this toolset */ getTools(): GoogleApiTool[]; /** * Get a tool by name * @param toolName The name of the tool to find * @returns The matching GoogleApiTool or undefined if not found */ getTool(toolName: string): GoogleApiTool | undefined; /** * Configure authentication for all tools in the toolset * @param clientId The OAuth2 client ID * @param clientSecret The OAuth2 client secret */ configureAuth(clientId: string, clientSecret: string): void; /** * Load a toolset for a specific Google API * * @param apiName The name of the Google API * @param apiVersion The version of the Google API * @returns A new GoogleApiToolSet for the specified API */ static loadToolSet(apiName: string, apiVersion: string): Promise<GoogleApiToolSet>; /** * Load a tool set with OpenID Connect authentication * * Note: This is a placeholder implementation until the OpenAPIToolset is implemented * * @param specFile Path to an OpenAPI spec file * @param specDict OpenAPI spec as a dictionary * @param scopes OAuth2 scopes to request * @returns An OpenAPIToolset or undefined if not possible */ private static _loadToolSetWithOidcAuth; }