@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 38 lines 1.33 KB
Raw
1 import * as eventbridge from "@distilled.cloud/aws/eventbridge";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { EventBus } from "./EventBus.ts";
5
6 export interface ListRulesRequest extends Omit<eventbridge.ListRulesRequest, "EventBusName"> {}
7
8 /**
9 * Lists the rules on an EventBridge event bus (`events:ListRules`).
10 *
11 * Bind this operation to an {@link EventBus} inside a function runtime to get
12 * a callable scoped to that bus; omit the bus argument to list rules on the
13 * account's default bus. Provide the `ListRulesHttp` layer on the Function to
14 * satisfy the binding.
15 * ### Listing Rules
16 * **Example:** List Rules on a Bus
17 * ```typescript
18 * // init — bind the bus (provide AWS.EventBridge.ListRulesHttp on the Function)
19 * const listRules = yield* AWS.EventBridge.ListRules(bus);
20 *
21 * // runtime — list rules, optionally filtered by name prefix
22 * const { Rules } = yield* listRules({ NamePrefix: "orders-" });
23 * ```
24 *
25 * @binding
26 */
27 export interface ListRules extends Binding.Service<
28 ListRules,
29 "AWS.EventBridge.ListRules",
30 (
31 bus?: EventBus,
32 ) => Effect.Effect<
33 (
34 request?: ListRulesRequest,
35 ) => Effect.Effect<eventbridge.ListRulesResponse, eventbridge.ListRulesError>
36 >
37 > {}
38 export const ListRules = Binding.Service<ListRules>("AWS.EventBridge.ListRules");