( doc: DocumentData, knowledgeBaseId: string, processingOptions: ProcessingOptions, requestId: string )
| 376 | const TRIGGER_BATCH_SIZE = 1000 |
| 377 | |
| 378 | function buildJobPayload( |
| 379 | doc: DocumentData, |
| 380 | knowledgeBaseId: string, |
| 381 | processingOptions: ProcessingOptions, |
| 382 | requestId: string |
| 383 | ): DocumentProcessingPayload { |
| 384 | return { |
| 385 | knowledgeBaseId, |
| 386 | documentId: doc.documentId, |
| 387 | docData: { |
| 388 | filename: doc.filename, |
| 389 | fileUrl: doc.fileUrl, |
| 390 | fileSize: doc.fileSize, |
| 391 | mimeType: doc.mimeType, |
| 392 | }, |
| 393 | processingOptions, |
| 394 | requestId, |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | /** |
| 399 | * Dispatches document processing jobs via Trigger.dev's `batchTrigger` when |
no outgoing calls
no test coverage detected