| 1 | import type * as location from "@distilled.cloud/aws/location"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Map as LocationMap } from "./Map.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `GetMapSprites` request with `MapName` injected from the bound |
| 8 | * resource. |
| 9 | */ |
| 10 | export interface GetMapSpritesRequest extends Omit< |
| 11 | location.GetMapSpritesRequest, |
| 12 | "MapName" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Retrieves the map's sprite sheet (PNG) or sprite index (JSON) used to render icons. |
| 17 | * |
| 18 | * Runtime binding for the `GetMapSprites` operation (IAM action |
| 19 | * `geo:GetMapSprites`), scoped to one {@link LocationMap | Map}. Provide the implementation with |
| 20 | * `Effect.provide(AWS.Location.GetMapSpritesHttp)`. |
| 21 | * |
| 22 | * ### Serving Map Assets |
| 23 | * **Example:** Serve the Sprite Index |
| 24 | * ```typescript |
| 25 | * const getSprites = yield* Location.GetMapSprites(map); |
| 26 | * |
| 27 | * const sprites = yield* getSprites({ FileName: "sprites.json" }); |
| 28 | * // sprites.Blob → sprite index JSON bytes |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface GetMapSprites extends Binding.Service< |
| 34 | GetMapSprites, |
| 35 | "AWS.Location.GetMapSprites", |
| 36 | ( |
| 37 | map: LocationMap, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: GetMapSpritesRequest, |
| 41 | ) => Effect.Effect< |
| 42 | location.GetMapSpritesResponse, |
| 43 | location.GetMapSpritesError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const GetMapSprites = Binding.Service<GetMapSprites>( |
| 48 | "AWS.Location.GetMapSprites", |
| 49 | ); |