common.proto 909 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. syntax = "proto3";
  2. package smartbotic.proto;
  3. option cc_enable_arenas = true;
  4. // Common timestamp message
  5. message Timestamp {
  6. int64 milliseconds = 1;
  7. }
  8. // Error details
  9. message Error {
  10. int32 code = 1;
  11. string message = 2;
  12. string details = 3; // JSON string for additional info
  13. }
  14. // Pagination request
  15. message PaginationRequest {
  16. int32 page = 1;
  17. int32 page_size = 2;
  18. string cursor = 3; // Alternative to offset pagination
  19. }
  20. // Pagination response
  21. message PaginationResponse {
  22. int32 total_count = 1;
  23. int32 page = 2;
  24. int32 page_size = 3;
  25. bool has_more = 4;
  26. string next_cursor = 5;
  27. }
  28. // Generic key-value pair
  29. message KeyValue {
  30. string key = 1;
  31. string value = 2;
  32. }
  33. // Request metadata
  34. message RequestMeta {
  35. string request_id = 1;
  36. string user_id = 2;
  37. map<string, string> headers = 3;
  38. }
  39. // Empty message for void returns
  40. message Empty {}