Vytvoření nové extrakční tabulky a spuštění zpracování.
const table = await client.tables.create({ schema_id: "schema_abc123", name: "Q1 Product Catalog", file_ids: ["file_xyz789"], webhook_url: "https://your-server.com/webhooks", }); console.log(table.id); // "tbl_..." console.log(table.status); // "processing"
{ "id": "tbl_abc123", "name": "Q1 Product Catalog", "schema_id": "schema_xyz789", "status": "processing", "progress": 0, "total_rows": 0, "source_type": "files", "additional_context": null, "enhancement_context": null, "error_message": null, "files": [ { "name": "catalog.pdf", "path": "company_123/file_xyz/catalog.pdf", "size": 1048576 } ], "created_at": "2025-03-10T14:30:00.000Z", "updated_at": "2025-03-10T14:30:00.000Z" }
file_ids
file_urls
source_text
processing
files
text
const completed = await client.tables.waitForCompletion(table.id, { intervalMs: 3000, timeoutMs: 300000, }); console.log(completed.status); // "completed" console.log(completed.total_rows); // 42