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

main
ts 45 lines 1.67 KB
Raw
1 import type * as geoRoutes from "@distilled.cloud/aws/geo-routes";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `geo-routes:CalculateRoutes` — compute one or more
7 * routes between an origin and a destination, with optional waypoints, travel
8 * mode, and traffic options.
9 *
10 * geo-routes is a standalone, pay-per-call Amazon Location API with no
11 * resource to manage: the binding takes no arguments and grants the function
12 * `geo-routes:CalculateRoutes`. Requests and responses are raw distilled types
13 * (`Origin`/`Destination` are `[longitude, latitude]` pairs).
14 *
15 * ### Calculating Routes
16 * Provide the `CalculateRoutesHttp` implementation layer on the Function
17 * effect (`.pipe(Effect.provide(AWS.GeoRoutes.CalculateRoutesHttp))`), bind in
18 * the init phase, then call the client at runtime.
19 *
20 * **Example:** Calculate a route between two points
21 * ```typescript
22 * // init
23 * const calculateRoutes = yield* AWS.GeoRoutes.CalculateRoutes();
24 *
25 * // runtime — coordinates are [longitude, latitude]
26 * const result = yield* calculateRoutes({
27 * Origin: [-122.339, 47.61],
28 * Destination: [-122.201, 47.61],
29 * TravelMode: "Car",
30 * });
31 * const distanceMeters = result.Routes?.[0]?.Summary?.Distance;
32 * ```
33 *
34 * @binding
35 */
36 export interface CalculateRoutes extends Binding.Service<
37 CalculateRoutes,
38 "AWS.GeoRoutes.CalculateRoutes",
39 () => Effect.Effect<
40 (
41 request: geoRoutes.CalculateRoutesRequest,
42 ) => Effect.Effect<geoRoutes.CalculateRoutesResponse, geoRoutes.CalculateRoutesError>
43 >
44 > {}
45 export const CalculateRoutes = Binding.Service<CalculateRoutes>("AWS.GeoRoutes.CalculateRoutes");