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

main
ts 53 lines 1.72 KB
Raw
1 import type * as amplify from "@distilled.cloud/aws/amplify";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { App } from "./App.ts";
5
6 export interface StartDeploymentRequest extends Omit<amplify.StartDeploymentRequest, "appId"> {}
7
8 /**
9 * Runtime binding for `amplify:StartDeployment`.
10 *
11 * Bind an {@link App} in the function's init phase to get a callable that
12 * releases a manual deployment on a branch of an app with no connected
13 * repository — either a deployment staged with {@link CreateDeployment}
14 * (`jobId`) or content fetched from a public `sourceUrl` (zip URL or S3
15 * prefix). Provide the implementation with
16 * `Effect.provide(AWS.Amplify.StartDeploymentHttp)`.
17 * ### Manual Deployments
18 * **Example:** Release a Staged Deployment
19 * ```typescript
20 * // init — bind the operation to the app
21 * const startDeployment = yield* AWS.Amplify.StartDeployment(app);
22 *
23 * // runtime — release the artifact uploaded via CreateDeployment
24 * const { jobSummary } = yield* startDeployment({
25 * branchName: "main",
26 * jobId,
27 * });
28 * ```
29 *
30 * **Example:** Deploy Directly from an S3 Prefix
31 * ```typescript
32 * const { jobSummary } = yield* startDeployment({
33 * branchName: "main",
34 * sourceUrl: "s3://my-site-artifacts/latest/",
35 * sourceUrlType: "BUCKET_PREFIX",
36 * });
37 * ```
38 *
39 * @binding
40 */
41 export interface StartDeployment extends Binding.Service<
42 StartDeployment,
43 "AWS.Amplify.StartDeployment",
44 (
45 app: App,
46 ) => Effect.Effect<
47 (
48 request: StartDeploymentRequest,
49 ) => Effect.Effect<amplify.StartDeploymentResult, amplify.StartDeploymentError>
50 >
51 > {}
52
53 export const StartDeployment = Binding.Service<StartDeployment>("AWS.Amplify.StartDeployment");