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

main
ts 42 lines 1.42 KB
Raw
1 import type * as iotdata from "@distilled.cloud/aws/iot-data-plane";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 export interface SendDirectMessageRequest extends iotdata.SendDirectMessageRequest {}
6
7 /**
8 * Runtime binding for the IoT data-plane `SendDirectMessage` operation (IAM
9 * action `iot:SendDirectMessage`).
10 *
11 * Binding to a client id filter grants `iot:SendDirectMessage` on matching
12 * MQTT client ARNs (or all clients when the filter is omitted) and returns
13 * a callable that delivers a message directly to a connected client without
14 * publishing through a topic. Provide the implementation with
15 * `Effect.provide(AWS.IoT.SendDirectMessageHttp)`.
16 * ### MQTT Connections
17 * **Example:** Send a Command to a Device
18 * ```typescript
19 * const sendDirectMessage = yield* AWS.IoT.SendDirectMessage("sensor-*");
20 *
21 * yield* sendDirectMessage({
22 * clientId: "sensor-1",
23 * topic: "commands/reboot",
24 * payload: JSON.stringify({ at: "now" }),
25 * });
26 * ```
27 *
28 * @binding
29 */
30 export interface SendDirectMessage extends Binding.Service<
31 SendDirectMessage,
32 "AWS.IoT.SendDirectMessage",
33 (
34 clientIdFilter?: string,
35 ) => Effect.Effect<
36 (
37 request: SendDirectMessageRequest,
38 ) => Effect.Effect<iotdata.SendDirectMessageResponse, iotdata.SendDirectMessageError>
39 >
40 > {}
41
42 export const SendDirectMessage = Binding.Service<SendDirectMessage>("AWS.IoT.SendDirectMessage");