1import type * as location from "@distilled.cloud/aws/location";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Map as LocationMap } from "./Map.ts";
5
6/**
7 * `GetMapStyleDescriptor` request with `MapName` injected from the bound
8 * resource.
9 */
10export interface GetMapStyleDescriptorRequest extends Omit<
11 location.GetMapStyleDescriptorRequest,
12 "MapName"
13> {}
14
15/**
16 * Retrieves the map's style descriptor document (the MapLibre/Mapbox GL style JSON).
17 *
18 * Runtime binding for the `GetMapStyleDescriptor` operation (IAM action
19 * `geo:GetMapStyleDescriptor`), scoped to one {@link LocationMap | Map}. Provide the implementation with
20 * `Effect.provide(AWS.Location.GetMapStyleDescriptorHttp)`.
21 *
22 * ### Serving Map Assets
23 * **Example:** Serve the Style Descriptor
24 * ```typescript
25 * const getStyle = yield* Location.GetMapStyleDescriptor(map);
26 *
27 * const style = yield* getStyle();
28 * // style.Blob → style JSON bytes, style.ContentType → "application/json"
29 * ```
30 *
31 * @binding
32 */
33export interface GetMapStyleDescriptor extends Binding.Service<
34 GetMapStyleDescriptor,
35 "AWS.Location.GetMapStyleDescriptor",
36 (
37 map: LocationMap,
38 ) => Effect.Effect<
39 (
40 request?: GetMapStyleDescriptorRequest,
41 ) => Effect.Effect<
42 location.GetMapStyleDescriptorResponse,
43 location.GetMapStyleDescriptorError
44 >
45 >
46> {}
47export const GetMapStyleDescriptor = Binding.Service<GetMapStyleDescriptor>(
48 "AWS.Location.GetMapStyleDescriptor",
49);