UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

80 lines • 4 kB
import { APIResource } from "../../core/resource.js"; import * as DetectionsAPI from "./detections.js"; import { BaseDetections, DetectionCreateParams, DetectionCreateResponse, DetectionDeleteParams, DetectionDeleteResponse, DetectionGetParams, DetectionGetResponse, DetectionListParams, DetectionListResponse, DetectionListResponsesSinglePage, DetectionUpdateParams, DetectionUpdateResponse, Detections } from "./detections.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class BaseLeakedCredentialChecks extends APIResource { static readonly _key: readonly ['leakedCredentialChecks']; /** * Update the Leaked Credential Checks status for the zone, enabling or disabling * the detection. While enabled, the detection populates the * `cf.waf.credential_check.*` fields, which you can reference in custom rules and * rate limiting rules to challenge or block requests carrying compromised * credentials. * * @example * ```ts * const leakedCredentialCheck = * await client.leakedCredentialChecks.create({ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ create(params: LeakedCredentialCheckCreateParams, options?: RequestOptions): APIPromise<LeakedCredentialCheckCreateResponse>; /** * Get the current Leaked Credential Checks status for the zone. While enabled, * Cloudflare scans incoming requests for usernames and passwords that were exposed * in known data breaches. * * @example * ```ts * const leakedCredentialCheck = * await client.leakedCredentialChecks.get({ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ get(params: LeakedCredentialCheckGetParams, options?: RequestOptions): APIPromise<LeakedCredentialCheckGetResponse>; } export declare class LeakedCredentialChecks extends BaseLeakedCredentialChecks { detections: DetectionsAPI.Detections; } /** * Defines the overall status for Leaked Credential Checks. */ export interface LeakedCredentialCheckCreateResponse { /** * Determines whether or not Leaked Credential Checks are enabled. */ enabled?: boolean; } /** * Defines the overall status for Leaked Credential Checks. */ export interface LeakedCredentialCheckGetResponse { /** * Determines whether or not Leaked Credential Checks are enabled. */ enabled?: boolean; } export interface LeakedCredentialCheckCreateParams { /** * Path param: Defines an identifier. */ zone_id: string; /** * Body param: Determines whether or not Leaked Credential Checks are enabled. */ enabled?: boolean; } export interface LeakedCredentialCheckGetParams { /** * Defines an identifier. */ zone_id: string; } export declare namespace LeakedCredentialChecks { export { type LeakedCredentialCheckCreateResponse as LeakedCredentialCheckCreateResponse, type LeakedCredentialCheckGetResponse as LeakedCredentialCheckGetResponse, type LeakedCredentialCheckCreateParams as LeakedCredentialCheckCreateParams, type LeakedCredentialCheckGetParams as LeakedCredentialCheckGetParams, }; export { Detections as Detections, BaseDetections as BaseDetections, type DetectionCreateResponse as DetectionCreateResponse, type DetectionUpdateResponse as DetectionUpdateResponse, type DetectionListResponse as DetectionListResponse, type DetectionDeleteResponse as DetectionDeleteResponse, type DetectionGetResponse as DetectionGetResponse, type DetectionListResponsesSinglePage as DetectionListResponsesSinglePage, type DetectionCreateParams as DetectionCreateParams, type DetectionUpdateParams as DetectionUpdateParams, type DetectionListParams as DetectionListParams, type DetectionDeleteParams as DetectionDeleteParams, type DetectionGetParams as DetectionGetParams, }; } //# sourceMappingURL=leaked-credential-checks.d.ts.map