/**
 * Cloud Google OAuth Controller
 *
 * Handles Google OAuth login flow for the CrewlyAI Cloud Console.
 * Provides both browser-redirect (GET) and API (POST) flows.
 *
 * Routes:
 * - GET  /api/cloud/google/start    -> Redirects to Google consent screen
 * - GET  /api/cloud/google/callback  -> Handles Google redirect, issues JWT, redirects to frontend
 * - POST /api/cloud/google/url       -> Returns Google OAuth URL as JSON (for SPA clients)
 * - POST /api/cloud/google/callback  -> Exchanges code for JWT, returns JSON (for SPA clients)
 *
 * @module controllers/cloud/cloud-google-auth.controller
 */
import type { Request, Response, NextFunction } from 'express';
/**
 * Sign a JWT using HMAC-SHA256.
 *
 * @param payload - JWT payload object
 * @returns Signed JWT string (header.payload.signature)
 */
export declare function signJwt(payload: Record<string, unknown>): string;
/**
 * Verify a JWT signed with HMAC-SHA256.
 *
 * @param token - JWT string (header.payload.signature)
 * @returns Decoded payload if valid, null if invalid or expired
 */
export declare function verifyJwt(token: string): Record<string, unknown> | null;
/**
 * GET /api/cloud/google/start
 *
 * Redirects the browser to the Google OAuth consent screen.
 *
 * @param req - Express request with optional query: { redirect }
 * @param res - Express response (302 redirect)
 * @param next - Next function for error propagation
 */
export declare function cloudGoogleStart(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * GET /api/cloud/google/callback
 *
 * Handles the Google OAuth redirect, exchanges code, issues JWT, and redirects.
 *
 * @param req - Express request with query: { code, state? }
 * @param res - Express response (302 redirect to frontend)
 * @param next - Next function for error propagation
 */
export declare function cloudGoogleCallback(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * POST /api/cloud/google/url
 *
 * Returns the Google OAuth consent URL as JSON (for SPA clients).
 *
 * @param req - Request with optional body: { redirectTo, redirectUrl }
 * @param res - Response returning { success, data: { url } }
 * @param next - Next function for error propagation
 */
export declare function cloudGoogleUrl(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * POST /api/cloud/google/callback
 *
 * SPA-friendly code exchange: accepts { code } in body, returns JWT + user as JSON.
 *
 * @param req - Request with body: { code }
 * @param res - Response returning { success, data: { accessToken, refreshToken, expiresIn, user } }
 * @param next - Next function for error propagation
 */
export declare function cloudGoogleCallbackPost(req: Request, res: Response, next: NextFunction): Promise<void>;
//# sourceMappingURL=cloud-google-auth.controller.d.ts.map