import { z } from 'zod';
import { BaseTool } from '../../base-tool.js';
import { MODES, OUTPUT_FORMATS } from './constants.js';
export class GetBacklinksIndexedPages extends BaseTool {
registerTool(server) {
server.registerTool(this.toolName('getBacklinksIndexedPages'), {
title: 'Backlinks Indexed Pages',
description: 'Data Tool: Fetch site pages that have backlinks, with sorting and limit controls (v1/backlinks/indexed-pages)',
inputSchema: {
target: z
.string()
.min(1, 'target is required')
.describe('Target to analyze: root domain, host (subdomain), or full URL.'),
mode: z
.enum(MODES)
.optional()
.default('host')
.describe("Scope: 'domain' (incl. subdomains), 'host' (no subdomains), or 'url' (single URL). Default: host."),
order_by: z
.enum(['backlinks', 'refdomains'])
.optional()
.default('backlinks')
.describe("Sort field (descending): 'backlinks' or 'refdomains'. Default: backlinks."),
limit: z
.number()
.int()
.positive()
.min(1)
.max(10000)
.optional()
.default(100)
.describe('Maximum number of results to return (1–10,000). Default: 100.'),
output: z
.enum(OUTPUT_FORMATS)
.optional()
.default('json')
.describe('Response format. Default: json.'),
},
}, async (params) => this.makeGetRequest('/v1/backlinks/indexed-pages', params));
}
}
//# sourceMappingURL=backlinks-indexed-pages.js.map