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

main
ts 44 lines 1.38 KB
Raw
1 import type * as cloudfront from "@distilled.cloud/aws/cloudfront";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Distribution } from "./Distribution.ts";
5
6 export interface ListInvalidationsRequest extends Omit<
7 cloudfront.ListInvalidationsRequest,
8 "DistributionId"
9 > {}
10
11 /**
12 * Runtime binding for `cloudfront:ListInvalidations`.
13 *
14 * Lists the cache invalidations of the bound distribution (paginated via
15 * `Marker`/`MaxItems`). Provide the implementation with
16 * `Effect.provide(AWS.CloudFront.ListInvalidationsHttp)`.
17 * ### Inspecting Invalidations
18 * **Example:** List Recent Invalidations
19 * ```typescript
20 * // init — bind the operation to the distribution
21 * const listInvalidations = yield* CloudFront.ListInvalidations(distribution);
22 *
23 * // runtime
24 * const res = yield* listInvalidations({ MaxItems: 10 });
25 * console.log(res.InvalidationList?.Items?.map((i) => i.Id));
26 * ```
27 *
28 * @binding
29 */
30 export interface ListInvalidations extends Binding.Service<
31 ListInvalidations,
32 "AWS.CloudFront.ListInvalidations",
33 (
34 distribution: Distribution,
35 ) => Effect.Effect<
36 (
37 request: ListInvalidationsRequest,
38 ) => Effect.Effect<cloudfront.ListInvalidationsResult, cloudfront.ListInvalidationsError>
39 >
40 > {}
41
42 export const ListInvalidations = Binding.Service<ListInvalidations>(
43 "AWS.CloudFront.ListInvalidations",
44 );