1import type * as geoMaps from "@distilled.cloud/aws/geo-maps";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `geo-maps:GetTile` — fetch a single map tile addressed
7 * by tileset, zoom level, and X/Y grid coordinates.
8 *
9 * geo-maps is a standalone, pay-per-call Amazon Location API with no resource
10 * to manage: the binding takes no arguments and grants the function
11 * `geo-maps:GetTile`. Requests and responses are raw distilled types; the
12 * tile payload is returned as `Blob` (`Uint8Array`).
13 *
14 * ### Fetching Map Tiles
15 * Provide the `GetTileHttp` implementation layer on the Function effect
16 * (`.pipe(Effect.provide(AWS.GeoMaps.GetTileHttp))`), bind in the init phase,
17 * then call the client at runtime.
18 *
19 * **Example:** Fetch a vector tile
20 * ```typescript
21 * // init
22 * const getTile = yield* AWS.GeoMaps.GetTile();
23 *
24 * // runtime — Z/X/Y are string coordinates in the tile grid
25 * const tile = yield* getTile({
26 * Tileset: "vector.basemap",
27 * Z: "0",
28 * X: "0",
29 * Y: "0",
30 * });
31 * const bytes = tile.Blob; // Uint8Array | undefined
32 * ```
33 *
34 * @binding
35 */
36export interface GetTile extends Binding.Service<
37 GetTile,
38 "AWS.GeoMaps.GetTile",
39 () => Effect.Effect<
40 (
41 request: geoMaps.GetTileRequest,
42 ) => Effect.Effect<geoMaps.GetTileResponse, geoMaps.GetTileError>
43 >
44> {}
45export const GetTile = Binding.Service<GetTile>("AWS.GeoMaps.GetTile");