-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathfileProcessing.ts
More file actions
49 lines (45 loc) · 1.37 KB
/
fileProcessing.ts
File metadata and controls
49 lines (45 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* File Processing API Schema definitions
*
* Contains file processing endpoints for:
* - Listing available processors
* - Reading and updating processor configuration
*/
import type { FileProcessorId, FileProcessorOverride } from '@shared/data/preference/preferenceTypes'
import type { FileProcessorMerged } from '@shared/data/presets/file-processing'
// ============================================================================
// API Schema Definitions
// ============================================================================
/**
* File Processing API Schema definitions
*/
export interface FileProcessingSchemas {
/**
* List available processors
* @example GET /file-processing/processors
*/
'/file-processing/processors': {
/** Get list of available processors */
GET: {
response: FileProcessorMerged[]
}
}
/**
* Get or update processor configuration
* @example GET /file-processing/processors/tesseract
* @example PATCH /file-processing/processors/tesseract { "apiKeys": ["xxx"] }
*/
'/file-processing/processors/:id': {
/** Get processor configuration */
GET: {
params: { id: FileProcessorId }
response: FileProcessorMerged
}
/** Update processor configuration */
PATCH: {
params: { id: FileProcessorId }
body: FileProcessorOverride
response: FileProcessorMerged
}
}
}