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