@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 48 lines 1.63 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 DeleteQueuedMessages}. The bound device's id is
8 * injected automatically. Pass `MessageId: "*"` to purge the whole queue.
9 */
10 export interface DeleteQueuedMessagesRequest extends Omit<iotw.DeleteQueuedMessagesRequest, "Id"> {}
11
12 /**
13 * Runtime binding for `iotwireless:DeleteQueuedMessages` — delete queued
14 * downlink messages for the bound wireless device from a deployed Lambda or
15 * Task.
16 *
17 * ### Purging the Downlink Queue
18 * Provide the `DeleteQueuedMessagesHttp` implementation layer on the
19 * Function effect, bind the device in the init phase, then call the
20 * returned client at runtime.
21 *
22 * **Example:** Purge All Pending Downlinks
23 * ```typescript
24 * // init
25 * const deleteQueued = yield* AWS.IoTWireless.DeleteQueuedMessages(device);
26 *
27 * // runtime — "*" deletes every queued message
28 * yield* deleteQueued({ MessageId: "*" });
29 * // on the Function effect:
30 * // .pipe(Effect.provide(AWS.IoTWireless.DeleteQueuedMessagesHttp))
31 * ```
32 *
33 * @binding
34 */
35 export interface DeleteQueuedMessages extends Binding.Service<
36 DeleteQueuedMessages,
37 "AWS.IoTWireless.DeleteQueuedMessages",
38 (
39 device: WirelessDevice,
40 ) => Effect.Effect<
41 (
42 request: DeleteQueuedMessagesRequest,
43 ) => Effect.Effect<iotw.DeleteQueuedMessagesResponse, iotw.DeleteQueuedMessagesError>
44 >
45 > {}
46 export const DeleteQueuedMessages = Binding.Service<DeleteQueuedMessages>(
47 "AWS.IoTWireless.DeleteQueuedMessages",
48 );