/**
 * V2 Shared Workspace Controller
 *
 * CRUD + CAS endpoints for versioned JSON workspaces.
 *
 * Endpoints:
 * - GET    /api/v2/workspaces          — list all workspaces
 * - GET    /api/v2/workspaces/:id      — read workspace (data + version)
 * - POST   /api/v2/workspaces          — create workspace
 * - PUT    /api/v2/workspaces/:id      — write data (CAS, 409 on conflict)
 * - PUT    /api/v2/workspaces/:id/structured — structured write (path + value)
 * - DELETE /api/v2/workspaces/:id      — delete workspace
 *
 * @module controllers/v2-workspace/workspace.controller
 */
import type { Request, Response, NextFunction } from 'express';
import type { WorkspaceService } from '../../services/workspace/workspace.service.js';
/**
 * Set the WorkspaceService instance.
 * Called during server initialization.
 *
 * @param service - The WorkspaceService instance
 */
export declare function setWorkspaceService(service: WorkspaceService): void;
/**
 * GET /api/v2/workspaces
 *
 * Lists all workspaces with full data.
 */
export declare function listWorkspaces(_req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * GET /api/v2/workspaces/:id
 *
 * Reads a single workspace. Returns the full workspace including data and version.
 */
export declare function readWorkspace(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * POST /api/v2/workspaces
 *
 * Creates a new workspace.
 * Body: CreateWorkspaceInput (name, ownerType, ownerId required)
 */
export declare function createWorkspaceHandler(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * PUT /api/v2/workspaces/:id
 *
 * Writes data to a workspace with CAS validation.
 * Body: { expectedVersion: number, data: {}, writerId: string }
 *
 * Returns 409 Conflict if expectedVersion doesn't match current version.
 * Returns 403 Forbidden if writerId is not authorized.
 */
export declare function writeWorkspace(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * PUT /api/v2/workspaces/:id/structured
 *
 * Structured write — sets a value at a specific dot-notation path.
 * Body: { expectedVersion: number, path: string, value: any, writerId: string }
 *
 * Workspace must be in 'structured' access mode.
 * Returns 409 Conflict if expectedVersion doesn't match.
 * Returns 403 Forbidden if writerId is not authorized.
 * Returns 400 if workspace is not in structured mode.
 */
export declare function writeStructuredWorkspace(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
 * DELETE /api/v2/workspaces/:id
 *
 * Deletes a workspace.
 */
export declare function deleteWorkspace(req: Request, res: Response, next: NextFunction): Promise<void>;
//# sourceMappingURL=workspace.controller.d.ts.map