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

main
ts 45 lines 1.3 KB
Raw
1 import type * as ag from "@distilled.cloud/aws/api-gateway";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { UsagePlan } from "./UsagePlan.ts";
5
6 export interface DeleteUsagePlanKeyRequest extends Omit<
7 ag.DeleteUsagePlanKeyRequest,
8 "usagePlanId"
9 > {}
10
11 /**
12 * Runtime binding for removing an API key from a {@link UsagePlan}
13 * (`apigateway:DELETE` on `/usageplans/{id}/keys/{keyId}`).
14 *
15 * Provide `ApiGateway.DeleteUsagePlanKeyHttp` on the Function effect to
16 * implement the binding.
17 *
18 * ### Managing plan keys
19 * **Example:** Unenroll a key on subscription cancellation
20 * ```typescript
21 * // init
22 * const deleteUsagePlanKey = yield* ApiGateway.DeleteUsagePlanKey(plan);
23 *
24 * // runtime
25 * yield* deleteUsagePlanKey({ keyId }).pipe(
26 * Effect.catchTag("NotFoundException", () => Effect.void),
27 * );
28 * ```
29 *
30 * @binding
31 */
32 export interface DeleteUsagePlanKey extends Binding.Service<
33 DeleteUsagePlanKey,
34 "AWS.ApiGateway.DeleteUsagePlanKey",
35 <P extends UsagePlan>(
36 usagePlan: P,
37 ) => Effect.Effect<
38 (
39 request: DeleteUsagePlanKeyRequest,
40 ) => Effect.Effect<ag.DeleteUsagePlanKeyResponse, ag.DeleteUsagePlanKeyError>
41 >
42 > {}
43 export const DeleteUsagePlanKey = Binding.Service<DeleteUsagePlanKey>(
44 "AWS.ApiGateway.DeleteUsagePlanKey",
45 );