The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type * as cloudrun from "@distilled.cloud/gcp/run_v2"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type { RuntimeContext } from "alchemy/RuntimeContext"; |
| 4 | import type * as Effect from "effect/Effect"; |
| 5 | import type { Job } from "./Job.ts"; |
| 6 | |
| 7 | export interface RunJobRequest extends Omit<cloudrun.RunProjectsLocationsJobsRequest, "name"> {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for Cloud Run `jobs.run`. |
| 11 | * |
| 12 | * Triggers a new execution of the bound {@link Job}. Provide |
| 13 | * {@link RunJobHttp}. |
| 14 | * |
| 15 | * ### Running Jobs |
| 16 | * **Example:** Trigger an execution |
| 17 | * ```typescript |
| 18 | * const runJob = yield* GCP.Run.RunJob(job); |
| 19 | * yield* runJob(); |
| 20 | * ``` |
| 21 | * |
| 22 | * **Example:** Override task count |
| 23 | * ```typescript |
| 24 | * const runJob = yield* GCP.Run.RunJob(job); |
| 25 | * yield* runJob({ |
| 26 | * body: { overrides: { taskCount: 1 } }, |
| 27 | * }); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | * @category Run |
| 32 | */ |
| 33 | export interface RunJob extends Binding.Service< |
| 34 | RunJob, |
| 35 | "GCP.Run.RunJob", |
| 36 | ( |
| 37 | job: Job, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request?: RunJobRequest, |
| 41 | ) => Effect.Effect< |
| 42 | cloudrun.GoogleLongrunningOperation, |
| 43 | cloudrun.RunProjectsLocationsJobsError, |
| 44 | RuntimeContext |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | |
| 49 | export const RunJob = Binding.Service<RunJob>("GCP.Run.RunJob"); |