@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 37 lines 1.29 KB
Raw
1 import type * as mi from "@distilled.cloud/aws/iot-managed-integrations";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { ManagedThing } from "./ManagedThing.ts";
5
6 /**
7 * Runtime binding for the `GetManagedThingState` operation (IAM action
8 * `iotmanagedintegrations:GetManagedThingState`), scoped to one
9 * {@link ManagedThing}.
10 *
11 * Reads the last-reported state of every endpoint/capability of the bound
12 * device (e.g. whether a smart plug is on). Provide the implementation with
13 * `Effect.provide(AWS.IoTManagedIntegrations.GetManagedThingStateHttp)`.
14 *
15 * ### Reading Device State
16 * **Example:** Read the Current Device State
17 * ```typescript
18 * const getState = yield* IoTManagedIntegrations.GetManagedThingState(thing);
19 *
20 * const { Endpoints } = yield* getState();
21 * // Endpoints[0].capabilities[0].properties
22 * ```
23 *
24 * @binding
25 */
26 export interface GetManagedThingState extends Binding.Service<
27 GetManagedThingState,
28 "AWS.IoTManagedIntegrations.GetManagedThingState",
29 (
30 thing: ManagedThing,
31 ) => Effect.Effect<
32 () => Effect.Effect<mi.GetManagedThingStateResponse, mi.GetManagedThingStateError>
33 >
34 > {}
35 export const GetManagedThingState = Binding.Service<GetManagedThingState>(
36 "AWS.IoTManagedIntegrations.GetManagedThingState",
37 );