@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 41 lines 1.39 KB
Raw
1 import type * as forecast from "@distilled.cloud/aws/forecast";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `forecast:CreateWhatIfAnalysis` — start a what-if
7 * analysis on a baseline forecast, the container under which scenario
8 * forecasts (price changes, promotions) are created and later compared via
9 * {@link QueryWhatIfForecast}.
10 *
11 * What-if analysis ARNs are created at runtime, so the binding takes no
12 * arguments and grants `forecast:CreateWhatIfAnalysis` on `*`. Provide the
13 * implementation with `Effect.provide(AWS.Forecast.CreateWhatIfAnalysisHttp)`.
14 *
15 * ### What-If Scenarios
16 * **Example:** Start a What-If Analysis
17 * ```typescript
18 * // init
19 * const createWhatIfAnalysis = yield* AWS.Forecast.CreateWhatIfAnalysis();
20 *
21 * // runtime
22 * const analysis = yield* createWhatIfAnalysis({
23 * WhatIfAnalysisName: "promo_scenarios",
24 * ForecastArn: forecastArn,
25 * });
26 * ```
27 *
28 * @binding
29 */
30 export interface CreateWhatIfAnalysis extends Binding.Service<
31 CreateWhatIfAnalysis,
32 "AWS.Forecast.CreateWhatIfAnalysis",
33 () => Effect.Effect<
34 (
35 request: forecast.CreateWhatIfAnalysisRequest,
36 ) => Effect.Effect<forecast.CreateWhatIfAnalysisResponse, forecast.CreateWhatIfAnalysisError>
37 >
38 > {}
39 export const CreateWhatIfAnalysis = Binding.Service<CreateWhatIfAnalysis>(
40 "AWS.Forecast.CreateWhatIfAnalysis",
41 );