The best way to control Claude Code, Codex and more from any computer or phone

main
ts 51 lines 1.76 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 { Dashboard } from "./Dashboard.ts";
5
6 /**
7 * Runtime binding for `quicksight:StartDashboardSnapshotJob`.
8 *
9 * Starts an asynchronous snapshot job that exports the bound
10 * {@link Dashboard} as a PDF, CSV, or Excel file delivered to S3 or returned
11 * as a download URL. `AwsAccountId` and `DashboardId` are injected from the
12 * binding; poll the job with
13 * {@link DescribeDashboardSnapshotJob | AWS.QuickSight.DescribeDashboardSnapshotJob}.
14 * Provide the implementation with
15 * `Effect.provide(AWS.QuickSight.StartDashboardSnapshotJobHttp)`.
16 * ### Dashboard Snapshots
17 * **Example:** Start A PDF Snapshot
18 * ```typescript
19 * // init — bind the operation to the dashboard
20 * const startSnapshotJob =
21 * yield* AWS.QuickSight.StartDashboardSnapshotJob(dashboard);
22 *
23 * // runtime
24 * const { SnapshotJobId } = yield* startSnapshotJob({
25 * SnapshotJobId: crypto.randomUUID(),
26 * UserConfiguration: { AnonymousUsers: [] },
27 * SnapshotConfiguration: {
28 * FileGroups: [{ Files: [{ FormatType: "PDF" }] }],
29 * },
30 * });
31 * ```
32 *
33 * @binding
34 */
35 export interface StartDashboardSnapshotJob extends Binding.Service<
36 StartDashboardSnapshotJob,
37 "AWS.QuickSight.StartDashboardSnapshotJob",
38 (
39 dashboard: Dashboard,
40 ) => Effect.Effect<
41 (
42 request: Omit<quicksight.StartDashboardSnapshotJobRequest, "AwsAccountId" | "DashboardId">,
43 ) => Effect.Effect<
44 quicksight.StartDashboardSnapshotJobResponse,
45 quicksight.StartDashboardSnapshotJobError
46 >
47 >
48 > {}
49 export const StartDashboardSnapshotJob = Binding.Service<StartDashboardSnapshotJob>(
50 "AWS.QuickSight.StartDashboardSnapshotJob",
51 );