1import type * as location from "@distilled.cloud/aws/location";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { GeofenceCollection } from "./GeofenceCollection.ts";
5
6/**
7 * `ListGeofences` request with `CollectionName` injected from the bound
8 * resource.
9 */
10export interface ListGeofencesRequest extends Omit<
11 location.ListGeofencesRequest,
12 "CollectionName"
13> {}
14
15/**
16 * Lists the geofences stored in the collection.
17 *
18 * Runtime binding for the `ListGeofences` operation (IAM action
19 * `geo:ListGeofences`), scoped to one {@link GeofenceCollection}. Provide the implementation with
20 * `Effect.provide(AWS.Location.ListGeofencesHttp)`.
21 *
22 * ### Reading Geofences
23 * **Example:** List Geofences
24 * ```typescript
25 * const listGeofences = yield* Location.ListGeofences(collection);
26 *
27 * const page = yield* listGeofences();
28 * // page.Entries → [{ GeofenceId, Geometry, Status }, …]
29 * ```
30 *
31 * @binding
32 */
33export interface ListGeofences extends Binding.Service<
34 ListGeofences,
35 "AWS.Location.ListGeofences",
36 (
37 collection: GeofenceCollection,
38 ) => Effect.Effect<
39 (
40 request?: ListGeofencesRequest,
41 ) => Effect.Effect<
42 location.ListGeofencesResponse,
43 location.ListGeofencesError
44 >
45 >
46> {}
47export const ListGeofences = Binding.Service<ListGeofences>(
48 "AWS.Location.ListGeofences",
49);