cloudflare
Version:
The official TypeScript library for the Cloudflare API
71 lines • 1.86 kB
TypeScript
import { APIResource } from "../../core/resource.js";
import { APIPromise } from "../../core/api-promise.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class BaseURLs extends APIResource {
static readonly _key: readonly ['intel', 'urls'];
/**
* Gets security information about a URL, including content categories and risk
* types. The URL must be provided as a query parameter.
*
* @example
* ```ts
* const url = await client.intel.urls.get({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* url: 'url',
* });
* ```
*/
get(params: URLGetParams, options?: RequestOptions): APIPromise<URL>;
}
export declare class URLs extends BaseURLs {
}
export interface URL {
/**
* Content categories associated with this URL.
*/
content_categories: Array<URL.ContentCategory>;
/**
* The full URL that was looked up.
*/
full_url: string;
/**
* The hostname of the URL.
*/
hostname: string;
/**
* Security risk types associated with this URL.
*/
risk_type: Array<URL.RiskType>;
/**
* The path component of the URL.
*/
url_path: string;
}
export declare namespace URL {
interface ContentCategory {
id?: number;
name?: string;
source_id?: number;
super_category_id?: number;
}
interface RiskType {
id?: number;
name?: string;
source_id?: number;
super_category_id?: number;
}
}
export interface URLGetParams {
/**
* Path param: Identifier.
*/
account_id: string;
/**
* Query param: The URL to look up.
*/
url: string;
}
export declare namespace URLs {
export { type URL as URL, type URLGetParams as URLGetParams };
}
//# sourceMappingURL=urls.d.ts.map