@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 27 lines 692 Bytes
Raw
1 import type { Output } from "alchemy/Output";
2 import {
3 makeNamedHttpBinding as makeGcpNamedHttpBinding,
4 type BindingIam,
5 type GcpHttpOp,
6 } from "../HttpBinding.ts";
7
8 /**
9 * Shared HTTP scaffolding for AI Platform named-resource bindings.
10 * NOT exported from index.ts.
11 */
12 export const makeNamedHttpBinding = <
13 Resource extends { name: Output<string, never>; LogicalId: string },
14 I extends { name: string },
15 A,
16 E,
17 >(options: {
18 tag: string;
19 operation: GcpHttpOp<I, A, E>;
20 iam: BindingIam;
21 }) =>
22 makeGcpNamedHttpBinding<Resource, I, A, E>({
23 tag: options.tag,
24 operation: options.operation,
25 iam: options.iam,
26 resourceName: (resource) => resource.name,
27 });