@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 39 lines 1.14 KB
Raw
1 import type * as amplify from "@distilled.cloud/aws/amplify";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { App } from "./App.ts";
5
6 export interface StopJobRequest extends Omit<amplify.StopJobRequest, "appId"> {}
7
8 /**
9 * Runtime binding for `amplify:StopJob`.
10 *
11 * Bind an {@link App} in the function's init phase to get a callable that
12 * cancels an in-progress build job on one of the app's branches. Provide the
13 * implementation with `Effect.provide(AWS.Amplify.StopJobHttp)`.
14 * ### Controlling Jobs
15 * **Example:** Cancel a Running Build
16 * ```typescript
17 * // init — bind the operation to the app
18 * const stopJob = yield* AWS.Amplify.StopJob(app);
19 *
20 * // runtime — cancel the job
21 * const { jobSummary } = yield* stopJob({
22 * branchName: "main",
23 * jobId: "42",
24 * });
25 * ```
26 *
27 * @binding
28 */
29 export interface StopJob extends Binding.Service<
30 StopJob,
31 "AWS.Amplify.StopJob",
32 (
33 app: App,
34 ) => Effect.Effect<
35 (request: StopJobRequest) => Effect.Effect<amplify.StopJobResult, amplify.StopJobError>
36 >
37 > {}
38
39 export const StopJob = Binding.Service<StopJob>("AWS.Amplify.StopJob");