@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 40 lines 1.38 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:DescribeAutoPredictor` — poll a training run
7 * started by {@link CreateAutoPredictor} until its `Status` reaches `ACTIVE`
8 * (or `CREATE_FAILED`) and read its estimated time remaining.
9 *
10 * Predictor ARNs are created at runtime, so the binding takes no arguments
11 * and grants `forecast:DescribeAutoPredictor` on `*`. Provide the
12 * implementation with `Effect.provide(AWS.Forecast.DescribeAutoPredictorHttp)`.
13 *
14 * ### Training Predictors
15 * **Example:** Poll a Training Run
16 * ```typescript
17 * // init
18 * const describeAutoPredictor = yield* AWS.Forecast.DescribeAutoPredictor();
19 *
20 * // runtime
21 * const detail = yield* describeAutoPredictor({
22 * PredictorArn: predictor.PredictorArn!,
23 * });
24 * yield* Effect.log(`training ${detail.Status}`);
25 * ```
26 *
27 * @binding
28 */
29 export interface DescribeAutoPredictor extends Binding.Service<
30 DescribeAutoPredictor,
31 "AWS.Forecast.DescribeAutoPredictor",
32 () => Effect.Effect<
33 (
34 request: forecast.DescribeAutoPredictorRequest,
35 ) => Effect.Effect<forecast.DescribeAutoPredictorResponse, forecast.DescribeAutoPredictorError>
36 >
37 > {}
38 export const DescribeAutoPredictor = Binding.Service<DescribeAutoPredictor>(
39 "AWS.Forecast.DescribeAutoPredictor",
40 );