Skip to content

Commit

Permalink
Display names
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanm-bb committed May 7, 2024
1 parent 329c5e6 commit 70753d8
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 37 deletions.
69 changes: 68 additions & 1 deletion Apps.BWX/Dtos/ProjectDto.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,74 @@
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<string> 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; }
public Contact Contact { get; set; }
public Creator Creator { get; set; }
public List<string> Tags { get; set; }
public List<Cost> Costs { get; set; }

[Display("Reference files")]
public List<string> ReferenceFiles { get; set; }

[Display("Drop files")]
public List<string> 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<string> TargetLanguages { get; set; }
}

Expand All @@ -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; }
}

Expand All @@ -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; }
}
19 changes: 18 additions & 1 deletion Apps.BWX/Dtos/WorkUnitDto.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
10 changes: 9 additions & 1 deletion Apps.BWX/Webhooks/Payload/NewOrgEvent.cs
Original file line number Diff line number Diff line change
@@ -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<string> CustomFields { get; set; }
}
12 changes: 11 additions & 1 deletion Apps.BWX/Webhooks/Payload/NewUserEvent.cs
Original file line number Diff line number Diff line change
@@ -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<string> Role { get; set; }
public string Status { get; set; }

[Display("UUID")]
public string Uuid { get; set; }

[Display("Custom fields")]
public List<string> CustomFields { get; set; }
}
23 changes: 22 additions & 1 deletion Apps.BWX/Webhooks/Payload/ProjectStatusChangedPayload.cs
Original file line number Diff line number Diff line change
@@ -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<string> Tags { get; set; }

[Display("Target locales")]
public List<string> TargetLocales { get; set; }

[Display("UUID")]
public string Uuid { get; set; }
public List<string> Workflows { get; set; }

[Display("Custom fields")]
public List<string> CustomFields { get; set; }
}
18 changes: 17 additions & 1 deletion Apps.BWX/Webhooks/Payload/ProjectTranslationFinishedEvent.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
44 changes: 43 additions & 1 deletion Apps.BWX/Webhooks/Payload/TaskAssinedEvent.cs
Original file line number Diff line number Diff line change
@@ -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<string> 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<string> 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<string> CustomFields { get; set; }
}
Loading

0 comments on commit 70753d8

Please sign in to comment.