@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 37 lines 1.27 KB
Raw
1 import type * as kendra from "@distilled.cloud/aws/kendra";
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 * Runtime binding for the `StartDataSourceSyncJob` operation (IAM action
8 * `kendra:StartDataSourceSyncJob`), scoped to one {@link DataSource}.
9 *
10 * Starts an on-demand sync of the data source into its index — the
11 * programmatic alternative to the data source's cron `schedule`. Fails
12 * with `ResourceInUseException` while another sync is already running.
13 * Provide the implementation with
14 * `Effect.provide(AWS.Kendra.StartDataSourceSyncJobHttp)`.
15 *
16 * ### Syncing Data Sources
17 * **Example:** Trigger a Sync
18 * ```typescript
19 * const startSync = yield* AWS.Kendra.StartDataSourceSyncJob(source);
20 *
21 * const { ExecutionId } = yield* startSync();
22 * ```
23 *
24 * @binding
25 */
26 export interface StartDataSourceSyncJob extends Binding.Service<
27 StartDataSourceSyncJob,
28 "AWS.Kendra.StartDataSourceSyncJob",
29 (
30 dataSource: DataSource,
31 ) => Effect.Effect<
32 () => Effect.Effect<kendra.StartDataSourceSyncJobResponse, kendra.StartDataSourceSyncJobError>
33 >
34 > {}
35 export const StartDataSourceSyncJob = Binding.Service<StartDataSourceSyncJob>(
36 "AWS.Kendra.StartDataSourceSyncJob",
37 );