The best way to control Claude Code, Codex and more from any computer or phone

main
ts 12 lines 542 Bytes
Raw
1 import * as documentai from "@distilled.cloud/gcp/documentai_v1";
2 import { waitForOperation as waitForGcpOperation } from "../Operation.ts";
3
4 /**
5 * Wait for a Document AI long-running operation. Processor create is
6 * synchronous; enable, disable, delete, and schema deletes are LROs that
7 * finish within a few minutes.
8 */
9 export const waitForOperation = (operation: documentai.GoogleLongrunningOperation) =>
10 waitForGcpOperation(operation, (name) => documentai.getProjectsLocationsOperations({ name }), {
11 budget: "10 minutes",
12 });