@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, 06:00 UTC

main
ts 52 lines 1.72 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 /** `ListSearchJobResults` request with `SearchJobIdentifier` injected from the bound {@link SearchJob}. */
7 export interface ListSearchJobResultsRequest extends Omit<
8 backupsearch.ListSearchJobResultsInput,
9 "SearchJobIdentifier"
10 > {}
11
12 /**
13 * Runtime binding for `backup-search:ListSearchJobResults`.
14 *
15 * Pages through the search results (matched S3 objects / EBS files) of the
16 * bound search job. Results stream in while the job is `RUNNING` and are
17 * retained for seven days after it completes. Provide the implementation
18 * with `Effect.provide(AWS.BackupSearch.ListSearchJobResultsHttp)`.
19 * ### Reading Search Results
20 * **Example:** List the Search Job's Results
21 * ```typescript
22 * // init — bind the operation to the search job
23 * const listSearchJobResults =
24 * yield* AWS.BackupSearch.ListSearchJobResults(search);
25 *
26 * // runtime
27 * const page = yield* listSearchJobResults({ MaxResults: 100 });
28 * for (const item of page.Results) {
29 * if (item.S3ResultItem) console.log(item.S3ResultItem.BackupVaultName);
30 * }
31 * ```
32 *
33 * @binding
34 */
35 export interface ListSearchJobResults extends Binding.Service<
36 ListSearchJobResults,
37 "AWS.BackupSearch.ListSearchJobResults",
38 (
39 searchJob: SearchJob,
40 ) => Effect.Effect<
41 (
42 request?: ListSearchJobResultsRequest,
43 ) => Effect.Effect<
44 backupsearch.ListSearchJobResultsOutput,
45 backupsearch.ListSearchJobResultsError
46 >
47 >
48 > {}
49
50 export const ListSearchJobResults = Binding.Service<ListSearchJobResults>(
51 "AWS.BackupSearch.ListSearchJobResults",
52 );