/** * Tinybird Dashboard URL utilities * * Generates dashboard links for workspaces and branches */ /** * Region information extracted from API URL */ export interface RegionInfo { /** Cloud provider: "gcp" or "aws" */ provider: string; /** Region identifier (e.g., "europe-west3", "us-east4", "us-west-2") */ region: string; } /** * Parse an API URL to extract region information * * @param apiUrl - The Tinybird API base URL (e.g., "https://api.tinybird.co") * @returns Region info or null if the URL doesn't match a known region * * @example * ```ts * parseApiUrl("https://api.tinybird.co") * // => { provider: "gcp", region: "europe-west3" } * * parseApiUrl("https://api.us-west-2.aws.tinybird.co") * // => { provider: "aws", region: "us-west-2" } * ``` */ export declare function parseApiUrl(apiUrl: string): RegionInfo | null; /** * Generate a Tinybird dashboard URL for a workspace * * @param apiUrl - The Tinybird API base URL * @param workspaceName - The workspace name * @returns Dashboard URL or null if the API URL is not recognized * * @example * ```ts * getDashboardUrl("https://api.tinybird.co", "my_workspace") * // => "https://cloud.tinybird.co/gcp/europe-west3/my_workspace" * ``` */ export declare function getDashboardUrl(apiUrl: string, workspaceName: string): string | null; /** * Generate a Tinybird dashboard URL for a branch * * @param apiUrl - The Tinybird API base URL * @param workspaceName - The workspace name * @param branchName - The branch name * @returns Dashboard URL or null if the API URL is not recognized * * @example * ```ts * getBranchDashboardUrl("https://api.tinybird.co", "my_workspace", "feature_branch") * // => "https://cloud.tinybird.co/gcp/europe-west3/my_workspace~feature_branch" * ``` */ export declare function getBranchDashboardUrl(apiUrl: string, workspaceName: string, branchName: string): string | null; /** * Generate a local Tinybird dashboard URL * * The URL follows the format: https://cloud.tinybird.co/{provider}/{region}/{cloudWorkspaceName}~local~{localWorkspaceName} * * @param apiUrl - The Tinybird API base URL (e.g., "https://api.tinybird.co") * @param cloudWorkspaceName - The cloud workspace name (e.g., "tssdkgnzinit") * @param localWorkspaceName - The local workspace/branch name (e.g., "rama_nuria") * @returns Local dashboard URL or null if the API URL is not recognized * * @example * ```ts * getLocalDashboardUrl("https://api.tinybird.co", "tssdkgnzinit", "rama_nuria") * // => "https://cloud.tinybird.co/gcp/europe-west3/tssdkgnzinit~local~rama_nuria" * ``` */ export declare function getLocalDashboardUrl(apiUrl: string, cloudWorkspaceName: string, localWorkspaceName: string): string | null; //# sourceMappingURL=dashboard.d.ts.map