@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 48 lines 1.48 KB
Raw
1 import type * as bedrock from "@distilled.cloud/aws/bedrock-agent";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { DataSource } from "./DataSource.ts";
5
6 /**
7 * The `StopIngestionJob` request with the binding-injected
8 * `knowledgeBaseId` and `dataSourceId` removed — they are supplied
9 * automatically from the bound {@link DataSource}.
10 */
11 export interface StopIngestionJobRequest extends Omit<
12 bedrock.StopIngestionJobRequest,
13 "knowledgeBaseId" | "dataSourceId"
14 > {}
15
16 /**
17 * Runtime binding for `bedrock-agent:StopIngestionJob` — stop an in-flight
18 * ingestion job on the bound {@link DataSource}.
19 *
20 * The binding grants the function `bedrock:StopIngestionJob` scoped to the
21 * data source's parent knowledge base.
22 *
23 * ### Syncing a Data Source
24 * **Example:** Stop a Running Ingestion Job
25 * ```typescript
26 * // init
27 * const stopIngestionJob = yield* Bedrock.StopIngestionJob(dataSource);
28 *
29 * // runtime
30 * const { ingestionJob } = yield* stopIngestionJob({
31 * ingestionJobId: jobId,
32 * });
33 * ```
34 *
35 * @binding
36 */
37 export interface StopIngestionJob extends Binding.Service<
38 StopIngestionJob,
39 "AWS.Bedrock.StopIngestionJob",
40 <D extends DataSource>(
41 dataSource: D,
42 ) => Effect.Effect<
43 (
44 request: StopIngestionJobRequest,
45 ) => Effect.Effect<bedrock.StopIngestionJobResponse, bedrock.StopIngestionJobError>
46 >
47 > {}
48 export const StopIngestionJob = Binding.Service<StopIngestionJob>("AWS.Bedrock.StopIngestionJob");