The best way to control Claude Code, Codex and more from any computer or phone

main
ts 49 lines 1.65 KB
Raw
1 import type * as iotw from "@distilled.cloud/aws/iot-wireless";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { WirelessDevice } from "./WirelessDevice.ts";
5
6 /**
7 * Request for {@link TestWirelessDevice}. The bound device's id is injected
8 * automatically, leaving nothing else to supply.
9 */
10 export interface TestWirelessDeviceRequest extends Omit<iotw.TestWirelessDeviceRequest, "Id"> {}
11
12 /**
13 * Runtime binding for `iotwireless:TestWirelessDevice` — simulate a
14 * provisioned device by sending an uplink data payload of `Hello` on behalf
15 * of the bound wireless device, from a deployed Lambda or Task. Useful for
16 * verifying a destination's routing without radio hardware.
17 *
18 * ### Simulating an Uplink
19 * Provide the `TestWirelessDeviceHttp` implementation layer on the Function
20 * effect, bind the device in the init phase, then call the returned client
21 * at runtime.
22 *
23 * **Example:** Send a Test Uplink
24 * ```typescript
25 * // init
26 * const testDevice = yield* AWS.IoTWireless.TestWirelessDevice(device);
27 *
28 * // runtime
29 * const { Result } = yield* testDevice();
30 * // on the Function effect:
31 * // .pipe(Effect.provide(AWS.IoTWireless.TestWirelessDeviceHttp))
32 * ```
33 *
34 * @binding
35 */
36 export interface TestWirelessDevice extends Binding.Service<
37 TestWirelessDevice,
38 "AWS.IoTWireless.TestWirelessDevice",
39 (
40 device: WirelessDevice,
41 ) => Effect.Effect<
42 (
43 request?: TestWirelessDeviceRequest,
44 ) => Effect.Effect<iotw.TestWirelessDeviceResponse, iotw.TestWirelessDeviceError>
45 >
46 > {}
47 export const TestWirelessDevice = Binding.Service<TestWirelessDevice>(
48 "AWS.IoTWireless.TestWirelessDevice",
49 );