@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 48 lines 1.44 KB
Raw
1 import type * as storagetransfer from "@distilled.cloud/gcp/storagetransfer_v1";
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 { TransferJob } from "./TransferJob.ts";
6
7 export interface RunTransferJobRequest extends Omit<
8 storagetransfer.RunTransferJobsRequest,
9 "jobName"
10 > {}
11
12 /**
13 * Runtime binding for Storage Transfer `transferJobs.run`.
14 *
15 * Starts a transfer operation immediately, even when the job has no
16 * schedule. Bind this operation to a {@link TransferJob} in a
17 * Function/Action init phase. Provide {@link RunTransferJobHttp}.
18 *
19 * Grants `roles/storagetransfer.user` on the project because Storage
20 * Transfer has no resource-level IAM.
21 *
22 * ### Running Transfer Jobs
23 * **Example:** Run the bound job now
24 * ```typescript
25 * const runJob = yield* GCP.StorageTransfer.RunTransferJob(nightly);
26 * const operation = yield* runJob();
27 * ```
28 *
29 * @binding
30 * @category StorageTransfer
31 */
32 export interface RunTransferJob extends Binding.Service<
33 RunTransferJob,
34 "GCP.StorageTransfer.RunTransferJob",
35 (
36 job: TransferJob,
37 ) => Effect.Effect<
38 (
39 request?: RunTransferJobRequest,
40 ) => Effect.Effect<
41 storagetransfer.Operation,
42 storagetransfer.RunTransferJobsError,
43 RuntimeContext
44 >
45 >
46 > {}
47
48 export const RunTransferJob = Binding.Service<RunTransferJob>("GCP.StorageTransfer.RunTransferJob");