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

main
ts 32 lines 1.18 KB
Raw
1 import * as developerconnect from "@distilled.cloud/gcp/developerconnect_v1";
2 import * as Effect from "effect/Effect";
3 import * as Layer from "effect/Layer";
4 import * as GCPBindings from "../GCPBindings.ts";
5 import { makeGitRepositoryLinkHttpBinding } from "./BindingHttp.ts";
6 import { FetchGitRefs } from "./FetchGitRefs.ts";
7
8 /**
9 * HTTP implementation of {@link FetchGitRefs}.
10 *
11 * @layer
12 * @provides GCP.DeveloperConnect.FetchGitRefs
13 */
14 export const FetchGitRefsHttp = Layer.effect(
15 FetchGitRefs,
16 makeGitRepositoryLinkHttpBinding<
17 developerconnect.FetchGitRefsProjectsLocationsConnectionsGitRepositoryLinksRequest,
18 developerconnect.FetchGitRefsResponse,
19 developerconnect.FetchGitRefsProjectsLocationsConnectionsGitRepositoryLinksError
20 >({
21 tag: "GCP.DeveloperConnect.FetchGitRefs",
22 iam: { role: "roles/developerconnect.user" },
23 operation: Effect.gen(function* () {
24 const call = yield* GCPBindings.withCredentials(
25 developerconnect.fetchGitRefsProjectsLocationsConnectionsGitRepositoryLinks,
26 );
27 return (
28 input: developerconnect.FetchGitRefsProjectsLocationsConnectionsGitRepositoryLinksRequest,
29 ) => call(input);
30 }),
31 }),
32 );