import { APIResource } from "../../../core/resource.js"; import * as DEXTestsAPI from "../devices/dex-tests.js"; import { APIPromise } from "../../../core/api-promise.js"; import { PagePromise, V4PagePagination, type V4PagePaginationParams } from "../../../core/pagination.js"; import { RequestOptions } from "../../../internal/request-options.js"; export declare class BaseRules extends APIResource { static readonly _key: readonly ['zeroTrust', 'dex', 'rules']; /** * Create a DEX Rule. * * @example * ```ts * const rule = await client.zeroTrust.dex.rules.create({ * account_id: '01a7362d577a6c3019a474fd6f485823', * match: 'match', * name: 'name', * }); * ``` */ create(params: RuleCreateParams, options?: RequestOptions): APIPromise; /** * Update a DEX Rule. * * @example * ```ts * const rule = await client.zeroTrust.dex.rules.update( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '01a7362d577a6c3019a474fd6f485823' }, * ); * ``` */ update(ruleID: string, params: RuleUpdateParams, options?: RequestOptions): APIPromise; /** * List DEX Rules. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const ruleListResponse of client.zeroTrust.dex.rules.list( * { * account_id: '01a7362d577a6c3019a474fd6f485823', * page: 1, * per_page: 10, * }, * )) { * // ... * } * ``` */ list(params: RuleListParams, options?: RequestOptions): PagePromise; /** * Delete a DEX Rule. * * @example * ```ts * const rule = await client.zeroTrust.dex.rules.delete( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '01a7362d577a6c3019a474fd6f485823' }, * ); * ``` */ delete(ruleID: string, params: RuleDeleteParams, options?: RequestOptions): APIPromise; /** * Get details for a DEX Rule. * * @example * ```ts * const rule = await client.zeroTrust.dex.rules.get( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '01a7362d577a6c3019a474fd6f485823' }, * ); * ``` */ get(ruleID: string, params: RuleGetParams, options?: RequestOptions): APIPromise; } export declare class Rules extends BaseRules { } export type RuleListResponsesV4PagePagination = V4PagePagination; export interface RuleCreateResponse { /** * API Resource UUID tag. */ id: string; created_at: string; match: string; name: string; description?: string; targeted_tests?: Array; updated_at?: string; } export declare namespace RuleCreateResponse { interface TargetedTest { /** * The configuration object which contains the details for the WARP client to * conduct the test. */ data: DEXTestsAPI.SchemaData; enabled: boolean; name: string; test_id: string; } } export interface RuleUpdateResponse { /** * API Resource UUID tag. */ id: string; created_at: string; match: string; name: string; description?: string; targeted_tests?: Array; updated_at?: string; } export declare namespace RuleUpdateResponse { interface TargetedTest { /** * The configuration object which contains the details for the WARP client to * conduct the test. */ data: DEXTestsAPI.SchemaData; enabled: boolean; name: string; test_id: string; } } export interface RuleListResponse { rules?: Array; } export declare namespace RuleListResponse { interface Rule { /** * API Resource UUID tag. */ id: string; created_at: string; match: string; name: string; description?: string; targeted_tests?: Array; updated_at?: string; } namespace Rule { interface TargetedTest { /** * The configuration object which contains the details for the WARP client to * conduct the test. */ data: DEXTestsAPI.SchemaData; enabled: boolean; name: string; test_id: string; } } } export type RuleDeleteResponse = boolean | null; export interface RuleGetResponse { /** * API Resource UUID tag. */ id: string; created_at: string; match: string; name: string; description?: string; targeted_tests?: Array; updated_at?: string; } export declare namespace RuleGetResponse { interface TargetedTest { /** * The configuration object which contains the details for the WARP client to * conduct the test. */ data: DEXTestsAPI.SchemaData; enabled: boolean; name: string; test_id: string; } } export interface RuleCreateParams { /** * Path param: Unique identifier linked to an account. */ account_id: string; /** * Body param: The wirefilter expression to match. */ match: string; /** * Body param: The name of the Rule. */ name: string; /** * Body param */ description?: string; } export interface RuleUpdateParams { /** * Path param: Unique identifier linked to an account. */ account_id: string; /** * Body param */ description?: string; /** * Body param: The wirefilter expression to match. */ match?: string; /** * Body param: The name of the Rule. */ name?: string; } export interface RuleListParams extends V4PagePaginationParams { /** * Path param: Unique identifier linked to an account. */ account_id: string; /** * Query param: Filter results by rule name. */ name?: string; /** * Query param: Which property to sort results by. */ sort_by?: 'name' | 'created_at' | 'updated_at'; /** * Query param: Sort direction for sort_by property. */ sort_order?: 'ASC' | 'DESC'; } export interface RuleDeleteParams { /** * Unique identifier linked to an account. */ account_id: string; } export interface RuleGetParams { /** * Unique identifier linked to an account. */ account_id: string; } export declare namespace Rules { export { type RuleCreateResponse as RuleCreateResponse, type RuleUpdateResponse as RuleUpdateResponse, type RuleListResponse as RuleListResponse, type RuleDeleteResponse as RuleDeleteResponse, type RuleGetResponse as RuleGetResponse, type RuleListResponsesV4PagePagination as RuleListResponsesV4PagePagination, type RuleCreateParams as RuleCreateParams, type RuleUpdateParams as RuleUpdateParams, type RuleListParams as RuleListParams, type RuleDeleteParams as RuleDeleteParams, type RuleGetParams as RuleGetParams, }; } //# sourceMappingURL=rules.d.ts.map