// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, CloudflarePaginatedProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { cloudflarePaginate, ResultInfo } from "../pagination.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { credentialSet: "credential_set", credentialSetId: "credential_set_id", credentialSets: "credential_sets", errorCode: "error_code", headerNames: "header_names", jsonPath: "json_path", locationName: "location_name", openApi: "open_api", perPage: "per_page", preflightErrors: "preflight_errors", reportSchemaVersion: "report_schema_version", resultInfo: "result_info", scanType: "scan_type", statusText: "status_text", targetEnvironmentId: "target_environment_id", totalCount: "total_count", variableCaptures: "variable_captures", zoneTag: "zone_tag", }; export class CredentialNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("CredentialNotFound", { code: S.Number, message: S.String, }), [{ code: 14002 }], ) {} export class CredentialSetNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "CredentialSetNotFound", { code: S.Number, message: S.String, }, ), [{ code: 14001 }], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class TargetEnvironmentNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "TargetEnvironmentNotFound", { code: S.Number, message: S.String, }, ), [{ code: 11001 }], ) {} export class ZoneTagNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("ZoneTagNotFound", { code: S.Number, message: S.String, }), [{ code: 14150 }], ) {} export interface CreateCredentialSetRequest { /** Identifier. */ accountId: string; /** Human-readable name. */ name: string; } export const CreateCredentialSetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/vuln_scanner/credential_sets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCredentialSetRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateCredentialSetResponse { /** Credential set identifier. */ id: string; /** Human-readable name. */ name: string; } export const CreateCredentialSetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCredentialSetResponse", }) as any as S.Schema; export type CredentialSetsCredentialsCreateRequestLocation = | "header" | "cookie"; export const CredentialSetsCredentialsCreateRequestLocation = /*@__PURE__*/ S.String; export interface CreateCredentialSetCredentialRequest { /** Identifier. */ accountId: string; credentialSetId: string; /** Where the credential is attached in outgoing requests. */ location: CredentialSetsCredentialsCreateRequestLocation | (string & {}); /** Name of the header or cookie where the credential is attached. */ locationName: string; /** Human-readable name. */ name: string; /** The credential value (e.g. API key, session token). Write-only. */ value: string; } export const CreateCredentialSetCredentialRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), location: CredentialSetsCredentialsCreateRequestLocation, locationName: S.String.pipe(T.Body("location_name")), name: S.String, value: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCredentialSetCredentialRequest", }) as any as S.Schema; export type CredentialSetsCredentialsCreateResponseLocation = | "header" | "cookie"; export const CredentialSetsCredentialsCreateResponseLocation = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateCredentialSetCredentialResponse { /** Credential identifier. */ id: string; /** Parent credential set identifier. */ credentialSetId: string; /** Where the credential is attached in outgoing requests. */ location: CredentialSetsCredentialsCreateResponseLocation; /** Name of the header or cookie where the credential is attached. */ locationName: string; /** Human-readable name. */ name: string; } export const CreateCredentialSetCredentialResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, credentialSetId: S.String.pipe(T.Body("credential_set_id")), location: CredentialSetsCredentialsCreateResponseLocation, locationName: S.String.pipe(T.Body("location_name")), name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCredentialSetCredentialResponse", }) as any as S.Schema; export interface ScansCreateRequestCredentialSets { /** Credential set ID for the attacker. */ attacker: string; /** Credential set ID for the resource owner. */ owner: string; } export const ScansCreateRequestCredentialSets = /*@__PURE__*/ S.suspend(() => S.Struct({ attacker: S.String, owner: S.String, }), ).annotate({ identifier: "ScansCreateRequestCredentialSets", }) as any as S.Schema; export type ScansCreateRequestScanType = "bola"; export const ScansCreateRequestScanType = /*@__PURE__*/ S.String; export interface CreateScanRequest { /** Identifier. */ accountId: string; /** Credential set references for a BOLA scan. The scanner uses the */ credentialSets: ScansCreateRequestCredentialSets; /** OpenAPI schema definition for the API under test. The scanner */ openApi: string; scanType: ScansCreateRequestScanType | (string & {}); /** The target environment to scan. */ targetEnvironmentId: string; } export const CreateScanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSets: ScansCreateRequestCredentialSets.pipe( T.Body("credential_sets"), ), openApi: S.String.pipe(T.Body("open_api")), scanType: ScansCreateRequestScanType.pipe(T.Body("scan_type")), targetEnvironmentId: S.String.pipe(T.Body("target_environment_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/vuln_scanner/scans", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateScanRequest", }) as any as S.Schema; export type ScansCreateResponseScanType = "bola"; export const ScansCreateResponseScanType = /*@__PURE__*/ S.String; export type ScansCreateResponseStatus = | "created" | "scheduled" | "planning" | "running" | "finished" | "failed"; export const ScansCreateResponseStatus = /*@__PURE__*/ S.String; export type ScansCreateResponseReportReportSummaryVerdict = | "ok" | "warning" | "inconclusive"; export const ScansCreateResponseReportReportSummaryVerdict = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportSummary { /** Overall verdict of the vulnerability scan. */ verdict: ScansCreateResponseReportReportSummaryVerdict; } export const ScansCreateResponseReportReportSummary = /*@__PURE__*/ S.suspend( () => S.Struct({ verdict: ScansCreateResponseReportReportSummaryVerdict, }), ).annotate({ identifier: "ScansCreateResponseReportReportSummary", }) as any as S.Schema; export interface ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters { /** Maximum (inclusive) status code of the range. */ max: number; /** Minimum (inclusive) status code of the range. */ min: number; } export const ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters = /*@__PURE__*/ S.suspend(() => S.Struct({ max: S.Number, min: S.Number, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindType = "http_status_within_range"; export const ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindType = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKind { /** Range of HTTP status codes. */ parameters: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters; type: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindType; } export const ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKind = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters, type: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindType, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKind", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemOutcome = | "ok" | "fail" | "inconclusive"; export const ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemOutcome = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemAssertionsItem { /** Human-readable description of the assertion, explaining what was checked. */ description: string; /** Kind of assertion. */ kind: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKind; /** Observed value on which the assertion was made. */ observed: number; /** Outcome of the assertion. */ outcome: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemOutcome; } export const ScansCreateResponseReportReportTestsItemStepsItemAssertionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.String, kind: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKind, observed: S.Number, outcome: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemOutcome, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemAssertionsItem", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemAssertionsList = Array; export const ScansCreateResponseReportReportTestsItemStepsItemAssertionsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemAssertionsItem, ) as any as S.Schema; export interface ScansCreateResponseReportReportTestsItemStepsItemErrorsItem { /** Human-readable error description. */ description: string; /** Numeric error code identifying the class of error, if available. */ errorCode?: number | null; } export const ScansCreateResponseReportReportTestsItemStepsItemErrorsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.String, errorCode: S.optional(S.NullOr(S.Number).pipe(T.Body("error_code"))), }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemErrorsItem", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemErrorsList = Array; export const ScansCreateResponseReportReportTestsItemStepsItemErrorsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemErrorsItem, ) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSetRole = | "owner" | "attacker"; export const ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSetRole = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSet { /** ID of the credential set. */ id: string; /** Role of the credential set. */ role: ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSetRole; } export const ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSet = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, role: ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSetRole, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSet", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemRequestHeaderNamesList = Array; export const ScansCreateResponseReportReportTestsItemStepsItemRequestHeaderNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemRequestMethod = | "GET" | "DELETE" | "PATCH" | "POST" | "PUT"; export const ScansCreateResponseReportReportTestsItemStepsItemRequestMethod = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem { /** JSONPath expression used for capture, e.g. `"$.id"`. */ jsonPath: string; /** Variable name, e.g. `"resource_id"`. */ name: string; } export const ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ jsonPath: S.String.pipe(T.Body("json_path")), name: S.String, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesList = Array; export const ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem, ) as any as S.Schema; export interface ScansCreateResponseReportReportTestsItemStepsItemRequest { /** Credential set that was used. */ credentialSet: ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSet; /** Names of headers that were sent. */ headerNames: ScansCreateResponseReportReportTestsItemStepsItemRequestHeaderNamesList; /** HTTP method. */ method: ScansCreateResponseReportReportTestsItemStepsItemRequestMethod; /** Exact and full URL (including host, query parameters) that was requested. */ url: string; /** Variable captures requested for this step. */ variableCaptures: ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesList; /** Request body, if any. */ body?: unknown | null; } export const ScansCreateResponseReportReportTestsItemStepsItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ credentialSet: ScansCreateResponseReportReportTestsItemStepsItemRequestCredentialSet.pipe( T.Body("credential_set"), ), headerNames: ScansCreateResponseReportReportTestsItemStepsItemRequestHeaderNamesList.pipe( T.Body("header_names"), ), method: ScansCreateResponseReportReportTestsItemStepsItemRequestMethod, url: S.String, variableCaptures: ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesList.pipe( T.Body("variable_captures"), ), body: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemRequest", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind = "not_found"; export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFound { kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind; } export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFound = /*@__PURE__*/ S.suspend(() => S.Struct({ kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFound", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytesKind = "bytes"; export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytesKind = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytes { contents: string; kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytesKind; truncated: boolean; } export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytes = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytesKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytes", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemResponseBodyTextKind = "text"; export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyTextKind = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemResponseBodyText { contents: string; kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyTextKind; truncated: boolean; } export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyText = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyTextKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemResponseBodyText", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJsonKind = "json"; export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJsonKind = /*@__PURE__*/ S.String; export interface ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJson { contents: string; kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJsonKind; truncated: boolean; } export const ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJson = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJsonKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJson", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsItemResponseBody = | ScansCreateResponseReportReportTestsItemStepsItemResponseBodyNotFound | ScansCreateResponseReportReportTestsItemStepsItemResponseBodyBytes | ScansCreateResponseReportReportTestsItemStepsItemResponseBodyText | ScansCreateResponseReportReportTestsItemStepsItemResponseBodyJson; export const ScansCreateResponseReportReportTestsItemStepsItemResponseBody = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["kind"], ["contents", "kind", "truncated"], ["contents", "kind", "truncated"], ["contents", "kind", "truncated"], ]), ); export type ScansCreateResponseReportReportTestsItemStepsItemResponseHeaderNamesList = Array; export const ScansCreateResponseReportReportTestsItemStepsItemResponseHeaderNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ScansCreateResponseReportReportTestsItemStepsItemResponse { /** HTTP response body. */ body: ScansCreateResponseReportReportTestsItemStepsItemResponseBody; /** Names of headers that were received. */ headerNames: ScansCreateResponseReportReportTestsItemStepsItemResponseHeaderNamesList; /** HTTP status code. */ status: number; /** HTTP status text, if available for the status code. */ statusText?: string | null; } export const ScansCreateResponseReportReportTestsItemStepsItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ body: ScansCreateResponseReportReportTestsItemStepsItemResponseBody, headerNames: ScansCreateResponseReportReportTestsItemStepsItemResponseHeaderNamesList.pipe( T.Body("header_names"), ), status: S.Number, statusText: S.optional(S.NullOr(S.String).pipe(T.Body("status_text"))), }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItemResponse", }) as any as S.Schema; export interface ScansCreateResponseReportReportTestsItemStepsItem { /** Assertions that were made against the received response. */ assertions: ScansCreateResponseReportReportTestsItemStepsItemAssertionsList; /** Errors the step encountered that may explain absent or incomplete fields. */ errors?: ScansCreateResponseReportReportTestsItemStepsItemErrorsList | null; /** HTTP request that was made, if any. */ request?: ScansCreateResponseReportReportTestsItemStepsItemRequest | null; /** HTTP response that was received, if any. */ response?: ScansCreateResponseReportReportTestsItemStepsItemResponse | null; } export const ScansCreateResponseReportReportTestsItemStepsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ assertions: ScansCreateResponseReportReportTestsItemStepsItemAssertionsList, errors: S.optional( S.NullOr(ScansCreateResponseReportReportTestsItemStepsItemErrorsList), ), request: S.optional( S.NullOr(ScansCreateResponseReportReportTestsItemStepsItemRequest), ), response: S.optional( S.NullOr(ScansCreateResponseReportReportTestsItemStepsItemResponse), ), }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItemStepsItem", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemStepsList = Array; export const ScansCreateResponseReportReportTestsItemStepsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItem, ) as any as S.Schema; export type ScansCreateResponseReportReportTestsItemVerdict = | "ok" | "warning" | "inconclusive"; export const ScansCreateResponseReportReportTestsItemVerdict = /*@__PURE__*/ S.String; export type ScansCreateResponseReportReportTestsItemPreflightErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export const ScansCreateResponseReportReportTestsItemPreflightErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export type ScansCreateResponseReportReportTestsItemPreflightErrorsList = Array; export const ScansCreateResponseReportReportTestsItemPreflightErrorsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemErrorsItem, ) as any as S.Schema; export interface ScansCreateResponseReportReportTestsItem { /** Steps that were executed. */ steps: ScansCreateResponseReportReportTestsItemStepsList; /** Verdict of this single test. */ verdict: ScansCreateResponseReportReportTestsItemVerdict; /** Errors that prevented step execution. */ preflightErrors?: ScansCreateResponseReportReportTestsItemPreflightErrorsList | null; } export const ScansCreateResponseReportReportTestsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ steps: ScansCreateResponseReportReportTestsItemStepsList, verdict: ScansCreateResponseReportReportTestsItemVerdict, preflightErrors: S.optional( S.NullOr( ScansCreateResponseReportReportTestsItemPreflightErrorsList, ).pipe(T.Body("preflight_errors")), ), }), ).annotate({ identifier: "ScansCreateResponseReportReportTestsItem", }) as any as S.Schema; export type ScansCreateResponseReportReportTestsList = Array; export const ScansCreateResponseReportReportTestsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItem, ) as any as S.Schema; export interface ScansCreateResponseReportReport { /** Summary of all steps and findings. */ summary: ScansCreateResponseReportReportSummary; /** List of tests that were run. */ tests: ScansCreateResponseReportReportTestsList; } export const ScansCreateResponseReportReport = /*@__PURE__*/ S.suspend(() => S.Struct({ summary: ScansCreateResponseReportReportSummary, tests: ScansCreateResponseReportReportTestsList, }), ).annotate({ identifier: "ScansCreateResponseReportReport", }) as any as S.Schema; export type ScansCreateResponseReportReportSchemaVersion = "v1"; export const ScansCreateResponseReportReportSchemaVersion = /*@__PURE__*/ S.String; export interface ScansCreateResponseReport { /** Version 1 of the BOLA vulnerability scan report. */ report: ScansCreateResponseReportReport; /** Version of the report schema. */ reportSchemaVersion: ScansCreateResponseReportReportSchemaVersion; } export const ScansCreateResponseReport = /*@__PURE__*/ S.suspend(() => S.Struct({ report: ScansCreateResponseReportReport, reportSchemaVersion: ScansCreateResponseReportReportSchemaVersion.pipe( T.Body("report_schema_version"), ), }), ).annotate({ identifier: "ScansCreateResponseReport", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateScanResponse { /** Scan identifier. */ id: string; /** The type of vulnerability scan. */ scanType: ScansCreateResponseScanType; /** Current lifecycle status of the scan. */ status: ScansCreateResponseStatus; /** The target environment this scan runs against. */ targetEnvironmentId: string; /** Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. */ report?: ScansCreateResponseReport | null; } export const CreateScanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scanType: ScansCreateResponseScanType.pipe(T.Body("scan_type")), status: ScansCreateResponseStatus, targetEnvironmentId: S.String.pipe(T.Body("target_environment_id")), report: S.optional(S.NullOr(ScansCreateResponseReport)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateScanResponse", }) as any as S.Schema; export type TargetEnvironmentsCreateRequestTargetType = "zone"; export const TargetEnvironmentsCreateRequestTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsCreateRequestTarget { type: TargetEnvironmentsCreateRequestTargetType | (string & {}); /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsCreateRequestTarget = /*@__PURE__*/ S.suspend( () => S.Struct({ type: TargetEnvironmentsCreateRequestTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsCreateRequestTarget", }) as any as S.Schema; export interface CreateTargetEnvironmentRequest { /** Identifier. */ accountId: string; /** Human-readable name. */ name: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target: TargetEnvironmentsCreateRequestTarget; /** Optional description. */ description?: string; } export const CreateTargetEnvironmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.String, target: TargetEnvironmentsCreateRequestTarget, description: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/vuln_scanner/target_environments", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateTargetEnvironmentRequest", }) as any as S.Schema; export type TargetEnvironmentsCreateResponseTargetType = "zone"; export const TargetEnvironmentsCreateResponseTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsCreateResponseTarget { type: TargetEnvironmentsCreateResponseTargetType; /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsCreateResponseTarget = /*@__PURE__*/ S.suspend( () => S.Struct({ type: TargetEnvironmentsCreateResponseTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsCreateResponseTarget", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateTargetEnvironmentResponse { /** Target environment identifier. */ id: string; /** Human-readable name. */ name: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target: TargetEnvironmentsCreateResponseTarget; /** Optional description providing additional context. */ description?: string | null; } export const CreateTargetEnvironmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, target: TargetEnvironmentsCreateResponseTarget, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateTargetEnvironmentResponse", }) as any as S.Schema; export interface DeleteCredentialSetRequest { /** Identifier. */ accountId: string; credentialSetId: string; } export const DeleteCredentialSetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCredentialSetRequest", }) as any as S.Schema; export type DeleteCredentialSetResponse = unknown; export const DeleteCredentialSetResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCredentialSetResponse", }) as any as S.Schema; export interface DeleteCredentialSetCredentialRequest { /** Identifier. */ accountId: string; credentialSetId: string; credentialId: string; } export const DeleteCredentialSetCredentialRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), credentialId: S.String.pipe(T.Label("credential_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCredentialSetCredentialRequest", }) as any as S.Schema; export type DeleteCredentialSetCredentialResponse = unknown; export const DeleteCredentialSetCredentialResponse = /*@__PURE__*/ S.suspend( () => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCredentialSetCredentialResponse", }) as any as S.Schema; export interface DeleteTargetEnvironmentRequest { /** Identifier. */ accountId: string; targetEnvironmentId: string; } export const DeleteTargetEnvironmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), targetEnvironmentId: S.String.pipe(T.Label("target_environment_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteTargetEnvironmentRequest", }) as any as S.Schema; export type DeleteTargetEnvironmentResponse = unknown; export const DeleteTargetEnvironmentResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteTargetEnvironmentResponse", }) as any as S.Schema; export interface GetCredentialSetRequest { /** Identifier. */ accountId: string; credentialSetId: string; } export const GetCredentialSetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCredentialSetRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCredentialSetResponse { /** Credential set identifier. */ id: string; /** Human-readable name. */ name: string; } export const GetCredentialSetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCredentialSetResponse", }) as any as S.Schema; export interface GetCredentialSetCredentialRequest { /** Identifier. */ accountId: string; credentialSetId: string; credentialId: string; } export const GetCredentialSetCredentialRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), credentialId: S.String.pipe(T.Label("credential_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCredentialSetCredentialRequest", }) as any as S.Schema; export type CredentialSetsCredentialsGetResponseLocation = "header" | "cookie"; export const CredentialSetsCredentialsGetResponseLocation = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCredentialSetCredentialResponse { /** Credential identifier. */ id: string; /** Parent credential set identifier. */ credentialSetId: string; /** Where the credential is attached in outgoing requests. */ location: CredentialSetsCredentialsGetResponseLocation; /** Name of the header or cookie where the credential is attached. */ locationName: string; /** Human-readable name. */ name: string; } export const GetCredentialSetCredentialResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, credentialSetId: S.String.pipe(T.Body("credential_set_id")), location: CredentialSetsCredentialsGetResponseLocation, locationName: S.String.pipe(T.Body("location_name")), name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCredentialSetCredentialResponse", }) as any as S.Schema; export interface GetScanRequest { /** Identifier. */ accountId: string; scanId: string; } export const GetScanRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), scanId: S.String.pipe(T.Label("scan_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/scans/{scan_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetScanRequest" }) as any as S.Schema; export type ScansGetResponseScanType = "bola"; export const ScansGetResponseScanType = /*@__PURE__*/ S.String; export type ScansGetResponseStatus = | "created" | "scheduled" | "planning" | "running" | "finished" | "failed"; export const ScansGetResponseStatus = /*@__PURE__*/ S.String; export type ScansGetResponseReportReportSummaryVerdict = | "ok" | "warning" | "inconclusive"; export const ScansGetResponseReportReportSummaryVerdict = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportSummary { /** Overall verdict of the vulnerability scan. */ verdict: ScansGetResponseReportReportSummaryVerdict; } export const ScansGetResponseReportReportSummary = /*@__PURE__*/ S.suspend(() => S.Struct({ verdict: ScansGetResponseReportReportSummaryVerdict, }), ).annotate({ identifier: "ScansGetResponseReportReportSummary", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKindParameters = ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters; export const ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKindParameters = ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters; export type ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKindType = "http_status_within_range"; export const ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKindType = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKind { /** Range of HTTP status codes. */ parameters: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters; type: ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKindType; } export const ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKind = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters, type: ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKindType, }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKind", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemAssertionsItemOutcome = | "ok" | "fail" | "inconclusive"; export const ScansGetResponseReportReportTestsItemStepsItemAssertionsItemOutcome = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportTestsItemStepsItemAssertionsItem { /** Human-readable description of the assertion, explaining what was checked. */ description: string; /** Kind of assertion. */ kind: ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKind; /** Observed value on which the assertion was made. */ observed: number; /** Outcome of the assertion. */ outcome: ScansGetResponseReportReportTestsItemStepsItemAssertionsItemOutcome; } export const ScansGetResponseReportReportTestsItemStepsItemAssertionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.String, kind: ScansGetResponseReportReportTestsItemStepsItemAssertionsItemKind, observed: S.Number, outcome: ScansGetResponseReportReportTestsItemStepsItemAssertionsItemOutcome, }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemAssertionsItem", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemAssertionsList = Array; export const ScansGetResponseReportReportTestsItemStepsItemAssertionsList = /*@__PURE__*/ S.Array( ScansGetResponseReportReportTestsItemStepsItemAssertionsItem, ) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export const ScansGetResponseReportReportTestsItemStepsItemErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export type ScansGetResponseReportReportTestsItemStepsItemErrorsList = Array; export const ScansGetResponseReportReportTestsItemStepsItemErrorsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemErrorsItem, ) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSetRole = | "owner" | "attacker"; export const ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSetRole = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSet { /** ID of the credential set. */ id: string; /** Role of the credential set. */ role: ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSetRole; } export const ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSet = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, role: ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSetRole, }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSet", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemRequestHeaderNamesList = Array; export const ScansGetResponseReportReportTestsItemStepsItemRequestHeaderNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemRequestMethod = | "GET" | "DELETE" | "PATCH" | "POST" | "PUT"; export const ScansGetResponseReportReportTestsItemStepsItemRequestMethod = /*@__PURE__*/ S.String; export type ScansGetResponseReportReportTestsItemStepsItemRequestVariableCapturesItem = ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem; export const ScansGetResponseReportReportTestsItemStepsItemRequestVariableCapturesItem = ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem; export type ScansGetResponseReportReportTestsItemStepsItemRequestVariableCapturesList = Array; export const ScansGetResponseReportReportTestsItemStepsItemRequestVariableCapturesList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem, ) as any as S.Schema; export interface ScansGetResponseReportReportTestsItemStepsItemRequest { /** Credential set that was used. */ credentialSet: ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSet; /** Names of headers that were sent. */ headerNames: ScansGetResponseReportReportTestsItemStepsItemRequestHeaderNamesList; /** HTTP method. */ method: ScansGetResponseReportReportTestsItemStepsItemRequestMethod; /** Exact and full URL (including host, query parameters) that was requested. */ url: string; /** Variable captures requested for this step. */ variableCaptures: ScansGetResponseReportReportTestsItemStepsItemRequestVariableCapturesList; /** Request body, if any. */ body?: unknown | null; } export const ScansGetResponseReportReportTestsItemStepsItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ credentialSet: ScansGetResponseReportReportTestsItemStepsItemRequestCredentialSet.pipe( T.Body("credential_set"), ), headerNames: ScansGetResponseReportReportTestsItemStepsItemRequestHeaderNamesList.pipe( T.Body("header_names"), ), method: ScansGetResponseReportReportTestsItemStepsItemRequestMethod, url: S.String, variableCaptures: ScansGetResponseReportReportTestsItemStepsItemRequestVariableCapturesList.pipe( T.Body("variable_captures"), ), body: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemRequest", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind = "not_found"; export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFound { kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind; } export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFound = /*@__PURE__*/ S.suspend(() => S.Struct({ kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFoundKind, }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFound", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytesKind = "bytes"; export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytesKind = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytes { contents: string; kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytesKind; truncated: boolean; } export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytes = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytesKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytes", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemResponseBodyTextKind = "text"; export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyTextKind = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportTestsItemStepsItemResponseBodyText { contents: string; kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyTextKind; truncated: boolean; } export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyText = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyTextKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemResponseBodyText", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemResponseBodyJsonKind = "json"; export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyJsonKind = /*@__PURE__*/ S.String; export interface ScansGetResponseReportReportTestsItemStepsItemResponseBodyJson { contents: string; kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyJsonKind; truncated: boolean; } export const ScansGetResponseReportReportTestsItemStepsItemResponseBodyJson = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansGetResponseReportReportTestsItemStepsItemResponseBodyJsonKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemResponseBodyJson", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsItemResponseBody = | ScansGetResponseReportReportTestsItemStepsItemResponseBodyNotFound | ScansGetResponseReportReportTestsItemStepsItemResponseBodyBytes | ScansGetResponseReportReportTestsItemStepsItemResponseBodyText | ScansGetResponseReportReportTestsItemStepsItemResponseBodyJson; export const ScansGetResponseReportReportTestsItemStepsItemResponseBody = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["kind"], ["contents", "kind", "truncated"], ["contents", "kind", "truncated"], ["contents", "kind", "truncated"], ]), ); export type ScansGetResponseReportReportTestsItemStepsItemResponseHeaderNamesList = Array; export const ScansGetResponseReportReportTestsItemStepsItemResponseHeaderNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ScansGetResponseReportReportTestsItemStepsItemResponse { /** HTTP response body. */ body: ScansGetResponseReportReportTestsItemStepsItemResponseBody; /** Names of headers that were received. */ headerNames: ScansGetResponseReportReportTestsItemStepsItemResponseHeaderNamesList; /** HTTP status code. */ status: number; /** HTTP status text, if available for the status code. */ statusText?: string | null; } export const ScansGetResponseReportReportTestsItemStepsItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ body: ScansGetResponseReportReportTestsItemStepsItemResponseBody, headerNames: ScansGetResponseReportReportTestsItemStepsItemResponseHeaderNamesList.pipe( T.Body("header_names"), ), status: S.Number, statusText: S.optional(S.NullOr(S.String).pipe(T.Body("status_text"))), }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItemResponse", }) as any as S.Schema; export interface ScansGetResponseReportReportTestsItemStepsItem { /** Assertions that were made against the received response. */ assertions: ScansGetResponseReportReportTestsItemStepsItemAssertionsList; /** Errors the step encountered that may explain absent or incomplete fields. */ errors?: ScansGetResponseReportReportTestsItemStepsItemErrorsList | null; /** HTTP request that was made, if any. */ request?: ScansGetResponseReportReportTestsItemStepsItemRequest | null; /** HTTP response that was received, if any. */ response?: ScansGetResponseReportReportTestsItemStepsItemResponse | null; } export const ScansGetResponseReportReportTestsItemStepsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ assertions: ScansGetResponseReportReportTestsItemStepsItemAssertionsList, errors: S.optional( S.NullOr(ScansGetResponseReportReportTestsItemStepsItemErrorsList), ), request: S.optional( S.NullOr(ScansGetResponseReportReportTestsItemStepsItemRequest), ), response: S.optional( S.NullOr(ScansGetResponseReportReportTestsItemStepsItemResponse), ), }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItemStepsItem", }) as any as S.Schema; export type ScansGetResponseReportReportTestsItemStepsList = Array; export const ScansGetResponseReportReportTestsItemStepsList = /*@__PURE__*/ S.Array( ScansGetResponseReportReportTestsItemStepsItem, ) as any as S.Schema; export type ScansGetResponseReportReportTestsItemVerdict = | "ok" | "warning" | "inconclusive"; export const ScansGetResponseReportReportTestsItemVerdict = /*@__PURE__*/ S.String; export type ScansGetResponseReportReportTestsItemPreflightErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export const ScansGetResponseReportReportTestsItemPreflightErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export type ScansGetResponseReportReportTestsItemPreflightErrorsList = Array; export const ScansGetResponseReportReportTestsItemPreflightErrorsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemErrorsItem, ) as any as S.Schema; export interface ScansGetResponseReportReportTestsItem { /** Steps that were executed. */ steps: ScansGetResponseReportReportTestsItemStepsList; /** Verdict of this single test. */ verdict: ScansGetResponseReportReportTestsItemVerdict; /** Errors that prevented step execution. */ preflightErrors?: ScansGetResponseReportReportTestsItemPreflightErrorsList | null; } export const ScansGetResponseReportReportTestsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ steps: ScansGetResponseReportReportTestsItemStepsList, verdict: ScansGetResponseReportReportTestsItemVerdict, preflightErrors: S.optional( S.NullOr(ScansGetResponseReportReportTestsItemPreflightErrorsList).pipe( T.Body("preflight_errors"), ), ), }), ).annotate({ identifier: "ScansGetResponseReportReportTestsItem", }) as any as S.Schema; export type ScansGetResponseReportReportTestsList = Array; export const ScansGetResponseReportReportTestsList = /*@__PURE__*/ S.Array( ScansGetResponseReportReportTestsItem, ) as any as S.Schema; export interface ScansGetResponseReportReport { /** Summary of all steps and findings. */ summary: ScansGetResponseReportReportSummary; /** List of tests that were run. */ tests: ScansGetResponseReportReportTestsList; } export const ScansGetResponseReportReport = /*@__PURE__*/ S.suspend(() => S.Struct({ summary: ScansGetResponseReportReportSummary, tests: ScansGetResponseReportReportTestsList, }), ).annotate({ identifier: "ScansGetResponseReportReport", }) as any as S.Schema; export type ScansGetResponseReportReportSchemaVersion = "v1"; export const ScansGetResponseReportReportSchemaVersion = /*@__PURE__*/ S.String; export interface ScansGetResponseReport { /** Version 1 of the BOLA vulnerability scan report. */ report: ScansGetResponseReportReport; /** Version of the report schema. */ reportSchemaVersion: ScansGetResponseReportReportSchemaVersion; } export const ScansGetResponseReport = /*@__PURE__*/ S.suspend(() => S.Struct({ report: ScansGetResponseReportReport, reportSchemaVersion: ScansGetResponseReportReportSchemaVersion.pipe( T.Body("report_schema_version"), ), }), ).annotate({ identifier: "ScansGetResponseReport", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetScanResponse { /** Scan identifier. */ id: string; /** The type of vulnerability scan. */ scanType: ScansGetResponseScanType; /** Current lifecycle status of the scan. */ status: ScansGetResponseStatus; /** The target environment this scan runs against. */ targetEnvironmentId: string; /** Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. */ report?: ScansGetResponseReport | null; } export const GetScanResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scanType: ScansGetResponseScanType.pipe(T.Body("scan_type")), status: ScansGetResponseStatus, targetEnvironmentId: S.String.pipe(T.Body("target_environment_id")), report: S.optional(S.NullOr(ScansGetResponseReport)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetScanResponse", }) as any as S.Schema; export interface GetTargetEnvironmentRequest { /** Identifier. */ accountId: string; targetEnvironmentId: string; } export const GetTargetEnvironmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), targetEnvironmentId: S.String.pipe(T.Label("target_environment_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetTargetEnvironmentRequest", }) as any as S.Schema; export type TargetEnvironmentsGetResponseTargetType = "zone"; export const TargetEnvironmentsGetResponseTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsGetResponseTarget { type: TargetEnvironmentsGetResponseTargetType; /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsGetResponseTarget = /*@__PURE__*/ S.suspend(() => S.Struct({ type: TargetEnvironmentsGetResponseTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsGetResponseTarget", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetTargetEnvironmentResponse { /** Target environment identifier. */ id: string; /** Human-readable name. */ name: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target: TargetEnvironmentsGetResponseTarget; /** Optional description providing additional context. */ description?: string | null; } export const GetTargetEnvironmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, target: TargetEnvironmentsGetResponseTarget, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetTargetEnvironmentResponse", }) as any as S.Schema; export interface ListCredentialSetCredentialsRequest { /** Identifier. */ accountId: string; credentialSetId: string; /** Page number of paginated results. */ page?: number; /** Number of results per page. */ perPage?: number; } export const ListCredentialSetCredentialsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCredentialSetCredentialsRequest", }) as any as S.Schema; export type CredentialSetsCredentialsListResultItemLocation = | "header" | "cookie"; export const CredentialSetsCredentialsListResultItemLocation = /*@__PURE__*/ S.String; export interface CredentialSetsCredentialsListResultItem { /** Credential identifier. */ id: string; /** Parent credential set identifier. */ credentialSetId: string; /** Where the credential is attached in outgoing requests. */ location: CredentialSetsCredentialsListResultItemLocation; /** Name of the header or cookie where the credential is attached. */ locationName: string; /** Human-readable name. */ name: string; } export const CredentialSetsCredentialsListResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, credentialSetId: S.String.pipe(T.Body("credential_set_id")), location: CredentialSetsCredentialsListResultItemLocation, locationName: S.String.pipe(T.Body("location_name")), name: S.String, }), ).annotate({ identifier: "CredentialSetsCredentialsListResultItem", }) as any as S.Schema; export type CredentialSetsCredentialsListResultList = Array; export const CredentialSetsCredentialsListResultList = /*@__PURE__*/ S.Array( CredentialSetsCredentialsListResultItem, ) as any as S.Schema; export interface ListCredentialSetCredentialsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: CredentialSetsCredentialsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListCredentialSetCredentialsResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ result: CredentialSetsCredentialsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCredentialSetCredentialsResponse", }) as any as S.Schema; export interface ListCredentialSetsRequest { /** Identifier. */ accountId: string; /** Page number of paginated results. */ page?: number; /** Number of results per page. */ perPage?: number; } export const ListCredentialSetsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/credential_sets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCredentialSetsRequest", }) as any as S.Schema; export interface CredentialSetsListResultItem { /** Credential set identifier. */ id: string; /** Human-readable name. */ name: string; } export const CredentialSetsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, }), ).annotate({ identifier: "CredentialSetsListResultItem", }) as any as S.Schema; export type CredentialSetsListResultList = Array; export const CredentialSetsListResultList = /*@__PURE__*/ S.Array( CredentialSetsListResultItem, ) as any as S.Schema; export interface ListCredentialSetsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: CredentialSetsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListCredentialSetsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: CredentialSetsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCredentialSetsResponse", }) as any as S.Schema; export interface ListScansRequest { /** Identifier. */ accountId: string; /** Page number of paginated results. */ page?: number; /** Number of results per page. */ perPage?: number; } export const ListScansRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/scans", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListScansRequest", }) as any as S.Schema; export type ScansListResultItemScanType = "bola"; export const ScansListResultItemScanType = /*@__PURE__*/ S.String; export type ScansListResultItemStatus = | "created" | "scheduled" | "planning" | "running" | "finished" | "failed"; export const ScansListResultItemStatus = /*@__PURE__*/ S.String; export type ScansListResultItemReportReportSummaryVerdict = | "ok" | "warning" | "inconclusive"; export const ScansListResultItemReportReportSummaryVerdict = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportSummary { /** Overall verdict of the vulnerability scan. */ verdict: ScansListResultItemReportReportSummaryVerdict; } export const ScansListResultItemReportReportSummary = /*@__PURE__*/ S.suspend( () => S.Struct({ verdict: ScansListResultItemReportReportSummaryVerdict, }), ).annotate({ identifier: "ScansListResultItemReportReportSummary", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKindParameters = ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters; export const ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKindParameters = ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters; export type ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKindType = "http_status_within_range"; export const ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKindType = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKind { /** Range of HTTP status codes. */ parameters: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters; type: ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKindType; } export const ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKind = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: ScansCreateResponseReportReportTestsItemStepsItemAssertionsItemKindParameters, type: ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKindType, }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKind", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemAssertionsItemOutcome = | "ok" | "fail" | "inconclusive"; export const ScansListResultItemReportReportTestsItemStepsItemAssertionsItemOutcome = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportTestsItemStepsItemAssertionsItem { /** Human-readable description of the assertion, explaining what was checked. */ description: string; /** Kind of assertion. */ kind: ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKind; /** Observed value on which the assertion was made. */ observed: number; /** Outcome of the assertion. */ outcome: ScansListResultItemReportReportTestsItemStepsItemAssertionsItemOutcome; } export const ScansListResultItemReportReportTestsItemStepsItemAssertionsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.String, kind: ScansListResultItemReportReportTestsItemStepsItemAssertionsItemKind, observed: S.Number, outcome: ScansListResultItemReportReportTestsItemStepsItemAssertionsItemOutcome, }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemAssertionsItem", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemAssertionsList = Array; export const ScansListResultItemReportReportTestsItemStepsItemAssertionsList = /*@__PURE__*/ S.Array( ScansListResultItemReportReportTestsItemStepsItemAssertionsItem, ) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export const ScansListResultItemReportReportTestsItemStepsItemErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export type ScansListResultItemReportReportTestsItemStepsItemErrorsList = Array; export const ScansListResultItemReportReportTestsItemStepsItemErrorsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemErrorsItem, ) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSetRole = | "owner" | "attacker"; export const ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSetRole = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSet { /** ID of the credential set. */ id: string; /** Role of the credential set. */ role: ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSetRole; } export const ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSet = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, role: ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSetRole, }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSet", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemRequestHeaderNamesList = Array; export const ScansListResultItemReportReportTestsItemStepsItemRequestHeaderNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemRequestMethod = | "GET" | "DELETE" | "PATCH" | "POST" | "PUT"; export const ScansListResultItemReportReportTestsItemStepsItemRequestMethod = /*@__PURE__*/ S.String; export type ScansListResultItemReportReportTestsItemStepsItemRequestVariableCapturesItem = ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem; export const ScansListResultItemReportReportTestsItemStepsItemRequestVariableCapturesItem = ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem; export type ScansListResultItemReportReportTestsItemStepsItemRequestVariableCapturesList = Array; export const ScansListResultItemReportReportTestsItemStepsItemRequestVariableCapturesList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemRequestVariableCapturesItem, ) as any as S.Schema; export interface ScansListResultItemReportReportTestsItemStepsItemRequest { /** Credential set that was used. */ credentialSet: ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSet; /** Names of headers that were sent. */ headerNames: ScansListResultItemReportReportTestsItemStepsItemRequestHeaderNamesList; /** HTTP method. */ method: ScansListResultItemReportReportTestsItemStepsItemRequestMethod; /** Exact and full URL (including host, query parameters) that was requested. */ url: string; /** Variable captures requested for this step. */ variableCaptures: ScansListResultItemReportReportTestsItemStepsItemRequestVariableCapturesList; /** Request body, if any. */ body?: unknown | null; } export const ScansListResultItemReportReportTestsItemStepsItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ credentialSet: ScansListResultItemReportReportTestsItemStepsItemRequestCredentialSet.pipe( T.Body("credential_set"), ), headerNames: ScansListResultItemReportReportTestsItemStepsItemRequestHeaderNamesList.pipe( T.Body("header_names"), ), method: ScansListResultItemReportReportTestsItemStepsItemRequestMethod, url: S.String, variableCaptures: ScansListResultItemReportReportTestsItemStepsItemRequestVariableCapturesList.pipe( T.Body("variable_captures"), ), body: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemRequest", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFoundKind = "not_found"; export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFoundKind = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFound { kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFoundKind; } export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFound = /*@__PURE__*/ S.suspend(() => S.Struct({ kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFoundKind, }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFound", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytesKind = "bytes"; export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytesKind = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytes { contents: string; kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytesKind; truncated: boolean; } export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytes = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytesKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytes", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemResponseBodyTextKind = "text"; export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyTextKind = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportTestsItemStepsItemResponseBodyText { contents: string; kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyTextKind; truncated: boolean; } export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyText = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyTextKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemResponseBodyText", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemResponseBodyJsonKind = "json"; export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyJsonKind = /*@__PURE__*/ S.String; export interface ScansListResultItemReportReportTestsItemStepsItemResponseBodyJson { contents: string; kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyJsonKind; truncated: boolean; } export const ScansListResultItemReportReportTestsItemStepsItemResponseBodyJson = /*@__PURE__*/ S.suspend(() => S.Struct({ contents: S.String, kind: ScansListResultItemReportReportTestsItemStepsItemResponseBodyJsonKind, truncated: S.Boolean, }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemResponseBodyJson", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsItemResponseBody = | ScansListResultItemReportReportTestsItemStepsItemResponseBodyNotFound | ScansListResultItemReportReportTestsItemStepsItemResponseBodyBytes | ScansListResultItemReportReportTestsItemStepsItemResponseBodyText | ScansListResultItemReportReportTestsItemStepsItemResponseBodyJson; export const ScansListResultItemReportReportTestsItemStepsItemResponseBody = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["kind"], ["contents", "kind", "truncated"], ["contents", "kind", "truncated"], ["contents", "kind", "truncated"], ]), ); export type ScansListResultItemReportReportTestsItemStepsItemResponseHeaderNamesList = Array; export const ScansListResultItemReportReportTestsItemStepsItemResponseHeaderNamesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ScansListResultItemReportReportTestsItemStepsItemResponse { /** HTTP response body. */ body: ScansListResultItemReportReportTestsItemStepsItemResponseBody; /** Names of headers that were received. */ headerNames: ScansListResultItemReportReportTestsItemStepsItemResponseHeaderNamesList; /** HTTP status code. */ status: number; /** HTTP status text, if available for the status code. */ statusText?: string | null; } export const ScansListResultItemReportReportTestsItemStepsItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ body: ScansListResultItemReportReportTestsItemStepsItemResponseBody, headerNames: ScansListResultItemReportReportTestsItemStepsItemResponseHeaderNamesList.pipe( T.Body("header_names"), ), status: S.Number, statusText: S.optional(S.NullOr(S.String).pipe(T.Body("status_text"))), }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItemResponse", }) as any as S.Schema; export interface ScansListResultItemReportReportTestsItemStepsItem { /** Assertions that were made against the received response. */ assertions: ScansListResultItemReportReportTestsItemStepsItemAssertionsList; /** Errors the step encountered that may explain absent or incomplete fields. */ errors?: ScansListResultItemReportReportTestsItemStepsItemErrorsList | null; /** HTTP request that was made, if any. */ request?: ScansListResultItemReportReportTestsItemStepsItemRequest | null; /** HTTP response that was received, if any. */ response?: ScansListResultItemReportReportTestsItemStepsItemResponse | null; } export const ScansListResultItemReportReportTestsItemStepsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ assertions: ScansListResultItemReportReportTestsItemStepsItemAssertionsList, errors: S.optional( S.NullOr(ScansListResultItemReportReportTestsItemStepsItemErrorsList), ), request: S.optional( S.NullOr(ScansListResultItemReportReportTestsItemStepsItemRequest), ), response: S.optional( S.NullOr(ScansListResultItemReportReportTestsItemStepsItemResponse), ), }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItemStepsItem", }) as any as S.Schema; export type ScansListResultItemReportReportTestsItemStepsList = Array; export const ScansListResultItemReportReportTestsItemStepsList = /*@__PURE__*/ S.Array( ScansListResultItemReportReportTestsItemStepsItem, ) as any as S.Schema; export type ScansListResultItemReportReportTestsItemVerdict = | "ok" | "warning" | "inconclusive"; export const ScansListResultItemReportReportTestsItemVerdict = /*@__PURE__*/ S.String; export type ScansListResultItemReportReportTestsItemPreflightErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export const ScansListResultItemReportReportTestsItemPreflightErrorsItem = ScansCreateResponseReportReportTestsItemStepsItemErrorsItem; export type ScansListResultItemReportReportTestsItemPreflightErrorsList = Array; export const ScansListResultItemReportReportTestsItemPreflightErrorsList = /*@__PURE__*/ S.Array( ScansCreateResponseReportReportTestsItemStepsItemErrorsItem, ) as any as S.Schema; export interface ScansListResultItemReportReportTestsItem { /** Steps that were executed. */ steps: ScansListResultItemReportReportTestsItemStepsList; /** Verdict of this single test. */ verdict: ScansListResultItemReportReportTestsItemVerdict; /** Errors that prevented step execution. */ preflightErrors?: ScansListResultItemReportReportTestsItemPreflightErrorsList | null; } export const ScansListResultItemReportReportTestsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ steps: ScansListResultItemReportReportTestsItemStepsList, verdict: ScansListResultItemReportReportTestsItemVerdict, preflightErrors: S.optional( S.NullOr( ScansListResultItemReportReportTestsItemPreflightErrorsList, ).pipe(T.Body("preflight_errors")), ), }), ).annotate({ identifier: "ScansListResultItemReportReportTestsItem", }) as any as S.Schema; export type ScansListResultItemReportReportTestsList = Array; export const ScansListResultItemReportReportTestsList = /*@__PURE__*/ S.Array( ScansListResultItemReportReportTestsItem, ) as any as S.Schema; export interface ScansListResultItemReportReport { /** Summary of all steps and findings. */ summary: ScansListResultItemReportReportSummary; /** List of tests that were run. */ tests: ScansListResultItemReportReportTestsList; } export const ScansListResultItemReportReport = /*@__PURE__*/ S.suspend(() => S.Struct({ summary: ScansListResultItemReportReportSummary, tests: ScansListResultItemReportReportTestsList, }), ).annotate({ identifier: "ScansListResultItemReportReport", }) as any as S.Schema; export type ScansListResultItemReportReportSchemaVersion = "v1"; export const ScansListResultItemReportReportSchemaVersion = /*@__PURE__*/ S.String; export interface ScansListResultItemReport { /** Version 1 of the BOLA vulnerability scan report. */ report: ScansListResultItemReportReport; /** Version of the report schema. */ reportSchemaVersion: ScansListResultItemReportReportSchemaVersion; } export const ScansListResultItemReport = /*@__PURE__*/ S.suspend(() => S.Struct({ report: ScansListResultItemReportReport, reportSchemaVersion: ScansListResultItemReportReportSchemaVersion.pipe( T.Body("report_schema_version"), ), }), ).annotate({ identifier: "ScansListResultItemReport", }) as any as S.Schema; export interface ScansListResultItem { /** Scan identifier. */ id: string; /** The type of vulnerability scan. */ scanType: ScansListResultItemScanType; /** Current lifecycle status of the scan. */ status: ScansListResultItemStatus; /** The target environment this scan runs against. */ targetEnvironmentId: string; /** Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. */ report?: ScansListResultItemReport | null; } export const ScansListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, scanType: ScansListResultItemScanType.pipe(T.Body("scan_type")), status: ScansListResultItemStatus, targetEnvironmentId: S.String.pipe(T.Body("target_environment_id")), report: S.optional(S.NullOr(ScansListResultItemReport)), }), ).annotate({ identifier: "ScansListResultItem", }) as any as S.Schema; export type ScansListResultList = Array; export const ScansListResultList = /*@__PURE__*/ S.Array( ScansListResultItem, ) as any as S.Schema; export interface ListScansResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ScansListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListScansResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ScansListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListScansResponse", }) as any as S.Schema; export interface ListTargetEnvironmentsRequest { /** Identifier. */ accountId: string; /** Page number of paginated results. */ page?: number; /** Number of results per page. */ perPage?: number; } export const ListTargetEnvironmentsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/vuln_scanner/target_environments", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListTargetEnvironmentsRequest", }) as any as S.Schema; export type TargetEnvironmentsListResultItemTargetType = "zone"; export const TargetEnvironmentsListResultItemTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsListResultItemTarget { type: TargetEnvironmentsListResultItemTargetType; /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsListResultItemTarget = /*@__PURE__*/ S.suspend( () => S.Struct({ type: TargetEnvironmentsListResultItemTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsListResultItemTarget", }) as any as S.Schema; export interface TargetEnvironmentsListResultItem { /** Target environment identifier. */ id: string; /** Human-readable name. */ name: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target: TargetEnvironmentsListResultItemTarget; /** Optional description providing additional context. */ description?: string | null; } export const TargetEnvironmentsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, target: TargetEnvironmentsListResultItemTarget, description: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "TargetEnvironmentsListResultItem", }) as any as S.Schema; export type TargetEnvironmentsListResultList = Array; export const TargetEnvironmentsListResultList = /*@__PURE__*/ S.Array( TargetEnvironmentsListResultItem, ) as any as S.Schema; export interface ListTargetEnvironmentsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: TargetEnvironmentsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListTargetEnvironmentsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: TargetEnvironmentsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListTargetEnvironmentsResponse", }) as any as S.Schema; export interface PatchCredentialSetRequest { /** Identifier. */ accountId: string; credentialSetId: string; /** Human-readable name. */ name?: string; } export const PatchCredentialSetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), name: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCredentialSetRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchCredentialSetResponse { /** Credential set identifier. */ id: string; /** Human-readable name. */ name: string; } export const PatchCredentialSetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCredentialSetResponse", }) as any as S.Schema; export type CredentialSetsCredentialsEditRequestLocation = "header" | "cookie"; export const CredentialSetsCredentialsEditRequestLocation = /*@__PURE__*/ S.String; export interface PatchCredentialSetCredentialRequest { /** Identifier. */ accountId: string; credentialSetId: string; credentialId: string; /** Where the credential is attached in outgoing requests. */ location?: CredentialSetsCredentialsEditRequestLocation | (string & {}); /** Name of the header or cookie where the credential is attached. */ locationName?: string; /** Human-readable name. */ name?: string; /** The credential value. Write-only. Never returned in responses. */ value?: string; } export const PatchCredentialSetCredentialRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), credentialId: S.String.pipe(T.Label("credential_id")), location: S.optional(CredentialSetsCredentialsEditRequestLocation), locationName: S.optional(S.String.pipe(T.Body("location_name"))), name: S.optional(S.String), value: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCredentialSetCredentialRequest", }) as any as S.Schema; export type CredentialSetsCredentialsEditResponseLocation = "header" | "cookie"; export const CredentialSetsCredentialsEditResponseLocation = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchCredentialSetCredentialResponse { /** Credential identifier. */ id: string; /** Parent credential set identifier. */ credentialSetId: string; /** Where the credential is attached in outgoing requests. */ location: CredentialSetsCredentialsEditResponseLocation; /** Name of the header or cookie where the credential is attached. */ locationName: string; /** Human-readable name. */ name: string; } export const PatchCredentialSetCredentialResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, credentialSetId: S.String.pipe(T.Body("credential_set_id")), location: CredentialSetsCredentialsEditResponseLocation, locationName: S.String.pipe(T.Body("location_name")), name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchCredentialSetCredentialResponse", }) as any as S.Schema; export type TargetEnvironmentsEditRequestTargetType = "zone"; export const TargetEnvironmentsEditRequestTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsEditRequestTarget { type: TargetEnvironmentsEditRequestTargetType | (string & {}); /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsEditRequestTarget = /*@__PURE__*/ S.suspend(() => S.Struct({ type: TargetEnvironmentsEditRequestTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsEditRequestTarget", }) as any as S.Schema; export interface PatchTargetEnvironmentRequest { /** Identifier. */ accountId: string; targetEnvironmentId: string; /** Optional description. Omit to leave unchanged, set to `null` */ description?: string; /** Human-readable name. */ name?: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target?: TargetEnvironmentsEditRequestTarget; } export const PatchTargetEnvironmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), targetEnvironmentId: S.String.pipe(T.Label("target_environment_id")), description: S.optional(S.String), name: S.optional(S.String), target: S.optional(TargetEnvironmentsEditRequestTarget), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchTargetEnvironmentRequest", }) as any as S.Schema; export type TargetEnvironmentsEditResponseTargetType = "zone"; export const TargetEnvironmentsEditResponseTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsEditResponseTarget { type: TargetEnvironmentsEditResponseTargetType; /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsEditResponseTarget = /*@__PURE__*/ S.suspend( () => S.Struct({ type: TargetEnvironmentsEditResponseTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsEditResponseTarget", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchTargetEnvironmentResponse { /** Target environment identifier. */ id: string; /** Human-readable name. */ name: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target: TargetEnvironmentsEditResponseTarget; /** Optional description providing additional context. */ description?: string | null; } export const PatchTargetEnvironmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, target: TargetEnvironmentsEditResponseTarget, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchTargetEnvironmentResponse", }) as any as S.Schema; export interface UpdateCredentialSetRequest { /** Identifier. */ accountId: string; credentialSetId: string; /** Human-readable name. */ name: string; } export const UpdateCredentialSetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), name: S.String, }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateCredentialSetRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateCredentialSetResponse { /** Credential set identifier. */ id: string; /** Human-readable name. */ name: string; } export const UpdateCredentialSetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateCredentialSetResponse", }) as any as S.Schema; export type CredentialSetsCredentialsUpdateRequestLocation = | "header" | "cookie"; export const CredentialSetsCredentialsUpdateRequestLocation = /*@__PURE__*/ S.String; export interface UpdateCredentialSetCredentialRequest { /** Identifier. */ accountId: string; credentialSetId: string; credentialId: string; /** Where the credential is attached in outgoing requests. */ location: CredentialSetsCredentialsUpdateRequestLocation | (string & {}); /** Name of the header or cookie where the credential is attached. */ locationName: string; /** Human-readable name. */ name: string; /** The credential value. Write-only. Never returned in responses. */ value: string; } export const UpdateCredentialSetCredentialRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), credentialSetId: S.String.pipe(T.Label("credential_set_id")), credentialId: S.String.pipe(T.Label("credential_id")), location: CredentialSetsCredentialsUpdateRequestLocation, locationName: S.String.pipe(T.Body("location_name")), name: S.String, value: S.String, }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateCredentialSetCredentialRequest", }) as any as S.Schema; export type CredentialSetsCredentialsUpdateResponseLocation = | "header" | "cookie"; export const CredentialSetsCredentialsUpdateResponseLocation = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateCredentialSetCredentialResponse { /** Credential identifier. */ id: string; /** Parent credential set identifier. */ credentialSetId: string; /** Where the credential is attached in outgoing requests. */ location: CredentialSetsCredentialsUpdateResponseLocation; /** Name of the header or cookie where the credential is attached. */ locationName: string; /** Human-readable name. */ name: string; } export const UpdateCredentialSetCredentialResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, credentialSetId: S.String.pipe(T.Body("credential_set_id")), location: CredentialSetsCredentialsUpdateResponseLocation, locationName: S.String.pipe(T.Body("location_name")), name: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateCredentialSetCredentialResponse", }) as any as S.Schema; export type TargetEnvironmentsUpdateRequestTargetType = "zone"; export const TargetEnvironmentsUpdateRequestTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsUpdateRequestTarget { type: TargetEnvironmentsUpdateRequestTargetType | (string & {}); /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsUpdateRequestTarget = /*@__PURE__*/ S.suspend( () => S.Struct({ type: TargetEnvironmentsUpdateRequestTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsUpdateRequestTarget", }) as any as S.Schema; export interface UpdateTargetEnvironmentRequest { /** Identifier. */ accountId: string; targetEnvironmentId: string; /** Human-readable name. */ name: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target: TargetEnvironmentsUpdateRequestTarget; /** Optional description. */ description?: string | null; } export const UpdateTargetEnvironmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), targetEnvironmentId: S.String.pipe(T.Label("target_environment_id")), name: S.String, target: TargetEnvironmentsUpdateRequestTarget, description: S.optional(S.NullOr(S.String)), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateTargetEnvironmentRequest", }) as any as S.Schema; export type TargetEnvironmentsUpdateResponseTargetType = "zone"; export const TargetEnvironmentsUpdateResponseTargetType = /*@__PURE__*/ S.String; export interface TargetEnvironmentsUpdateResponseTarget { type: TargetEnvironmentsUpdateResponseTargetType; /** Cloudflare zone tag. The zone must belong to the account. */ zoneTag: string; } export const TargetEnvironmentsUpdateResponseTarget = /*@__PURE__*/ S.suspend( () => S.Struct({ type: TargetEnvironmentsUpdateResponseTargetType, zoneTag: S.String.pipe(T.Body("zone_tag")), }), ).annotate({ identifier: "TargetEnvironmentsUpdateResponseTarget", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateTargetEnvironmentResponse { /** Target environment identifier. */ id: string; /** Human-readable name. */ name: string; /** Identifies the Cloudflare asset to scan. Uses a `type` discriminator. */ target: TargetEnvironmentsUpdateResponseTarget; /** Optional description providing additional context. */ description?: string | null; } export const UpdateTargetEnvironmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, name: S.String, target: TargetEnvironmentsUpdateResponseTarget, description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateTargetEnvironmentResponse", }) as any as S.Schema; export type CreateCredentialSetError = CloudflareOpError; /** Creates a new credential set. */ export const createCredentialSet: API.OperationMethod< CreateCredentialSetRequest, CreateCredentialSetResponse, CreateCredentialSetError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateCredentialSetRequest, output: CreateCredentialSetResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateCredentialSetCredentialError = | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Creates a new credential within a credential set. */ export const createCredentialSetCredential: API.OperationMethod< CreateCredentialSetCredentialRequest, CreateCredentialSetCredentialResponse, CreateCredentialSetCredentialError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateCredentialSetCredentialRequest, output: CreateCredentialSetCredentialResponse, errors: [ CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateScanError = CloudflareOpError; /** Creates and starts a new vulnerability scan. The response may include non-fatal warnings in the `messages` array. */ export const createScan: API.OperationMethod< CreateScanRequest, CreateScanResponse, CreateScanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateScanRequest, output: CreateScanResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateTargetEnvironmentError = | ZoneTagNotFound | Forbidden | CloudflareOpError; /** Creates a new target environment for the account. */ export const createTargetEnvironment: API.OperationMethod< CreateTargetEnvironmentRequest, CreateTargetEnvironmentResponse, CreateTargetEnvironmentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateTargetEnvironmentRequest, output: CreateTargetEnvironmentResponse, errors: [ZoneTagNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteCredentialSetError = | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Deletes a credential set and all of its credentials. */ export const deleteCredentialSet: API.OperationMethod< DeleteCredentialSetRequest, DeleteCredentialSetResponse, DeleteCredentialSetError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteCredentialSetRequest, output: DeleteCredentialSetResponse, errors: [ CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteCredentialSetCredentialError = | CredentialNotFound | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Deletes a credential. */ export const deleteCredentialSetCredential: API.OperationMethod< DeleteCredentialSetCredentialRequest, DeleteCredentialSetCredentialResponse, DeleteCredentialSetCredentialError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteCredentialSetCredentialRequest, output: DeleteCredentialSetCredentialResponse, errors: [ CredentialNotFound, CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteTargetEnvironmentError = | TargetEnvironmentNotFound | Forbidden | CloudflareOpError; /** Removes a target environment. */ export const deleteTargetEnvironment: API.OperationMethod< DeleteTargetEnvironmentRequest, DeleteTargetEnvironmentResponse, DeleteTargetEnvironmentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteTargetEnvironmentRequest, output: DeleteTargetEnvironmentResponse, errors: [ TargetEnvironmentNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCredentialSetError = | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Returns a single credential set by ID. */ export const getCredentialSet: API.OperationMethod< GetCredentialSetRequest, GetCredentialSetResponse, GetCredentialSetError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCredentialSetRequest, output: GetCredentialSetResponse, errors: [ CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCredentialSetCredentialError = | CredentialNotFound | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Returns a single credential by ID. */ export const getCredentialSetCredential: API.OperationMethod< GetCredentialSetCredentialRequest, GetCredentialSetCredentialResponse, GetCredentialSetCredentialError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCredentialSetCredentialRequest, output: GetCredentialSetCredentialResponse, errors: [ CredentialNotFound, CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetScanError = CloudflareOpError; /** Returns a single scan by ID. */ export const getScan: API.OperationMethod< GetScanRequest, GetScanResponse, GetScanError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetScanRequest, output: GetScanResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetTargetEnvironmentError = | TargetEnvironmentNotFound | Forbidden | CloudflareOpError; /** Returns a single target environment by ID. */ export const getTargetEnvironment: API.OperationMethod< GetTargetEnvironmentRequest, GetTargetEnvironmentResponse, GetTargetEnvironmentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetTargetEnvironmentRequest, output: GetTargetEnvironmentResponse, errors: [ TargetEnvironmentNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListCredentialSetCredentialsError = | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Returns all credentials within a credential set. */ export const listCredentialSetCredentials: API.PaginatedOperationMethod< ListCredentialSetCredentialsRequest, ListCredentialSetCredentialsResponse, ListCredentialSetCredentialsError, CloudflareOpContext, CredentialSetsCredentialsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListCredentialSetCredentialsRequest, output: ListCredentialSetCredentialsResponse, errors: [ CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListCredentialSetsError = CloudflareOpError; /** Returns all credential sets for the account. */ export const listCredentialSets: API.PaginatedOperationMethod< ListCredentialSetsRequest, ListCredentialSetsResponse, ListCredentialSetsError, CloudflareOpContext, CredentialSetsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListCredentialSetsRequest, output: ListCredentialSetsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListScansError = CloudflareOpError; /** Returns all scans for the account. */ export const listScans: API.PaginatedOperationMethod< ListScansRequest, ListScansResponse, ListScansError, CloudflareOpContext, ScansListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListScansRequest, output: ListScansResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListTargetEnvironmentsError = CloudflareOpError; /** Returns all target environments for the account. */ export const listTargetEnvironments: API.PaginatedOperationMethod< ListTargetEnvironmentsRequest, ListTargetEnvironmentsResponse, ListTargetEnvironmentsError, CloudflareOpContext, TargetEnvironmentsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListTargetEnvironmentsRequest, output: ListTargetEnvironmentsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type PatchCredentialSetError = | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Updates a credential set with only the provided fields; omitted fields remain unchanged. */ export const patchCredentialSet: API.OperationMethod< PatchCredentialSetRequest, PatchCredentialSetResponse, PatchCredentialSetError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchCredentialSetRequest, output: PatchCredentialSetResponse, errors: [ CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchCredentialSetCredentialError = | CredentialNotFound | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Updates a credential with only the provided fields; omitted fields remain unchanged. */ export const patchCredentialSetCredential: API.OperationMethod< PatchCredentialSetCredentialRequest, PatchCredentialSetCredentialResponse, PatchCredentialSetCredentialError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchCredentialSetCredentialRequest, output: PatchCredentialSetCredentialResponse, errors: [ CredentialNotFound, CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchTargetEnvironmentError = | TargetEnvironmentNotFound | ZoneTagNotFound | Forbidden | CloudflareOpError; /** Updates a target environment with only the provided fields; omitted fields remain unchanged. */ export const patchTargetEnvironment: API.OperationMethod< PatchTargetEnvironmentRequest, PatchTargetEnvironmentResponse, PatchTargetEnvironmentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchTargetEnvironmentRequest, output: PatchTargetEnvironmentResponse, errors: [ TargetEnvironmentNotFound, ZoneTagNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateCredentialSetError = | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Replaces a credential set. All fields must be provided. */ export const updateCredentialSet: API.OperationMethod< UpdateCredentialSetRequest, UpdateCredentialSetResponse, UpdateCredentialSetError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateCredentialSetRequest, output: UpdateCredentialSetResponse, errors: [ CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateCredentialSetCredentialError = | CredentialNotFound | CredentialSetNotFound | Forbidden | CloudflareOpError; /** Replaces a credential. All fields must be provided. */ export const updateCredentialSetCredential: API.OperationMethod< UpdateCredentialSetCredentialRequest, UpdateCredentialSetCredentialResponse, UpdateCredentialSetCredentialError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateCredentialSetCredentialRequest, output: UpdateCredentialSetCredentialResponse, errors: [ CredentialNotFound, CredentialSetNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateTargetEnvironmentError = | TargetEnvironmentNotFound | ZoneTagNotFound | Forbidden | CloudflareOpError; /** Replaces a target environment. All fields must be provided. */ export const updateTargetEnvironment: API.OperationMethod< UpdateTargetEnvironmentRequest, UpdateTargetEnvironmentResponse, UpdateTargetEnvironmentError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateTargetEnvironmentRequest, output: UpdateTargetEnvironmentResponse, errors: [ TargetEnvironmentNotFound, ZoneTagNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, }));