@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 41 lines 1.3 KB
Raw
1 import type * as location from "@distilled.cloud/aws/location";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Map as LocationMap } from "./Map.ts";
5
6 /**
7 * `GetMapTile` request with `MapName` injected from the bound
8 * resource.
9 */
10 export interface GetMapTileRequest extends Omit<location.GetMapTileRequest, "MapName"> {}
11
12 /**
13 * Retrieves a single map tile (vector or raster) addressed by zoom/x/y.
14 *
15 * Runtime binding for the `GetMapTile` operation (IAM action
16 * `geo:GetMapTile`), scoped to one {@link LocationMap | Map}. Provide the implementation with
17 * `Effect.provide(AWS.Location.GetMapTileHttp)`.
18 *
19 * ### Serving Map Assets
20 * **Example:** Serve a Tile
21 * ```typescript
22 * const getTile = yield* Location.GetMapTile(map);
23 *
24 * const tile = yield* getTile({ Z: "0", X: "0", Y: "0" });
25 * // tile.Blob → tile bytes, tile.ContentType → e.g. "application/vnd.mapbox-vector-tile"
26 * ```
27 *
28 * @binding
29 */
30 export interface GetMapTile extends Binding.Service<
31 GetMapTile,
32 "AWS.Location.GetMapTile",
33 (
34 map: LocationMap,
35 ) => Effect.Effect<
36 (
37 request: GetMapTileRequest,
38 ) => Effect.Effect<location.GetMapTileResponse, location.GetMapTileError>
39 >
40 > {}
41 export const GetMapTile = Binding.Service<GetMapTile>("AWS.Location.GetMapTile");