UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

108 lines 3.72 kB
import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MobileRedirectAPI from 'cloudflare/resources/zones/settings/mobile-redirect'; export declare class MobileRedirect extends APIResource { /** * Automatically redirect visitors on mobile devices to a mobile-optimized * subdomain. Refer to * [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) * for more information. */ edit(params: MobileRedirectEditParams, options?: Core.RequestOptions): Core.APIPromise<ZoneSettingMobileRedirect>; /** * Automatically redirect visitors on mobile devices to a mobile-optimized * subdomain. Refer to * [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) * for more information. */ get(params: MobileRedirectGetParams, options?: Core.RequestOptions): Core.APIPromise<ZoneSettingMobileRedirect>; } /** * Automatically redirect visitors on mobile devices to a mobile-optimized * subdomain. Refer to * [Understanding Cloudflare Mobile Redirect](https://support.cloudflare.com/hc/articles/200168336) * for more information. */ export interface ZoneSettingMobileRedirect { /** * Identifier of the zone setting. */ id: 'mobile_redirect'; /** * Current value of the zone setting. */ value: ZoneSettingMobileRedirect.Value; /** * Whether or not this setting can be modified for this zone (based on your * Cloudflare plan level). */ editable?: true | false; /** * last time this setting was modified. */ modified_on?: string | null; } export declare namespace ZoneSettingMobileRedirect { /** * Current value of the zone setting. */ interface Value { /** * Which subdomain prefix you wish to redirect visitors on mobile devices to * (subdomain must already exist). */ mobile_subdomain?: string | null; /** * Whether or not mobile redirect is enabled. */ status?: 'on' | 'off'; /** * Whether to drop the current page path and redirect to the mobile subdomain URL * root, or keep the path and redirect to the same page on the mobile subdomain. */ strip_uri?: boolean; } } export interface MobileRedirectEditParams { /** * Path param: Identifier */ zone_id: string; /** * Body param: Value of the zone setting. */ value: MobileRedirectEditParams.Value; } export declare namespace MobileRedirectEditParams { /** * Value of the zone setting. */ interface Value { /** * Which subdomain prefix you wish to redirect visitors on mobile devices to * (subdomain must already exist). */ mobile_subdomain?: string | null; /** * Whether or not mobile redirect is enabled. */ status?: 'on' | 'off'; /** * Whether to drop the current page path and redirect to the mobile subdomain URL * root, or keep the path and redirect to the same page on the mobile subdomain. */ strip_uri?: boolean; } } export interface MobileRedirectGetParams { /** * Identifier */ zone_id: string; } export declare namespace MobileRedirect { export import ZoneSettingMobileRedirect = MobileRedirectAPI.ZoneSettingMobileRedirect; export import MobileRedirectEditParams = MobileRedirectAPI.MobileRedirectEditParams; export import MobileRedirectGetParams = MobileRedirectAPI.MobileRedirectGetParams; } //# sourceMappingURL=mobile-redirect.d.ts.map