Skip to content

Commit

Permalink
feat: Reports APIs: Add support for the new report type (crowdin#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhavnegi authored Sep 16, 2024
1 parent 6f2bee7 commit ae196ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions src/reports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,16 @@ export namespace ReportsModel {
| TranslationCostsPostEndingSchema
| TranslationCostsPostEndingSchemaByTask
| TopMembersSchema
| ContributionRawDataSchema;
| ContributionRawDataSchema
| PreTranslateEfficiencySchema;

export interface GenerateReportRequest {
name:
| 'costs-estimation'
| 'translation-costs'
| 'top-members'
| 'contribution-raw-data'
| 'costs-estimation-pe'
| 'translation-costs-pe';
| 'translation-costs-pe'
| 'pre-translate-efficiency';
schema: ReportSchema;
}

Expand Down Expand Up @@ -516,6 +516,7 @@ export namespace ReportsModel {
individualRates: IndividualRate[];
netRateSchemes: NetRateSchemas;
excludeApprovalsForEditedTranslations?: boolean;
preTranslatedStringsCategorizationAdjustment?: boolean;
groupBy?: GroupBy;
dateFrom?: string;
dateTo?: string;
Expand Down Expand Up @@ -565,6 +566,15 @@ export namespace ReportsModel {
dateTo?: string;
}

export interface PreTranslateEfficiencySchema {
unit?: Unit;
format?: Format;
postEditingCategories?: string[];
languageId?: string;
dateFrom?: string;
dateTo?: string;
}

export interface ReportSettings {
id: number;
name: string;
Expand Down
2 changes: 1 addition & 1 deletion tests/reports/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Reports API', () => {
const projectId = 2;
const groupId = 23;
const reportId = '123';
const reportName = 'costs-estimation';
const reportName = 'top-members';
const downloadLink = 'test.com';
const schema: ReportsModel.TopMembersSchema = {
unit: 'chars',
Expand Down

0 comments on commit ae196ef

Please sign in to comment.