server_state.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. syntax = "proto3";
  2. package chatto.api.v1;
  3. import "chatto/api/v1/server.proto";
  4. // Request for the authenticated public server profile.
  5. message GetServerProfileRequest {}
  6. // Authenticated public server profile response.
  7. message GetServerProfileResponse {
  8. // Current public server profile.
  9. ServerPublicProfile profile = 1;
  10. }
  11. // Request for the authenticated message of the day.
  12. message GetMotdRequest {}
  13. // Authenticated message of the day response.
  14. message GetMotdResponse {
  15. // Optional message of the day shown to authenticated members.
  16. optional string motd = 1;
  17. }
  18. // Authenticated server runtime settings used by clients.
  19. message ServerRuntimeConfig {
  20. // Whether Web Push notifications are fully configured.
  21. bool push_notifications_enabled = 1;
  22. // Optional VAPID public key for Web Push registration.
  23. optional string vapid_public_key = 2;
  24. // Optional LiveKit URL for voice and video calls.
  25. optional string livekit_url = 3;
  26. reserved 4;
  27. reserved "direct_registration_enabled";
  28. // Whether video processing is enabled.
  29. bool video_processing_enabled = 5;
  30. // Maximum general upload size in bytes.
  31. int64 max_upload_size = 6;
  32. // Maximum video upload size in bytes.
  33. int64 max_video_upload_size = 7;
  34. // Message edit window in seconds.
  35. int32 message_edit_window_seconds = 8;
  36. }
  37. // Request for authenticated server runtime configuration.
  38. message GetRuntimeConfigRequest {}
  39. // Authenticated server runtime configuration response.
  40. message GetRuntimeConfigResponse {
  41. // Authenticated runtime settings used by clients.
  42. ServerRuntimeConfig runtime = 1;
  43. }
  44. // Provides authenticated server-wide reads.
  45. service ServerService {
  46. // Returns the current public server profile to an authenticated caller.
  47. rpc GetServerProfile(GetServerProfileRequest) returns (GetServerProfileResponse);
  48. // Returns the authenticated message of the day.
  49. rpc GetMotd(GetMotdRequest) returns (GetMotdResponse);
  50. // Returns authenticated runtime settings used by clients.
  51. rpc GetRuntimeConfig(GetRuntimeConfigRequest) returns (GetRuntimeConfigResponse);
  52. }