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

main
ts 54 lines 1.76 KB
Raw
1 import type * as budgets from "@distilled.cloud/aws/budgets";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { BudgetAction } from "./BudgetAction.ts";
5
6 /**
7 * Request for {@link ExecuteBudgetAction} — the bound action's `AccountId`,
8 * `BudgetName`, and `ActionId` are injected automatically.
9 */
10 export interface ExecuteBudgetActionRequest extends Omit<
11 budgets.ExecuteBudgetActionRequest,
12 "AccountId" | "BudgetName" | "ActionId"
13 > {}
14
15 /**
16 * Runtime binding for `budgets:ExecuteBudgetAction`.
17 *
18 * Bind this operation to a {@link BudgetAction} to approve, retry, reverse,
19 * or reset it from inside a function runtime — e.g. an approval workflow that
20 * approves a pending kill-switch, or an automated recovery that reverses it
21 * at the start of a new period. Provide the implementation with
22 * `Effect.provide(AWS.Budgets.ExecuteBudgetActionHttp)`.
23 * ### Executing Budget Actions
24 * **Example:** Approve a Pending Action
25 * ```typescript
26 * // init — bind the operation to the action
27 * const execute = yield* AWS.Budgets.ExecuteBudgetAction(action);
28 *
29 * // runtime
30 * yield* execute({ ExecutionType: "APPROVE_BUDGET_ACTION" });
31 * ```
32 *
33 * **Example:** Reverse an Executed Action
34 * ```typescript
35 * yield* execute({ ExecutionType: "REVERSE_BUDGET_ACTION" });
36 * ```
37 *
38 * @binding
39 */
40 export interface ExecuteBudgetAction extends Binding.Service<
41 ExecuteBudgetAction,
42 "AWS.Budgets.ExecuteBudgetAction",
43 (
44 action: BudgetAction,
45 ) => Effect.Effect<
46 (
47 request: ExecuteBudgetActionRequest,
48 ) => Effect.Effect<budgets.ExecuteBudgetActionResponse, budgets.ExecuteBudgetActionError>
49 >
50 > {}
51
52 export const ExecuteBudgetAction = Binding.Service<ExecuteBudgetAction>(
53 "AWS.Budgets.ExecuteBudgetAction",
54 );