@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 53 lines 1.74 KB
Raw
1 import type * as backupsearch from "@distilled.cloud/aws/backupsearch";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { SearchJob } from "./SearchJob.ts";
5
6 /** `ListSearchJobBackups` request with `SearchJobIdentifier` injected from the bound {@link SearchJob}. */
7 export interface ListSearchJobBackupsRequest extends Omit<
8 backupsearch.ListSearchJobBackupsInput,
9 "SearchJobIdentifier"
10 > {}
11
12 /**
13 * Runtime binding for `backup-search:ListSearchJobBackups`.
14 *
15 * Pages through the recovery points included in the bound search job, with
16 * each backup's per-job status — including backups skipped because their
17 * index is not `ACTIVE` or a permissions issue marked them `FAILED`. Provide
18 * the implementation with
19 * `Effect.provide(AWS.BackupSearch.ListSearchJobBackupsHttp)`.
20 * ### Reading Searched Backups
21 * **Example:** List the Search Job's Backups
22 * ```typescript
23 * // init — bind the operation to the search job
24 * const listSearchJobBackups =
25 * yield* AWS.BackupSearch.ListSearchJobBackups(search);
26 *
27 * // runtime
28 * const page = yield* listSearchJobBackups({ MaxResults: 100 });
29 * for (const backup of page.Results) {
30 * console.log(backup.BackupResourceArn, backup.Status);
31 * }
32 * ```
33 *
34 * @binding
35 */
36 export interface ListSearchJobBackups extends Binding.Service<
37 ListSearchJobBackups,
38 "AWS.BackupSearch.ListSearchJobBackups",
39 (
40 searchJob: SearchJob,
41 ) => Effect.Effect<
42 (
43 request?: ListSearchJobBackupsRequest,
44 ) => Effect.Effect<
45 backupsearch.ListSearchJobBackupsOutput,
46 backupsearch.ListSearchJobBackupsError
47 >
48 >
49 > {}
50
51 export const ListSearchJobBackups = Binding.Service<ListSearchJobBackups>(
52 "AWS.BackupSearch.ListSearchJobBackups",
53 );