From 0d0511e35d9965fc0ea5190ae3347c3d77c3334c Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 14 Aug 2023 04:09:13 +0200 Subject: Split LibMatrix into separate repo --- LibMatrix/Filters/SyncFilter.cs | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 LibMatrix/Filters/SyncFilter.cs (limited to 'LibMatrix/Filters/SyncFilter.cs') diff --git a/LibMatrix/Filters/SyncFilter.cs b/LibMatrix/Filters/SyncFilter.cs new file mode 100644 index 0000000..c907f6b --- /dev/null +++ b/LibMatrix/Filters/SyncFilter.cs @@ -0,0 +1,66 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.Filters; + +public class SyncFilter { + [JsonPropertyName("account_data")] + public EventFilter? AccountData { get; set; } + + [JsonPropertyName("presence")] + public EventFilter? Presence { get; set; } + + [JsonPropertyName("room")] + public RoomFilter? Room { get; set; } + + public class RoomFilter { + [JsonPropertyName("account_data")] + public StateFilter? AccountData { get; set; } + + [JsonPropertyName("ephemeral")] + public StateFilter? Ephemeral { get; set; } + + [JsonPropertyName("state")] + public StateFilter? State { get; set; } + + [JsonPropertyName("timeline")] + public StateFilter? Timeline { get; set; } + + + public class StateFilter : EventFilter { + [JsonPropertyName("contains_url")] + public bool? ContainsUrl { get; set; } + + [JsonPropertyName("include_redundant_members")] + public bool? IncludeRedundantMembers { get; set; } + + [JsonPropertyName("lazy_load_members")] + public bool? LazyLoadMembers { get; set; } + + [JsonPropertyName("rooms")] + public List? Rooms { get; set; } + + [JsonPropertyName("not_rooms")] + public List? NotRooms { get; set; } + + [JsonPropertyName("unread_thread_notifications")] + public bool? UnreadThreadNotifications { get; set; } + } + } + + public class EventFilter { + [JsonPropertyName("limit")] + public int? Limit { get; set; } + + [JsonPropertyName("types")] + public List? Types { get; set; } + + [JsonPropertyName("not_types")] + public List? NotTypes { get; set; } + + [JsonPropertyName("senders")] + public List? Senders { get; set; } + + [JsonPropertyName("not_senders")] + public List? NotSenders { get; set; } + } +} -- cgit 1.4.1