auth.stone 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. namespace auth
  2. union AuthError
  3. "Errors occurred during authentication."
  4. invalid_access_token
  5. "The access token is invalid."
  6. invalid_select_user
  7. "The user specified in 'Dropbox-API-Select-User' is no longer on the team."
  8. invalid_select_admin
  9. "The user specified in 'Dropbox-API-Select-Admin' is not a Dropbox Business team admin."
  10. user_suspended
  11. "The user has been suspended."
  12. route token/revoke(Void, Void, Void)
  13. "Disables the access token used to authenticate the call."
  14. attrs
  15. owner = "dev-plat"
  16. allow_app_folder_app = true
  17. union RateLimitReason
  18. too_many_requests
  19. "You are making too many requests in the past few minutes."
  20. too_many_write_operations
  21. "There are currently too many write operations happening in the user's Dropbox."
  22. struct RateLimitError
  23. "Error occurred because the app is being rate limited."
  24. reason RateLimitReason
  25. "The reason why the app is being rate limited."
  26. retry_after UInt64 = 1
  27. "The number of seconds that the app should wait
  28. before making another request."
  29. #
  30. # OAuth 1.0 token conversion
  31. #
  32. struct TokenFromOAuth1Arg
  33. oauth1_token String(min_length=1)
  34. "The supplied OAuth 1.0 access token."
  35. oauth1_token_secret String(min_length=1)
  36. "The token secret associated with the supplied access token."
  37. example default
  38. oauth1_token = "qievr8hamyg6ndck"
  39. oauth1_token_secret = "qomoftv0472git7"
  40. struct TokenFromOAuth1Result
  41. oauth2_token String(min_length=1)
  42. "The OAuth 2.0 token generated from the supplied OAuth 1.0 token."
  43. example default
  44. oauth2_token = "9mCrkS7BIdAAAAAAAAAAHHS0TsSnpYvKQVtKdBnN5IuzhYOGblSgTcHgBFKFMmFn"
  45. union TokenFromOAuth1Error
  46. invalid_oauth1_token_info
  47. "Part or all of the OAuth 1.0 access token info is invalid."
  48. app_id_mismatch
  49. "The authorized app does not match the app associated with the supplied access token."
  50. route token/from_oauth1(TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error)
  51. "Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token."
  52. attrs
  53. auth = "app"
  54. owner = "dev-plat"
  55. allow_app_folder_app = true
  56. union AccessError
  57. "Error occurred because the account doesn't have permission to access the resource."
  58. invalid_account_type InvalidAccountTypeError
  59. "Current account type cannot access the resource."
  60. paper_access_denied PaperAccessError
  61. "Current account cannot access Paper."
  62. union PaperAccessError
  63. paper_disabled
  64. "Paper is disabled."
  65. not_paper_user
  66. "The provided user has not used Paper yet."
  67. union InvalidAccountTypeError
  68. endpoint
  69. "Current account type doesn't have permission to access this route endpoint."
  70. feature
  71. "Current account type doesn't have permission to access this feature."