1import type * as amplify from "@distilled.cloud/aws/amplify";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { App } from "./App.ts";
5
6export interface DeleteJobRequest extends Omit<
7 amplify.DeleteJobRequest,
8 "appId"
9> {}
10
11/**
12 * Runtime binding for `amplify:DeleteJob`.
13 *
14 * Bind an {@link App} in the function's init phase to get a callable that
15 * deletes a build job from a branch's history — e.g. a maintenance function
16 * pruning old build records. Provide the implementation with
17 * `Effect.provide(AWS.Amplify.DeleteJobHttp)`.
18 * ### Controlling Jobs
19 * **Example:** Prune an Old Build Record
20 * ```typescript
21 * // init — bind the operation to the app
22 * const deleteJob = yield* AWS.Amplify.DeleteJob(app);
23 *
24 * // runtime — remove the job from the branch's history
25 * yield* deleteJob({ branchName: "main", jobId: "42" });
26 * ```
27 *
28 * @binding
29 */
30export interface DeleteJob extends Binding.Service<
31 DeleteJob,
32 "AWS.Amplify.DeleteJob",
33 (
34 app: App,
35 ) => Effect.Effect<
36 (
37 request: DeleteJobRequest,
38 ) => Effect.Effect<amplify.DeleteJobResult, amplify.DeleteJobError>
39 >
40> {}
41
42export const DeleteJob = Binding.Service<DeleteJob>("AWS.Amplify.DeleteJob");