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

main
ts 55 lines 1.8 KB
Raw
1 import type * as bqdt from "@distilled.cloud/gcp/bigquerydatatransfer_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 { TransferConfig } from "./TransferConfig.ts";
6
7 export interface StartManualRunsRequest extends Omit<
8 bqdt.StartManualRunsProjectsLocationsTransferConfigsRequest,
9 "parent"
10 > {}
11
12 /**
13 * Runtime binding for BigQuery Data Transfer `transferConfigs.startManualRuns`.
14 *
15 * Starts one or more transfer runs for a {@link TransferConfig}. Bind this
16 * operation in a Function/Action init phase. Provide
17 * {@link StartManualRunsHttp}. `requestedRunTime` and `requestedTimeRange`
18 * must be in the past.
19 *
20 * Grants `roles/bigquery.admin` on the project because
21 * `bigquery.transfers.update` (required by `startManualRuns`) is in no
22 * narrower predefined role, and transfer configs have no resource-level
23 * IAM or IAM Conditions support to scope it to the one config.
24 *
25 * ### Starting Manual Runs
26 * **Example:** Run for a specific past timestamp
27 * ```typescript
28 * const start = yield* GCP.BigQueryDataTransfer.StartManualRuns(nightly);
29 * const result = yield* start({
30 * body: { requestedRunTime: "2020-01-01T00:00:00Z" },
31 * });
32 * ```
33 *
34 * @binding
35 * @category BigQueryDataTransfer
36 */
37 export interface StartManualRuns extends Binding.Service<
38 StartManualRuns,
39 "GCP.BigQueryDataTransfer.StartManualRuns",
40 (
41 config: TransferConfig,
42 ) => Effect.Effect<
43 (
44 request?: StartManualRunsRequest,
45 ) => Effect.Effect<
46 bqdt.StartManualTransferRunsResponse,
47 bqdt.StartManualRunsProjectsLocationsTransferConfigsError,
48 RuntimeContext
49 >
50 >
51 > {}
52
53 export const StartManualRuns = Binding.Service<StartManualRuns>(
54 "GCP.BigQueryDataTransfer.StartManualRuns",
55 );