/**
 * Cloudflare LEAKED-CREDENTIAL-CHECKS API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service leaked-credential-checks
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
import { SensitiveString } from "../sensitive.js";
export const GetDetectionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    detectionId: Schema.String.pipe(T.HttpPath("detectionId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/leaked-credential-checks/detections/{detectionId}",
}));
export const GetDetectionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    password: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    username: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getDetection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDetectionRequest,
    output: GetDetectionResponse,
    errors: [],
}));
export const ListDetectionsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/leaked-credential-checks/detections",
}));
export const ListDetectionsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        password: Schema.optional(Schema.Union([SensitiveString, Schema.Null])),
        username: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const listDetections = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListDetectionsRequest,
    output: ListDetectionsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateDetectionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    password: Schema.optional(Schema.String),
    username: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "POST",
    path: "/zones/{zone_id}/leaked-credential-checks/detections",
}));
export const CreateDetectionResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    password: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    username: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createDetection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateDetectionRequest,
    output: CreateDetectionResponse,
    errors: [],
}));
export const UpdateDetectionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    detectionId: Schema.String.pipe(T.HttpPath("detectionId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    password: Schema.optional(Schema.String),
    username: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "PUT",
    path: "/zones/{zone_id}/leaked-credential-checks/detections/{detectionId}",
}));
export const UpdateDetectionResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    password: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    username: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const updateDetection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateDetectionRequest,
    output: UpdateDetectionResponse,
    errors: [],
}));
export const DeleteDetectionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    detectionId: Schema.String.pipe(T.HttpPath("detectionId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/leaked-credential-checks/detections/{detectionId}",
}));
export const DeleteDetectionResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(T.ResponsePath("result"));
export const deleteDetection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteDetectionRequest,
    output: DeleteDetectionResponse,
    errors: [],
}));
export const GetLeakedCredentialCheckRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/leaked-credential-checks",
}));
export const GetLeakedCredentialCheckResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getLeakedCredentialCheck = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetLeakedCredentialCheckRequest,
    output: GetLeakedCredentialCheckResponse,
    errors: [],
}));
export const CreateLeakedCredentialCheckRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    enabled: Schema.optional(Schema.Boolean),
}).pipe(T.Http({
    method: "POST",
    path: "/zones/{zone_id}/leaked-credential-checks",
}));
export const CreateLeakedCredentialCheckResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createLeakedCredentialCheck = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateLeakedCredentialCheckRequest,
    output: CreateLeakedCredentialCheckResponse,
    errors: [],
}));
//# sourceMappingURL=leaked-credential-checks.js.map