@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 43 lines 1.36 KB
Raw
1 import type * as codeartifact from "@distilled.cloud/aws/codeartifact";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Repository } from "./Repository.ts";
5
6 /**
7 * Request for {@link ListPackages} — `domain`, `domainOwner`, and
8 * `repository` are injected from the bound {@link Repository}.
9 */
10 export interface ListPackagesRequest extends Omit<
11 codeartifact.ListPackagesRequest,
12 "domain" | "domainOwner" | "repository"
13 > {}
14
15 /**
16 * Runtime binding for `codeartifact:ListPackages`.
17 *
18 * Lists the packages stored in the bound repository. Provide the implementation with
19 * `Effect.provide(AWS.CodeArtifact.ListPackagesHttp)`.
20 * ### Browsing Packages
21 * **Example:** List Packages by Prefix
22 * ```typescript
23 * const listPackages = yield* AWS.CodeArtifact.ListPackages(repo);
24 *
25 * const res = yield* listPackages({ packagePrefix: "my-" });
26 * for (const pkg of res.packages ?? []) console.log(pkg.package);
27 * ```
28 *
29 * @binding
30 */
31 export interface ListPackages extends Binding.Service<
32 ListPackages,
33 "AWS.CodeArtifact.ListPackages",
34 (
35 repository: Repository,
36 ) => Effect.Effect<
37 (
38 request: ListPackagesRequest,
39 ) => Effect.Effect<codeartifact.ListPackagesResult, codeartifact.ListPackagesError>
40 >
41 > {}
42
43 export const ListPackages = Binding.Service<ListPackages>("AWS.CodeArtifact.ListPackages");