# DocAutomationGateway

**Kind:** Class

**Source:** [`atloria-monorepo/apps/api/src/documentation/doc-automation.gateway.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/documentation/doc-automation.gateway.ts#L55)

**Implements:** `OnGatewayConnection`, `OnGatewayDisconnect`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `handleConnection` | `handleConnection(client: Socket)` | `void` |
| `handleDisconnect` | `handleDisconnect(client: Socket)` | `void` |
| `handleSubscribeToJob` | `handleSubscribeToJob(data: { jobId: string }, client: Socket)` | `void` |
| `handleUnsubscribeFromJob` | `handleUnsubscribeFromJob(data: { jobId: string }, client: Socket)` | `void` |
| `emitJobProgress` | `emitJobProgress(jobId: string, progress: JobProgressEvent)` | `void` |
| `emitJobCompleted` | `emitJobCompleted(jobId: string, result: JobCompletedEvent)` | `void` |
| `emitJobFailed` | `emitJobFailed(jobId: string, error: JobFailedEvent)` | `void` |
| `emitJobCancelled` | `emitJobCancelled(jobId: string)` | `void` |
| `emitReviewNeeded` | `emitReviewNeeded(jobId: string, data: { versionId: string; flaggedCount: number; carriedCount: number })` | `void` |
| `emitScreenshotProgress` | `emitScreenshotProgress(jobId: string, data: {
    batchIndex: number;
    totalBatches: number;
    captured: number;
    totalMappings: number;
    documentsUpdated: string[];
  })` | `void` |
| `emitScreenshotsCompleted` | `emitScreenshotsCompleted(jobId: string, data: {
    total: number;
    captured: number;
    failed: number;
  })` | `void` |
| `emitScreenshotsCancelled` | `emitScreenshotsCancelled(jobId: string)` | `void` |
| `getJobSubscribers` | `getJobSubscribers(jobId: string)` | `string[]` |
| `getJobSubscriberCount` | `getJobSubscriberCount(jobId: string)` | `number` |
| `hasSubscribers` | `hasSubscribers(jobId: string)` | `boolean` |

## Properties

| Property | Type |
|---|---|
| `server` | `Server` |

## Referenced By

- `DocumentationModule` (MODULE_PROVIDES)
- `DocumentationModule` (MODULE_EXPORTS)
- `DocAutomationService` (DEPENDS_ON)
