@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 44 lines 1.44 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:QueryWhatIfForecast` — retrieve the
7 * predicted time series for a single item from a what-if forecast, so an
8 * application can compare a scenario (price change, promotion) against the
9 * baseline served by {@link QueryForecast}.
10 *
11 * What-if forecast ARNs are created at runtime, so the binding takes no
12 * arguments and grants `forecast:QueryWhatIfForecast` on `*`. Provide the
13 * implementation with `Effect.provide(AWS.Forecast.QueryWhatIfForecastHttp)`.
14 *
15 * ### Querying Forecasts
16 * **Example:** Compare a Scenario
17 * ```typescript
18 * // init
19 * const queryWhatIfForecast = yield* AWS.Forecast.QueryWhatIfForecast();
20 *
21 * // runtime
22 * const { Forecast } = yield* queryWhatIfForecast({
23 * WhatIfForecastArn: whatIfForecastArn,
24 * Filters: { item_id: "sku_1234" },
25 * });
26 * ```
27 *
28 * @binding
29 */
30 export interface QueryWhatIfForecast extends Binding.Service<
31 QueryWhatIfForecast,
32 "AWS.Forecast.QueryWhatIfForecast",
33 () => Effect.Effect<
34 (
35 request: forecastquery.QueryWhatIfForecastRequest,
36 ) => Effect.Effect<
37 forecastquery.QueryWhatIfForecastResponse,
38 forecastquery.QueryWhatIfForecastError
39 >
40 >
41 > {}
42 export const QueryWhatIfForecast = Binding.Service<QueryWhatIfForecast>(
43 "AWS.Forecast.QueryWhatIfForecast",
44 );