sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Detective/ ListDatasourcePackages.ts

import type * as detective from "@distilled.cloud/aws/detective";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Graph } from "./Graph.ts";

/**
 * Runtime binding for `detective:ListDatasourcePackages`.
 *
 * Lists the behavior graph's data source packages (core CloudTrail/VPC Flow,
 * EKS audit, ASFF findings) and their ingest state — audit what Detective is
 * actually ingesting. The graph ARN is injected from the bound {@link Graph}.
 * Provide the implementation with
 * `Effect.provide(AWS.Detective.ListDatasourcePackagesHttp)`.
 * ### Managing Data Source Packages
 * **Example:** Audit Ingested Data Sources
 * ```typescript
 * // init
 * const listDatasourcePackages =
 *   yield* AWS.Detective.ListDatasourcePackages(graph);
 *
 * // runtime
 * const { DatasourcePackages } = yield* listDatasourcePackages();
 * ```
 *
 * @binding
 */
export interface ListDatasourcePackages extends Binding.Service<
  ListDatasourcePackages,
  "AWS.Detective.ListDatasourcePackages",
  (
    graph: Graph,
  ) => Effect.Effect<
    (
      request?: Omit<detective.ListDatasourcePackagesRequest, "GraphArn">,
    ) => Effect.Effect<
      detective.ListDatasourcePackagesResponse,
      detective.ListDatasourcePackagesError
    >
  >
> {}
export const ListDatasourcePackages = Binding.Service<ListDatasourcePackages>(
  "AWS.Detective.ListDatasourcePackages",
);