import { APIResource } from "../../../../../core/resource.js"; import * as PoliciesAPI from "../policies.js"; import { SettingsPoliciesSinglePage } from "../policies.js"; import * as ExcludesAPI from "./excludes.js"; import { BaseExcludes, ExcludeGetParams, ExcludeUpdateParams, Excludes } from "./excludes.js"; import * as FallbackDomainsAPI from "./fallback-domains.js"; import { BaseFallbackDomains, FallbackDomainGetParams, FallbackDomainUpdateParams, FallbackDomains } from "./fallback-domains.js"; import * as IncludesAPI from "./includes.js"; import { BaseIncludes, IncludeGetParams, IncludeUpdateParams, Includes } from "./includes.js"; import { APIPromise } from "../../../../../core/api-promise.js"; import { PagePromise } from "../../../../../core/pagination.js"; import { RequestOptions } from "../../../../../internal/request-options.js"; export declare class BaseCustom extends APIResource { static readonly _key: readonly ['zeroTrust', 'devices', 'policies', 'custom']; /** * Creates a device settings profile to be applied to certain devices matching the * criteria. * * @example * ```ts * const settingsPolicy = * await client.zeroTrust.devices.policies.custom.create({ * account_id: '699d98642c564d2e855e9661899b7252', * match: 'identity.email == "test@cloudflare.com"', * name: 'Allow Developers', * precedence: 100, * }); * ``` */ create(params: CustomCreateParams, options?: RequestOptions): APIPromise; /** * Fetches a list of the device settings profiles for an account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const settingsPolicy of client.zeroTrust.devices.policies.custom.list( * { account_id: '699d98642c564d2e855e9661899b7252' }, * )) { * // ... * } * ``` */ list(params: CustomListParams, options?: RequestOptions): PagePromise; /** * Deletes a device settings profile and fetches a list of the remaining profiles * for an account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const settingsPolicy of client.zeroTrust.devices.policies.custom.delete( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '699d98642c564d2e855e9661899b7252' }, * )) { * // ... * } * ``` */ delete(policyID: string, params: CustomDeleteParams, options?: RequestOptions): PagePromise; /** * Updates a configured device settings profile. * * @example * ```ts * const settingsPolicy = * await client.zeroTrust.devices.policies.custom.edit( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '699d98642c564d2e855e9661899b7252' }, * ); * ``` */ edit(policyID: string, params: CustomEditParams, options?: RequestOptions): APIPromise; /** * Fetches a device settings profile by ID. * * @example * ```ts * const settingsPolicy = * await client.zeroTrust.devices.policies.custom.get( * 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', * { account_id: '699d98642c564d2e855e9661899b7252' }, * ); * ``` */ get(policyID: string, params: CustomGetParams, options?: RequestOptions): APIPromise; } export declare class Custom extends BaseCustom { excludes: ExcludesAPI.Excludes; includes: IncludesAPI.Includes; fallbackDomains: FallbackDomainsAPI.FallbackDomains; } export interface CustomCreateParams { /** * Path param */ account_id: string; /** * Body param: The wirefilter expression to match devices. Available values: * "identity.email", "identity.groups.id", "identity.groups.name", * "identity.groups.email", "identity.service_token_uuid", * "identity.saml_attributes", "network", "os.name", "os.version". */ match: string; /** * Body param: The name of the device settings profile. */ name: string; /** * Body param: The precedence of the policy. Lower values indicate higher * precedence. Policies will be evaluated in ascending order of this field. */ precedence: number; /** * Body param: Whether to allow the user to switch WARP between modes. */ allow_mode_switch?: boolean; /** * Body param: Whether to receive update notifications when a new version of the * client is available. */ allow_updates?: boolean; /** * Body param: Whether to allow devices to leave the organization. */ allowed_to_leave?: boolean; /** * Body param: The amount of time in seconds to reconnect after having been * disabled. */ auto_connect?: number; /** * Body param: Turn on the captive portal after the specified amount of time. */ captive_portal?: number; /** * Body param: A description of the policy. */ description?: string; /** * Body param: If the `dns_server` field of a fallback domain is not present, the * client will fall back to a best guess of the default/system DNS resolvers unless * this policy option is set to `true`. */ disable_auto_fallback?: boolean; /** * Body param: List of DNS search suffixes to apply to clients. Suffixes are * evaluated in order. Use an empty array to clear. */ dns_search_suffixes?: Array; /** * Body param: Whether the policy will be applied to matching devices. */ enabled?: boolean; /** * Body param: List of routes excluded in the WARP client's tunnel. Both 'exclude' * and 'include' cannot be set in the same request. */ exclude?: Array; /** * Body param: Whether to add Microsoft IPs to Split Tunnel exclusions. */ exclude_office_ips?: boolean; /** * Body param: Global Acceleration settings for China. When configured, WARP * clients connect to the Global Accelerator addresses instead of the default ones. * Please contact your account representative to enable this feature on your * account. See * https://developers.cloudflare.com/china-network/concepts/global-acceleration/. */ global_acceleration?: CustomCreateParams.GlobalAcceleration | null; /** * Body param: List of routes included in the WARP client's tunnel. Both 'exclude' * and 'include' cannot be set in the same request. */ include?: Array; /** * Body param: The amount of time in minutes a user is allowed access to their LAN. * A value of 0 will allow LAN access until the next WARP reconnection, such as a * reboot or a laptop waking from sleep. Note that this field is omitted from the * response if null or unset. */ lan_allow_minutes?: number; /** * Body param: The size of the subnet for the local access network. Note that this * field is omitted from the response if null or unset. */ lan_allow_subnet_size?: number; /** * Body param: Determines if the operating system will register WARP's local * interface IP with your on-premises DNS server. */ register_interface_ip_with_dns?: boolean; /** * Body param: Determines whether the WARP client indicates to SCCM that it is * inside a VPN boundary. (Windows only). */ sccm_vpn_boundary_support?: boolean; /** * Body param */ service_mode_v2?: CustomCreateParams.ServiceModeV2; /** * Body param: The URL to launch when the Send Feedback button is clicked. */ support_url?: string; /** * Body param: Whether to allow the user to turn off the WARP switch and disconnect * the client. */ switch_locked?: boolean; /** * Body param: Determines which tunnel protocol to use. */ tunnel_protocol?: string; /** * Body param: Virtual network access settings for the device. */ virtual_networks?: CustomCreateParams.VirtualNetworks | null; } export declare namespace CustomCreateParams { interface DNSSearchSuffix { /** * The DNS search suffix to append when resolving short hostnames. */ suffix: string; /** * A description of the DNS search suffix. */ description?: string; } /** * Global Acceleration settings for China. When configured, WARP clients connect to * the Global Accelerator addresses instead of the default ones. Please contact * your account representative to enable this feature on your account. See * https://developers.cloudflare.com/china-network/concepts/global-acceleration/. */ interface GlobalAcceleration { /** * IP:port entries for the API endpoints. */ api_endpoints: Array; /** * Global acceleration settings are used only when "enabled". */ enabled: boolean; /** * IP:port entries for the MASQUE tunnel endpoints. Either wireguard_endpoints or * masque_endpoints must be provided. */ masque_endpoints: Array; /** * IP:port entries for the WireGuard tunnel endpoints. Either wireguard_endpoints * or masque_endpoints must be provided. */ wireguard_endpoints: Array; } interface ServiceModeV2 { /** * The mode to run the WARP client under. */ mode?: string; /** * The port number when used with proxy mode. */ port?: number; } /** * Virtual network access settings for the device. */ interface VirtualNetworks { /** * List of virtual network IDs the device is allowed to access. When * virtual_networks is set, at least one entry is required. */ allowed: Array; /** * The default virtual network ID. Must be included in the `allowed` list. */ default: string; } } export interface CustomListParams { account_id: string; } export interface CustomDeleteParams { account_id: string; } export interface CustomEditParams { /** * Path param */ account_id: string; /** * Body param: Whether to allow the user to switch WARP between modes. */ allow_mode_switch?: boolean; /** * Body param: Whether to receive update notifications when a new version of the * client is available. */ allow_updates?: boolean; /** * Body param: Whether to allow devices to leave the organization. */ allowed_to_leave?: boolean; /** * Body param: The amount of time in seconds to reconnect after having been * disabled. */ auto_connect?: number; /** * Body param: Turn on the captive portal after the specified amount of time. */ captive_portal?: number; /** * Body param: A description of the policy. */ description?: string; /** * Body param: If the `dns_server` field of a fallback domain is not present, the * client will fall back to a best guess of the default/system DNS resolvers unless * this policy option is set to `true`. */ disable_auto_fallback?: boolean; /** * Body param: List of DNS search suffixes to apply to clients. Suffixes are * evaluated in order. Use an empty array to clear. */ dns_search_suffixes?: Array; /** * Body param: Whether the policy will be applied to matching devices. */ enabled?: boolean; /** * Body param: List of routes excluded in the WARP client's tunnel. Both 'exclude' * and 'include' cannot be set in the same request. */ exclude?: Array; /** * Body param: Whether to add Microsoft IPs to Split Tunnel exclusions. */ exclude_office_ips?: boolean; /** * Body param: Global Acceleration settings for China. When configured, WARP * clients connect to the Global Accelerator addresses instead of the default ones. * Please contact your account representative to enable this feature on your * account. See * https://developers.cloudflare.com/china-network/concepts/global-acceleration/. */ global_acceleration?: CustomEditParams.GlobalAcceleration | null; /** * Body param: List of routes included in the WARP client's tunnel. Both 'exclude' * and 'include' cannot be set in the same request. */ include?: Array; /** * Body param: The amount of time in minutes a user is allowed access to their LAN. * A value of 0 will allow LAN access until the next WARP reconnection, such as a * reboot or a laptop waking from sleep. Note that this field is omitted from the * response if null or unset. */ lan_allow_minutes?: number; /** * Body param: The size of the subnet for the local access network. Note that this * field is omitted from the response if null or unset. */ lan_allow_subnet_size?: number; /** * Body param: The wirefilter expression to match devices. Available values: * "identity.email", "identity.groups.id", "identity.groups.name", * "identity.groups.email", "identity.service_token_uuid", * "identity.saml_attributes", "network", "os.name", "os.version". */ match?: string; /** * Body param: The name of the device settings profile. */ name?: string; /** * Body param: The precedence of the policy. Lower values indicate higher * precedence. Policies will be evaluated in ascending order of this field. */ precedence?: number; /** * Body param: Determines if the operating system will register WARP's local * interface IP with your on-premises DNS server. */ register_interface_ip_with_dns?: boolean; /** * Body param: Determines whether the WARP client indicates to SCCM that it is * inside a VPN boundary. (Windows only). */ sccm_vpn_boundary_support?: boolean; /** * Body param */ service_mode_v2?: CustomEditParams.ServiceModeV2; /** * Body param: The URL to launch when the Send Feedback button is clicked. */ support_url?: string; /** * Body param: Whether to allow the user to turn off the WARP switch and disconnect * the client. */ switch_locked?: boolean; /** * Body param: Determines which tunnel protocol to use. */ tunnel_protocol?: string; /** * Body param: Virtual network access settings for the device. */ virtual_networks?: CustomEditParams.VirtualNetworks | null; } export declare namespace CustomEditParams { interface DNSSearchSuffix { /** * The DNS search suffix to append when resolving short hostnames. */ suffix: string; /** * A description of the DNS search suffix. */ description?: string; } /** * Global Acceleration settings for China. When configured, WARP clients connect to * the Global Accelerator addresses instead of the default ones. Please contact * your account representative to enable this feature on your account. See * https://developers.cloudflare.com/china-network/concepts/global-acceleration/. */ interface GlobalAcceleration { /** * IP:port entries for the API endpoints. */ api_endpoints: Array; /** * Global acceleration settings are used only when "enabled". */ enabled: boolean; /** * IP:port entries for the MASQUE tunnel endpoints. Either wireguard_endpoints or * masque_endpoints must be provided. */ masque_endpoints: Array; /** * IP:port entries for the WireGuard tunnel endpoints. Either wireguard_endpoints * or masque_endpoints must be provided. */ wireguard_endpoints: Array; } interface ServiceModeV2 { /** * The mode to run the WARP client under. */ mode?: string; /** * The port number when used with proxy mode. */ port?: number; } /** * Virtual network access settings for the device. */ interface VirtualNetworks { /** * List of virtual network IDs the device is allowed to access. When * virtual_networks is set, at least one entry is required. */ allowed: Array; /** * The default virtual network ID. Must be included in the `allowed` list. */ default: string; } } export interface CustomGetParams { account_id: string; } export declare namespace Custom { export { type CustomCreateParams as CustomCreateParams, type CustomListParams as CustomListParams, type CustomDeleteParams as CustomDeleteParams, type CustomEditParams as CustomEditParams, type CustomGetParams as CustomGetParams, }; export { Excludes as Excludes, BaseExcludes as BaseExcludes, type ExcludeUpdateParams as ExcludeUpdateParams, type ExcludeGetParams as ExcludeGetParams, }; export { Includes as Includes, BaseIncludes as BaseIncludes, type IncludeUpdateParams as IncludeUpdateParams, type IncludeGetParams as IncludeGetParams, }; export { FallbackDomains as FallbackDomains, BaseFallbackDomains as BaseFallbackDomains, type FallbackDomainUpdateParams as FallbackDomainUpdateParams, type FallbackDomainGetParams as FallbackDomainGetParams, }; } export { type SettingsPoliciesSinglePage }; //# sourceMappingURL=custom.d.ts.map