* Generate a translation activity report * @param {string} from - Start date in ISO 8601 format (e.g., 2025-09-01T00:00:00.000Z) * @param {string} to - End date in ISO 8601 format (e.g., 2025-09-30T23:59:59.000Z) * @returns {Promise } Report ID
(from, to)
| 34 | * @returns {Promise<string>} Report ID |
| 35 | */ |
| 36 | async function generateReport(from, to) { |
| 37 | log.info(`Generating translation report for ${from} to ${to}`); |
| 38 | |
| 39 | const {data: reportData} = await performApiRequest('/reports', { |
| 40 | method: 'POST', |
| 41 | payload: { |
| 42 | name: 'top-members', |
| 43 | schema: { |
| 44 | unit: 'strings', |
| 45 | format: 'json', |
| 46 | dateFrom: from, |
| 47 | dateTo: to, |
| 48 | }, |
| 49 | }, |
| 50 | }); |
| 51 | |
| 52 | return reportData.identifier; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Check report generation status |
no test coverage detected