import type { ReportCreate } from '../models/ReportCreate'; import type { ReportDetail } from '../models/ReportDetail'; import type { ReportList } from '../models/ReportList'; import type { ReportRequest } from '../models/ReportRequest'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class ReportsService { /** * List available reports * Return the reports available on the platform along with the latest status for each report previously requested by the caller. When ``mentor_id`` is supplied, access validation is scoped to that mentor. * @returns ReportList * @throws ApiError */ static reportsPlatformsRetrieve({ key, mentorId, }: { key: string; /** * Mentor primary key. When provided, access validation is scoped to that mentor. */ mentorId?: number; }): CancelablePromise; /** * Returns details of a specific report type including its status if previously requested. * * Required RBAC Permissions: * 1. CanViewAnalytics (kill switch): * - Action: "Ibl.Analytics/CanViewAnalytics/action" * - Resource: /platforms/{platform_pk}/ * * 2. Reports access to at least one user or usergroup: * - Action: "Ibl.Analytics/Reports/read" * - Resource: /platforms/{platform_pk}/users/{user_pk}/ OR * /platforms/{platform_pk}/usergroups/{group_pk}/ * - Note: User must have access to at least one user or usergroup resource * with Reports/read permission. Unrestricted access to all users * (/platforms/{platform_pk}/users/) also satisfies this requirement. * @returns ReportDetail * @throws ApiError */ static reportsPlatformsRetrieve2({ key, reportName, mentorUniqueId, }: { key: string; reportName: string; /** * Mentor unique ID for mentor-specific reports (e.g., ai-mentor-chat-history). When provided, ownership is validated - mentor owners can access without explicit RBAC permissions. */ mentorUniqueId?: string; }): CancelablePromise; /** * Download report * Download a completed report as CSV or JSON. Use the columns parameter to control column order. * @returns any No response body * @throws ApiError */ static reportsPlatformsDownloadRetrieve({ key, taskId, bom, charset, columns, format, }: { key: string; taskId: string; /** * CSV only. When true, prepend a UTF-8 byte-order mark so Excel on Windows detects UTF-8 on double-click. Applies to UTF-8 output only. Omit to use the platform default. */ bom?: boolean; /** * CSV only. Character encoding for the download (e.g. utf-8, latin-1, cp1252). Defaults to the platform setting (UTF-8). UTF-8 is lossless; other codecs replace unrepresentable characters with XML entities. */ charset?: string; /** * Comma-separated column names to control output order. Must be a subset of the report's allowed_result_fields. Omit to use the report's default order. */ columns?: string; /** * Download format */ format?: 'csv' | 'json'; }): CancelablePromise; /** * Triggers a new report generation. * * If the report has been previously requested, it returns the status of the report. * Reports expire after a configured duration. * * The request body should include: * - report_name: Name of the report to generate * - learner_id: (optional) ID of the learner to filter by * - course_id: (optional) ID of the course to filter by * - force: (optional) Force generation of a new report even if one exists * - filters: (optional) Additional filters for the report * - departments: (optional) Department IDs to filter by * - mentor: (optional) Mentor unique_id for mentor-specific reports (e.g., ai-mentor-chat-history) * - usergroup_ids: (optional) List of usergroup IDs to filter report data * * Required RBAC Permissions: * 1. CanViewAnalytics (kill switch): * - Action: "Ibl.Analytics/CanViewAnalytics/action" * - Resource: /platforms/{platform_pk}/ * * 2. Reports access to at least one user or usergroup: * - Action: "Ibl.Analytics/Reports/read" * - Resource: /platforms/{platform_pk}/users/{user_pk}/ OR * /platforms/{platform_pk}/usergroups/{group_pk}/ * - Note: User must have access to at least one user or usergroup resource * with Reports/read permission. Unrestricted access to all users * (/platforms/{platform_pk}/users/) also satisfies this requirement. * * 3. For mentor-specific reports (e.g., ai-mentor-chat-history): * - Action: "Ibl.Analytics/Reports/read" * - Resource: /platforms/{platform_pk}/mentors/{mentor_id}/ * - Note: User must have access to at least one mentor via RBAC OR own at least * one mentor (created_by == username). If a specific mentor_unique_id is * provided, user must have access to that specific mentor. * - Raises PermissionDenied if user has no access to any mentors. * @returns ReportCreate * @throws ApiError */ static reportsPlatformsNewCreate({ key, requestBody, }: { key: string; requestBody?: ReportRequest; }): CancelablePromise; }