team_devices.stone 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. namespace team
  2. import common
  3. #
  4. # Structs for devices/list_member_devices
  5. #
  6. struct ListMemberDevicesArg
  7. team_member_id String
  8. "The team's member id"
  9. include_web_sessions Boolean = true
  10. "Whether to list web sessions of the team's member"
  11. include_desktop_clients Boolean = true
  12. "Whether to list linked desktop devices of the team's member"
  13. include_mobile_clients Boolean = true
  14. "Whether to list linked mobile devices of the team's member"
  15. example default
  16. team_member_id="dbmid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
  17. struct DeviceSession
  18. session_id String
  19. "The session id"
  20. ip_address String?
  21. "The IP address of the last activity from this session"
  22. country String?
  23. "The country from which the last activity from this session was made"
  24. created common.DropboxTimestamp?
  25. "The time this session was created"
  26. updated common.DropboxTimestamp?
  27. "The time of the last activity from this session"
  28. # TODO(gal) - for mobile, camera uploads don't count for updated activity (See T25556
  29. # for more context). This needs to be documented somewhere.
  30. struct ActiveWebSession extends DeviceSession
  31. "Information on active web sessions"
  32. user_agent String
  33. "Information on the hosting device"
  34. os String
  35. "Information on the hosting operating system"
  36. browser String
  37. "Information on the browser used for this web session"
  38. expires common.DropboxTimestamp?
  39. "The time this session expires"
  40. example default
  41. session_id = "dbwsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
  42. ip_address = "3.3.3.3"
  43. country = "United States"
  44. created = "2015-05-12T15:50:38Z"
  45. updated = "2015-05-12T15:51:22Z"
  46. user_agent = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.815.0 Safari/535.1"
  47. os = "Windows"
  48. browser = "Chrome"
  49. expires = "2015-05-13T15:51:22Z"
  50. union DesktopPlatform
  51. windows
  52. "Official Windows Dropbox desktop client"
  53. mac
  54. "Official Mac Dropbox desktop client"
  55. linux
  56. "Official Linux Dropbox desktop client"
  57. struct DesktopClientSession extends DeviceSession
  58. "Information about linked Dropbox desktop client sessions"
  59. host_name String
  60. "Name of the hosting desktop"
  61. client_type DesktopPlatform
  62. "The Dropbox desktop client type"
  63. client_version String
  64. "The Dropbox client version"
  65. platform String
  66. "Information on the hosting platform"
  67. is_delete_on_unlink_supported Boolean
  68. "Whether it's possible to delete all of the account files upon unlinking"
  69. example default
  70. session_id= "dbdsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
  71. ip_address = "3.3.3.3"
  72. country = "United States"
  73. created = "2015-05-12T15:50:38Z"
  74. updated = "2015-05-12T15:51:22Z"
  75. host_name = "Home_desktop"
  76. client_type = mac
  77. client_version = "3.9.19"
  78. platform = "Mac OS X 10.10.3"
  79. is_delete_on_unlink_supported = true
  80. union MobileClientPlatform
  81. iphone
  82. "Official Dropbox iPhone client"
  83. ipad
  84. "Official Dropbox iPad client"
  85. android
  86. "Official Dropbox Android client"
  87. windows_phone
  88. "Official Dropbox Windows phone client"
  89. blackberry
  90. "Official Dropbox Blackberry client"
  91. struct MobileClientSession extends DeviceSession
  92. "Information about linked Dropbox mobile client sessions"
  93. device_name String
  94. "The device name"
  95. client_type MobileClientPlatform
  96. "The mobile application type"
  97. client_version String?
  98. "The dropbox client version"
  99. os_version String?
  100. "The hosting OS version"
  101. last_carrier String?
  102. "last carrier used by the device"
  103. example default
  104. session_id = "dbmsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I"
  105. ip_address = "3.3.3.3"
  106. country = "United States"
  107. created = "2015-05-12T15:50:38Z"
  108. updated = "2015-05-12T15:51:22Z"
  109. device_name = "Iphone 6"
  110. client_type = iphone
  111. client_version = "3.9.5"
  112. os_version = "8.4"
  113. last_carrier = "Verizon"
  114. struct ListMemberDevicesResult
  115. active_web_sessions List(ActiveWebSession)?
  116. "List of web sessions made by this team member"
  117. desktop_client_sessions List(DesktopClientSession)?
  118. "List of desktop clients used by this team member"
  119. mobile_client_sessions List(MobileClientSession)?
  120. "List of mobile client used by this team member"
  121. union ListMemberDevicesError
  122. member_not_found
  123. "Member not found."
  124. #
  125. # Route: devices/list_member_devices
  126. #
  127. route devices/list_member_devices(ListMemberDevicesArg, ListMemberDevicesResult, ListMemberDevicesError)
  128. "List all device sessions of a team's member."
  129. attrs
  130. auth = "team"
  131. owner = "adminx"
  132. #
  133. # Structs for devices/list_members_devices
  134. #
  135. struct ListMembersDevicesArg
  136. cursor String?
  137. "At the first call to the :route:`devices/list_members_devices` the cursor shouldn't be passed.
  138. Then, if the result of the call includes a cursor, the following requests should include the
  139. received cursors in order to receive the next sub list of team devices"
  140. include_web_sessions Boolean = true
  141. "Whether to list web sessions of the team members"
  142. include_desktop_clients Boolean = true
  143. "Whether to list desktop clients of the team members"
  144. include_mobile_clients Boolean = true
  145. "Whether to list mobile clients of the team members"
  146. struct MemberDevices
  147. "Information on devices of a team's member."
  148. team_member_id String
  149. "The member unique Id"
  150. web_sessions List(ActiveWebSession)?
  151. "List of web sessions made by this team member"
  152. desktop_clients List(DesktopClientSession)?
  153. "List of desktop clients by this team member"
  154. mobile_clients List(MobileClientSession)?
  155. "List of mobile clients by this team member"
  156. struct ListMembersDevicesResult
  157. devices List(MemberDevices)
  158. "The devices of each member of the team"
  159. has_more Boolean
  160. "If true, then there are more devices available. Pass the
  161. cursor to :route:`devices/list_members_devices` to retrieve the rest."
  162. cursor String?
  163. "Pass the cursor into :route:`devices/list_members_devices` to receive the next
  164. sub list of team's devices."
  165. union ListMembersDevicesError
  166. reset
  167. "Indicates that the cursor has been invalidated. Call
  168. :route:`devices/list_members_devices` again with an empty cursor to obtain a new cursor."
  169. #
  170. # Route: devices/list_members_devices
  171. #
  172. route devices/list_members_devices(ListMembersDevicesArg, ListMembersDevicesResult, ListMembersDevicesError)
  173. "List all device sessions of a team."
  174. attrs
  175. auth = "team"
  176. owner = "adminx"
  177. #
  178. # Structs for devices/revoke_device_session
  179. #
  180. struct DeviceSessionArg
  181. session_id String
  182. "The session id"
  183. team_member_id String
  184. "The unique id of the member owning the device"
  185. struct RevokeDesktopClientArg extends DeviceSessionArg
  186. delete_on_unlink Boolean = false
  187. "Whether to delete all files of the account (this is possible only if supported by
  188. the desktop client and will be made the next time the client access the account)"
  189. union_closed RevokeDeviceSessionArg
  190. web_session DeviceSessionArg
  191. "End an active session"
  192. desktop_client RevokeDesktopClientArg
  193. "Unlink a linked desktop device"
  194. mobile_client DeviceSessionArg
  195. "Unlink a linked mobile device"
  196. union RevokeDeviceSessionError
  197. device_session_not_found
  198. "Device session not found."
  199. member_not_found
  200. "Member not found."
  201. #
  202. # Route: devices/revoke_device_session
  203. #
  204. route devices/revoke_device_session(RevokeDeviceSessionArg, Void, RevokeDeviceSessionError)
  205. "Revoke a device session of a team's member"
  206. attrs
  207. auth = "team"
  208. owner = "adminx"
  209. #
  210. # structs for devices/revoke_device_session_batch
  211. #
  212. struct RevokeDeviceSessionBatchArg
  213. revoke_devices List(RevokeDeviceSessionArg)
  214. struct RevokeDeviceSessionStatus
  215. success Boolean
  216. "Result of the revoking request"
  217. error_type RevokeDeviceSessionError?
  218. "The error cause in case of a failure"
  219. struct RevokeDeviceSessionBatchResult
  220. revoke_devices_status List(RevokeDeviceSessionStatus)
  221. union RevokeDeviceSessionBatchError
  222. ""
  223. #
  224. # Route: devices/revoke_device_session_batch
  225. #
  226. route devices/revoke_device_session_batch(RevokeDeviceSessionBatchArg, RevokeDeviceSessionBatchResult, RevokeDeviceSessionBatchError)
  227. "Revoke a list of device sessions of team members"
  228. attrs
  229. auth = "team"
  230. owner = "adminx"
  231. #
  232. # Deprecated endpoints
  233. #
  234. struct ListTeamDevicesArg
  235. cursor String?
  236. "At the first call to the :route:`devices/list_team_devices` the cursor shouldn't be passed.
  237. Then, if the result of the call includes a cursor, the following requests should include the
  238. received cursors in order to receive the next sub list of team devices"
  239. include_web_sessions Boolean = true
  240. "Whether to list web sessions of the team members"
  241. include_desktop_clients Boolean = true
  242. "Whether to list desktop clients of the team members"
  243. include_mobile_clients Boolean = true
  244. "Whether to list mobile clients of the team members"
  245. struct ListTeamDevicesResult
  246. devices List(MemberDevices)
  247. "The devices of each member of the team"
  248. has_more Boolean
  249. "If true, then there are more devices available. Pass the
  250. cursor to :route:`devices/list_team_devices` to retrieve the rest."
  251. cursor String?
  252. "Pass the cursor into :route:`devices/list_team_devices` to receive the next
  253. sub list of team's devices."
  254. union ListTeamDevicesError
  255. reset
  256. "Indicates that the cursor has been invalidated. Call
  257. :route:`devices/list_team_devices` again with an empty cursor to obtain a new cursor."
  258. route devices/list_team_devices(ListTeamDevicesArg, ListTeamDevicesResult, ListTeamDevicesError) deprecated by devices/list_members_devices
  259. "List all device sessions of a team."
  260. attrs
  261. auth = "team"
  262. owner = "adminx"