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

main
ts 27 lines 902 Bytes
Raw
1 import * as scheduler from "@distilled.cloud/gcp/cloudscheduler_v1";
2 import { Credentials } from "@distilled.cloud/gcp/Credentials";
3 import * as HttpClient from "effect/http/HttpClient";
4 import * as Layer from "effect/Layer";
5 import { makeJobHttpBinding } from "./BindingHttp.ts";
6 import { RunJob } from "./RunJob.ts";
7
8 /**
9 * HTTP implementation of {@link RunJob}.
10 *
11 * @layer
12 * @provides GCP.CloudScheduler.RunJob
13 */
14 export const RunJobHttp: Layer.Layer<RunJob, never, Credentials | HttpClient.HttpClient> =
15 Layer.effect(
16 RunJob,
17 makeJobHttpBinding<
18 scheduler.RunProjectsLocationsJobsRequest,
19 scheduler.Job,
20 scheduler.RunProjectsLocationsJobsError
21 >({
22 tag: "GCP.CloudScheduler.RunJob",
23 // Cloud Scheduler has no resource-level IAM.
24 iam: { role: "roles/cloudscheduler.jobRunner" },
25 operation: scheduler.runProjectsLocationsJobs,
26 }),
27 );