From 6812f544b27757d0a133c48677469f1e65f00689 Mon Sep 17 00:00:00 2001 From: Victor Chang Date: Thu, 6 Oct 2022 08:43:37 -0700 Subject: [PATCH] Update export complete vent to include statuses of each file Signed-off-by: Victor Chang --- src/Messaging/Events/ExportCompleteEvent.cs | 7 ++++++ src/Messaging/Events/ExportStatus.cs | 24 +++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/Messaging/Events/ExportCompleteEvent.cs b/src/Messaging/Events/ExportCompleteEvent.cs index 4577493..cf834a2 100644 --- a/src/Messaging/Events/ExportCompleteEvent.cs +++ b/src/Messaging/Events/ExportCompleteEvent.cs @@ -51,10 +51,17 @@ public class ExportCompleteEvent : EventBase [JsonProperty(PropertyName = "message")] public string Message { get; set; } = default!; + /// + /// Gets or sets files exported with its status + /// + [JsonProperty(PropertyName = "files")] + public Dictionary FileStatus { get; set; } + [JsonConstructor] public ExportCompleteEvent() { Status = ExportStatus.Unknown; + FileStatus = new Dictionary(); } public ExportCompleteEvent(ExportRequestEvent exportRequest, ExportStatus exportStatus) diff --git a/src/Messaging/Events/ExportStatus.cs b/src/Messaging/Events/ExportStatus.cs index bebf792..9420c35 100644 --- a/src/Messaging/Events/ExportStatus.cs +++ b/src/Messaging/Events/ExportStatus.cs @@ -23,4 +23,28 @@ public enum ExportStatus PartialFailure, Unknown } + + public enum FileExportStatus + { + /// + /// File exported successfully + /// + Success, + + /// + /// File is unsupported + /// + UnsupportedDataType, + + /// + /// Error with the export service + /// + ServiceError, + + /// + /// Unknown error + /// + Unknown, + + } }