@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 56 lines 1.68 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 * `BatchEvaluateGeofences` request with `CollectionName` injected from the bound
8 * resource.
9 */
10 export interface BatchEvaluateGeofencesRequest extends Omit<
11 location.BatchEvaluateGeofencesRequest,
12 "CollectionName"
13 > {}
14
15 /**
16 * Evaluates device positions against the collection's geofences, emitting ENTER/EXIT events to EventBridge for linked trackers.
17 *
18 * Runtime binding for the `BatchEvaluateGeofences` operation (IAM action
19 * `geo:BatchEvaluateGeofences`), scoped to one {@link GeofenceCollection}. Provide the implementation with
20 * `Effect.provide(AWS.Location.BatchEvaluateGeofencesHttp)`.
21 *
22 * ### Evaluating Positions Against Geofences
23 * **Example:** Evaluate Positions
24 * ```typescript
25 * const evaluate = yield* Location.BatchEvaluateGeofences(collection);
26 *
27 * yield* evaluate({
28 * DevicePositionUpdates: [
29 * {
30 * DeviceId: "vehicle-1",
31 * Position: [-122.3493, 47.6205],
32 * SampleTime: new Date(),
33 * },
34 * ],
35 * });
36 * ```
37 *
38 * @binding
39 */
40 export interface BatchEvaluateGeofences extends Binding.Service<
41 BatchEvaluateGeofences,
42 "AWS.Location.BatchEvaluateGeofences",
43 (
44 collection: GeofenceCollection,
45 ) => Effect.Effect<
46 (
47 request: BatchEvaluateGeofencesRequest,
48 ) => Effect.Effect<
49 location.BatchEvaluateGeofencesResponse,
50 location.BatchEvaluateGeofencesError
51 >
52 >
53 > {}
54 export const BatchEvaluateGeofences = Binding.Service<BatchEvaluateGeofences>(
55 "AWS.Location.BatchEvaluateGeofences",
56 );