@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, 04:45 UTC

main
ts 18 lines 579 Bytes
Raw
1 import { makeNamedHttpBinding, type BindingIam, type GcpHttpOp } from "../HttpBinding.ts";
2 import type { Function as CloudFunction } from "./Function.ts";
3
4 /**
5 * Shared HTTP scaffolding for Cloud Functions bindings.
6 * NOT exported from index.ts.
7 */
8 export const makeFunctionHttpBinding = <I extends { name?: string }, A, E>(options: {
9 tag: string;
10 iam: BindingIam;
11 operation: GcpHttpOp<I, A, E>;
12 }) =>
13 makeNamedHttpBinding<CloudFunction, I, A, E>({
14 tag: options.tag,
15 operation: options.operation,
16 iam: options.iam,
17 resourceName: (fn) => fn.name,
18 });