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 * 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 { FetchReadToken } from "./FetchReadToken.ts"; |
| 7 | |
| 8 | /** |
| 9 | * HTTP implementation of {@link FetchReadToken}. |
| 10 | * |
| 11 | * @layer |
| 12 | * @provides GCP.DeveloperConnect.FetchReadToken |
| 13 | */ |
| 14 | export const FetchReadTokenHttp = Layer.effect( |
| 15 | FetchReadToken, |
| 16 | makeGitRepositoryLinkHttpBinding< |
| 17 | developerconnect.FetchReadTokenProjectsLocationsConnectionsGitRepositoryLinksRequest, |
| 18 | developerconnect.FetchReadTokenResponse, |
| 19 | developerconnect.FetchReadTokenProjectsLocationsConnectionsGitRepositoryLinksError |
| 20 | >({ |
| 21 | tag: "GCP.DeveloperConnect.FetchReadToken", |
| 22 | iam: { role: "roles/developerconnect.readTokenAccessor" }, |
| 23 | operation: Effect.gen(function* () { |
| 24 | const call = yield* GCPBindings.withCredentials( |
| 25 | developerconnect.fetchReadTokenProjectsLocationsConnectionsGitRepositoryLinks, |
| 26 | ); |
| 27 | return ( |
| 28 | input: developerconnect.FetchReadTokenProjectsLocationsConnectionsGitRepositoryLinksRequest, |
| 29 | ) => call(input); |
| 30 | }), |
| 31 | }), |
| 32 | ); |