@atlassian-dc-mcp/bitbucket 0.1.1 → 0.1.2

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 (308) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/bin/run.js +2 -0
  4. package/package.json +7 -4
  5. package/src/bitbucket-client/core/ApiError.ts +26 -0
  6. package/src/bitbucket-client/core/ApiRequestOptions.ts +17 -0
  7. package/src/bitbucket-client/core/ApiResult.ts +11 -0
  8. package/src/bitbucket-client/core/CancelablePromise.ts +131 -0
  9. package/src/bitbucket-client/core/OpenAPI.ts +33 -0
  10. package/src/bitbucket-client/core/request.ts +322 -0
  11. package/src/bitbucket-client/index.ts +303 -0
  12. package/src/bitbucket-client/models/AdminPasswordUpdate.ts +10 -0
  13. package/src/bitbucket-client/models/ApplicationId.ts +5 -0
  14. package/src/bitbucket-client/models/ApplicationUser.ts +7 -0
  15. package/src/bitbucket-client/models/AuthenticationEntity.ts +13 -0
  16. package/src/bitbucket-client/models/AuthenticationResponse.ts +7 -0
  17. package/src/bitbucket-client/models/BasicAuthConfigEntity.ts +7 -0
  18. package/src/bitbucket-client/models/CaptchaDataEntity.ts +7 -0
  19. package/src/bitbucket-client/models/Comment.ts +38 -0
  20. package/src/bitbucket-client/models/CommentOperations.ts +10 -0
  21. package/src/bitbucket-client/models/CommentThread.ts +22 -0
  22. package/src/bitbucket-client/models/CommentThreadDiffAnchor.ts +46 -0
  23. package/src/bitbucket-client/models/Commentable.ts +5 -0
  24. package/src/bitbucket-client/models/Context.ts +8 -0
  25. package/src/bitbucket-client/models/ConversationDTO.ts +8 -0
  26. package/src/bitbucket-client/models/Credentials.ts +10 -0
  27. package/src/bitbucket-client/models/CredentialsCheckFailedDTO.ts +7 -0
  28. package/src/bitbucket-client/models/DiffContentFilter.ts +5 -0
  29. package/src/bitbucket-client/models/ElevationMethodRestDTO.ts +7 -0
  30. package/src/bitbucket-client/models/EnrichedRepository.ts +7 -0
  31. package/src/bitbucket-client/models/ErrorEntity.ts +7 -0
  32. package/src/bitbucket-client/models/ExampleAvatarMultipartFormData.ts +11 -0
  33. package/src/bitbucket-client/models/ExampleCertificateMultipartFormData.ts +11 -0
  34. package/src/bitbucket-client/models/ExampleFiles.ts +7 -0
  35. package/src/bitbucket-client/models/ExampleJsonLastModifiedCallback.ts +7 -0
  36. package/src/bitbucket-client/models/ExampleMultipartFormData.ts +27 -0
  37. package/src/bitbucket-client/models/ExamplePostMultipartFormData.ts +23 -0
  38. package/src/bitbucket-client/models/ExamplePreviewMigration.ts +7 -0
  39. package/src/bitbucket-client/models/ExamplePutMultipartFormData.ts +19 -0
  40. package/src/bitbucket-client/models/ExampleRequirements.ts +7 -0
  41. package/src/bitbucket-client/models/ExampleSettings.ts +7 -0
  42. package/src/bitbucket-client/models/ExampleSettingsMap.ts +7 -0
  43. package/src/bitbucket-client/models/ExampleSocketAddress.ts +7 -0
  44. package/src/bitbucket-client/models/ExampleStatus.ts +7 -0
  45. package/src/bitbucket-client/models/FileListResource.ts +7 -0
  46. package/src/bitbucket-client/models/FilePart.ts +13 -0
  47. package/src/bitbucket-client/models/Group.ts +7 -0
  48. package/src/bitbucket-client/models/GroupAndUsers.ts +9 -0
  49. package/src/bitbucket-client/models/GroupPickerContext.ts +9 -0
  50. package/src/bitbucket-client/models/IdpConfigEntity.ts +7 -0
  51. package/src/bitbucket-client/models/JitConfigEntity.ts +7 -0
  52. package/src/bitbucket-client/models/JitUserEntity.ts +7 -0
  53. package/src/bitbucket-client/models/LineNumberRange.ts +10 -0
  54. package/src/bitbucket-client/models/LoginOptionEntity.ts +7 -0
  55. package/src/bitbucket-client/models/MethodStateDTO.ts +7 -0
  56. package/src/bitbucket-client/models/NextLoginStepDTO.ts +7 -0
  57. package/src/bitbucket-client/models/OptionalBodyBeanParam.ts +5 -0
  58. package/src/bitbucket-client/models/PageRequestImpl.ts +9 -0
  59. package/src/bitbucket-client/models/PasswordElevationRestDTO.ts +8 -0
  60. package/src/bitbucket-client/models/Project.ts +19 -0
  61. package/src/bitbucket-client/models/PropertyMap.ts +7 -0
  62. package/src/bitbucket-client/models/PullRequest.ts +36 -0
  63. package/src/bitbucket-client/models/PullRequestParticipant.ts +28 -0
  64. package/src/bitbucket-client/models/PullRequestRef.ts +15 -0
  65. package/src/bitbucket-client/models/RefType.ts +7 -0
  66. package/src/bitbucket-client/models/Repository.ts +36 -0
  67. package/src/bitbucket-client/models/RepositoryHookDetails.ts +7 -0
  68. package/src/bitbucket-client/models/RestAccessToken.ts +7 -0
  69. package/src/bitbucket-client/models/RestAccessTokenRequest.ts +10 -0
  70. package/src/bitbucket-client/models/RestAggregateRejectCounter.ts +7 -0
  71. package/src/bitbucket-client/models/RestAnalyticsSettings.ts +7 -0
  72. package/src/bitbucket-client/models/RestAnnouncementBanner.ts +7 -0
  73. package/src/bitbucket-client/models/RestApplicationProperties.ts +7 -0
  74. package/src/bitbucket-client/models/RestApplicationUser.ts +7 -0
  75. package/src/bitbucket-client/models/RestApplicationUserWithPermissions.ts +7 -0
  76. package/src/bitbucket-client/models/RestApplySuggestionRequest.ts +11 -0
  77. package/src/bitbucket-client/models/RestAttachmentMetadata.ts +7 -0
  78. package/src/bitbucket-client/models/RestAuthenticationRequest.ts +11 -0
  79. package/src/bitbucket-client/models/RestAutoDeclineSettings.ts +7 -0
  80. package/src/bitbucket-client/models/RestAutoDeclineSettingsRequest.ts +9 -0
  81. package/src/bitbucket-client/models/RestAutoMergeProcessingResult.ts +7 -0
  82. package/src/bitbucket-client/models/RestAutoMergeProjectSettingsRequest.ts +16 -0
  83. package/src/bitbucket-client/models/RestAutoMergeRequest.ts +7 -0
  84. package/src/bitbucket-client/models/RestAutoMergeRestrictedSettings.ts +7 -0
  85. package/src/bitbucket-client/models/RestAutoMergeSettingsRequest.ts +8 -0
  86. package/src/bitbucket-client/models/RestBearerTokenCredentials.ts +8 -0
  87. package/src/bitbucket-client/models/RestBitbucketLicense.ts +7 -0
  88. package/src/bitbucket-client/models/RestBranch.ts +7 -0
  89. package/src/bitbucket-client/models/RestBranchCreateRequest.ts +15 -0
  90. package/src/bitbucket-client/models/RestBranchDeleteRequest.ts +19 -0
  91. package/src/bitbucket-client/models/RestBuildCapabilities.ts +7 -0
  92. package/src/bitbucket-client/models/RestBuildStats.ts +7 -0
  93. package/src/bitbucket-client/models/RestBuildStatus.ts +7 -0
  94. package/src/bitbucket-client/models/RestBuildStatusSetRequest.ts +31 -0
  95. package/src/bitbucket-client/models/RestBulkAddInsightAnnotationRequest.ts +10 -0
  96. package/src/bitbucket-client/models/RestBulkUserRateLimitSettingsUpdateRequest.ts +13 -0
  97. package/src/bitbucket-client/models/RestChange.ts +7 -0
  98. package/src/bitbucket-client/models/RestChangeset.ts +7 -0
  99. package/src/bitbucket-client/models/RestClusterInformation.ts +7 -0
  100. package/src/bitbucket-client/models/RestClusterNode.ts +7 -0
  101. package/src/bitbucket-client/models/RestComment.ts +7 -0
  102. package/src/bitbucket-client/models/RestCommentJiraIssue.ts +7 -0
  103. package/src/bitbucket-client/models/RestCommentThreadDiffAnchor.ts +7 -0
  104. package/src/bitbucket-client/models/RestCommit.ts +7 -0
  105. package/src/bitbucket-client/models/RestCommitMessageSuggestion.ts +7 -0
  106. package/src/bitbucket-client/models/RestConflict.ts +7 -0
  107. package/src/bitbucket-client/models/RestConflictChange.ts +7 -0
  108. package/src/bitbucket-client/models/RestConnectivitySummary.ts +7 -0
  109. package/src/bitbucket-client/models/RestCreateBranchRequest.ts +10 -0
  110. package/src/bitbucket-client/models/RestCreateTagRequest.ts +10 -0
  111. package/src/bitbucket-client/models/RestDefaultBranch.ts +8 -0
  112. package/src/bitbucket-client/models/RestDefaultReviewersRequest.ts +38 -0
  113. package/src/bitbucket-client/models/RestDefaultTask.ts +7 -0
  114. package/src/bitbucket-client/models/RestDefaultTaskRequest.ts +33 -0
  115. package/src/bitbucket-client/models/RestDelayedSyncRepository.ts +10 -0
  116. package/src/bitbucket-client/models/RestDeployment.ts +7 -0
  117. package/src/bitbucket-client/models/RestDeploymentEnvironment.ts +7 -0
  118. package/src/bitbucket-client/models/RestDeploymentSetRequest.ts +28 -0
  119. package/src/bitbucket-client/models/RestDetailedGroup.ts +7 -0
  120. package/src/bitbucket-client/models/RestDetailedInvocation.ts +7 -0
  121. package/src/bitbucket-client/models/RestDetailedUser.ts +7 -0
  122. package/src/bitbucket-client/models/RestDiff.ts +7 -0
  123. package/src/bitbucket-client/models/RestDiffHunk.ts +7 -0
  124. package/src/bitbucket-client/models/RestDiffLine.ts +7 -0
  125. package/src/bitbucket-client/models/RestDiffSegment.ts +7 -0
  126. package/src/bitbucket-client/models/RestDiffStatsSummary.ts +7 -0
  127. package/src/bitbucket-client/models/RestEmoticon.ts +7 -0
  128. package/src/bitbucket-client/models/RestEnhancedEntityLink.ts +7 -0
  129. package/src/bitbucket-client/models/RestErasedUser.ts +7 -0
  130. package/src/bitbucket-client/models/RestErrorMessage.ts +7 -0
  131. package/src/bitbucket-client/models/RestErrors.ts +7 -0
  132. package/src/bitbucket-client/models/RestExportRequest.ts +13 -0
  133. package/src/bitbucket-client/models/RestFarmSynchronizationRequest.ts +17 -0
  134. package/src/bitbucket-client/models/RestGitTagCreateRequest.ts +18 -0
  135. package/src/bitbucket-client/models/RestGpgKey.ts +7 -0
  136. package/src/bitbucket-client/models/RestGpgSubKey.ts +7 -0
  137. package/src/bitbucket-client/models/RestHookScript.ts +7 -0
  138. package/src/bitbucket-client/models/RestHookScriptConfig.ts +7 -0
  139. package/src/bitbucket-client/models/RestHookScriptTriggers.ts +8 -0
  140. package/src/bitbucket-client/models/RestImportRequest.ts +8 -0
  141. package/src/bitbucket-client/models/RestInsightAnnotation.ts +7 -0
  142. package/src/bitbucket-client/models/RestInsightAnnotationsResponse.ts +7 -0
  143. package/src/bitbucket-client/models/RestInsightReport.ts +7 -0
  144. package/src/bitbucket-client/models/RestInsightReportData.ts +7 -0
  145. package/src/bitbucket-client/models/RestInvocationHistory.ts +7 -0
  146. package/src/bitbucket-client/models/RestInvocationRequest.ts +7 -0
  147. package/src/bitbucket-client/models/RestInvocationResult.ts +7 -0
  148. package/src/bitbucket-client/models/RestJiraIssue.ts +9 -0
  149. package/src/bitbucket-client/models/RestJob.ts +7 -0
  150. package/src/bitbucket-client/models/RestJobMessage.ts +7 -0
  151. package/src/bitbucket-client/models/RestLabel.ts +7 -0
  152. package/src/bitbucket-client/models/RestLabelable.ts +7 -0
  153. package/src/bitbucket-client/models/RestLogLevel.ts +7 -0
  154. package/src/bitbucket-client/models/RestLoggingSettings.ts +7 -0
  155. package/src/bitbucket-client/models/RestMailConfiguration.ts +7 -0
  156. package/src/bitbucket-client/models/RestMarkup.ts +7 -0
  157. package/src/bitbucket-client/models/RestMeshConnectivityReport.ts +7 -0
  158. package/src/bitbucket-client/models/RestMeshMigrationQueueStateCounts.ts +7 -0
  159. package/src/bitbucket-client/models/RestMeshMigrationRequest.ts +14 -0
  160. package/src/bitbucket-client/models/RestMeshMigrationSummary.ts +7 -0
  161. package/src/bitbucket-client/models/RestMeshNode.ts +7 -0
  162. package/src/bitbucket-client/models/RestMigrationRepository.ts +7 -0
  163. package/src/bitbucket-client/models/RestMinimalCommit.ts +7 -0
  164. package/src/bitbucket-client/models/RestMinimalRef.ts +7 -0
  165. package/src/bitbucket-client/models/RestMirrorHashes.ts +7 -0
  166. package/src/bitbucket-client/models/RestMirrorRepositorySynchronizationStatus.ts +7 -0
  167. package/src/bitbucket-client/models/RestMirrorServer.ts +7 -0
  168. package/src/bitbucket-client/models/RestMirrorUpgradeRequest.ts +9 -0
  169. package/src/bitbucket-client/models/RestMirroredRepository.ts +7 -0
  170. package/src/bitbucket-client/models/RestMirroredRepositoryDescriptor.ts +7 -0
  171. package/src/bitbucket-client/models/RestMirroringRequest.ts +7 -0
  172. package/src/bitbucket-client/models/RestMultilineCommentMarker.ts +7 -0
  173. package/src/bitbucket-client/models/RestMultilineCommentSpan.ts +7 -0
  174. package/src/bitbucket-client/models/RestMultipleBuildStats.ts +7 -0
  175. package/src/bitbucket-client/models/RestNamedLink.ts +7 -0
  176. package/src/bitbucket-client/models/RestNode.ts +7 -0
  177. package/src/bitbucket-client/models/RestNodeConnectivityReport.ts +7 -0
  178. package/src/bitbucket-client/models/RestNodeConnectivitySummary.ts +7 -0
  179. package/src/bitbucket-client/models/RestPageIdpConfigEntity.ts +14 -0
  180. package/src/bitbucket-client/models/RestPageLoginOptionEntity.ts +14 -0
  181. package/src/bitbucket-client/models/RestPageRestChange.ts +7 -0
  182. package/src/bitbucket-client/models/RestPath.ts +7 -0
  183. package/src/bitbucket-client/models/RestPermitted.ts +7 -0
  184. package/src/bitbucket-client/models/RestPermittedGroup.ts +7 -0
  185. package/src/bitbucket-client/models/RestPermittedUser.ts +7 -0
  186. package/src/bitbucket-client/models/RestPerson.ts +7 -0
  187. package/src/bitbucket-client/models/RestProgress.ts +7 -0
  188. package/src/bitbucket-client/models/RestProject.ts +7 -0
  189. package/src/bitbucket-client/models/RestProjectSettingsRestriction.ts +7 -0
  190. package/src/bitbucket-client/models/RestProjectSettingsRestrictionRequest.ts +10 -0
  191. package/src/bitbucket-client/models/RestProperties.ts +7 -0
  192. package/src/bitbucket-client/models/RestPullRequest.ts +7 -0
  193. package/src/bitbucket-client/models/RestPullRequestActivity.ts +7 -0
  194. package/src/bitbucket-client/models/RestPullRequestAssignParticipantRoleRequest.ts +30 -0
  195. package/src/bitbucket-client/models/RestPullRequestAssignStatusRequest.ts +16 -0
  196. package/src/bitbucket-client/models/RestPullRequestCommitMessageTemplate.ts +7 -0
  197. package/src/bitbucket-client/models/RestPullRequestCondition.ts +7 -0
  198. package/src/bitbucket-client/models/RestPullRequestDeclineRequest.ts +9 -0
  199. package/src/bitbucket-client/models/RestPullRequestDeleteRequest.ts +8 -0
  200. package/src/bitbucket-client/models/RestPullRequestFinishReviewRequest.ts +10 -0
  201. package/src/bitbucket-client/models/RestPullRequestMergeConfig.ts +7 -0
  202. package/src/bitbucket-client/models/RestPullRequestMergeRequest.ts +12 -0
  203. package/src/bitbucket-client/models/RestPullRequestMergeStrategy.ts +7 -0
  204. package/src/bitbucket-client/models/RestPullRequestMergeability.ts +7 -0
  205. package/src/bitbucket-client/models/RestPullRequestParticipant.ts +7 -0
  206. package/src/bitbucket-client/models/RestPullRequestRebaseRequest.ts +8 -0
  207. package/src/bitbucket-client/models/RestPullRequestRebaseResult.ts +7 -0
  208. package/src/bitbucket-client/models/RestPullRequestRebaseability.ts +7 -0
  209. package/src/bitbucket-client/models/RestPullRequestRef.ts +7 -0
  210. package/src/bitbucket-client/models/RestPullRequestReopenRequest.ts +8 -0
  211. package/src/bitbucket-client/models/RestPullRequestSettings.ts +7 -0
  212. package/src/bitbucket-client/models/RestPullRequestSuggestion.ts +7 -0
  213. package/src/bitbucket-client/models/RestPushRefChange.ts +7 -0
  214. package/src/bitbucket-client/models/RestRateLimitSettings.ts +7 -0
  215. package/src/bitbucket-client/models/RestRawAccessToken.ts +7 -0
  216. package/src/bitbucket-client/models/RestRefChange.ts +7 -0
  217. package/src/bitbucket-client/models/RestRefMatcher.ts +7 -0
  218. package/src/bitbucket-client/models/RestRefMatcherType.ts +7 -0
  219. package/src/bitbucket-client/models/RestRefRestriction.ts +7 -0
  220. package/src/bitbucket-client/models/RestRefSyncQueue.ts +10 -0
  221. package/src/bitbucket-client/models/RestRefSyncRequest.ts +19 -0
  222. package/src/bitbucket-client/models/RestRefSyncStatus.ts +7 -0
  223. package/src/bitbucket-client/models/RestRejectedRef.ts +7 -0
  224. package/src/bitbucket-client/models/RestRelatedLinks.ts +7 -0
  225. package/src/bitbucket-client/models/RestRepositoriesExportRequest.ts +10 -0
  226. package/src/bitbucket-client/models/RestRepository.ts +7 -0
  227. package/src/bitbucket-client/models/RestRepositoryHook.ts +7 -0
  228. package/src/bitbucket-client/models/RestRepositoryHookVeto.ts +7 -0
  229. package/src/bitbucket-client/models/RestRepositoryLockOwner.ts +7 -0
  230. package/src/bitbucket-client/models/RestRepositoryMirrorEvent.ts +16 -0
  231. package/src/bitbucket-client/models/RestRepositoryPolicy.ts +7 -0
  232. package/src/bitbucket-client/models/RestRepositoryPullRequestSettings.ts +7 -0
  233. package/src/bitbucket-client/models/RestRepositoryRefChangeActivity.ts +7 -0
  234. package/src/bitbucket-client/models/RestRepositorySelector.ts +9 -0
  235. package/src/bitbucket-client/models/RestRequiredBuildCondition.ts +7 -0
  236. package/src/bitbucket-client/models/RestRequiredBuildConditionSetRequest.ts +31 -0
  237. package/src/bitbucket-client/models/RestRestrictionRequest.ts +44 -0
  238. package/src/bitbucket-client/models/RestReviewerGroup.ts +7 -0
  239. package/src/bitbucket-client/models/RestRollingUpgradeState.ts +7 -0
  240. package/src/bitbucket-client/models/RestScope.ts +7 -0
  241. package/src/bitbucket-client/models/RestScopesExample.ts +7 -0
  242. package/src/bitbucket-client/models/RestSecretScanningAllowlistRule.ts +7 -0
  243. package/src/bitbucket-client/models/RestSecretScanningAllowlistRuleSetRequest.ts +19 -0
  244. package/src/bitbucket-client/models/RestSecretScanningRule.ts +7 -0
  245. package/src/bitbucket-client/models/RestSecretScanningRuleSetRequest.ts +19 -0
  246. package/src/bitbucket-client/models/RestSetInsightReportRequest.ts +18 -0
  247. package/src/bitbucket-client/models/RestSingleAddInsightAnnotationRequest.ts +14 -0
  248. package/src/bitbucket-client/models/RestSshAccessKey.ts +7 -0
  249. package/src/bitbucket-client/models/RestSshAccessKeyLocations.ts +12 -0
  250. package/src/bitbucket-client/models/RestSshCredentials.ts +16 -0
  251. package/src/bitbucket-client/models/RestSshKey.ts +7 -0
  252. package/src/bitbucket-client/models/RestSshKeySettings.ts +7 -0
  253. package/src/bitbucket-client/models/RestSshKeyTypeRestriction.ts +7 -0
  254. package/src/bitbucket-client/models/RestSshSettings.ts +7 -0
  255. package/src/bitbucket-client/models/RestSyncProgress.ts +7 -0
  256. package/src/bitbucket-client/models/RestSystemSigningConfiguration.ts +7 -0
  257. package/src/bitbucket-client/models/RestTag.ts +7 -0
  258. package/src/bitbucket-client/models/RestTestResults.ts +7 -0
  259. package/src/bitbucket-client/models/RestTokenBucketSettings.ts +7 -0
  260. package/src/bitbucket-client/models/RestUpstreamServer.ts +7 -0
  261. package/src/bitbucket-client/models/RestUpstreamSettings.ts +7 -0
  262. package/src/bitbucket-client/models/RestUserDirectory.ts +7 -0
  263. package/src/bitbucket-client/models/RestUserRateLimitSettings.ts +7 -0
  264. package/src/bitbucket-client/models/RestUserRateLimitSettingsUpdateRequest.ts +12 -0
  265. package/src/bitbucket-client/models/RestUserReaction.ts +7 -0
  266. package/src/bitbucket-client/models/RestUsernamePasswordCredentials.ts +9 -0
  267. package/src/bitbucket-client/models/RestWebhook.ts +7 -0
  268. package/src/bitbucket-client/models/RestWebhookCredentials.ts +7 -0
  269. package/src/bitbucket-client/models/RestWebhookRequestResponse.ts +7 -0
  270. package/src/bitbucket-client/models/RestWebhookScope.ts +7 -0
  271. package/src/bitbucket-client/models/RestX509Certificate.ts +7 -0
  272. package/src/bitbucket-client/models/Scope.ts +16 -0
  273. package/src/bitbucket-client/models/SimpleSshKeyFingerprint.ts +7 -0
  274. package/src/bitbucket-client/models/SsoConfigEntity.ts +7 -0
  275. package/src/bitbucket-client/models/SsoManagementStatusDTO.ts +7 -0
  276. package/src/bitbucket-client/models/StatusDTO.ts +7 -0
  277. package/src/bitbucket-client/models/TotpCodeVerificationDTO.ts +9 -0
  278. package/src/bitbucket-client/models/TotpElevationRestDTO.ts +8 -0
  279. package/src/bitbucket-client/models/TotpRecoveryCodeAuthenticationDTO.ts +9 -0
  280. package/src/bitbucket-client/models/TotpRecoveryCodeDTO.ts +7 -0
  281. package/src/bitbucket-client/models/TotpUserEnrollmentDTO.ts +7 -0
  282. package/src/bitbucket-client/models/UserAndGroups.ts +9 -0
  283. package/src/bitbucket-client/models/UserPasswordUpdate.ts +10 -0
  284. package/src/bitbucket-client/models/UserPickerContext.ts +9 -0
  285. package/src/bitbucket-client/models/UserRename.ts +9 -0
  286. package/src/bitbucket-client/models/UserUpdate.ts +10 -0
  287. package/src/bitbucket-client/models/UserUpdateWithCredentials.ts +14 -0
  288. package/src/bitbucket-client/services/AuthenticationService.ts +1652 -0
  289. package/src/bitbucket-client/services/BuildsAndDeploymentsService.ts +849 -0
  290. package/src/bitbucket-client/services/CapabilitiesService.ts +38 -0
  291. package/src/bitbucket-client/services/DashboardService.ts +96 -0
  292. package/src/bitbucket-client/services/DefaultService.ts +46 -0
  293. package/src/bitbucket-client/services/DeprecatedService.ts +396 -0
  294. package/src/bitbucket-client/services/JiraIntegrationService.ts +133 -0
  295. package/src/bitbucket-client/services/MarkupService.ts +48 -0
  296. package/src/bitbucket-client/services/MirroringMirrorService.ts +421 -0
  297. package/src/bitbucket-client/services/MirroringUpstreamService.ts +487 -0
  298. package/src/bitbucket-client/services/PermissionManagementService.ts +1484 -0
  299. package/src/bitbucket-client/services/ProjectService.ts +2502 -0
  300. package/src/bitbucket-client/services/PullRequestsService.ts +2997 -0
  301. package/src/bitbucket-client/services/RepositoryService.ts +3944 -0
  302. package/src/bitbucket-client/services/SecurityService.ts +1253 -0
  303. package/src/bitbucket-client/services/SystemMaintenanceService.ts +2279 -0
  304. package/src/bitbucket-service.ts +180 -0
  305. package/src/index.ts +78 -0
  306. package/tsconfig.json +12 -0
  307. package/tsconfig.tsbuildinfo +1 -1
  308. package/.env +0 -2
@@ -0,0 +1,38 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { RestBuildCapabilities } from '../models/RestBuildCapabilities.js';
6
+ import type { CancelablePromise } from '../core/CancelablePromise.js';
7
+ import { OpenAPI } from '../core/OpenAPI.js';
8
+ import { request as __request } from '../core/request.js';
9
+ export class CapabilitiesService {
10
+ /**
11
+ * Get build capabilities
12
+ * Returns the build capabilities of this instance
13
+ * @returns RestBuildCapabilities capabilities
14
+ * @throws ApiError
15
+ */
16
+ public static getCapabilities(): CancelablePromise<RestBuildCapabilities> {
17
+ return __request(OpenAPI, {
18
+ method: 'GET',
19
+ url: '/api/latest/build/capabilities',
20
+ });
21
+ }
22
+ /**
23
+ * Get deployment capabilities
24
+ * Returns the Deployment capabilities of this instance
25
+ * @returns any capabilities
26
+ * @throws ApiError
27
+ */
28
+ public static getCapabilities1(): CancelablePromise<any> {
29
+ return __request(OpenAPI, {
30
+ method: 'GET',
31
+ url: '/api/latest/deployment/capabilities',
32
+ errors: {
33
+ 404: `This instance of Bitbucket Data Center does not support deployments (for example, it has been disabled using the property 'plugin.deployment.capability.disabled').`,
34
+ },
35
+ });
36
+ }
37
+ }
38
+
@@ -0,0 +1,96 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { RestPullRequest } from '../models/RestPullRequest.js';
6
+ import type { RestPullRequestSuggestion } from '../models/RestPullRequestSuggestion.js';
7
+ import type { CancelablePromise } from '../core/CancelablePromise.js';
8
+ import { OpenAPI } from '../core/OpenAPI.js';
9
+ import { request as __request } from '../core/request.js';
10
+ export class DashboardService {
11
+ /**
12
+ * Get pull request suggestions
13
+ * Retrieves a page of suggestions for pull requests that the currently authenticated user may wish to raise. Such suggestions are based on ref changes occurring and so contain the ref change that prompted the suggestion plus the time the change event occurred. Changes will be returned in descending order based on the time the change that prompted the suggestion occurred.
14
+ *
15
+ * Note that although the response is a page object, the interface does not support paging, however a limit can be applied to the size of the returned page.
16
+ * @param changesSince restrict pull request suggestions to be based on events that occurred since some timein the past. This is expressed in seconds since "now". So to return suggestionsbased only on activity within the past 48 hours, pass a value of 172800.
17
+ * @param limit restricts the result set to return at most this many suggestions.
18
+ * @returns any A page of pull requests that match the search criteria.
19
+ * @throws ApiError
20
+ */
21
+ public static getPullRequestSuggestions(
22
+ changesSince?: string,
23
+ limit?: string,
24
+ ): CancelablePromise<{
25
+ isLastPage?: boolean;
26
+ limit?: number;
27
+ nextPageStart?: number;
28
+ size?: number;
29
+ start?: number;
30
+ values?: Array<RestPullRequestSuggestion>;
31
+ }> {
32
+ return __request(OpenAPI, {
33
+ method: 'GET',
34
+ url: '/api/latest/dashboard/pull-request-suggestions',
35
+ query: {
36
+ 'changesSince': changesSince,
37
+ 'limit': limit,
38
+ },
39
+ errors: {
40
+ 400: `The request was malformed.`,
41
+ 401: `The current user is not authenticated`,
42
+ },
43
+ });
44
+ }
45
+ /**
46
+ * Get pull requests for a user
47
+ * Retrieve a page of pull requests where a user is involved as either a reviewer, author or a participant. The request may be filtered by pull request state, role or participant status.
48
+ * @param closedSince (optional, defaults to returning pull requests regardless of closed since date). Permits returning only pull requests with a closed timestamp set more recently that (now - closedSince). Units are in seconds. So for example if closed since 86400 is set only pull requests closed in the previous 24 hours will be returned.
49
+ * @param role (optional, defaults to returning pull requests for any role). If a role is supplied only pull requests where the authenticated user is a participant in the given role will be returned. Either <strong>REVIEWER</strong>, <strong>AUTHOR</strong> or <strong>PARTICIPANT</strong>.
50
+ * @param participantStatus (optional, defaults to returning pull requests with any participant status). A comma separated list of participant status. That is, one or more of <strong>UNAPPROVED</strong>, <strong>NEEDS_WORK</strong>, or <strong>APPROVED</strong>.
51
+ * @param state (optional, defaults to returning pull requests in any state). If a state is supplied only pull requests in the specified state will be returned. Either <strong>OPEN</strong>, <strong>DECLINED</strong> or <strong>MERGED</strong>. Omit this parameter to return pull request in any state.
52
+ * @param user The name of the involved user, defaults to the current user.
53
+ * @param order (optional, defaults to <strong>NEWEST</strong>) the order/(s) to return pull requests in; can choose from <strong>OLDEST</strong> (as in: "oldest first"), <strong>NEWEST</strong>, <strong>DRAFT_STATUS</strong>, <strong>PARTICIPANT_STATUS</strong>, and/or <strong>CLOSED_DATE</strong>. Where <strong>CLOSED_DATE</strong> is specified and the result set includes pull requests that are not in the closed state, these pull requests will appear first in the result set, followed by most recently closed pull requests.
54
+ * @param start Start number for the page (inclusive). If not passed, first page is assumed.
55
+ * @param limit Number of items to return. If not passed, a page size of 25 is used.
56
+ * @returns any A page of pull requests that match the search criteria.
57
+ * @throws ApiError
58
+ */
59
+ public static getPullRequests1(
60
+ closedSince?: string,
61
+ role?: string,
62
+ participantStatus?: string,
63
+ state?: string,
64
+ user?: string,
65
+ order?: string,
66
+ start?: number,
67
+ limit?: number,
68
+ ): CancelablePromise<{
69
+ isLastPage?: boolean;
70
+ limit?: number;
71
+ nextPageStart?: number;
72
+ size?: number;
73
+ start?: number;
74
+ values?: Array<RestPullRequest>;
75
+ }> {
76
+ return __request(OpenAPI, {
77
+ method: 'GET',
78
+ url: '/api/latest/dashboard/pull-requests',
79
+ query: {
80
+ 'closedSince': closedSince,
81
+ 'role': role,
82
+ 'participantStatus': participantStatus,
83
+ 'state': state,
84
+ 'user': user,
85
+ 'order': order,
86
+ 'start': start,
87
+ 'limit': limit,
88
+ },
89
+ errors: {
90
+ 400: `The request was malformed.`,
91
+ 401: `The current user is not authenticated`,
92
+ },
93
+ });
94
+ }
95
+ }
96
+
@@ -0,0 +1,46 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { CancelablePromise } from '../core/CancelablePromise.js';
6
+ import { OpenAPI } from '../core/OpenAPI.js';
7
+ import { request as __request } from '../core/request.js';
8
+ export class DefaultService {
9
+ /**
10
+ * Get pull requests in inbox
11
+ * Returns a page of pull requests in the user's inbox.
12
+ * @param role
13
+ * @param limit
14
+ * @param start
15
+ * @returns any default response
16
+ * @throws ApiError
17
+ */
18
+ public static getPullRequests2(
19
+ role: string = 'reviewer',
20
+ limit: number = 25,
21
+ start?: number,
22
+ ): CancelablePromise<any> {
23
+ return __request(OpenAPI, {
24
+ method: 'GET',
25
+ url: '/api/latest/inbox/pull-requests',
26
+ query: {
27
+ 'role': role,
28
+ 'limit': limit,
29
+ 'start': start,
30
+ },
31
+ });
32
+ }
33
+ /**
34
+ * Get total number of pull requests in inbox
35
+ * Returns the total number of pull requests in the user's inbox
36
+ * @returns any default response
37
+ * @throws ApiError
38
+ */
39
+ public static getPullRequestCount(): CancelablePromise<any> {
40
+ return __request(OpenAPI, {
41
+ method: 'GET',
42
+ url: '/api/latest/inbox/pull-requests/count',
43
+ });
44
+ }
45
+ }
46
+
@@ -0,0 +1,396 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { GroupPickerContext } from '../models/GroupPickerContext.js';
6
+ import type { RestBranch } from '../models/RestBranch.js';
7
+ import type { RestBuildStats } from '../models/RestBuildStats.js';
8
+ import type { RestBuildStatus } from '../models/RestBuildStatus.js';
9
+ import type { RestMultipleBuildStats } from '../models/RestMultipleBuildStats.js';
10
+ import type { RestPullRequestParticipant } from '../models/RestPullRequestParticipant.js';
11
+ import type { UserPickerContext } from '../models/UserPickerContext.js';
12
+ import type { CancelablePromise } from '../core/CancelablePromise.js';
13
+ import { OpenAPI } from '../core/OpenAPI.js';
14
+ import { request as __request } from '../core/request.js';
15
+ export class DeprecatedService {
16
+ /**
17
+ * Get build status statistics for multiple commits
18
+ * Produces a list of the build statistics for multiple commits. Commits <em>without any builds associated with them</em> will not be returned.<br> For example if the commit <code>e00cf62997a027bbf785614a93e2e55bb331d268</code> does not have any build statuses associated with it, it will not be present in the response.
19
+ * @param requestBody full SHA1 of each commit
20
+ * @returns RestMultipleBuildStats The number of successful/failed/in-progress/cancelled/unknown builds for each commit (with the caveat that the commits <em>without any builds associated with them</em> will not be present in the response)
21
+ * @throws ApiError
22
+ */
23
+ public static getMultipleBuildStatusStats(
24
+ requestBody?: Array<string>,
25
+ ): CancelablePromise<RestMultipleBuildStats> {
26
+ return __request(OpenAPI, {
27
+ method: 'POST',
28
+ url: '/build-status/latest/commits/stats',
29
+ body: requestBody,
30
+ mediaType: 'application/json',
31
+ errors: {
32
+ 401: `The user is not authenticated or does not have the <strong>LICENSED</strong> permission`,
33
+ },
34
+ });
35
+ }
36
+ /**
37
+ * Get build status statistics for commit
38
+ * Gets statistics regarding the builds associated with a commit
39
+ * @param commitId full SHA1 of the commit
40
+ * @param includeUnique include a unique build result if there is either only one failed build, only one in-progress build or only one successful build
41
+ * @returns RestBuildStats The number of successful/failed/in-progress/cancelled/unknown builds for the commit
42
+ * @throws ApiError
43
+ */
44
+ public static getBuildStatusStats(
45
+ commitId: string,
46
+ includeUnique?: boolean,
47
+ ): CancelablePromise<RestBuildStats> {
48
+ return __request(OpenAPI, {
49
+ method: 'GET',
50
+ url: '/build-status/latest/commits/stats/{commitId}',
51
+ path: {
52
+ 'commitId': commitId,
53
+ },
54
+ query: {
55
+ 'includeUnique': includeUnique,
56
+ },
57
+ errors: {
58
+ 401: `The user is not authenticated or does not have the <b>LICENSED</b> permission.`,
59
+ },
60
+ });
61
+ }
62
+ /**
63
+ * @deprecated
64
+ * Get build statuses for commit
65
+ * Gets build statuses associated with a commit.
66
+ *
67
+ * <strong>Deprecated in 7.14, please use the repository based builds resource instead.</strong>
68
+ * @param commitId Full SHA1 of the commit (ex: <code>e00cf62997a027bbf785614a93e2e55bb331d268</code>)
69
+ * @param orderBy How the results should be ordered. Options are NEWEST, OLDEST, STATUS
70
+ * @param start Start number for the page (inclusive). If not passed, first page is assumed.
71
+ * @param limit Number of items to return. If not passed, a page size of 25 is used.
72
+ * @returns any A Page of build statuses associated with the commit <br /> (limited to the most recent 100 build statuses associated with the commit)
73
+ * @throws ApiError
74
+ */
75
+ public static getBuildStatus(
76
+ commitId: string,
77
+ orderBy?: string,
78
+ start?: number,
79
+ limit?: number,
80
+ ): CancelablePromise<{
81
+ isLastPage?: boolean;
82
+ limit?: number;
83
+ nextPageStart?: number;
84
+ size?: number;
85
+ start?: number;
86
+ values?: Array<RestBuildStatus>;
87
+ }> {
88
+ return __request(OpenAPI, {
89
+ method: 'GET',
90
+ url: '/build-status/latest/commits/{commitId}',
91
+ path: {
92
+ 'commitId': commitId,
93
+ },
94
+ query: {
95
+ 'orderBy': orderBy,
96
+ 'start': start,
97
+ 'limit': limit,
98
+ },
99
+ errors: {
100
+ 401: `The user is not authenticated or does not have the <b>LICENSED</b> permission.`,
101
+ },
102
+ });
103
+ }
104
+ /**
105
+ * @deprecated
106
+ * Create build status for commit
107
+ * Associates a build status with a commit.The <code>state</code>, the <code>key</code> and the <code>url</code> fields are mandatory. The <code>name</code> and<code>description</code> fields are optional.All fields (mandatory or optional) are limited to 255 characters, except for the <code>url</code>,which is limited to 450 characters.Supported values for the <code>state</code> are <code>SUCCESSFUL</code>, <code>FAILED</code>and <code>INPROGRESS</code>.The authenticated user must have <strong>LICENSED</strong> permission or higher to call this resource.
108
+ *
109
+ * <strong>Deprecated in 7.14, please use the repository based builds resource instead.</strong>
110
+ * @param commitId full SHA1 of the commit
111
+ * @param requestBody build status to associate with the commit
112
+ * @returns void
113
+ * @throws ApiError
114
+ */
115
+ public static addBuildStatus(
116
+ commitId: string,
117
+ requestBody?: RestBuildStatus,
118
+ ): CancelablePromise<void> {
119
+ return __request(OpenAPI, {
120
+ method: 'POST',
121
+ url: '/build-status/latest/commits/{commitId}',
122
+ path: {
123
+ 'commitId': commitId,
124
+ },
125
+ body: requestBody,
126
+ mediaType: 'application/json',
127
+ errors: {
128
+ 400: `An error message if the <code>commitId</code> is not a full 40-characters SHA1, if the build status has a missing mandatory field or if the fields are too large`,
129
+ 401: `The user is not authenticated or does not have the <strong>LICENSED</strong> permission`,
130
+ },
131
+ });
132
+ }
133
+ /**
134
+ * @deprecated
135
+ * Add user to group
136
+ * <strong>Deprecated since 2.10</strong>. Use /rest/users/add-groups instead.
137
+ *
138
+ * Add a user to a group.
139
+ *
140
+ * In the request entity, the <em>context</em> attribute is the group and the <em>itemName</em> is the user.
141
+ *
142
+ * The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.
143
+ * @param requestBody
144
+ * @returns any The user was added to the group.
145
+ * @throws ApiError
146
+ */
147
+ public static addUserToGroup(
148
+ requestBody?: UserPickerContext,
149
+ ): CancelablePromise<any> {
150
+ return __request(OpenAPI, {
151
+ method: 'POST',
152
+ url: '/api/latest/admin/groups/add-user',
153
+ body: requestBody,
154
+ mediaType: 'application/json',
155
+ errors: {
156
+ 401: `The authenticated user does not have the <strong>ADMIN</strong> permission.`,
157
+ 403: `The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level.`,
158
+ 404: `The specified user or group does not exist.`,
159
+ },
160
+ });
161
+ }
162
+ /**
163
+ * @deprecated
164
+ * Remove user from group
165
+ * <strong>Deprecated since 2.10</strong>. Use /rest/users/remove-groups instead.
166
+ *
167
+ * Remove a user from a group.
168
+ *
169
+ * The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.
170
+ *
171
+ * In the request entity, the <em>context</em> attribute is the group and the <em>itemName</em> is the user.
172
+ * @param requestBody
173
+ * @returns any The user was removed from the group.
174
+ * @throws ApiError
175
+ */
176
+ public static removeUserFromGroup(
177
+ requestBody?: UserPickerContext,
178
+ ): CancelablePromise<any> {
179
+ return __request(OpenAPI, {
180
+ method: 'POST',
181
+ url: '/api/latest/admin/groups/remove-user',
182
+ body: requestBody,
183
+ mediaType: 'application/json',
184
+ errors: {
185
+ 401: `The authenticated user does not have the <strong>ADMIN</strong> permission.`,
186
+ 403: `The action was disallowed as the group has a higher permission level than the context user.`,
187
+ 404: `The specified user or group does not exist.`,
188
+ },
189
+ });
190
+ }
191
+ /**
192
+ * @deprecated
193
+ * Add user to group
194
+ * <strong>Deprecated since 2.10</strong>. Use /rest/users/add-groups instead.
195
+ *
196
+ * Add a user to a group. This is very similar to <code>groups/add-user</code>, but with the <em>context</em> and <em>itemName</em> attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application.
197
+ *
198
+ * In the request entity, the <em>context</em> attribute is the user and the <em>itemName</em> is the group.
199
+ *
200
+ * The authenticated user must have the <strong>ADMIN</strong> permission to call this resource.
201
+ * @param requestBody
202
+ * @returns any The user was added to the group
203
+ * @throws ApiError
204
+ */
205
+ public static addGroupToUser(
206
+ requestBody?: GroupPickerContext,
207
+ ): CancelablePromise<any> {
208
+ return __request(OpenAPI, {
209
+ method: 'POST',
210
+ url: '/api/latest/admin/users/add-group',
211
+ body: requestBody,
212
+ mediaType: 'application/json',
213
+ errors: {
214
+ 401: `The authenticated user does not have the <strong>ADMIN</strong> permission.`,
215
+ 403: `The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level.`,
216
+ 404: `The specified user or group does not exist.`,
217
+ },
218
+ });
219
+ }
220
+ /**
221
+ * @deprecated
222
+ * Get default branch
223
+ * Retrieves the repository's default branch, if it has been created. If the repository is empty, 204 No Content will be returned. For non-empty repositories, if the configured default branch has not yet been created a 404 Not Found will be returned.
224
+ *
225
+ * This URL is deprecated. Callers should use <code>GET /projects/{key}/repos/{slug}/default-branch</code> instead, which allows retrieving the <i>configured</i> default branch even if the ref has not been created yet.
226
+ *
227
+ * The authenticated user must have <strong>REPO_READ</strong> permission for the specified repository to call this resource.
228
+ * @param projectKey The project key.
229
+ * @param repositorySlug The repository slug.
230
+ * @returns RestBranch The configured default branch for the repository.
231
+ * @throws ApiError
232
+ */
233
+ public static getDefaultBranch1(
234
+ projectKey: string,
235
+ repositorySlug: string,
236
+ ): CancelablePromise<RestBranch> {
237
+ return __request(OpenAPI, {
238
+ method: 'GET',
239
+ url: '/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default',
240
+ path: {
241
+ 'projectKey': projectKey,
242
+ 'repositorySlug': repositorySlug,
243
+ },
244
+ errors: {
245
+ 401: `The currently authenticated user has insufficient permissions to read the repository.`,
246
+ 404: `The specified repository does not exist, or its configured default branch does not exist.`,
247
+ },
248
+ });
249
+ }
250
+ /**
251
+ * @deprecated
252
+ * Update default branch
253
+ * Update the default branch of a repository.
254
+ *
255
+ * This URL is deprecated. Callers should use <code>PUT /projects/{key}/repos/{slug}/default-branch</code> instead.
256
+ *
257
+ * The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository to call this resource.
258
+ * @param projectKey The project key.
259
+ * @param repositorySlug The repository slug.
260
+ * @param requestBody The branch to set as default
261
+ * @returns void
262
+ * @throws ApiError
263
+ */
264
+ public static setDefaultBranch1(
265
+ projectKey: string,
266
+ repositorySlug: string,
267
+ requestBody?: RestBranch,
268
+ ): CancelablePromise<void> {
269
+ return __request(OpenAPI, {
270
+ method: 'PUT',
271
+ url: '/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default',
272
+ path: {
273
+ 'projectKey': projectKey,
274
+ 'repositorySlug': repositorySlug,
275
+ },
276
+ body: requestBody,
277
+ mediaType: 'application/json',
278
+ errors: {
279
+ 401: `The currently authenticated user has insufficient permissions to update the repository.`,
280
+ 404: `The specified repository does not exist.`,
281
+ },
282
+ });
283
+ }
284
+ /**
285
+ * @deprecated
286
+ * Unapprove pull request
287
+ * Remove approval from a pull request as the current user. This does not remove the user as a participant.
288
+ *
289
+ * The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource.
290
+ *
291
+ * <strong>Deprecated since 4.2</strong>. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead
292
+ * @param projectKey The project key.
293
+ * @param pullRequestId The ID of the pull request within the repository
294
+ * @param repositorySlug The repository slug.
295
+ * @returns RestPullRequestParticipant Details of the updated participant.
296
+ * @throws ApiError
297
+ */
298
+ public static withdrawApproval(
299
+ projectKey: string,
300
+ pullRequestId: string,
301
+ repositorySlug: string,
302
+ ): CancelablePromise<RestPullRequestParticipant> {
303
+ return __request(OpenAPI, {
304
+ method: 'DELETE',
305
+ url: '/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve',
306
+ path: {
307
+ 'projectKey': projectKey,
308
+ 'pullRequestId': pullRequestId,
309
+ 'repositorySlug': repositorySlug,
310
+ },
311
+ errors: {
312
+ 401: `The currently authenticated user has insufficient permissions to view the pull request.`,
313
+ 404: `The specified repository or pull request does not exist or the current user is not a participant on the pull request.`,
314
+ 409: `The pull request is not open.`,
315
+ },
316
+ });
317
+ }
318
+ /**
319
+ * @deprecated
320
+ * Approve pull request
321
+ * Approve a pull request as the current user. Implicitly adds the user as a participant if they are not already.
322
+ *
323
+ * The authenticated user must have <strong>REPO_READ</strong> permission for the repository that this pull request targets to call this resource.
324
+ *
325
+ * <strong>Deprecated since 4.2</strong>. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead
326
+ * @param projectKey The project key.
327
+ * @param pullRequestId The ID of the pull request within the repository
328
+ * @param repositorySlug The repository slug.
329
+ * @returns RestPullRequestParticipant Details of the new participant.
330
+ * @throws ApiError
331
+ */
332
+ public static approve(
333
+ projectKey: string,
334
+ pullRequestId: string,
335
+ repositorySlug: string,
336
+ ): CancelablePromise<RestPullRequestParticipant> {
337
+ return __request(OpenAPI, {
338
+ method: 'POST',
339
+ url: '/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve',
340
+ path: {
341
+ 'projectKey': projectKey,
342
+ 'pullRequestId': pullRequestId,
343
+ 'repositorySlug': repositorySlug,
344
+ },
345
+ errors: {
346
+ 401: `The currently authenticated user has insufficient permissions to view the pull request.`,
347
+ 404: `The specified repository or pull request does not exist.`,
348
+ 409: `The pull request is not open.`,
349
+ },
350
+ });
351
+ }
352
+ /**
353
+ * @deprecated
354
+ * Unassign pull request participant
355
+ * Unassigns a participant from the REVIEWER role they may have been given in a pull request.
356
+ *
357
+ * If the participant has no explicit role this method has no effect.
358
+ *
359
+ * Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered.
360
+ *
361
+ * The authenticated user must have <strong>REPO_WRITE</strong> permission for the repository that this pull request targets to call this resource.
362
+ *
363
+ * <strong>Deprecated since 4.2</strong>. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead.
364
+ * @param projectKey The project key.
365
+ * @param pullRequestId The ID of the pull request within the repository
366
+ * @param repositorySlug The repository slug.
367
+ * @param username
368
+ * @returns void
369
+ * @throws ApiError
370
+ */
371
+ public static unassignParticipantRole1(
372
+ projectKey: string,
373
+ pullRequestId: string,
374
+ repositorySlug: string,
375
+ username?: string,
376
+ ): CancelablePromise<void> {
377
+ return __request(OpenAPI, {
378
+ method: 'DELETE',
379
+ url: '/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants',
380
+ path: {
381
+ 'projectKey': projectKey,
382
+ 'pullRequestId': pullRequestId,
383
+ 'repositorySlug': repositorySlug,
384
+ },
385
+ query: {
386
+ 'username': username,
387
+ },
388
+ errors: {
389
+ 401: `The currently authenticated user has insufficient permissions to update the pull request.`,
390
+ 404: `The specified repository or pull request does not exist.`,
391
+ 409: `Removing reviewers isn't supported on archived repositories.`,
392
+ },
393
+ });
394
+ }
395
+ }
396
+