// 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> = { createdAt: "created_at", documentationUrl: "documentation_url", lastUpdated: "last_updated", operationIds: "operation_ids", perPage: "per_page", resultInfo: "result_info", tokenSources: "token_sources", tokenType: "token_type", totalCount: "total_count", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class TokenConfigurationNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "TokenConfigurationNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export class TokenValidationNotEntitled extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "TokenValidationNotEntitled", { code: S.Number, message: S.String, }, ), [{ code: 10403 }], ) {} export class TokenValidationRuleNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "TokenValidationRuleNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export type RulesBulkCreateRequestBodyItemAction = "log" | "block"; export const RulesBulkCreateRequestBodyItemAction = /*@__PURE__*/ S.String; export type RulesBulkCreateRequestBodyItemSelectorExcludeItemOperationIdsList = Array; export const RulesBulkCreateRequestBodyItemSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkCreateRequestBodyItemSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesBulkCreateRequestBodyItemSelectorExcludeItemOperationIdsList; } export const RulesBulkCreateRequestBodyItemSelectorExcludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: S.optional( RulesBulkCreateRequestBodyItemSelectorExcludeItemOperationIdsList.pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesBulkCreateRequestBodyItemSelectorExcludeItem", }) as any as S.Schema; export type RulesBulkCreateRequestBodyItemSelectorExcludeList = Array; export const RulesBulkCreateRequestBodyItemSelectorExcludeList = /*@__PURE__*/ S.Array( RulesBulkCreateRequestBodyItemSelectorExcludeItem, ) as any as S.Schema; export type RulesBulkCreateRequestBodyItemSelectorIncludeItemHostList = Array; export const RulesBulkCreateRequestBodyItemSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkCreateRequestBodyItemSelectorIncludeItem { /** Included hostnames. */ host?: RulesBulkCreateRequestBodyItemSelectorIncludeItemHostList; } export const RulesBulkCreateRequestBodyItemSelectorIncludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional( RulesBulkCreateRequestBodyItemSelectorIncludeItemHostList, ), }), ).annotate({ identifier: "RulesBulkCreateRequestBodyItemSelectorIncludeItem", }) as any as S.Schema; export type RulesBulkCreateRequestBodyItemSelectorIncludeList = Array; export const RulesBulkCreateRequestBodyItemSelectorIncludeList = /*@__PURE__*/ S.Array( RulesBulkCreateRequestBodyItemSelectorIncludeItem, ) as any as S.Schema; export interface RulesBulkCreateRequestBodyItemSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesBulkCreateRequestBodyItemSelectorExcludeList; /** Select all matching operations. */ include?: RulesBulkCreateRequestBodyItemSelectorIncludeList; } export const RulesBulkCreateRequestBodyItemSelector = /*@__PURE__*/ S.suspend( () => S.Struct({ exclude: S.optional(RulesBulkCreateRequestBodyItemSelectorExcludeList), include: S.optional(RulesBulkCreateRequestBodyItemSelectorIncludeList), }), ).annotate({ identifier: "RulesBulkCreateRequestBodyItemSelector", }) as any as S.Schema; export interface RulesBulkCreateRequestBodyItem { /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesBulkCreateRequestBodyItemAction | (string & {}); /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesBulkCreateRequestBodyItemSelector; /** A human-readable name for the rule. */ title: string; } export const RulesBulkCreateRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesBulkCreateRequestBodyItemAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesBulkCreateRequestBodyItemSelector, title: S.String, }), ).annotate({ identifier: "RulesBulkCreateRequestBodyItem", }) as any as S.Schema; export type RulesBulkCreateRequestBodyList = Array; export const RulesBulkCreateRequestBodyList = /*@__PURE__*/ S.Array( RulesBulkCreateRequestBodyItem, ) as any as S.Schema; export interface BulkCreateRulesRequest { /** Identifier. */ zoneId: string; body: RulesBulkCreateRequestBodyList; } export const BulkCreateRulesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), body: RulesBulkCreateRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/token_validation/rules/bulk", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateRulesRequest", }) as any as S.Schema; export type RulesBulkCreateResultItemAction = "log" | "block"; export const RulesBulkCreateResultItemAction = /*@__PURE__*/ S.String; export type RulesBulkCreateResultItemSelectorExcludeItemOperationIdsList = Array; export const RulesBulkCreateResultItemSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkCreateResultItemSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesBulkCreateResultItemSelectorExcludeItemOperationIdsList | null; } export const RulesBulkCreateResultItemSelectorExcludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: S.optional( S.NullOr( RulesBulkCreateResultItemSelectorExcludeItemOperationIdsList, ).pipe(T.Body("operation_ids")), ), }), ).annotate({ identifier: "RulesBulkCreateResultItemSelectorExcludeItem", }) as any as S.Schema; export type RulesBulkCreateResultItemSelectorExcludeList = Array; export const RulesBulkCreateResultItemSelectorExcludeList = /*@__PURE__*/ S.Array( RulesBulkCreateResultItemSelectorExcludeItem, ) as any as S.Schema; export type RulesBulkCreateResultItemSelectorIncludeItemHostList = Array; export const RulesBulkCreateResultItemSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkCreateResultItemSelectorIncludeItem { /** Included hostnames. */ host?: RulesBulkCreateResultItemSelectorIncludeItemHostList | null; } export const RulesBulkCreateResultItemSelectorIncludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional( S.NullOr(RulesBulkCreateResultItemSelectorIncludeItemHostList), ), }), ).annotate({ identifier: "RulesBulkCreateResultItemSelectorIncludeItem", }) as any as S.Schema; export type RulesBulkCreateResultItemSelectorIncludeList = Array; export const RulesBulkCreateResultItemSelectorIncludeList = /*@__PURE__*/ S.Array( RulesBulkCreateResultItemSelectorIncludeItem, ) as any as S.Schema; export interface RulesBulkCreateResultItemSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesBulkCreateResultItemSelectorExcludeList | null; /** Select all matching operations. */ include?: RulesBulkCreateResultItemSelectorIncludeList | null; } export const RulesBulkCreateResultItemSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(S.NullOr(RulesBulkCreateResultItemSelectorExcludeList)), include: S.optional(S.NullOr(RulesBulkCreateResultItemSelectorIncludeList)), }), ).annotate({ identifier: "RulesBulkCreateResultItemSelector", }) as any as S.Schema; export interface RulesBulkCreateResultItem { /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesBulkCreateResultItemAction; /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesBulkCreateResultItemSelector; /** A human-readable name for the rule. */ title: string; /** UUID. */ id?: string | null; createdAt?: string | null; lastUpdated?: string | null; } export const RulesBulkCreateResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesBulkCreateResultItemAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesBulkCreateResultItemSelector, title: S.String, id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), }), ).annotate({ identifier: "RulesBulkCreateResultItem", }) as any as S.Schema; export type RulesBulkCreateResultList = Array; export const RulesBulkCreateResultList = /*@__PURE__*/ S.Array( RulesBulkCreateResultItem, ) as any as S.Schema; export interface BulkCreateRulesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: RulesBulkCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkCreateRulesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: RulesBulkCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkCreateRulesResponse", }) as any as S.Schema; export type RulesBulkEditRequestBodyItemAction = "log" | "block"; export const RulesBulkEditRequestBodyItemAction = /*@__PURE__*/ S.String; export interface RulesBulkEditRequestBodyItemPositionAPIShieldIndex { /** Move rule to this position */ index: number; } export const RulesBulkEditRequestBodyItemPositionAPIShieldIndex = /*@__PURE__*/ S.suspend(() => S.Struct({ index: S.Number, }), ).annotate({ identifier: "RulesBulkEditRequestBodyItemPositionAPIShieldIndex", }) as any as S.Schema; export interface RulesBulkEditRequestBodyItemPositionAPIShieldBefore { /** Move rule to before rule with this ID. */ before?: string; } export const RulesBulkEditRequestBodyItemPositionAPIShieldBefore = /*@__PURE__*/ S.suspend(() => S.Struct({ before: S.optional(S.String), }), ).annotate({ identifier: "RulesBulkEditRequestBodyItemPositionAPIShieldBefore", }) as any as S.Schema; export interface RulesBulkEditRequestBodyItemPositionAPIShieldAfter { /** Move rule to after rule with this ID. */ after?: string; } export const RulesBulkEditRequestBodyItemPositionAPIShieldAfter = /*@__PURE__*/ S.suspend(() => S.Struct({ after: S.optional(S.String), }), ).annotate({ identifier: "RulesBulkEditRequestBodyItemPositionAPIShieldAfter", }) as any as S.Schema; export type RulesBulkEditRequestBodyItemPosition = | RulesBulkEditRequestBodyItemPositionAPIShieldIndex | RulesBulkEditRequestBodyItemPositionAPIShieldBefore | RulesBulkEditRequestBodyItemPositionAPIShieldAfter; export const RulesBulkEditRequestBodyItemPosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["index"], ["before"], ["after"]]), ); export type RulesBulkEditRequestBodyItemSelectorExcludeItemOperationIdsList = Array; export const RulesBulkEditRequestBodyItemSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkEditRequestBodyItemSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesBulkEditRequestBodyItemSelectorExcludeItemOperationIdsList; } export const RulesBulkEditRequestBodyItemSelectorExcludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: S.optional( RulesBulkEditRequestBodyItemSelectorExcludeItemOperationIdsList.pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesBulkEditRequestBodyItemSelectorExcludeItem", }) as any as S.Schema; export type RulesBulkEditRequestBodyItemSelectorExcludeList = Array; export const RulesBulkEditRequestBodyItemSelectorExcludeList = /*@__PURE__*/ S.Array( RulesBulkEditRequestBodyItemSelectorExcludeItem, ) as any as S.Schema; export type RulesBulkEditRequestBodyItemSelectorIncludeItemHostList = Array; export const RulesBulkEditRequestBodyItemSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkEditRequestBodyItemSelectorIncludeItem { /** Included hostnames. */ host?: RulesBulkEditRequestBodyItemSelectorIncludeItemHostList; } export const RulesBulkEditRequestBodyItemSelectorIncludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional(RulesBulkEditRequestBodyItemSelectorIncludeItemHostList), }), ).annotate({ identifier: "RulesBulkEditRequestBodyItemSelectorIncludeItem", }) as any as S.Schema; export type RulesBulkEditRequestBodyItemSelectorIncludeList = Array; export const RulesBulkEditRequestBodyItemSelectorIncludeList = /*@__PURE__*/ S.Array( RulesBulkEditRequestBodyItemSelectorIncludeItem, ) as any as S.Schema; export interface RulesBulkEditRequestBodyItemSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesBulkEditRequestBodyItemSelectorExcludeList; /** Select all matching operations. */ include?: RulesBulkEditRequestBodyItemSelectorIncludeList; } export const RulesBulkEditRequestBodyItemSelector = /*@__PURE__*/ S.suspend( () => S.Struct({ exclude: S.optional(RulesBulkEditRequestBodyItemSelectorExcludeList), include: S.optional(RulesBulkEditRequestBodyItemSelectorIncludeList), }), ).annotate({ identifier: "RulesBulkEditRequestBodyItemSelector", }) as any as S.Schema; export interface RulesBulkEditRequestBodyItem { /** Rule ID this patch applies to */ id: string; /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action?: RulesBulkEditRequestBodyItemAction | (string & {}); /** A human-readable description that gives more details than `title`. */ description?: string; /** Toggle rule on or off. */ enabled?: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression?: string; /** Update rule order among zone rules. */ position?: RulesBulkEditRequestBodyItemPosition; /** Select operations covered by this rule. */ selector?: RulesBulkEditRequestBodyItemSelector; /** A human-readable name for the rule. */ title?: string; } export const RulesBulkEditRequestBodyItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, action: S.optional(RulesBulkEditRequestBodyItemAction), description: S.optional(S.String), enabled: S.optional(S.Boolean), expression: S.optional(S.String), position: S.optional(RulesBulkEditRequestBodyItemPosition), selector: S.optional(RulesBulkEditRequestBodyItemSelector), title: S.optional(S.String), }), ).annotate({ identifier: "RulesBulkEditRequestBodyItem", }) as any as S.Schema; export type RulesBulkEditRequestBodyList = Array; export const RulesBulkEditRequestBodyList = /*@__PURE__*/ S.Array( RulesBulkEditRequestBodyItem, ) as any as S.Schema; export interface BulkPatchRulesRequest { /** Identifier. */ zoneId: string; body: RulesBulkEditRequestBodyList; } export const BulkPatchRulesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), body: RulesBulkEditRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/token_validation/rules/bulk", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPatchRulesRequest", }) as any as S.Schema; export type RulesBulkEditResultItemAction = "log" | "block"; export const RulesBulkEditResultItemAction = /*@__PURE__*/ S.String; export type RulesBulkEditResultItemSelectorExcludeItemOperationIdsList = Array; export const RulesBulkEditResultItemSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkEditResultItemSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesBulkEditResultItemSelectorExcludeItemOperationIdsList | null; } export const RulesBulkEditResultItemSelectorExcludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: S.optional( S.NullOr( RulesBulkEditResultItemSelectorExcludeItemOperationIdsList, ).pipe(T.Body("operation_ids")), ), }), ).annotate({ identifier: "RulesBulkEditResultItemSelectorExcludeItem", }) as any as S.Schema; export type RulesBulkEditResultItemSelectorExcludeList = Array; export const RulesBulkEditResultItemSelectorExcludeList = /*@__PURE__*/ S.Array( RulesBulkEditResultItemSelectorExcludeItem, ) as any as S.Schema; export type RulesBulkEditResultItemSelectorIncludeItemHostList = Array; export const RulesBulkEditResultItemSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesBulkEditResultItemSelectorIncludeItem { /** Included hostnames. */ host?: RulesBulkEditResultItemSelectorIncludeItemHostList | null; } export const RulesBulkEditResultItemSelectorIncludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional( S.NullOr(RulesBulkEditResultItemSelectorIncludeItemHostList), ), }), ).annotate({ identifier: "RulesBulkEditResultItemSelectorIncludeItem", }) as any as S.Schema; export type RulesBulkEditResultItemSelectorIncludeList = Array; export const RulesBulkEditResultItemSelectorIncludeList = /*@__PURE__*/ S.Array( RulesBulkEditResultItemSelectorIncludeItem, ) as any as S.Schema; export interface RulesBulkEditResultItemSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesBulkEditResultItemSelectorExcludeList | null; /** Select all matching operations. */ include?: RulesBulkEditResultItemSelectorIncludeList | null; } export const RulesBulkEditResultItemSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(S.NullOr(RulesBulkEditResultItemSelectorExcludeList)), include: S.optional(S.NullOr(RulesBulkEditResultItemSelectorIncludeList)), }), ).annotate({ identifier: "RulesBulkEditResultItemSelector", }) as any as S.Schema; export interface RulesBulkEditResultItem { /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesBulkEditResultItemAction; /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesBulkEditResultItemSelector; /** A human-readable name for the rule. */ title: string; /** UUID. */ id?: string | null; createdAt?: string | null; lastUpdated?: string | null; } export const RulesBulkEditResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesBulkEditResultItemAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesBulkEditResultItemSelector, title: S.String, id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), }), ).annotate({ identifier: "RulesBulkEditResultItem", }) as any as S.Schema; export type RulesBulkEditResultList = Array; export const RulesBulkEditResultList = /*@__PURE__*/ S.Array( RulesBulkEditResultItem, ) as any as S.Schema; export interface BulkPatchRulesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: RulesBulkEditResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkPatchRulesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: RulesBulkEditResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkPatchRulesResponse", }) as any as S.Schema; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = /*@__PURE__*/ S.String; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = "RSA"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = /*@__PURE__*/ S.String; export interface ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA { /** Algorithm */ alg: | ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg | (string & {}); /** RSA exponent */ e: string; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty; /** RSA modulus */ n: string; } export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg, e: S.String, kid: S.String, kty: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty, n: S.String, }), ).annotate({ identifier: "ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA", }) as any as S.Schema; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = "ES256"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = /*@__PURE__*/ S.String; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = "P-256"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = /*@__PURE__*/ S.String; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = "EC"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = /*@__PURE__*/ S.String; export interface ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 { /** Algorithm */ alg: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg; /** Curve */ crv: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg, crv: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv, kid: S.String, kty: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256", }) as any as S.Schema; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = "ES384"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = /*@__PURE__*/ S.String; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = "P-384"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = /*@__PURE__*/ S.String; export type ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = "EC"; export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = /*@__PURE__*/ S.String; export interface ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 { /** Algorithm */ alg: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg; /** Curve */ crv: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg, crv: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv, kid: S.String, kty: ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384", }) as any as S.Schema; export type ConfigurationCreateRequestCredentialsKeysItem = | ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA | ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 | ConfigurationCreateRequestCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384; export const ConfigurationCreateRequestCredentialsKeysItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["alg", "e", "kid", "kty", "n"], ["alg", "crv", "kid", "kty", "x", "y"], ["alg", "crv", "kid", "kty", "x", "y"], ]), ); export type ConfigurationCreateRequestCredentialsKeysList = Array; export const ConfigurationCreateRequestCredentialsKeysList = /*@__PURE__*/ S.Array( ConfigurationCreateRequestCredentialsKeysItem, ) as any as S.Schema; export interface ConfigurationCreateRequestCredentials { keys: ConfigurationCreateRequestCredentialsKeysList; } export const ConfigurationCreateRequestCredentials = /*@__PURE__*/ S.suspend( () => S.Struct({ keys: ConfigurationCreateRequestCredentialsKeysList, }), ).annotate({ identifier: "ConfigurationCreateRequestCredentials", }) as any as S.Schema; export type ConfigurationCreateRequestTokenSourcesList = Array; export const ConfigurationCreateRequestTokenSourcesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConfigurationCreateRequestTokenType = "JWT"; export const ConfigurationCreateRequestTokenType = /*@__PURE__*/ S.String; export interface CreateConfigurationRequest { /** Identifier. */ zoneId: string; credentials: ConfigurationCreateRequestCredentials; description: string; title: string; tokenSources: ConfigurationCreateRequestTokenSourcesList; tokenType: ConfigurationCreateRequestTokenType | (string & {}); } export const CreateConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), credentials: ConfigurationCreateRequestCredentials, description: S.String, title: S.String, tokenSources: ConfigurationCreateRequestTokenSourcesList.pipe( T.Body("token_sources"), ), tokenType: ConfigurationCreateRequestTokenType.pipe(T.Body("token_type")), }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/token_validation/config", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateConfigurationRequest", }) as any as S.Schema; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = /*@__PURE__*/ S.String; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = "RSA"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = /*@__PURE__*/ S.String; export interface ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA { /** Algorithm */ alg: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg; /** RSA exponent */ e: string; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty; /** RSA modulus */ n: string; } export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg, e: S.String, kid: S.String, kty: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty, n: S.String, }), ).annotate({ identifier: "ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA", }) as any as S.Schema; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = "ES256"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = /*@__PURE__*/ S.String; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = "P-256"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = /*@__PURE__*/ S.String; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = "EC"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = /*@__PURE__*/ S.String; export interface ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 { /** Algorithm */ alg: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg; /** Curve */ crv: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg, crv: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv, kid: S.String, kty: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256", }) as any as S.Schema; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = "ES384"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = /*@__PURE__*/ S.String; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = "P-384"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = /*@__PURE__*/ S.String; export type ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = "EC"; export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = /*@__PURE__*/ S.String; export interface ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 { /** Algorithm */ alg: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg; /** Curve */ crv: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg, crv: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv, kid: S.String, kty: ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384", }) as any as S.Schema; export type ConfigurationCreateResponseCredentialsKeysItem = | ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA | ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 | ConfigurationCreateResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384; export const ConfigurationCreateResponseCredentialsKeysItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["alg", "e", "kid", "kty", "n"], ["alg", "crv", "kid", "kty", "x", "y"], ["alg", "crv", "kid", "kty", "x", "y"], ]), ); export type ConfigurationCreateResponseCredentialsKeysList = Array; export const ConfigurationCreateResponseCredentialsKeysList = /*@__PURE__*/ S.Array( ConfigurationCreateResponseCredentialsKeysItem, ) as any as S.Schema; export interface ConfigurationCreateResponseCredentials { keys: ConfigurationCreateResponseCredentialsKeysList; } export const ConfigurationCreateResponseCredentials = /*@__PURE__*/ S.suspend( () => S.Struct({ keys: ConfigurationCreateResponseCredentialsKeysList, }), ).annotate({ identifier: "ConfigurationCreateResponseCredentials", }) as any as S.Schema; export type ConfigurationCreateResponseTokenSourcesList = Array; export const ConfigurationCreateResponseTokenSourcesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConfigurationCreateResponseTokenType = "JWT"; export const ConfigurationCreateResponseTokenType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateConfigurationResponse { /** UUID. */ id: string; createdAt: string; credentials: ConfigurationCreateResponseCredentials; description: string; lastUpdated: string; title: string; tokenSources: ConfigurationCreateResponseTokenSourcesList; tokenType: ConfigurationCreateResponseTokenType; } export const CreateConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), credentials: ConfigurationCreateResponseCredentials, description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), title: S.String, tokenSources: ConfigurationCreateResponseTokenSourcesList.pipe( T.Body("token_sources"), ), tokenType: ConfigurationCreateResponseTokenType.pipe(T.Body("token_type")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateConfigurationResponse", }) as any as S.Schema; export type RulesCreateRequestAction = "log" | "block"; export const RulesCreateRequestAction = /*@__PURE__*/ S.String; export type RulesCreateRequestSelectorExcludeItemOperationIdsList = Array; export const RulesCreateRequestSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesCreateRequestSelectorExcludeItemOperationIdsList; } export const RulesCreateRequestSelectorExcludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ operationIds: S.optional( RulesCreateRequestSelectorExcludeItemOperationIdsList.pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesCreateRequestSelectorExcludeItem", }) as any as S.Schema; export type RulesCreateRequestSelectorExcludeList = Array; export const RulesCreateRequestSelectorExcludeList = /*@__PURE__*/ S.Array( RulesCreateRequestSelectorExcludeItem, ) as any as S.Schema; export type RulesCreateRequestSelectorIncludeItemHostList = Array; export const RulesCreateRequestSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateRequestSelectorIncludeItem { /** Included hostnames. */ host?: RulesCreateRequestSelectorIncludeItemHostList; } export const RulesCreateRequestSelectorIncludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ host: S.optional(RulesCreateRequestSelectorIncludeItemHostList), }), ).annotate({ identifier: "RulesCreateRequestSelectorIncludeItem", }) as any as S.Schema; export type RulesCreateRequestSelectorIncludeList = Array; export const RulesCreateRequestSelectorIncludeList = /*@__PURE__*/ S.Array( RulesCreateRequestSelectorIncludeItem, ) as any as S.Schema; export interface RulesCreateRequestSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesCreateRequestSelectorExcludeList; /** Select all matching operations. */ include?: RulesCreateRequestSelectorIncludeList; } export const RulesCreateRequestSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(RulesCreateRequestSelectorExcludeList), include: S.optional(RulesCreateRequestSelectorIncludeList), }), ).annotate({ identifier: "RulesCreateRequestSelector", }) as any as S.Schema; export interface CreateRuleRequest { /** Identifier. */ zoneId: string; /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesCreateRequestAction | (string & {}); /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesCreateRequestSelector; /** A human-readable name for the rule. */ title: string; } export const CreateRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), action: RulesCreateRequestAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesCreateRequestSelector, title: S.String, }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/token_validation/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRuleRequest", }) as any as S.Schema; export type RulesCreateResponseAction = "log" | "block"; export const RulesCreateResponseAction = /*@__PURE__*/ S.String; export type RulesCreateResponseSelectorExcludeItemOperationIdsList = Array; export const RulesCreateResponseSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesCreateResponseSelectorExcludeItemOperationIdsList | null; } export const RulesCreateResponseSelectorExcludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ operationIds: S.optional( S.NullOr(RulesCreateResponseSelectorExcludeItemOperationIdsList).pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesCreateResponseSelectorExcludeItem", }) as any as S.Schema; export type RulesCreateResponseSelectorExcludeList = Array; export const RulesCreateResponseSelectorExcludeList = /*@__PURE__*/ S.Array( RulesCreateResponseSelectorExcludeItem, ) as any as S.Schema; export type RulesCreateResponseSelectorIncludeItemHostList = Array; export const RulesCreateResponseSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesCreateResponseSelectorIncludeItem { /** Included hostnames. */ host?: RulesCreateResponseSelectorIncludeItemHostList | null; } export const RulesCreateResponseSelectorIncludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ host: S.optional( S.NullOr(RulesCreateResponseSelectorIncludeItemHostList), ), }), ).annotate({ identifier: "RulesCreateResponseSelectorIncludeItem", }) as any as S.Schema; export type RulesCreateResponseSelectorIncludeList = Array; export const RulesCreateResponseSelectorIncludeList = /*@__PURE__*/ S.Array( RulesCreateResponseSelectorIncludeItem, ) as any as S.Schema; export interface RulesCreateResponseSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesCreateResponseSelectorExcludeList | null; /** Select all matching operations. */ include?: RulesCreateResponseSelectorIncludeList | null; } export const RulesCreateResponseSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(S.NullOr(RulesCreateResponseSelectorExcludeList)), include: S.optional(S.NullOr(RulesCreateResponseSelectorIncludeList)), }), ).annotate({ identifier: "RulesCreateResponseSelector", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateRuleResponse { /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesCreateResponseAction; /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesCreateResponseSelector; /** A human-readable name for the rule. */ title: string; /** UUID. */ id?: string | null; createdAt?: string | null; lastUpdated?: string | null; } export const CreateRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesCreateResponseAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesCreateResponseSelector, title: S.String, id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateRuleResponse", }) as any as S.Schema; export interface DeleteConfigurationRequest { /** Identifier. */ zoneId: string; /** UUID. */ configId: string; } export const DeleteConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), configId: S.String.pipe(T.Label("config_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/token_validation/config/{config_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteConfigurationRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteConfigurationResponse { /** UUID. */ id?: string | null; } export const DeleteConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteConfigurationResponse", }) as any as S.Schema; export interface DeleteRuleRequest { /** Identifier. */ zoneId: string; /** UUID. */ ruleId: string; } export const DeleteRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/token_validation/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRuleRequest", }) as any as S.Schema; export type DeleteRuleResponse = unknown; export const DeleteRuleResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteRuleResponse", }) as any as S.Schema; export interface GetConfigurationRequest { /** Identifier. */ zoneId: string; /** UUID. */ configId: string; } export const GetConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), configId: S.String.pipe(T.Label("config_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/token_validation/config/{config_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConfigurationRequest", }) as any as S.Schema; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = /*@__PURE__*/ S.String; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = "RSA"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = /*@__PURE__*/ S.String; export interface ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA { /** Algorithm */ alg: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg; /** RSA exponent */ e: string; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty; /** RSA modulus */ n: string; } export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg, e: S.String, kid: S.String, kty: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty, n: S.String, }), ).annotate({ identifier: "ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA", }) as any as S.Schema; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = "ES256"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = /*@__PURE__*/ S.String; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = "P-256"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = /*@__PURE__*/ S.String; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = "EC"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = /*@__PURE__*/ S.String; export interface ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 { /** Algorithm */ alg: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg; /** Curve */ crv: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg, crv: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv, kid: S.String, kty: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256", }) as any as S.Schema; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = "ES384"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = /*@__PURE__*/ S.String; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = "P-384"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = /*@__PURE__*/ S.String; export type ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = "EC"; export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = /*@__PURE__*/ S.String; export interface ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 { /** Algorithm */ alg: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg; /** Curve */ crv: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg, crv: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv, kid: S.String, kty: ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384", }) as any as S.Schema; export type ConfigurationGetResponseCredentialsKeysItem = | ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA | ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 | ConfigurationGetResponseCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384; export const ConfigurationGetResponseCredentialsKeysItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["alg", "e", "kid", "kty", "n"], ["alg", "crv", "kid", "kty", "x", "y"], ["alg", "crv", "kid", "kty", "x", "y"], ]), ); export type ConfigurationGetResponseCredentialsKeysList = Array; export const ConfigurationGetResponseCredentialsKeysList = /*@__PURE__*/ S.Array( ConfigurationGetResponseCredentialsKeysItem, ) as any as S.Schema; export interface ConfigurationGetResponseCredentials { keys: ConfigurationGetResponseCredentialsKeysList; } export const ConfigurationGetResponseCredentials = /*@__PURE__*/ S.suspend(() => S.Struct({ keys: ConfigurationGetResponseCredentialsKeysList, }), ).annotate({ identifier: "ConfigurationGetResponseCredentials", }) as any as S.Schema; export type ConfigurationGetResponseTokenSourcesList = Array; export const ConfigurationGetResponseTokenSourcesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConfigurationGetResponseTokenType = "JWT"; export const ConfigurationGetResponseTokenType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetConfigurationResponse { /** UUID. */ id: string; createdAt: string; credentials: ConfigurationGetResponseCredentials; description: string; lastUpdated: string; title: string; tokenSources: ConfigurationGetResponseTokenSourcesList; tokenType: ConfigurationGetResponseTokenType; } export const GetConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), credentials: ConfigurationGetResponseCredentials, description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), title: S.String, tokenSources: ConfigurationGetResponseTokenSourcesList.pipe( T.Body("token_sources"), ), tokenType: ConfigurationGetResponseTokenType.pipe(T.Body("token_type")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetConfigurationResponse", }) as any as S.Schema; export interface GetRuleRequest { /** Identifier. */ zoneId: string; /** UUID. */ ruleId: string; } export const GetRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), ruleId: S.String.pipe(T.Label("rule_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/token_validation/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRuleRequest" }) as any as S.Schema; export type RulesGetResponseAction = "log" | "block"; export const RulesGetResponseAction = /*@__PURE__*/ S.String; export type RulesGetResponseSelectorExcludeItemOperationIdsList = Array; export const RulesGetResponseSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesGetResponseSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesGetResponseSelectorExcludeItemOperationIdsList | null; } export const RulesGetResponseSelectorExcludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: S.optional( S.NullOr(RulesGetResponseSelectorExcludeItemOperationIdsList).pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesGetResponseSelectorExcludeItem", }) as any as S.Schema; export type RulesGetResponseSelectorExcludeList = Array; export const RulesGetResponseSelectorExcludeList = /*@__PURE__*/ S.Array( RulesGetResponseSelectorExcludeItem, ) as any as S.Schema; export type RulesGetResponseSelectorIncludeItemHostList = Array; export const RulesGetResponseSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesGetResponseSelectorIncludeItem { /** Included hostnames. */ host?: RulesGetResponseSelectorIncludeItemHostList | null; } export const RulesGetResponseSelectorIncludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional(S.NullOr(RulesGetResponseSelectorIncludeItemHostList)), }), ).annotate({ identifier: "RulesGetResponseSelectorIncludeItem", }) as any as S.Schema; export type RulesGetResponseSelectorIncludeList = Array; export const RulesGetResponseSelectorIncludeList = /*@__PURE__*/ S.Array( RulesGetResponseSelectorIncludeItem, ) as any as S.Schema; export interface RulesGetResponseSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesGetResponseSelectorExcludeList | null; /** Select all matching operations. */ include?: RulesGetResponseSelectorIncludeList | null; } export const RulesGetResponseSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(S.NullOr(RulesGetResponseSelectorExcludeList)), include: S.optional(S.NullOr(RulesGetResponseSelectorIncludeList)), }), ).annotate({ identifier: "RulesGetResponseSelector", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetRuleResponse { /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesGetResponseAction; /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesGetResponseSelector; /** A human-readable name for the rule. */ title: string; /** UUID. */ id?: string | null; createdAt?: string | null; lastUpdated?: string | null; } export const GetRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesGetResponseAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesGetResponseSelector, title: S.String, id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetRuleResponse", }) as any as S.Schema; export interface ListConfigurationsRequest { /** Identifier. */ zoneId: string; /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; } export const ListConfigurationsRequest = /*@__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}/token_validation/config", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConfigurationsRequest", }) as any as S.Schema; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg = /*@__PURE__*/ S.String; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = "RSA"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty = /*@__PURE__*/ S.String; export interface ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA { /** Algorithm */ alg: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg; /** RSA exponent */ e: string; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty; /** RSA modulus */ n: string; } export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAAlg, e: S.String, kid: S.String, kty: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSAKty, n: S.String, }), ).annotate({ identifier: "ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA", }) as any as S.Schema; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = "ES256"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = /*@__PURE__*/ S.String; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = "P-256"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = /*@__PURE__*/ S.String; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = "EC"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = /*@__PURE__*/ S.String; export interface ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 { /** Algorithm */ alg: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg; /** Curve */ crv: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg, crv: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv, kid: S.String, kty: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256", }) as any as S.Schema; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = "ES384"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = /*@__PURE__*/ S.String; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = "P-384"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = /*@__PURE__*/ S.String; export type ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = "EC"; export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = /*@__PURE__*/ S.String; export interface ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 { /** Algorithm */ alg: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg; /** Curve */ crv: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg, crv: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv, kid: S.String, kty: ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384", }) as any as S.Schema; export type ConfigurationListResultItemCredentialsKeysItem = | ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyRSA | ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs256 | ConfigurationListResultItemCredentialsKeysItemAPIShieldCredentialsJWTKeyEcEs384; export const ConfigurationListResultItemCredentialsKeysItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["alg", "e", "kid", "kty", "n"], ["alg", "crv", "kid", "kty", "x", "y"], ["alg", "crv", "kid", "kty", "x", "y"], ]), ); export type ConfigurationListResultItemCredentialsKeysList = Array; export const ConfigurationListResultItemCredentialsKeysList = /*@__PURE__*/ S.Array( ConfigurationListResultItemCredentialsKeysItem, ) as any as S.Schema; export interface ConfigurationListResultItemCredentials { keys: ConfigurationListResultItemCredentialsKeysList; } export const ConfigurationListResultItemCredentials = /*@__PURE__*/ S.suspend( () => S.Struct({ keys: ConfigurationListResultItemCredentialsKeysList, }), ).annotate({ identifier: "ConfigurationListResultItemCredentials", }) as any as S.Schema; export type ConfigurationListResultItemTokenSourcesList = Array; export const ConfigurationListResultItemTokenSourcesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ConfigurationListResultItemTokenType = "JWT"; export const ConfigurationListResultItemTokenType = /*@__PURE__*/ S.String; export interface ConfigurationListResultItem { /** UUID. */ id: string; createdAt: string; credentials: ConfigurationListResultItemCredentials; description: string; lastUpdated: string; title: string; tokenSources: ConfigurationListResultItemTokenSourcesList; tokenType: ConfigurationListResultItemTokenType; } export const ConfigurationListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), credentials: ConfigurationListResultItemCredentials, description: S.String, lastUpdated: S.String.pipe(T.Body("last_updated")), title: S.String, tokenSources: ConfigurationListResultItemTokenSourcesList.pipe( T.Body("token_sources"), ), tokenType: ConfigurationListResultItemTokenType.pipe(T.Body("token_type")), }), ).annotate({ identifier: "ConfigurationListResultItem", }) as any as S.Schema; export type ConfigurationListResultList = Array; export const ConfigurationListResultList = /*@__PURE__*/ S.Array( ConfigurationListResultItem, ) as any as S.Schema; export interface ListConfigurationsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ConfigurationListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListConfigurationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ConfigurationListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListConfigurationsResponse", }) as any as S.Schema; export type RulesListRequestAction = "log" | "block"; export const RulesListRequestAction = /*@__PURE__*/ S.String; export type RulesListRequestTokenConfigurationList = Array; export const RulesListRequestTokenConfigurationList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface ListRulesRequest { /** Identifier. */ zoneId: string; /** Select rules with these IDs. */ id?: string; /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action?: RulesListRequestAction | (string & {}); /** Toggle rule on or off. */ enabled?: boolean; /** Select rules with this host in `include`. */ host?: string; /** Select rules with this host in `include`. */ hostname?: string; /** Page number of paginated results. */ page?: number; /** Maximum number of results per page. */ perPage?: number; /** Select rules with these IDs. */ ruleId?: string; /** Select rules using any of these token configurations. */ tokenConfiguration?: RulesListRequestTokenConfigurationList; } export const ListRulesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), id: S.optional(S.String.pipe(T.Query())), action: S.optional(RulesListRequestAction.pipe(T.Query())), enabled: S.optional(S.Boolean.pipe(T.Query())), host: S.optional(S.String.pipe(T.Query())), hostname: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), ruleId: S.optional(S.String.pipe(T.Query("rule_id"))), tokenConfiguration: S.optional( RulesListRequestTokenConfigurationList.pipe( T.Query("token_configuration"), ), ), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/token_validation/rules", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRulesRequest", }) as any as S.Schema; export type RulesListResultItemAction = "log" | "block"; export const RulesListResultItemAction = /*@__PURE__*/ S.String; export type RulesListResultItemSelectorExcludeItemOperationIdsList = Array; export const RulesListResultItemSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesListResultItemSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesListResultItemSelectorExcludeItemOperationIdsList | null; } export const RulesListResultItemSelectorExcludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ operationIds: S.optional( S.NullOr(RulesListResultItemSelectorExcludeItemOperationIdsList).pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesListResultItemSelectorExcludeItem", }) as any as S.Schema; export type RulesListResultItemSelectorExcludeList = Array; export const RulesListResultItemSelectorExcludeList = /*@__PURE__*/ S.Array( RulesListResultItemSelectorExcludeItem, ) as any as S.Schema; export type RulesListResultItemSelectorIncludeItemHostList = Array; export const RulesListResultItemSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesListResultItemSelectorIncludeItem { /** Included hostnames. */ host?: RulesListResultItemSelectorIncludeItemHostList | null; } export const RulesListResultItemSelectorIncludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ host: S.optional( S.NullOr(RulesListResultItemSelectorIncludeItemHostList), ), }), ).annotate({ identifier: "RulesListResultItemSelectorIncludeItem", }) as any as S.Schema; export type RulesListResultItemSelectorIncludeList = Array; export const RulesListResultItemSelectorIncludeList = /*@__PURE__*/ S.Array( RulesListResultItemSelectorIncludeItem, ) as any as S.Schema; export interface RulesListResultItemSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesListResultItemSelectorExcludeList | null; /** Select all matching operations. */ include?: RulesListResultItemSelectorIncludeList | null; } export const RulesListResultItemSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(S.NullOr(RulesListResultItemSelectorExcludeList)), include: S.optional(S.NullOr(RulesListResultItemSelectorIncludeList)), }), ).annotate({ identifier: "RulesListResultItemSelector", }) as any as S.Schema; export interface RulesListResultItem { /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesListResultItemAction; /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesListResultItemSelector; /** A human-readable name for the rule. */ title: string; /** UUID. */ id?: string | null; createdAt?: string | null; lastUpdated?: string | null; } export const RulesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesListResultItemAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesListResultItemSelector, title: S.String, id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), }), ).annotate({ identifier: "RulesListResultItem", }) as any as S.Schema; export type RulesListResultList = Array; export const RulesListResultList = /*@__PURE__*/ S.Array( RulesListResultItem, ) as any as S.Schema; export interface ListRulesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: RulesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListRulesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: RulesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListRulesResponse", }) as any as S.Schema; export type ConfigurationEditRequestTokenSourcesList = Array; export const ConfigurationEditRequestTokenSourcesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PatchConfigurationRequest { /** Identifier. */ zoneId: string; /** UUID. */ configId: string; description?: string; title?: string; tokenSources?: ConfigurationEditRequestTokenSourcesList; } export const PatchConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), configId: S.String.pipe(T.Label("config_id")), description: S.optional(S.String), title: S.optional(S.String), tokenSources: S.optional( ConfigurationEditRequestTokenSourcesList.pipe(T.Body("token_sources")), ), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/token_validation/config/{config_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchConfigurationRequest", }) as any as S.Schema; export type ConfigurationEditResponseTokenSourcesList = Array; export const ConfigurationEditResponseTokenSourcesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchConfigurationResponse { /** UUID. */ id?: string | null; description?: string | null; title?: string | null; tokenSources?: ConfigurationEditResponseTokenSourcesList | null; } export const PatchConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), description: S.optional(S.NullOr(S.String)), title: S.optional(S.NullOr(S.String)), tokenSources: S.optional( S.NullOr(ConfigurationEditResponseTokenSourcesList).pipe( T.Body("token_sources"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchConfigurationResponse", }) as any as S.Schema; export type RulesEditRequestAction = "log" | "block"; export const RulesEditRequestAction = /*@__PURE__*/ S.String; export type RulesEditRequestPositionAPIShieldIndex = RulesBulkEditRequestBodyItemPositionAPIShieldIndex; export const RulesEditRequestPositionAPIShieldIndex = RulesBulkEditRequestBodyItemPositionAPIShieldIndex; export type RulesEditRequestPositionAPIShieldBefore = RulesBulkEditRequestBodyItemPositionAPIShieldBefore; export const RulesEditRequestPositionAPIShieldBefore = RulesBulkEditRequestBodyItemPositionAPIShieldBefore; export type RulesEditRequestPositionAPIShieldAfter = RulesBulkEditRequestBodyItemPositionAPIShieldAfter; export const RulesEditRequestPositionAPIShieldAfter = RulesBulkEditRequestBodyItemPositionAPIShieldAfter; export type RulesEditRequestPosition = | RulesBulkEditRequestBodyItemPositionAPIShieldIndex | RulesBulkEditRequestBodyItemPositionAPIShieldBefore | RulesBulkEditRequestBodyItemPositionAPIShieldAfter; export const RulesEditRequestPosition = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["index"], ["before"], ["after"]]), ); export type RulesEditRequestSelectorExcludeItemOperationIdsList = Array; export const RulesEditRequestSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesEditRequestSelectorExcludeItemOperationIdsList; } export const RulesEditRequestSelectorExcludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ operationIds: S.optional( RulesEditRequestSelectorExcludeItemOperationIdsList.pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesEditRequestSelectorExcludeItem", }) as any as S.Schema; export type RulesEditRequestSelectorExcludeList = Array; export const RulesEditRequestSelectorExcludeList = /*@__PURE__*/ S.Array( RulesEditRequestSelectorExcludeItem, ) as any as S.Schema; export type RulesEditRequestSelectorIncludeItemHostList = Array; export const RulesEditRequestSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditRequestSelectorIncludeItem { /** Included hostnames. */ host?: RulesEditRequestSelectorIncludeItemHostList; } export const RulesEditRequestSelectorIncludeItem = /*@__PURE__*/ S.suspend(() => S.Struct({ host: S.optional(RulesEditRequestSelectorIncludeItemHostList), }), ).annotate({ identifier: "RulesEditRequestSelectorIncludeItem", }) as any as S.Schema; export type RulesEditRequestSelectorIncludeList = Array; export const RulesEditRequestSelectorIncludeList = /*@__PURE__*/ S.Array( RulesEditRequestSelectorIncludeItem, ) as any as S.Schema; export interface RulesEditRequestSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesEditRequestSelectorExcludeList; /** Select all matching operations. */ include?: RulesEditRequestSelectorIncludeList; } export const RulesEditRequestSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(RulesEditRequestSelectorExcludeList), include: S.optional(RulesEditRequestSelectorIncludeList), }), ).annotate({ identifier: "RulesEditRequestSelector", }) as any as S.Schema; export interface PatchRuleRequest { /** Identifier. */ zoneId: string; /** UUID. */ ruleId: string; /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action?: RulesEditRequestAction | (string & {}); /** A human-readable description that gives more details than `title`. */ description?: string; /** Toggle rule on or off. */ enabled?: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression?: string; /** Update rule order among zone rules. */ position?: RulesEditRequestPosition; /** Select operations covered by this rule. */ selector?: RulesEditRequestSelector; /** A human-readable name for the rule. */ title?: string; } export const PatchRuleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), ruleId: S.String.pipe(T.Label("rule_id")), action: S.optional(RulesEditRequestAction), description: S.optional(S.String), enabled: S.optional(S.Boolean), expression: S.optional(S.String), position: S.optional(RulesEditRequestPosition), selector: S.optional(RulesEditRequestSelector), title: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/token_validation/rules/{rule_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchRuleRequest", }) as any as S.Schema; export type RulesEditResponseAction = "log" | "block"; export const RulesEditResponseAction = /*@__PURE__*/ S.String; export type RulesEditResponseSelectorExcludeItemOperationIdsList = Array; export const RulesEditResponseSelectorExcludeItemOperationIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseSelectorExcludeItem { /** Excluded operation IDs. */ operationIds?: RulesEditResponseSelectorExcludeItemOperationIdsList | null; } export const RulesEditResponseSelectorExcludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ operationIds: S.optional( S.NullOr(RulesEditResponseSelectorExcludeItemOperationIdsList).pipe( T.Body("operation_ids"), ), ), }), ).annotate({ identifier: "RulesEditResponseSelectorExcludeItem", }) as any as S.Schema; export type RulesEditResponseSelectorExcludeList = Array; export const RulesEditResponseSelectorExcludeList = /*@__PURE__*/ S.Array( RulesEditResponseSelectorExcludeItem, ) as any as S.Schema; export type RulesEditResponseSelectorIncludeItemHostList = Array; export const RulesEditResponseSelectorIncludeItemHostList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface RulesEditResponseSelectorIncludeItem { /** Included hostnames. */ host?: RulesEditResponseSelectorIncludeItemHostList | null; } export const RulesEditResponseSelectorIncludeItem = /*@__PURE__*/ S.suspend( () => S.Struct({ host: S.optional(S.NullOr(RulesEditResponseSelectorIncludeItemHostList)), }), ).annotate({ identifier: "RulesEditResponseSelectorIncludeItem", }) as any as S.Schema; export type RulesEditResponseSelectorIncludeList = Array; export const RulesEditResponseSelectorIncludeList = /*@__PURE__*/ S.Array( RulesEditResponseSelectorIncludeItem, ) as any as S.Schema; export interface RulesEditResponseSelector { /** Ignore operations that were otherwise included by `include`. */ exclude?: RulesEditResponseSelectorExcludeList | null; /** Select all matching operations. */ include?: RulesEditResponseSelectorIncludeList | null; } export const RulesEditResponseSelector = /*@__PURE__*/ S.suspend(() => S.Struct({ exclude: S.optional(S.NullOr(RulesEditResponseSelectorExcludeList)), include: S.optional(S.NullOr(RulesEditResponseSelectorIncludeList)), }), ).annotate({ identifier: "RulesEditResponseSelector", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchRuleResponse { /** Action to take on requests that match operations included in `selector` and fail `expression`. */ action: RulesEditResponseAction; /** A human-readable description that gives more details than `title`. */ description: string; /** Toggle rule on or off. */ enabled: boolean; /** Rule expression. Requests that fail to match this expression will be subject to `action`. */ expression: string; /** Select operations covered by this rule. */ selector: RulesEditResponseSelector; /** A human-readable name for the rule. */ title: string; /** UUID. */ id?: string | null; createdAt?: string | null; lastUpdated?: string | null; } export const PatchRuleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ action: RulesEditResponseAction, description: S.String, enabled: S.Boolean, expression: S.String, selector: RulesEditResponseSelector, title: S.String, id: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchRuleResponse", }) as any as S.Schema; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAAlg = | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAAlg = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAKty = "RSA"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAKty = /*@__PURE__*/ S.String; export interface ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSA { /** Algorithm */ alg: | ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAAlg | (string & {}); /** RSA exponent */ e: string; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAKty; /** RSA modulus */ n: string; } export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSA = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAAlg, e: S.String, kid: S.String, kty: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSAKty, n: S.String, }), ).annotate({ identifier: "ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSA", }) as any as S.Schema; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = "ES256"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = "P-256"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = "EC"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = /*@__PURE__*/ S.String; export interface ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256 { /** Algorithm */ alg: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg; /** Curve */ crv: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg, crv: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv, kid: S.String, kty: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256", }) as any as S.Schema; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = "ES384"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = "P-384"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = "EC"; export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = /*@__PURE__*/ S.String; export interface ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384 { /** Algorithm */ alg: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg; /** Curve */ crv: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg, crv: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv, kid: S.String, kty: ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384", }) as any as S.Schema; export type ConfigurationCredentialsUpdateRequestKeysItem = | ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyRSA | ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs256 | ConfigurationCredentialsUpdateRequestKeysItemAPIShieldCredentialsJWTKeyEcEs384; export const ConfigurationCredentialsUpdateRequestKeysItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["alg", "e", "kid", "kty", "n"], ["alg", "crv", "kid", "kty", "x", "y"], ["alg", "crv", "kid", "kty", "x", "y"], ]), ); export type ConfigurationCredentialsUpdateRequestKeysList = Array; export const ConfigurationCredentialsUpdateRequestKeysList = /*@__PURE__*/ S.Array( ConfigurationCredentialsUpdateRequestKeysItem, ) as any as S.Schema; export interface PutConfigurationCredentialRequest { /** Identifier. */ zoneId: string; /** UUID. */ configId: string; keys: ConfigurationCredentialsUpdateRequestKeysList; } export const PutConfigurationCredentialRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), configId: S.String.pipe(T.Label("config_id")), keys: ConfigurationCredentialsUpdateRequestKeysList, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/token_validation/config/{config_id}/credentials", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutConfigurationCredentialRequest", }) as any as S.Schema; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAAlg = | "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAAlg = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAKty = "RSA"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAKty = /*@__PURE__*/ S.String; export interface ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSA { /** Algorithm */ alg: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAAlg; /** RSA exponent */ e: string; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAKty; /** RSA modulus */ n: string; } export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSA = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAAlg, e: S.String, kid: S.String, kty: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSAKty, n: S.String, }), ).annotate({ identifier: "ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSA", }) as any as S.Schema; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = "ES256"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = "P-256"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = "EC"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty = /*@__PURE__*/ S.String; export interface ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256 { /** Algorithm */ alg: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg; /** Curve */ crv: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Alg, crv: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Crv, kid: S.String, kty: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256", }) as any as S.Schema; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = "ES384"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = "P-384"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv = /*@__PURE__*/ S.String; export type ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = "EC"; export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty = /*@__PURE__*/ S.String; export interface ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384 { /** Algorithm */ alg: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg; /** Curve */ crv: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv; /** Key ID */ kid: string; /** Key Type */ kty: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty; /** X EC coordinate */ x: string; /** Y EC coordinate */ y: string; } export const ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384 = /*@__PURE__*/ S.suspend(() => S.Struct({ alg: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Alg, crv: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Crv, kid: S.String, kty: ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384Kty, x: S.String, y: S.String, }), ).annotate({ identifier: "ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384", }) as any as S.Schema; export type ConfigurationCredentialsUpdateResponseKeysItem = | ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyRSA | ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs256 | ConfigurationCredentialsUpdateResponseKeysItemAPIShieldCredentialsJWTKeyEcEs384; export const ConfigurationCredentialsUpdateResponseKeysItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["alg", "e", "kid", "kty", "n"], ["alg", "crv", "kid", "kty", "x", "y"], ["alg", "crv", "kid", "kty", "x", "y"], ]), ); export type ConfigurationCredentialsUpdateResponseKeysList = Array; export const ConfigurationCredentialsUpdateResponseKeysList = /*@__PURE__*/ S.Array( ConfigurationCredentialsUpdateResponseKeysItem, ) as any as S.Schema; /** Raw response payload (operation does not use the standard v4 result envelope). */ export interface PutConfigurationCredentialResponse { keys: ConfigurationCredentialsUpdateResponseKeysList; } export const PutConfigurationCredentialResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ keys: ConfigurationCredentialsUpdateResponseKeysList, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutConfigurationCredentialResponse", }) as any as S.Schema; export type BulkCreateRulesError = CloudflareOpError; /** Create zone token validation rules. A request can create multiple Token Validation Rules. */ export const bulkCreateRules: API.PaginatedOperationMethod< BulkCreateRulesRequest, BulkCreateRulesResponse, BulkCreateRulesError, CloudflareOpContext, RulesBulkCreateResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkCreateRulesRequest, output: BulkCreateRulesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkPatchRulesError = CloudflareOpError; /** Edit token validation rules. A request can update multiple Token Validation Rules. Rules can be re-ordered using the `position` field. Returns all updated rules. */ export const bulkPatchRules: API.PaginatedOperationMethod< BulkPatchRulesRequest, BulkPatchRulesResponse, BulkPatchRulesError, CloudflareOpContext, RulesBulkEditResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkPatchRulesRequest, output: BulkPatchRulesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type CreateConfigurationError = | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Create a new Token Validation configuration */ export const createConfiguration: API.OperationMethod< CreateConfigurationRequest, CreateConfigurationResponse, CreateConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateConfigurationRequest, output: CreateConfigurationResponse, errors: [ TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateRuleError = | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Create a token validation rule. */ export const createRule: API.OperationMethod< CreateRuleRequest, CreateRuleResponse, CreateRuleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateRuleRequest, output: CreateRuleResponse, errors: [ TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteConfigurationError = | TokenConfigurationNotFound | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Delete Token Configuration */ export const deleteConfiguration: API.OperationMethod< DeleteConfigurationRequest, DeleteConfigurationResponse, DeleteConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteConfigurationRequest, output: DeleteConfigurationResponse, errors: [ TokenConfigurationNotFound, TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteRuleError = | TokenValidationRuleNotFound | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Delete a zone token validation rule. */ export const deleteRule: API.OperationMethod< DeleteRuleRequest, DeleteRuleResponse, DeleteRuleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteRuleRequest, output: DeleteRuleResponse, errors: [ TokenValidationRuleNotFound, TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetConfigurationError = | TokenConfigurationNotFound | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Get a single Token Configuration */ export const getConfiguration: API.OperationMethod< GetConfigurationRequest, GetConfigurationResponse, GetConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetConfigurationRequest, output: GetConfigurationResponse, errors: [ TokenConfigurationNotFound, TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetRuleError = | TokenValidationRuleNotFound | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Get a zone token validation rule. */ export const getRule: API.OperationMethod< GetRuleRequest, GetRuleResponse, GetRuleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetRuleRequest, output: GetRuleResponse, errors: [ TokenValidationRuleNotFound, TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListConfigurationsError = | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Lists all token validation configurations for this zone */ export const listConfigurations: API.PaginatedOperationMethod< ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsError, CloudflareOpContext, ConfigurationListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListConfigurationsRequest, output: ListConfigurationsResponse, errors: [ TokenValidationNotEntitled, 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 ListRulesError = | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** List token validation rules */ export const listRules: API.PaginatedOperationMethod< ListRulesRequest, ListRulesResponse, ListRulesError, CloudflareOpContext, RulesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListRulesRequest, output: ListRulesResponse, errors: [ TokenValidationNotEntitled, 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 PatchConfigurationError = | TokenConfigurationNotFound | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Edit fields of an existing Token Configuration */ export const patchConfiguration: API.OperationMethod< PatchConfigurationRequest, PatchConfigurationResponse, PatchConfigurationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchConfigurationRequest, output: PatchConfigurationResponse, errors: [ TokenConfigurationNotFound, TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchRuleError = | TokenValidationRuleNotFound | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Edit a zone token validation rule. */ export const patchRule: API.OperationMethod< PatchRuleRequest, PatchRuleResponse, PatchRuleError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchRuleRequest, output: PatchRuleResponse, errors: [ TokenValidationRuleNotFound, TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutConfigurationCredentialError = | TokenConfigurationNotFound | TokenValidationNotEntitled | Forbidden | CloudflareOpError; /** Update Token Configuration credentials */ export const putConfigurationCredential: API.OperationMethod< PutConfigurationCredentialRequest, PutConfigurationCredentialResponse, PutConfigurationCredentialError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutConfigurationCredentialRequest, output: PutConfigurationCredentialResponse, errors: [ TokenConfigurationNotFound, TokenValidationNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, }));