1 files changed, 170 insertions, 0 deletions
diff --git a/extra/admin-api/Models/Spacebar.Models.Gateway/IdentifyRequest.cs b/extra/admin-api/Models/Spacebar.Models.Gateway/IdentifyRequest.cs
index ee39e292..f94ebecd 100644
--- a/extra/admin-api/Models/Spacebar.Models.Gateway/IdentifyRequest.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Gateway/IdentifyRequest.cs
@@ -3,6 +3,11 @@ using System.Text.Json.Serialization;
namespace Spacebar.Models.Gateway;
+public class HelloResponse {
+ [JsonPropertyName("heartbeat_interval")]
+ public int HeartbeatInterval { get; set; }
+}
+
public class IdentifyRequest {
[JsonPropertyName("token")]
public string Token { get; set; }
@@ -32,6 +37,171 @@ public class IdentifyRequest {
public JsonObject? ClientState { get; set; }
}
+/// <summary>
+/// This class defines all client properties used by discord
+/// This should *not* be used as a schema, as the types are merely conventions, and the structure isn't well-defined.
+/// </summary>
+public class IdentifyClientProperties {
+ [JsonPropertyName("os")]
+ public string? OperatingSystem { get; set; }
+
+ [JsonPropertyName("os_version")]
+ public string? OperatingSystemVersion { get; set; }
+
+ [JsonPropertyName("os_sdk_version")]
+ public string? OperatingSystemSdkVersion { get; set; }
+
+ [JsonPropertyName("os_arch")]
+ public string? OperatingSystemArchitecture { get; set; }
+
+ [JsonPropertyName("app_arch")]
+ public string? ApplicationArchitecture { get; set; }
+
+ [JsonPropertyName("browser")]
+ public string? Browser { get; set; }
+
+ [JsonPropertyName("browser_user_agent")]
+ public string? BrowserUserAgent { get; set; }
+
+ [JsonPropertyName("browser_version")]
+ public string? BrowserVersion { get; set; }
+
+ [JsonPropertyName("client_build_number")]
+ public int? ClientBuildNumber { get; set; }
+
+ [JsonPropertyName("native_build_number")]
+ public int? NativeBuildNumber { get; set; }
+
+ [JsonPropertyName("client_version")]
+ public string? ClientVersion { get; set; }
+
+ [JsonPropertyName("client_event_source")]
+ public string? ClientEventSource { get; set; }
+
+ [JsonPropertyName("client_app_state")]
+ public string? ClientAppState { get; set; }
+
+ [JsonPropertyName("client_launch_id")]
+ public string? ClientLaunchId { get; set; }
+
+ [JsonPropertyName("client_heartbeat_session_id")]
+ public string? ClientHeartbeatSessionId { get; set; }
+
+ [JsonPropertyName("client_performance_cpu")]
+ public int? ClientPerformanceCpu { get; set; }
+
+ [JsonPropertyName("client_performance_memory")]
+ public int? ClientPerformanceMemory { get; set; }
+
+ [JsonPropertyName("cpu_core_count")]
+ public int? CpuCoreCount { get; set; }
+
+ [JsonPropertyName("release_channel")]
+ public string? ReleaseChannel { get; set; }
+
+ [JsonPropertyName("system_locale")]
+ public string? SystemLocale { get; set; }
+
+ [JsonPropertyName("device")]
+ public string? DeviceModel { get; set; }
+
+ [JsonPropertyName("device_vendor_id")]
+ public string? DeviceVendorId { get; set; }
+
+ [JsonPropertyName("device_advertiser_id")]
+ public string? DeviceAdvertiserId { get; set; }
+
+ [JsonPropertyName("design_id")]
+ public int? DesignId { get; set; }
+
+ [JsonPropertyName("accessibility_support_enabled")]
+ public string? AccessibilitySupportEnabled { get; set; }
+
+ [JsonPropertyName("accessibility_features")]
+ public int? AccessibilityFeatures { get; set; }
+
+ [JsonPropertyName("window_manager")]
+ public string? WindowManager { get; set; }
+
+ [JsonPropertyName("distro")]
+ public string? Distro { get; set; }
+
+ [JsonPropertyName("runtime_environment")]
+ public string? RuntimeEnvironment { get; set; }
+
+ [JsonPropertyName("display_server")]
+ public string? DisplayServer { get; set; }
+
+ [JsonPropertyName("referrer")]
+ public string? Referrer { get; set; }
+
+ [JsonPropertyName("referrer_current")]
+ public string? ReferrerCurrent { get; set; }
+
+ [JsonPropertyName("referring_domain")]
+ public string? ReferringDomain { get; set; }
+
+ [JsonPropertyName("referring_domain_current")]
+ public string? ReferringDomainCurrent { get; set; }
+
+ [JsonPropertyName("search_engine")]
+ public string? SearchEngine { get; set; }
+
+ [JsonPropertyName("search_engine_current")]
+ public string? SearchEngineCurrent { get; set; }
+
+ [JsonPropertyName("mp_keyword")]
+ public string? MpKeyword { get; set; }
+
+ [JsonPropertyName("mp_keyword_current")]
+ public string? MpKeywordCurrent { get; set; }
+
+ [JsonPropertyName("utm_campaign")]
+ public string? UtmCampaign { get; set; }
+
+ [JsonPropertyName("utm_campaign_current")]
+ public string? UtmCampaignCurrent { get; set; }
+
+ [JsonPropertyName("utm_content")]
+ public string? UtmContent { get; set; }
+
+ [JsonPropertyName("utm_content_current")]
+ public string? UtmContentCurrent { get; set; }
+
+ [JsonPropertyName("utm_medium")]
+ public string? UtmMedium { get; set; }
+
+ [JsonPropertyName("utm_medium_current")]
+ public string? UtmMediumCurrent { get; set; }
+
+ [JsonPropertyName("utm_source")]
+ public string? UtmSource { get; set; }
+
+ [JsonPropertyName("utm_source_current")]
+ public string? UtmSourceCurrent { get; set; }
+
+ [JsonPropertyName("utm_term")]
+ public string? UtmTerm { get; set; }
+
+ [JsonPropertyName("utm_term_current")]
+ public string? UtmTermCurrent { get; set; }
+
+ [JsonPropertyName("has_client_mods")]
+ public bool? HasClientMods { get; set; }
+
+ [JsonPropertyName("launch_signature")]
+ public string? LaunchSignature { get; set; }
+
+ [JsonPropertyName("installation_id")]
+ public string? InstallationId { get; set; }
+
+ [JsonPropertyName("is_fast_connect")]
+ public bool? IsFastConnect { get; set; }
+
+ [JsonPropertyName("version")]
+ public string? Version { get; set; }
+}
+
[Flags]
public enum GatewayIntentFlags : ulong {
Guilds = 1,
|