# BatchRequestBuilder

**Kind:** Class

**Source:** [`atloria-monorepo/apps/screenshot-worker/test/helpers/batch-builder.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/screenshot-worker/test/helpers/batch-builder.ts#L19)

Builder for constructing test batch screenshot requests

Usage:
  const batch = new BatchRequestBuilder()
    .withProjectId('test-project')
    .withScreenshot({ url: 'http://localhost:3000', description: 'Test' })
    .build();

## Methods

| Method | Signature | Returns |
|---|---|---|
| `withProjectId` | `withProjectId(projectId: string)` | `this` |
| `withOrganizationId` | `withOrganizationId(organizationId: string)` | `this` |
| `withCapturedBy` | `withCapturedBy(capturedBy: string)` | `this` |
| `withName` | `withName(name: string)` | `this` |
| `withDescription` | `withDescription(description: string)` | `this` |
| `withConfig` | `withConfig(config: Partial<BatchConfigDto>)` | `this` |
| `withAuth` | `withAuth(auth: Partial<BatchAuthConfigDto>)` | `this` |
| `withScreenshot` | `withScreenshot(screenshot: Partial<BatchScreenshotItemDto>)` | `this` |
| `withScreenshots` | `withScreenshots(screenshots: Partial<BatchScreenshotItemDto>[])` | `this` |
| `build` | `build()` | `TakeBatchScreenshotsDto` |

## Where it refuses work

- `BatchRequestBuilder` stops the work with `Error` when `!this.request.screenshots || this.request.screenshots.length === 0` — “At least one screenshot is required”.
