forgejo 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/CHANGELOG.md~ +3 -0
  4. data/Makefile +16 -16
  5. data/README.md +68 -12
  6. data/config.yaml +21 -0
  7. data/config.yaml~ +13 -0
  8. data/docs/APIForbiddenError.md +20 -0
  9. data/docs/APIInvalidTopicsError.md +20 -0
  10. data/docs/APINotFound.md +22 -0
  11. data/docs/APIRepoArchivedError.md +20 -0
  12. data/docs/APIUnauthorizedError.md +20 -0
  13. data/docs/APIValidationError.md +20 -0
  14. data/docs/ActivitypubApi.md +133 -0
  15. data/docs/AdminApi.md +1305 -184
  16. data/docs/Attachment.md +2 -0
  17. data/docs/CreatePushMirrorOption.md +3 -1
  18. data/docs/CreateQuotaGroupOptions.md +20 -0
  19. data/docs/CreateQuotaRuleOptions.md +22 -0
  20. data/docs/EditAttachmentOptions.md +2 -0
  21. data/docs/EditQuotaRuleOptions.md +20 -0
  22. data/docs/EditRepoOption.md +2 -0
  23. data/docs/IssueApi.md +55 -55
  24. data/docs/MarkupOption.md +2 -0
  25. data/docs/NoteOptions.md +18 -0
  26. data/docs/OrganizationApi.md +386 -19
  27. data/docs/PackageApi.md +1 -1
  28. data/docs/PullRequest.md +2 -0
  29. data/docs/PushMirror.md +2 -0
  30. data/docs/QuotaGroup.md +20 -0
  31. data/docs/QuotaInfo.md +20 -0
  32. data/docs/QuotaRuleInfo.md +22 -0
  33. data/docs/QuotaUsed.md +18 -0
  34. data/docs/QuotaUsedArtifact.md +22 -0
  35. data/docs/QuotaUsedAttachment.md +24 -0
  36. data/docs/QuotaUsedAttachmentContainedIn.md +20 -0
  37. data/docs/QuotaUsedPackage.md +26 -0
  38. data/docs/QuotaUsedSize.md +22 -0
  39. data/docs/QuotaUsedSizeAssets.md +22 -0
  40. data/docs/QuotaUsedSizeAssetsAttachments.md +20 -0
  41. data/docs/QuotaUsedSizeAssetsPackages.md +18 -0
  42. data/docs/QuotaUsedSizeGit.md +18 -0
  43. data/docs/QuotaUsedSizeRepos.md +20 -0
  44. data/docs/RepoCreateReleaseAttachmentRequest.md +4 -2
  45. data/docs/Repository.md +2 -0
  46. data/docs/RepositoryApi.md +308 -72
  47. data/docs/SetUserQuotaGroupsOptions.md +18 -0
  48. data/docs/UpdateBranchRepoOption.md +18 -0
  49. data/docs/UserApi.md +390 -33
  50. data/forgejo.gemspec +12 -13
  51. data/lib/forgejo/api/activitypub_api.rb +110 -2
  52. data/lib/forgejo/api/admin_api.rb +1148 -109
  53. data/lib/forgejo/api/issue_api.rb +94 -36
  54. data/lib/forgejo/api/miscellaneous_api.rb +2 -2
  55. data/lib/forgejo/api/notification_api.rb +2 -2
  56. data/lib/forgejo/api/organization_api.rb +363 -2
  57. data/lib/forgejo/api/package_api.rb +4 -2
  58. data/lib/forgejo/api/repository_api.rb +370 -26
  59. data/lib/forgejo/api/settings_api.rb +2 -2
  60. data/lib/forgejo/api/user_api.rb +350 -8
  61. data/lib/forgejo/api_client.rb +2 -2
  62. data/lib/forgejo/api_error.rb +2 -2
  63. data/lib/forgejo/configuration.rb +2 -2
  64. data/lib/forgejo/models/access_token.rb +11 -5
  65. data/lib/forgejo/models/action_task.rb +11 -5
  66. data/lib/forgejo/models/action_task_response.rb +11 -5
  67. data/lib/forgejo/models/action_variable.rb +11 -5
  68. data/lib/forgejo/models/activity.rb +11 -5
  69. data/lib/forgejo/models/activity_pub.rb +11 -5
  70. data/lib/forgejo/models/add_collaborator_option.rb +45 -5
  71. data/lib/forgejo/models/add_time_option.rb +21 -5
  72. data/lib/forgejo/models/annotated_tag.rb +11 -5
  73. data/lib/forgejo/models/annotated_tag_object.rb +11 -5
  74. data/lib/forgejo/models/api_error.rb +11 -5
  75. data/lib/forgejo/models/api_forbidden_error.rb +229 -0
  76. data/lib/forgejo/models/api_invalid_topics_error.rb +231 -0
  77. data/lib/forgejo/models/api_not_found.rb +240 -0
  78. data/lib/forgejo/models/api_repo_archived_error.rb +229 -0
  79. data/lib/forgejo/models/api_unauthorized_error.rb +229 -0
  80. data/lib/forgejo/models/api_validation_error.rb +229 -0
  81. data/lib/forgejo/models/attachment.rb +55 -6
  82. data/lib/forgejo/models/blocked_user.rb +11 -5
  83. data/lib/forgejo/models/branch.rb +11 -5
  84. data/lib/forgejo/models/branch_protection.rb +11 -5
  85. data/lib/forgejo/models/change_file_operation.rb +21 -5
  86. data/lib/forgejo/models/change_files_options.rb +21 -5
  87. data/lib/forgejo/models/changed_file.rb +11 -5
  88. data/lib/forgejo/models/combined_status.rb +11 -5
  89. data/lib/forgejo/models/comment.rb +11 -5
  90. data/lib/forgejo/models/commit.rb +11 -5
  91. data/lib/forgejo/models/commit_affected_files.rb +11 -5
  92. data/lib/forgejo/models/commit_date_options.rb +11 -5
  93. data/lib/forgejo/models/commit_meta.rb +11 -5
  94. data/lib/forgejo/models/commit_stats.rb +11 -5
  95. data/lib/forgejo/models/commit_status.rb +11 -5
  96. data/lib/forgejo/models/commit_user.rb +11 -5
  97. data/lib/forgejo/models/compare.rb +11 -5
  98. data/lib/forgejo/models/contents_response.rb +11 -5
  99. data/lib/forgejo/models/create_access_token_option.rb +21 -5
  100. data/lib/forgejo/models/create_branch_protection_option.rb +11 -5
  101. data/lib/forgejo/models/create_branch_repo_option.rb +21 -5
  102. data/lib/forgejo/models/create_email_option.rb +11 -5
  103. data/lib/forgejo/models/create_file_options.rb +21 -5
  104. data/lib/forgejo/models/create_fork_option.rb +11 -5
  105. data/lib/forgejo/models/create_gpg_key_option.rb +21 -5
  106. data/lib/forgejo/models/create_hook_option.rb +21 -5
  107. data/lib/forgejo/models/create_issue_comment_option.rb +21 -5
  108. data/lib/forgejo/models/create_issue_option.rb +21 -5
  109. data/lib/forgejo/models/create_key_option.rb +31 -5
  110. data/lib/forgejo/models/create_label_option.rb +31 -5
  111. data/lib/forgejo/models/create_milestone_option.rb +11 -5
  112. data/lib/forgejo/models/create_o_auth2_application_options.rb +11 -5
  113. data/lib/forgejo/models/create_or_update_secret_option.rb +21 -5
  114. data/lib/forgejo/models/create_org_option.rb +21 -5
  115. data/lib/forgejo/models/create_pull_request_option.rb +11 -5
  116. data/lib/forgejo/models/create_pull_review_comment.rb +11 -5
  117. data/lib/forgejo/models/create_pull_review_options.rb +11 -5
  118. data/lib/forgejo/models/create_push_mirror_option.rb +24 -9
  119. data/lib/forgejo/models/create_quota_group_options.rb +234 -0
  120. data/lib/forgejo/models/create_quota_rule_options.rb +244 -0
  121. data/lib/forgejo/models/create_release_option.rb +21 -5
  122. data/lib/forgejo/models/create_repo_option.rb +21 -5
  123. data/lib/forgejo/models/create_status_option.rb +11 -5
  124. data/lib/forgejo/models/create_tag_option.rb +21 -5
  125. data/lib/forgejo/models/create_tag_protection_option.rb +11 -5
  126. data/lib/forgejo/models/create_team_option.rb +21 -5
  127. data/lib/forgejo/models/create_user_option.rb +31 -5
  128. data/lib/forgejo/models/create_variable_option.rb +21 -5
  129. data/lib/forgejo/models/create_wiki_page_options.rb +11 -5
  130. data/lib/forgejo/models/cron.rb +11 -5
  131. data/lib/forgejo/models/delete_email_option.rb +11 -5
  132. data/lib/forgejo/models/delete_file_options.rb +21 -5
  133. data/lib/forgejo/models/delete_labels_option.rb +11 -5
  134. data/lib/forgejo/models/deploy_key.rb +11 -5
  135. data/lib/forgejo/models/dismiss_pull_review_options.rb +11 -5
  136. data/lib/forgejo/models/dispatch_workflow_option.rb +21 -5
  137. data/lib/forgejo/models/edit_attachment_options.rb +22 -6
  138. data/lib/forgejo/models/edit_branch_protection_option.rb +11 -5
  139. data/lib/forgejo/models/edit_deadline_option.rb +21 -5
  140. data/lib/forgejo/models/edit_git_hook_option.rb +11 -5
  141. data/lib/forgejo/models/edit_hook_option.rb +11 -5
  142. data/lib/forgejo/models/edit_issue_comment_option.rb +21 -5
  143. data/lib/forgejo/models/edit_issue_option.rb +11 -5
  144. data/lib/forgejo/models/edit_label_option.rb +11 -5
  145. data/lib/forgejo/models/edit_milestone_option.rb +11 -5
  146. data/lib/forgejo/models/edit_org_option.rb +11 -5
  147. data/lib/forgejo/models/edit_pull_request_option.rb +11 -5
  148. data/lib/forgejo/models/edit_quota_rule_options.rb +234 -0
  149. data/lib/forgejo/models/edit_reaction_option.rb +11 -5
  150. data/lib/forgejo/models/edit_release_option.rb +11 -5
  151. data/lib/forgejo/models/edit_repo_option.rb +22 -6
  152. data/lib/forgejo/models/edit_tag_protection_option.rb +11 -5
  153. data/lib/forgejo/models/edit_team_option.rb +21 -5
  154. data/lib/forgejo/models/edit_user_option.rb +11 -5
  155. data/lib/forgejo/models/email.rb +11 -5
  156. data/lib/forgejo/models/external_tracker.rb +11 -5
  157. data/lib/forgejo/models/external_wiki.rb +11 -5
  158. data/lib/forgejo/models/file_commit_response.rb +11 -5
  159. data/lib/forgejo/models/file_delete_response.rb +11 -5
  160. data/lib/forgejo/models/file_links_response.rb +11 -5
  161. data/lib/forgejo/models/file_response.rb +11 -5
  162. data/lib/forgejo/models/files_response.rb +11 -5
  163. data/lib/forgejo/models/general_api_settings.rb +11 -5
  164. data/lib/forgejo/models/general_attachment_settings.rb +11 -5
  165. data/lib/forgejo/models/general_repo_settings.rb +11 -5
  166. data/lib/forgejo/models/general_ui_settings.rb +11 -5
  167. data/lib/forgejo/models/generate_repo_option.rb +31 -5
  168. data/lib/forgejo/models/git_blob_response.rb +11 -5
  169. data/lib/forgejo/models/git_entry.rb +11 -5
  170. data/lib/forgejo/models/git_hook.rb +11 -5
  171. data/lib/forgejo/models/git_object.rb +11 -5
  172. data/lib/forgejo/models/git_tree_response.rb +11 -5
  173. data/lib/forgejo/models/gitignore_template_info.rb +11 -5
  174. data/lib/forgejo/models/gpg_key.rb +11 -5
  175. data/lib/forgejo/models/gpg_key_email.rb +11 -5
  176. data/lib/forgejo/models/hook.rb +11 -5
  177. data/lib/forgejo/models/identity.rb +11 -5
  178. data/lib/forgejo/models/internal_tracker.rb +11 -5
  179. data/lib/forgejo/models/issue.rb +11 -5
  180. data/lib/forgejo/models/issue_config.rb +11 -5
  181. data/lib/forgejo/models/issue_config_contact_link.rb +11 -5
  182. data/lib/forgejo/models/issue_config_validation.rb +11 -5
  183. data/lib/forgejo/models/issue_deadline.rb +11 -5
  184. data/lib/forgejo/models/issue_form_field.rb +11 -5
  185. data/lib/forgejo/models/issue_labels_option.rb +11 -5
  186. data/lib/forgejo/models/issue_meta.rb +11 -5
  187. data/lib/forgejo/models/issue_template.rb +11 -5
  188. data/lib/forgejo/models/label.rb +11 -5
  189. data/lib/forgejo/models/label_template.rb +11 -5
  190. data/lib/forgejo/models/license_template_info.rb +11 -5
  191. data/lib/forgejo/models/licenses_template_list_entry.rb +11 -5
  192. data/lib/forgejo/models/markdown_option.rb +11 -5
  193. data/lib/forgejo/models/markup_option.rb +22 -6
  194. data/lib/forgejo/models/merge_pull_request_option.rb +11 -5
  195. data/lib/forgejo/models/migrate_repo_options.rb +31 -5
  196. data/lib/forgejo/models/milestone.rb +11 -5
  197. data/lib/forgejo/models/new_issue_pins_allowed.rb +11 -5
  198. data/lib/forgejo/models/node_info.rb +11 -5
  199. data/lib/forgejo/models/node_info_services.rb +11 -5
  200. data/lib/forgejo/models/node_info_software.rb +11 -5
  201. data/lib/forgejo/models/node_info_usage.rb +11 -5
  202. data/lib/forgejo/models/node_info_usage_users.rb +11 -5
  203. data/lib/forgejo/models/note.rb +11 -5
  204. data/lib/forgejo/models/note_options.rb +220 -0
  205. data/lib/forgejo/models/notification_count.rb +11 -5
  206. data/lib/forgejo/models/notification_subject.rb +11 -5
  207. data/lib/forgejo/models/notification_thread.rb +11 -5
  208. data/lib/forgejo/models/o_auth2_application.rb +11 -5
  209. data/lib/forgejo/models/organization.rb +11 -5
  210. data/lib/forgejo/models/organization_permissions.rb +11 -5
  211. data/lib/forgejo/models/package.rb +11 -5
  212. data/lib/forgejo/models/package_file.rb +11 -5
  213. data/lib/forgejo/models/payload_commit.rb +11 -5
  214. data/lib/forgejo/models/payload_commit_verification.rb +11 -5
  215. data/lib/forgejo/models/payload_user.rb +11 -5
  216. data/lib/forgejo/models/permission.rb +11 -5
  217. data/lib/forgejo/models/pr_branch_info.rb +11 -5
  218. data/lib/forgejo/models/public_key.rb +11 -5
  219. data/lib/forgejo/models/pull_request.rb +23 -6
  220. data/lib/forgejo/models/pull_request_meta.rb +11 -5
  221. data/lib/forgejo/models/pull_review.rb +11 -5
  222. data/lib/forgejo/models/pull_review_comment.rb +11 -5
  223. data/lib/forgejo/models/pull_review_request_options.rb +11 -5
  224. data/lib/forgejo/models/push_mirror.rb +21 -6
  225. data/lib/forgejo/models/quota_group.rb +234 -0
  226. data/lib/forgejo/models/quota_info.rb +233 -0
  227. data/lib/forgejo/models/quota_rule_info.rb +244 -0
  228. data/lib/forgejo/models/quota_used.rb +221 -0
  229. data/lib/forgejo/models/quota_used_artifact.rb +242 -0
  230. data/lib/forgejo/models/quota_used_attachment.rb +251 -0
  231. data/lib/forgejo/models/quota_used_attachment_contained_in.rb +232 -0
  232. data/lib/forgejo/models/quota_used_package.rb +262 -0
  233. data/lib/forgejo/models/quota_used_size.rb +239 -0
  234. data/lib/forgejo/models/quota_used_size_assets.rb +240 -0
  235. data/lib/forgejo/models/quota_used_size_assets_attachments.rb +232 -0
  236. data/lib/forgejo/models/quota_used_size_assets_packages.rb +222 -0
  237. data/lib/forgejo/models/quota_used_size_git.rb +222 -0
  238. data/lib/forgejo/models/quota_used_size_repos.rb +232 -0
  239. data/lib/forgejo/models/reaction.rb +11 -5
  240. data/lib/forgejo/models/reference.rb +11 -5
  241. data/lib/forgejo/models/release.rb +11 -5
  242. data/lib/forgejo/models/rename_user_option.rb +21 -5
  243. data/lib/forgejo/models/replace_flags_option.rb +11 -5
  244. data/lib/forgejo/models/repo_collaborator_permission.rb +11 -5
  245. data/lib/forgejo/models/repo_commit.rb +11 -5
  246. data/lib/forgejo/models/repo_create_release_attachment_request.rb +26 -10
  247. data/lib/forgejo/models/repo_topic_options.rb +11 -5
  248. data/lib/forgejo/models/repo_transfer.rb +11 -5
  249. data/lib/forgejo/models/repository.rb +21 -6
  250. data/lib/forgejo/models/repository_meta.rb +11 -5
  251. data/lib/forgejo/models/search_results.rb +11 -5
  252. data/lib/forgejo/models/secret.rb +11 -5
  253. data/lib/forgejo/models/server_version.rb +11 -5
  254. data/lib/forgejo/models/set_user_quota_groups_options.rb +241 -0
  255. data/lib/forgejo/models/stop_watch.rb +11 -5
  256. data/lib/forgejo/models/submit_pull_review_options.rb +11 -5
  257. data/lib/forgejo/models/tag.rb +11 -5
  258. data/lib/forgejo/models/tag_archive_download_count.rb +11 -5
  259. data/lib/forgejo/models/tag_protection.rb +11 -5
  260. data/lib/forgejo/models/team.rb +11 -5
  261. data/lib/forgejo/models/team_search200_response.rb +11 -5
  262. data/lib/forgejo/models/timeline_comment.rb +11 -5
  263. data/lib/forgejo/models/topic_name.rb +11 -5
  264. data/lib/forgejo/models/topic_response.rb +11 -5
  265. data/lib/forgejo/models/tracked_time.rb +11 -5
  266. data/lib/forgejo/models/transfer_repo_option.rb +21 -5
  267. data/lib/forgejo/models/update_branch_repo_option.rb +239 -0
  268. data/lib/forgejo/models/update_file_options.rb +31 -5
  269. data/lib/forgejo/models/update_repo_avatar_option.rb +11 -5
  270. data/lib/forgejo/models/update_user_avatar_option.rb +11 -5
  271. data/lib/forgejo/models/update_variable_option.rb +21 -5
  272. data/lib/forgejo/models/user.rb +11 -5
  273. data/lib/forgejo/models/user_heatmap_data.rb +11 -5
  274. data/lib/forgejo/models/user_search200_response.rb +11 -5
  275. data/lib/forgejo/models/user_settings.rb +11 -5
  276. data/lib/forgejo/models/user_settings_options.rb +11 -5
  277. data/lib/forgejo/models/watch_info.rb +11 -5
  278. data/lib/forgejo/models/wiki_commit.rb +11 -5
  279. data/lib/forgejo/models/wiki_commit_list.rb +11 -5
  280. data/lib/forgejo/models/wiki_page.rb +11 -5
  281. data/lib/forgejo/models/wiki_page_meta_data.rb +11 -5
  282. data/lib/forgejo/version.rb +3 -3
  283. data/lib/forgejo.rb +28 -2
  284. data/manifest.scm +6 -2
  285. data/openapi-generator-cli.jar +0 -0
  286. data/pom.xml~ +22 -0
  287. data/smoke +1 -1
  288. data/spec/models/api_forbidden_error_spec.rb +42 -0
  289. data/spec/models/api_invalid_topics_error_spec.rb +42 -0
  290. data/spec/models/api_not_found_spec.rb +48 -0
  291. data/spec/models/api_repo_archived_error_spec.rb +42 -0
  292. data/spec/models/api_unauthorized_error_spec.rb +42 -0
  293. data/spec/models/api_validation_error_spec.rb +42 -0
  294. data/spec/models/create_quota_group_options_spec.rb +42 -0
  295. data/spec/models/create_quota_rule_options_spec.rb +48 -0
  296. data/spec/models/edit_quota_rule_options_spec.rb +42 -0
  297. data/spec/models/note_options_spec.rb +36 -0
  298. data/spec/models/quota_group_spec.rb +42 -0
  299. data/spec/models/quota_info_spec.rb +42 -0
  300. data/spec/models/quota_rule_info_spec.rb +48 -0
  301. data/spec/models/quota_used_artifact_spec.rb +48 -0
  302. data/spec/models/quota_used_attachment_contained_in_spec.rb +42 -0
  303. data/spec/models/quota_used_attachment_spec.rb +54 -0
  304. data/spec/models/quota_used_package_spec.rb +60 -0
  305. data/spec/models/quota_used_size_assets_attachments_spec.rb +42 -0
  306. data/spec/models/quota_used_size_assets_packages_spec.rb +36 -0
  307. data/spec/models/quota_used_size_assets_spec.rb +48 -0
  308. data/spec/models/quota_used_size_git_spec.rb +36 -0
  309. data/spec/models/quota_used_size_repos_spec.rb +42 -0
  310. data/spec/models/quota_used_size_spec.rb +48 -0
  311. data/spec/models/quota_used_spec.rb +36 -0
  312. data/spec/models/set_user_quota_groups_options_spec.rb +36 -0
  313. data/spec/models/update_branch_repo_option_spec.rb +36 -0
  314. data/spec/spec_helper.rb +2 -2
  315. data/swagger.v1.json +2563 -338
  316. data/swagger.v1.patched.json +1 -1
  317. metadata +291 -182
  318. data/LICENSE~ +0 -9
  319. data/Makefile~ +0 -2
  320. data/patch~ +0 -1
  321. data/smoke~ +0 -1
@@ -3,10 +3,10 @@
3
3
 
4
4
  #This documentation describes the Forgejo API.
5
5
 
6
- The version of the OpenAPI document: 8.0.3-53-9d5cce4bcc+gitea-1.22.0
6
+ The version of the OpenAPI document: 10.0.0-121-28886cd+gitea-1.22.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
9
+ Generator version: 7.12.0
10
10
 
11
11
  =end
12
12
 
@@ -19,6 +19,140 @@ module Forgejo
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Adds a rule to a quota group
23
+ # @param quotagroup [String] quota group to add a rule to
24
+ # @param quotarule [String] the name of the quota rule to add to the group
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def admin_add_rule_to_quota_group(quotagroup, quotarule, opts = {})
28
+ admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule, opts)
29
+ nil
30
+ end
31
+
32
+ # Adds a rule to a quota group
33
+ # @param quotagroup [String] quota group to add a rule to
34
+ # @param quotarule [String] the name of the quota rule to add to the group
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_add_rule_to_quota_group ...'
40
+ end
41
+ # verify the required parameter 'quotagroup' is set
42
+ if @api_client.config.client_side_validation && quotagroup.nil?
43
+ fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_add_rule_to_quota_group"
44
+ end
45
+ # verify the required parameter 'quotarule' is set
46
+ if @api_client.config.client_side_validation && quotarule.nil?
47
+ fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_add_rule_to_quota_group"
48
+ end
49
+ # resource path
50
+ local_var_path = '/admin/quota/groups/{quotagroup}/rules/{quotarule}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body]
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type]
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"AdminApi.admin_add_rule_to_quota_group",
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: AdminApi#admin_add_rule_to_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Add a user to a quota group
90
+ # @param quotagroup [String] quota group to add the user to
91
+ # @param username [String] username of the user to add to the quota group
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [nil]
94
+ def admin_add_user_to_quota_group(quotagroup, username, opts = {})
95
+ admin_add_user_to_quota_group_with_http_info(quotagroup, username, opts)
96
+ nil
97
+ end
98
+
99
+ # Add a user to a quota group
100
+ # @param quotagroup [String] quota group to add the user to
101
+ # @param username [String] username of the user to add to the quota group
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
104
+ def admin_add_user_to_quota_group_with_http_info(quotagroup, username, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_add_user_to_quota_group ...'
107
+ end
108
+ # verify the required parameter 'quotagroup' is set
109
+ if @api_client.config.client_side_validation && quotagroup.nil?
110
+ fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_add_user_to_quota_group"
111
+ end
112
+ # verify the required parameter 'username' is set
113
+ if @api_client.config.client_side_validation && username.nil?
114
+ fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_add_user_to_quota_group"
115
+ end
116
+ # resource path
117
+ local_var_path = '/admin/quota/groups/{quotagroup}/users/{username}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body]
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type]
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"AdminApi.admin_add_user_to_quota_group",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: AdminApi#admin_add_user_to_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
22
156
  # Adopt unadopted files as a repository
23
157
  # @param owner [String] owner of the repo
24
158
  # @param repo [String] name of the repo
@@ -54,6 +188,8 @@ module Forgejo
54
188
 
55
189
  # header parameters
56
190
  header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
57
193
 
58
194
  # form parameters
59
195
  form_params = opts[:form_params] || {}
@@ -290,6 +426,138 @@ module Forgejo
290
426
  return data, status_code, headers
291
427
  end
292
428
 
429
+ # Create a new quota group
430
+ # @param group [CreateQuotaGroupOptions] Definition of the quota group
431
+ # @param [Hash] opts the optional parameters
432
+ # @return [QuotaGroup]
433
+ def admin_create_quota_group(group, opts = {})
434
+ data, _status_code, _headers = admin_create_quota_group_with_http_info(group, opts)
435
+ data
436
+ end
437
+
438
+ # Create a new quota group
439
+ # @param group [CreateQuotaGroupOptions] Definition of the quota group
440
+ # @param [Hash] opts the optional parameters
441
+ # @return [Array<(QuotaGroup, Integer, Hash)>] QuotaGroup data, response status code and response headers
442
+ def admin_create_quota_group_with_http_info(group, opts = {})
443
+ if @api_client.config.debugging
444
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_quota_group ...'
445
+ end
446
+ # verify the required parameter 'group' is set
447
+ if @api_client.config.client_side_validation && group.nil?
448
+ fail ArgumentError, "Missing the required parameter 'group' when calling AdminApi.admin_create_quota_group"
449
+ end
450
+ # resource path
451
+ local_var_path = '/admin/quota/groups'
452
+
453
+ # query parameters
454
+ query_params = opts[:query_params] || {}
455
+
456
+ # header parameters
457
+ header_params = opts[:header_params] || {}
458
+ # HTTP header 'Accept' (if needed)
459
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
460
+ # HTTP header 'Content-Type'
461
+ content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
462
+ if !content_type.nil?
463
+ header_params['Content-Type'] = content_type
464
+ end
465
+
466
+ # form parameters
467
+ form_params = opts[:form_params] || {}
468
+
469
+ # http body (model)
470
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(group)
471
+
472
+ # return_type
473
+ return_type = opts[:debug_return_type] || 'QuotaGroup'
474
+
475
+ # auth_names
476
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
477
+
478
+ new_options = opts.merge(
479
+ :operation => :"AdminApi.admin_create_quota_group",
480
+ :header_params => header_params,
481
+ :query_params => query_params,
482
+ :form_params => form_params,
483
+ :body => post_body,
484
+ :auth_names => auth_names,
485
+ :return_type => return_type
486
+ )
487
+
488
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug "API called: AdminApi#admin_create_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
491
+ end
492
+ return data, status_code, headers
493
+ end
494
+
495
+ # Create a new quota rule
496
+ # @param rule [CreateQuotaRuleOptions] Definition of the quota rule
497
+ # @param [Hash] opts the optional parameters
498
+ # @return [QuotaRuleInfo]
499
+ def admin_create_quota_rule(rule, opts = {})
500
+ data, _status_code, _headers = admin_create_quota_rule_with_http_info(rule, opts)
501
+ data
502
+ end
503
+
504
+ # Create a new quota rule
505
+ # @param rule [CreateQuotaRuleOptions] Definition of the quota rule
506
+ # @param [Hash] opts the optional parameters
507
+ # @return [Array<(QuotaRuleInfo, Integer, Hash)>] QuotaRuleInfo data, response status code and response headers
508
+ def admin_create_quota_rule_with_http_info(rule, opts = {})
509
+ if @api_client.config.debugging
510
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_quota_rule ...'
511
+ end
512
+ # verify the required parameter 'rule' is set
513
+ if @api_client.config.client_side_validation && rule.nil?
514
+ fail ArgumentError, "Missing the required parameter 'rule' when calling AdminApi.admin_create_quota_rule"
515
+ end
516
+ # resource path
517
+ local_var_path = '/admin/quota/rules'
518
+
519
+ # query parameters
520
+ query_params = opts[:query_params] || {}
521
+
522
+ # header parameters
523
+ header_params = opts[:header_params] || {}
524
+ # HTTP header 'Accept' (if needed)
525
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
526
+ # HTTP header 'Content-Type'
527
+ content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
528
+ if !content_type.nil?
529
+ header_params['Content-Type'] = content_type
530
+ end
531
+
532
+ # form parameters
533
+ form_params = opts[:form_params] || {}
534
+
535
+ # http body (model)
536
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(rule)
537
+
538
+ # return_type
539
+ return_type = opts[:debug_return_type] || 'QuotaRuleInfo'
540
+
541
+ # auth_names
542
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
543
+
544
+ new_options = opts.merge(
545
+ :operation => :"AdminApi.admin_create_quota_rule",
546
+ :header_params => header_params,
547
+ :query_params => query_params,
548
+ :form_params => form_params,
549
+ :body => post_body,
550
+ :auth_names => auth_names,
551
+ :return_type => return_type
552
+ )
553
+
554
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug "API called: AdminApi#admin_create_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
557
+ end
558
+ return data, status_code, headers
559
+ end
560
+
293
561
  # Create a repository on behalf of a user
294
562
  # @param username [String] username of the user. This user will own the created repository
295
563
  # @param repository [CreateRepoOption]
@@ -514,6 +782,8 @@ module Forgejo
514
782
 
515
783
  # header parameters
516
784
  header_params = opts[:header_params] || {}
785
+ # HTTP header 'Accept' (if needed)
786
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
517
787
 
518
788
  # form parameters
519
789
  form_params = opts[:form_params] || {}
@@ -544,35 +814,37 @@ module Forgejo
544
814
  return data, status_code, headers
545
815
  end
546
816
 
547
- # Delete a hook
548
- # @param id [Integer] id of the hook to delete
817
+ # Deletes a quota rule
818
+ # @param quotarule [String] quota rule to delete
549
819
  # @param [Hash] opts the optional parameters
550
820
  # @return [nil]
551
- def admin_delete_hook(id, opts = {})
552
- admin_delete_hook_with_http_info(id, opts)
821
+ def admin_d_elete_quota_rule(quotarule, opts = {})
822
+ admin_d_elete_quota_rule_with_http_info(quotarule, opts)
553
823
  nil
554
824
  end
555
825
 
556
- # Delete a hook
557
- # @param id [Integer] id of the hook to delete
826
+ # Deletes a quota rule
827
+ # @param quotarule [String] quota rule to delete
558
828
  # @param [Hash] opts the optional parameters
559
829
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
560
- def admin_delete_hook_with_http_info(id, opts = {})
830
+ def admin_d_elete_quota_rule_with_http_info(quotarule, opts = {})
561
831
  if @api_client.config.debugging
562
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_hook ...'
832
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_d_elete_quota_rule ...'
563
833
  end
564
- # verify the required parameter 'id' is set
565
- if @api_client.config.client_side_validation && id.nil?
566
- fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_delete_hook"
834
+ # verify the required parameter 'quotarule' is set
835
+ if @api_client.config.client_side_validation && quotarule.nil?
836
+ fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_d_elete_quota_rule"
567
837
  end
568
838
  # resource path
569
- local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
839
+ local_var_path = '/admin/quota/rules/{quotarule}'.sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s))
570
840
 
571
841
  # query parameters
572
842
  query_params = opts[:query_params] || {}
573
843
 
574
844
  # header parameters
575
845
  header_params = opts[:header_params] || {}
846
+ # HTTP header 'Accept' (if needed)
847
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
576
848
 
577
849
  # form parameters
578
850
  form_params = opts[:form_params] || {}
@@ -587,7 +859,7 @@ module Forgejo
587
859
  auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
588
860
 
589
861
  new_options = opts.merge(
590
- :operation => :"AdminApi.admin_delete_hook",
862
+ :operation => :"AdminApi.admin_d_elete_quota_rule",
591
863
  :header_params => header_params,
592
864
  :query_params => query_params,
593
865
  :form_params => form_params,
@@ -598,40 +870,34 @@ module Forgejo
598
870
 
599
871
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
600
872
  if @api_client.config.debugging
601
- @api_client.config.logger.debug "API called: AdminApi#admin_delete_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
873
+ @api_client.config.logger.debug "API called: AdminApi#admin_d_elete_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
602
874
  end
603
875
  return data, status_code, headers
604
876
  end
605
877
 
606
- # Delete unadopted files
607
- # @param owner [String] owner of the repo
608
- # @param repo [String] name of the repo
878
+ # Delete a hook
879
+ # @param id [Integer] id of the hook to delete
609
880
  # @param [Hash] opts the optional parameters
610
881
  # @return [nil]
611
- def admin_delete_unadopted_repository(owner, repo, opts = {})
612
- admin_delete_unadopted_repository_with_http_info(owner, repo, opts)
882
+ def admin_delete_hook(id, opts = {})
883
+ admin_delete_hook_with_http_info(id, opts)
613
884
  nil
614
885
  end
615
886
 
616
- # Delete unadopted files
617
- # @param owner [String] owner of the repo
618
- # @param repo [String] name of the repo
887
+ # Delete a hook
888
+ # @param id [Integer] id of the hook to delete
619
889
  # @param [Hash] opts the optional parameters
620
890
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
621
- def admin_delete_unadopted_repository_with_http_info(owner, repo, opts = {})
891
+ def admin_delete_hook_with_http_info(id, opts = {})
622
892
  if @api_client.config.debugging
623
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_unadopted_repository ...'
624
- end
625
- # verify the required parameter 'owner' is set
626
- if @api_client.config.client_side_validation && owner.nil?
627
- fail ArgumentError, "Missing the required parameter 'owner' when calling AdminApi.admin_delete_unadopted_repository"
893
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_hook ...'
628
894
  end
629
- # verify the required parameter 'repo' is set
630
- if @api_client.config.client_side_validation && repo.nil?
631
- fail ArgumentError, "Missing the required parameter 'repo' when calling AdminApi.admin_delete_unadopted_repository"
895
+ # verify the required parameter 'id' is set
896
+ if @api_client.config.client_side_validation && id.nil?
897
+ fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_delete_hook"
632
898
  end
633
899
  # resource path
634
- local_var_path = '/admin/unadopted/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
900
+ local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
635
901
 
636
902
  # query parameters
637
903
  query_params = opts[:query_params] || {}
@@ -652,7 +918,7 @@ module Forgejo
652
918
  auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
653
919
 
654
920
  new_options = opts.merge(
655
- :operation => :"AdminApi.admin_delete_unadopted_repository",
921
+ :operation => :"AdminApi.admin_delete_hook",
656
922
  :header_params => header_params,
657
923
  :query_params => query_params,
658
924
  :form_params => form_params,
@@ -663,29 +929,157 @@ module Forgejo
663
929
 
664
930
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
665
931
  if @api_client.config.debugging
666
- @api_client.config.logger.debug "API called: AdminApi#admin_delete_unadopted_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
932
+ @api_client.config.logger.debug "API called: AdminApi#admin_delete_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
667
933
  end
668
934
  return data, status_code, headers
669
935
  end
670
936
 
671
- # Delete a user
672
- # @param username [String] username of user to delete
937
+ # Delete a quota group
938
+ # @param quotagroup [String] quota group to delete
673
939
  # @param [Hash] opts the optional parameters
674
- # @option opts [Boolean] :purge purge the user from the system completely
675
940
  # @return [nil]
676
- def admin_delete_user(username, opts = {})
677
- admin_delete_user_with_http_info(username, opts)
941
+ def admin_delete_quota_group(quotagroup, opts = {})
942
+ admin_delete_quota_group_with_http_info(quotagroup, opts)
678
943
  nil
679
944
  end
680
945
 
681
- # Delete a user
682
- # @param username [String] username of user to delete
946
+ # Delete a quota group
947
+ # @param quotagroup [String] quota group to delete
683
948
  # @param [Hash] opts the optional parameters
684
- # @option opts [Boolean] :purge purge the user from the system completely
685
949
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
686
- def admin_delete_user_with_http_info(username, opts = {})
950
+ def admin_delete_quota_group_with_http_info(quotagroup, opts = {})
687
951
  if @api_client.config.debugging
688
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_user ...'
952
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_quota_group ...'
953
+ end
954
+ # verify the required parameter 'quotagroup' is set
955
+ if @api_client.config.client_side_validation && quotagroup.nil?
956
+ fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_delete_quota_group"
957
+ end
958
+ # resource path
959
+ local_var_path = '/admin/quota/groups/{quotagroup}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s))
960
+
961
+ # query parameters
962
+ query_params = opts[:query_params] || {}
963
+
964
+ # header parameters
965
+ header_params = opts[:header_params] || {}
966
+ # HTTP header 'Accept' (if needed)
967
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
968
+
969
+ # form parameters
970
+ form_params = opts[:form_params] || {}
971
+
972
+ # http body (model)
973
+ post_body = opts[:debug_body]
974
+
975
+ # return_type
976
+ return_type = opts[:debug_return_type]
977
+
978
+ # auth_names
979
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
980
+
981
+ new_options = opts.merge(
982
+ :operation => :"AdminApi.admin_delete_quota_group",
983
+ :header_params => header_params,
984
+ :query_params => query_params,
985
+ :form_params => form_params,
986
+ :body => post_body,
987
+ :auth_names => auth_names,
988
+ :return_type => return_type
989
+ )
990
+
991
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
992
+ if @api_client.config.debugging
993
+ @api_client.config.logger.debug "API called: AdminApi#admin_delete_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
994
+ end
995
+ return data, status_code, headers
996
+ end
997
+
998
+ # Delete unadopted files
999
+ # @param owner [String] owner of the repo
1000
+ # @param repo [String] name of the repo
1001
+ # @param [Hash] opts the optional parameters
1002
+ # @return [nil]
1003
+ def admin_delete_unadopted_repository(owner, repo, opts = {})
1004
+ admin_delete_unadopted_repository_with_http_info(owner, repo, opts)
1005
+ nil
1006
+ end
1007
+
1008
+ # Delete unadopted files
1009
+ # @param owner [String] owner of the repo
1010
+ # @param repo [String] name of the repo
1011
+ # @param [Hash] opts the optional parameters
1012
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1013
+ def admin_delete_unadopted_repository_with_http_info(owner, repo, opts = {})
1014
+ if @api_client.config.debugging
1015
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_unadopted_repository ...'
1016
+ end
1017
+ # verify the required parameter 'owner' is set
1018
+ if @api_client.config.client_side_validation && owner.nil?
1019
+ fail ArgumentError, "Missing the required parameter 'owner' when calling AdminApi.admin_delete_unadopted_repository"
1020
+ end
1021
+ # verify the required parameter 'repo' is set
1022
+ if @api_client.config.client_side_validation && repo.nil?
1023
+ fail ArgumentError, "Missing the required parameter 'repo' when calling AdminApi.admin_delete_unadopted_repository"
1024
+ end
1025
+ # resource path
1026
+ local_var_path = '/admin/unadopted/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
1027
+
1028
+ # query parameters
1029
+ query_params = opts[:query_params] || {}
1030
+
1031
+ # header parameters
1032
+ header_params = opts[:header_params] || {}
1033
+ # HTTP header 'Accept' (if needed)
1034
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1035
+
1036
+ # form parameters
1037
+ form_params = opts[:form_params] || {}
1038
+
1039
+ # http body (model)
1040
+ post_body = opts[:debug_body]
1041
+
1042
+ # return_type
1043
+ return_type = opts[:debug_return_type]
1044
+
1045
+ # auth_names
1046
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1047
+
1048
+ new_options = opts.merge(
1049
+ :operation => :"AdminApi.admin_delete_unadopted_repository",
1050
+ :header_params => header_params,
1051
+ :query_params => query_params,
1052
+ :form_params => form_params,
1053
+ :body => post_body,
1054
+ :auth_names => auth_names,
1055
+ :return_type => return_type
1056
+ )
1057
+
1058
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1059
+ if @api_client.config.debugging
1060
+ @api_client.config.logger.debug "API called: AdminApi#admin_delete_unadopted_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1061
+ end
1062
+ return data, status_code, headers
1063
+ end
1064
+
1065
+ # Delete a user
1066
+ # @param username [String] username of user to delete
1067
+ # @param [Hash] opts the optional parameters
1068
+ # @option opts [Boolean] :purge purge the user from the system completely
1069
+ # @return [nil]
1070
+ def admin_delete_user(username, opts = {})
1071
+ admin_delete_user_with_http_info(username, opts)
1072
+ nil
1073
+ end
1074
+
1075
+ # Delete a user
1076
+ # @param username [String] username of user to delete
1077
+ # @param [Hash] opts the optional parameters
1078
+ # @option opts [Boolean] :purge purge the user from the system completely
1079
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1080
+ def admin_delete_user_with_http_info(username, opts = {})
1081
+ if @api_client.config.debugging
1082
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_user ...'
689
1083
  end
690
1084
  # verify the required parameter 'username' is set
691
1085
  if @api_client.config.client_side_validation && username.nil?
@@ -700,6 +1094,8 @@ module Forgejo
700
1094
 
701
1095
  # header parameters
702
1096
  header_params = opts[:header_params] || {}
1097
+ # HTTP header 'Accept' (if needed)
1098
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
703
1099
 
704
1100
  # form parameters
705
1101
  form_params = opts[:form_params] || {}
@@ -765,6 +1161,8 @@ module Forgejo
765
1161
 
766
1162
  # header parameters
767
1163
  header_params = opts[:header_params] || {}
1164
+ # HTTP header 'Accept' (if needed)
1165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
768
1166
 
769
1167
  # form parameters
770
1168
  form_params = opts[:form_params] || {}
@@ -863,6 +1261,78 @@ module Forgejo
863
1261
  return data, status_code, headers
864
1262
  end
865
1263
 
1264
+ # Change an existing quota rule
1265
+ # @param quotarule [String] Quota rule to change
1266
+ # @param rule [EditQuotaRuleOptions]
1267
+ # @param [Hash] opts the optional parameters
1268
+ # @return [QuotaRuleInfo]
1269
+ def admin_edit_quota_rule(quotarule, rule, opts = {})
1270
+ data, _status_code, _headers = admin_edit_quota_rule_with_http_info(quotarule, rule, opts)
1271
+ data
1272
+ end
1273
+
1274
+ # Change an existing quota rule
1275
+ # @param quotarule [String] Quota rule to change
1276
+ # @param rule [EditQuotaRuleOptions]
1277
+ # @param [Hash] opts the optional parameters
1278
+ # @return [Array<(QuotaRuleInfo, Integer, Hash)>] QuotaRuleInfo data, response status code and response headers
1279
+ def admin_edit_quota_rule_with_http_info(quotarule, rule, opts = {})
1280
+ if @api_client.config.debugging
1281
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_edit_quota_rule ...'
1282
+ end
1283
+ # verify the required parameter 'quotarule' is set
1284
+ if @api_client.config.client_side_validation && quotarule.nil?
1285
+ fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_edit_quota_rule"
1286
+ end
1287
+ # verify the required parameter 'rule' is set
1288
+ if @api_client.config.client_side_validation && rule.nil?
1289
+ fail ArgumentError, "Missing the required parameter 'rule' when calling AdminApi.admin_edit_quota_rule"
1290
+ end
1291
+ # resource path
1292
+ local_var_path = '/admin/quota/rules/{quotarule}'.sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s))
1293
+
1294
+ # query parameters
1295
+ query_params = opts[:query_params] || {}
1296
+
1297
+ # header parameters
1298
+ header_params = opts[:header_params] || {}
1299
+ # HTTP header 'Accept' (if needed)
1300
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1301
+ # HTTP header 'Content-Type'
1302
+ content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
1303
+ if !content_type.nil?
1304
+ header_params['Content-Type'] = content_type
1305
+ end
1306
+
1307
+ # form parameters
1308
+ form_params = opts[:form_params] || {}
1309
+
1310
+ # http body (model)
1311
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(rule)
1312
+
1313
+ # return_type
1314
+ return_type = opts[:debug_return_type] || 'QuotaRuleInfo'
1315
+
1316
+ # auth_names
1317
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1318
+
1319
+ new_options = opts.merge(
1320
+ :operation => :"AdminApi.admin_edit_quota_rule",
1321
+ :header_params => header_params,
1322
+ :query_params => query_params,
1323
+ :form_params => form_params,
1324
+ :body => post_body,
1325
+ :auth_names => auth_names,
1326
+ :return_type => return_type
1327
+ )
1328
+
1329
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1330
+ if @api_client.config.debugging
1331
+ @api_client.config.logger.debug "API called: AdminApi#admin_edit_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1332
+ end
1333
+ return data, status_code, headers
1334
+ end
1335
+
866
1336
  # Edit an existing user
867
1337
  # @param username [String] username of user to edit
868
1338
  # @param [Hash] opts the optional parameters
@@ -1114,29 +1584,37 @@ module Forgejo
1114
1584
  return data, status_code, headers
1115
1585
  end
1116
1586
 
1117
- # Get an global actions runner registration token
1587
+ # Get information about the quota group
1588
+ # @param quotagroup [String] quota group to query
1118
1589
  # @param [Hash] opts the optional parameters
1119
- # @return [nil]
1120
- def admin_get_runner_registration_token(opts = {})
1121
- admin_get_runner_registration_token_with_http_info(opts)
1122
- nil
1590
+ # @return [QuotaGroup]
1591
+ def admin_get_quota_group(quotagroup, opts = {})
1592
+ data, _status_code, _headers = admin_get_quota_group_with_http_info(quotagroup, opts)
1593
+ data
1123
1594
  end
1124
1595
 
1125
- # Get an global actions runner registration token
1596
+ # Get information about the quota group
1597
+ # @param quotagroup [String] quota group to query
1126
1598
  # @param [Hash] opts the optional parameters
1127
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1128
- def admin_get_runner_registration_token_with_http_info(opts = {})
1599
+ # @return [Array<(QuotaGroup, Integer, Hash)>] QuotaGroup data, response status code and response headers
1600
+ def admin_get_quota_group_with_http_info(quotagroup, opts = {})
1129
1601
  if @api_client.config.debugging
1130
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_runner_registration_token ...'
1602
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_quota_group ...'
1603
+ end
1604
+ # verify the required parameter 'quotagroup' is set
1605
+ if @api_client.config.client_side_validation && quotagroup.nil?
1606
+ fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_get_quota_group"
1131
1607
  end
1132
1608
  # resource path
1133
- local_var_path = '/admin/runners/registration-token'
1609
+ local_var_path = '/admin/quota/groups/{quotagroup}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s))
1134
1610
 
1135
1611
  # query parameters
1136
1612
  query_params = opts[:query_params] || {}
1137
1613
 
1138
1614
  # header parameters
1139
1615
  header_params = opts[:header_params] || {}
1616
+ # HTTP header 'Accept' (if needed)
1617
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1140
1618
 
1141
1619
  # form parameters
1142
1620
  form_params = opts[:form_params] || {}
@@ -1145,13 +1623,13 @@ module Forgejo
1145
1623
  post_body = opts[:debug_body]
1146
1624
 
1147
1625
  # return_type
1148
- return_type = opts[:debug_return_type]
1626
+ return_type = opts[:debug_return_type] || 'QuotaGroup'
1149
1627
 
1150
1628
  # auth_names
1151
1629
  auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1152
1630
 
1153
1631
  new_options = opts.merge(
1154
- :operation => :"AdminApi.admin_get_runner_registration_token",
1632
+ :operation => :"AdminApi.admin_get_quota_group",
1155
1633
  :header_params => header_params,
1156
1634
  :query_params => query_params,
1157
1635
  :form_params => form_params,
@@ -1162,37 +1640,37 @@ module Forgejo
1162
1640
 
1163
1641
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1164
1642
  if @api_client.config.debugging
1165
- @api_client.config.logger.debug "API called: AdminApi#admin_get_runner_registration_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1643
+ @api_client.config.logger.debug "API called: AdminApi#admin_get_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1166
1644
  end
1167
1645
  return data, status_code, headers
1168
1646
  end
1169
1647
 
1170
- # List system's webhooks
1648
+ # Get information about a quota rule
1649
+ # @param quotarule [String] quota rule to query
1171
1650
  # @param [Hash] opts the optional parameters
1172
- # @option opts [Integer] :page page number of results to return (1-based)
1173
- # @option opts [Integer] :limit page size of results
1174
- # @return [Array<Hook>]
1175
- def admin_list_hooks(opts = {})
1176
- data, _status_code, _headers = admin_list_hooks_with_http_info(opts)
1651
+ # @return [QuotaRuleInfo]
1652
+ def admin_get_quota_rule(quotarule, opts = {})
1653
+ data, _status_code, _headers = admin_get_quota_rule_with_http_info(quotarule, opts)
1177
1654
  data
1178
1655
  end
1179
1656
 
1180
- # List system&#39;s webhooks
1657
+ # Get information about a quota rule
1658
+ # @param quotarule [String] quota rule to query
1181
1659
  # @param [Hash] opts the optional parameters
1182
- # @option opts [Integer] :page page number of results to return (1-based)
1183
- # @option opts [Integer] :limit page size of results
1184
- # @return [Array<(Array<Hook>, Integer, Hash)>] Array<Hook> data, response status code and response headers
1185
- def admin_list_hooks_with_http_info(opts = {})
1660
+ # @return [Array<(QuotaRuleInfo, Integer, Hash)>] QuotaRuleInfo data, response status code and response headers
1661
+ def admin_get_quota_rule_with_http_info(quotarule, opts = {})
1186
1662
  if @api_client.config.debugging
1187
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_hooks ...'
1663
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_quota_rule ...'
1664
+ end
1665
+ # verify the required parameter 'quotarule' is set
1666
+ if @api_client.config.client_side_validation && quotarule.nil?
1667
+ fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_get_quota_rule"
1188
1668
  end
1189
1669
  # resource path
1190
- local_var_path = '/admin/hooks'
1670
+ local_var_path = '/admin/quota/rules/{quotarule}'.sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s))
1191
1671
 
1192
1672
  # query parameters
1193
1673
  query_params = opts[:query_params] || {}
1194
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1195
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1196
1674
 
1197
1675
  # header parameters
1198
1676
  header_params = opts[:header_params] || {}
@@ -1206,13 +1684,13 @@ module Forgejo
1206
1684
  post_body = opts[:debug_body]
1207
1685
 
1208
1686
  # return_type
1209
- return_type = opts[:debug_return_type] || 'Array<Hook>'
1687
+ return_type = opts[:debug_return_type] || 'QuotaRuleInfo'
1210
1688
 
1211
1689
  # auth_names
1212
1690
  auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1213
1691
 
1214
1692
  new_options = opts.merge(
1215
- :operation => :"AdminApi.admin_list_hooks",
1693
+ :operation => :"AdminApi.admin_get_quota_rule",
1216
1694
  :header_params => header_params,
1217
1695
  :query_params => query_params,
1218
1696
  :form_params => form_params,
@@ -1223,57 +1701,40 @@ module Forgejo
1223
1701
 
1224
1702
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1225
1703
  if @api_client.config.debugging
1226
- @api_client.config.logger.debug "API called: AdminApi#admin_list_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1704
+ @api_client.config.logger.debug "API called: AdminApi#admin_get_quota_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1227
1705
  end
1228
1706
  return data, status_code, headers
1229
1707
  end
1230
1708
 
1231
- # Rename a user
1232
- # @param username [String] existing username of user
1233
- # @param body [RenameUserOption]
1709
+ # Get an global actions runner registration token
1234
1710
  # @param [Hash] opts the optional parameters
1235
1711
  # @return [nil]
1236
- def admin_rename_user(username, body, opts = {})
1237
- admin_rename_user_with_http_info(username, body, opts)
1712
+ def admin_get_runner_registration_token(opts = {})
1713
+ admin_get_runner_registration_token_with_http_info(opts)
1238
1714
  nil
1239
1715
  end
1240
1716
 
1241
- # Rename a user
1242
- # @param username [String] existing username of user
1243
- # @param body [RenameUserOption]
1717
+ # Get an global actions runner registration token
1244
1718
  # @param [Hash] opts the optional parameters
1245
1719
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1246
- def admin_rename_user_with_http_info(username, body, opts = {})
1720
+ def admin_get_runner_registration_token_with_http_info(opts = {})
1247
1721
  if @api_client.config.debugging
1248
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_rename_user ...'
1249
- end
1250
- # verify the required parameter 'username' is set
1251
- if @api_client.config.client_side_validation && username.nil?
1252
- fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_rename_user"
1253
- end
1254
- # verify the required parameter 'body' is set
1255
- if @api_client.config.client_side_validation && body.nil?
1256
- fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.admin_rename_user"
1722
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_runner_registration_token ...'
1257
1723
  end
1258
1724
  # resource path
1259
- local_var_path = '/admin/users/{username}/rename'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
1725
+ local_var_path = '/admin/runners/registration-token'
1260
1726
 
1261
1727
  # query parameters
1262
1728
  query_params = opts[:query_params] || {}
1263
1729
 
1264
1730
  # header parameters
1265
1731
  header_params = opts[:header_params] || {}
1266
- # HTTP header 'Content-Type'
1267
- content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
1268
- if !content_type.nil?
1269
- header_params['Content-Type'] = content_type
1270
- end
1271
1732
 
1272
1733
  # form parameters
1273
1734
  form_params = opts[:form_params] || {}
1274
1735
 
1275
1736
  # http body (model)
1276
- post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
1737
+ post_body = opts[:debug_body]
1277
1738
 
1278
1739
  # return_type
1279
1740
  return_type = opts[:debug_return_type]
@@ -1282,7 +1743,7 @@ module Forgejo
1282
1743
  auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1283
1744
 
1284
1745
  new_options = opts.merge(
1285
- :operation => :"AdminApi.admin_rename_user",
1746
+ :operation => :"AdminApi.admin_get_runner_registration_token",
1286
1747
  :header_params => header_params,
1287
1748
  :query_params => query_params,
1288
1749
  :form_params => form_params,
@@ -1291,18 +1752,517 @@ module Forgejo
1291
1752
  :return_type => return_type
1292
1753
  )
1293
1754
 
1294
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1755
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1295
1756
  if @api_client.config.debugging
1296
- @api_client.config.logger.debug "API called: AdminApi#admin_rename_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1757
+ @api_client.config.logger.debug "API called: AdminApi#admin_get_runner_registration_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1297
1758
  end
1298
1759
  return data, status_code, headers
1299
1760
  end
1300
1761
 
1301
- # Search all emails
1762
+ # Get the user's quota info
1763
+ # @param username [String] username of user to query
1302
1764
  # @param [Hash] opts the optional parameters
1303
- # @option opts [String] :q keyword
1304
- # @option opts [Integer] :page page number of results to return (1-based)
1305
- # @option opts [Integer] :limit page size of results
1765
+ # @return [QuotaInfo]
1766
+ def admin_get_user_quota(username, opts = {})
1767
+ data, _status_code, _headers = admin_get_user_quota_with_http_info(username, opts)
1768
+ data
1769
+ end
1770
+
1771
+ # Get the user&#39;s quota info
1772
+ # @param username [String] username of user to query
1773
+ # @param [Hash] opts the optional parameters
1774
+ # @return [Array<(QuotaInfo, Integer, Hash)>] QuotaInfo data, response status code and response headers
1775
+ def admin_get_user_quota_with_http_info(username, opts = {})
1776
+ if @api_client.config.debugging
1777
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_user_quota ...'
1778
+ end
1779
+ # verify the required parameter 'username' is set
1780
+ if @api_client.config.client_side_validation && username.nil?
1781
+ fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_get_user_quota"
1782
+ end
1783
+ # resource path
1784
+ local_var_path = '/admin/users/{username}/quota'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
1785
+
1786
+ # query parameters
1787
+ query_params = opts[:query_params] || {}
1788
+
1789
+ # header parameters
1790
+ header_params = opts[:header_params] || {}
1791
+ # HTTP header 'Accept' (if needed)
1792
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1793
+
1794
+ # form parameters
1795
+ form_params = opts[:form_params] || {}
1796
+
1797
+ # http body (model)
1798
+ post_body = opts[:debug_body]
1799
+
1800
+ # return_type
1801
+ return_type = opts[:debug_return_type] || 'QuotaInfo'
1802
+
1803
+ # auth_names
1804
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1805
+
1806
+ new_options = opts.merge(
1807
+ :operation => :"AdminApi.admin_get_user_quota",
1808
+ :header_params => header_params,
1809
+ :query_params => query_params,
1810
+ :form_params => form_params,
1811
+ :body => post_body,
1812
+ :auth_names => auth_names,
1813
+ :return_type => return_type
1814
+ )
1815
+
1816
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1817
+ if @api_client.config.debugging
1818
+ @api_client.config.logger.debug "API called: AdminApi#admin_get_user_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1819
+ end
1820
+ return data, status_code, headers
1821
+ end
1822
+
1823
+ # List system's webhooks
1824
+ # @param [Hash] opts the optional parameters
1825
+ # @option opts [Integer] :page page number of results to return (1-based)
1826
+ # @option opts [Integer] :limit page size of results
1827
+ # @return [Array<Hook>]
1828
+ def admin_list_hooks(opts = {})
1829
+ data, _status_code, _headers = admin_list_hooks_with_http_info(opts)
1830
+ data
1831
+ end
1832
+
1833
+ # List system&#39;s webhooks
1834
+ # @param [Hash] opts the optional parameters
1835
+ # @option opts [Integer] :page page number of results to return (1-based)
1836
+ # @option opts [Integer] :limit page size of results
1837
+ # @return [Array<(Array<Hook>, Integer, Hash)>] Array<Hook> data, response status code and response headers
1838
+ def admin_list_hooks_with_http_info(opts = {})
1839
+ if @api_client.config.debugging
1840
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_hooks ...'
1841
+ end
1842
+ # resource path
1843
+ local_var_path = '/admin/hooks'
1844
+
1845
+ # query parameters
1846
+ query_params = opts[:query_params] || {}
1847
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1848
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1849
+
1850
+ # header parameters
1851
+ header_params = opts[:header_params] || {}
1852
+ # HTTP header 'Accept' (if needed)
1853
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1854
+
1855
+ # form parameters
1856
+ form_params = opts[:form_params] || {}
1857
+
1858
+ # http body (model)
1859
+ post_body = opts[:debug_body]
1860
+
1861
+ # return_type
1862
+ return_type = opts[:debug_return_type] || 'Array<Hook>'
1863
+
1864
+ # auth_names
1865
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1866
+
1867
+ new_options = opts.merge(
1868
+ :operation => :"AdminApi.admin_list_hooks",
1869
+ :header_params => header_params,
1870
+ :query_params => query_params,
1871
+ :form_params => form_params,
1872
+ :body => post_body,
1873
+ :auth_names => auth_names,
1874
+ :return_type => return_type
1875
+ )
1876
+
1877
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1878
+ if @api_client.config.debugging
1879
+ @api_client.config.logger.debug "API called: AdminApi#admin_list_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1880
+ end
1881
+ return data, status_code, headers
1882
+ end
1883
+
1884
+ # List the available quota groups
1885
+ # @param [Hash] opts the optional parameters
1886
+ # @return [Array<QuotaGroup>]
1887
+ def admin_list_quota_groups(opts = {})
1888
+ data, _status_code, _headers = admin_list_quota_groups_with_http_info(opts)
1889
+ data
1890
+ end
1891
+
1892
+ # List the available quota groups
1893
+ # @param [Hash] opts the optional parameters
1894
+ # @return [Array<(Array<QuotaGroup>, Integer, Hash)>] Array<QuotaGroup> data, response status code and response headers
1895
+ def admin_list_quota_groups_with_http_info(opts = {})
1896
+ if @api_client.config.debugging
1897
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_quota_groups ...'
1898
+ end
1899
+ # resource path
1900
+ local_var_path = '/admin/quota/groups'
1901
+
1902
+ # query parameters
1903
+ query_params = opts[:query_params] || {}
1904
+
1905
+ # header parameters
1906
+ header_params = opts[:header_params] || {}
1907
+ # HTTP header 'Accept' (if needed)
1908
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1909
+
1910
+ # form parameters
1911
+ form_params = opts[:form_params] || {}
1912
+
1913
+ # http body (model)
1914
+ post_body = opts[:debug_body]
1915
+
1916
+ # return_type
1917
+ return_type = opts[:debug_return_type] || 'Array<QuotaGroup>'
1918
+
1919
+ # auth_names
1920
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1921
+
1922
+ new_options = opts.merge(
1923
+ :operation => :"AdminApi.admin_list_quota_groups",
1924
+ :header_params => header_params,
1925
+ :query_params => query_params,
1926
+ :form_params => form_params,
1927
+ :body => post_body,
1928
+ :auth_names => auth_names,
1929
+ :return_type => return_type
1930
+ )
1931
+
1932
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1933
+ if @api_client.config.debugging
1934
+ @api_client.config.logger.debug "API called: AdminApi#admin_list_quota_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1935
+ end
1936
+ return data, status_code, headers
1937
+ end
1938
+
1939
+ # List the available quota rules
1940
+ # @param [Hash] opts the optional parameters
1941
+ # @return [Array<QuotaRuleInfo>]
1942
+ def admin_list_quota_rules(opts = {})
1943
+ data, _status_code, _headers = admin_list_quota_rules_with_http_info(opts)
1944
+ data
1945
+ end
1946
+
1947
+ # List the available quota rules
1948
+ # @param [Hash] opts the optional parameters
1949
+ # @return [Array<(Array<QuotaRuleInfo>, Integer, Hash)>] Array<QuotaRuleInfo> data, response status code and response headers
1950
+ def admin_list_quota_rules_with_http_info(opts = {})
1951
+ if @api_client.config.debugging
1952
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_quota_rules ...'
1953
+ end
1954
+ # resource path
1955
+ local_var_path = '/admin/quota/rules'
1956
+
1957
+ # query parameters
1958
+ query_params = opts[:query_params] || {}
1959
+
1960
+ # header parameters
1961
+ header_params = opts[:header_params] || {}
1962
+ # HTTP header 'Accept' (if needed)
1963
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1964
+
1965
+ # form parameters
1966
+ form_params = opts[:form_params] || {}
1967
+
1968
+ # http body (model)
1969
+ post_body = opts[:debug_body]
1970
+
1971
+ # return_type
1972
+ return_type = opts[:debug_return_type] || 'Array<QuotaRuleInfo>'
1973
+
1974
+ # auth_names
1975
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
1976
+
1977
+ new_options = opts.merge(
1978
+ :operation => :"AdminApi.admin_list_quota_rules",
1979
+ :header_params => header_params,
1980
+ :query_params => query_params,
1981
+ :form_params => form_params,
1982
+ :body => post_body,
1983
+ :auth_names => auth_names,
1984
+ :return_type => return_type
1985
+ )
1986
+
1987
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1988
+ if @api_client.config.debugging
1989
+ @api_client.config.logger.debug "API called: AdminApi#admin_list_quota_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1990
+ end
1991
+ return data, status_code, headers
1992
+ end
1993
+
1994
+ # List users in a quota group
1995
+ # @param quotagroup [String] quota group to list members of
1996
+ # @param [Hash] opts the optional parameters
1997
+ # @return [Array<User>]
1998
+ def admin_list_users_in_quota_group(quotagroup, opts = {})
1999
+ data, _status_code, _headers = admin_list_users_in_quota_group_with_http_info(quotagroup, opts)
2000
+ data
2001
+ end
2002
+
2003
+ # List users in a quota group
2004
+ # @param quotagroup [String] quota group to list members of
2005
+ # @param [Hash] opts the optional parameters
2006
+ # @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
2007
+ def admin_list_users_in_quota_group_with_http_info(quotagroup, opts = {})
2008
+ if @api_client.config.debugging
2009
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_list_users_in_quota_group ...'
2010
+ end
2011
+ # verify the required parameter 'quotagroup' is set
2012
+ if @api_client.config.client_side_validation && quotagroup.nil?
2013
+ fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_list_users_in_quota_group"
2014
+ end
2015
+ # resource path
2016
+ local_var_path = '/admin/quota/groups/{quotagroup}/users'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s))
2017
+
2018
+ # query parameters
2019
+ query_params = opts[:query_params] || {}
2020
+
2021
+ # header parameters
2022
+ header_params = opts[:header_params] || {}
2023
+ # HTTP header 'Accept' (if needed)
2024
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2025
+
2026
+ # form parameters
2027
+ form_params = opts[:form_params] || {}
2028
+
2029
+ # http body (model)
2030
+ post_body = opts[:debug_body]
2031
+
2032
+ # return_type
2033
+ return_type = opts[:debug_return_type] || 'Array<User>'
2034
+
2035
+ # auth_names
2036
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2037
+
2038
+ new_options = opts.merge(
2039
+ :operation => :"AdminApi.admin_list_users_in_quota_group",
2040
+ :header_params => header_params,
2041
+ :query_params => query_params,
2042
+ :form_params => form_params,
2043
+ :body => post_body,
2044
+ :auth_names => auth_names,
2045
+ :return_type => return_type
2046
+ )
2047
+
2048
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2049
+ if @api_client.config.debugging
2050
+ @api_client.config.logger.debug "API called: AdminApi#admin_list_users_in_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2051
+ end
2052
+ return data, status_code, headers
2053
+ end
2054
+
2055
+ # Removes a rule from a quota group
2056
+ # @param quotagroup [String] quota group to remove a rule from
2057
+ # @param quotarule [String] the name of the quota rule to remove from the group
2058
+ # @param [Hash] opts the optional parameters
2059
+ # @return [nil]
2060
+ def admin_remove_rule_from_quota_group(quotagroup, quotarule, opts = {})
2061
+ admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule, opts)
2062
+ nil
2063
+ end
2064
+
2065
+ # Removes a rule from a quota group
2066
+ # @param quotagroup [String] quota group to remove a rule from
2067
+ # @param quotarule [String] the name of the quota rule to remove from the group
2068
+ # @param [Hash] opts the optional parameters
2069
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2070
+ def admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule, opts = {})
2071
+ if @api_client.config.debugging
2072
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_remove_rule_from_quota_group ...'
2073
+ end
2074
+ # verify the required parameter 'quotagroup' is set
2075
+ if @api_client.config.client_side_validation && quotagroup.nil?
2076
+ fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_remove_rule_from_quota_group"
2077
+ end
2078
+ # verify the required parameter 'quotarule' is set
2079
+ if @api_client.config.client_side_validation && quotarule.nil?
2080
+ fail ArgumentError, "Missing the required parameter 'quotarule' when calling AdminApi.admin_remove_rule_from_quota_group"
2081
+ end
2082
+ # resource path
2083
+ local_var_path = '/admin/quota/groups/{quotagroup}/rules/{quotarule}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'quotarule' + '}', CGI.escape(quotarule.to_s))
2084
+
2085
+ # query parameters
2086
+ query_params = opts[:query_params] || {}
2087
+
2088
+ # header parameters
2089
+ header_params = opts[:header_params] || {}
2090
+ # HTTP header 'Accept' (if needed)
2091
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2092
+
2093
+ # form parameters
2094
+ form_params = opts[:form_params] || {}
2095
+
2096
+ # http body (model)
2097
+ post_body = opts[:debug_body]
2098
+
2099
+ # return_type
2100
+ return_type = opts[:debug_return_type]
2101
+
2102
+ # auth_names
2103
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2104
+
2105
+ new_options = opts.merge(
2106
+ :operation => :"AdminApi.admin_remove_rule_from_quota_group",
2107
+ :header_params => header_params,
2108
+ :query_params => query_params,
2109
+ :form_params => form_params,
2110
+ :body => post_body,
2111
+ :auth_names => auth_names,
2112
+ :return_type => return_type
2113
+ )
2114
+
2115
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2116
+ if @api_client.config.debugging
2117
+ @api_client.config.logger.debug "API called: AdminApi#admin_remove_rule_from_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2118
+ end
2119
+ return data, status_code, headers
2120
+ end
2121
+
2122
+ # Remove a user from a quota group
2123
+ # @param quotagroup [String] quota group to remove a user from
2124
+ # @param username [String] username of the user to remove from the quota group
2125
+ # @param [Hash] opts the optional parameters
2126
+ # @return [nil]
2127
+ def admin_remove_user_from_quota_group(quotagroup, username, opts = {})
2128
+ admin_remove_user_from_quota_group_with_http_info(quotagroup, username, opts)
2129
+ nil
2130
+ end
2131
+
2132
+ # Remove a user from a quota group
2133
+ # @param quotagroup [String] quota group to remove a user from
2134
+ # @param username [String] username of the user to remove from the quota group
2135
+ # @param [Hash] opts the optional parameters
2136
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2137
+ def admin_remove_user_from_quota_group_with_http_info(quotagroup, username, opts = {})
2138
+ if @api_client.config.debugging
2139
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_remove_user_from_quota_group ...'
2140
+ end
2141
+ # verify the required parameter 'quotagroup' is set
2142
+ if @api_client.config.client_side_validation && quotagroup.nil?
2143
+ fail ArgumentError, "Missing the required parameter 'quotagroup' when calling AdminApi.admin_remove_user_from_quota_group"
2144
+ end
2145
+ # verify the required parameter 'username' is set
2146
+ if @api_client.config.client_side_validation && username.nil?
2147
+ fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_remove_user_from_quota_group"
2148
+ end
2149
+ # resource path
2150
+ local_var_path = '/admin/quota/groups/{quotagroup}/users/{username}'.sub('{' + 'quotagroup' + '}', CGI.escape(quotagroup.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
2151
+
2152
+ # query parameters
2153
+ query_params = opts[:query_params] || {}
2154
+
2155
+ # header parameters
2156
+ header_params = opts[:header_params] || {}
2157
+ # HTTP header 'Accept' (if needed)
2158
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2159
+
2160
+ # form parameters
2161
+ form_params = opts[:form_params] || {}
2162
+
2163
+ # http body (model)
2164
+ post_body = opts[:debug_body]
2165
+
2166
+ # return_type
2167
+ return_type = opts[:debug_return_type]
2168
+
2169
+ # auth_names
2170
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2171
+
2172
+ new_options = opts.merge(
2173
+ :operation => :"AdminApi.admin_remove_user_from_quota_group",
2174
+ :header_params => header_params,
2175
+ :query_params => query_params,
2176
+ :form_params => form_params,
2177
+ :body => post_body,
2178
+ :auth_names => auth_names,
2179
+ :return_type => return_type
2180
+ )
2181
+
2182
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2183
+ if @api_client.config.debugging
2184
+ @api_client.config.logger.debug "API called: AdminApi#admin_remove_user_from_quota_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2185
+ end
2186
+ return data, status_code, headers
2187
+ end
2188
+
2189
+ # Rename a user
2190
+ # @param username [String] existing username of user
2191
+ # @param body [RenameUserOption]
2192
+ # @param [Hash] opts the optional parameters
2193
+ # @return [nil]
2194
+ def admin_rename_user(username, body, opts = {})
2195
+ admin_rename_user_with_http_info(username, body, opts)
2196
+ nil
2197
+ end
2198
+
2199
+ # Rename a user
2200
+ # @param username [String] existing username of user
2201
+ # @param body [RenameUserOption]
2202
+ # @param [Hash] opts the optional parameters
2203
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2204
+ def admin_rename_user_with_http_info(username, body, opts = {})
2205
+ if @api_client.config.debugging
2206
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_rename_user ...'
2207
+ end
2208
+ # verify the required parameter 'username' is set
2209
+ if @api_client.config.client_side_validation && username.nil?
2210
+ fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_rename_user"
2211
+ end
2212
+ # verify the required parameter 'body' is set
2213
+ if @api_client.config.client_side_validation && body.nil?
2214
+ fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.admin_rename_user"
2215
+ end
2216
+ # resource path
2217
+ local_var_path = '/admin/users/{username}/rename'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
2218
+
2219
+ # query parameters
2220
+ query_params = opts[:query_params] || {}
2221
+
2222
+ # header parameters
2223
+ header_params = opts[:header_params] || {}
2224
+ # HTTP header 'Accept' (if needed)
2225
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2226
+ # HTTP header 'Content-Type'
2227
+ content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
2228
+ if !content_type.nil?
2229
+ header_params['Content-Type'] = content_type
2230
+ end
2231
+
2232
+ # form parameters
2233
+ form_params = opts[:form_params] || {}
2234
+
2235
+ # http body (model)
2236
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
2237
+
2238
+ # return_type
2239
+ return_type = opts[:debug_return_type]
2240
+
2241
+ # auth_names
2242
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2243
+
2244
+ new_options = opts.merge(
2245
+ :operation => :"AdminApi.admin_rename_user",
2246
+ :header_params => header_params,
2247
+ :query_params => query_params,
2248
+ :form_params => form_params,
2249
+ :body => post_body,
2250
+ :auth_names => auth_names,
2251
+ :return_type => return_type
2252
+ )
2253
+
2254
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2255
+ if @api_client.config.debugging
2256
+ @api_client.config.logger.debug "API called: AdminApi#admin_rename_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2257
+ end
2258
+ return data, status_code, headers
2259
+ end
2260
+
2261
+ # Search all emails
2262
+ # @param [Hash] opts the optional parameters
2263
+ # @option opts [String] :q keyword
2264
+ # @option opts [Integer] :page page number of results to return (1-based)
2265
+ # @option opts [Integer] :limit page size of results
1306
2266
  # @return [Array<Email>]
1307
2267
  def admin_search_emails(opts = {})
1308
2268
  data, _status_code, _headers = admin_search_emails_with_http_info(opts)
@@ -1366,6 +2326,7 @@ module Forgejo
1366
2326
  # @param [Hash] opts the optional parameters
1367
2327
  # @option opts [Integer] :source_id ID of the user&#39;s login source to search for
1368
2328
  # @option opts [String] :login_name user&#39;s login name to search for
2329
+ # @option opts [String] :sort sort order of results
1369
2330
  # @option opts [Integer] :page page number of results to return (1-based)
1370
2331
  # @option opts [Integer] :limit page size of results
1371
2332
  # @return [Array<User>]
@@ -1378,6 +2339,7 @@ module Forgejo
1378
2339
  # @param [Hash] opts the optional parameters
1379
2340
  # @option opts [Integer] :source_id ID of the user&#39;s login source to search for
1380
2341
  # @option opts [String] :login_name user&#39;s login name to search for
2342
+ # @option opts [String] :sort sort order of results
1381
2343
  # @option opts [Integer] :page page number of results to return (1-based)
1382
2344
  # @option opts [Integer] :limit page size of results
1383
2345
  # @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
@@ -1385,6 +2347,10 @@ module Forgejo
1385
2347
  if @api_client.config.debugging
1386
2348
  @api_client.config.logger.debug 'Calling API: AdminApi.admin_search_users ...'
1387
2349
  end
2350
+ allowable_values = ["oldest", "newest", "alphabetically", "reversealphabetically", "recentupdate", "leastupdate"]
2351
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
2352
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
2353
+ end
1388
2354
  # resource path
1389
2355
  local_var_path = '/admin/users'
1390
2356
 
@@ -1392,6 +2358,7 @@ module Forgejo
1392
2358
  query_params = opts[:query_params] || {}
1393
2359
  query_params[:'source_id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
1394
2360
  query_params[:'login_name'] = opts[:'login_name'] if !opts[:'login_name'].nil?
2361
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1395
2362
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1396
2363
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1397
2364
 
@@ -1429,6 +2396,78 @@ module Forgejo
1429
2396
  return data, status_code, headers
1430
2397
  end
1431
2398
 
2399
+ # Set the user's quota groups to a given list.
2400
+ # @param username [String] username of the user to modify the quota groups from
2401
+ # @param groups [SetUserQuotaGroupsOptions] list of groups that the user should be a member of
2402
+ # @param [Hash] opts the optional parameters
2403
+ # @return [nil]
2404
+ def admin_set_user_quota_groups(username, groups, opts = {})
2405
+ admin_set_user_quota_groups_with_http_info(username, groups, opts)
2406
+ nil
2407
+ end
2408
+
2409
+ # Set the user&#39;s quota groups to a given list.
2410
+ # @param username [String] username of the user to modify the quota groups from
2411
+ # @param groups [SetUserQuotaGroupsOptions] list of groups that the user should be a member of
2412
+ # @param [Hash] opts the optional parameters
2413
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2414
+ def admin_set_user_quota_groups_with_http_info(username, groups, opts = {})
2415
+ if @api_client.config.debugging
2416
+ @api_client.config.logger.debug 'Calling API: AdminApi.admin_set_user_quota_groups ...'
2417
+ end
2418
+ # verify the required parameter 'username' is set
2419
+ if @api_client.config.client_side_validation && username.nil?
2420
+ fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_set_user_quota_groups"
2421
+ end
2422
+ # verify the required parameter 'groups' is set
2423
+ if @api_client.config.client_side_validation && groups.nil?
2424
+ fail ArgumentError, "Missing the required parameter 'groups' when calling AdminApi.admin_set_user_quota_groups"
2425
+ end
2426
+ # resource path
2427
+ local_var_path = '/admin/users/{username}/quota/groups'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
2428
+
2429
+ # query parameters
2430
+ query_params = opts[:query_params] || {}
2431
+
2432
+ # header parameters
2433
+ header_params = opts[:header_params] || {}
2434
+ # HTTP header 'Accept' (if needed)
2435
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2436
+ # HTTP header 'Content-Type'
2437
+ content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
2438
+ if !content_type.nil?
2439
+ header_params['Content-Type'] = content_type
2440
+ end
2441
+
2442
+ # form parameters
2443
+ form_params = opts[:form_params] || {}
2444
+
2445
+ # http body (model)
2446
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(groups)
2447
+
2448
+ # return_type
2449
+ return_type = opts[:debug_return_type]
2450
+
2451
+ # auth_names
2452
+ auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
2453
+
2454
+ new_options = opts.merge(
2455
+ :operation => :"AdminApi.admin_set_user_quota_groups",
2456
+ :header_params => header_params,
2457
+ :query_params => query_params,
2458
+ :form_params => form_params,
2459
+ :body => post_body,
2460
+ :auth_names => auth_names,
2461
+ :return_type => return_type
2462
+ )
2463
+
2464
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2465
+ if @api_client.config.debugging
2466
+ @api_client.config.logger.debug "API called: AdminApi#admin_set_user_quota_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2467
+ end
2468
+ return data, status_code, headers
2469
+ end
2470
+
1432
2471
  # List unadopted repositories
1433
2472
  # @param [Hash] opts the optional parameters
1434
2473
  # @option opts [Integer] :page page number of results to return (1-based)