@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 52 lines 1.69 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 { GeofenceCollection } from "./GeofenceCollection.ts";
5
6 /**
7 * `ForecastGeofenceEvents` request with `CollectionName` injected from the bound
8 * resource.
9 */
10 export interface ForecastGeofenceEventsRequest extends Omit<
11 location.ForecastGeofenceEventsRequest,
12 "CollectionName"
13 > {}
14
15 /**
16 * Forecasts which geofences a device will enter or exit given its position and speed.
17 *
18 * Runtime binding for the `ForecastGeofenceEvents` operation (IAM action
19 * `geo:ForecastGeofenceEvents`), scoped to one {@link GeofenceCollection}. Provide the implementation with
20 * `Effect.provide(AWS.Location.ForecastGeofenceEventsHttp)`.
21 *
22 * ### Evaluating Positions Against Geofences
23 * **Example:** Forecast Upcoming Geofence Events
24 * ```typescript
25 * const forecast = yield* Location.ForecastGeofenceEvents(collection);
26 *
27 * const events = yield* forecast({
28 * DeviceState: { Position: [-122.3493, 47.6205], Speed: 20 },
29 * TimeHorizonMinutes: 30,
30 * });
31 * // events.ForecastedEvents → [{ GeofenceId, EventType, NearestDistance }, …]
32 * ```
33 *
34 * @binding
35 */
36 export interface ForecastGeofenceEvents extends Binding.Service<
37 ForecastGeofenceEvents,
38 "AWS.Location.ForecastGeofenceEvents",
39 (
40 collection: GeofenceCollection,
41 ) => Effect.Effect<
42 (
43 request: ForecastGeofenceEventsRequest,
44 ) => Effect.Effect<
45 location.ForecastGeofenceEventsResponse,
46 location.ForecastGeofenceEventsError
47 >
48 >
49 > {}
50 export const ForecastGeofenceEvents = Binding.Service<ForecastGeofenceEvents>(
51 "AWS.Location.ForecastGeofenceEvents",
52 );