UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

61 lines (52 loc) 1.67 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../../../resource'; import * as Core from '../../../../../core'; import * as PoliciesAPI from '../policies'; import { SplitTunnelIncludesSinglePage } from '../policies'; export class Includes extends APIResource { /** * Sets the list of routes included in the WARP client's tunnel. */ update( params: IncludeUpdateParams, options?: Core.RequestOptions, ): Core.PagePromise<SplitTunnelIncludesSinglePage, PoliciesAPI.SplitTunnelInclude> { const { account_id, body } = params; return this._client.getAPIList( `/accounts/${account_id}/devices/policy/include`, SplitTunnelIncludesSinglePage, { body: body, method: 'put', ...options }, ); } /** * Fetches the list of routes included in the WARP client's tunnel. */ get( params: IncludeGetParams, options?: Core.RequestOptions, ): Core.PagePromise<SplitTunnelIncludesSinglePage, PoliciesAPI.SplitTunnelInclude> { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/devices/policy/include`, SplitTunnelIncludesSinglePage, options, ); } } export interface IncludeUpdateParams { /** * Path param: */ account_id: string; /** * Body param: */ body: Array<PoliciesAPI.SplitTunnelIncludeParam>; } export interface IncludeGetParams { account_id: string; } export declare namespace Includes { export { type IncludeUpdateParams as IncludeUpdateParams, type IncludeGetParams as IncludeGetParams }; } export { SplitTunnelIncludesSinglePage };