@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 42 lines 1.35 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 { DataSet } from "./DataSet.ts";
5
6 /**
7 * Runtime binding for `dataexchange:SendApiAsset`.
8 *
9 * Invokes an API asset of an entitled `API_GATEWAY_API` data set — the
10 * Data Exchange data plane proxies the request to the provider's API
11 * Gateway. The data set id is injected from the binding; pass the
12 * revision and asset ids of the API asset to call.
13 * Provide the implementation with
14 * `Effect.provide(AWS.DataExchange.SendApiAssetHttp)`.
15 * ### Calling API Assets
16 * **Example:** Call A Subscribed API Asset
17 * ```typescript
18 * const sendApiAsset = yield* AWS.DataExchange.SendApiAsset(dataSet);
19 *
20 * // runtime
21 * const response = yield* sendApiAsset({
22 * RevisionId: revisionId,
23 * AssetId: assetId,
24 * Method: "GET",
25 * Path: "/prices",
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface SendApiAsset extends Binding.Service<
32 SendApiAsset,
33 "AWS.DataExchange.SendApiAsset",
34 (
35 dataSet: DataSet,
36 ) => Effect.Effect<
37 (
38 request: Omit<dataexchange.SendApiAssetRequest, "DataSetId">,
39 ) => Effect.Effect<dataexchange.SendApiAssetResponse, dataexchange.SendApiAssetError>
40 >
41 > {}
42 export const SendApiAsset = Binding.Service<SendApiAsset>("AWS.DataExchange.SendApiAsset");