about summary refs log tree commit diff
path: root/LibMatrix.Federation/FederationTypes/FederationGetMissingEventsRequest.cs
blob: f43dd4949c0e16a4f29f459b41bacbb9cf197b01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Text.Json.Serialization;

namespace LibMatrix.Federation.FederationTypes;

public class FederationGetMissingEventsRequest {
    /// <summary>
    /// Latest event IDs we already have (aka earliest to return)
    /// </summary>
    [JsonPropertyName("earliest_events")]
    public required List<string> EarliestEvents { get; set; }

    /// <summary>
    /// Events we want to get events before
    /// </summary>
    [JsonPropertyName("latest_events")]
    public required List<string> LatestEvents { get; set; }

    /// <summary>
    /// 10 by default
    /// </summary>
    [JsonPropertyName("limit")]
    public int Limit { get; set; }

    /// <summary>
    /// 0 by default
    /// </summary>
    [JsonPropertyName("min_depth")]
    public long MinDepth { get; set; }
}

public class FederationGetMissingEventsResponse {
    [JsonPropertyName("events")]
    public required List<SignedFederationEvent> Events { get; set; }
}