[ { "collMod": "documents_document", "validator": { "$jsonSchema": { "bsonType": "object", "required": [ "_id", "version", "created_at", "updated_at", "org_id", "workspace_id", "project_id", "file_id", "filename", "status" ], "properties": { "_id": { "bsonType": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "version": { "bsonType": "number" }, "created_at": { "bsonType": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "updated_at": { "bsonType": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "org_id": { "bsonType": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "workspace_id": { "bsonType": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "project_id": { "bsonType": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "file_id": { "bsonType": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "filename": { "bsonType": "string" }, "status": { "bsonType": "string", "enum": ["processing", "extracted", "failed"] }, "ocr_job_id": { "bsonType": ["number", "null"] }, "page_count": { "bsonType": ["number", "null"] }, "proposed_count": { "bsonType": ["number", "null"] }, "failure_code": { "bsonType": ["string", "null"], "enum": [ "file_missing", "file_changed", "ocr_failed", "extraction_refused", "extraction_truncated", "extraction_invalid" ] }, "skipped_pages": { "bsonType": ["array", "null"], "items": { "bsonType": "object", "required": ["page", "pageClass"], "properties": { "page": { "bsonType": "number" }, "pageClass": { "bsonType": "string", "enum": ["text", "table", "drawing", "scan", "empty"] } }, "additionalProperties": false } }, "finished_at": { "bsonType": ["string", "null"] } }, "additionalProperties": false } } } ]