1import type * as auditmanager from "@distilled.cloud/aws/auditmanager";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Assessment } from "./Assessment.ts";
5
6/** `GetInsightsByAssessment` request with `assessmentId` injected from the bound {@link Assessment}. */
7export interface GetInsightsByAssessmentRequest extends Omit<
8 auditmanager.GetInsightsByAssessmentRequest,
9 "assessmentId"
10> {}
11
12/**
13 * Runtime binding for `auditmanager:GetInsightsByAssessment`.
14 *
15 * Gets the latest analytics data for the bound assessment. Provide the
16 * implementation with `Effect.provide(AWS.AuditManager.GetInsightsByAssessmentHttp)`.
17 * ### Insights
18 * **Example:** Insights for the Bound Assessment
19 * ```typescript
20 * const getInsightsByAssessment = yield* AWS.AuditManager.GetInsightsByAssessment(assessment);
21 * const result = yield* getInsightsByAssessment();
22 * ```
23 *
24 * @binding
25 */
26export interface GetInsightsByAssessment extends Binding.Service<
27 GetInsightsByAssessment,
28 "AWS.AuditManager.GetInsightsByAssessment",
29 (
30 assessment: Assessment,
31 ) => Effect.Effect<
32 (
33 request?: GetInsightsByAssessmentRequest,
34 ) => Effect.Effect<
35 auditmanager.GetInsightsByAssessmentResponse,
36 auditmanager.GetInsightsByAssessmentError
37 >
38 >
39> {}
40
41export const GetInsightsByAssessment = Binding.Service<GetInsightsByAssessment>(
42 "AWS.AuditManager.GetInsightsByAssessment",
43);