server.proto 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. syntax = "proto3";
  2. package chatto.discovery.v1;
  3. import "chatto/api/v1/server.proto";
  4. // Request for public server metadata.
  5. message GetServerRequest {}
  6. // Public metadata clients need before they can authenticate or render the
  7. // initial server view.
  8. message GetServerResponse {
  9. // Public server profile and branding.
  10. chatto.api.v1.ServerPublicProfile profile = 1;
  11. // Login and registration options.
  12. chatto.api.v1.ServerLogin login = 2;
  13. // Whether first-run setup is available before normal registration.
  14. bool setup_required = 3;
  15. }
  16. // Request for the public Neighbor directory.
  17. message ListNeighborsRequest {}
  18. // Publicly advertised servers. The response has no ordering contract.
  19. message ListNeighborsResponse {
  20. reserved 2;
  21. reserved "neighbors";
  22. // Canonical origins of the advertised servers.
  23. repeated string origins = 1;
  24. }
  25. // Provides unauthenticated server discovery metadata.
  26. service ServerDiscoveryService {
  27. // Returns public server metadata, branding, registration status, and login
  28. // provider information. This fully public RPC is available before login so
  29. // clients can render the first server screen and authentication choices.
  30. rpc GetServer(GetServerRequest) returns (GetServerResponse) {
  31. option idempotency_level = NO_SIDE_EFFECTS;
  32. }
  33. // Returns the public Neighbor directory without requiring a session.
  34. rpc ListNeighbors(ListNeighborsRequest) returns (ListNeighborsResponse) {
  35. option idempotency_level = NO_SIDE_EFFECTS;
  36. }
  37. }