diff --git a/Apps.BWX/Dtos/ProjectDto.cs b/Apps.BWX/Dtos/ProjectDto.cs index 99e4e8d..da5ae51 100644 --- a/Apps.BWX/Dtos/ProjectDto.cs +++ b/Apps.BWX/Dtos/ProjectDto.cs @@ -1,16 +1,31 @@ -namespace Apps.BWX.Dtos; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Dtos; public class ProjectDto { + [Display("UUID")] public string Uuid { get; set; } public string Name { get; set; } public string Reference { get; set; } + + [Display("Genesis ID")] public string GenesisId { get; set; } public string Currency { get; set; } + + [Display("Source locale")] public string SourceLocale { get; set; } + + [Display("Target locales")] public List TargetLocales { get; set; } + + [Display("Is continuous")] public bool IsContinuous { get; set; } + + [Display("Create date")] public long CreateDate { get; set; } + + [Display("Due date")] public long DueDate { get; set; } public string Status { get; set; } public Client Client { get; set; } @@ -18,23 +33,42 @@ public class ProjectDto public Creator Creator { get; set; } public List Tags { get; set; } public List Costs { get; set; } + + [Display("Reference files")] public List ReferenceFiles { get; set; } + + [Display("Drop files")] public List DropFiles { get; set; } + + [Display("Costs log file ID")] public string CostsLogfileId { get; set; } + + [Display("Costs status")] public string CostsStatus { get; set; } + + [Display("Costs calculated at")] public long CostsCalculatedAt { get; set; } + + [Display("Total work units")] public int TotalWorkUnits { get; set; } public double Progress { get; set; } public bool AutomationEnabled { get; set; } + + [Display("Automation status")] public string AutomationStatus { get; set; } } public class Client { + [Display("UUID")] public string Uuid { get; set; } public OrganizationDto Organization { get; set; } public string Name { get; set; } + + [Display("Source language")] public string SourceLanguage { get; set; } + + [Display("Target languages")] public List TargetLanguages { get; set; } } @@ -43,29 +77,58 @@ public class Contact public string Email { get; set; } public string Name { get; set; } public string Status { get; set; } + + [Display("Tasks completed count")] public int TasksCompletedCount { get; set; } + + [Display("UUID")] public string Uuid { get; set; } } public class Cost { + [Display("ID")] public int Id { get; set; } + + [Display("UUID")] public string Uuid { get; set; } public string Description { get; set; } + + [Display("Source language")] public string SourceLanguage { get; set; } + + [Display("Target language")] public string TargetLanguage { get; set; } public string Filename { get; set; } public string Reason { get; set; } + + [Display("Costs log file ID")] public string CostsLogfileId { get; set; } + + [Display("Creation timestamp")] public long CreationTimestamp { get; set; } + + [Display("Match start")] public int MatchStart { get; set; } + + [Display("Match end")] public int MatchEnd { get; set; } + + [Display("Display order")] public string DisplayOrder { get; set; } + + [Display("Unit type")] public string UnitType { get; set; } public int Units { get; set; } + + [Display("Cost per unit")] public double CostPerUnit { get; set; } public double Total { get; set; } + + [Display("Rate type")] public string RateType { get; set; } + + [Display("Cost type")] public string CostType { get; set; } } @@ -74,6 +137,10 @@ public class Creator public string Email { get; set; } public string Name { get; set; } public string Status { get; set; } + + [Display("Tasks completed count")] public int TasksCompletedCount { get; set; } + + [Display("UUID")] public string Uuid { get; set; } } \ No newline at end of file diff --git a/Apps.BWX/Dtos/WorkUnitDto.cs b/Apps.BWX/Dtos/WorkUnitDto.cs index 1b216ce..79095f4 100644 --- a/Apps.BWX/Dtos/WorkUnitDto.cs +++ b/Apps.BWX/Dtos/WorkUnitDto.cs @@ -1,17 +1,34 @@ -namespace Apps.BWX.Dtos; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Dtos; public class WorkUnitDto { + [Display("UUID")] public string Uuid { get; set; } + + [Display("Work ID")] public string WorkId { get; set; } public string Name { get; set; } + + [Display("Source language")] public string SourceLanguage { get; set; } + + [Display("Target language")] public string TargetLanguage { get; set; } public string Filename { get; set; } + + [Display("Creation timestamp")] public long CreationTimestamp { get; set; } + + [Display("Last update")] public long LastUpdate { get; set; } public int Sequence { get; set; } public string Workflow { get; set; } + + [Display("Project UUID")] public string ProjectUUID { get; set; } + + [Display("Project resource UUID")] public string ProjectResourceUuid { get; set; } } \ No newline at end of file diff --git a/Apps.BWX/Webhooks/Payload/NewOrgEvent.cs b/Apps.BWX/Webhooks/Payload/NewOrgEvent.cs index 8d02ae7..cf90b90 100644 --- a/Apps.BWX/Webhooks/Payload/NewOrgEvent.cs +++ b/Apps.BWX/Webhooks/Payload/NewOrgEvent.cs @@ -1,11 +1,19 @@ -namespace Apps.BWX.Webhooks.Payload; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Webhooks.Payload; public class NewOrgEvent { public string Country { get; set; } + + [Display("Event type")] public string EventType { get; set; } public int Id { get; set; } public string Name { get; set; } + + [Display("UUID")] public string Uuid { get; set; } + + [Display("Custom fields")] public List CustomFields { get; set; } } \ No newline at end of file diff --git a/Apps.BWX/Webhooks/Payload/NewUserEvent.cs b/Apps.BWX/Webhooks/Payload/NewUserEvent.cs index 01dff43..1c9b481 100644 --- a/Apps.BWX/Webhooks/Payload/NewUserEvent.cs +++ b/Apps.BWX/Webhooks/Payload/NewUserEvent.cs @@ -1,14 +1,24 @@ -namespace Apps.BWX.Webhooks.Payload; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Webhooks.Payload; public class NewUserEvent { public string Country { get; set; } + + [Display("Event type")] public string EventType { get; set; } + + [Display("ID")] public int Id { get; set; } public string Name { get; set; } public string Email { get; set; } public List Role { get; set; } public string Status { get; set; } + + [Display("UUID")] public string Uuid { get; set; } + + [Display("Custom fields")] public List CustomFields { get; set; } } \ No newline at end of file diff --git a/Apps.BWX/Webhooks/Payload/ProjectStatusChangedPayload.cs b/Apps.BWX/Webhooks/Payload/ProjectStatusChangedPayload.cs index c5ea553..4c8124c 100644 --- a/Apps.BWX/Webhooks/Payload/ProjectStatusChangedPayload.cs +++ b/Apps.BWX/Webhooks/Payload/ProjectStatusChangedPayload.cs @@ -1,23 +1,44 @@ -namespace Apps.BWX.Webhooks.Payload; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Webhooks.Payload; public class ProjectStatusChangedPayload { + [Display("Creation timestamp")] public long CreationTimestamp { get; set; } public string Creator { get; set; } + + [Display("Creator email")] public string CreatorEmail { get; set; } + + [Display("Event type")] public string EventType { get; set; } + + [Display("ID")] public int Id { get; set; } public string Instructions { get; set; } public string Name { get; set; } + + [Display("New status")] public string NewStatus { get; set; } public string Notes { get; set; } + + [Display("Previous status")] public string PreviousStatus { get; set; } public string Reference { get; set; } + + [Display("Source locale")] public string SourceLocale { get; set; } public string Status { get; set; } public List Tags { get; set; } + + [Display("Target locales")] public List TargetLocales { get; set; } + + [Display("UUID")] public string Uuid { get; set; } public List Workflows { get; set; } + + [Display("Custom fields")] public List CustomFields { get; set; } } \ No newline at end of file diff --git a/Apps.BWX/Webhooks/Payload/ProjectTranslationFinishedEvent.cs b/Apps.BWX/Webhooks/Payload/ProjectTranslationFinishedEvent.cs index 93b0a3e..0d7d56e 100644 --- a/Apps.BWX/Webhooks/Payload/ProjectTranslationFinishedEvent.cs +++ b/Apps.BWX/Webhooks/Payload/ProjectTranslationFinishedEvent.cs @@ -1,12 +1,28 @@ -namespace Apps.BWX.Webhooks.Payload; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Webhooks.Payload; public class ProjectTranslationFinishedEvent { + + [Display("Project ID")] public int ProjectId { get; set; } + + [Display("Project UUID")] public string ProjectUuid { get; set; } + + [Display("Project name")] public string ProjectName { get; set; } + + [Display("Total work units completed")] public int TotalWorkUnitsCompleted { get; set; } + + [Display("Total work units failed")] public int TotalWorkUnitsFailed { get; set; } + + [Display("Total work units")] public int TotalWorkUnits { get; set; } + + [Display("Event type")] public string EventType { get; set; } } \ No newline at end of file diff --git a/Apps.BWX/Webhooks/Payload/TaskAssinedEvent.cs b/Apps.BWX/Webhooks/Payload/TaskAssinedEvent.cs index 7ac160a..a51cdd0 100644 --- a/Apps.BWX/Webhooks/Payload/TaskAssinedEvent.cs +++ b/Apps.BWX/Webhooks/Payload/TaskAssinedEvent.cs @@ -1,32 +1,74 @@ -namespace Apps.BWX.Webhooks.Payload; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Webhooks.Payload; public class TaskAssinedEvent { + + [Display("Acceptance date")] public long AcceptanceDate { get; set; } + + [Display("Assign date")] public long AssignDate { get; set; } + + [Display("Assign by email")] public string AssignedByEmail { get; set; } + + [Display("Assign by name")] public string AssignedByName { get; set; } public string Assignee { get; set; } + + [Display("Assignee email")] public string AssigneeEmail { get; set; } + + [Display("Assignee word rate")] public double AssigneeWordRate { get; set; } + + [Display("Begin index")] public long BeginIndex { get; set; } + + [Display("Creation timestamp")] public long CreationTimestamp { get; set; } public string Creator { get; set; } + + [Display("Creator email")] public string CreatorEmail { get; set; } + + [Display("Delivery date")] public long DeliveryDate { get; set; } + + [Display("Due date")] public long DueDate { get; set; } + + [Display("End index")] public long EndIndex { get; set; } + + [Display("Event type")] public string EventType { get; set; } public List Files { get; set; } + + [Display("ID")] public int Id { get; set; } public string Instructions { get; set; } + + [Display("Minimum score required")] public double MinimumScoreRequired { get; set; } public string Name { get; set; } + + [Display("Reference files")] public List ReferenceFiles { get; set; } + + [Display("Scheduled date")] public long ScheduledDate { get; set; } + + [Display("Skip date")] public long SkipDate { get; set; } public string Status { get; set; } + + [Display("UUID")] public string Uuid { get; set; } public string Workflow { get; set; } + + [Display("Custom fields")] public List CustomFields { get; set; } } \ No newline at end of file diff --git a/Apps.BWX/Webhooks/Payload/TaskStatusChangedPayload.cs b/Apps.BWX/Webhooks/Payload/TaskStatusChangedPayload.cs index 108c35e..a606cbf 100644 --- a/Apps.BWX/Webhooks/Payload/TaskStatusChangedPayload.cs +++ b/Apps.BWX/Webhooks/Payload/TaskStatusChangedPayload.cs @@ -1,34 +1,13 @@ -namespace Apps.BWX.Webhooks.Payload; +using Blackbird.Applications.Sdk.Common; -public class TaskStatusChangedPayload +namespace Apps.BWX.Webhooks.Payload; + +public class TaskStatusChangedPayload : TaskAssinedEvent { - public long AcceptanceDate { get; set; } - public long AssignDate { get; set; } - public string AssignedByEmail { get; set; } - public string AssignedByName { get; set; } - public string Assignee { get; set; } - public string AssigneeEmail { get; set; } - public long AssigneeWordRate { get; set; } - public long BeginIndex { get; set; } - public long CreationTimestamp { get; set; } - public string Creator { get; set; } - public string CreatorEmail { get; set; } - public long DeliveryDate { get; set; } - public long DueDate { get; set; } - public long EndIndex { get; set; } - public string EventType { get; set; } - public List Files { get; set; } - public int Id { get; set; } - public object Instructions { get; set; } - public double MinimumScoreRequired { get; set; } - public string Name { get; set; } + [Display("New status")] public string NewStatus { get; set; } + + [Display("Previous status")] public string PreviousStatus { get; set; } - public List ReferenceFiles { get; set; } - public long ScheduledDate { get; set; } - public long SkipDate { get; set; } - public string Status { get; set; } - public string Uuid { get; set; } - public string Workflow { get; set; } - public List CustomFields { get; set; } + } \ No newline at end of file diff --git a/Apps.BWX/Webhooks/Payload/WorkUnitStatusChangedEvent.cs b/Apps.BWX/Webhooks/Payload/WorkUnitStatusChangedEvent.cs index 4a7f2e2..9203fd9 100644 --- a/Apps.BWX/Webhooks/Payload/WorkUnitStatusChangedEvent.cs +++ b/Apps.BWX/Webhooks/Payload/WorkUnitStatusChangedEvent.cs @@ -1,25 +1,60 @@ -namespace Apps.BWX.Webhooks.Payload; +using Blackbird.Applications.Sdk.Common; + +namespace Apps.BWX.Webhooks.Payload; public class WorkUnitStatusChangedEvent { + [Display("Begin index")] public int BeginIndex { get; set; } public int Chars { get; set; } + + [Display("Confirmed non translatable")] public int ConfirmedNonTranslatable { get; set; } + + [Display("Confirmed segments")] public int ConfirmedSegments { get; set; } + + [Display("End index")] public int EndIndex { get; set; } + + [Display("Event type")] public string EventType { get; set; } + + [Display("ID")] public string Id { get; set; } + + [Display("New status")] public string NewStatus { get; set; } + + [Display("Previous status")] public string PreviousStatus { get; set; } + + [Display("Project file ID")] public string ProjectFileId { get; set; } + + [Display("Project file name")] public string ProjectFileName { get; set; } + + [Display("Project step level")] public int ProjectStepLevel { get; set; } + + [Display("Source locale")] public string SourceLocale { get; set; } + + [Display("Target locale")] public string TargetLocale { get; set; } + + [Display("Total non translatable")] public int TotalNonTranslatable { get; set; } + + [Display("Total segments")] public int TotalSegments { get; set; } + + [Display("Translated file url")] public string TranslatedFileUrl { get; set; } public int Words { get; set; } public string Workflow { get; set; } + + [Display("Is last workflow")] public bool IsLastWorkflow { get; set; } } \ No newline at end of file