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

main
ts 40 lines 1.34 KB
Raw
1 import type * as forecastquery from "@distilled.cloud/aws/forecastquery";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `forecast:QueryForecast` — the Forecast Query data
7 * plane. Retrieves the predicted time series for a single item from a
8 * generated forecast, the call an API or personalization function makes to
9 * serve predictions.
10 *
11 * Forecast ARNs are created at runtime, so the binding takes no arguments
12 * and grants `forecast:QueryForecast` on `*`. Provide the implementation
13 * with `Effect.provide(AWS.Forecast.QueryForecastHttp)`.
14 *
15 * ### Querying Forecasts
16 * **Example:** Serve a Prediction
17 * ```typescript
18 * // init
19 * const queryForecast = yield* AWS.Forecast.QueryForecast();
20 *
21 * // runtime
22 * const { Forecast } = yield* queryForecast({
23 * ForecastArn: forecastArn,
24 * Filters: { item_id: "sku_1234" },
25 * });
26 * const p50 = Forecast?.Predictions?.p50 ?? [];
27 * ```
28 *
29 * @binding
30 */
31 export interface QueryForecast extends Binding.Service<
32 QueryForecast,
33 "AWS.Forecast.QueryForecast",
34 () => Effect.Effect<
35 (
36 request: forecastquery.QueryForecastRequest,
37 ) => Effect.Effect<forecastquery.QueryForecastResponse, forecastquery.QueryForecastError>
38 >
39 > {}
40 export const QueryForecast = Binding.Service<QueryForecast>("AWS.Forecast.QueryForecast");