@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, 06:00 UTC

main
ts 49 lines 1.59 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 ListQueuedMessages}. The bound device's id is injected
8 * automatically.
9 */
10 export interface ListQueuedMessagesRequest extends Omit<iotw.ListQueuedMessagesRequest, "Id"> {}
11
12 /**
13 * Runtime binding for `iotwireless:ListQueuedMessages` — list the downlink
14 * messages queued for the bound wireless device from a deployed Lambda or
15 * Task.
16 *
17 * ### Inspecting the Downlink Queue
18 * Provide the `ListQueuedMessagesHttp` implementation layer on the Function
19 * effect, bind the device in the init phase, then call the returned client
20 * at runtime.
21 *
22 * **Example:** Count Pending Downlinks
23 * ```typescript
24 * // init
25 * const listQueued = yield* AWS.IoTWireless.ListQueuedMessages(device);
26 *
27 * // runtime
28 * const { DownlinkQueueMessagesList } = yield* listQueued();
29 * const pending = DownlinkQueueMessagesList?.length ?? 0;
30 * // on the Function effect:
31 * // .pipe(Effect.provide(AWS.IoTWireless.ListQueuedMessagesHttp))
32 * ```
33 *
34 * @binding
35 */
36 export interface ListQueuedMessages extends Binding.Service<
37 ListQueuedMessages,
38 "AWS.IoTWireless.ListQueuedMessages",
39 (
40 device: WirelessDevice,
41 ) => Effect.Effect<
42 (
43 request?: ListQueuedMessagesRequest,
44 ) => Effect.Effect<iotw.ListQueuedMessagesResponse, iotw.ListQueuedMessagesError>
45 >
46 > {}
47 export const ListQueuedMessages = Binding.Service<ListQueuedMessages>(
48 "AWS.IoTWireless.ListQueuedMessages",
49 );