Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Core/Resgrid.Config/DataProtectionConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ public static class DataProtectionConfig
/// <summary>Maximum field items one broker request may carry; larger requests are refused.</summary>
public static int BrokerMaxItemsPerRequest = 200;

/// <summary>
/// Purposes the broker's workload decrypt lane (POST api/v1/broker/workload/decrypt?purpose=) accepts, comma
/// separated (RMS plan section 5.9.4). Each purpose is an egress the department acknowledged in the
/// application before the caller reaches the broker: neris-submission (worker 41) and records-export
/// (worker 45 / Workflow renders). Empty disables the lane; callers fail closed with workload_purpose_denied.
/// </summary>
public static string BrokerWorkloadPurposes = "neris-submission,records-export";

/// <summary>True on the broker host to run the ADP migration coordinator sweep there (the only
/// host with a real KMS adapter). Workers.Console keeps its sweep for liveness/offboarding
/// flips but never runs nights — its engine reports unavailable.</summary>
Expand Down
24 changes: 24 additions & 0 deletions Core/Resgrid.Config/RecordsFieldConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Resgrid.Config
{
/// <summary>
/// Field Records client change control (RMS plan RMS-1D): the minimum app version each operational app must
/// report before the server hands it a Field Records catalog, and the sync page bound. A blank minimum accepts
/// any version. Environment keys: RESGRID:RecordsFieldConfig:MinimumResponderVersion and so on.
/// </summary>
public static class RecordsFieldConfig
{
public static string MinimumResponderVersion = "";
public static string MinimumUnitVersion = "";
public static string MinimumIncidentCommandVersion = "";
public static string MinimumDispatchVersion = "";

/// <summary>Most rows one sync page carries; a field bundle is a working set, not an archive pull.</summary>
public static int SyncTakeMax = 200;

/// <summary>Most drafts and returned Records of the caller included in one bundle.</summary>
public static int SyncDraftsMax = 100;

/// <summary>Most open work assignments returned to one caller.</summary>
public static int AssignmentsMax = 200;
}
}
251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.ar.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.de.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.el.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.en.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.es.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.fr.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.it.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.pl.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.sv.resx

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions Core/Resgrid.Localization/Areas/User/Records/Records.uk.resx

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions Core/Resgrid.Model/AdpTableBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ public static AdpTableBinding ViaParent(string tableName, string pkColumn, bool

/// <summary>Row-level protection marker column ("IsProtected"), when the table has one (companion pattern).</summary>
public string ProtectedMarkerColumn { get; init; }

/// <summary>
/// Non-cataloged sibling columns a PackedJson column packs and clears (ADP catalog v11). They are read and
/// written with the row but never counted as residue on their own.
/// </summary>
public IReadOnlyList<string> CarrierColumns { get; init; } = Array.Empty<string>();

/// <summary>
/// Optional boolean column that scopes the sweep to rows needing protection (RmsRecordValues.ProtectionRequired);
/// null sweeps every row of the table.
/// </summary>
public string RowFilterColumn { get; init; }
}

/// <summary>One cataloged column inside a binding.</summary>
Expand Down
10 changes: 9 additions & 1 deletion Core/Resgrid.Model/ProtectedFieldStorageKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public enum ProtectedFieldStorageKind
/// while protected and a Protected{Name}Envelope companion column carries the value
/// (Appendix B pattern).
/// </summary>
CompanionColumn = 3
CompanionColumn = 3,

/// <summary>
/// A JSON pack of a row's sibling typed columns carried as a text envelope in a dedicated column
/// (RmsRecordValues.ProtectedEnvelope, ADP catalog v11). While sealed the siblings are null, so the row still
/// populates exactly one column group; the binding names the siblings as carrier columns and a boolean row
/// filter scopes the sweep to rows whose field is Protected-classified.
/// </summary>
PackedJson = 4
}
}
328 changes: 328 additions & 0 deletions Core/Resgrid.Model/Records/FieldRecordsContracts.cs

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Core/Resgrid.Model/Records/IncidentReportContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ public class IncidentReportDraftInput
/// <summary>One conditional section instance being saved; <see cref="DetailJson"/> is the contract-shaped body.</summary>
public class IncidentModuleInput
{
/// <summary>
/// The stored row this input replaces, or null for a new section. Identity has to travel with the row:
/// matching by list position would hand one section's id, ProtectionId and sealed envelopes to another
/// section's content as soon as a client reorders or removes an entry.
/// </summary>
public string ModuleId { get; set; }
public RmsIncidentModuleKind Kind { get; set; }
public string PrimaryCode { get; set; }
public string SecondaryCode { get; set; }
Expand All @@ -157,6 +163,8 @@ public class IncidentModuleInput

public class IncidentResourceInput
{
/// <summary>The stored row this input replaces, or null for a new resource. See <see cref="IncidentModuleInput.ModuleId"/>.</summary>
public string ResourceId { get; set; }
public string ResourceCode { get; set; }
public int? Quantity { get; set; }
public string Detail { get; set; }
Expand Down Expand Up @@ -200,6 +208,8 @@ public class IncidentCasualtyRescueInput

public class IncidentExposureInput
{
/// <summary>The stored row this input replaces, or null for a new exposure. See <see cref="IncidentModuleInput.ModuleId"/>.</summary>
public string ExposureId { get; set; }
public string LocationKind { get; set; }
public string ItemType { get; set; }
public string DamageType { get; set; }
Expand Down
52 changes: 52 additions & 0 deletions Core/Resgrid.Model/Records/RecordsBulkContracts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System.Collections.Generic;

namespace Resgrid.Model
{
/// <summary>How a bulk packet is compiled (RMS plan section 4.7, "Bulk operations and packets").</summary>
public enum RecordsBulkPacketMode
{
/// <summary>One compiled PDF: cover page with manifest, then every record in selection order.</summary>
CompiledPdf = 1,
/// <summary>A zip bundle of per-record PDFs plus a manifest.json.</summary>
Bundle = 2
}

/// <summary>A bounded bulk print/export over an authorized selection; never bulk void or bulk delete.</summary>
public class RecordsBulkPacketRequest
{
/// <summary>Most records one packet may compile; a packet is a deliverable, not an export of the archive.</summary>
public const int MaxRecords = 200;

public List<string> RecordIds { get; set; } = new List<string>();
public RecordsBulkPacketMode Mode { get; set; } = RecordsBulkPacketMode.CompiledPdf;
public string Title { get; set; }
/// <summary>Why the packet is produced (accreditation, insurance, discovery, board packet); audited per record.</summary>
public string Purpose { get; set; }
/// <summary>Optional delivery through the scheduled-report email path; the stored run stays downloadable either way.</summary>
public string DeliverToEmail { get; set; }
public RmsOriginClient OriginClient { get; set; } = RmsOriginClient.Web;
}

public class RecordsBulkAssignRequest
{
public List<string> RecordIds { get; set; } = new List<string>();
public string ReviewerUserId { get; set; }
public string Reason { get; set; }
}

public class RecordsBulkResult
{
public int Processed { get; set; }
public int Skipped { get; set; }
public List<RecordsBulkSkip> Skips { get; set; } = new List<RecordsBulkSkip>();
/// <summary>The stored run for a packet (download through the export runs surface); null for an assignment.</summary>
public RmsExportRun Run { get; set; }
public bool Delivered { get; set; }
}

public class RecordsBulkSkip
{
public string RecordId { get; set; }
public string Reason { get; set; }
}
}
9 changes: 9 additions & 0 deletions Core/Resgrid.Model/Records/RecordsContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public class RecordNewCallInput
public class RecordDraftInput
{
public RecordUdfInput CustomFields { get; set; }
/// <summary>Typed values for a department definition (RMS-1B, plan section 5.3); ignored for locked system definitions.</summary>
public List<RecordValueInput> Values { get; set; } = new List<RecordValueInput>();
/// <summary>One of <see cref="RmsDefinitionKeys"/>; required on create.</summary>
public string DefinitionKey { get; set; }
public int? CallId { get; set; }
Expand Down Expand Up @@ -185,6 +187,11 @@ public class RecordAggregate
public ProtectedReadResult Protection { get; set; }

public RecordUdfSection CustomFields { get; set; }
/// <summary>Typed values rendered against the pinned definition version (department definitions only).</summary>
public RecordValueSet Values { get; set; }
/// <summary>The pinned definition version for a department definition; null for locked system definitions.</summary>
[Newtonsoft.Json.JsonIgnore]
public RmsRecordDefinitionVersion DefinitionVersionRow { get; set; }
public RmsOperationalRecord Record { get; set; }
public RmsOperationalRecordDetail Details { get; set; }
public List<RmsRecordParticipant> Participants { get; set; } = new List<RmsRecordParticipant>();
Expand All @@ -201,6 +208,8 @@ public class RecordAggregate
public class RecordSnapshot
{
public RecordUdfSection CustomFields { get; set; }
/// <summary>Department-definition typed values pinned to the version's labels: section label -> field label -> display, or a row array for repeating sections.</summary>
public Dictionary<string, object> Values { get; set; }
public int SnapshotVersion { get; set; } = 1;
public List<RmsEvidenceArtifact> Evidence { get; set; } = new List<RmsEvidenceArtifact>();
public string RecordId { get; set; }
Expand Down
5 changes: 4 additions & 1 deletion Core/Resgrid.Model/Records/RmsEvidenceArtifact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public enum RmsEvidenceKind
InventoryUsage = 5,

/// <summary>Participant certification/qualification validity at the incident time.</summary>
CertificationSnapshot = 6
CertificationSnapshot = 6,

/// <summary>An operational pack's module projection (RMS-1C): personnel check-in, resource summary, qualifications or command summary composed from the owning module with source identifiers.</summary>
ModuleProjection = 7
}

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion Core/Resgrid.Model/Records/RmsExportTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ public enum RmsExportTrigger
{
Scheduled = 1,
Record = 2,
Manual = 3
Manual = 3,
/// <summary>A bulk packet compiled over an authorized selection (RMS plan section 4.7).</summary>
Bulk = 4
}
}
Loading
Loading