sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Location/ ListGeofences.ts

import type * as location from "@distilled.cloud/aws/location";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { GeofenceCollection } from "./GeofenceCollection.ts";

/**
 * `ListGeofences` request with `CollectionName` injected from the bound
 * resource.
 */
export interface ListGeofencesRequest extends Omit<
  location.ListGeofencesRequest,
  "CollectionName"
> {}

/**
 * Lists the geofences stored in the collection.
 *
 * Runtime binding for the `ListGeofences` operation (IAM action
 * `geo:ListGeofences`), scoped to one {@link GeofenceCollection}. Provide the implementation with
 * `Effect.provide(AWS.Location.ListGeofencesHttp)`.
 *
 * ### Reading Geofences
 * **Example:** List Geofences
 * ```typescript
 * const listGeofences = yield* Location.ListGeofences(collection);
 *
 * const page = yield* listGeofences();
 * // page.Entries → [{ GeofenceId, Geometry, Status }, …]
 * ```
 *
 * @binding
 */
export interface ListGeofences extends Binding.Service<
  ListGeofences,
  "AWS.Location.ListGeofences",
  (
    collection: GeofenceCollection,
  ) => Effect.Effect<
    (
      request?: ListGeofencesRequest,
    ) => Effect.Effect<location.ListGeofencesResponse, location.ListGeofencesError>
  >
> {}
export const ListGeofences = Binding.Service<ListGeofences>("AWS.Location.ListGeofences");