team_log.stone 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. namespace team_log
  2. import async
  3. import team
  4. import team_common
  5. import users_common
  6. ###############################
  7. # Routes declarations
  8. ###############################
  9. struct GetTeamEventsArg
  10. limit UInt32(min_value=1, max_value=1000) = 1000
  11. "Number of results to return per call."
  12. account_id users_common.AccountId?
  13. "Filter the events by account ID. Return ony events with this account_id as either
  14. Actor, Context, or Participants."
  15. time team_common.TimeRange?
  16. "Filter by time range."
  17. # category filtering is disablled for now. to be enabled when
  18. # TeamEventGetEvents.SUPPORT_CATEGORY_BASED_FILTERING_FLAG is changed
  19. # category EventCategory?
  20. # "Filter the returned events to a single category."
  21. example default
  22. limit=50
  23. #category=groups
  24. struct GetTeamEventsResult
  25. events List(TeamEvent)
  26. "List of events."
  27. cursor String
  28. "Pass the cursor into :route:`get_events/continue` to obtain additional events."
  29. has_more Boolean
  30. "Is true if there are additional events that have not been returned yet.
  31. An additional call to :route:`get_events/continue` can retrieve them."
  32. example default
  33. events = [default]
  34. cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
  35. has_more = false
  36. union GetTeamEventsError
  37. "Errors that can be raised when calling :route:`get_events`."
  38. account_id_not_found
  39. "No user found matching the provided account_id."
  40. invalid_time_range
  41. "Invalid time range."
  42. example default
  43. account_id_not_found = null
  44. route get_events(GetTeamEventsArg, GetTeamEventsResult, GetTeamEventsError)
  45. "Retrieves team events.
  46. Permission : Team Auditing."
  47. attrs
  48. auth = "team"
  49. owner = "adminx"
  50. is_preview = true
  51. struct GetTeamEventsContinueArg
  52. cursor String
  53. "Indicates from what point to get the next set of events."
  54. example default
  55. cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
  56. union GetTeamEventsContinueError
  57. "Errors that can be raised when calling :route:`get_events/continue`."
  58. bad_cursor
  59. "Bad cursor."
  60. example default
  61. bad_cursor = null
  62. route get_events/continue(GetTeamEventsContinueArg, GetTeamEventsResult, GetTeamEventsContinueError)
  63. "Once a cursor has been retrieved from :route:`get_events`, use this to paginate through all events.
  64. Permission : Team Auditing."
  65. attrs
  66. auth = "team"
  67. owner = "adminx"
  68. is_preview = true