| 1 | import type * as codeconnections from "@distilled.cloud/aws/codeconnections"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Request for {@link ListRepositoryLinks}. |
| 7 | */ |
| 8 | export interface ListRepositoryLinksRequest |
| 9 | extends codeconnections.ListRepositoryLinksInput {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `codeconnections:ListRepositoryLinks`. |
| 13 | * |
| 14 | * An account-level operation (no repository-link argument) that enumerates |
| 15 | * the account's repository links — the Git-sync attachments between a |
| 16 | * connection and a specific provider repository. Useful for sync dashboards |
| 17 | * that discover which repositories are wired up before drilling into their |
| 18 | * sync status. Provide the implementation with |
| 19 | * `Effect.provide(AWS.CodeConnections.ListRepositoryLinksHttp)`. |
| 20 | * ### Monitoring Git Sync |
| 21 | * **Example:** List the Account's Repository Links |
| 22 | * ```typescript |
| 23 | * // init — account-level binding takes no resource |
| 24 | * const listRepositoryLinks = |
| 25 | * yield* AWS.CodeConnections.ListRepositoryLinks(); |
| 26 | * |
| 27 | * // runtime |
| 28 | * const result = yield* listRepositoryLinks(); |
| 29 | * const repos = (result.RepositoryLinks ?? []).map((l) => l.RepositoryName); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface ListRepositoryLinks extends Binding.Service< |
| 35 | ListRepositoryLinks, |
| 36 | "AWS.CodeConnections.ListRepositoryLinks", |
| 37 | () => Effect.Effect< |
| 38 | ( |
| 39 | request?: ListRepositoryLinksRequest, |
| 40 | ) => Effect.Effect< |
| 41 | codeconnections.ListRepositoryLinksOutput, |
| 42 | codeconnections.ListRepositoryLinksError |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | |
| 47 | export const ListRepositoryLinks = Binding.Service<ListRepositoryLinks>( |
| 48 | "AWS.CodeConnections.ListRepositoryLinks", |
| 49 | ); |