Skip to content

Commit

Permalink
Callbacks added
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanm-bb committed Mar 22, 2024
1 parent 4e7eb40 commit cb99c8e
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 218 deletions.
52 changes: 0 additions & 52 deletions Apps.BWX/Webhooks/Bridge/BridgeService.cs

This file was deleted.

18 changes: 18 additions & 0 deletions Apps.BWX/Webhooks/Payload/NewOrgEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class NewOrgEvent
{
public string Country { get; set; }
public string EventType { get; set; }
public int Id { get; set; }
public string Name { get; set; }
public string Uuid { get; set; }
public List<string> CustomFields { get; set; }
}
}
12 changes: 12 additions & 0 deletions Apps.BWX/Webhooks/Payload/NewProjectEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class NewProjectEvent
{
}
}
21 changes: 21 additions & 0 deletions Apps.BWX/Webhooks/Payload/NewUserEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class NewUserEvent
{
public string Country { get; set; }
public string EventType { get; set; }
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; }
public string Uuid { get; set; }
public List<string> CustomFields { get; set; }
}
}
30 changes: 30 additions & 0 deletions Apps.BWX/Webhooks/Payload/ProjectStatusChangedPayload.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class ProjectStatusChangedPayload
{
public long CreationTimestamp { get; set; }
public string Creator { get; set; }
public string CreatorEmail { get; set; }
public string EventType { get; set; }
public int Id { get; set; }
public string Instructions { get; set; }
public string Name { get; set; }
public string NewStatus { get; set; }
public string Notes { get; set; }
public string PreviousStatus { get; set; }
public string Reference { get; set; }
public string SourceLocale { get; set; }
public string Status { get; set; }
public List<string> Tags { get; set; }
public List<string> TargetLocales { get; set; }
public string Uuid { get; set; }
public List<string> Workflows { get; set; }
public List<string> CustomFields { get; set; }
}
}
19 changes: 19 additions & 0 deletions Apps.BWX/Webhooks/Payload/ProjectTranslationFinishedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class ProjectTranslationFinishedEvent
{
public int ProjectId { get; set; }
public string ProjectUuid { get; set; }
public string ProjectName { get; set; }
public int TotalWorkUnitsCompleted { get; set; }
public int TotalWorkUnitsFailed { get; set; }
public int TotalWorkUnits { get; set; }
public string EventType { get; set; }
}
}
39 changes: 39 additions & 0 deletions Apps.BWX/Webhooks/Payload/TaskAssinedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class 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 double 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<string> Files { get; set; }
public int Id { get; set; }
public string Instructions { get; set; }
public double MinimumScoreRequired { get; set; }
public string Name { get; set; }
public List<string> 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<string> CustomFields { get; set; }
}
}
41 changes: 41 additions & 0 deletions Apps.BWX/Webhooks/Payload/TaskStatusChangedPayload.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class TaskStatusChangedPayload
{
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<string> Files { get; set; }
public int Id { get; set; }
public object Instructions { get; set; }
public double MinimumScoreRequired { get; set; }
public string Name { get; set; }
public string NewStatus { get; set; }
public string PreviousStatus { get; set; }
public List<string> 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<string> CustomFields { get; set; }
}
}
32 changes: 32 additions & 0 deletions Apps.BWX/Webhooks/Payload/WorkUnitStatusChangedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.BWX.Webhooks.Payload
{
public class WorkUnitStatusChangedEvent
{
public int BeginIndex { get; set; }
public int Chars { get; set; }
public int ConfirmedNonTranslatable { get; set; }
public int ConfirmedSegments { get; set; }
public int EndIndex { get; set; }
public string EventType { get; set; }
public string Id { get; set; }
public string NewStatus { get; set; }
public string PreviousStatus { get; set; }
public string ProjectFileId { get; set; }
public string ProjectFileName { get; set; }
public int ProjectStepLevel { get; set; }
public string SourceLocale { get; set; }
public string TargetLocale { get; set; }
public int TotalNonTranslatable { get; set; }
public int TotalSegments { get; set; }
public string TranslatedFileUrl { get; set; }
public int Words { get; set; }
public string Workflow { get; set; }
public bool IsLastWorkflow { get; set; }
}
}
Loading

0 comments on commit cb99c8e

Please sign in to comment.