sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ CodeBuild/ GetReportGroupTrend.ts

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

/**
 * Runtime binding for `codebuild:GetReportGroupTrend` — aggregates a trend
 * statistic (pass rate, duration, …) across the bound report group's most
 * recent reports.
 * ### Reading Reports
 * **Example:** Read the Pass-Rate Trend
 * ```typescript
 * const getReportGroupTrend = yield* AWS.CodeBuild.GetReportGroupTrend(reportGroup);
 *
 * const { stats } = yield* getReportGroupTrend({ trendField: "PASS_RATE" });
 * ```
 *
 * @binding
 */
export interface GetReportGroupTrend extends Binding.Service<
  GetReportGroupTrend,
  "AWS.CodeBuild.GetReportGroupTrend",
  <G extends ReportGroup>(
    reportGroup: G,
  ) => Effect.Effect<
    (
      request: Omit<SVC.GetReportGroupTrendInput, "reportGroupArn">,
    ) => Effect.Effect<SVC.GetReportGroupTrendOutput, SVC.GetReportGroupTrendError>
  >
> {}
export const GetReportGroupTrend = Binding.Service<GetReportGroupTrend>(
  "AWS.CodeBuild.GetReportGroupTrend",
);