@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.56 KB
Raw
1 import type * as quicksight from "@distilled.cloud/aws/quicksight";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { DataSet } from "./DataSet.ts";
5
6 /**
7 * Runtime binding for `quicksight:DescribeIngestion`.
8 *
9 * Reads the status, row counts, and error info of a SPICE ingestion on the
10 * bound {@link DataSet}. `AwsAccountId` and `DataSetId` are injected from
11 * the binding. Provide the implementation with
12 * `Effect.provide(AWS.QuickSight.DescribeIngestionHttp)`.
13 * ### Refreshing SPICE Data
14 * **Example:** Poll An Ingestion Until It Settles
15 * ```typescript
16 * // init — bind the operation to the dataset
17 * const describeIngestion = yield* AWS.QuickSight.DescribeIngestion(dataSet);
18 *
19 * // runtime
20 * const { Ingestion } = yield* describeIngestion({
21 * IngestionId: ingestionId,
22 * }).pipe(
23 * Effect.repeat({
24 * schedule: Schedule.spaced("5 seconds"),
25 * until: (r) =>
26 * r.Ingestion?.IngestionStatus === "COMPLETED" ||
27 * r.Ingestion?.IngestionStatus === "FAILED",
28 * times: 24,
29 * }),
30 * );
31 * ```
32 *
33 * @binding
34 */
35 export interface DescribeIngestion extends Binding.Service<
36 DescribeIngestion,
37 "AWS.QuickSight.DescribeIngestion",
38 (
39 dataSet: DataSet,
40 ) => Effect.Effect<
41 (
42 request: Omit<quicksight.DescribeIngestionRequest, "AwsAccountId" | "DataSetId">,
43 ) => Effect.Effect<quicksight.DescribeIngestionResponse, quicksight.DescribeIngestionError>
44 >
45 > {}
46 export const DescribeIngestion = Binding.Service<DescribeIngestion>(
47 "AWS.QuickSight.DescribeIngestion",
48 );