// 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> = { activeSchema: "active_schema", apiRouting: "api_routing", authIdCharacteristics: "auth_id_characteristics", authIdTokens: "auth_id_tokens", confidenceIntervals: "confidence_intervals", createdAt: "created_at", dataPoints: "data_points", documentationUrl: "documentation_url", isLearned: "is_learned", lastUpdated: "last_updated", learnedAvailable: "learned_available", mappedResources: "mapped_resources", mitigationAction: "mitigation_action", operationId: "operation_id", operationIds: "operation_ids", parameterSchemas: "parameter_schemas", perPage: "per_page", periodSeconds: "period_seconds", resultInfo: "result_info", schemaId: "schema_id", schemaInfo: "schema_info", settingsMultipleRequest: "settings_multiple_request", suggestedThreshold: "suggested_threshold", totalCount: "total_count", trafficStats: "traffic_stats", uploadDetails: "upload_details", validationDefaultMitigationAction: "validation_default_mitigation_action", validationEnabled: "validation_enabled", validationOverrideMitigationAction: "validation_override_mitigation_action", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class InvalidObjectIdentifier extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "InvalidObjectIdentifier", { code: S.Number, message: S.String, }, ), [{ code: 7003 }], ) {} export class LabelAlreadyExists extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("LabelAlreadyExists", { code: S.Number, message: S.String, }), [{ code: 70009 }], ) {} export class LabelNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("LabelNotFound", { code: S.Number, message: S.String, }), [{ code: 70014 }], ) {} export class NotEntitled extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NotEntitled", { code: S.Number, message: S.String, }), [{ code: 10403 }, { code: 10404 }], ) {} export class NotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export class OperationNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("OperationNotFound", { code: S.Number, message: S.String, }), [{ code: 10404 }], ) {} export class SchemaNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("SchemaNotFound", { code: S.Number, message: S.String, }), [{ code: 19400 }], ) {} export class ZonePurged extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("ZonePurged", { code: S.Number, message: S.String, }), [{ code: 10410 }], ) {} export interface LabelsUserBulkCreateRequestBodyItem { /** The name of the label */ name: string; /** The description of the label */ description?: string; /** Metadata for the label */ metadata?: unknown; } export const LabelsUserBulkCreateRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, description: S.optional(S.String), metadata: S.optional(S.Unknown), }), ).annotate({ identifier: "LabelsUserBulkCreateRequestBodyItem", }) as any as S.Schema; export type LabelsUserBulkCreateRequestBodyList = Array; export const LabelsUserBulkCreateRequestBodyList = /*@__PURE__*/ S.Array( LabelsUserBulkCreateRequestBodyItem, ) as any as S.Schema; export interface BulkCreateLabelUsersRequest { /** Identifier. */ zoneId: string; body: LabelsUserBulkCreateRequestBodyList; } export const BulkCreateLabelUsersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), body: LabelsUserBulkCreateRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/api_gateway/labels/user", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateLabelUsersRequest", }) as any as S.Schema; export type LabelsUserBulkCreateResultItemSource = "user" | "managed"; export const LabelsUserBulkCreateResultItemSource = /*@__PURE__*/ S.String; export interface LabelsUserBulkCreateResultItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsUserBulkCreateResultItemSource; } export const LabelsUserBulkCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsUserBulkCreateResultItemSource, }), ).annotate({ identifier: "LabelsUserBulkCreateResultItem", }) as any as S.Schema; export type LabelsUserBulkCreateResultList = Array; export const LabelsUserBulkCreateResultList = /*@__PURE__*/ S.Array( LabelsUserBulkCreateResultItem, ) as any as S.Schema; export interface BulkCreateLabelUsersResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: LabelsUserBulkCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkCreateLabelUsersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: LabelsUserBulkCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateLabelUsersResponse", }) as any as S.Schema; export type OperationsLabelsBulkCreateRequestSelectorIncludeOperationIdsList = Array; export const OperationsLabelsBulkCreateRequestSelectorIncludeOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface OperationsLabelsBulkCreateRequestSelectorInclude { operationIds: OperationsLabelsBulkCreateRequestSelectorIncludeOperationIdsList; } export const OperationsLabelsBulkCreateRequestSelectorInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: OperationsLabelsBulkCreateRequestSelectorIncludeOperationIdsList.pipe( T.Body("operation_ids"), ), }), ).annotate({ identifier: "OperationsLabelsBulkCreateRequestSelectorInclude", }) as any as S.Schema; export interface OperationsLabelsBulkCreateRequestSelector { include: OperationsLabelsBulkCreateRequestSelectorInclude; } export const OperationsLabelsBulkCreateRequestSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ include: OperationsLabelsBulkCreateRequestSelectorInclude, }), ).annotate({ identifier: "OperationsLabelsBulkCreateRequestSelector", }) as any as S.Schema; export type OperationsLabelsBulkCreateRequestManagedLabelsList = Array; export const OperationsLabelsBulkCreateRequestManagedLabelsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface OperationsLabelsBulkCreateRequestManaged { /** List of managed label names. */ labels?: OperationsLabelsBulkCreateRequestManagedLabelsList; } export const OperationsLabelsBulkCreateRequestManaged = /*@__PURE__*/ S.suspend( () => S.Struct({ labels: S.optional(OperationsLabelsBulkCreateRequestManagedLabelsList), }), ).annotate({ identifier: "OperationsLabelsBulkCreateRequestManaged", }) as any as S.Schema; export type OperationsLabelsBulkCreateRequestUserLabelsList = Array; export const OperationsLabelsBulkCreateRequestUserLabelsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface OperationsLabelsBulkCreateRequestUser { /** List of user label names. */ labels?: OperationsLabelsBulkCreateRequestUserLabelsList; } export const OperationsLabelsBulkCreateRequestUser = /*@__PURE__*/ S.suspend( () => S.Struct({ labels: S.optional(OperationsLabelsBulkCreateRequestUserLabelsList), }), ).annotate({ identifier: "OperationsLabelsBulkCreateRequestUser", }) as any as S.Schema; export interface BulkCreateOperationLabelsRequest { /** Identifier. */ zoneId: string; /** Operation IDs selector */ selector: OperationsLabelsBulkCreateRequestSelector; managed?: OperationsLabelsBulkCreateRequestManaged; user?: OperationsLabelsBulkCreateRequestUser; } export const BulkCreateOperationLabelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), selector: OperationsLabelsBulkCreateRequestSelector, managed: S.optional(OperationsLabelsBulkCreateRequestManaged), user: S.optional(OperationsLabelsBulkCreateRequestUser), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/api_gateway/operations/labels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateOperationLabelsRequest", }) as any as S.Schema; export type OperationsLabelsBulkCreateResultItemMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsLabelsBulkCreateResultItemMethod = /*@__PURE__*/ S.String; export type OperationsLabelsBulkCreateResultItemLabelsItemSource = | "user" | "managed"; export const OperationsLabelsBulkCreateResultItemLabelsItemSource = /*@__PURE__*/ S.String; export interface OperationsLabelsBulkCreateResultItemLabelsItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: OperationsLabelsBulkCreateResultItemLabelsItemSource; } export const OperationsLabelsBulkCreateResultItemLabelsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: OperationsLabelsBulkCreateResultItemLabelsItemSource, }), ).annotate({ identifier: "OperationsLabelsBulkCreateResultItemLabelsItem", }) as any as S.Schema; export type OperationsLabelsBulkCreateResultItemLabelsList = Array; export const OperationsLabelsBulkCreateResultItemLabelsList = /*@__PURE__*/ S.Array( OperationsLabelsBulkCreateResultItemLabelsItem, ) as any as S.Schema; export interface OperationsLabelsBulkCreateResultItem { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsLabelsBulkCreateResultItemMethod; /** UUID. */ operationId: string; labels?: OperationsLabelsBulkCreateResultItemLabelsList | null; } export const OperationsLabelsBulkCreateResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsLabelsBulkCreateResultItemMethod, operationId: S.String.pipe(T.Body("operation_id")), labels: S.optional( S.NullOr(OperationsLabelsBulkCreateResultItemLabelsList), ), }), ).annotate({ identifier: "OperationsLabelsBulkCreateResultItem", }) as any as S.Schema; export type OperationsLabelsBulkCreateResultList = Array; export const OperationsLabelsBulkCreateResultList = /*@__PURE__*/ S.Array( OperationsLabelsBulkCreateResultItem, ) as any as S.Schema; export interface BulkCreateOperationLabelsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: OperationsLabelsBulkCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkCreateOperationLabelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: OperationsLabelsBulkCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateOperationLabelsResponse", }) as any as S.Schema; export type OperationsBulkCreateRequestBodyItemMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsBulkCreateRequestBodyItemMethod = /*@__PURE__*/ S.String; export interface OperationsBulkCreateRequestBodyItem { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; /** The HTTP method used to access the endpoint. */ method: OperationsBulkCreateRequestBodyItemMethod | (string & {}); } export const OperationsBulkCreateRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, method: OperationsBulkCreateRequestBodyItemMethod, }), ).annotate({ identifier: "OperationsBulkCreateRequestBodyItem", }) as any as S.Schema; export type OperationsBulkCreateRequestBodyList = Array; export const OperationsBulkCreateRequestBodyList = /*@__PURE__*/ S.Array( OperationsBulkCreateRequestBodyItem, ) as any as S.Schema; export interface BulkCreateOperationsRequest { /** Identifier. */ zoneId: string; body: OperationsBulkCreateRequestBodyList; } export const BulkCreateOperationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), body: OperationsBulkCreateRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/api_gateway/operations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateOperationsRequest", }) as any as S.Schema; export type OperationsBulkCreateResultItemMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsBulkCreateResultItemMethod = /*@__PURE__*/ S.String; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds { /** The total number of auth-ids seen across this calculation. */ authIdTokens?: number | null; /** The number of data points used for the threshold suggestion calculation. */ dataPoints?: number | null; lastUpdated?: string | null; /** The p50 quantile of requests (in period_seconds). */ p50?: number | null; /** The p90 quantile of requests (in period_seconds). */ p90?: number | null; /** The p99 quantile of requests (in period_seconds). */ p99?: number | null; /** The period over which this threshold is suggested. */ periodSeconds?: number | null; /** The estimated number of requests covered by these calculations. */ requests?: number | null; /** The suggested threshold in requests done by the same auth_id or period_seconds. */ suggestedThreshold?: number | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds = /*@__PURE__*/ S.suspend(() => S.Struct({ authIdTokens: S.optional( S.NullOr(S.Number).pipe(T.Body("auth_id_tokens")), ), dataPoints: S.optional(S.NullOr(S.Number).pipe(T.Body("data_points"))), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), p50: S.optional(S.NullOr(S.Number)), p90: S.optional(S.NullOr(S.Number)), p99: S.optional(S.NullOr(S.Number)), periodSeconds: S.optional( S.NullOr(S.Number).pipe(T.Body("period_seconds")), ), requests: S.optional(S.NullOr(S.Number)), suggestedThreshold: S.optional( S.NullOr(S.Number).pipe(T.Body("suggested_threshold")), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds { thresholds?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds = /*@__PURE__*/ S.suspend(() => S.Struct({ thresholds: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds, ), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds", }) as any as S.Schema; export type OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = Array; export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas { /** An array containing the learned parameter schemas. */ parameters?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList | null; /** An empty response object. This field is required to yield a valid operation schema. */ responses?: unknown | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList, ), ), responses: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas { lastUpdated?: string | null; /** An operation schema object containing a response. */ parameterSchemas?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), parameterSchemas: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas, ).pipe(T.Body("parameter_schemas")), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemas { parameterSchemas: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameterSchemas: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas.pipe( T.Body("parameter_schemas"), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemas", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting { lastUpdated?: string | null; /** Target route. */ route?: string | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), route: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting { /** API Routing settings on endpoint. */ apiRouting?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting = /*@__PURE__*/ S.suspend(() => S.Struct({ apiRouting: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting, ).pipe(T.Body("api_routing")), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 { /** Lower bound for percentile estimate */ lower?: number | null; /** Upper bound for percentile estimate */ upper?: number | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = /*@__PURE__*/ S.suspend(() => S.Struct({ lower: S.optional(S.NullOr(S.Number)), upper: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90", }) as any as S.Schema; export type OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals { /** Upper and lower bound for percentile estimate */ p90?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 | null; /** Upper and lower bound for percentile estimate */ p95?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 | null; /** Upper and lower bound for percentile estimate */ p99?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = /*@__PURE__*/ S.suspend(() => S.Struct({ p90: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90, ), ), p95: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90, ), ), p99: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90, ), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold { confidenceIntervals?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals | null; /** Suggested threshold. */ mean?: number | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = /*@__PURE__*/ S.suspend(() => S.Struct({ confidenceIntervals: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals, ).pipe(T.Body("confidence_intervals")), ), mean: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals { lastUpdated?: string | null; suggestedThreshold?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), suggestedThreshold: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold, ).pipe(T.Body("suggested_threshold")), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals { confidenceIntervals?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals = /*@__PURE__*/ S.suspend(() => S.Struct({ confidenceIntervals: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals, ).pipe(T.Body("confidence_intervals")), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema { /** UUID. */ id?: string | null; createdAt?: string | null; /** True if schema is Cloudflare-provided. */ isLearned?: boolean | null; /** Schema file name. */ name?: string | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isLearned: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_learned"))), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema", }) as any as S.Schema; export type OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = | "none" | "log" | "block"; export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = /*@__PURE__*/ S.String; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo { /** Schema active on endpoint. */ activeSchema?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema | null; /** True if a Cloudflare-provided learned schema is available for this endpoint. */ learnedAvailable?: boolean | null; /** Action taken on requests failing validation. */ mitigationAction?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ activeSchema: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema, ).pipe(T.Body("active_schema")), ), learnedAvailable: S.optional( S.NullOr(S.Boolean).pipe(T.Body("learned_available")), ), mitigationAction: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction, ).pipe(T.Body("mitigation_action")), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", }) as any as S.Schema; export interface OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfo { schemaInfo?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo | null; } export const OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ schemaInfo: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo, ).pipe(T.Body("schema_info")), ), }), ).annotate({ identifier: "OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfo", }) as any as S.Schema; export type OperationsBulkCreateResultItemFeatures = | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureParameterSchemas | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfo; export const OperationsBulkCreateResultItemFeatures = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["thresholds"], ["parameterSchemas"], ["apiRouting"], ["confidenceIntervals"], ["schemaInfo"], ]), ); export interface OperationsBulkCreateResultItem { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsBulkCreateResultItemMethod; /** UUID. */ operationId: string; features?: OperationsBulkCreateResultItemFeatures | null; } export const OperationsBulkCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsBulkCreateResultItemMethod, operationId: S.String.pipe(T.Body("operation_id")), features: S.optional(S.NullOr(OperationsBulkCreateResultItemFeatures)), }), ).annotate({ identifier: "OperationsBulkCreateResultItem", }) as any as S.Schema; export type OperationsBulkCreateResultList = Array; export const OperationsBulkCreateResultList = /*@__PURE__*/ S.Array( OperationsBulkCreateResultItem, ) as any as S.Schema; export interface BulkCreateOperationsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: OperationsBulkCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkCreateOperationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: OperationsBulkCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateOperationsResponse", }) as any as S.Schema; export interface BulkDeleteLabelUsersRequest { /** Identifier. */ zoneId: string; } export const BulkDeleteLabelUsersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/api_gateway/labels/user", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteLabelUsersRequest", }) as any as S.Schema; export type LabelsUserBulkDeleteResultItemSource = "user" | "managed"; export const LabelsUserBulkDeleteResultItemSource = /*@__PURE__*/ S.String; export interface LabelsUserBulkDeleteResultItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsUserBulkDeleteResultItemSource; } export const LabelsUserBulkDeleteResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsUserBulkDeleteResultItemSource, }), ).annotate({ identifier: "LabelsUserBulkDeleteResultItem", }) as any as S.Schema; export type LabelsUserBulkDeleteResultList = Array; export const LabelsUserBulkDeleteResultList = /*@__PURE__*/ S.Array( LabelsUserBulkDeleteResultItem, ) as any as S.Schema; export interface BulkDeleteLabelUsersResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: LabelsUserBulkDeleteResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkDeleteLabelUsersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: LabelsUserBulkDeleteResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteLabelUsersResponse", }) as any as S.Schema; export interface BulkDeleteOperationLabelsRequest { /** Identifier. */ zoneId: string; } export const BulkDeleteOperationLabelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/api_gateway/operations/labels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteOperationLabelsRequest", }) as any as S.Schema; export type OperationsLabelsBulkDeleteResultItemMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsLabelsBulkDeleteResultItemMethod = /*@__PURE__*/ S.String; export type OperationsLabelsBulkDeleteResultItemLabelsItemSource = | "user" | "managed"; export const OperationsLabelsBulkDeleteResultItemLabelsItemSource = /*@__PURE__*/ S.String; export interface OperationsLabelsBulkDeleteResultItemLabelsItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: OperationsLabelsBulkDeleteResultItemLabelsItemSource; } export const OperationsLabelsBulkDeleteResultItemLabelsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: OperationsLabelsBulkDeleteResultItemLabelsItemSource, }), ).annotate({ identifier: "OperationsLabelsBulkDeleteResultItemLabelsItem", }) as any as S.Schema; export type OperationsLabelsBulkDeleteResultItemLabelsList = Array; export const OperationsLabelsBulkDeleteResultItemLabelsList = /*@__PURE__*/ S.Array( OperationsLabelsBulkDeleteResultItemLabelsItem, ) as any as S.Schema; export interface OperationsLabelsBulkDeleteResultItem { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsLabelsBulkDeleteResultItemMethod; /** UUID. */ operationId: string; labels?: OperationsLabelsBulkDeleteResultItemLabelsList | null; } export const OperationsLabelsBulkDeleteResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsLabelsBulkDeleteResultItemMethod, operationId: S.String.pipe(T.Body("operation_id")), labels: S.optional( S.NullOr(OperationsLabelsBulkDeleteResultItemLabelsList), ), }), ).annotate({ identifier: "OperationsLabelsBulkDeleteResultItem", }) as any as S.Schema; export type OperationsLabelsBulkDeleteResultList = Array; export const OperationsLabelsBulkDeleteResultList = /*@__PURE__*/ S.Array( OperationsLabelsBulkDeleteResultItem, ) as any as S.Schema; export interface BulkDeleteOperationLabelsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: OperationsLabelsBulkDeleteResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkDeleteOperationLabelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: OperationsLabelsBulkDeleteResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteOperationLabelsResponse", }) as any as S.Schema; export interface BulkDeleteOperationsRequest { /** Identifier. */ zoneId: string; } export const BulkDeleteOperationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/api_gateway/operations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteOperationsRequest", }) as any as S.Schema; export interface BulkDeleteOperationsResponse {} export const BulkDeleteOperationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkDeleteOperationsResponse", }) as any as S.Schema; export type DiscoveryOperationsBulkEditRequestBodyValueState = | "review" | "ignored"; export const DiscoveryOperationsBulkEditRequestBodyValueState = /*@__PURE__*/ S.String; export interface DiscoveryOperationsBulkEditRequestBodyValue { /** Mark state of operation in API Discovery */ state?: DiscoveryOperationsBulkEditRequestBodyValueState | (string & {}); } export const DiscoveryOperationsBulkEditRequestBodyValue = /*@__PURE__*/ S.suspend(() => S.Struct({ state: S.optional(DiscoveryOperationsBulkEditRequestBodyValueState), }), ).annotate({ identifier: "DiscoveryOperationsBulkEditRequestBodyValue", }) as any as S.Schema; export type DiscoveryOperationsBulkEditRequestBodyMap = { [key: string]: DiscoveryOperationsBulkEditRequestBodyValue | undefined; }; export const DiscoveryOperationsBulkEditRequestBodyMap = /*@__PURE__*/ S.Record( S.String, DiscoveryOperationsBulkEditRequestBodyValue, ) as any as S.Schema; export interface BulkPatchDiscoveryOperationsRequest { /** Identifier. */ zoneId: string; body: DiscoveryOperationsBulkEditRequestBodyMap; } export const BulkPatchDiscoveryOperationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), body: DiscoveryOperationsBulkEditRequestBodyMap.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/api_gateway/discovery/operations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPatchDiscoveryOperationsRequest", }) as any as S.Schema; export type DiscoveryOperationsBulkEditResultValueState = "review" | "ignored"; export const DiscoveryOperationsBulkEditResultValueState = /*@__PURE__*/ S.String; export interface DiscoveryOperationsBulkEditResultValue { /** Mark state of operation in API Discovery */ state?: DiscoveryOperationsBulkEditResultValueState | null; } export const DiscoveryOperationsBulkEditResultValue = /*@__PURE__*/ S.suspend( () => S.Struct({ state: S.optional(S.NullOr(DiscoveryOperationsBulkEditResultValueState)), }), ).annotate({ identifier: "DiscoveryOperationsBulkEditResultValue", }) as any as S.Schema; export type DiscoveryOperationsBulkEditResultMap = { [key: string]: DiscoveryOperationsBulkEditResultValue | undefined; }; export const DiscoveryOperationsBulkEditResultMap = /*@__PURE__*/ S.Record( S.String, DiscoveryOperationsBulkEditResultValue, ) as any as S.Schema; export type BulkPatchDiscoveryOperationsResponse = DiscoveryOperationsBulkEditResultMap; export const BulkPatchDiscoveryOperationsResponse = /*@__PURE__*/ S.suspend( () => DiscoveryOperationsBulkEditResultMap.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "BulkPatchDiscoveryOperationsResponse", }) as any as S.Schema; export type OperationsLabelsBulkUpdateRequestManagedLabelsList = Array; export const OperationsLabelsBulkUpdateRequestManagedLabelsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface OperationsLabelsBulkUpdateRequestManaged { /** List of managed label names. Providing an empty array will result in all managed labels being removed from all affected operations */ labels: OperationsLabelsBulkUpdateRequestManagedLabelsList; } export const OperationsLabelsBulkUpdateRequestManaged = /*@__PURE__*/ S.suspend( () => S.Struct({ labels: OperationsLabelsBulkUpdateRequestManagedLabelsList, }), ).annotate({ identifier: "OperationsLabelsBulkUpdateRequestManaged", }) as any as S.Schema; export type OperationsLabelsBulkUpdateRequestSelectorIncludeOperationIdsList = Array; export const OperationsLabelsBulkUpdateRequestSelectorIncludeOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface OperationsLabelsBulkUpdateRequestSelectorInclude { operationIds: OperationsLabelsBulkUpdateRequestSelectorIncludeOperationIdsList; } export const OperationsLabelsBulkUpdateRequestSelectorInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: OperationsLabelsBulkUpdateRequestSelectorIncludeOperationIdsList.pipe( T.Body("operation_ids"), ), }), ).annotate({ identifier: "OperationsLabelsBulkUpdateRequestSelectorInclude", }) as any as S.Schema; export interface OperationsLabelsBulkUpdateRequestSelector { include: OperationsLabelsBulkUpdateRequestSelectorInclude; } export const OperationsLabelsBulkUpdateRequestSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ include: OperationsLabelsBulkUpdateRequestSelectorInclude, }), ).annotate({ identifier: "OperationsLabelsBulkUpdateRequestSelector", }) as any as S.Schema; export type OperationsLabelsBulkUpdateRequestUserLabelsList = Array; export const OperationsLabelsBulkUpdateRequestUserLabelsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface OperationsLabelsBulkUpdateRequestUser { /** List of user label names. Providing an empty array will result in all user labels being removed from all affected operations */ labels: OperationsLabelsBulkUpdateRequestUserLabelsList; } export const OperationsLabelsBulkUpdateRequestUser = /*@__PURE__*/ S.suspend( () => S.Struct({ labels: OperationsLabelsBulkUpdateRequestUserLabelsList, }), ).annotate({ identifier: "OperationsLabelsBulkUpdateRequestUser", }) as any as S.Schema; export interface BulkUpdateOperationLabelsRequest { /** Identifier. */ zoneId: string; /** Managed labels to replace for all affected operations */ managed: OperationsLabelsBulkUpdateRequestManaged; /** Operation IDs selector */ selector: OperationsLabelsBulkUpdateRequestSelector; /** User labels to replace for all affected operations */ user: OperationsLabelsBulkUpdateRequestUser; } export const BulkUpdateOperationLabelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), managed: OperationsLabelsBulkUpdateRequestManaged, selector: OperationsLabelsBulkUpdateRequestSelector, user: OperationsLabelsBulkUpdateRequestUser, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/operations/labels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkUpdateOperationLabelsRequest", }) as any as S.Schema; export type OperationsLabelsBulkUpdateResultItemMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsLabelsBulkUpdateResultItemMethod = /*@__PURE__*/ S.String; export type OperationsLabelsBulkUpdateResultItemLabelsItemSource = | "user" | "managed"; export const OperationsLabelsBulkUpdateResultItemLabelsItemSource = /*@__PURE__*/ S.String; export interface OperationsLabelsBulkUpdateResultItemLabelsItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: OperationsLabelsBulkUpdateResultItemLabelsItemSource; } export const OperationsLabelsBulkUpdateResultItemLabelsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: OperationsLabelsBulkUpdateResultItemLabelsItemSource, }), ).annotate({ identifier: "OperationsLabelsBulkUpdateResultItemLabelsItem", }) as any as S.Schema; export type OperationsLabelsBulkUpdateResultItemLabelsList = Array; export const OperationsLabelsBulkUpdateResultItemLabelsList = /*@__PURE__*/ S.Array( OperationsLabelsBulkUpdateResultItemLabelsItem, ) as any as S.Schema; export interface OperationsLabelsBulkUpdateResultItem { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsLabelsBulkUpdateResultItemMethod; /** UUID. */ operationId: string; labels?: OperationsLabelsBulkUpdateResultItemLabelsList | null; } export const OperationsLabelsBulkUpdateResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsLabelsBulkUpdateResultItemMethod, operationId: S.String.pipe(T.Body("operation_id")), labels: S.optional( S.NullOr(OperationsLabelsBulkUpdateResultItemLabelsList), ), }), ).annotate({ identifier: "OperationsLabelsBulkUpdateResultItem", }) as any as S.Schema; export type OperationsLabelsBulkUpdateResultList = Array; export const OperationsLabelsBulkUpdateResultList = /*@__PURE__*/ S.Array( OperationsLabelsBulkUpdateResultItem, ) as any as S.Schema; export interface BulkUpdateOperationLabelsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: OperationsLabelsBulkUpdateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkUpdateOperationLabelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: OperationsLabelsBulkUpdateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkUpdateOperationLabelsResponse", }) as any as S.Schema; export type ExpressionTemplateFallthroughCreateRequestHostsList = Array; export const ExpressionTemplateFallthroughCreateRequestHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateExpressionTemplateFallthroughRequest { /** Identifier. */ zoneId: string; /** List of hosts to be targeted in the expression */ hosts: ExpressionTemplateFallthroughCreateRequestHostsList; } export const CreateExpressionTemplateFallthroughRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), hosts: ExpressionTemplateFallthroughCreateRequestHostsList, }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/api_gateway/expression-template/fallthrough", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateExpressionTemplateFallthroughRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateExpressionTemplateFallthroughResponse { /** WAF Expression for fallthrough */ expression: string; /** Title for the expression */ title: string; } export const CreateExpressionTemplateFallthroughResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ expression: S.String, title: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateExpressionTemplateFallthroughResponse", }) as any as S.Schema; export type OperationsCreateRequestMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsCreateRequestMethod = /*@__PURE__*/ S.String; export interface CreateOperationRequest { /** Identifier. */ zoneId: string; /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; /** The HTTP method used to access the endpoint. */ method: OperationsCreateRequestMethod | (string & {}); } export const CreateOperationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), endpoint: S.String, host: S.String, method: OperationsCreateRequestMethod, }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/api_gateway/operations/item", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOperationRequest", }) as any as S.Schema; export type OperationsCreateResponseMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsCreateResponseMethod = /*@__PURE__*/ S.String; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = Array; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas { /** An array containing the learned parameter schemas. */ parameters?: OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList | null; /** An empty response object. This field is required to yield a valid operation schema. */ responses?: unknown | null; } export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: S.optional( S.NullOr( OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList, ), ), responses: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas { lastUpdated?: string | null; /** An operation schema object containing a response. */ parameterSchemas?: OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas | null; } export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), parameterSchemas: S.optional( S.NullOr( OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas, ).pipe(T.Body("parameter_schemas")), ), }), ).annotate({ identifier: "OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemas { parameterSchemas: OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas; } export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameterSchemas: OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas.pipe( T.Body("parameter_schemas"), ), }), ).annotate({ identifier: "OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemas", }) as any as S.Schema; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export type OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = | "none" | "log" | "block"; export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = /*@__PURE__*/ S.String; export interface OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo { /** Schema active on endpoint. */ activeSchema?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema | null; /** True if a Cloudflare-provided learned schema is available for this endpoint. */ learnedAvailable?: boolean | null; /** Action taken on requests failing validation. */ mitigationAction?: OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction | null; } export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ activeSchema: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema, ).pipe(T.Body("active_schema")), ), learnedAvailable: S.optional( S.NullOr(S.Boolean).pipe(T.Body("learned_available")), ), mitigationAction: S.optional( S.NullOr( OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction, ).pipe(T.Body("mitigation_action")), ), }), ).annotate({ identifier: "OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", }) as any as S.Schema; export interface OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfo { schemaInfo?: OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo | null; } export const OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ schemaInfo: S.optional( S.NullOr( OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo, ).pipe(T.Body("schema_info")), ), }), ).annotate({ identifier: "OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfo", }) as any as S.Schema; export type OperationsCreateResponseFeatures = | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds | OperationsCreateResponseFeaturesAPIShieldOperationFeatureParameterSchemas | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals | OperationsCreateResponseFeaturesAPIShieldOperationFeatureSchemaInfo; export const OperationsCreateResponseFeatures = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["thresholds"], ["parameterSchemas"], ["apiRouting"], ["confidenceIntervals"], ["schemaInfo"], ]), ); export type OperationsCreateResponseSchemasLearnedParametersItemMap = { [key: string]: unknown | undefined; }; export const OperationsCreateResponseSchemasLearnedParametersItemMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export type OperationsCreateResponseSchemasLearnedParametersList = Array; export const OperationsCreateResponseSchemasLearnedParametersList = /*@__PURE__*/ S.Array( OperationsCreateResponseSchemasLearnedParametersItemMap, ) as any as S.Schema; export type OperationsCreateResponseSchemasLearnedRequestBodyMap = { [key: string]: unknown | undefined; }; export const OperationsCreateResponseSchemasLearnedRequestBodyMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface OperationsCreateResponseSchemasLearned { /** OpenAPI parameter objects describing path, query, header, or cookie parameters. */ parameters?: OperationsCreateResponseSchemasLearnedParametersList | null; /** OpenAPI request body object describing the expected request payload. */ requestBody?: OperationsCreateResponseSchemasLearnedRequestBodyMap | null; } export const OperationsCreateResponseSchemasLearned = /*@__PURE__*/ S.suspend( () => S.Struct({ parameters: S.optional( S.NullOr(OperationsCreateResponseSchemasLearnedParametersList), ), requestBody: S.optional( S.NullOr(OperationsCreateResponseSchemasLearnedRequestBodyMap), ), }), ).annotate({ identifier: "OperationsCreateResponseSchemasLearned", }) as any as S.Schema; export type OperationsCreateResponseSchemasUploadedParametersItemMap = { [key: string]: unknown | undefined; }; export const OperationsCreateResponseSchemasUploadedParametersItemMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export type OperationsCreateResponseSchemasUploadedParametersList = Array; export const OperationsCreateResponseSchemasUploadedParametersList = /*@__PURE__*/ S.Array( OperationsCreateResponseSchemasUploadedParametersItemMap, ) as any as S.Schema; export type OperationsCreateResponseSchemasUploadedRequestBodyMap = { [key: string]: unknown | undefined; }; export const OperationsCreateResponseSchemasUploadedRequestBodyMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface OperationsCreateResponseSchemasUploaded { /** OpenAPI parameter objects describing path, query, header, or cookie parameters. */ parameters?: OperationsCreateResponseSchemasUploadedParametersList | null; /** OpenAPI request body object describing the expected request payload. */ requestBody?: OperationsCreateResponseSchemasUploadedRequestBodyMap | null; } export const OperationsCreateResponseSchemasUploaded = /*@__PURE__*/ S.suspend( () => S.Struct({ parameters: S.optional( S.NullOr(OperationsCreateResponseSchemasUploadedParametersList), ), requestBody: S.optional( S.NullOr(OperationsCreateResponseSchemasUploadedRequestBodyMap), ), }), ).annotate({ identifier: "OperationsCreateResponseSchemasUploaded", }) as any as S.Schema; export interface OperationsCreateResponseSchemas { /** An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension. */ learned?: OperationsCreateResponseSchemasLearned | null; /** An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension. */ uploaded?: OperationsCreateResponseSchemasUploaded | null; } export const OperationsCreateResponseSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ learned: S.optional(S.NullOr(OperationsCreateResponseSchemasLearned)), uploaded: S.optional(S.NullOr(OperationsCreateResponseSchemasUploaded)), }), ).annotate({ identifier: "OperationsCreateResponseSchemas", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateOperationResponse { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsCreateResponseMethod; /** UUID. */ operationId: string; features?: OperationsCreateResponseFeatures | null; /** OpenAPI JSON schemas for an operation, including both user-uploaded and Cloudflare-learned schemas. */ schemas?: OperationsCreateResponseSchemas | null; } export const CreateOperationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsCreateResponseMethod, operationId: S.String.pipe(T.Body("operation_id")), features: S.optional(S.NullOr(OperationsCreateResponseFeatures)), schemas: S.optional(S.NullOr(OperationsCreateResponseSchemas)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOperationResponse", }) as any as S.Schema; export type OperationsLabelsCreateRequestManagedList = Array; export const OperationsLabelsCreateRequestManagedList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OperationsLabelsCreateRequestUserList = Array; export const OperationsLabelsCreateRequestUserList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateOperationLabelRequest { /** Identifier. */ zoneId: string; /** UUID. */ operationId: string; /** List of managed label names. */ managed?: OperationsLabelsCreateRequestManagedList; /** List of user label names. */ user?: OperationsLabelsCreateRequestUserList; } export const CreateOperationLabelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), operationId: S.String.pipe(T.Label("operation_id")), managed: S.optional(OperationsLabelsCreateRequestManagedList), user: S.optional(OperationsLabelsCreateRequestUserList), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/api_gateway/operations/{operation_id}/labels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOperationLabelRequest", }) as any as S.Schema; export type OperationsLabelsCreateResponseMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsLabelsCreateResponseMethod = /*@__PURE__*/ S.String; export type OperationsLabelsCreateResponseLabelsItemSource = "user" | "managed"; export const OperationsLabelsCreateResponseLabelsItemSource = /*@__PURE__*/ S.String; export interface OperationsLabelsCreateResponseLabelsItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: OperationsLabelsCreateResponseLabelsItemSource; } export const OperationsLabelsCreateResponseLabelsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: OperationsLabelsCreateResponseLabelsItemSource, }), ).annotate({ identifier: "OperationsLabelsCreateResponseLabelsItem", }) as any as S.Schema; export type OperationsLabelsCreateResponseLabelsList = Array; export const OperationsLabelsCreateResponseLabelsList = /*@__PURE__*/ S.Array( OperationsLabelsCreateResponseLabelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateOperationLabelResponse { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsLabelsCreateResponseMethod; /** UUID. */ operationId: string; labels?: OperationsLabelsCreateResponseLabelsList | null; } export const CreateOperationLabelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsLabelsCreateResponseMethod, operationId: S.String.pipe(T.Body("operation_id")), labels: S.optional(S.NullOr(OperationsLabelsCreateResponseLabelsList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateOperationLabelResponse", }) as any as S.Schema; export interface CreateUserSchemaRequest { /** Identifier. */ zoneId: string; /** Schema file bytes (File/Blob), sent as the multipart `file` part. */ file: unknown; /** Kind of schema (openapi_v3). */ kind: string; /** Name of the schema. */ name?: string; /** Flag whether schema is enabled for validation. */ validationEnabled?: boolean; } export const CreateUserSchemaRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), file: S.Unknown, kind: S.String, name: S.optional(S.String), validationEnabled: S.optional(S.Boolean.pipe(T.Body("validation_enabled"))), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/api_gateway/user_schemas", code: 200, contentType: "multipart", }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateUserSchemaRequest", }) as any as S.Schema; export type UserSchemasCreateResponseSchemaKind = "openapi_v3"; export const UserSchemasCreateResponseSchemaKind = /*@__PURE__*/ S.String; export interface UserSchemasCreateResponseSchema { createdAt: string; /** Kind of schema */ kind: UserSchemasCreateResponseSchemaKind; /** Name of the schema */ name: string; /** UUID. */ schemaId: string; /** Source of the schema */ source?: string | null; /** Flag whether schema is enabled for validation. */ validationEnabled?: boolean | null; } export const UserSchemasCreateResponseSchema = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), kind: UserSchemasCreateResponseSchemaKind, name: S.String, schemaId: S.String.pipe(T.Body("schema_id")), source: S.optional(S.NullOr(S.String)), validationEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("validation_enabled")), ), }), ).annotate({ identifier: "UserSchemasCreateResponseSchema", }) as any as S.Schema; export type UserSchemasCreateResponseUploadDetailsWarningsItemLocationsList = Array; export const UserSchemasCreateResponseUploadDetailsWarningsItemLocationsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UserSchemasCreateResponseUploadDetailsWarningsItem { /** Code that identifies the event that occurred. */ code: number; /** JSONPath location(s) in the schema where these events were encountered. See for JSONPath specification. */ locations?: UserSchemasCreateResponseUploadDetailsWarningsItemLocationsList | null; /** Diagnostic message that describes the event. */ message?: string | null; } export const UserSchemasCreateResponseUploadDetailsWarningsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.Number, locations: S.optional( S.NullOr( UserSchemasCreateResponseUploadDetailsWarningsItemLocationsList, ), ), message: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "UserSchemasCreateResponseUploadDetailsWarningsItem", }) as any as S.Schema; export type UserSchemasCreateResponseUploadDetailsWarningsList = Array; export const UserSchemasCreateResponseUploadDetailsWarningsList = /*@__PURE__*/ S.Array( UserSchemasCreateResponseUploadDetailsWarningsItem, ) as any as S.Schema; export interface UserSchemasCreateResponseUploadDetails { /** Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema. */ warnings?: UserSchemasCreateResponseUploadDetailsWarningsList | null; } export const UserSchemasCreateResponseUploadDetails = /*@__PURE__*/ S.suspend( () => S.Struct({ warnings: S.optional( S.NullOr(UserSchemasCreateResponseUploadDetailsWarningsList), ), }), ).annotate({ identifier: "UserSchemasCreateResponseUploadDetails", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateUserSchemaResponse { schema: UserSchemasCreateResponseSchema; uploadDetails?: UserSchemasCreateResponseUploadDetails | null; } export const CreateUserSchemaResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ schema: UserSchemasCreateResponseSchema, uploadDetails: S.optional( S.NullOr(UserSchemasCreateResponseUploadDetails).pipe( T.Body("upload_details"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateUserSchemaResponse", }) as any as S.Schema; export interface DeleteLabelUserRequest { /** Identifier. */ zoneId: string; /** The name of the label */ name: string; } export const DeleteLabelUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/api_gateway/labels/user/{name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteLabelUserRequest", }) as any as S.Schema; export type LabelsUserDeleteResponseSource = "user" | "managed"; export const LabelsUserDeleteResponseSource = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteLabelUserResponse { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsUserDeleteResponseSource; } export const DeleteLabelUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsUserDeleteResponseSource, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteLabelUserResponse", }) as any as S.Schema; export interface DeleteOperationRequest { /** Identifier. */ zoneId: string; /** UUID. */ operationId: string; } export const DeleteOperationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), operationId: S.String.pipe(T.Label("operation_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/api_gateway/operations/{operation_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOperationRequest", }) as any as S.Schema; export interface DeleteOperationResponse {} export const DeleteOperationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOperationResponse", }) as any as S.Schema; export interface DeleteOperationLabelRequest { /** Identifier. */ zoneId: string; /** UUID. */ operationId: string; } export const DeleteOperationLabelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), operationId: S.String.pipe(T.Label("operation_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/api_gateway/operations/{operation_id}/labels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOperationLabelRequest", }) as any as S.Schema; export type OperationsLabelsDeleteResponseMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsLabelsDeleteResponseMethod = /*@__PURE__*/ S.String; export type OperationsLabelsDeleteResponseLabelsItemSource = "user" | "managed"; export const OperationsLabelsDeleteResponseLabelsItemSource = /*@__PURE__*/ S.String; export interface OperationsLabelsDeleteResponseLabelsItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: OperationsLabelsDeleteResponseLabelsItemSource; } export const OperationsLabelsDeleteResponseLabelsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: OperationsLabelsDeleteResponseLabelsItemSource, }), ).annotate({ identifier: "OperationsLabelsDeleteResponseLabelsItem", }) as any as S.Schema; export type OperationsLabelsDeleteResponseLabelsList = Array; export const OperationsLabelsDeleteResponseLabelsList = /*@__PURE__*/ S.Array( OperationsLabelsDeleteResponseLabelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteOperationLabelResponse { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsLabelsDeleteResponseMethod; /** UUID. */ operationId: string; labels?: OperationsLabelsDeleteResponseLabelsList | null; } export const DeleteOperationLabelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsLabelsDeleteResponseMethod, operationId: S.String.pipe(T.Body("operation_id")), labels: S.optional(S.NullOr(OperationsLabelsDeleteResponseLabelsList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteOperationLabelResponse", }) as any as S.Schema; export interface DeleteUserSchemaRequest { /** Identifier. */ zoneId: string; schemaId: string; } export const DeleteUserSchemaRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), schemaId: S.String.pipe(T.Label("schema_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/api_gateway/user_schemas/{schema_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteUserSchemaRequest", }) as any as S.Schema; export interface DeleteUserSchemaResponse {} export const DeleteUserSchemaResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteUserSchemaResponse", }) as any as S.Schema; export interface GetConfigurationRequest { /** Identifier. */ zoneId: string; /** Ensures that the configuration is written or retrieved in normalized fashion */ normalize?: boolean; } export const GetConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), normalize: S.optional(S.Boolean.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/configuration", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConfigurationRequest", }) as any as S.Schema; export type ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType = | "header" | "cookie"; export const ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType = /*@__PURE__*/ S.String; export interface ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic { /** The name of the characteristic field, i.e., the header or cookie name. */ name: string; /** The type of characteristic. */ type: ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType; } export const ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType, }), ).annotate({ identifier: "ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic", }) as any as S.Schema; export type ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType = "jwt"; export const ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType = /*@__PURE__*/ S.String; export interface ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim { /** Claim location expressed as `$(token_config_id):$(json_path)`, where `token_config_id` */ name: string; /** The type of characteristic. */ type: ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType; } export const ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType, }), ).annotate({ identifier: "ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim", }) as any as S.Schema; export type ConfigurationsGetResponseAuthIdCharacteristicsItem = | ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic | ConfigurationsGetResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim; export const ConfigurationsGetResponseAuthIdCharacteristicsItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "type"], ["name", "type"], ]), ); export type ConfigurationsGetResponseAuthIdCharacteristicsList = Array; export const ConfigurationsGetResponseAuthIdCharacteristicsList = /*@__PURE__*/ S.Array( ConfigurationsGetResponseAuthIdCharacteristicsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetConfigurationResponse { authIdCharacteristics: ConfigurationsGetResponseAuthIdCharacteristicsList; } export const GetConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ authIdCharacteristics: ConfigurationsGetResponseAuthIdCharacteristicsList.pipe( T.Body("auth_id_characteristics"), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConfigurationResponse", }) as any as S.Schema; export interface GetDiscoveryRequest { /** Identifier. */ zoneId: string; } export const GetDiscoveryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/discovery", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDiscoveryRequest", }) as any as S.Schema; export type DiscoveryGetResponseSchemasList = Array; export const DiscoveryGetResponseSchemasList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetDiscoveryResponse { schemas: DiscoveryGetResponseSchemasList; timestamp: string; } export const GetDiscoveryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ schemas: DiscoveryGetResponseSchemasList, timestamp: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDiscoveryResponse", }) as any as S.Schema; export interface GetLabelManagedRequest { /** Identifier. */ zoneId: string; /** The name of the label */ name: string; /** Include `mapped_resources` for each label */ withMappedResourceCounts?: boolean; } export const GetLabelManagedRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String.pipe(T.Label()), withMappedResourceCounts: S.optional( S.Boolean.pipe(T.Query("with_mapped_resource_counts")), ), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/labels/managed/{name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLabelManagedRequest", }) as any as S.Schema; export type LabelsManagedGetResponseSource = "user" | "managed"; export const LabelsManagedGetResponseSource = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetLabelManagedResponse { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsManagedGetResponseSource; /** Provides counts of what resources are linked to this label */ mappedResources?: unknown | null; } export const GetLabelManagedResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsManagedGetResponseSource, mappedResources: S.optional( S.NullOr(S.Unknown).pipe(T.Body("mapped_resources")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLabelManagedResponse", }) as any as S.Schema; export interface GetLabelUserRequest { /** Identifier. */ zoneId: string; /** The name of the label */ name: string; /** Include `mapped_resources` for each label */ withMappedResourceCounts?: boolean; } export const GetLabelUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String.pipe(T.Label()), withMappedResourceCounts: S.optional( S.Boolean.pipe(T.Query("with_mapped_resource_counts")), ), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/labels/user/{name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLabelUserRequest", }) as any as S.Schema; export type LabelsUserGetResponseSource = "user" | "managed"; export const LabelsUserGetResponseSource = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetLabelUserResponse { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsUserGetResponseSource; /** Provides counts of what resources are linked to this label */ mappedResources?: unknown | null; } export const GetLabelUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsUserGetResponseSource, mappedResources: S.optional( S.NullOr(S.Unknown).pipe(T.Body("mapped_resources")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLabelUserResponse", }) as any as S.Schema; export type OperationsGetRequestFeature = | "thresholds" | "parameter_schemas" | "schema_info"; export const OperationsGetRequestFeature = /*@__PURE__*/ S.String; export type OperationsGetRequestFeatureList = Array< OperationsGetRequestFeature | (string & {}) >; export const OperationsGetRequestFeatureList = /*@__PURE__*/ S.Array( OperationsGetRequestFeature, ) as any as S.Schema; export interface GetOperationRequest { /** Identifier. */ zoneId: string; /** UUID. */ operationId: string; /** Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. */ feature?: OperationsGetRequestFeatureList; /** When true, includes OpenAPI schemas (both uploaded and learned) for the operation in the response. Due to the conversion overhead, this parameter is only supported on single-operation retrieval. */ withSchemas?: boolean; } export const GetOperationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), operationId: S.String.pipe(T.Label("operation_id")), feature: S.optional(OperationsGetRequestFeatureList.pipe(T.Query())), withSchemas: S.optional(S.Boolean.pipe(T.Query("with_schemas"))), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/operations/{operation_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOperationRequest", }) as any as S.Schema; export type OperationsGetResponseMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsGetResponseMethod = /*@__PURE__*/ S.String; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = Array; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas { /** An array containing the learned parameter schemas. */ parameters?: OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList | null; /** An empty response object. This field is required to yield a valid operation schema. */ responses?: unknown | null; } export const OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: S.optional( S.NullOr( OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList, ), ), responses: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas { lastUpdated?: string | null; /** An operation schema object containing a response. */ parameterSchemas?: OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas | null; } export const OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), parameterSchemas: S.optional( S.NullOr( OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas, ).pipe(T.Body("parameter_schemas")), ), }), ).annotate({ identifier: "OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemas { parameterSchemas: OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas; } export const OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameterSchemas: OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas.pipe( T.Body("parameter_schemas"), ), }), ).annotate({ identifier: "OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemas", }) as any as S.Schema; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export type OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = | "none" | "log" | "block"; export const OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = /*@__PURE__*/ S.String; export interface OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo { /** Schema active on endpoint. */ activeSchema?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema | null; /** True if a Cloudflare-provided learned schema is available for this endpoint. */ learnedAvailable?: boolean | null; /** Action taken on requests failing validation. */ mitigationAction?: OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction | null; } export const OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ activeSchema: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema, ).pipe(T.Body("active_schema")), ), learnedAvailable: S.optional( S.NullOr(S.Boolean).pipe(T.Body("learned_available")), ), mitigationAction: S.optional( S.NullOr( OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction, ).pipe(T.Body("mitigation_action")), ), }), ).annotate({ identifier: "OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", }) as any as S.Schema; export interface OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfo { schemaInfo?: OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo | null; } export const OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ schemaInfo: S.optional( S.NullOr( OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo, ).pipe(T.Body("schema_info")), ), }), ).annotate({ identifier: "OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfo", }) as any as S.Schema; export type OperationsGetResponseFeatures = | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds | OperationsGetResponseFeaturesAPIShieldOperationFeatureParameterSchemas | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals | OperationsGetResponseFeaturesAPIShieldOperationFeatureSchemaInfo; export const OperationsGetResponseFeatures = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["thresholds"], ["parameterSchemas"], ["apiRouting"], ["confidenceIntervals"], ["schemaInfo"], ]), ); export type OperationsGetResponseSchemasLearnedParametersItemMap = { [key: string]: unknown | undefined; }; export const OperationsGetResponseSchemasLearnedParametersItemMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export type OperationsGetResponseSchemasLearnedParametersList = Array; export const OperationsGetResponseSchemasLearnedParametersList = /*@__PURE__*/ S.Array( OperationsGetResponseSchemasLearnedParametersItemMap, ) as any as S.Schema; export type OperationsGetResponseSchemasLearnedRequestBodyMap = { [key: string]: unknown | undefined; }; export const OperationsGetResponseSchemasLearnedRequestBodyMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface OperationsGetResponseSchemasLearned { /** OpenAPI parameter objects describing path, query, header, or cookie parameters. */ parameters?: OperationsGetResponseSchemasLearnedParametersList | null; /** OpenAPI request body object describing the expected request payload. */ requestBody?: OperationsGetResponseSchemasLearnedRequestBodyMap | null; } export const OperationsGetResponseSchemasLearned = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: S.optional( S.NullOr(OperationsGetResponseSchemasLearnedParametersList), ), requestBody: S.optional( S.NullOr(OperationsGetResponseSchemasLearnedRequestBodyMap), ), }), ).annotate({ identifier: "OperationsGetResponseSchemasLearned", }) as any as S.Schema; export type OperationsGetResponseSchemasUploadedParametersItemMap = { [key: string]: unknown | undefined; }; export const OperationsGetResponseSchemasUploadedParametersItemMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export type OperationsGetResponseSchemasUploadedParametersList = Array; export const OperationsGetResponseSchemasUploadedParametersList = /*@__PURE__*/ S.Array( OperationsGetResponseSchemasUploadedParametersItemMap, ) as any as S.Schema; export type OperationsGetResponseSchemasUploadedRequestBodyMap = { [key: string]: unknown | undefined; }; export const OperationsGetResponseSchemasUploadedRequestBodyMap = /*@__PURE__*/ S.Record( S.String, S.Unknown, ) as any as S.Schema; export interface OperationsGetResponseSchemasUploaded { /** OpenAPI parameter objects describing path, query, header, or cookie parameters. */ parameters?: OperationsGetResponseSchemasUploadedParametersList | null; /** OpenAPI request body object describing the expected request payload. */ requestBody?: OperationsGetResponseSchemasUploadedRequestBodyMap | null; } export const OperationsGetResponseSchemasUploaded = /*@__PURE__*/ S.suspend( () => S.Struct({ parameters: S.optional( S.NullOr(OperationsGetResponseSchemasUploadedParametersList), ), requestBody: S.optional( S.NullOr(OperationsGetResponseSchemasUploadedRequestBodyMap), ), }), ).annotate({ identifier: "OperationsGetResponseSchemasUploaded", }) as any as S.Schema; export interface OperationsGetResponseSchemas { /** An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension. */ learned?: OperationsGetResponseSchemasLearned | null; /** An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension. */ uploaded?: OperationsGetResponseSchemasUploaded | null; } export const OperationsGetResponseSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ learned: S.optional(S.NullOr(OperationsGetResponseSchemasLearned)), uploaded: S.optional(S.NullOr(OperationsGetResponseSchemasUploaded)), }), ).annotate({ identifier: "OperationsGetResponseSchemas", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetOperationResponse { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsGetResponseMethod; /** UUID. */ operationId: string; features?: OperationsGetResponseFeatures | null; /** OpenAPI JSON schemas for an operation, including both user-uploaded and Cloudflare-learned schemas. */ schemas?: OperationsGetResponseSchemas | null; } export const GetOperationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsGetResponseMethod, operationId: S.String.pipe(T.Body("operation_id")), features: S.optional(S.NullOr(OperationsGetResponseFeatures)), schemas: S.optional(S.NullOr(OperationsGetResponseSchemas)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOperationResponse", }) as any as S.Schema; export interface GetOperationSchemaValidationRequest { /** Identifier. */ zoneId: string; /** UUID. */ operationId: string; } export const GetOperationSchemaValidationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), operationId: S.String.pipe(T.Label("operation_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOperationSchemaValidationRequest", }) as any as S.Schema; export type OperationsSchemaValidationGetResponseMitigationAction = | "log" | "block" | "none"; export const OperationsSchemaValidationGetResponseMitigationAction = /*@__PURE__*/ S.String; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface GetOperationSchemaValidationResponse { /** When set, this applies a mitigation action to this operation */ mitigationAction?: OperationsSchemaValidationGetResponseMitigationAction | null; /** UUID. */ operationId?: string | null; } export const GetOperationSchemaValidationResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ mitigationAction: S.optional( S.NullOr(OperationsSchemaValidationGetResponseMitigationAction).pipe( T.Body("mitigation_action"), ), ), operationId: S.optional(S.NullOr(S.String).pipe(T.Body("operation_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetOperationSchemaValidationResponse", }) as any as S.Schema; export interface GetSettingSchemaValidationRequest { /** Identifier. */ zoneId: string; } export const GetSettingSchemaValidationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/settings/schema_validation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingSchemaValidationRequest", }) as any as S.Schema; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface GetSettingSchemaValidationResponse {} export const GetSettingSchemaValidationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingSchemaValidationResponse", }) as any as S.Schema; export interface GetUserSchemaRequest { /** Identifier. */ zoneId: string; schemaId: string; /** Omit the source-files of schemas and only retrieve their meta-data. */ omitSource?: boolean; } export const GetUserSchemaRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), schemaId: S.String.pipe(T.Label("schema_id")), omitSource: S.optional(S.Boolean.pipe(T.Query("omit_source"))), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/user_schemas/{schema_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUserSchemaRequest", }) as any as S.Schema; export type UserSchemasGetResponseKind = "openapi_v3"; export const UserSchemasGetResponseKind = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetUserSchemaResponse { createdAt: string; /** Kind of schema */ kind: UserSchemasGetResponseKind; /** Name of the schema */ name: string; /** UUID. */ schemaId: string; /** Source of the schema */ source?: string | null; /** Flag whether schema is enabled for validation. */ validationEnabled?: boolean | null; } export const GetUserSchemaResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), kind: UserSchemasGetResponseKind, name: S.String, schemaId: S.String.pipe(T.Body("schema_id")), source: S.optional(S.NullOr(S.String)), validationEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("validation_enabled")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetUserSchemaResponse", }) as any as S.Schema; export type DiscoveryOperationsListRequestDirection = "asc" | "desc"; export const DiscoveryOperationsListRequestDirection = /*@__PURE__*/ S.String; export type DiscoveryOperationsListRequestHostList = Array; export const DiscoveryOperationsListRequestHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DiscoveryOperationsListRequestMethodList = Array; export const DiscoveryOperationsListRequestMethodList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type DiscoveryOperationsListRequestOrder = | "host" | "method" | "endpoint" | "traffic_stats.requests" | "traffic_stats.last_updated"; export const DiscoveryOperationsListRequestOrder = /*@__PURE__*/ S.String; export type DiscoveryOperationsListRequestOrigin = | "ML" | "SessionIdentifier" | "LabelDiscovery"; export const DiscoveryOperationsListRequestOrigin = /*@__PURE__*/ S.String; export type DiscoveryOperationsListRequestState = | "review" | "saved" | "ignored"; export const DiscoveryOperationsListRequestState = /*@__PURE__*/ S.String; export interface ListDiscoveryOperationsRequest { /** Identifier. */ zoneId: string; /** When `true`, only return API Discovery results that are not saved into API Shield Endpoint Management */ diff?: boolean; /** Direction to order results. */ direction?: DiscoveryOperationsListRequestDirection | (string & {}); /** Filter results to only include endpoints containing this pattern. */ endpoint?: string; /** Filter results to only include the specified hosts. */ host?: DiscoveryOperationsListRequestHostList; /** Filter results to only include the specified HTTP methods. */ method?: DiscoveryOperationsListRequestMethodList; /** Field to order by */ order?: DiscoveryOperationsListRequestOrder | (string & {}); /** Filter results to only include discovery results sourced from a particular discovery engine */ origin?: DiscoveryOperationsListRequestOrigin | (string & {}); /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; /** Filter results to only include discovery results in a particular state. States are as follows */ state?: DiscoveryOperationsListRequestState | (string & {}); } export const ListDiscoveryOperationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), diff: S.optional(S.Boolean.pipe(T.Query())), direction: S.optional( DiscoveryOperationsListRequestDirection.pipe(T.Query()), ), endpoint: S.optional(S.String.pipe(T.Query())), host: S.optional(DiscoveryOperationsListRequestHostList.pipe(T.Query())), method: S.optional( DiscoveryOperationsListRequestMethodList.pipe(T.Query()), ), order: S.optional(DiscoveryOperationsListRequestOrder.pipe(T.Query())), origin: S.optional(DiscoveryOperationsListRequestOrigin.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), state: S.optional(DiscoveryOperationsListRequestState.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/discovery/operations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDiscoveryOperationsRequest", }) as any as S.Schema; export type DiscoveryOperationsListResultItemMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const DiscoveryOperationsListResultItemMethod = /*@__PURE__*/ S.String; export type DiscoveryOperationsListResultItemOriginItem = | "ML" | "SessionIdentifier" | "LabelDiscovery"; export const DiscoveryOperationsListResultItemOriginItem = /*@__PURE__*/ S.String; export type DiscoveryOperationsListResultItemOriginList = Array; export const DiscoveryOperationsListResultItemOriginList = /*@__PURE__*/ S.Array( DiscoveryOperationsListResultItemOriginItem, ) as any as S.Schema; export type DiscoveryOperationsListResultItemState = | "review" | "saved" | "ignored"; export const DiscoveryOperationsListResultItemState = /*@__PURE__*/ S.String; export interface DiscoveryOperationsListResultItemFeaturesTrafficStats { lastUpdated: string; /** The period in seconds these statistics were computed over */ periodSeconds: number; /** The average number of requests seen during this period */ requests: number; } export const DiscoveryOperationsListResultItemFeaturesTrafficStats = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.String.pipe(T.Body("last_updated")), periodSeconds: S.Number.pipe(T.Body("period_seconds")), requests: S.Number, }), ).annotate({ identifier: "DiscoveryOperationsListResultItemFeaturesTrafficStats", }) as any as S.Schema; export interface DiscoveryOperationsListResultItemFeatures { trafficStats?: DiscoveryOperationsListResultItemFeaturesTrafficStats | null; } export const DiscoveryOperationsListResultItemFeatures = /*@__PURE__*/ S.suspend(() => S.Struct({ trafficStats: S.optional( S.NullOr(DiscoveryOperationsListResultItemFeaturesTrafficStats).pipe( T.Body("traffic_stats"), ), ), }), ).annotate({ identifier: "DiscoveryOperationsListResultItemFeatures", }) as any as S.Schema; export interface DiscoveryOperationsListResultItem { /** UUID. */ id: string; /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: DiscoveryOperationsListResultItemMethod; /** API discovery engine(s) that discovered this operation */ origin: DiscoveryOperationsListResultItemOriginList; /** State of operation in API Discovery */ state: DiscoveryOperationsListResultItemState; features?: DiscoveryOperationsListResultItemFeatures | null; } export const DiscoveryOperationsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: DiscoveryOperationsListResultItemMethod, origin: DiscoveryOperationsListResultItemOriginList, state: DiscoveryOperationsListResultItemState, features: S.optional(S.NullOr(DiscoveryOperationsListResultItemFeatures)), }), ).annotate({ identifier: "DiscoveryOperationsListResultItem", }) as any as S.Schema; export type DiscoveryOperationsListResultList = Array; export const DiscoveryOperationsListResultList = /*@__PURE__*/ S.Array( DiscoveryOperationsListResultItem, ) as any as S.Schema; export interface ListDiscoveryOperationsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: DiscoveryOperationsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListDiscoveryOperationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: DiscoveryOperationsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListDiscoveryOperationsResponse", }) as any as S.Schema; export type LabelsListRequestDirection = "asc" | "desc"; export const LabelsListRequestDirection = /*@__PURE__*/ S.String; export type LabelsListRequestOrder = | "name" | "description" | "created_at" | "last_updated" | "mapped_resources.operations"; export const LabelsListRequestOrder = /*@__PURE__*/ S.String; export type LabelsListRequestSource = "user" | "managed"; export const LabelsListRequestSource = /*@__PURE__*/ S.String; export interface ListLabelsRequest { /** Identifier. */ zoneId: string; /** Direction to order results. */ direction?: LabelsListRequestDirection | (string & {}); /** Filter for labels where the name or description matches using substring match */ filter?: string; /** Field to order by */ order?: LabelsListRequestOrder | (string & {}); /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; /** Filter for labels with source */ source?: LabelsListRequestSource | (string & {}); /** Include `mapped_resources` for each label */ withMappedResourceCounts?: boolean; } export const ListLabelsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), direction: S.optional(LabelsListRequestDirection.pipe(T.Query())), filter: S.optional(S.String.pipe(T.Query())), order: S.optional(LabelsListRequestOrder.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), source: S.optional(LabelsListRequestSource.pipe(T.Query())), withMappedResourceCounts: S.optional( S.Boolean.pipe(T.Query("with_mapped_resource_counts")), ), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/labels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListLabelsRequest", }) as any as S.Schema; export type LabelsListResultItemSource = "user" | "managed"; export const LabelsListResultItemSource = /*@__PURE__*/ S.String; export interface LabelsListResultItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsListResultItemSource; /** Provides counts of what resources are linked to this label */ mappedResources?: unknown | null; } export const LabelsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsListResultItemSource, mappedResources: S.optional( S.NullOr(S.Unknown).pipe(T.Body("mapped_resources")), ), }), ).annotate({ identifier: "LabelsListResultItem", }) as any as S.Schema; export type LabelsListResultList = Array; export const LabelsListResultList = /*@__PURE__*/ S.Array( LabelsListResultItem, ) as any as S.Schema; export interface ListLabelsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: LabelsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListLabelsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: LabelsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListLabelsResponse", }) as any as S.Schema; export type OperationsListRequestDirection = "asc" | "desc"; export const OperationsListRequestDirection = /*@__PURE__*/ S.String; export type OperationsListRequestFeature = | "thresholds" | "parameter_schemas" | "schema_info"; export const OperationsListRequestFeature = /*@__PURE__*/ S.String; export type OperationsListRequestFeatureList = Array< OperationsListRequestFeature | (string & {}) >; export const OperationsListRequestFeatureList = /*@__PURE__*/ S.Array( OperationsListRequestFeature, ) as any as S.Schema; export type OperationsListRequestHostList = Array; export const OperationsListRequestHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OperationsListRequestMethodList = Array; export const OperationsListRequestMethodList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OperationsListRequestOrder = | "method" | "host" | "endpoint" | "thresholds.$key"; export const OperationsListRequestOrder = /*@__PURE__*/ S.String; export interface ListOperationsRequest { /** Identifier. */ zoneId: string; /** Direction to order results. */ direction?: OperationsListRequestDirection | (string & {}); /** Filter results to only include endpoints containing this pattern. */ endpoint?: string; /** Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. */ feature?: OperationsListRequestFeatureList; /** Filter results to only include the specified hosts. */ host?: OperationsListRequestHostList; /** Filter results to only include the specified HTTP methods. */ method?: OperationsListRequestMethodList; /** Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., `thresholds.suggested_threshold`. */ order?: OperationsListRequestOrder | (string & {}); /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; } export const ListOperationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), direction: S.optional(OperationsListRequestDirection.pipe(T.Query())), endpoint: S.optional(S.String.pipe(T.Query())), feature: S.optional(OperationsListRequestFeatureList.pipe(T.Query())), host: S.optional(OperationsListRequestHostList.pipe(T.Query())), method: S.optional(OperationsListRequestMethodList.pipe(T.Query())), order: S.optional(OperationsListRequestOrder.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/operations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOperationsRequest", }) as any as S.Schema; export type OperationsListResultItemMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsListResultItemMethod = /*@__PURE__*/ S.String; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = Array; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas { /** An array containing the learned parameter schemas. */ parameters?: OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList | null; /** An empty response object. This field is required to yield a valid operation schema. */ responses?: unknown | null; } export const OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: S.optional( S.NullOr( OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList, ), ), responses: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas { lastUpdated?: string | null; /** An operation schema object containing a response. */ parameterSchemas?: OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas | null; } export const OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), parameterSchemas: S.optional( S.NullOr( OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas, ).pipe(T.Body("parameter_schemas")), ), }), ).annotate({ identifier: "OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", }) as any as S.Schema; export interface OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemas { parameterSchemas: OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas; } export const OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameterSchemas: OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas.pipe( T.Body("parameter_schemas"), ), }), ).annotate({ identifier: "OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemas", }) as any as S.Schema; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export type OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = | "none" | "log" | "block"; export const OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = /*@__PURE__*/ S.String; export interface OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo { /** Schema active on endpoint. */ activeSchema?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema | null; /** True if a Cloudflare-provided learned schema is available for this endpoint. */ learnedAvailable?: boolean | null; /** Action taken on requests failing validation. */ mitigationAction?: OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction | null; } export const OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ activeSchema: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema, ).pipe(T.Body("active_schema")), ), learnedAvailable: S.optional( S.NullOr(S.Boolean).pipe(T.Body("learned_available")), ), mitigationAction: S.optional( S.NullOr( OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction, ).pipe(T.Body("mitigation_action")), ), }), ).annotate({ identifier: "OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", }) as any as S.Schema; export interface OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfo { schemaInfo?: OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo | null; } export const OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ schemaInfo: S.optional( S.NullOr( OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo, ).pipe(T.Body("schema_info")), ), }), ).annotate({ identifier: "OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfo", }) as any as S.Schema; export type OperationsListResultItemFeatures = | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds | OperationsListResultItemFeaturesAPIShieldOperationFeatureParameterSchemas | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals | OperationsListResultItemFeaturesAPIShieldOperationFeatureSchemaInfo; export const OperationsListResultItemFeatures = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["thresholds"], ["parameterSchemas"], ["apiRouting"], ["confidenceIntervals"], ["schemaInfo"], ]), ); export interface OperationsListResultItem { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsListResultItemMethod; /** UUID. */ operationId: string; features?: OperationsListResultItemFeatures | null; } export const OperationsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsListResultItemMethod, operationId: S.String.pipe(T.Body("operation_id")), features: S.optional(S.NullOr(OperationsListResultItemFeatures)), }), ).annotate({ identifier: "OperationsListResultItem", }) as any as S.Schema; export type OperationsListResultList = Array; export const OperationsListResultList = /*@__PURE__*/ S.Array( OperationsListResultItem, ) as any as S.Schema; export interface ListOperationsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: OperationsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListOperationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: OperationsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListOperationsResponse", }) as any as S.Schema; export type SchemasListRequestFeature = | "thresholds" | "parameter_schemas" | "schema_info"; export const SchemasListRequestFeature = /*@__PURE__*/ S.String; export type SchemasListRequestFeatureList = Array< SchemasListRequestFeature | (string & {}) >; export const SchemasListRequestFeatureList = /*@__PURE__*/ S.Array( SchemasListRequestFeature, ) as any as S.Schema; export type SchemasListRequestHostList = Array; export const SchemasListRequestHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ListSchemasRequest { /** Identifier. */ zoneId: string; /** Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. */ feature?: SchemasListRequestFeatureList; /** Receive schema only for the given host(s). */ host?: SchemasListRequestHostList; } export const ListSchemasRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), feature: S.optional(SchemasListRequestFeatureList.pipe(T.Query())), host: S.optional(SchemasListRequestHostList.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/schemas", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSchemasRequest", }) as any as S.Schema; export type SchemasListResponseSchemasList = Array; export const SchemasListResponseSchemasList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListSchemasResponse { schemas?: SchemasListResponseSchemasList | null; timestamp?: string | null; } export const ListSchemasResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ schemas: S.optional(S.NullOr(SchemasListResponseSchemasList)), timestamp: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSchemasResponse", }) as any as S.Schema; export interface ListUserSchemaHostsRequest { /** Identifier. */ zoneId: string; /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; } export const ListUserSchemaHostsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_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: "/zones/{zone_id}/api_gateway/user_schemas/hosts", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserSchemaHostsRequest", }) as any as S.Schema; export type UserSchemasHostsListResultItemHostsList = Array; export const UserSchemasHostsListResultItemHostsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UserSchemasHostsListResultItem { createdAt: string; /** Hosts serving the schema, e.g zone.host.com */ hosts: UserSchemasHostsListResultItemHostsList; /** Name of the schema */ name: string; /** UUID. */ schemaId: string; } export const UserSchemasHostsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), hosts: UserSchemasHostsListResultItemHostsList, name: S.String, schemaId: S.String.pipe(T.Body("schema_id")), }), ).annotate({ identifier: "UserSchemasHostsListResultItem", }) as any as S.Schema; export type UserSchemasHostsListResultList = Array; export const UserSchemasHostsListResultList = /*@__PURE__*/ S.Array( UserSchemasHostsListResultItem, ) as any as S.Schema; export interface ListUserSchemaHostsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: UserSchemasHostsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListUserSchemaHostsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: UserSchemasHostsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserSchemaHostsResponse", }) as any as S.Schema; export type UserSchemasOperationsListRequestFeature = | "thresholds" | "parameter_schemas" | "schema_info"; export const UserSchemasOperationsListRequestFeature = /*@__PURE__*/ S.String; export type UserSchemasOperationsListRequestFeatureList = Array< UserSchemasOperationsListRequestFeature | (string & {}) >; export const UserSchemasOperationsListRequestFeatureList = /*@__PURE__*/ S.Array( UserSchemasOperationsListRequestFeature, ) as any as S.Schema; export type UserSchemasOperationsListRequestHostList = Array; export const UserSchemasOperationsListRequestHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UserSchemasOperationsListRequestMethodList = Array; export const UserSchemasOperationsListRequestMethodList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UserSchemasOperationsListRequestOperationStatus = | "new" | "existing"; export const UserSchemasOperationsListRequestOperationStatus = /*@__PURE__*/ S.String; export interface ListUserSchemaOperationsRequest { /** Identifier. */ zoneId: string; schemaId: string; /** Filter results to only include endpoints containing this pattern. */ endpoint?: string; /** Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. */ feature?: UserSchemasOperationsListRequestFeatureList; /** Filter results to only include the specified hosts. */ host?: UserSchemasOperationsListRequestHostList; /** Filter results to only include the specified HTTP methods. */ method?: UserSchemasOperationsListRequestMethodList; /** Filter results by whether operations exist in API Shield Endpoint Management or not. `new` will just return operations from the schema that do not exist in API Shield Endpoint Management. `existing` will just return operations from the schema that already exist in API Shield Endpoint Management. */ operationStatus?: | UserSchemasOperationsListRequestOperationStatus | (string & {}); /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; } export const ListUserSchemaOperationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), schemaId: S.String.pipe(T.Label("schema_id")), endpoint: S.optional(S.String.pipe(T.Query())), feature: S.optional( UserSchemasOperationsListRequestFeatureList.pipe(T.Query()), ), host: S.optional(UserSchemasOperationsListRequestHostList.pipe(T.Query())), method: S.optional( UserSchemasOperationsListRequestMethodList.pipe(T.Query()), ), operationStatus: S.optional( UserSchemasOperationsListRequestOperationStatus.pipe( T.Query("operation_status"), ), ), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserSchemaOperationsRequest", }) as any as S.Schema; export type UserSchemasOperationsListResultItemAPIShieldOperationMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const UserSchemasOperationsListResultItemAPIShieldOperationMethod = /*@__PURE__*/ S.String; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholdsThresholds; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = Array; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas { /** An array containing the learned parameter schemas. */ parameters?: UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList | null; /** An empty response object. This field is required to yield a valid operation schema. */ responses?: unknown | null; } export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameters: S.optional( S.NullOr( UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasParametersList, ), ), responses: S.optional(S.NullOr(S.Unknown)), }), ).annotate({ identifier: "UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas", }) as any as S.Schema; export interface UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas { lastUpdated?: string | null; /** An operation schema object containing a response. */ parameterSchemas?: UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas | null; } export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), parameterSchemas: S.optional( S.NullOr( UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas, ).pipe(T.Body("parameter_schemas")), ), }), ).annotate({ identifier: "UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas", }) as any as S.Schema; export interface UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas { parameterSchemas: UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas; } export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas = /*@__PURE__*/ S.suspend(() => S.Struct({ parameterSchemas: UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas.pipe( T.Body("parameter_schemas"), ), }), ).annotate({ identifier: "UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas", }) as any as S.Schema; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRoutingApiRouting; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema = OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema; export type UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = | "none" | "log" | "block"; export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = /*@__PURE__*/ S.String; export interface UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo { /** Schema active on endpoint. */ activeSchema?: OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema | null; /** True if a Cloudflare-provided learned schema is available for this endpoint. */ learnedAvailable?: boolean | null; /** Action taken on requests failing validation. */ mitigationAction?: UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction | null; } export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ activeSchema: S.optional( S.NullOr( OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema, ).pipe(T.Body("active_schema")), ), learnedAvailable: S.optional( S.NullOr(S.Boolean).pipe(T.Body("learned_available")), ), mitigationAction: S.optional( S.NullOr( UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction, ).pipe(T.Body("mitigation_action")), ), }), ).annotate({ identifier: "UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo", }) as any as S.Schema; export interface UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo { schemaInfo?: UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo | null; } export const UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ schemaInfo: S.optional( S.NullOr( UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo, ).pipe(T.Body("schema_info")), ), }), ).annotate({ identifier: "UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo", }) as any as S.Schema; export type UserSchemasOperationsListResultItemAPIShieldOperationFeatures = | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureThresholds | UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureAPIRouting | OperationsBulkCreateResultItemFeaturesAPIShieldOperationFeatureConfidenceIntervals | UserSchemasOperationsListResultItemAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo; export const UserSchemasOperationsListResultItemAPIShieldOperationFeatures = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["thresholds"], ["parameterSchemas"], ["apiRouting"], ["confidenceIntervals"], ["schemaInfo"], ]), ); export interface UserSchemasOperationsListResultItemAPIShieldOperation { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: UserSchemasOperationsListResultItemAPIShieldOperationMethod; /** UUID. */ operationId: string; features?: UserSchemasOperationsListResultItemAPIShieldOperationFeatures | null; } export const UserSchemasOperationsListResultItemAPIShieldOperation = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: UserSchemasOperationsListResultItemAPIShieldOperationMethod, operationId: S.String.pipe(T.Body("operation_id")), features: S.optional( S.NullOr(UserSchemasOperationsListResultItemAPIShieldOperationFeatures), ), }), ).annotate({ identifier: "UserSchemasOperationsListResultItemAPIShieldOperation", }) as any as S.Schema; export type UserSchemasOperationsListResultItemAPIShieldBasicOperationMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const UserSchemasOperationsListResultItemAPIShieldBasicOperationMethod = /*@__PURE__*/ S.String; export interface UserSchemasOperationsListResultItemAPIShieldBasicOperation { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; /** The HTTP method used to access the endpoint. */ method: UserSchemasOperationsListResultItemAPIShieldBasicOperationMethod; } export const UserSchemasOperationsListResultItemAPIShieldBasicOperation = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, method: UserSchemasOperationsListResultItemAPIShieldBasicOperationMethod, }), ).annotate({ identifier: "UserSchemasOperationsListResultItemAPIShieldBasicOperation", }) as any as S.Schema; export type UserSchemasOperationsListResultItem = | UserSchemasOperationsListResultItemAPIShieldOperation | UserSchemasOperationsListResultItemAPIShieldBasicOperation; export const UserSchemasOperationsListResultItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["endpoint", "host", "lastUpdated", "method", "operationId", "features"], ["endpoint", "host", "method"], ]), ); export type UserSchemasOperationsListResultList = Array; export const UserSchemasOperationsListResultList = /*@__PURE__*/ S.Array( UserSchemasOperationsListResultItem, ) as any as S.Schema; export interface ListUserSchemaOperationsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: UserSchemasOperationsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListUserSchemaOperationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: UserSchemasOperationsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserSchemaOperationsResponse", }) as any as S.Schema; export interface ListUserSchemasRequest { /** Identifier. */ zoneId: string; /** Omit the source-files of schemas and only retrieve their meta-data. */ omitSource?: boolean; /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; /** Flag whether schema is enabled for validation. */ validationEnabled?: boolean; } export const ListUserSchemasRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), omitSource: S.optional(S.Boolean.pipe(T.Query("omit_source"))), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), validationEnabled: S.optional( S.Boolean.pipe(T.Query("validation_enabled")), ), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/api_gateway/user_schemas", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserSchemasRequest", }) as any as S.Schema; export type UserSchemasListResultItemKind = "openapi_v3"; export const UserSchemasListResultItemKind = /*@__PURE__*/ S.String; export interface UserSchemasListResultItem { createdAt: string; /** Kind of schema */ kind: UserSchemasListResultItemKind; /** Name of the schema */ name: string; /** UUID. */ schemaId: string; /** Source of the schema */ source?: string | null; /** Flag whether schema is enabled for validation. */ validationEnabled?: boolean | null; } export const UserSchemasListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), kind: UserSchemasListResultItemKind, name: S.String, schemaId: S.String.pipe(T.Body("schema_id")), source: S.optional(S.NullOr(S.String)), validationEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("validation_enabled")), ), }), ).annotate({ identifier: "UserSchemasListResultItem", }) as any as S.Schema; export type UserSchemasListResultList = Array; export const UserSchemasListResultList = /*@__PURE__*/ S.Array( UserSchemasListResultItem, ) as any as S.Schema; export interface ListUserSchemasResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: UserSchemasListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListUserSchemasResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: UserSchemasListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListUserSchemasResponse", }) as any as S.Schema; export interface PatchLabelUserRequest { /** Identifier. */ zoneId: string; /** The name of the label */ name: string; /** The description of the label */ description?: string; /** Metadata for the label */ metadata?: unknown; } export const PatchLabelUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String.pipe(T.Label()), description: S.optional(S.String), metadata: S.optional(S.Unknown), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/api_gateway/labels/user/{name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchLabelUserRequest", }) as any as S.Schema; export type LabelsUserEditResponseSource = "user" | "managed"; export const LabelsUserEditResponseSource = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchLabelUserResponse { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsUserEditResponseSource; } export const PatchLabelUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsUserEditResponseSource, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchLabelUserResponse", }) as any as S.Schema; export type OperationsSchemaValidationEditRequestSettingsMultipleRequestMitigationAction = | "log" | "block" | "none"; export const OperationsSchemaValidationEditRequestSettingsMultipleRequestMitigationAction = /*@__PURE__*/ S.String; export interface OperationsSchemaValidationEditRequestSettingsMultipleRequest { /** When set, this applies a mitigation action to this operation */ mitigationAction?: | OperationsSchemaValidationEditRequestSettingsMultipleRequestMitigationAction | (string & {}); } export const OperationsSchemaValidationEditRequestSettingsMultipleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ mitigationAction: S.optional( OperationsSchemaValidationEditRequestSettingsMultipleRequestMitigationAction.pipe( T.Body("mitigation_action"), ), ), }), ).annotate({ identifier: "OperationsSchemaValidationEditRequestSettingsMultipleRequest", }) as any as S.Schema; export interface PatchOperationSchemaValidationRequest { /** Identifier. */ zoneId: string; settingsMultipleRequest: OperationsSchemaValidationEditRequestSettingsMultipleRequest; } export const PatchOperationSchemaValidationRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), settingsMultipleRequest: OperationsSchemaValidationEditRequestSettingsMultipleRequest.pipe( T.Body("settings_multiple_request"), ), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/api_gateway/operations/schema_validation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchOperationSchemaValidationRequest", }) as any as S.Schema; export type OperationsSchemaValidationEditResponseMitigationAction = | "log" | "block" | "none"; export const OperationsSchemaValidationEditResponseMitigationAction = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchOperationSchemaValidationResponse { /** When set, this applies a mitigation action to this operation */ mitigationAction?: OperationsSchemaValidationEditResponseMitigationAction | null; } export const PatchOperationSchemaValidationResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ mitigationAction: S.optional( S.NullOr(OperationsSchemaValidationEditResponseMitigationAction).pipe( T.Body("mitigation_action"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchOperationSchemaValidationResponse", }) as any as S.Schema; export type SettingsSchemaValidationEditRequestValidationDefaultMitigationAction = | "none" | "log" | "block"; export const SettingsSchemaValidationEditRequestValidationDefaultMitigationAction = /*@__PURE__*/ S.String; export type SettingsSchemaValidationEditRequestValidationOverrideMitigationAction = | "none" | "disable_override"; export const SettingsSchemaValidationEditRequestValidationOverrideMitigationAction = /*@__PURE__*/ S.String; export interface PatchSettingSchemaValidationRequest { /** Identifier. */ zoneId: string; /** The default mitigation action used when there is no mitigation action defined on the operation */ validationDefaultMitigationAction?: | SettingsSchemaValidationEditRequestValidationDefaultMitigationAction | (string & {}); /** When set, this overrides both zone level and operation level mitigation actions. */ validationOverrideMitigationAction?: | SettingsSchemaValidationEditRequestValidationOverrideMitigationAction | (string & {}); } export const PatchSettingSchemaValidationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), validationDefaultMitigationAction: S.optional( SettingsSchemaValidationEditRequestValidationDefaultMitigationAction.pipe( T.Body("validation_default_mitigation_action"), ), ), validationOverrideMitigationAction: S.optional( SettingsSchemaValidationEditRequestValidationOverrideMitigationAction.pipe( T.Body("validation_override_mitigation_action"), ), ), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/api_gateway/settings/schema_validation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingSchemaValidationRequest", }) as any as S.Schema; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface PatchSettingSchemaValidationResponse {} export const PatchSettingSchemaValidationResponse = /*@__PURE__*/ S.suspend( () => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingSchemaValidationResponse", }) as any as S.Schema; export interface PatchUserSchemaRequest { /** Identifier. */ zoneId: string; schemaId: string; /** Flag whether schema is enabled for validation. */ validationEnabled?: boolean; } export const PatchUserSchemaRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), schemaId: S.String.pipe(T.Label("schema_id")), validationEnabled: S.optional(S.Boolean.pipe(T.Body("validation_enabled"))), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/api_gateway/user_schemas/{schema_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchUserSchemaRequest", }) as any as S.Schema; export type UserSchemasEditResponseKind = "openapi_v3"; export const UserSchemasEditResponseKind = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchUserSchemaResponse { createdAt: string; /** Kind of schema */ kind: UserSchemasEditResponseKind; /** Name of the schema */ name: string; /** UUID. */ schemaId: string; /** Source of the schema */ source?: string | null; /** Flag whether schema is enabled for validation. */ validationEnabled?: boolean | null; } export const PatchUserSchemaResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), kind: UserSchemasEditResponseKind, name: S.String, schemaId: S.String.pipe(T.Body("schema_id")), source: S.optional(S.NullOr(S.String)), validationEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("validation_enabled")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchUserSchemaResponse", }) as any as S.Schema; export type ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType = | "header" | "cookie"; export const ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType = /*@__PURE__*/ S.String; export interface ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic { /** The name of the characteristic field, i.e., the header or cookie name. */ name: string; /** The type of characteristic. */ type: | ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType | (string & {}); } export const ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType, }), ).annotate({ identifier: "ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic", }) as any as S.Schema; export type ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType = "jwt"; export const ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType = /*@__PURE__*/ S.String; export interface ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim { /** Claim location expressed as `$(token_config_id):$(json_path)`, where `token_config_id` */ name: string; /** The type of characteristic. */ type: ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType; } export const ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType, }), ).annotate({ identifier: "ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim", }) as any as S.Schema; export type ConfigurationsUpdateRequestAuthIdCharacteristicsItem = | ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic | ConfigurationsUpdateRequestAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim; export const ConfigurationsUpdateRequestAuthIdCharacteristicsItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "type"], ["name", "type"], ]), ); export type ConfigurationsUpdateRequestAuthIdCharacteristicsList = Array; export const ConfigurationsUpdateRequestAuthIdCharacteristicsList = /*@__PURE__*/ S.Array( ConfigurationsUpdateRequestAuthIdCharacteristicsItem, ) as any as S.Schema; export interface PutConfigurationRequest { /** Identifier. */ zoneId: string; /** Ensures that the configuration is written or retrieved in normalized fashion */ normalize?: boolean; authIdCharacteristics: ConfigurationsUpdateRequestAuthIdCharacteristicsList; } export const PutConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), normalize: S.optional(S.Boolean.pipe(T.Query())), authIdCharacteristics: ConfigurationsUpdateRequestAuthIdCharacteristicsList.pipe( T.Body("auth_id_characteristics"), ), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/configuration", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutConfigurationRequest", }) as any as S.Schema; export type ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType = | "header" | "cookie"; export const ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType = /*@__PURE__*/ S.String; export interface ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic { /** The name of the characteristic field, i.e., the header or cookie name. */ name: string; /** The type of characteristic. */ type: ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType; } export const ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicType, }), ).annotate({ identifier: "ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic", }) as any as S.Schema; export type ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType = "jwt"; export const ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType = /*@__PURE__*/ S.String; export interface ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim { /** Claim location expressed as `$(token_config_id):$(json_path)`, where `token_config_id` */ name: string; /** The type of characteristic. */ type: ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType; } export const ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, type: ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaimType, }), ).annotate({ identifier: "ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim", }) as any as S.Schema; export type ConfigurationsUpdateResponseAuthIdCharacteristicsItem = | ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristic | ConfigurationsUpdateResponseAuthIdCharacteristicsItemAPIShieldAuthIDCharacteristicJWTClaim; export const ConfigurationsUpdateResponseAuthIdCharacteristicsItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["name", "type"], ["name", "type"], ]), ); export type ConfigurationsUpdateResponseAuthIdCharacteristicsList = Array; export const ConfigurationsUpdateResponseAuthIdCharacteristicsList = /*@__PURE__*/ S.Array( ConfigurationsUpdateResponseAuthIdCharacteristicsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutConfigurationResponse { authIdCharacteristics: ConfigurationsUpdateResponseAuthIdCharacteristicsList; } export const PutConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ authIdCharacteristics: ConfigurationsUpdateResponseAuthIdCharacteristicsList.pipe( T.Body("auth_id_characteristics"), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutConfigurationResponse", }) as any as S.Schema; export type LabelsManagedResourcesOperationUpdateRequestSelectorIncludeOperationIdsList = Array; export const LabelsManagedResourcesOperationUpdateRequestSelectorIncludeOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface LabelsManagedResourcesOperationUpdateRequestSelectorInclude { operationIds: LabelsManagedResourcesOperationUpdateRequestSelectorIncludeOperationIdsList; } export const LabelsManagedResourcesOperationUpdateRequestSelectorInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: LabelsManagedResourcesOperationUpdateRequestSelectorIncludeOperationIdsList.pipe( T.Body("operation_ids"), ), }), ).annotate({ identifier: "LabelsManagedResourcesOperationUpdateRequestSelectorInclude", }) as any as S.Schema; export interface LabelsManagedResourcesOperationUpdateRequestSelector { include: LabelsManagedResourcesOperationUpdateRequestSelectorInclude; } export const LabelsManagedResourcesOperationUpdateRequestSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ include: LabelsManagedResourcesOperationUpdateRequestSelectorInclude, }), ).annotate({ identifier: "LabelsManagedResourcesOperationUpdateRequestSelector", }) as any as S.Schema; export interface PutLabelManagedResourceOperationRequest { /** Identifier. */ zoneId: string; /** The name of the label */ name: string; /** Operation IDs selector */ selector: LabelsManagedResourcesOperationUpdateRequestSelector; } export const PutLabelManagedResourceOperationRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String.pipe(T.Label()), selector: LabelsManagedResourcesOperationUpdateRequestSelector, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/labels/managed/{name}/resources/operation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutLabelManagedResourceOperationRequest", }) as any as S.Schema; export type LabelsManagedResourcesOperationUpdateResponseSource = | "user" | "managed"; export const LabelsManagedResourcesOperationUpdateResponseSource = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutLabelManagedResourceOperationResponse { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsManagedResourcesOperationUpdateResponseSource; /** Provides counts of what resources are linked to this label */ mappedResources?: unknown | null; } export const PutLabelManagedResourceOperationResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsManagedResourcesOperationUpdateResponseSource, mappedResources: S.optional( S.NullOr(S.Unknown).pipe(T.Body("mapped_resources")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutLabelManagedResourceOperationResponse", }) as any as S.Schema; export interface PutLabelUserRequest { /** Identifier. */ zoneId: string; /** The name of the label */ name: string; /** The description of the label */ description?: string; /** Metadata for the label */ metadata?: unknown; } export const PutLabelUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String.pipe(T.Label()), description: S.optional(S.String), metadata: S.optional(S.Unknown), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/labels/user/{name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutLabelUserRequest", }) as any as S.Schema; export type LabelsUserUpdateResponseSource = "user" | "managed"; export const LabelsUserUpdateResponseSource = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutLabelUserResponse { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsUserUpdateResponseSource; } export const PutLabelUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsUserUpdateResponseSource, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutLabelUserResponse", }) as any as S.Schema; export type LabelsUserResourcesOperationUpdateRequestSelectorIncludeOperationIdsList = Array; export const LabelsUserResourcesOperationUpdateRequestSelectorIncludeOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface LabelsUserResourcesOperationUpdateRequestSelectorInclude { operationIds: LabelsUserResourcesOperationUpdateRequestSelectorIncludeOperationIdsList; } export const LabelsUserResourcesOperationUpdateRequestSelectorInclude = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: LabelsUserResourcesOperationUpdateRequestSelectorIncludeOperationIdsList.pipe( T.Body("operation_ids"), ), }), ).annotate({ identifier: "LabelsUserResourcesOperationUpdateRequestSelectorInclude", }) as any as S.Schema; export interface LabelsUserResourcesOperationUpdateRequestSelector { include: LabelsUserResourcesOperationUpdateRequestSelectorInclude; } export const LabelsUserResourcesOperationUpdateRequestSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ include: LabelsUserResourcesOperationUpdateRequestSelectorInclude, }), ).annotate({ identifier: "LabelsUserResourcesOperationUpdateRequestSelector", }) as any as S.Schema; export interface PutLabelUserResourceOperationRequest { /** Identifier. */ zoneId: string; /** The name of the label */ name: string; /** Operation IDs selector */ selector: LabelsUserResourcesOperationUpdateRequestSelector; } export const PutLabelUserResourceOperationRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String.pipe(T.Label()), selector: LabelsUserResourcesOperationUpdateRequestSelector, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/labels/user/{name}/resources/operation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutLabelUserResourceOperationRequest", }) as any as S.Schema; export type LabelsUserResourcesOperationUpdateResponseSource = | "user" | "managed"; export const LabelsUserResourcesOperationUpdateResponseSource = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutLabelUserResourceOperationResponse { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: LabelsUserResourcesOperationUpdateResponseSource; /** Provides counts of what resources are linked to this label */ mappedResources?: unknown | null; } export const PutLabelUserResourceOperationResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: LabelsUserResourcesOperationUpdateResponseSource, mappedResources: S.optional( S.NullOr(S.Unknown).pipe(T.Body("mapped_resources")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutLabelUserResourceOperationResponse", }) as any as S.Schema; export type OperationsSchemaValidationUpdateRequestMitigationAction = | "log" | "block" | "none"; export const OperationsSchemaValidationUpdateRequestMitigationAction = /*@__PURE__*/ S.String; export interface PutOperationSchemaValidationRequest { /** Identifier. */ zoneId: string; /** UUID. */ operationId: string; /** When set, this applies a mitigation action to this operation */ mitigationAction?: | OperationsSchemaValidationUpdateRequestMitigationAction | (string & {}); } export const PutOperationSchemaValidationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), operationId: S.String.pipe(T.Label("operation_id")), mitigationAction: S.optional( OperationsSchemaValidationUpdateRequestMitigationAction.pipe( T.Body("mitigation_action"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutOperationSchemaValidationRequest", }) as any as S.Schema; export type OperationsSchemaValidationUpdateResponseMitigationAction = | "log" | "block" | "none"; export const OperationsSchemaValidationUpdateResponseMitigationAction = /*@__PURE__*/ S.String; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface PutOperationSchemaValidationResponse { /** When set, this applies a mitigation action to this operation */ mitigationAction?: OperationsSchemaValidationUpdateResponseMitigationAction | null; /** UUID. */ operationId?: string | null; } export const PutOperationSchemaValidationResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ mitigationAction: S.optional( S.NullOr(OperationsSchemaValidationUpdateResponseMitigationAction).pipe( T.Body("mitigation_action"), ), ), operationId: S.optional(S.NullOr(S.String).pipe(T.Body("operation_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutOperationSchemaValidationResponse", }) as any as S.Schema; export type SettingsSchemaValidationUpdateRequestValidationDefaultMitigationAction = | "none" | "log" | "block"; export const SettingsSchemaValidationUpdateRequestValidationDefaultMitigationAction = /*@__PURE__*/ S.String; export type SettingsSchemaValidationUpdateRequestValidationOverrideMitigationAction = | "none" | "disable_override"; export const SettingsSchemaValidationUpdateRequestValidationOverrideMitigationAction = /*@__PURE__*/ S.String; export interface PutSettingSchemaValidationRequest { /** Identifier. */ zoneId: string; /** The default mitigation action used when there is no mitigation action defined on the operation */ validationDefaultMitigationAction: | SettingsSchemaValidationUpdateRequestValidationDefaultMitigationAction | (string & {}); /** When set, this overrides both zone level and operation level mitigation actions. */ validationOverrideMitigationAction?: | SettingsSchemaValidationUpdateRequestValidationOverrideMitigationAction | (string & {}); } export const PutSettingSchemaValidationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), validationDefaultMitigationAction: SettingsSchemaValidationUpdateRequestValidationDefaultMitigationAction.pipe( T.Body("validation_default_mitigation_action"), ), validationOverrideMitigationAction: S.optional( SettingsSchemaValidationUpdateRequestValidationOverrideMitigationAction.pipe( T.Body("validation_override_mitigation_action"), ), ), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/settings/schema_validation", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutSettingSchemaValidationRequest", }) as any as S.Schema; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface PutSettingSchemaValidationResponse {} export const PutSettingSchemaValidationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutSettingSchemaValidationResponse", }) as any as S.Schema; export type OperationsLabelsUpdateRequestManagedList = Array; export const OperationsLabelsUpdateRequestManagedList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type OperationsLabelsUpdateRequestUserList = Array; export const OperationsLabelsUpdateRequestUserList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface UpdateOperationLabelRequest { /** Identifier. */ zoneId: string; /** UUID. */ operationId: string; /** List of managed label names. Omitting this property or passing an empty array will result in all managed labels being removed from the operation */ managed?: OperationsLabelsUpdateRequestManagedList; /** List of user label names. Omitting this property or passing an empty array will result in all user labels being removed from the operation */ user?: OperationsLabelsUpdateRequestUserList; } export const UpdateOperationLabelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), operationId: S.String.pipe(T.Label("operation_id")), managed: S.optional(OperationsLabelsUpdateRequestManagedList), user: S.optional(OperationsLabelsUpdateRequestUserList), }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/api_gateway/operations/{operation_id}/labels", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateOperationLabelRequest", }) as any as S.Schema; export type OperationsLabelsUpdateResponseMethod = | "GET" | "POST" | "HEAD" | "OPTIONS" | "PUT" | "DELETE" | "CONNECT" | "PATCH" | "TRACE"; export const OperationsLabelsUpdateResponseMethod = /*@__PURE__*/ S.String; export type OperationsLabelsUpdateResponseLabelsItemSource = "user" | "managed"; export const OperationsLabelsUpdateResponseLabelsItemSource = /*@__PURE__*/ S.String; export interface OperationsLabelsUpdateResponseLabelsItem { createdAt: string; /** The description of the label */ description: string; lastUpdated: string; /** Metadata for the label */ metadata: unknown; /** The name of the label */ name: string; /** * `user` - label is owned by the user */ source: OperationsLabelsUpdateResponseLabelsItemSource; } export const OperationsLabelsUpdateResponseLabelsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ createdAt: S.String.pipe(T.Body("created_at")), description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), metadata: S.Unknown, name: S.String, source: OperationsLabelsUpdateResponseLabelsItemSource, }), ).annotate({ identifier: "OperationsLabelsUpdateResponseLabelsItem", }) as any as S.Schema; export type OperationsLabelsUpdateResponseLabelsList = Array; export const OperationsLabelsUpdateResponseLabelsList = /*@__PURE__*/ S.Array( OperationsLabelsUpdateResponseLabelsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateOperationLabelResponse { /** The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. */ endpoint: string; /** RFC3986-compliant host. */ host: string; lastUpdated: string; /** The HTTP method used to access the endpoint. */ method: OperationsLabelsUpdateResponseMethod; /** UUID. */ operationId: string; labels?: OperationsLabelsUpdateResponseLabelsList | null; } export const UpdateOperationLabelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ endpoint: S.String, host: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), method: OperationsLabelsUpdateResponseMethod, operationId: S.String.pipe(T.Body("operation_id")), labels: S.optional(S.NullOr(OperationsLabelsUpdateResponseLabelsList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateOperationLabelResponse", }) as any as S.Schema; export type BulkCreateLabelUsersError = | LabelAlreadyExists | Forbidden | CloudflareOpError; /** Create user labels */ export const bulkCreateLabelUsers: API.PaginatedOperationMethod< BulkCreateLabelUsersRequest, BulkCreateLabelUsersResponse, BulkCreateLabelUsersError, CloudflareOpContext, LabelsUserBulkCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkCreateLabelUsersRequest, output: BulkCreateLabelUsersResponse, errors: [ LabelAlreadyExists, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkCreateOperationLabelsError = CloudflareOpError; /** Bulk attach label(s) on operation(s) in endpoint management */ export const bulkCreateOperationLabels: API.PaginatedOperationMethod< BulkCreateOperationLabelsRequest, BulkCreateOperationLabelsResponse, BulkCreateOperationLabelsError, CloudflareOpContext, OperationsLabelsBulkCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkCreateOperationLabelsRequest, output: BulkCreateOperationLabelsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkCreateOperationsError = CloudflareOpError; /** Add one or more operations to a zone. Endpoints can contain path variables. Host, method, endpoint will be normalized to a canoncial form when creating an operation and must be unique on the zone. Inserting an operation that matches an existing one will return the record of the already existing operation and update its last_updated date. */ export const bulkCreateOperations: API.PaginatedOperationMethod< BulkCreateOperationsRequest, BulkCreateOperationsResponse, BulkCreateOperationsError, CloudflareOpContext, OperationsBulkCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkCreateOperationsRequest, output: BulkCreateOperationsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkDeleteLabelUsersError = CloudflareOpError; /** Delete user labels */ export const bulkDeleteLabelUsers: API.PaginatedOperationMethod< BulkDeleteLabelUsersRequest, BulkDeleteLabelUsersResponse, BulkDeleteLabelUsersError, CloudflareOpContext, LabelsUserBulkDeleteResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkDeleteLabelUsersRequest, output: BulkDeleteLabelUsersResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkDeleteOperationLabelsError = CloudflareOpError; /** Bulk remove label(s) on operation(s) in endpoint management */ export const bulkDeleteOperationLabels: API.PaginatedOperationMethod< BulkDeleteOperationLabelsRequest, BulkDeleteOperationLabelsResponse, BulkDeleteOperationLabelsError, CloudflareOpContext, OperationsLabelsBulkDeleteResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkDeleteOperationLabelsRequest, output: BulkDeleteOperationLabelsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkDeleteOperationsError = | InvalidObjectIdentifier | CloudflareOpError; /** Bulk removes multiple API operations from API Shield endpoint management in a single request. Efficient for cleaning up unused endpoints. */ export const bulkDeleteOperations: API.OperationMethod< BulkDeleteOperationsRequest, BulkDeleteOperationsResponse, BulkDeleteOperationsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkDeleteOperationsRequest, output: BulkDeleteOperationsResponse, errors: [InvalidObjectIdentifier, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkPatchDiscoveryOperationsError = | InvalidObjectIdentifier | NotEntitled | CloudflareOpError; /** Update the `state` on one or more discovered operations */ export const bulkPatchDiscoveryOperations: API.OperationMethod< BulkPatchDiscoveryOperationsRequest, BulkPatchDiscoveryOperationsResponse, BulkPatchDiscoveryOperationsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: BulkPatchDiscoveryOperationsRequest, output: BulkPatchDiscoveryOperationsResponse, errors: [ InvalidObjectIdentifier, NotEntitled, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type BulkUpdateOperationLabelsError = CloudflareOpError; /** Bulk replace label(s) on operation(s) in endpoint management */ export const bulkUpdateOperationLabels: API.PaginatedOperationMethod< BulkUpdateOperationLabelsRequest, BulkUpdateOperationLabelsResponse, BulkUpdateOperationLabelsError, CloudflareOpContext, OperationsLabelsBulkUpdateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkUpdateOperationLabelsRequest, output: BulkUpdateOperationLabelsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type CreateExpressionTemplateFallthroughError = | InvalidObjectIdentifier | CloudflareOpError; /** Creates an expression template fallthrough rule for API Shield. Used for configuring default behavior when no other expression templates match. */ export const createExpressionTemplateFallthrough: API.OperationMethod< CreateExpressionTemplateFallthroughRequest, CreateExpressionTemplateFallthroughResponse, CreateExpressionTemplateFallthroughError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateExpressionTemplateFallthroughRequest, output: CreateExpressionTemplateFallthroughResponse, errors: [InvalidObjectIdentifier, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateOperationError = | InvalidObjectIdentifier | Forbidden | CloudflareOpError; /** Add one operation to a zone. Endpoints can contain path variables. Host, method, endpoint will be normalized to a canoncial form when creating an operation and must be unique on the zone. Inserting an operation that matches an existing one will return the record of the already existing operation and update its last_updated date. */ export const createOperation: API.OperationMethod< CreateOperationRequest, CreateOperationResponse, CreateOperationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateOperationRequest, output: CreateOperationResponse, errors: [ InvalidObjectIdentifier, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateOperationLabelError = CloudflareOpError; /** Attach label(s) on an operation in endpoint management */ export const createOperationLabel: API.OperationMethod< CreateOperationLabelRequest, CreateOperationLabelResponse, CreateOperationLabelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateOperationLabelRequest, output: CreateOperationLabelResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateUserSchemaError = | InvalidObjectIdentifier | Forbidden | CloudflareOpError; /** Uploads a new OpenAPI schema for API Shield schema validation. The schema defines expected request/response formats for API endpoints. */ export const createUserSchema: API.OperationMethod< CreateUserSchemaRequest, CreateUserSchemaResponse, CreateUserSchemaError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateUserSchemaRequest, output: CreateUserSchemaResponse, errors: [ InvalidObjectIdentifier, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteLabelUserError = | LabelNotFound | Forbidden | CloudflareOpError; /** Delete user label */ export const deleteLabelUser: API.OperationMethod< DeleteLabelUserRequest, DeleteLabelUserResponse, DeleteLabelUserError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteLabelUserRequest, output: DeleteLabelUserResponse, errors: [LabelNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteOperationError = | InvalidObjectIdentifier | OperationNotFound | Forbidden | CloudflareOpError; /** Removes a single API operation from API Shield endpoint management. The operation will no longer be tracked or protected by API Shield rules. */ export const deleteOperation: API.OperationMethod< DeleteOperationRequest, DeleteOperationResponse, DeleteOperationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteOperationRequest, output: DeleteOperationResponse, errors: [ InvalidObjectIdentifier, OperationNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteOperationLabelError = CloudflareOpError; /** Remove label(s) on an operation in endpoint management */ export const deleteOperationLabel: API.OperationMethod< DeleteOperationLabelRequest, DeleteOperationLabelResponse, DeleteOperationLabelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteOperationLabelRequest, output: DeleteOperationLabelResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteUserSchemaError = | InvalidObjectIdentifier | SchemaNotFound | Forbidden | CloudflareOpError; /** Permanently removes an uploaded OpenAPI schema from API Shield schema validation. Operations using this schema will lose their validation rules. */ export const deleteUserSchema: API.OperationMethod< DeleteUserSchemaRequest, DeleteUserSchemaResponse, DeleteUserSchemaError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteUserSchemaRequest, output: DeleteUserSchemaResponse, errors: [ InvalidObjectIdentifier, SchemaNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetConfigurationError = | InvalidObjectIdentifier | NotEntitled | Forbidden | CloudflareOpError; /** Gets the current API Shield configuration settings for a zone, including validation behavior and enforcement mode. */ export const getConfiguration: API.OperationMethod< GetConfigurationRequest, GetConfigurationResponse, GetConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetConfigurationRequest, output: GetConfigurationResponse, errors: [ InvalidObjectIdentifier, NotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDiscoveryError = | InvalidObjectIdentifier | NotEntitled | CloudflareOpError; /** Retrieve the most up to date view of discovered operations, rendered as OpenAPI schemas */ export const getDiscovery: API.OperationMethod< GetDiscoveryRequest, GetDiscoveryResponse, GetDiscoveryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDiscoveryRequest, output: GetDiscoveryResponse, errors: [ InvalidObjectIdentifier, NotEntitled, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetLabelManagedError = CloudflareOpError; /** Retrieve managed label */ export const getLabelManaged: API.OperationMethod< GetLabelManagedRequest, GetLabelManagedResponse, GetLabelManagedError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetLabelManagedRequest, output: GetLabelManagedResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetLabelUserError = LabelNotFound | Forbidden | CloudflareOpError; /** Retrieve user label */ export const getLabelUser: API.OperationMethod< GetLabelUserRequest, GetLabelUserResponse, GetLabelUserError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetLabelUserRequest, output: GetLabelUserResponse, errors: [LabelNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetOperationError = | InvalidObjectIdentifier | OperationNotFound | Forbidden | CloudflareOpError; /** Gets detailed information about a specific API operation in API Shield, including its schema validation settings and traffic statistics. */ export const getOperation: API.OperationMethod< GetOperationRequest, GetOperationResponse, GetOperationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetOperationRequest, output: GetOperationResponse, errors: [ InvalidObjectIdentifier, OperationNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetOperationSchemaValidationError = | InvalidObjectIdentifier | OperationNotFound | CloudflareOpError; /** Retrieves operation-level schema validation settings on the zone */ export const getOperationSchemaValidation: API.OperationMethod< GetOperationSchemaValidationRequest, GetOperationSchemaValidationResponse, GetOperationSchemaValidationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetOperationSchemaValidationRequest, output: GetOperationSchemaValidationResponse, errors: [ InvalidObjectIdentifier, OperationNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingSchemaValidationError = | InvalidObjectIdentifier | CloudflareOpError; /** Retrieves zone level schema validation settings currently set on the zone */ export const getSettingSchemaValidation: API.OperationMethod< GetSettingSchemaValidationRequest, GetSettingSchemaValidationResponse, GetSettingSchemaValidationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingSchemaValidationRequest, output: GetSettingSchemaValidationResponse, errors: [InvalidObjectIdentifier, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetUserSchemaError = | InvalidObjectIdentifier | SchemaNotFound | Forbidden | CloudflareOpError; /** Gets detailed information about a specific uploaded OpenAPI schema, including its contents and validation configuration. */ export const getUserSchema: API.OperationMethod< GetUserSchemaRequest, GetUserSchemaResponse, GetUserSchemaError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetUserSchemaRequest, output: GetUserSchemaResponse, errors: [ InvalidObjectIdentifier, SchemaNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListDiscoveryOperationsError = CloudflareOpError; /** Retrieve the most up to date view of discovered operations */ export const listDiscoveryOperations: API.PaginatedOperationMethod< ListDiscoveryOperationsRequest, ListDiscoveryOperationsResponse, ListDiscoveryOperationsError, CloudflareOpContext, DiscoveryOperationsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListDiscoveryOperationsRequest, output: ListDiscoveryOperationsResponse, 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 ListLabelsError = | ZonePurged | Forbidden | NotFound | CloudflareOpError; /** Retrieve all labels */ export const listLabels: API.PaginatedOperationMethod< ListLabelsRequest, ListLabelsResponse, ListLabelsError, CloudflareOpContext, LabelsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListLabelsRequest, output: ListLabelsResponse, errors: [ ZonePurged, Forbidden, NotFound, 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 ListOperationsError = Forbidden | CloudflareOpError; /** Lists all API operations tracked by API Shield for a zone with pagination. Returns operation details including method, path, and feature configurations. */ export const listOperations: API.PaginatedOperationMethod< ListOperationsRequest, ListOperationsResponse, ListOperationsError, CloudflareOpContext, OperationsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListOperationsRequest, output: ListOperationsResponse, errors: [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 ListSchemasError = InvalidObjectIdentifier | CloudflareOpError; /** Retrieves API operations and their features exported as OpenAPI schemas. */ export const listSchemas: API.OperationMethod< ListSchemasRequest, ListSchemasResponse, ListSchemasError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListSchemasRequest, output: ListSchemasResponse, errors: [InvalidObjectIdentifier, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListUserSchemaHostsError = CloudflareOpError; /** Lists all unique hosts found in uploaded OpenAPI schemas for the zone. Useful for understanding which domains have schema coverage. */ export const listUserSchemaHosts: API.PaginatedOperationMethod< ListUserSchemaHostsRequest, ListUserSchemaHostsResponse, ListUserSchemaHostsError, CloudflareOpContext, UserSchemasHostsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListUserSchemaHostsRequest, output: ListUserSchemaHostsResponse, 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 ListUserSchemaOperationsError = CloudflareOpError; /** Retrieves all operations from the schema. Operations that already exist in API Shield Endpoint Management will be returned as full operations. */ export const listUserSchemaOperations: API.PaginatedOperationMethod< ListUserSchemaOperationsRequest, ListUserSchemaOperationsResponse, ListUserSchemaOperationsError, CloudflareOpContext, UserSchemasOperationsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListUserSchemaOperationsRequest, output: ListUserSchemaOperationsResponse, 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 ListUserSchemasError = ZonePurged | Forbidden | CloudflareOpError; /** Lists all OpenAPI schemas uploaded to API Shield for the zone, including their validation status and associated operations. */ export const listUserSchemas: API.PaginatedOperationMethod< ListUserSchemasRequest, ListUserSchemasResponse, ListUserSchemasError, CloudflareOpContext, UserSchemasListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListUserSchemasRequest, output: ListUserSchemasResponse, errors: [ZonePurged, 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 PatchLabelUserError = LabelNotFound | CloudflareOpError; /** Update certain fields on a label */ export const patchLabelUser: API.OperationMethod< PatchLabelUserRequest, PatchLabelUserResponse, PatchLabelUserError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchLabelUserRequest, output: PatchLabelUserResponse, errors: [LabelNotFound, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchOperationSchemaValidationError = | InvalidObjectIdentifier | CloudflareOpError; /** Updates multiple operation-level schema validation settings on the zone */ export const patchOperationSchemaValidation: API.OperationMethod< PatchOperationSchemaValidationRequest, PatchOperationSchemaValidationResponse, PatchOperationSchemaValidationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchOperationSchemaValidationRequest, output: PatchOperationSchemaValidationResponse, errors: [InvalidObjectIdentifier, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSettingSchemaValidationError = | InvalidObjectIdentifier | CloudflareOpError; /** Updates zone level schema validation settings on the zone */ export const patchSettingSchemaValidation: API.OperationMethod< PatchSettingSchemaValidationRequest, PatchSettingSchemaValidationResponse, PatchSettingSchemaValidationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingSchemaValidationRequest, output: PatchSettingSchemaValidationResponse, errors: [InvalidObjectIdentifier, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchUserSchemaError = | InvalidObjectIdentifier | SchemaNotFound | Forbidden | CloudflareOpError; /** Activates schema validation for an uploaded OpenAPI schema. Requests to matching endpoints will be validated against the schema definitions. */ export const patchUserSchema: API.OperationMethod< PatchUserSchemaRequest, PatchUserSchemaResponse, PatchUserSchemaError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchUserSchemaRequest, output: PatchUserSchemaResponse, errors: [ InvalidObjectIdentifier, SchemaNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutConfigurationError = | InvalidObjectIdentifier | NotEntitled | Forbidden | CloudflareOpError; /** Updates API Shield configuration settings for a zone. Can modify validation strictness, enforcement mode, and other global settings. */ export const putConfiguration: API.OperationMethod< PutConfigurationRequest, PutConfigurationResponse, PutConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutConfigurationRequest, output: PutConfigurationResponse, errors: [ InvalidObjectIdentifier, NotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutLabelManagedResourceOperationError = CloudflareOpError; /** Replace all operations(s) attached to a managed label */ export const putLabelManagedResourceOperation: API.OperationMethod< PutLabelManagedResourceOperationRequest, PutLabelManagedResourceOperationResponse, PutLabelManagedResourceOperationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutLabelManagedResourceOperationRequest, output: PutLabelManagedResourceOperationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutLabelUserError = LabelNotFound | CloudflareOpError; /** Update all fields on a label */ export const putLabelUser: API.OperationMethod< PutLabelUserRequest, PutLabelUserResponse, PutLabelUserError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutLabelUserRequest, output: PutLabelUserResponse, errors: [LabelNotFound, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutLabelUserResourceOperationError = CloudflareOpError; /** Replace all operations(s) attached to a user label */ export const putLabelUserResourceOperation: API.OperationMethod< PutLabelUserResourceOperationRequest, PutLabelUserResourceOperationResponse, PutLabelUserResourceOperationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutLabelUserResourceOperationRequest, output: PutLabelUserResourceOperationResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutOperationSchemaValidationError = | InvalidObjectIdentifier | OperationNotFound | CloudflareOpError; /** Updates operation-level schema validation settings on the zone */ export const putOperationSchemaValidation: API.OperationMethod< PutOperationSchemaValidationRequest, PutOperationSchemaValidationResponse, PutOperationSchemaValidationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutOperationSchemaValidationRequest, output: PutOperationSchemaValidationResponse, errors: [ InvalidObjectIdentifier, OperationNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutSettingSchemaValidationError = | InvalidObjectIdentifier | CloudflareOpError; /** Updates zone level schema validation settings on the zone */ export const putSettingSchemaValidation: API.OperationMethod< PutSettingSchemaValidationRequest, PutSettingSchemaValidationResponse, PutSettingSchemaValidationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutSettingSchemaValidationRequest, output: PutSettingSchemaValidationResponse, errors: [InvalidObjectIdentifier, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateOperationLabelError = CloudflareOpError; /** Replace label(s) on an operation in endpoint management */ export const updateOperationLabel: API.OperationMethod< UpdateOperationLabelRequest, UpdateOperationLabelResponse, UpdateOperationLabelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateOperationLabelRequest, output: UpdateOperationLabelResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));