@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.22 KB
Raw
1 import type * as dataexchange from "@distilled.cloud/aws/dataexchange";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Revision } from "./Revision.ts";
5
6 /**
7 * Runtime binding for `dataexchange:GetAsset`.
8 *
9 * Reads one asset of the bound revision — name, type-specific details
10 * (S3 snapshot size, API Gateway endpoint, …), and timestamps. The data
11 * set and revision ids are injected from the binding.
12 * Provide the implementation with
13 * `Effect.provide(AWS.DataExchange.GetAssetHttp)`.
14 * ### Reading Revisions & Assets
15 * **Example:** Read An Asset's Detail
16 * ```typescript
17 * const getAsset = yield* AWS.DataExchange.GetAsset(revision);
18 *
19 * // runtime
20 * const asset = yield* getAsset({ AssetId: assetId });
21 * yield* Effect.log(`asset ${asset.Name}`);
22 * ```
23 *
24 * @binding
25 */
26 export interface GetAsset extends Binding.Service<
27 GetAsset,
28 "AWS.DataExchange.GetAsset",
29 (
30 revision: Revision,
31 ) => Effect.Effect<
32 (
33 request: Omit<dataexchange.GetAssetRequest, "DataSetId" | "RevisionId">,
34 ) => Effect.Effect<dataexchange.GetAssetResponse, dataexchange.GetAssetError>
35 >
36 > {}
37 export const GetAsset = Binding.Service<GetAsset>("AWS.DataExchange.GetAsset");