about summary refs log tree commit diff
path: root/LibMatrix/Responses/Admin
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-14 04:09:13 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-14 04:09:13 +0200
commit0d0511e35d9965fc0ea5190ae3347c3d77c3334c (patch)
treeb4e0c336cbccc37bd14952b447868a577ea15540 /LibMatrix/Responses/Admin
downloadLibMatrix-0d0511e35d9965fc0ea5190ae3347c3d77c3334c.tar.xz
Split LibMatrix into separate repo
Diffstat (limited to '')
-rw-r--r--LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs18
-rw-r--r--LibMatrix/Responses/Admin/AdminRoomListingResult.cs64
2 files changed, 82 insertions, 0 deletions
diff --git a/LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs b/LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs
new file mode 100644
index 0000000..f22c8d2
--- /dev/null
+++ b/LibMatrix/Responses/Admin/AdminRoomDeleteRequest.cs
@@ -0,0 +1,18 @@
+using System.Text.Json.Serialization;
+
+namespace LibMatrix.Responses.Admin;
+
+public class AdminRoomDeleteRequest {
+    [JsonPropertyName("new_room_user_id")]
+    public string? NewRoomUserId { get; set; }
+    [JsonPropertyName("room_name")]
+    public string? RoomName { get; set; }
+    [JsonPropertyName("block")]
+    public bool Block { get; set; }
+    [JsonPropertyName("purge")]
+    public bool Purge { get; set; }
+    [JsonPropertyName("message")]
+    public string? Message { get; set; }
+    [JsonPropertyName("force_purge")]
+    public bool ForcePurge { get; set; }
+}
diff --git a/LibMatrix/Responses/Admin/AdminRoomListingResult.cs b/LibMatrix/Responses/Admin/AdminRoomListingResult.cs
new file mode 100644
index 0000000..f035184
--- /dev/null
+++ b/LibMatrix/Responses/Admin/AdminRoomListingResult.cs
@@ -0,0 +1,64 @@
+using System.Text.Json.Serialization;
+
+namespace LibMatrix.Responses.Admin;
+
+public class AdminRoomListingResult {
+    [JsonPropertyName("offset")]
+    public int Offset { get; set; }
+
+    [JsonPropertyName("total_rooms")]
+    public int TotalRooms { get; set; }
+
+    [JsonPropertyName("next_batch")]
+    public int? NextBatch { get; set; }
+
+    [JsonPropertyName("prev_batch")]
+    public int? PrevBatch { get; set; }
+
+    [JsonPropertyName("rooms")]
+    public List<AdminRoomListingResultRoom> Rooms { get; set; } = new();
+
+    public class AdminRoomListingResultRoom {
+        [JsonPropertyName("room_id")]
+        public string RoomId { get; set; }
+
+        [JsonPropertyName("name")]
+        public string? Name { get; set; }
+
+        [JsonPropertyName("canonical_alias")]
+        public string? CanonicalAlias { get; set; }
+
+        [JsonPropertyName("joined_members")]
+        public int JoinedMembers { get; set; }
+
+        [JsonPropertyName("joined_local_members")]
+        public int JoinedLocalMembers { get; set; }
+
+        [JsonPropertyName("version")]
+        public string Version { get; set; }
+
+        [JsonPropertyName("creator")]
+        public string Creator { get; set; }
+
+        [JsonPropertyName("encryption")]
+        public string? Encryption { get; set; }
+
+        [JsonPropertyName("federatable")]
+        public bool Federatable { get; set; }
+
+        [JsonPropertyName("public")]
+        public bool Public { get; set; }
+
+        [JsonPropertyName("join_rules")]
+        public string? JoinRules { get; set; }
+
+        [JsonPropertyName("guest_access")]
+        public string? GuestAccess { get; set; }
+
+        [JsonPropertyName("history_visibility")]
+        public string? HistoryVisibility { get; set; }
+
+        [JsonPropertyName("state_events")]
+        public int StateEvents { get; set; }
+    }
+}