UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

213 lines • 6.46 kB
import { APIResource } from "../../../../../core/resource.js"; import { APIPromise } from "../../../../../core/api-promise.js"; import { RequestOptions } from "../../../../../internal/request-options.js"; export declare class BaseItems extends APIResource { static readonly _key: readonly [ 'DDoSProtection', 'advancedTCPProtection', 'synProtection', 'rules', 'items' ]; /** * Delete a SYN Protection rule specified by the given UUID. * * @example * ```ts * const item = * await client.DDoSProtection.advancedTCPProtection.synProtection.rules.items.delete( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(ruleID: string, params: ItemDeleteParams, options?: RequestOptions): APIPromise<ItemDeleteResponse>; /** * Update a SYN Protection rule specified by the given UUID. * * @example * ```ts * const response = * await client.DDoSProtection.advancedTCPProtection.synProtection.rules.items.edit( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ edit(ruleID: string, params: ItemEditParams, options?: RequestOptions): APIPromise<ItemEditResponse>; /** * Get a SYN Protection rule specified by the given UUID. * * @example * ```ts * const item = * await client.DDoSProtection.advancedTCPProtection.synProtection.rules.items.get( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(ruleID: string, params: ItemGetParams, options?: RequestOptions): APIPromise<ItemGetResponse>; } export declare class Items extends BaseItems { } export interface ItemDeleteResponse { errors: Array<ItemDeleteResponse.Error>; messages: Array<ItemDeleteResponse.Message>; /** * Whether the API call was successful. */ success: true; } export declare namespace ItemDeleteResponse { interface Error { code: number; message: string; documentation_url?: string; source?: Error.Source; } namespace Error { interface Source { pointer?: string; } } interface Message { code: number; message: string; documentation_url?: string; source?: Message.Source; } namespace Message { interface Source { pointer?: string; } } } export interface ItemEditResponse { /** * The unique ID of the SYN Protection rule. */ id: string; /** * The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burst_sensitivity: string; /** * The creation timestamp of the SYN Protection rule. */ created_on: string; /** * The type of mitigation for SYN Protection. Must be one of 'challenge' or * 'retransmit'. */ mitigation_type: string; /** * The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** * The last modification timestamp of the SYN Protection rule. */ modified_on: string; /** * The name of the SYN Protection rule. Value is relative to the 'scope' setting. * For 'global' scope, name should be 'global'. For either the 'region' or * 'datacenter' scope, name should be the actual name of the region or datacenter, * e.g., 'wnam' or 'lax'. */ name: string; /** * The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rate_sensitivity: string; /** * The scope for the SYN Protection rule. Must be one of 'global', 'region', or * 'datacenter'. */ scope: string; } export interface ItemGetResponse { /** * The unique ID of the SYN Protection rule. */ id: string; /** * The burst sensitivity. Must be one of 'low', 'medium', 'high'. */ burst_sensitivity: string; /** * The creation timestamp of the SYN Protection rule. */ created_on: string; /** * The type of mitigation for SYN Protection. Must be one of 'challenge' or * 'retransmit'. */ mitigation_type: string; /** * The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. */ mode: string; /** * The last modification timestamp of the SYN Protection rule. */ modified_on: string; /** * The name of the SYN Protection rule. Value is relative to the 'scope' setting. * For 'global' scope, name should be 'global'. For either the 'region' or * 'datacenter' scope, name should be the actual name of the region or datacenter, * e.g., 'wnam' or 'lax'. */ name: string; /** * The rate sensitivity. Must be one of 'low', 'medium', 'high'. */ rate_sensitivity: string; /** * The scope for the SYN Protection rule. Must be one of 'global', 'region', or * 'datacenter'. */ scope: string; } export interface ItemDeleteParams { /** * The ID of the account. */ account_id: string; } export interface ItemEditParams { /** * Path param: The ID of the account. */ account_id: string; /** * Body param: The new burst sensitivity. Optional. Must be one of 'low', 'medium', * 'high'. */ burst_sensitivity?: string; /** * Body param: The new mitigation type. Optional. Must be one of 'challenge' or * 'retransmit'. */ mitigation_type?: string; /** * Body param: The new mode for SYN Protection. Optional. Must be one of 'enabled', * 'disabled', 'monitoring'. */ mode?: string; /** * Body param: The new rate sensitivity. Optional. Must be one of 'low', 'medium', * 'high'. */ rate_sensitivity?: string; } export interface ItemGetParams { /** * The ID of the account. */ account_id: string; } export declare namespace Items { export { type ItemDeleteResponse as ItemDeleteResponse, type ItemEditResponse as ItemEditResponse, type ItemGetResponse as ItemGetResponse, type ItemDeleteParams as ItemDeleteParams, type ItemEditParams as ItemEditParams, type ItemGetParams as ItemGetParams, }; } //# sourceMappingURL=items.d.ts.map