/**
 * Cloudflare SECURITY-CENTER API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service security-center
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
export const ListInsightsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.Http({
    method: "GET",
    path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights",
}));
export const ListInsightsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Struct({
        items: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                issues: Schema.optional(Schema.Union([
                    Schema.Array(Schema.Struct({
                        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                        dismissed: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                        issueClass: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                        issueType: Schema.optional(Schema.Union([
                            Schema.Literals([
                                "compliance_violation",
                                "email_security",
                                "exposed_infrastructure",
                                "insecure_configuration",
                                "weak_authentication",
                                "configuration_suggestion",
                            ]),
                            Schema.Null,
                        ])),
                        payload: Schema.optional(Schema.Union([
                            Schema.Struct({
                                detectionMethod: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                                zoneTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                            }).pipe(Schema.encodeKeys({
                                detectionMethod: "detection_method",
                                zoneTag: "zone_tag",
                            })),
                            Schema.Null,
                        ])),
                        resolveLink: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                        resolveText: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                        severity: Schema.optional(Schema.Union([
                            Schema.Literals(["Low", "Moderate", "Critical"]),
                            Schema.Null,
                        ])),
                        since: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                        subject: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                        timestamp: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    }).pipe(Schema.encodeKeys({
                        id: "id",
                        dismissed: "dismissed",
                        issueClass: "issue_class",
                        issueType: "issue_type",
                        payload: "payload",
                        resolveLink: "resolve_link",
                        resolveText: "resolve_text",
                        severity: "severity",
                        since: "since",
                        subject: "subject",
                        timestamp: "timestamp",
                    }))),
                    Schema.Null,
                ])),
                page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                count: "count",
                issues: "issues",
                page: "page",
                perPage: "per_page",
            }))),
            Schema.Null,
        ])),
    }),
    resultInfo: Schema.Struct({
        count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        count: "count",
        page: "page",
        perPage: "per_page",
        totalCount: "total_count",
    })),
}).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
export const listInsights = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListInsightsRequest,
    output: ListInsightsResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result.items",
        pageSize: "perPage",
    },
}));
export const DismissInsightRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    issueId: Schema.String.pipe(T.HttpPath("issueId")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    dismiss: Schema.optional(Schema.Boolean),
}).pipe(T.Http({
    method: "PUT",
    path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/{issueId}/dismiss",
}));
export const DismissInsightResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    errors: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    messages: Schema.Array(Schema.Struct({
        code: Schema.Number,
        message: Schema.String,
        documentationUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        source: Schema.optional(Schema.Union([
            Schema.Struct({
                pointer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        code: "code",
        message: "message",
        documentationUrl: "documentation_url",
        source: "source",
    }))),
    success: Schema.Literal(true),
});
export const dismissInsight = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DismissInsightRequest,
    output: DismissInsightResponse,
    errors: [],
}));
export const GetInsightClassRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.Http({
    method: "GET",
    path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/class",
}));
export const GetInsightClassResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(Schema.Struct({
    count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})).pipe(T.ResponsePath("result"));
export const getInsightClass = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetInsightClassRequest,
    output: GetInsightClassResponse,
    errors: [],
}));
export const GetInsightSeverityRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.Http({
    method: "GET",
    path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/severity",
}));
export const GetInsightSeverityResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(Schema.Struct({
    count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})).pipe(T.ResponsePath("result"));
export const getInsightSeverity = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetInsightSeverityRequest,
    output: GetInsightSeverityResponse,
    errors: [],
}));
export const GetInsightTypeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.Http({
    method: "GET",
    path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/type",
}));
export const GetInsightTypeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(Schema.Struct({
    count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})).pipe(T.ResponsePath("result"));
export const getInsightType = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetInsightTypeRequest,
    output: GetInsightTypeResponse,
    errors: [],
}));
//# sourceMappingURL=security-center.js.map