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
| 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:CreateIngestion`. |
| 8 | * |
| 9 | * Triggers a SPICE refresh (ingestion) of the bound {@link DataSet} — e.g. |
| 10 | * after a pipeline lands new data. `AwsAccountId` and `DataSetId` are |
| 11 | * injected from the binding; the caller supplies a unique `IngestionId`. |
| 12 | * Poll the refresh with |
| 13 | * {@link DescribeIngestion | AWS.QuickSight.DescribeIngestion}. Provide the |
| 14 | * implementation with `Effect.provide(AWS.QuickSight.CreateIngestionHttp)`. |
| 15 | * ### Refreshing SPICE Data |
| 16 | * **Example:** Trigger A Full Refresh |
| 17 | * ```typescript |
| 18 | * // init — bind the operation to the dataset |
| 19 | * const createIngestion = yield* AWS.QuickSight.CreateIngestion(dataSet); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { IngestionId, IngestionStatus } = yield* createIngestion({ |
| 23 | * IngestionId: crypto.randomUUID(), |
| 24 | * IngestionType: "FULL_REFRESH", |
| 25 | * }); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface CreateIngestion extends Binding.Service< |
| 31 | CreateIngestion, |
| 32 | "AWS.QuickSight.CreateIngestion", |
| 33 | ( |
| 34 | dataSet: DataSet, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request: Omit<quicksight.CreateIngestionRequest, "AwsAccountId" | "DataSetId">, |
| 38 | ) => Effect.Effect<quicksight.CreateIngestionResponse, quicksight.CreateIngestionError> |
| 39 | > |
| 40 | > {} |
| 41 | export const CreateIngestion = Binding.Service<CreateIngestion>("AWS.QuickSight.CreateIngestion"); |