// Type declaration for optional peer dependency @intuned/runtime // When the package is installed, its actual types will be used instead declare module "@intuned/runtime" { import type { BrowserContext, Page } from "playwright"; export interface Proxy { server: string; username: string; password: string; } export type WithPlaywrightContextWrappedFunction = ( context: BrowserContext, page: Page ) => Promise; export function getExecutionContext(): any; export function extendTimeout(): void; export function runWithContext( context: any, fn: () => T | Promise ): Promise; export function getDownloadDirectoryPath(): string; export function withPlaywrightContext( options: { proxy?: Proxy; headless: boolean; downloadsPath: string; importFunction?: any; apiName?: string; apiParameters?: any; }, fn: WithPlaywrightContextWrappedFunction ): Promise; export function withPlaywrightContext( options: { cdpAddress: string; importFunction?: any; apiName?: string; apiParameters?: any; }, fn: WithPlaywrightContextWrappedFunction ): Promise; // Add other exports from @intuned/runtime if needed } declare module "@intuned/runtime/dist/common/jwtTokenManager" { export interface BackendFunctionsTokenManager { getToken(): Promise; refreshToken(): Promise; clearToken(): void; // Add other methods as needed } export const backendFunctionsTokenManager: BackendFunctionsTokenManager; export function callBackendFunctionWithToken( functionName: string, params?: any ): Promise; }