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 * `PutGeofence` request with `CollectionName` injected from the bound
8 * resource.
9 */
10export interface PutGeofenceRequest extends Omit<
11 location.PutGeofenceRequest,
12 "CollectionName"
13> {}
14
15/**
16 * Stores (creates or replaces) a single geofence geometry in the collection.
17 *
18 * Runtime binding for the `PutGeofence` operation (IAM action
19 * `geo:PutGeofence`), scoped to one {@link GeofenceCollection}. Provide the implementation with
20 * `Effect.provide(AWS.Location.PutGeofenceHttp)`.
21 *
22 * ### Managing Geofences
23 * **Example:** Store a Circular Geofence
24 * ```typescript
25 * const putGeofence = yield* Location.PutGeofence(collection);
26 *
27 * yield* putGeofence({
28 * GeofenceId: "warehouse",
29 * Geometry: { Circle: { Center: [-122.3493, 47.6205], Radius: 100 } },
30 * });
31 * ```
32 *
33 * @binding
34 */
35export interface PutGeofence extends Binding.Service<
36 PutGeofence,
37 "AWS.Location.PutGeofence",
38 (
39 collection: GeofenceCollection,
40 ) => Effect.Effect<
41 (
42 request: PutGeofenceRequest,
43 ) => Effect.Effect<location.PutGeofenceResponse, location.PutGeofenceError>
44 >
45> {}
46export const PutGeofence = Binding.Service<PutGeofence>(
47 "AWS.Location.PutGeofence",
48);