cloudflare
Version:
The official TypeScript library for the Cloudflare API
160 lines • 4.57 kB
text/typescript
import { APIResource } from "../../../../../core/resource.mjs";
import { APIPromise } from "../../../../../core/api-promise.mjs";
import { RequestOptions } from "../../../../../internal/request-options.mjs";
export declare class BaseItems extends APIResource {
static readonly _key: readonly [
'DDoSProtection',
'advancedTCPProtection',
'synProtection',
'filters',
'items'
];
/**
* Delete a SYN Protection filter specified by the given UUID.
*
* @example
* ```ts
* const item =
* await client.DDoSProtection.advancedTCPProtection.synProtection.filters.items.delete(
* 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
delete(filterID: string, params: ItemDeleteParams, options?: RequestOptions): APIPromise<ItemDeleteResponse>;
/**
* Update a SYN Protection filter specified by the given UUID.
*
* @example
* ```ts
* const response =
* await client.DDoSProtection.advancedTCPProtection.synProtection.filters.items.edit(
* 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
edit(filterID: string, params: ItemEditParams, options?: RequestOptions): APIPromise<ItemEditResponse>;
/**
* Get a SYN Protection filter specified by the given UUID.
*
* @example
* ```ts
* const item =
* await client.DDoSProtection.advancedTCPProtection.synProtection.filters.items.get(
* 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(filterID: 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 expression filter.
*/
id: string;
/**
* The creation timestamp of the expression filter.
*/
created_on: string;
/**
* The filter expression.
*/
expression: string;
/**
* The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
*/
mode: string;
/**
* The last modification timestamp of the expression filter.
*/
modified_on: string;
}
export interface ItemGetResponse {
/**
* The unique ID of the expression filter.
*/
id: string;
/**
* The creation timestamp of the expression filter.
*/
created_on: string;
/**
* The filter expression.
*/
expression: string;
/**
* The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
*/
mode: string;
/**
* The last modification timestamp of the expression filter.
*/
modified_on: 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 filter expression. Optional.
*/
expression?: string;
/**
* Body param: The new mode for the filter. Optional. Must be one of 'enabled',
* 'disabled', 'monitoring'.
*/
mode?: 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.mts.map