// 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", excludeExactHostname: "exclude_exact_hostname", includeSubdomains: "include_subdomains", modifiedOn: "modified_on", numItems: "num_items", numReferencingFilters: "num_referencing_filters", operationId: "operation_id", preservePathSuffix: "preserve_path_suffix", preserveQueryString: "preserve_query_string", resultInfo: "result_info", sourceUrl: "source_url", statusCode: "status_code", subpathMatching: "subpath_matching", targetUrl: "target_url", urlHostname: "url_hostname", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class ListAlreadyExists extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("ListAlreadyExists", { code: S.Number, message: S.String, }), [{ code: 10021 }], ) {} export class ListNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("ListNotFound", { code: S.Number, message: S.String, }), [{ code: 10001 }], ) {} export type ListsCreateRequestKind = "ip" | "redirect" | "hostname" | "asn"; export const ListsCreateRequestKind = /*@__PURE__*/ S.String; export interface CreateListRequest { /** The Account ID for this resource. */ accountId: string; /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */ kind: ListsCreateRequestKind | (string & {}); /** An informative name for the list. Use this name in filter and rule expressions. */ name: string; /** An informative summary of the list. */ description?: string; } export const CreateListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), kind: ListsCreateRequestKind, name: S.String, description: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/rules/lists", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateListRequest", }) as any as S.Schema; export type ListsCreateResponseKind = "ip" | "redirect" | "hostname" | "asn"; export const ListsCreateResponseKind = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateListResponse { /** The unique ID of the list. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */ kind: ListsCreateResponseKind; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** An informative name for the list. Use this name in filter and rule expressions. */ name: string; /** The number of items in the list. */ numItems: number; /** The number of [filters](/api/resources/filters/) referencing the list. */ numReferencingFilters: number; /** An informative summary of the list. */ description?: string | null; } export const CreateListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), kind: ListsCreateResponseKind, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, numItems: S.Number.pipe(T.Body("num_items")), numReferencingFilters: S.Number.pipe(T.Body("num_referencing_filters")), description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateListResponse", }) as any as S.Schema; export interface ListsItemsCreateRequestBodyItemListsListItemIPComment { /** An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR. */ ip: string; /** Defines an informative summary of the list item. */ comment?: string; } export const ListsItemsCreateRequestBodyItemListsListItemIPComment = /*@__PURE__*/ S.suspend(() => S.Struct({ ip: S.String, comment: S.optional(S.String), }), ).annotate({ identifier: "ListsItemsCreateRequestBodyItemListsListItemIPComment", }) as any as S.Schema; export type ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode = | 301 | 302 | 307 | 308; export const ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode = /*@__PURE__*/ S.Number; export interface ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirect { sourceUrl: string; targetUrl: string; includeSubdomains?: boolean; preservePathSuffix?: boolean; preserveQueryString?: boolean; statusCode?: | ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode | (number & {}); subpathMatching?: boolean; } export const ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirect = /*@__PURE__*/ S.suspend(() => S.Struct({ sourceUrl: S.String.pipe(T.Body("source_url")), targetUrl: S.String.pipe(T.Body("target_url")), includeSubdomains: S.optional( S.Boolean.pipe(T.Body("include_subdomains")), ), preservePathSuffix: S.optional( S.Boolean.pipe(T.Body("preserve_path_suffix")), ), preserveQueryString: S.optional( S.Boolean.pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode.pipe( T.Body("status_code"), ), ), subpathMatching: S.optional(S.Boolean.pipe(T.Body("subpath_matching"))), }), ).annotate({ identifier: "ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirect", }) as any as S.Schema; export interface ListsItemsCreateRequestBodyItemListsListItemRedirectComment { /** The definition of the redirect. */ redirect: ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirect; /** Defines an informative summary of the list item. */ comment?: string; } export const ListsItemsCreateRequestBodyItemListsListItemRedirectComment = /*@__PURE__*/ S.suspend(() => S.Struct({ redirect: ListsItemsCreateRequestBodyItemListsListItemRedirectCommentRedirect, comment: S.optional(S.String), }), ).annotate({ identifier: "ListsItemsCreateRequestBodyItemListsListItemRedirectComment", }) as any as S.Schema; export interface ListsItemsCreateRequestBodyItemListsListItemHostnameCommentHostname { urlHostname: string; /** Only applies to wildcard hostnames (e.g., *.example.com). When true (default), only subdomains are blocked. When false, both the root domain and subdomains are blocked. */ excludeExactHostname?: boolean; } export const ListsItemsCreateRequestBodyItemListsListItemHostnameCommentHostname = /*@__PURE__*/ S.suspend(() => S.Struct({ urlHostname: S.String.pipe(T.Body("url_hostname")), excludeExactHostname: S.optional( S.Boolean.pipe(T.Body("exclude_exact_hostname")), ), }), ).annotate({ identifier: "ListsItemsCreateRequestBodyItemListsListItemHostnameCommentHostname", }) as any as S.Schema; export interface ListsItemsCreateRequestBodyItemListsListItemHostnameComment { /** Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (*), and the hyphen (-). */ hostname: ListsItemsCreateRequestBodyItemListsListItemHostnameCommentHostname; /** Defines an informative summary of the list item. */ comment?: string; } export const ListsItemsCreateRequestBodyItemListsListItemHostnameComment = /*@__PURE__*/ S.suspend(() => S.Struct({ hostname: ListsItemsCreateRequestBodyItemListsListItemHostnameCommentHostname, comment: S.optional(S.String), }), ).annotate({ identifier: "ListsItemsCreateRequestBodyItemListsListItemHostnameComment", }) as any as S.Schema; export interface ListsItemsCreateRequestBodyItemListsListItemASNComment { /** Defines a non-negative 32 bit integer. */ asn: number; /** Defines an informative summary of the list item. */ comment?: string; } export const ListsItemsCreateRequestBodyItemListsListItemASNComment = /*@__PURE__*/ S.suspend(() => S.Struct({ asn: S.Number, comment: S.optional(S.String), }), ).annotate({ identifier: "ListsItemsCreateRequestBodyItemListsListItemASNComment", }) as any as S.Schema; export type ListsItemsCreateRequestBodyItem = | ListsItemsCreateRequestBodyItemListsListItemIPComment | ListsItemsCreateRequestBodyItemListsListItemRedirectComment | ListsItemsCreateRequestBodyItemListsListItemHostnameComment | ListsItemsCreateRequestBodyItemListsListItemASNComment; export const ListsItemsCreateRequestBodyItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["ip", "comment"], ["redirect", "comment"], ["hostname", "comment"], ["asn", "comment"], ]), ); export type ListsItemsCreateRequestBodyList = Array; export const ListsItemsCreateRequestBodyList = /*@__PURE__*/ S.Array( ListsItemsCreateRequestBodyItem, ) as any as S.Schema; export interface CreateListItemRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; body: ListsItemsCreateRequestBodyList; } export const CreateListItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), body: ListsItemsCreateRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/rules/lists/{list_id}/items", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateListItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateListItemResponse { /** The unique operation ID of the asynchronous action. */ operationId: string; } export const CreateListItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ operationId: S.String.pipe(T.Body("operation_id")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateListItemResponse", }) as any as S.Schema; export interface DeleteListRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; } export const DeleteListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/rules/lists/{list_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteListRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteListResponse { /** The unique ID of the list. */ id: string; } export const DeleteListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteListResponse", }) as any as S.Schema; export interface ListsItemsDeleteRequestItemsItem { /** Defines the unique ID of the item in the List. */ id: string; } export const ListsItemsDeleteRequestItemsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }), ).annotate({ identifier: "ListsItemsDeleteRequestItemsItem", }) as any as S.Schema; export type ListsItemsDeleteRequestItemsList = Array; export const ListsItemsDeleteRequestItemsList = /*@__PURE__*/ S.Array( ListsItemsDeleteRequestItemsItem, ) as any as S.Schema; export interface DeleteListItemRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; items?: ListsItemsDeleteRequestItemsList; } export const DeleteListItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), items: S.optional(ListsItemsDeleteRequestItemsList), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/rules/lists/{list_id}/items", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteListItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteListItemResponse { /** The unique operation ID of the asynchronous action. */ operationId: string; } export const DeleteListItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ operationId: S.String.pipe(T.Body("operation_id")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteListItemResponse", }) as any as S.Schema; export interface GetListRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; } export const GetListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rules/lists/{list_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetListRequest" }) as any as S.Schema; export type ListsGetResponseKind = "ip" | "redirect" | "hostname" | "asn"; export const ListsGetResponseKind = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetListResponse { /** The unique ID of the list. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */ kind: ListsGetResponseKind; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** An informative name for the list. Use this name in filter and rule expressions. */ name: string; /** The number of items in the list. */ numItems: number; /** The number of [filters](/api/resources/filters/) referencing the list. */ numReferencingFilters: number; /** An informative summary of the list. */ description?: string | null; } export const GetListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), kind: ListsGetResponseKind, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, numItems: S.Number.pipe(T.Body("num_items")), numReferencingFilters: S.Number.pipe(T.Body("num_referencing_filters")), description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetListResponse", }) as any as S.Schema; export interface GetListBulkOperationRequest { /** The Account ID for this resource. */ accountId: string; /** The unique operation ID of the asynchronous action. */ operationId: string; } export const GetListBulkOperationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), operationId: S.String.pipe(T.Label("operation_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rules/lists/bulk_operations/{operation_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetListBulkOperationRequest", }) as any as S.Schema; export type ListsBulkOperationsGetResultListsBulkOperationPendingOrRunningStatus = | "pending" | "running"; export const ListsBulkOperationsGetResultListsBulkOperationPendingOrRunningStatus = /*@__PURE__*/ S.String; export interface ListsBulkOperationsGetResultListsBulkOperationPendingOrRunning { /** The unique operation ID of the asynchronous action. */ id: string; /** The current status of the asynchronous operation. */ status: ListsBulkOperationsGetResultListsBulkOperationPendingOrRunningStatus; } export const ListsBulkOperationsGetResultListsBulkOperationPendingOrRunning = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, status: ListsBulkOperationsGetResultListsBulkOperationPendingOrRunningStatus, }), ).annotate({ identifier: "ListsBulkOperationsGetResultListsBulkOperationPendingOrRunning", }) as any as S.Schema; export type ListsBulkOperationsGetResultListsBulkOperationCompletedStatus = "completed"; export const ListsBulkOperationsGetResultListsBulkOperationCompletedStatus = /*@__PURE__*/ S.String; export interface ListsBulkOperationsGetResultListsBulkOperationCompleted { /** The unique operation ID of the asynchronous action. */ id: string; /** The RFC 3339 timestamp of when the operation was completed. */ completed: string; /** The current status of the asynchronous operation. */ status: ListsBulkOperationsGetResultListsBulkOperationCompletedStatus; } export const ListsBulkOperationsGetResultListsBulkOperationCompleted = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, completed: S.String, status: ListsBulkOperationsGetResultListsBulkOperationCompletedStatus, }), ).annotate({ identifier: "ListsBulkOperationsGetResultListsBulkOperationCompleted", }) as any as S.Schema; export type ListsBulkOperationsGetResultListsBulkOperationFailedStatus = "failed"; export const ListsBulkOperationsGetResultListsBulkOperationFailedStatus = /*@__PURE__*/ S.String; export interface ListsBulkOperationsGetResultListsBulkOperationFailed { /** The unique operation ID of the asynchronous action. */ id: string; /** The RFC 3339 timestamp of when the operation was completed. */ completed: string; /** A message describing the error when the status is `failed`. */ error: string; /** The current status of the asynchronous operation. */ status: ListsBulkOperationsGetResultListsBulkOperationFailedStatus; } export const ListsBulkOperationsGetResultListsBulkOperationFailed = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, completed: S.String, error: S.String, status: ListsBulkOperationsGetResultListsBulkOperationFailedStatus, }), ).annotate({ identifier: "ListsBulkOperationsGetResultListsBulkOperationFailed", }) as any as S.Schema; export type ListsBulkOperationsGetResult = | ListsBulkOperationsGetResultListsBulkOperationPendingOrRunning | ListsBulkOperationsGetResultListsBulkOperationCompleted | ListsBulkOperationsGetResultListsBulkOperationFailed; export const ListsBulkOperationsGetResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["id", "status"], ["id", "completed", "status"], ["id", "completed", "error", "status"], ]), ); export type GetListBulkOperationResponse = ListsBulkOperationsGetResult; export const GetListBulkOperationResponse = /*@__PURE__*/ S.suspend(() => ListsBulkOperationsGetResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "GetListBulkOperationResponse", }) as any as S.Schema; export interface GetListItemRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; /** Defines the unique ID of the item in the List. */ itemId: string; } export const GetListItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), itemId: S.String.pipe(T.Label("item_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rules/lists/{list_id}/items/{item_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetListItemRequest", }) as any as S.Schema; export interface ListsItemsGetResultListsListItemIPFull { /** Defines the unique ID of the item in the List. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** An IPv4 address, an IPv4 CIDR, an IPv6 address, or an IPv6 CIDR. */ ip: string; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** Defines an informative summary of the list item. */ comment?: string | null; } export const ListsItemsGetResultListsListItemIPFull = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), ip: S.String, modifiedOn: S.String.pipe(T.Body("modified_on")), comment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListsItemsGetResultListsListItemIPFull", }) as any as S.Schema; export interface ListsItemsGetResultListsListItemHostnameFullHostname { urlHostname: string; /** Only applies to wildcard hostnames (e.g., *.example.com). When true (default), only subdomains are blocked. When false, both the root domain and subdomains are blocked. */ excludeExactHostname?: boolean | null; } export const ListsItemsGetResultListsListItemHostnameFullHostname = /*@__PURE__*/ S.suspend(() => S.Struct({ urlHostname: S.String.pipe(T.Body("url_hostname")), excludeExactHostname: S.optional( S.NullOr(S.Boolean).pipe(T.Body("exclude_exact_hostname")), ), }), ).annotate({ identifier: "ListsItemsGetResultListsListItemHostnameFullHostname", }) as any as S.Schema; export interface ListsItemsGetResultListsListItemHostnameFull { /** Defines the unique ID of the item in the List. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (*), and the hyphen (-). */ hostname: ListsItemsGetResultListsListItemHostnameFullHostname; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** Defines an informative summary of the list item. */ comment?: string | null; } export const ListsItemsGetResultListsListItemHostnameFull = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), hostname: ListsItemsGetResultListsListItemHostnameFullHostname, modifiedOn: S.String.pipe(T.Body("modified_on")), comment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListsItemsGetResultListsListItemHostnameFull", }) as any as S.Schema; export type ListsItemsGetResultListsListItemRedirectFullRedirectStatusCode = | 301 | 302 | 307 | 308; export const ListsItemsGetResultListsListItemRedirectFullRedirectStatusCode = /*@__PURE__*/ S.Number; export interface ListsItemsGetResultListsListItemRedirectFullRedirect { sourceUrl: string; targetUrl: string; includeSubdomains?: boolean | null; preservePathSuffix?: boolean | null; preserveQueryString?: boolean | null; statusCode?: ListsItemsGetResultListsListItemRedirectFullRedirectStatusCode | null; subpathMatching?: boolean | null; } export const ListsItemsGetResultListsListItemRedirectFullRedirect = /*@__PURE__*/ S.suspend(() => S.Struct({ sourceUrl: S.String.pipe(T.Body("source_url")), targetUrl: S.String.pipe(T.Body("target_url")), includeSubdomains: S.optional( S.NullOr(S.Boolean).pipe(T.Body("include_subdomains")), ), preservePathSuffix: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_path_suffix")), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( ListsItemsGetResultListsListItemRedirectFullRedirectStatusCode, ).pipe(T.Body("status_code")), ), subpathMatching: S.optional( S.NullOr(S.Boolean).pipe(T.Body("subpath_matching")), ), }), ).annotate({ identifier: "ListsItemsGetResultListsListItemRedirectFullRedirect", }) as any as S.Schema; export interface ListsItemsGetResultListsListItemRedirectFull { /** Defines the unique ID of the item in the List. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** The definition of the redirect. */ redirect: ListsItemsGetResultListsListItemRedirectFullRedirect; /** Defines an informative summary of the list item. */ comment?: string | null; } export const ListsItemsGetResultListsListItemRedirectFull = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), redirect: ListsItemsGetResultListsListItemRedirectFullRedirect, comment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListsItemsGetResultListsListItemRedirectFull", }) as any as S.Schema; export interface ListsItemsGetResultListsListItemASNFull { /** Defines the unique ID of the item in the List. */ id: string; /** Defines a non-negative 32 bit integer. */ asn: number; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** Defines an informative summary of the list item. */ comment?: string | null; } export const ListsItemsGetResultListsListItemASNFull = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, asn: S.Number, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), comment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListsItemsGetResultListsListItemASNFull", }) as any as S.Schema; export type ListsItemsGetResult = | ListsItemsGetResultListsListItemIPFull | ListsItemsGetResultListsListItemHostnameFull | ListsItemsGetResultListsListItemRedirectFull | ListsItemsGetResultListsListItemASNFull; export const ListsItemsGetResult = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["id", "createdOn", "ip", "modifiedOn", "comment"], ["id", "createdOn", "hostname", "modifiedOn", "comment"], ["id", "createdOn", "modifiedOn", "redirect", "comment"], ["id", "asn", "createdOn", "modifiedOn", "comment"], ]), ); export type GetListItemResponse = ListsItemsGetResult; export const GetListItemResponse = /*@__PURE__*/ S.suspend(() => ListsItemsGetResult.pipe( T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY), ), ).annotate({ identifier: "GetListItemResponse", }) as any as S.Schema; export interface ListListItemsRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; /** The pagination cursor. An opaque string token indicating the position from which to continue when requesting the next/previous set of records. Cursor values are provided under `result_info.cursors` in the response. You should make no assumptions about a cursor's content or length. */ cursor?: string; /** Amount of results to include in each paginated response. A non-negative 32 bit integer. */ perPage?: number; /** A search query to filter returned items. Its meaning depends on the list type: IP addresses must start with the provided string, hostnames and bulk redirects must contain the string, and ASNs must match the string exactly. */ search?: string; } export const ListListItemsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), cursor: S.optional(S.String.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), search: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rules/lists/{list_id}/items", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListListItemsRequest", }) as any as S.Schema; export type ListsItemsListResultItemListsListItemIPFull = ListsItemsGetResultListsListItemIPFull; export const ListsItemsListResultItemListsListItemIPFull = ListsItemsGetResultListsListItemIPFull; export type ListsItemsListResultItemListsListItemHostnameFullHostname = ListsItemsGetResultListsListItemHostnameFullHostname; export const ListsItemsListResultItemListsListItemHostnameFullHostname = ListsItemsGetResultListsListItemHostnameFullHostname; export type ListsItemsListResultItemListsListItemHostnameFull = ListsItemsGetResultListsListItemHostnameFull; export const ListsItemsListResultItemListsListItemHostnameFull = ListsItemsGetResultListsListItemHostnameFull; export type ListsItemsListResultItemListsListItemRedirectFullRedirectStatusCode = | 301 | 302 | 307 | 308; export const ListsItemsListResultItemListsListItemRedirectFullRedirectStatusCode = /*@__PURE__*/ S.Number; export interface ListsItemsListResultItemListsListItemRedirectFullRedirect { sourceUrl: string; targetUrl: string; includeSubdomains?: boolean | null; preservePathSuffix?: boolean | null; preserveQueryString?: boolean | null; statusCode?: ListsItemsListResultItemListsListItemRedirectFullRedirectStatusCode | null; subpathMatching?: boolean | null; } export const ListsItemsListResultItemListsListItemRedirectFullRedirect = /*@__PURE__*/ S.suspend(() => S.Struct({ sourceUrl: S.String.pipe(T.Body("source_url")), targetUrl: S.String.pipe(T.Body("target_url")), includeSubdomains: S.optional( S.NullOr(S.Boolean).pipe(T.Body("include_subdomains")), ), preservePathSuffix: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_path_suffix")), ), preserveQueryString: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( S.NullOr( ListsItemsListResultItemListsListItemRedirectFullRedirectStatusCode, ).pipe(T.Body("status_code")), ), subpathMatching: S.optional( S.NullOr(S.Boolean).pipe(T.Body("subpath_matching")), ), }), ).annotate({ identifier: "ListsItemsListResultItemListsListItemRedirectFullRedirect", }) as any as S.Schema; export interface ListsItemsListResultItemListsListItemRedirectFull { /** Defines the unique ID of the item in the List. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** The definition of the redirect. */ redirect: ListsItemsListResultItemListsListItemRedirectFullRedirect; /** Defines an informative summary of the list item. */ comment?: string | null; } export const ListsItemsListResultItemListsListItemRedirectFull = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), modifiedOn: S.String.pipe(T.Body("modified_on")), redirect: ListsItemsListResultItemListsListItemRedirectFullRedirect, comment: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListsItemsListResultItemListsListItemRedirectFull", }) as any as S.Schema; export type ListsItemsListResultItemListsListItemASNFull = ListsItemsGetResultListsListItemASNFull; export const ListsItemsListResultItemListsListItemASNFull = ListsItemsGetResultListsListItemASNFull; export type ListsItemsListResultItem = | ListsItemsGetResultListsListItemIPFull | ListsItemsGetResultListsListItemHostnameFull | ListsItemsListResultItemListsListItemRedirectFull | ListsItemsGetResultListsListItemASNFull; export const ListsItemsListResultItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["id", "createdOn", "ip", "modifiedOn", "comment"], ["id", "createdOn", "hostname", "modifiedOn", "comment"], ["id", "createdOn", "modifiedOn", "redirect", "comment"], ["id", "asn", "createdOn", "modifiedOn", "comment"], ]), ); export type ListsItemsListResultList = Array; export const ListsItemsListResultList = /*@__PURE__*/ S.Array( ListsItemsListResultItem, ) as any as S.Schema; export interface ListListItemsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListsItemsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListListItemsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ListsItemsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListListItemsResponse", }) as any as S.Schema; export interface ListListsRequest { /** The Account ID for this resource. */ accountId: string; } export const ListListsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/rules/lists", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListListsRequest", }) as any as S.Schema; export type ListsListResultItemKind = "ip" | "redirect" | "hostname" | "asn"; export const ListsListResultItemKind = /*@__PURE__*/ S.String; export interface ListsListResultItem { /** The unique ID of the list. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */ kind: ListsListResultItemKind; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** An informative name for the list. Use this name in filter and rule expressions. */ name: string; /** The number of items in the list. */ numItems: number; /** The number of [filters](/api/resources/filters/) referencing the list. */ numReferencingFilters: number; /** An informative summary of the list. */ description?: string | null; } export const ListsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), kind: ListsListResultItemKind, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, numItems: S.Number.pipe(T.Body("num_items")), numReferencingFilters: S.Number.pipe(T.Body("num_referencing_filters")), description: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ListsListResultItem", }) as any as S.Schema; export type ListsListResultList = Array; export const ListsListResultList = /*@__PURE__*/ S.Array( ListsListResultItem, ) as any as S.Schema; export interface ListListsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListListsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ListsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListListsResponse", }) as any as S.Schema; export interface UpdateListRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; /** An informative summary of the list. */ description?: string; } export const UpdateListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), description: S.optional(S.String), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/rules/lists/{list_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateListRequest", }) as any as S.Schema; export type ListsUpdateResponseKind = "ip" | "redirect" | "hostname" | "asn"; export const ListsUpdateResponseKind = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateListResponse { /** The unique ID of the list. */ id: string; /** The RFC 3339 timestamp of when the list was created. */ createdOn: string; /** The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). */ kind: ListsUpdateResponseKind; /** The RFC 3339 timestamp of when the list was last modified. */ modifiedOn: string; /** An informative name for the list. Use this name in filter and rule expressions. */ name: string; /** The number of items in the list. */ numItems: number; /** The number of [filters](/api/resources/filters/) referencing the list. */ numReferencingFilters: number; /** An informative summary of the list. */ description?: string | null; } export const UpdateListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdOn: S.String.pipe(T.Body("created_on")), kind: ListsUpdateResponseKind, modifiedOn: S.String.pipe(T.Body("modified_on")), name: S.String, numItems: S.Number.pipe(T.Body("num_items")), numReferencingFilters: S.Number.pipe(T.Body("num_referencing_filters")), description: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateListResponse", }) as any as S.Schema; export type ListsItemsUpdateRequestBodyItemListsListItemIPComment = ListsItemsCreateRequestBodyItemListsListItemIPComment; export const ListsItemsUpdateRequestBodyItemListsListItemIPComment = ListsItemsCreateRequestBodyItemListsListItemIPComment; export type ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode = | 301 | 302 | 307 | 308; export const ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode = /*@__PURE__*/ S.Number; export interface ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirect { sourceUrl: string; targetUrl: string; includeSubdomains?: boolean; preservePathSuffix?: boolean; preserveQueryString?: boolean; statusCode?: | ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode | (number & {}); subpathMatching?: boolean; } export const ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirect = /*@__PURE__*/ S.suspend(() => S.Struct({ sourceUrl: S.String.pipe(T.Body("source_url")), targetUrl: S.String.pipe(T.Body("target_url")), includeSubdomains: S.optional( S.Boolean.pipe(T.Body("include_subdomains")), ), preservePathSuffix: S.optional( S.Boolean.pipe(T.Body("preserve_path_suffix")), ), preserveQueryString: S.optional( S.Boolean.pipe(T.Body("preserve_query_string")), ), statusCode: S.optional( ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirectStatusCode.pipe( T.Body("status_code"), ), ), subpathMatching: S.optional(S.Boolean.pipe(T.Body("subpath_matching"))), }), ).annotate({ identifier: "ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirect", }) as any as S.Schema; export interface ListsItemsUpdateRequestBodyItemListsListItemRedirectComment { /** The definition of the redirect. */ redirect: ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirect; /** Defines an informative summary of the list item. */ comment?: string; } export const ListsItemsUpdateRequestBodyItemListsListItemRedirectComment = /*@__PURE__*/ S.suspend(() => S.Struct({ redirect: ListsItemsUpdateRequestBodyItemListsListItemRedirectCommentRedirect, comment: S.optional(S.String), }), ).annotate({ identifier: "ListsItemsUpdateRequestBodyItemListsListItemRedirectComment", }) as any as S.Schema; export type ListsItemsUpdateRequestBodyItemListsListItemHostnameCommentHostname = ListsItemsCreateRequestBodyItemListsListItemHostnameCommentHostname; export const ListsItemsUpdateRequestBodyItemListsListItemHostnameCommentHostname = ListsItemsCreateRequestBodyItemListsListItemHostnameCommentHostname; export type ListsItemsUpdateRequestBodyItemListsListItemHostnameComment = ListsItemsCreateRequestBodyItemListsListItemHostnameComment; export const ListsItemsUpdateRequestBodyItemListsListItemHostnameComment = ListsItemsCreateRequestBodyItemListsListItemHostnameComment; export type ListsItemsUpdateRequestBodyItemListsListItemASNComment = ListsItemsCreateRequestBodyItemListsListItemASNComment; export const ListsItemsUpdateRequestBodyItemListsListItemASNComment = ListsItemsCreateRequestBodyItemListsListItemASNComment; export type ListsItemsUpdateRequestBodyItem = | ListsItemsCreateRequestBodyItemListsListItemIPComment | ListsItemsUpdateRequestBodyItemListsListItemRedirectComment | ListsItemsCreateRequestBodyItemListsListItemHostnameComment | ListsItemsCreateRequestBodyItemListsListItemASNComment; export const ListsItemsUpdateRequestBodyItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["ip", "comment"], ["redirect", "comment"], ["hostname", "comment"], ["asn", "comment"], ]), ); export type ListsItemsUpdateRequestBodyList = Array; export const ListsItemsUpdateRequestBodyList = /*@__PURE__*/ S.Array( ListsItemsUpdateRequestBodyItem, ) as any as S.Schema; export interface UpdateListItemRequest { /** The Account ID for this resource. */ accountId: string; /** The unique ID of the list. */ listId: string; body: ListsItemsUpdateRequestBodyList; } export const UpdateListItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), listId: S.String.pipe(T.Label("list_id")), body: ListsItemsUpdateRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/rules/lists/{list_id}/items", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateListItemRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateListItemResponse { /** The unique operation ID of the asynchronous action. */ operationId: string; } export const UpdateListItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ operationId: S.String.pipe(T.Body("operation_id")), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateListItemResponse", }) as any as S.Schema; export type CreateListError = ListAlreadyExists | Forbidden | CloudflareOpError; /** Creates a new list of the specified kind. */ export const createList: API.OperationMethod< CreateListRequest, CreateListResponse, CreateListError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateListRequest, output: CreateListResponse, errors: [ ListAlreadyExists, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateListItemError = CloudflareOpError; /** Appends new items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected. */ export const createListItem: API.OperationMethod< CreateListItemRequest, CreateListItemResponse, CreateListItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateListItemRequest, output: CreateListItemResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteListError = ListNotFound | Forbidden | CloudflareOpError; /** Deletes a specific list and all its items. */ export const deleteList: API.OperationMethod< DeleteListRequest, DeleteListResponse, DeleteListError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteListRequest, output: DeleteListResponse, errors: [ListNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteListItemError = CloudflareOpError; /** Removes one or more items from a list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected. */ export const deleteListItem: API.OperationMethod< DeleteListItemRequest, DeleteListItemResponse, DeleteListItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteListItemRequest, output: DeleteListItemResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetListError = ListNotFound | Forbidden | CloudflareOpError; /** Fetches the details of a list. */ export const getList: API.OperationMethod< GetListRequest, GetListResponse, GetListError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetListRequest, output: GetListResponse, errors: [ListNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetListBulkOperationError = | ListNotFound | Forbidden | CloudflareOpError; /** Gets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error. */ export const getListBulkOperation: API.OperationMethod< GetListBulkOperationRequest, GetListBulkOperationResponse, GetListBulkOperationError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetListBulkOperationRequest, output: GetListBulkOperationResponse, errors: [ListNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetListItemError = CloudflareOpError; /** Fetches a list item in the list. */ export const getListItem: API.OperationMethod< GetListItemRequest, GetListItemResponse, GetListItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetListItemRequest, output: GetListItemResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListListItemsError = ListNotFound | Forbidden | CloudflareOpError; /** Fetches all the items in the list. */ export const listListItems: API.PaginatedOperationMethod< ListListItemsRequest, ListListItemsResponse, ListListItemsError, CloudflareOpContext, ListsItemsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListListItemsRequest, output: ListListItemsResponse, errors: [ListNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "cursor", inputToken: "cursor", outputToken: "resultInfo.cursors.after", items: "result", } as const, }), cloudflarePaginate, ) as any; export type ListListsError = Forbidden | CloudflareOpError; /** Fetches all lists in the account. */ export const listLists: API.PaginatedOperationMethod< ListListsRequest, ListListsResponse, ListListsError, CloudflareOpContext, ListsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListListsRequest, output: ListListsResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type UpdateListError = ListNotFound | Forbidden | CloudflareOpError; /** Updates the description of a list. */ export const updateList: API.OperationMethod< UpdateListRequest, UpdateListResponse, UpdateListError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateListRequest, output: UpdateListResponse, errors: [ListNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateListItemError = ListNotFound | Forbidden | CloudflareOpError; /** Removes all existing items from the list and adds the provided items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected. */ export const updateListItem: API.OperationMethod< UpdateListItemRequest, UpdateListItemResponse, UpdateListItemError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateListItemRequest, output: UpdateListItemResponse, errors: [ListNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));