namespace decePubClient.Models.Mastodon; /// /api/v2/instance, the part the client reads: what the server calls itself and says of itself, its contact, /// its rules, and what an upload may be. public class InstanceV2 { public string Domain { get; set; } public string Title { get; set; } /// The short description, as plain text. public string Description { get; set; } public InstanceThumbnail Thumbnail { get; set; } = new(); public InstanceContact Contact { get; set; } = new(); public List Rules { get; set; } = []; public InstanceConfiguration Configuration { get; set; } = new(); } public class InstanceThumbnail { public string Url { get; set; } } /// Who answers for the server: an address, and the persona its administrator named (null when none). public class InstanceContact { public string Email { get; set; } public Account Account { get; set; } } /// One of the server's rules (/api/v1/instance/rules and the instance's own), in their order. public class InstanceRule { public string Id { get; set; } public string Text { get; set; } public string Hint { get; set; } } public class InstanceConfiguration { public MediaConfiguration MediaAttachments { get; set; } = new(); } /// The types an upload may have and how big it may be, as the server enforces them. public class MediaConfiguration { public List SupportedMimeTypes { get; set; } = []; public long ImageSizeLimit { get; set; } public long VideoSizeLimit { get; set; } public long ImageMatrixLimit { get; set; } public long VideoMatrixLimit { get; set; } public int VideoFrameRateLimit { get; set; } } /// /api/v1/instance/extended_description and /privacy_policy: the server's text as sanitized HTML, and when it /// last changed. public class InstanceDocument { public DateTime? UpdatedAt { get; set; } public string Content { get; set; } } /// /api/v1/instance/terms_of_service (Mastodon 4.4): the one version PrivaPub keeps; none while it has none /// (404). public class TermsOfService { /// yyyy-MM-dd. public string EffectiveDate { get; set; } /// Whether they apply already (false while their date is ahead). public bool Effective { get; set; } public string Content { get; set; } public string SucceededBy { get; set; } } /// /api/v1/instance/domain_blocks: a block the administrator published; its domain partly starred when it is /// obfuscated, its digest the SHA-256 of the whole name. public class PublicDomainBlock { public string Domain { get; set; } public string Digest { get; set; } /// suspend, silence or noop. public string Severity { get; set; } public string Comment { get; set; } }