Skip to content

Commit e4ae93a

Browse files
authored
feat: add support for new report schemas (#543)
1 parent 98c1c73 commit e4ae93a

File tree

2 files changed

+456
-5
lines changed

2 files changed

+456
-5
lines changed

src/reports/index.ts

Lines changed: 153 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,19 @@ export namespace ReportsModel {
473473
schema: any;
474474
}
475475

476-
export type GroupReportSchema = GroupTranslationCostsPostEditingSchema | GroupTopMembersSchema;
477-
478-
export type OrganizationReportSchema = GroupTranslationCostsPostEditingSchema | GroupTopMembersSchema;
476+
export type GroupReportSchema =
477+
| GroupTranslationCostsPostEditingSchema
478+
| GroupTopMembersSchema
479+
| GroupTaskUsageSchema
480+
| GroupQaCheckIssuesSchema
481+
| GroupTranslationActivitySchema;
482+
483+
export type OrganizationReportSchema =
484+
| GroupTranslationCostsPostEditingSchema
485+
| GroupTopMembersSchema
486+
| GroupTaskUsageSchema
487+
| GroupQaCheckIssuesSchema
488+
| GroupTranslationActivitySchema;
479489

480490
export interface GenerateGroupReportRequest {
481491
name: string;
@@ -567,7 +577,13 @@ export namespace ReportsModel {
567577
| CostEstimationPostEnding
568578
| TranslationCostsPostEnding
569579
| TopMembers
570-
| ContributionRawData;
580+
| ContributionRawData
581+
| SourceContentUpdates
582+
| ProjectMembers
583+
| EditorIssues
584+
| QaCheckIssues
585+
| SavingActivity
586+
| TranslationActivity;
571587

572588
export type ReportSchema = Pick<GenerateReportRequest, 'schema'>;
573589

@@ -601,6 +617,36 @@ export namespace ReportsModel {
601617
schema: ContributionRawDataSchema | ContributionRawDataSchemaByTask;
602618
}
603619

620+
export interface SourceContentUpdates {
621+
name: 'source-content-updates';
622+
schema: SourceContentUpdatesSchema;
623+
}
624+
625+
export interface ProjectMembers {
626+
name: 'project-members';
627+
schema: MembersSchema;
628+
}
629+
630+
export interface EditorIssues {
631+
name: 'editor-issues';
632+
schema: EditorIssuesSchema;
633+
}
634+
635+
export interface QaCheckIssues {
636+
name: 'qa-check-issues';
637+
schema: ProjectQaCheckIssuesSchema;
638+
}
639+
640+
export interface SavingActivity {
641+
name: 'saving-activity';
642+
schema: SavingActivitySchema;
643+
}
644+
645+
export interface TranslationActivity {
646+
name: 'translation-activity';
647+
schema: ProjectConsumptionSchema;
648+
}
649+
604650
export interface ReportStatusAttributes<S> {
605651
format: Format;
606652
reportName: string;
@@ -880,4 +926,107 @@ export namespace ReportsModel {
880926
| 'createdAt'
881927
| 'updatedAt'
882928
| 'mark';
929+
930+
export interface SourceContentUpdatesSchema {
931+
unit?: Unit;
932+
format?: Format;
933+
dateFrom?: string;
934+
dateTo?: string;
935+
languageId?: string;
936+
userIds?: number[];
937+
fileIds?: number[];
938+
directoryIds?: number[];
939+
branchIds?: number[];
940+
labelIds?: number[];
941+
labelIncludeType?: LabelIncludeType;
942+
}
943+
944+
export interface MembersSchema {
945+
format?: Format;
946+
dateFrom?: string;
947+
dateTo?: string;
948+
}
949+
950+
export interface EditorIssuesSchema {
951+
dateFrom?: string;
952+
dateTo?: string;
953+
format?: Format;
954+
languageId?: string;
955+
userId?: number;
956+
}
957+
958+
export interface ProjectQaCheckIssuesSchema {
959+
format?: Format;
960+
dateFrom?: string;
961+
dateTo?: string;
962+
languageId?: string;
963+
}
964+
965+
export interface SavingActivitySchema {
966+
unit?: Unit;
967+
languageId?: string;
968+
format?: Format;
969+
dateFrom?: string;
970+
dateTo?: string;
971+
userIds?: number[];
972+
fileIds?: number[];
973+
directoryIds?: number[];
974+
branchIds?: number[];
975+
labelIds?: number[];
976+
labelIncludeType?: LabelIncludeType;
977+
}
978+
979+
export interface ProjectConsumptionSchema {
980+
unit?: Unit;
981+
languageId?: string;
982+
format?: Format;
983+
dateFrom?: string;
984+
dateTo?: string;
985+
userIds?: number[];
986+
fileIds?: number[];
987+
directoryIds?: number[];
988+
branchIds?: number[];
989+
labelIds?: number[];
990+
labelIncludeType?: LabelIncludeType;
991+
}
992+
993+
export interface GroupTaskUsageSchema {
994+
format: Format;
995+
type: 'workload' | 'create-vs-resolve' | 'performance' | 'time' | 'cost';
996+
projectIds?: number[];
997+
assigneeId?: number;
998+
creatorId?: number;
999+
dateFrom?: string;
1000+
dateTo?: string;
1001+
wordsCountFrom?: number;
1002+
wordsCountTo?: number;
1003+
excludeApprovalsForEditedTranslations?: boolean;
1004+
currency?: Currency;
1005+
baseRates?: BaseRate;
1006+
individualRates?: IndividualRate[];
1007+
netRateSchemes?: NetRateSchemas;
1008+
}
1009+
1010+
export interface GroupQaCheckIssuesSchema {
1011+
projectIds?: number[];
1012+
format?: Format;
1013+
dateFrom?: string;
1014+
dateTo?: string;
1015+
languageId?: string;
1016+
}
1017+
1018+
export interface GroupTranslationActivitySchema {
1019+
projectIds?: number[];
1020+
unit?: Unit;
1021+
languageId?: string;
1022+
format?: Format;
1023+
dateFrom?: string;
1024+
dateTo?: string;
1025+
userIds?: number[];
1026+
fileIds?: number[];
1027+
directoryIds?: number[];
1028+
branchIds?: number[];
1029+
labelIds?: number[];
1030+
labelIncludeType?: LabelIncludeType;
1031+
}
8831032
}

0 commit comments

Comments
 (0)