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

main
ts 38 lines 1.12 KB
Raw
1 import type * as apikeys from "@distilled.cloud/gcp/apikeys_v2";
2 import * as Binding from "alchemy/Binding";
3 import type { RuntimeContext } from "alchemy/RuntimeContext";
4 import type * as Effect from "effect/Effect";
5 import type { Key } from "./Key.ts";
6
7 /**
8 * Runtime binding for API Keys `keys.getKeyString`.
9 *
10 * Bind this operation to a {@link Key} in a Function/Action init phase.
11 * Provide {@link GetKeyStringHttp}. The key string is not included on
12 * `keys.get` — this is the only way to read it.
13 *
14 * ### Reading the Key String
15 * **Example:** Get the encrypted key string
16 * ```typescript
17 * const getKeyString = yield* GCP.ApiKeys.GetKeyString(maps);
18 * const { keyString } = yield* getKeyString();
19 * ```
20 *
21 * @binding
22 * @category ApiKeys
23 */
24 export interface GetKeyString extends Binding.Service<
25 GetKeyString,
26 "GCP.ApiKeys.GetKeyString",
27 (
28 key: Key,
29 ) => Effect.Effect<
30 () => Effect.Effect<
31 apikeys.V2GetKeyStringResponse,
32 apikeys.GetKeyStringProjectsLocationsKeysError,
33 RuntimeContext
34 >
35 >
36 > {}
37
38 export const GetKeyString = Binding.Service<GetKeyString>("GCP.ApiKeys.GetKeyString");