@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, 04:45 UTC

main
ts 56 lines 1.69 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 { Tracker } from "./Tracker.ts";
5
6 /**
7 * `BatchUpdateDevicePosition` request with `TrackerName` injected from the bound
8 * resource.
9 */
10 export interface BatchUpdateDevicePositionRequest extends Omit<
11 location.BatchUpdateDevicePositionRequest,
12 "TrackerName"
13 > {}
14
15 /**
16 * Uploads position updates for up to 10 devices to the tracker (also triggers geofence evaluation for linked collections).
17 *
18 * Runtime binding for the `BatchUpdateDevicePosition` operation (IAM action
19 * `geo:BatchUpdateDevicePosition`), scoped to one {@link Tracker}. Provide the implementation with
20 * `Effect.provide(AWS.Location.BatchUpdateDevicePositionHttp)`.
21 *
22 * ### Updating Device Positions
23 * **Example:** Report Device Positions
24 * ```typescript
25 * const updatePositions = yield* Location.BatchUpdateDevicePosition(tracker);
26 *
27 * yield* updatePositions({
28 * Updates: [
29 * {
30 * DeviceId: "vehicle-1",
31 * Position: [-122.3493, 47.6205], // [longitude, latitude]
32 * SampleTime: new Date(),
33 * },
34 * ],
35 * });
36 * ```
37 *
38 * @binding
39 */
40 export interface BatchUpdateDevicePosition extends Binding.Service<
41 BatchUpdateDevicePosition,
42 "AWS.Location.BatchUpdateDevicePosition",
43 (
44 tracker: Tracker,
45 ) => Effect.Effect<
46 (
47 request: BatchUpdateDevicePositionRequest,
48 ) => Effect.Effect<
49 location.BatchUpdateDevicePositionResponse,
50 location.BatchUpdateDevicePositionError
51 >
52 >
53 > {}
54 export const BatchUpdateDevicePosition = Binding.Service<BatchUpdateDevicePosition>(
55 "AWS.Location.BatchUpdateDevicePosition",
56 );