-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #309 from crowdin/reports-api-updates
feat: reports api updates
- Loading branch information
Showing
25 changed files
with
468 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/com/crowdin/client/reports/model/ContributionRawDataGenerateReportRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class ContributionRawDataGenerateReportRequest extends GenerateReportRequest { | ||
private String name = "contribution-raw-data"; | ||
private Schema schema; | ||
|
||
@Data | ||
public static class Schema { | ||
private String mode; | ||
private Unit unit; | ||
private List<String> columns; | ||
private List<Long> tmIds; | ||
private List<Long> mtIds; | ||
private List<Long> aiPromptIds; | ||
private Date dateFrom; | ||
private Date dateTo; | ||
} | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public static class GeneralSchema extends Schema { | ||
private String languageId; | ||
private Long userId; | ||
private List<Long> fileIds; | ||
private List<Long> directoryIds; | ||
private List<Long> branchIds; | ||
} | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public static class ByTaskSchema extends Schema { | ||
private Long taskId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/com/crowdin/client/reports/model/IndividualRate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class IndividualRate { | ||
private List<String> languageIds; | ||
private List<Long> userIds; | ||
private Float fullTranslation; | ||
private Float proofread; | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/crowdin/client/reports/model/ListOrganizationReportSettingsParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import com.crowdin.client.core.model.Pagination; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
public class ListOrganizationReportSettingsParams extends Pagination { | ||
|
||
private Long projectId; | ||
private Long groupId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/com/crowdin/client/reports/model/NetRateSchemes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class NetRateSchemes { | ||
private List<Match> tmMatch; | ||
private List<Match> mtMatch; | ||
private List<Match> suggestionMatch; | ||
private List<Match> aiMatch; | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/com/crowdin/client/reports/model/OrganizationReportSettingsTemplateList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import com.crowdin.client.core.model.Pagination; | ||
import com.crowdin.client.core.model.ResponseList; | ||
import com.crowdin.client.core.model.ResponseObject; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
@Data | ||
public class OrganizationReportSettingsTemplateList { | ||
|
||
private List<OrganizationReportSettingsTemplateResponseObject> data; | ||
private Pagination pagination; | ||
|
||
public static ResponseList<ReportSettingsTemplate.OrganizationReportSettingsTemplate> to(OrganizationReportSettingsTemplateList reportSettingsTemplateList) { | ||
return ResponseList.of( | ||
reportSettingsTemplateList.getData().stream() | ||
.map(OrganizationReportSettingsTemplateResponseObject::getData) | ||
.map(ResponseObject::of) | ||
.collect(Collectors.toList()), | ||
reportSettingsTemplateList.getPagination() | ||
); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...va/com/crowdin/client/reports/model/OrganizationReportSettingsTemplateResponseObject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.crowdin.client.reports.model; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class OrganizationReportSettingsTemplateResponseObject { | ||
|
||
private ReportSettingsTemplate.OrganizationReportSettingsTemplate data; | ||
} |
Oops, something went wrong.