@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 06:00 UTC

main
ts 44 lines 1.32 KB
Raw
1 import type * as scheduler from "@distilled.cloud/gcp/cloudscheduler_v1";
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 ResumeJobRequest extends Omit<
8 scheduler.ResumeProjectsLocationsJobsRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Cloud Scheduler `jobs.resume`.
14 *
15 * Bind this operation to a {@link Job} in a Function/Action init phase.
16 * Provide {@link ResumeJobHttp}.
17 *
18 * Grants `roles/cloudscheduler.admin` on the project: it is the only
19 * predefined role with `cloudscheduler.jobs.enable`, and Cloud Scheduler has
20 * neither per-job IAM policies nor IAM Conditions on `resource.name`.
21 *
22 * ### Resuming Jobs
23 * **Example:** Resume the bound job
24 * ```typescript
25 * const resumeJob = yield* GCP.CloudScheduler.ResumeJob(ping);
26 * yield* resumeJob();
27 * ```
28 *
29 * @binding
30 * @category CloudScheduler
31 */
32 export interface ResumeJob extends Binding.Service<
33 ResumeJob,
34 "GCP.CloudScheduler.ResumeJob",
35 (
36 job: Job,
37 ) => Effect.Effect<
38 (
39 request?: ResumeJobRequest,
40 ) => Effect.Effect<scheduler.Job, scheduler.ResumeProjectsLocationsJobsError, RuntimeContext>
41 >
42 > {}
43
44 export const ResumeJob = Binding.Service<ResumeJob>("GCP.CloudScheduler.ResumeJob");