@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 34 lines 1.12 KB
Raw
1 import * as GCP from "@alchemy.run/gcp";
2 import * as Effect from "effect/Effect";
3 import { serveProbes } from "../../bindingHost.ts";
4
5 /**
6 * `…/connections/{c}/entityTypes/{type}` of an existing Integration
7 * Connectors connection (the test is gated on it being set).
8 */
9 export const ENTITY_TYPE_PARENT = (process.env.GCP_TEST_CONNECTORS_PARENT ?? "").trim();
10
11 /** Entity GetEntity reads. */
12 export const Account = GCP.Connectors.ConnectionsEntityTypesEntity("Account", {
13 parent: ENTITY_TYPE_PARENT,
14 fields: { Name: "Alchemy Binding" },
15 });
16
17 /**
18 * Effect-native Cloud Run service exercising every Integration Connectors
19 * binding as its own runtime service account. Deployed from
20 * {@link ../Bindings.test.ts}.
21 */
22 export default class ConnectorsBindingsHost extends GCP.Function<ConnectorsBindingsHost>()(
23 "ConnectorsBindingsHost",
24 { main: import.meta.url, invokerIamDisabled: true },
25 Effect.gen(function* () {
26 const getEntity = yield* GCP.Connectors.GetEntity(Account);
27
28 return {
29 fetch: serveProbes({
30 getEntity: getEntity(),
31 }),
32 };
33 }).pipe(Effect.provide(GCP.Connectors.GetEntityHttp)),
34 ) {}