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, 06:00 UTC
| 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 ListJobsRequest extends Omit<amplify.ListJobsRequest, "appId"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `amplify:ListJobs`. |
| 10 | * |
| 11 | * Bind an {@link App} in the function's init phase to get a callable that |
| 12 | * lists the build jobs of one of the app's branches, newest first. Provide the |
| 13 | * implementation with `Effect.provide(AWS.Amplify.ListJobsHttp)`. |
| 14 | * ### Observing Jobs |
| 15 | * **Example:** Read the Latest Job of a Branch |
| 16 | * ```typescript |
| 17 | * // init — bind the operation to the app |
| 18 | * const listJobs = yield* AWS.Amplify.ListJobs(app); |
| 19 | * |
| 20 | * // runtime — the first summary is the most recent job |
| 21 | * const { jobSummaries } = yield* listJobs({ |
| 22 | * branchName: "main", |
| 23 | * maxResults: 1, |
| 24 | * }); |
| 25 | * const latest = jobSummaries[0]; |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface ListJobs extends Binding.Service< |
| 31 | ListJobs, |
| 32 | "AWS.Amplify.ListJobs", |
| 33 | ( |
| 34 | app: App, |
| 35 | ) => Effect.Effect< |
| 36 | (request: ListJobsRequest) => Effect.Effect<amplify.ListJobsResult, amplify.ListJobsError> |
| 37 | > |
| 38 | > {} |
| 39 | |
| 40 | export const ListJobs = Binding.Service<ListJobs>("AWS.Amplify.ListJobs"); |