cloudflare
Version:
The official TypeScript library for the Cloudflare API
101 lines • 3.32 kB
text/typescript
import { APIResource } from "../../../core/resource.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class BaseMatches extends APIResource {
static readonly _key: readonly ['brandProtection', 'v2', 'matches'];
/**
* Get paginated list of domain matches for one or more brand protection queries.
* When multiple query_ids are provided (comma-separated), matches are deduplicated
* across queries and each match includes a match_details array with per-match
* query metadata and individual dismissed state.
*/
get(params: MatchGetParams, options?: RequestOptions): APIPromise<MatchGetResponse>;
}
export declare class Matches extends BaseMatches {
}
export interface MatchGetResponse {
matches: Array<MatchGetResponse.Match>;
total: number;
}
export declare namespace MatchGetResponse {
interface Match {
domain: string;
first_seen: string;
public_scans: Match.PublicScans | null;
registrar: string | null;
scan_status: string;
scan_submission_id: number | null;
source: string | null;
/**
* Whether the match is dismissed. Only present for single-query requests. For
* multi-query requests, use the dismissed field in each match_details entry.
*/
dismissed?: boolean;
/**
* Per-match detail objects with query metadata and individual dismissed state.
* Only present when multiple query_ids are requested.
*/
match_details?: Array<Match.MatchDetail>;
}
namespace Match {
interface PublicScans {
submission_id: string;
}
interface MatchDetail {
/**
* Individual dismissed state for this specific match.
*/
dismissed: boolean;
match_id: number;
query_id: number;
/**
* Tag associated with the query, if one exists.
*/
query_tag: string | null;
}
}
}
export interface MatchGetParams {
/**
* Path param
*/
account_id: string;
/**
* Query param: Query ID or comma-separated list of Query IDs. When multiple IDs
* are provided, matches are deduplicated across queries and each match includes a
* match_details array with per-match query metadata and dismissed state.
*/
query_id: Array<string>;
/**
* Query param: Filter matches by domain name (substring match)
*/
domain_search?: string;
/**
* Query param
*/
include_dismissed?: string;
/**
* Query param
*/
include_domain_id?: string;
/**
* Query param
*/
limit?: string;
/**
* Query param
*/
offset?: string;
/**
* Query param: Sort order. Options: 'asc' (ascending) or 'desc' (descending)
*/
order?: 'asc' | 'desc';
/**
* Query param: Column to sort by. Options: 'domain', 'first_seen', or 'registrar'
*/
orderBy?: 'domain' | 'first_seen' | 'registrar';
}
export declare namespace Matches {
export { type MatchGetResponse as MatchGetResponse, type MatchGetParams as MatchGetParams };
}
//# sourceMappingURL=matches.d.mts.map