// 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> = { createdOn: "created_on", lastUpdated: "last_updated", modifiedOn: "modified_on", perPage: "per_page", previewTarget: "preview_target", requiredTokens: "required_tokens", resultInfo: "result_info", sizeBytes: "size_bytes", totalCount: "total_count", }; export interface CreateAssetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** A short description of the custom asset. */ description: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ name: string; /** The URL where the asset content is fetched from. */ url: string; } export const CreateAssetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), description: S.String, name: S.String, url: S.String, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/custom_pages/assets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAssetForAccountRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateAssetResponse { /** A short description of the custom asset. */ description?: string | null; lastUpdated?: string | null; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ name?: string | null; /** The size of the asset content in bytes. */ sizeBytes?: number | null; /** The URL where the asset content is fetched from. */ url?: string | null; } export const CreateAssetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(S.NullOr(S.String)), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), name: S.optional(S.NullOr(S.String)), sizeBytes: S.optional(S.NullOr(S.Number).pipe(T.Body("size_bytes"))), url: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAssetResponse", }) as any as S.Schema; export interface CreateAssetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** A short description of the custom asset. */ description: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ name: string; /** The URL where the asset content is fetched from. */ url: string; } export const CreateAssetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), description: S.String, name: S.String, url: S.String, }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/custom_pages/assets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateAssetForZoneRequest", }) as any as S.Schema; export interface DeleteAssetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ assetName: string; } export const DeleteAssetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), assetName: S.String.pipe(T.Label("asset_name")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/custom_pages/assets/{asset_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAssetForAccountRequest", }) as any as S.Schema; export interface DeleteAssetForAccountResponse {} export const DeleteAssetForAccountResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAssetForAccountResponse", }) as any as S.Schema; export interface DeleteAssetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ assetName: string; } export const DeleteAssetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), assetName: S.String.pipe(T.Label("asset_name")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/custom_pages/assets/{asset_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAssetForZoneRequest", }) as any as S.Schema; export interface DeleteAssetForZoneResponse {} export const DeleteAssetForZoneResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAssetForZoneResponse", }) as any as S.Schema; export interface GetAssetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ assetName: string; } export const GetAssetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), assetName: S.String.pipe(T.Label("asset_name")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/custom_pages/assets/{asset_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAssetForAccountRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAssetResponse { /** A short description of the custom asset. */ description?: string | null; lastUpdated?: string | null; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ name?: string | null; /** The size of the asset content in bytes. */ sizeBytes?: number | null; /** The URL where the asset content is fetched from. */ url?: string | null; } export const GetAssetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(S.NullOr(S.String)), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), name: S.optional(S.NullOr(S.String)), sizeBytes: S.optional(S.NullOr(S.Number).pipe(T.Body("size_bytes"))), url: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAssetResponse", }) as any as S.Schema; export interface GetAssetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ assetName: string; } export const GetAssetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), assetName: S.String.pipe(T.Label("asset_name")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/custom_pages/assets/{asset_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAssetForZoneRequest", }) as any as S.Schema; export type GetRequestIdentifier = | "1000_errors" | "500_errors" | "basic_challenge" | "country_challenge" | "ip_block" | "managed_challenge" | "ratelimit_block" | "under_attack" | "waf_block" | "waf_challenge"; export const GetRequestIdentifier = /*@__PURE__*/ S.String; export interface GetCustomPageForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** Error Page Types */ identifier: GetRequestIdentifier | (string & {}); } export const GetCustomPageForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: GetRequestIdentifier.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/custom_pages/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCustomPageForAccountRequest", }) as any as S.Schema; export type GetResponseRequiredTokensList = Array; export const GetResponseRequiredTokensList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type GetResponseState = "default" | "customized"; export const GetResponseState = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCustomPageResponse { id?: string | null; createdOn?: string | null; description?: string | null; modifiedOn?: string | null; previewTarget?: string | null; requiredTokens?: GetResponseRequiredTokensList | null; /** The custom page state. */ state?: GetResponseState | null; /** The URL associated with the custom page. */ url?: string | null; } export const GetCustomPageResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), previewTarget: S.optional( S.NullOr(S.String).pipe(T.Body("preview_target")), ), requiredTokens: S.optional( S.NullOr(GetResponseRequiredTokensList).pipe(T.Body("required_tokens")), ), state: S.optional(S.NullOr(GetResponseState)), url: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCustomPageResponse", }) as any as S.Schema; export interface GetCustomPageForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** Error Page Types */ identifier: GetRequestIdentifier | (string & {}); } export const GetCustomPageForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: GetRequestIdentifier.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/custom_pages/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCustomPageForZoneRequest", }) as any as S.Schema; export interface ListAssetsForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; page?: number; perPage?: number; } export const ListAssetsForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/custom_pages/assets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAssetsForAccountRequest", }) as any as S.Schema; export interface AssetsListResultItem { /** A short description of the custom asset. */ description?: string | null; lastUpdated?: string | null; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ name?: string | null; /** The size of the asset content in bytes. */ sizeBytes?: number | null; /** The URL where the asset content is fetched from. */ url?: string | null; } export const AssetsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(S.NullOr(S.String)), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), name: S.optional(S.NullOr(S.String)), sizeBytes: S.optional(S.NullOr(S.Number).pipe(T.Body("size_bytes"))), url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "AssetsListResultItem", }) as any as S.Schema; export type AssetsListResultList = Array; export const AssetsListResultList = /*@__PURE__*/ S.Array( AssetsListResultItem, ) as any as S.Schema; export interface ListAssetsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: AssetsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListAssetsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: AssetsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAssetsResponse", }) as any as S.Schema; export interface ListAssetsForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; page?: number; perPage?: number; } export const ListAssetsForZoneRequest = /*@__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}/custom_pages/assets", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListAssetsForZoneRequest", }) as any as S.Schema; export interface ListCustomPagesForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; } export const ListCustomPagesForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/custom_pages", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCustomPagesForAccountRequest", }) as any as S.Schema; export type ListResultItemRequiredTokensList = Array; export const ListResultItemRequiredTokensList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type ListResultItemState = "default" | "customized"; export const ListResultItemState = /*@__PURE__*/ S.String; export interface ListResultItem { id?: string | null; createdOn?: string | null; description?: string | null; modifiedOn?: string | null; previewTarget?: string | null; requiredTokens?: ListResultItemRequiredTokensList | null; /** The custom page state. */ state?: ListResultItemState | null; /** The URL associated with the custom page. */ url?: string | null; } export const ListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), previewTarget: S.optional( S.NullOr(S.String).pipe(T.Body("preview_target")), ), requiredTokens: S.optional( S.NullOr(ListResultItemRequiredTokensList).pipe( T.Body("required_tokens"), ), ), state: S.optional(S.NullOr(ListResultItemState)), url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListResultItem" }) as any as S.Schema; export type ListResultList = Array; export const ListResultList = /*@__PURE__*/ S.Array( ListResultItem, ) as any as S.Schema; export interface ListCustomPagesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListCustomPagesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCustomPagesResponse", }) as any as S.Schema; export interface ListCustomPagesForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; } export const ListCustomPagesForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/custom_pages", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListCustomPagesForZoneRequest", }) as any as S.Schema; export type UpdateRequestIdentifier = | "1000_errors" | "500_errors" | "basic_challenge" | "country_challenge" | "ip_block" | "managed_challenge" | "ratelimit_block" | "under_attack" | "waf_block" | "waf_challenge"; export const UpdateRequestIdentifier = /*@__PURE__*/ S.String; export type UpdateRequestState = "default" | "customized"; export const UpdateRequestState = /*@__PURE__*/ S.String; export interface PutCustomPageForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** Error Page Types */ identifier: UpdateRequestIdentifier | (string & {}); /** The custom page state. */ state: UpdateRequestState | (string & {}); /** The URL associated with the custom page. */ url: string; } export const PutCustomPageForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: UpdateRequestIdentifier.pipe(T.Label()), state: UpdateRequestState, url: S.String, }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/custom_pages/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutCustomPageForAccountRequest", }) as any as S.Schema; export type UpdateResponseRequiredTokensList = Array; export const UpdateResponseRequiredTokensList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type UpdateResponseState = "default" | "customized"; export const UpdateResponseState = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutCustomPageResponse { id?: string | null; createdOn?: string | null; description?: string | null; modifiedOn?: string | null; previewTarget?: string | null; requiredTokens?: UpdateResponseRequiredTokensList | null; /** The custom page state. */ state?: UpdateResponseState | null; /** The URL associated with the custom page. */ url?: string | null; } export const PutCustomPageResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))), description: S.optional(S.NullOr(S.String)), modifiedOn: S.optional(S.NullOr(S.String).pipe(T.Body("modified_on"))), previewTarget: S.optional( S.NullOr(S.String).pipe(T.Body("preview_target")), ), requiredTokens: S.optional( S.NullOr(UpdateResponseRequiredTokensList).pipe( T.Body("required_tokens"), ), ), state: S.optional(S.NullOr(UpdateResponseState)), url: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutCustomPageResponse", }) as any as S.Schema; export interface PutCustomPageForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** Error Page Types */ identifier: UpdateRequestIdentifier | (string & {}); /** The custom page state. */ state: UpdateRequestState | (string & {}); /** The URL associated with the custom page. */ url: string; } export const PutCustomPageForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), identifier: UpdateRequestIdentifier.pipe(T.Label()), state: UpdateRequestState, url: S.String, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/custom_pages/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutCustomPageForZoneRequest", }) as any as S.Schema; export interface UpdateAssetForAccountRequest { /** The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ assetName: string; /** A short description of the custom asset. */ description: string; /** The URL where the asset content is fetched from. */ url: string; } export const UpdateAssetForAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), assetName: S.String.pipe(T.Label("asset_name")), description: S.String, url: S.String, }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/custom_pages/assets/{asset_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateAssetForAccountRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateAssetResponse { /** A short description of the custom asset. */ description?: string | null; lastUpdated?: string | null; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ name?: string | null; /** The size of the asset content in bytes. */ sizeBytes?: number | null; /** The URL where the asset content is fetched from. */ url?: string | null; } export const UpdateAssetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(S.NullOr(S.String)), lastUpdated: S.optional(S.NullOr(S.String).pipe(T.Body("last_updated"))), name: S.optional(S.NullOr(S.String)), sizeBytes: S.optional(S.NullOr(S.Number).pipe(T.Body("size_bytes"))), url: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateAssetResponse", }) as any as S.Schema; export interface UpdateAssetForZoneRequest { /** The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId: string; /** The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_). */ assetName: string; /** A short description of the custom asset. */ description: string; /** The URL where the asset content is fetched from. */ url: string; } export const UpdateAssetForZoneRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), assetName: S.String.pipe(T.Label("asset_name")), description: S.String, url: S.String, }) .pipe( T.Http({ method: "PUT", uri: "/zones/{zone_id}/custom_pages/assets/{asset_name}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateAssetForZoneRequest", }) as any as S.Schema; export type CreateAssetForAccountError = CloudflareOpError; /** Creates a new custom asset. */ export const createAssetForAccount: API.OperationMethod< CreateAssetForAccountRequest, CreateAssetResponse, CreateAssetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAssetForAccountRequest, output: CreateAssetResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateAssetForZoneError = CloudflareOpError; /** Creates a new custom asset. */ export const createAssetForZone: API.OperationMethod< CreateAssetForZoneRequest, CreateAssetResponse, CreateAssetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateAssetForZoneRequest, output: CreateAssetResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAssetForAccountError = CloudflareOpError; /** Deletes an existing custom asset. */ export const deleteAssetForAccount: API.OperationMethod< DeleteAssetForAccountRequest, DeleteAssetForAccountResponse, DeleteAssetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAssetForAccountRequest, output: DeleteAssetForAccountResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAssetForZoneError = CloudflareOpError; /** Deletes an existing custom asset. */ export const deleteAssetForZone: API.OperationMethod< DeleteAssetForZoneRequest, DeleteAssetForZoneResponse, DeleteAssetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAssetForZoneRequest, output: DeleteAssetForZoneResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAssetForAccountError = CloudflareOpError; /** Fetches the details of a custom asset. */ export const getAssetForAccount: API.OperationMethod< GetAssetForAccountRequest, GetAssetResponse, GetAssetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAssetForAccountRequest, output: GetAssetResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAssetForZoneError = CloudflareOpError; /** Fetches the details of a custom asset. */ export const getAssetForZone: API.OperationMethod< GetAssetForZoneRequest, GetAssetResponse, GetAssetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAssetForZoneRequest, output: GetAssetResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCustomPageForAccountError = CloudflareOpError; /** Fetches the details of a custom page. */ export const getCustomPageForAccount: API.OperationMethod< GetCustomPageForAccountRequest, GetCustomPageResponse, GetCustomPageForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCustomPageForAccountRequest, output: GetCustomPageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCustomPageForZoneError = CloudflareOpError; /** Fetches the details of a custom page. */ export const getCustomPageForZone: API.OperationMethod< GetCustomPageForZoneRequest, GetCustomPageResponse, GetCustomPageForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCustomPageForZoneRequest, output: GetCustomPageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListAssetsForAccountError = CloudflareOpError; /** Fetches all the custom assets. */ export const listAssetsForAccount: API.PaginatedOperationMethod< ListAssetsForAccountRequest, ListAssetsResponse, ListAssetsForAccountError, CloudflareOpContext, AssetsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAssetsForAccountRequest, output: ListAssetsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListAssetsForZoneError = CloudflareOpError; /** Fetches all the custom assets. */ export const listAssetsForZone: API.PaginatedOperationMethod< ListAssetsForZoneRequest, ListAssetsResponse, ListAssetsForZoneError, CloudflareOpContext, AssetsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListAssetsForZoneRequest, output: ListAssetsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListCustomPagesForAccountError = CloudflareOpError; /** Fetches all the custom pages. */ export const listCustomPagesForAccount: API.PaginatedOperationMethod< ListCustomPagesForAccountRequest, ListCustomPagesResponse, ListCustomPagesForAccountError, CloudflareOpContext, ListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListCustomPagesForAccountRequest, output: ListCustomPagesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListCustomPagesForZoneError = CloudflareOpError; /** Fetches all the custom pages. */ export const listCustomPagesForZone: API.PaginatedOperationMethod< ListCustomPagesForZoneRequest, ListCustomPagesResponse, ListCustomPagesForZoneError, CloudflareOpContext, ListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListCustomPagesForZoneRequest, output: ListCustomPagesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PutCustomPageForAccountError = CloudflareOpError; /** Updates the configuration of an existing custom page. */ export const putCustomPageForAccount: API.OperationMethod< PutCustomPageForAccountRequest, PutCustomPageResponse, PutCustomPageForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutCustomPageForAccountRequest, output: PutCustomPageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutCustomPageForZoneError = CloudflareOpError; /** Updates the configuration of an existing custom page. */ export const putCustomPageForZone: API.OperationMethod< PutCustomPageForZoneRequest, PutCustomPageResponse, PutCustomPageForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutCustomPageForZoneRequest, output: PutCustomPageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateAssetForAccountError = CloudflareOpError; /** Updates the configuration of an existing custom asset. */ export const updateAssetForAccount: API.OperationMethod< UpdateAssetForAccountRequest, UpdateAssetResponse, UpdateAssetForAccountError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateAssetForAccountRequest, output: UpdateAssetResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateAssetForZoneError = CloudflareOpError; /** Updates the configuration of an existing custom asset. */ export const updateAssetForZone: API.OperationMethod< UpdateAssetForZoneRequest, UpdateAssetResponse, UpdateAssetForZoneError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateAssetForZoneRequest, output: UpdateAssetResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));