The best way to control Claude Code, Codex and more from any computer or phone

main
ts 39 lines 1.22 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 { PlaceIndex } from "./PlaceIndex.ts";
5
6 /**
7 * `GetPlace` request with `IndexName` injected from the bound
8 * resource.
9 */
10 export interface GetPlaceRequest extends Omit<location.GetPlaceRequest, "IndexName"> {}
11
12 /**
13 * Fetches the full details of a place by the `PlaceId` returned from a search.
14 *
15 * Runtime binding for the `GetPlace` operation (IAM action
16 * `geo:GetPlace`), scoped to one {@link PlaceIndex}. Provide the implementation with
17 * `Effect.provide(AWS.Location.GetPlaceHttp)`.
18 *
19 * ### Searching Places
20 * **Example:** Fetch Place Details
21 * ```typescript
22 * const getPlace = yield* Location.GetPlace(index);
23 *
24 * const place = yield* getPlace({ PlaceId: placeId });
25 * // place.Place.Label, place.Place.Geometry.Point
26 * ```
27 *
28 * @binding
29 */
30 export interface GetPlace extends Binding.Service<
31 GetPlace,
32 "AWS.Location.GetPlace",
33 (
34 index: PlaceIndex,
35 ) => Effect.Effect<
36 (request: GetPlaceRequest) => Effect.Effect<location.GetPlaceResponse, location.GetPlaceError>
37 >
38 > {}
39 export const GetPlace = Binding.Service<GetPlace>("AWS.Location.GetPlace");