/** * Preview environment detection and branch token resolution * * Automatically detects preview/CI environments and resolves the appropriate * Tinybird branch token for the current git branch. */ /** * Detect if we're running in a preview/CI environment */ export declare function isPreviewEnvironment(): boolean; /** * Get the current git branch name from environment variables * Supports various CI platforms */ export declare function getPreviewBranchName(): string | null; /** * Resolve the token to use for API calls * * Priority: * 1. Explicit TINYBIRD_BRANCH_TOKEN env var * 2. In preview environment: fetch branch token using workspace token * 3. Fall back to TINYBIRD_TOKEN * * @param options - Optional configuration overrides * @returns The resolved token to use */ export declare function resolveToken(options?: { baseUrl?: string; token?: string; fetch?: typeof fetch; }): Promise; /** * Clear the cached branch token * Useful for testing or when switching branches */ export declare function clearTokenCache(): void; //# sourceMappingURL=preview.d.ts.map