UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

61 lines • 1.88 kB
import { APIResource } from "../../../core/resource.mjs"; import { APIPromise } from "../../../core/api-promise.mjs"; import { RequestOptions } from "../../../internal/request-options.mjs"; export declare class BaseStatus extends APIResource { static readonly _key: readonly ['DDoSProtection', 'advancedTCPProtection', 'status']; /** * Update the protection status of the account. * * @example * ```ts * const response = * await client.DDoSProtection.advancedTCPProtection.status.edit( * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * enabled: true, * }, * ); * ``` */ edit(params: StatusEditParams, options?: RequestOptions): APIPromise<StatusEditResponse>; /** * Get the protection status of the account. * * @example * ```ts * const status = * await client.DDoSProtection.advancedTCPProtection.status.get( * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(params: StatusGetParams, options?: RequestOptions): APIPromise<StatusGetResponse>; } export declare class Status extends BaseStatus { } export interface StatusEditResponse { enabled: boolean; } export interface StatusGetResponse { enabled: boolean; } export interface StatusEditParams { /** * Path param: The account ID. */ account_id: string; /** * Body param: Enables or disables protection. */ enabled: boolean; } export interface StatusGetParams { /** * The account ID. */ account_id: string; } export declare namespace Status { export { type StatusEditResponse as StatusEditResponse, type StatusGetResponse as StatusGetResponse, type StatusEditParams as StatusEditParams, type StatusGetParams as StatusGetParams, }; } //# sourceMappingURL=status.d.mts.map