cloudflare
Version:
The official TypeScript library for the Cloudflare API
63 lines • 2.17 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as IPGeolocationAPI from 'cloudflare/resources/zones/settings/ip-geolocation';
export declare class IPGeolocation extends APIResource {
/**
* Enable IP Geolocation to have Cloudflare geolocate visitors to your website and
* pass the country code to you.
* (https://support.cloudflare.com/hc/en-us/articles/200168236).
*/
edit(params: IPGeolocationEditParams, options?: Core.RequestOptions): Core.APIPromise<ZoneSettingIPGeolocation>;
/**
* Enable IP Geolocation to have Cloudflare geolocate visitors to your website and
* pass the country code to you.
* (https://support.cloudflare.com/hc/en-us/articles/200168236).
*/
get(params: IPGeolocationGetParams, options?: Core.RequestOptions): Core.APIPromise<ZoneSettingIPGeolocation>;
}
/**
* Enable IP Geolocation to have Cloudflare geolocate visitors to your website and
* pass the country code to you.
* (https://support.cloudflare.com/hc/en-us/articles/200168236).
*/
export interface ZoneSettingIPGeolocation {
/**
* ID of the zone setting.
*/
id: 'ip_geolocation';
/**
* Current value of the zone setting.
*/
value: 'on' | 'off';
/**
* 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 interface IPGeolocationEditParams {
/**
* Path param: Identifier
*/
zone_id: string;
/**
* Body param: Value of the zone setting.
*/
value: 'on' | 'off';
}
export interface IPGeolocationGetParams {
/**
* Identifier
*/
zone_id: string;
}
export declare namespace IPGeolocation {
export import ZoneSettingIPGeolocation = IPGeolocationAPI.ZoneSettingIPGeolocation;
export import IPGeolocationEditParams = IPGeolocationAPI.IPGeolocationEditParams;
export import IPGeolocationGetParams = IPGeolocationAPI.IPGeolocationGetParams;
}
//# sourceMappingURL=ip-geolocation.d.ts.map