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

main
ts 45 lines 1.54 KB
Raw
1 import type * as sesv2 from "@distilled.cloud/aws/sesv2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `sesv2:BatchGetMetricData`.
7 *
8 * Fetches up to 10 aggregated deliverability metric time-series in one call —
9 * sends, deliveries, bounces, complaints, opens, clicks — over a date range,
10 * optionally sliced by dimension (ISP, configuration set, etc.). Requires VDM
11 * (Virtual Deliverability Manager) to be enabled; a malformed query surfaces
12 * the typed `BadRequestException`. Account-level operation. Provide the
13 * implementation with `Effect.provide(AWS.SES.BatchGetMetricDataHttp)`.
14 * ### Deliverability Insights
15 * **Example:** Query Send and Delivery Counts
16 * ```typescript
17 * // init — account-level binding, no resource argument
18 * const getMetrics = yield* SES.BatchGetMetricData();
19 *
20 * // runtime
21 * const { Results } = yield* getMetrics({
22 * Queries: [
23 * {
24 * Id: "sends",
25 * Namespace: "VDM",
26 * Metric: "SEND",
27 * StartDate: new Date(Date.now() - 7 * 24 * 3600 * 1000),
28 * EndDate: new Date(),
29 * },
30 * ],
31 * });
32 * ```
33 *
34 * @binding
35 */
36 export interface BatchGetMetricData extends Binding.Service<
37 BatchGetMetricData,
38 "AWS.SES.BatchGetMetricData",
39 () => Effect.Effect<
40 (
41 request: sesv2.BatchGetMetricDataRequest,
42 ) => Effect.Effect<sesv2.BatchGetMetricDataResponse, sesv2.BatchGetMetricDataError>
43 >
44 > {}
45 export const BatchGetMetricData = Binding.Service<BatchGetMetricData>("AWS.SES.BatchGetMetricData");