Skip to main content
import type { ServerResponse, ServerResponseError } from '@collab-kit/utils';

ServerResponse

Standard response envelope used by all API endpoints.
interface ServerResponse<T extends object = Record<string, never>> {
  type: string;
  success: boolean;
  description: string;
  data: T;
  error: ServerResponseError | null;
  requestId?: string;
}

ServerResponseError

Error details returned when success is false.
interface ServerResponseError {
  module: Module;
  code: ResponseCode;
  message: string;
}