testrail-modern-client
Version:
A modern TypeScript client for TestRail API
29 lines (28 loc) • 1.33 kB
TypeScript
import { Report, ReportRun } from '../models/reports';
import { BaseService } from './base';
/**
* Service for managing TestRail reports.
* @since TestRail 5.7
*/
export declare class ReportService extends BaseService {
/**
* Returns a list of API available reports by project.
* @param projectId - The ID of the project for which you want a list of API accessible reports
* @param offset - The offset of the first record to return (used for pagination)
* @param limit - The maximum number of records to return (used for pagination)
* @returns A list of available reports
* @throws {Error} 400 - Invalid or unknown project
* @throws {Error} 403 - No access to the project
* @throws {Error} 429 - Too many requests (TestRail Cloud only)
*/
list(projectId: number, offset?: number, limit?: number): Promise<Report[]>;
/**
* Executes an existing report and returns URLs for accessing the report.
* @param reportId - The ID of the report template to run
* @returns The report run details including URLs for HTML and PDF formats
* @throws {Error} 400 - Invalid report template ID
* @throws {Error} 403 - No access to the project
* @throws {Error} 429 - Too many requests (TestRail Cloud only)
*/
run(reportId: number): Promise<ReportRun>;
}