bitbucket-datacenter-mcp 0.2.0

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 (1573) hide show
  1. package/CHANGELOG.md +307 -0
  2. package/README.md +236 -0
  3. package/bin/run.js +7 -0
  4. package/build/__tests__/bitbucket-service.test.d.ts +2 -0
  5. package/build/__tests__/bitbucket-service.test.d.ts.map +1 -0
  6. package/build/__tests__/bitbucket-service.test.js +2824 -0
  7. package/build/__tests__/bitbucket-service.test.js.map +1 -0
  8. package/build/__tests__/bitbucket-token-optimization.test.d.ts +2 -0
  9. package/build/__tests__/bitbucket-token-optimization.test.d.ts.map +1 -0
  10. package/build/__tests__/bitbucket-token-optimization.test.js +391 -0
  11. package/build/__tests__/bitbucket-token-optimization.test.js.map +1 -0
  12. package/build/__tests__/config.test.d.ts +2 -0
  13. package/build/__tests__/config.test.d.ts.map +1 -0
  14. package/build/__tests__/config.test.js +49 -0
  15. package/build/__tests__/config.test.js.map +1 -0
  16. package/build/__tests__/inbox-pr-mapper.test.d.ts +2 -0
  17. package/build/__tests__/inbox-pr-mapper.test.d.ts.map +1 -0
  18. package/build/__tests__/inbox-pr-mapper.test.js +304 -0
  19. package/build/__tests__/inbox-pr-mapper.test.js.map +1 -0
  20. package/build/__tests__/pr-changes-mapper.test.d.ts +2 -0
  21. package/build/__tests__/pr-changes-mapper.test.d.ts.map +1 -0
  22. package/build/__tests__/pr-changes-mapper.test.js +396 -0
  23. package/build/__tests__/pr-changes-mapper.test.js.map +1 -0
  24. package/build/__tests__/pr-comment-mapper.test.d.ts +2 -0
  25. package/build/__tests__/pr-comment-mapper.test.d.ts.map +1 -0
  26. package/build/__tests__/pr-comment-mapper.test.js +490 -0
  27. package/build/__tests__/pr-comment-mapper.test.js.map +1 -0
  28. package/build/bitbucket-client/core/ApiError.d.ts +11 -0
  29. package/build/bitbucket-client/core/ApiError.d.ts.map +1 -0
  30. package/build/bitbucket-client/core/ApiError.js +17 -0
  31. package/build/bitbucket-client/core/ApiError.js.map +1 -0
  32. package/build/bitbucket-client/core/ApiRequestOptions.d.ts +14 -0
  33. package/build/bitbucket-client/core/ApiRequestOptions.d.ts.map +1 -0
  34. package/build/bitbucket-client/core/ApiRequestOptions.js +2 -0
  35. package/build/bitbucket-client/core/ApiRequestOptions.js.map +1 -0
  36. package/build/bitbucket-client/core/ApiResult.d.ts +8 -0
  37. package/build/bitbucket-client/core/ApiResult.d.ts.map +1 -0
  38. package/build/bitbucket-client/core/ApiResult.js +2 -0
  39. package/build/bitbucket-client/core/ApiResult.js.map +1 -0
  40. package/build/bitbucket-client/core/CancelablePromise.d.ts +21 -0
  41. package/build/bitbucket-client/core/CancelablePromise.d.ts.map +1 -0
  42. package/build/bitbucket-client/core/CancelablePromise.js +100 -0
  43. package/build/bitbucket-client/core/CancelablePromise.js.map +1 -0
  44. package/build/bitbucket-client/core/OpenAPI.d.ts +17 -0
  45. package/build/bitbucket-client/core/OpenAPI.d.ts.map +1 -0
  46. package/build/bitbucket-client/core/OpenAPI.js +12 -0
  47. package/build/bitbucket-client/core/OpenAPI.js.map +1 -0
  48. package/build/bitbucket-client/core/request.d.ts +31 -0
  49. package/build/bitbucket-client/core/request.d.ts.map +1 -0
  50. package/build/bitbucket-client/core/request.js +292 -0
  51. package/build/bitbucket-client/core/request.js.map +1 -0
  52. package/build/bitbucket-client/index.d.ts +297 -0
  53. package/build/bitbucket-client/index.d.ts.map +1 -0
  54. package/build/bitbucket-client/index.js +44 -0
  55. package/build/bitbucket-client/index.js.map +1 -0
  56. package/build/bitbucket-client/models/AdminPasswordUpdate.d.ts +6 -0
  57. package/build/bitbucket-client/models/AdminPasswordUpdate.d.ts.map +1 -0
  58. package/build/bitbucket-client/models/AdminPasswordUpdate.js +2 -0
  59. package/build/bitbucket-client/models/AdminPasswordUpdate.js.map +1 -0
  60. package/build/bitbucket-client/models/ApplicationId.d.ts +2 -0
  61. package/build/bitbucket-client/models/ApplicationId.d.ts.map +1 -0
  62. package/build/bitbucket-client/models/ApplicationId.js +2 -0
  63. package/build/bitbucket-client/models/ApplicationId.js.map +1 -0
  64. package/build/bitbucket-client/models/ApplicationUser.d.ts +2 -0
  65. package/build/bitbucket-client/models/ApplicationUser.d.ts.map +1 -0
  66. package/build/bitbucket-client/models/ApplicationUser.js +2 -0
  67. package/build/bitbucket-client/models/ApplicationUser.js.map +1 -0
  68. package/build/bitbucket-client/models/AuthenticationEntity.d.ts +9 -0
  69. package/build/bitbucket-client/models/AuthenticationEntity.d.ts.map +1 -0
  70. package/build/bitbucket-client/models/AuthenticationEntity.js +2 -0
  71. package/build/bitbucket-client/models/AuthenticationEntity.js.map +1 -0
  72. package/build/bitbucket-client/models/AuthenticationResponse.d.ts +2 -0
  73. package/build/bitbucket-client/models/AuthenticationResponse.d.ts.map +1 -0
  74. package/build/bitbucket-client/models/AuthenticationResponse.js +2 -0
  75. package/build/bitbucket-client/models/AuthenticationResponse.js.map +1 -0
  76. package/build/bitbucket-client/models/BasicAuthConfigEntity.d.ts +2 -0
  77. package/build/bitbucket-client/models/BasicAuthConfigEntity.d.ts.map +1 -0
  78. package/build/bitbucket-client/models/BasicAuthConfigEntity.js +2 -0
  79. package/build/bitbucket-client/models/BasicAuthConfigEntity.js.map +1 -0
  80. package/build/bitbucket-client/models/CaptchaDataEntity.d.ts +2 -0
  81. package/build/bitbucket-client/models/CaptchaDataEntity.d.ts.map +1 -0
  82. package/build/bitbucket-client/models/CaptchaDataEntity.js +2 -0
  83. package/build/bitbucket-client/models/CaptchaDataEntity.js.map +1 -0
  84. package/build/bitbucket-client/models/Comment.d.ts +33 -0
  85. package/build/bitbucket-client/models/Comment.d.ts.map +1 -0
  86. package/build/bitbucket-client/models/Comment.js +15 -0
  87. package/build/bitbucket-client/models/Comment.js.map +1 -0
  88. package/build/bitbucket-client/models/CommentOperations.d.ts +6 -0
  89. package/build/bitbucket-client/models/CommentOperations.d.ts.map +1 -0
  90. package/build/bitbucket-client/models/CommentOperations.js +2 -0
  91. package/build/bitbucket-client/models/CommentOperations.js.map +1 -0
  92. package/build/bitbucket-client/models/CommentThread.d.ts +17 -0
  93. package/build/bitbucket-client/models/CommentThread.d.ts.map +1 -0
  94. package/build/bitbucket-client/models/CommentThread.js +2 -0
  95. package/build/bitbucket-client/models/CommentThread.js.map +1 -0
  96. package/build/bitbucket-client/models/CommentThreadDiffAnchor.d.ts +41 -0
  97. package/build/bitbucket-client/models/CommentThreadDiffAnchor.d.ts.map +1 -0
  98. package/build/bitbucket-client/models/CommentThreadDiffAnchor.js +27 -0
  99. package/build/bitbucket-client/models/CommentThreadDiffAnchor.js.map +1 -0
  100. package/build/bitbucket-client/models/Commentable.d.ts +2 -0
  101. package/build/bitbucket-client/models/Commentable.d.ts.map +1 -0
  102. package/build/bitbucket-client/models/Commentable.js +2 -0
  103. package/build/bitbucket-client/models/Commentable.js.map +1 -0
  104. package/build/bitbucket-client/models/Context.d.ts +4 -0
  105. package/build/bitbucket-client/models/Context.d.ts.map +1 -0
  106. package/build/bitbucket-client/models/Context.js +2 -0
  107. package/build/bitbucket-client/models/Context.js.map +1 -0
  108. package/build/bitbucket-client/models/ConversationDTO.d.ts +4 -0
  109. package/build/bitbucket-client/models/ConversationDTO.d.ts.map +1 -0
  110. package/build/bitbucket-client/models/ConversationDTO.js +2 -0
  111. package/build/bitbucket-client/models/ConversationDTO.js.map +1 -0
  112. package/build/bitbucket-client/models/Credentials.d.ts +5 -0
  113. package/build/bitbucket-client/models/Credentials.d.ts.map +1 -0
  114. package/build/bitbucket-client/models/Credentials.js +2 -0
  115. package/build/bitbucket-client/models/Credentials.js.map +1 -0
  116. package/build/bitbucket-client/models/CredentialsCheckFailedDTO.d.ts +2 -0
  117. package/build/bitbucket-client/models/CredentialsCheckFailedDTO.d.ts.map +1 -0
  118. package/build/bitbucket-client/models/CredentialsCheckFailedDTO.js +2 -0
  119. package/build/bitbucket-client/models/CredentialsCheckFailedDTO.js.map +1 -0
  120. package/build/bitbucket-client/models/DiffContentFilter.d.ts +2 -0
  121. package/build/bitbucket-client/models/DiffContentFilter.d.ts.map +1 -0
  122. package/build/bitbucket-client/models/DiffContentFilter.js +2 -0
  123. package/build/bitbucket-client/models/DiffContentFilter.js.map +1 -0
  124. package/build/bitbucket-client/models/ElevationMethodRestDTO.d.ts +2 -0
  125. package/build/bitbucket-client/models/ElevationMethodRestDTO.d.ts.map +1 -0
  126. package/build/bitbucket-client/models/ElevationMethodRestDTO.js +2 -0
  127. package/build/bitbucket-client/models/ElevationMethodRestDTO.js.map +1 -0
  128. package/build/bitbucket-client/models/EnrichedRepository.d.ts +2 -0
  129. package/build/bitbucket-client/models/EnrichedRepository.d.ts.map +1 -0
  130. package/build/bitbucket-client/models/EnrichedRepository.js +2 -0
  131. package/build/bitbucket-client/models/EnrichedRepository.js.map +1 -0
  132. package/build/bitbucket-client/models/ErrorEntity.d.ts +2 -0
  133. package/build/bitbucket-client/models/ErrorEntity.d.ts.map +1 -0
  134. package/build/bitbucket-client/models/ErrorEntity.js +2 -0
  135. package/build/bitbucket-client/models/ErrorEntity.js.map +1 -0
  136. package/build/bitbucket-client/models/ExampleAvatarMultipartFormData.d.ts +7 -0
  137. package/build/bitbucket-client/models/ExampleAvatarMultipartFormData.d.ts.map +1 -0
  138. package/build/bitbucket-client/models/ExampleAvatarMultipartFormData.js +2 -0
  139. package/build/bitbucket-client/models/ExampleAvatarMultipartFormData.js.map +1 -0
  140. package/build/bitbucket-client/models/ExampleCertificateMultipartFormData.d.ts +7 -0
  141. package/build/bitbucket-client/models/ExampleCertificateMultipartFormData.d.ts.map +1 -0
  142. package/build/bitbucket-client/models/ExampleCertificateMultipartFormData.js +2 -0
  143. package/build/bitbucket-client/models/ExampleCertificateMultipartFormData.js.map +1 -0
  144. package/build/bitbucket-client/models/ExampleFiles.d.ts +2 -0
  145. package/build/bitbucket-client/models/ExampleFiles.d.ts.map +1 -0
  146. package/build/bitbucket-client/models/ExampleFiles.js +2 -0
  147. package/build/bitbucket-client/models/ExampleFiles.js.map +1 -0
  148. package/build/bitbucket-client/models/ExampleJsonLastModifiedCallback.d.ts +2 -0
  149. package/build/bitbucket-client/models/ExampleJsonLastModifiedCallback.d.ts.map +1 -0
  150. package/build/bitbucket-client/models/ExampleJsonLastModifiedCallback.js +2 -0
  151. package/build/bitbucket-client/models/ExampleJsonLastModifiedCallback.js.map +1 -0
  152. package/build/bitbucket-client/models/ExampleMultipartFormData.d.ts +23 -0
  153. package/build/bitbucket-client/models/ExampleMultipartFormData.d.ts.map +1 -0
  154. package/build/bitbucket-client/models/ExampleMultipartFormData.js +2 -0
  155. package/build/bitbucket-client/models/ExampleMultipartFormData.js.map +1 -0
  156. package/build/bitbucket-client/models/ExamplePostMultipartFormData.d.ts +19 -0
  157. package/build/bitbucket-client/models/ExamplePostMultipartFormData.d.ts.map +1 -0
  158. package/build/bitbucket-client/models/ExamplePostMultipartFormData.js +2 -0
  159. package/build/bitbucket-client/models/ExamplePostMultipartFormData.js.map +1 -0
  160. package/build/bitbucket-client/models/ExamplePreviewMigration.d.ts +2 -0
  161. package/build/bitbucket-client/models/ExamplePreviewMigration.d.ts.map +1 -0
  162. package/build/bitbucket-client/models/ExamplePreviewMigration.js +2 -0
  163. package/build/bitbucket-client/models/ExamplePreviewMigration.js.map +1 -0
  164. package/build/bitbucket-client/models/ExamplePutMultipartFormData.d.ts +15 -0
  165. package/build/bitbucket-client/models/ExamplePutMultipartFormData.d.ts.map +1 -0
  166. package/build/bitbucket-client/models/ExamplePutMultipartFormData.js +2 -0
  167. package/build/bitbucket-client/models/ExamplePutMultipartFormData.js.map +1 -0
  168. package/build/bitbucket-client/models/ExampleRequirements.d.ts +2 -0
  169. package/build/bitbucket-client/models/ExampleRequirements.d.ts.map +1 -0
  170. package/build/bitbucket-client/models/ExampleRequirements.js +2 -0
  171. package/build/bitbucket-client/models/ExampleRequirements.js.map +1 -0
  172. package/build/bitbucket-client/models/ExampleSettings.d.ts +2 -0
  173. package/build/bitbucket-client/models/ExampleSettings.d.ts.map +1 -0
  174. package/build/bitbucket-client/models/ExampleSettings.js +2 -0
  175. package/build/bitbucket-client/models/ExampleSettings.js.map +1 -0
  176. package/build/bitbucket-client/models/ExampleSettingsMap.d.ts +2 -0
  177. package/build/bitbucket-client/models/ExampleSettingsMap.d.ts.map +1 -0
  178. package/build/bitbucket-client/models/ExampleSettingsMap.js +2 -0
  179. package/build/bitbucket-client/models/ExampleSettingsMap.js.map +1 -0
  180. package/build/bitbucket-client/models/ExampleSocketAddress.d.ts +2 -0
  181. package/build/bitbucket-client/models/ExampleSocketAddress.d.ts.map +1 -0
  182. package/build/bitbucket-client/models/ExampleSocketAddress.js +2 -0
  183. package/build/bitbucket-client/models/ExampleSocketAddress.js.map +1 -0
  184. package/build/bitbucket-client/models/ExampleStatus.d.ts +2 -0
  185. package/build/bitbucket-client/models/ExampleStatus.d.ts.map +1 -0
  186. package/build/bitbucket-client/models/ExampleStatus.js +2 -0
  187. package/build/bitbucket-client/models/ExampleStatus.js.map +1 -0
  188. package/build/bitbucket-client/models/FileListResource.d.ts +2 -0
  189. package/build/bitbucket-client/models/FileListResource.d.ts.map +1 -0
  190. package/build/bitbucket-client/models/FileListResource.js +2 -0
  191. package/build/bitbucket-client/models/FileListResource.js.map +1 -0
  192. package/build/bitbucket-client/models/FilePart.d.ts +9 -0
  193. package/build/bitbucket-client/models/FilePart.d.ts.map +1 -0
  194. package/build/bitbucket-client/models/FilePart.js +2 -0
  195. package/build/bitbucket-client/models/FilePart.js.map +1 -0
  196. package/build/bitbucket-client/models/Group.d.ts +2 -0
  197. package/build/bitbucket-client/models/Group.d.ts.map +1 -0
  198. package/build/bitbucket-client/models/Group.js +2 -0
  199. package/build/bitbucket-client/models/Group.js.map +1 -0
  200. package/build/bitbucket-client/models/GroupAndUsers.d.ts +5 -0
  201. package/build/bitbucket-client/models/GroupAndUsers.d.ts.map +1 -0
  202. package/build/bitbucket-client/models/GroupAndUsers.js +2 -0
  203. package/build/bitbucket-client/models/GroupAndUsers.js.map +1 -0
  204. package/build/bitbucket-client/models/GroupPickerContext.d.ts +5 -0
  205. package/build/bitbucket-client/models/GroupPickerContext.d.ts.map +1 -0
  206. package/build/bitbucket-client/models/GroupPickerContext.js +2 -0
  207. package/build/bitbucket-client/models/GroupPickerContext.js.map +1 -0
  208. package/build/bitbucket-client/models/IdpConfigEntity.d.ts +2 -0
  209. package/build/bitbucket-client/models/IdpConfigEntity.d.ts.map +1 -0
  210. package/build/bitbucket-client/models/IdpConfigEntity.js +2 -0
  211. package/build/bitbucket-client/models/IdpConfigEntity.js.map +1 -0
  212. package/build/bitbucket-client/models/JitConfigEntity.d.ts +2 -0
  213. package/build/bitbucket-client/models/JitConfigEntity.d.ts.map +1 -0
  214. package/build/bitbucket-client/models/JitConfigEntity.js +2 -0
  215. package/build/bitbucket-client/models/JitConfigEntity.js.map +1 -0
  216. package/build/bitbucket-client/models/JitUserEntity.d.ts +2 -0
  217. package/build/bitbucket-client/models/JitUserEntity.d.ts.map +1 -0
  218. package/build/bitbucket-client/models/JitUserEntity.js +2 -0
  219. package/build/bitbucket-client/models/JitUserEntity.js.map +1 -0
  220. package/build/bitbucket-client/models/LineNumberRange.d.ts +6 -0
  221. package/build/bitbucket-client/models/LineNumberRange.d.ts.map +1 -0
  222. package/build/bitbucket-client/models/LineNumberRange.js +2 -0
  223. package/build/bitbucket-client/models/LineNumberRange.js.map +1 -0
  224. package/build/bitbucket-client/models/LoginOptionEntity.d.ts +2 -0
  225. package/build/bitbucket-client/models/LoginOptionEntity.d.ts.map +1 -0
  226. package/build/bitbucket-client/models/LoginOptionEntity.js +2 -0
  227. package/build/bitbucket-client/models/LoginOptionEntity.js.map +1 -0
  228. package/build/bitbucket-client/models/MethodStateDTO.d.ts +2 -0
  229. package/build/bitbucket-client/models/MethodStateDTO.d.ts.map +1 -0
  230. package/build/bitbucket-client/models/MethodStateDTO.js +2 -0
  231. package/build/bitbucket-client/models/MethodStateDTO.js.map +1 -0
  232. package/build/bitbucket-client/models/NextLoginStepDTO.d.ts +2 -0
  233. package/build/bitbucket-client/models/NextLoginStepDTO.d.ts.map +1 -0
  234. package/build/bitbucket-client/models/NextLoginStepDTO.js +2 -0
  235. package/build/bitbucket-client/models/NextLoginStepDTO.js.map +1 -0
  236. package/build/bitbucket-client/models/OptionalBodyBeanParam.d.ts +2 -0
  237. package/build/bitbucket-client/models/OptionalBodyBeanParam.d.ts.map +1 -0
  238. package/build/bitbucket-client/models/OptionalBodyBeanParam.js +2 -0
  239. package/build/bitbucket-client/models/OptionalBodyBeanParam.js.map +1 -0
  240. package/build/bitbucket-client/models/PageRequestImpl.d.ts +5 -0
  241. package/build/bitbucket-client/models/PageRequestImpl.d.ts.map +1 -0
  242. package/build/bitbucket-client/models/PageRequestImpl.js +2 -0
  243. package/build/bitbucket-client/models/PageRequestImpl.js.map +1 -0
  244. package/build/bitbucket-client/models/PasswordElevationRestDTO.d.ts +4 -0
  245. package/build/bitbucket-client/models/PasswordElevationRestDTO.d.ts.map +1 -0
  246. package/build/bitbucket-client/models/PasswordElevationRestDTO.js +2 -0
  247. package/build/bitbucket-client/models/PasswordElevationRestDTO.js.map +1 -0
  248. package/build/bitbucket-client/models/Project.d.ts +15 -0
  249. package/build/bitbucket-client/models/Project.d.ts.map +1 -0
  250. package/build/bitbucket-client/models/Project.js +9 -0
  251. package/build/bitbucket-client/models/Project.js.map +1 -0
  252. package/build/bitbucket-client/models/PropertyMap.d.ts +2 -0
  253. package/build/bitbucket-client/models/PropertyMap.d.ts.map +1 -0
  254. package/build/bitbucket-client/models/PropertyMap.js +2 -0
  255. package/build/bitbucket-client/models/PropertyMap.js.map +1 -0
  256. package/build/bitbucket-client/models/PullRequest.d.ts +31 -0
  257. package/build/bitbucket-client/models/PullRequest.d.ts.map +1 -0
  258. package/build/bitbucket-client/models/PullRequest.js +10 -0
  259. package/build/bitbucket-client/models/PullRequest.js.map +1 -0
  260. package/build/bitbucket-client/models/PullRequestParticipant.d.ts +23 -0
  261. package/build/bitbucket-client/models/PullRequestParticipant.d.ts.map +1 -0
  262. package/build/bitbucket-client/models/PullRequestParticipant.js +16 -0
  263. package/build/bitbucket-client/models/PullRequestParticipant.js.map +1 -0
  264. package/build/bitbucket-client/models/PullRequestRef.d.ts +10 -0
  265. package/build/bitbucket-client/models/PullRequestRef.d.ts.map +1 -0
  266. package/build/bitbucket-client/models/PullRequestRef.js +2 -0
  267. package/build/bitbucket-client/models/PullRequestRef.js.map +1 -0
  268. package/build/bitbucket-client/models/RefType.d.ts +2 -0
  269. package/build/bitbucket-client/models/RefType.d.ts.map +1 -0
  270. package/build/bitbucket-client/models/RefType.js +2 -0
  271. package/build/bitbucket-client/models/RefType.js.map +1 -0
  272. package/build/bitbucket-client/models/Repository.d.ts +31 -0
  273. package/build/bitbucket-client/models/Repository.d.ts.map +1 -0
  274. package/build/bitbucket-client/models/Repository.js +11 -0
  275. package/build/bitbucket-client/models/Repository.js.map +1 -0
  276. package/build/bitbucket-client/models/RepositoryHookDetails.d.ts +2 -0
  277. package/build/bitbucket-client/models/RepositoryHookDetails.d.ts.map +1 -0
  278. package/build/bitbucket-client/models/RepositoryHookDetails.js +2 -0
  279. package/build/bitbucket-client/models/RepositoryHookDetails.js.map +1 -0
  280. package/build/bitbucket-client/models/RestAccessToken.d.ts +2 -0
  281. package/build/bitbucket-client/models/RestAccessToken.d.ts.map +1 -0
  282. package/build/bitbucket-client/models/RestAccessToken.js +2 -0
  283. package/build/bitbucket-client/models/RestAccessToken.js.map +1 -0
  284. package/build/bitbucket-client/models/RestAccessTokenRequest.d.ts +6 -0
  285. package/build/bitbucket-client/models/RestAccessTokenRequest.d.ts.map +1 -0
  286. package/build/bitbucket-client/models/RestAccessTokenRequest.js +2 -0
  287. package/build/bitbucket-client/models/RestAccessTokenRequest.js.map +1 -0
  288. package/build/bitbucket-client/models/RestAggregateRejectCounter.d.ts +2 -0
  289. package/build/bitbucket-client/models/RestAggregateRejectCounter.d.ts.map +1 -0
  290. package/build/bitbucket-client/models/RestAggregateRejectCounter.js +2 -0
  291. package/build/bitbucket-client/models/RestAggregateRejectCounter.js.map +1 -0
  292. package/build/bitbucket-client/models/RestAnalyticsSettings.d.ts +2 -0
  293. package/build/bitbucket-client/models/RestAnalyticsSettings.d.ts.map +1 -0
  294. package/build/bitbucket-client/models/RestAnalyticsSettings.js +2 -0
  295. package/build/bitbucket-client/models/RestAnalyticsSettings.js.map +1 -0
  296. package/build/bitbucket-client/models/RestAnnouncementBanner.d.ts +2 -0
  297. package/build/bitbucket-client/models/RestAnnouncementBanner.d.ts.map +1 -0
  298. package/build/bitbucket-client/models/RestAnnouncementBanner.js +2 -0
  299. package/build/bitbucket-client/models/RestAnnouncementBanner.js.map +1 -0
  300. package/build/bitbucket-client/models/RestApplicationProperties.d.ts +2 -0
  301. package/build/bitbucket-client/models/RestApplicationProperties.d.ts.map +1 -0
  302. package/build/bitbucket-client/models/RestApplicationProperties.js +2 -0
  303. package/build/bitbucket-client/models/RestApplicationProperties.js.map +1 -0
  304. package/build/bitbucket-client/models/RestApplicationUser.d.ts +2 -0
  305. package/build/bitbucket-client/models/RestApplicationUser.d.ts.map +1 -0
  306. package/build/bitbucket-client/models/RestApplicationUser.js +2 -0
  307. package/build/bitbucket-client/models/RestApplicationUser.js.map +1 -0
  308. package/build/bitbucket-client/models/RestApplicationUserWithPermissions.d.ts +2 -0
  309. package/build/bitbucket-client/models/RestApplicationUserWithPermissions.d.ts.map +1 -0
  310. package/build/bitbucket-client/models/RestApplicationUserWithPermissions.js +2 -0
  311. package/build/bitbucket-client/models/RestApplicationUserWithPermissions.js.map +1 -0
  312. package/build/bitbucket-client/models/RestApplySuggestionRequest.d.ts +7 -0
  313. package/build/bitbucket-client/models/RestApplySuggestionRequest.d.ts.map +1 -0
  314. package/build/bitbucket-client/models/RestApplySuggestionRequest.js +2 -0
  315. package/build/bitbucket-client/models/RestApplySuggestionRequest.js.map +1 -0
  316. package/build/bitbucket-client/models/RestAttachmentMetadata.d.ts +2 -0
  317. package/build/bitbucket-client/models/RestAttachmentMetadata.d.ts.map +1 -0
  318. package/build/bitbucket-client/models/RestAttachmentMetadata.js +2 -0
  319. package/build/bitbucket-client/models/RestAttachmentMetadata.js.map +1 -0
  320. package/build/bitbucket-client/models/RestAuthenticationRequest.d.ts +6 -0
  321. package/build/bitbucket-client/models/RestAuthenticationRequest.d.ts.map +1 -0
  322. package/build/bitbucket-client/models/RestAuthenticationRequest.js +2 -0
  323. package/build/bitbucket-client/models/RestAuthenticationRequest.js.map +1 -0
  324. package/build/bitbucket-client/models/RestAutoDeclineSettings.d.ts +2 -0
  325. package/build/bitbucket-client/models/RestAutoDeclineSettings.d.ts.map +1 -0
  326. package/build/bitbucket-client/models/RestAutoDeclineSettings.js +2 -0
  327. package/build/bitbucket-client/models/RestAutoDeclineSettings.js.map +1 -0
  328. package/build/bitbucket-client/models/RestAutoDeclineSettingsRequest.d.ts +5 -0
  329. package/build/bitbucket-client/models/RestAutoDeclineSettingsRequest.d.ts.map +1 -0
  330. package/build/bitbucket-client/models/RestAutoDeclineSettingsRequest.js +2 -0
  331. package/build/bitbucket-client/models/RestAutoDeclineSettingsRequest.js.map +1 -0
  332. package/build/bitbucket-client/models/RestAutoMergeProcessingResult.d.ts +2 -0
  333. package/build/bitbucket-client/models/RestAutoMergeProcessingResult.d.ts.map +1 -0
  334. package/build/bitbucket-client/models/RestAutoMergeProcessingResult.js +2 -0
  335. package/build/bitbucket-client/models/RestAutoMergeProcessingResult.js.map +1 -0
  336. package/build/bitbucket-client/models/RestAutoMergeProjectSettingsRequest.d.ts +12 -0
  337. package/build/bitbucket-client/models/RestAutoMergeProjectSettingsRequest.d.ts.map +1 -0
  338. package/build/bitbucket-client/models/RestAutoMergeProjectSettingsRequest.js +10 -0
  339. package/build/bitbucket-client/models/RestAutoMergeProjectSettingsRequest.js.map +1 -0
  340. package/build/bitbucket-client/models/RestAutoMergeRequest.d.ts +2 -0
  341. package/build/bitbucket-client/models/RestAutoMergeRequest.d.ts.map +1 -0
  342. package/build/bitbucket-client/models/RestAutoMergeRequest.js +2 -0
  343. package/build/bitbucket-client/models/RestAutoMergeRequest.js.map +1 -0
  344. package/build/bitbucket-client/models/RestAutoMergeRestrictedSettings.d.ts +2 -0
  345. package/build/bitbucket-client/models/RestAutoMergeRestrictedSettings.d.ts.map +1 -0
  346. package/build/bitbucket-client/models/RestAutoMergeRestrictedSettings.js +2 -0
  347. package/build/bitbucket-client/models/RestAutoMergeRestrictedSettings.js.map +1 -0
  348. package/build/bitbucket-client/models/RestAutoMergeSettingsRequest.d.ts +4 -0
  349. package/build/bitbucket-client/models/RestAutoMergeSettingsRequest.d.ts.map +1 -0
  350. package/build/bitbucket-client/models/RestAutoMergeSettingsRequest.js +2 -0
  351. package/build/bitbucket-client/models/RestAutoMergeSettingsRequest.js.map +1 -0
  352. package/build/bitbucket-client/models/RestBearerTokenCredentials.d.ts +4 -0
  353. package/build/bitbucket-client/models/RestBearerTokenCredentials.d.ts.map +1 -0
  354. package/build/bitbucket-client/models/RestBearerTokenCredentials.js +2 -0
  355. package/build/bitbucket-client/models/RestBearerTokenCredentials.js.map +1 -0
  356. package/build/bitbucket-client/models/RestBitbucketLicense.d.ts +2 -0
  357. package/build/bitbucket-client/models/RestBitbucketLicense.d.ts.map +1 -0
  358. package/build/bitbucket-client/models/RestBitbucketLicense.js +2 -0
  359. package/build/bitbucket-client/models/RestBitbucketLicense.js.map +1 -0
  360. package/build/bitbucket-client/models/RestBranch.d.ts +2 -0
  361. package/build/bitbucket-client/models/RestBranch.d.ts.map +1 -0
  362. package/build/bitbucket-client/models/RestBranch.js +2 -0
  363. package/build/bitbucket-client/models/RestBranch.js.map +1 -0
  364. package/build/bitbucket-client/models/RestBranchCreateRequest.d.ts +11 -0
  365. package/build/bitbucket-client/models/RestBranchCreateRequest.d.ts.map +1 -0
  366. package/build/bitbucket-client/models/RestBranchCreateRequest.js +2 -0
  367. package/build/bitbucket-client/models/RestBranchCreateRequest.js.map +1 -0
  368. package/build/bitbucket-client/models/RestBranchDeleteRequest.d.ts +15 -0
  369. package/build/bitbucket-client/models/RestBranchDeleteRequest.d.ts.map +1 -0
  370. package/build/bitbucket-client/models/RestBranchDeleteRequest.js +2 -0
  371. package/build/bitbucket-client/models/RestBranchDeleteRequest.js.map +1 -0
  372. package/build/bitbucket-client/models/RestBuildCapabilities.d.ts +2 -0
  373. package/build/bitbucket-client/models/RestBuildCapabilities.d.ts.map +1 -0
  374. package/build/bitbucket-client/models/RestBuildCapabilities.js +2 -0
  375. package/build/bitbucket-client/models/RestBuildCapabilities.js.map +1 -0
  376. package/build/bitbucket-client/models/RestBuildStats.d.ts +2 -0
  377. package/build/bitbucket-client/models/RestBuildStats.d.ts.map +1 -0
  378. package/build/bitbucket-client/models/RestBuildStats.js +2 -0
  379. package/build/bitbucket-client/models/RestBuildStats.js.map +1 -0
  380. package/build/bitbucket-client/models/RestBuildStatus.d.ts +2 -0
  381. package/build/bitbucket-client/models/RestBuildStatus.d.ts.map +1 -0
  382. package/build/bitbucket-client/models/RestBuildStatus.js +2 -0
  383. package/build/bitbucket-client/models/RestBuildStatus.js.map +1 -0
  384. package/build/bitbucket-client/models/RestBuildStatusSetRequest.d.ts +27 -0
  385. package/build/bitbucket-client/models/RestBuildStatusSetRequest.d.ts.map +1 -0
  386. package/build/bitbucket-client/models/RestBuildStatusSetRequest.js +12 -0
  387. package/build/bitbucket-client/models/RestBuildStatusSetRequest.js.map +1 -0
  388. package/build/bitbucket-client/models/RestBulkAddInsightAnnotationRequest.d.ts +5 -0
  389. package/build/bitbucket-client/models/RestBulkAddInsightAnnotationRequest.d.ts.map +1 -0
  390. package/build/bitbucket-client/models/RestBulkAddInsightAnnotationRequest.js +2 -0
  391. package/build/bitbucket-client/models/RestBulkAddInsightAnnotationRequest.js.map +1 -0
  392. package/build/bitbucket-client/models/RestBulkUserRateLimitSettingsUpdateRequest.d.ts +9 -0
  393. package/build/bitbucket-client/models/RestBulkUserRateLimitSettingsUpdateRequest.d.ts.map +1 -0
  394. package/build/bitbucket-client/models/RestBulkUserRateLimitSettingsUpdateRequest.js +2 -0
  395. package/build/bitbucket-client/models/RestBulkUserRateLimitSettingsUpdateRequest.js.map +1 -0
  396. package/build/bitbucket-client/models/RestChange.d.ts +2 -0
  397. package/build/bitbucket-client/models/RestChange.d.ts.map +1 -0
  398. package/build/bitbucket-client/models/RestChange.js +2 -0
  399. package/build/bitbucket-client/models/RestChange.js.map +1 -0
  400. package/build/bitbucket-client/models/RestChangeset.d.ts +2 -0
  401. package/build/bitbucket-client/models/RestChangeset.d.ts.map +1 -0
  402. package/build/bitbucket-client/models/RestChangeset.js +2 -0
  403. package/build/bitbucket-client/models/RestChangeset.js.map +1 -0
  404. package/build/bitbucket-client/models/RestClusterInformation.d.ts +2 -0
  405. package/build/bitbucket-client/models/RestClusterInformation.d.ts.map +1 -0
  406. package/build/bitbucket-client/models/RestClusterInformation.js +2 -0
  407. package/build/bitbucket-client/models/RestClusterInformation.js.map +1 -0
  408. package/build/bitbucket-client/models/RestClusterNode.d.ts +2 -0
  409. package/build/bitbucket-client/models/RestClusterNode.d.ts.map +1 -0
  410. package/build/bitbucket-client/models/RestClusterNode.js +2 -0
  411. package/build/bitbucket-client/models/RestClusterNode.js.map +1 -0
  412. package/build/bitbucket-client/models/RestComment.d.ts +2 -0
  413. package/build/bitbucket-client/models/RestComment.d.ts.map +1 -0
  414. package/build/bitbucket-client/models/RestComment.js +2 -0
  415. package/build/bitbucket-client/models/RestComment.js.map +1 -0
  416. package/build/bitbucket-client/models/RestCommentJiraIssue.d.ts +2 -0
  417. package/build/bitbucket-client/models/RestCommentJiraIssue.d.ts.map +1 -0
  418. package/build/bitbucket-client/models/RestCommentJiraIssue.js +2 -0
  419. package/build/bitbucket-client/models/RestCommentJiraIssue.js.map +1 -0
  420. package/build/bitbucket-client/models/RestCommentThreadDiffAnchor.d.ts +2 -0
  421. package/build/bitbucket-client/models/RestCommentThreadDiffAnchor.d.ts.map +1 -0
  422. package/build/bitbucket-client/models/RestCommentThreadDiffAnchor.js +2 -0
  423. package/build/bitbucket-client/models/RestCommentThreadDiffAnchor.js.map +1 -0
  424. package/build/bitbucket-client/models/RestCommit.d.ts +2 -0
  425. package/build/bitbucket-client/models/RestCommit.d.ts.map +1 -0
  426. package/build/bitbucket-client/models/RestCommit.js +2 -0
  427. package/build/bitbucket-client/models/RestCommit.js.map +1 -0
  428. package/build/bitbucket-client/models/RestCommitMessageSuggestion.d.ts +2 -0
  429. package/build/bitbucket-client/models/RestCommitMessageSuggestion.d.ts.map +1 -0
  430. package/build/bitbucket-client/models/RestCommitMessageSuggestion.js +2 -0
  431. package/build/bitbucket-client/models/RestCommitMessageSuggestion.js.map +1 -0
  432. package/build/bitbucket-client/models/RestConflict.d.ts +2 -0
  433. package/build/bitbucket-client/models/RestConflict.d.ts.map +1 -0
  434. package/build/bitbucket-client/models/RestConflict.js +2 -0
  435. package/build/bitbucket-client/models/RestConflict.js.map +1 -0
  436. package/build/bitbucket-client/models/RestConflictChange.d.ts +2 -0
  437. package/build/bitbucket-client/models/RestConflictChange.d.ts.map +1 -0
  438. package/build/bitbucket-client/models/RestConflictChange.js +2 -0
  439. package/build/bitbucket-client/models/RestConflictChange.js.map +1 -0
  440. package/build/bitbucket-client/models/RestConnectivitySummary.d.ts +2 -0
  441. package/build/bitbucket-client/models/RestConnectivitySummary.d.ts.map +1 -0
  442. package/build/bitbucket-client/models/RestConnectivitySummary.js +2 -0
  443. package/build/bitbucket-client/models/RestConnectivitySummary.js.map +1 -0
  444. package/build/bitbucket-client/models/RestCreateBranchRequest.d.ts +6 -0
  445. package/build/bitbucket-client/models/RestCreateBranchRequest.d.ts.map +1 -0
  446. package/build/bitbucket-client/models/RestCreateBranchRequest.js +2 -0
  447. package/build/bitbucket-client/models/RestCreateBranchRequest.js.map +1 -0
  448. package/build/bitbucket-client/models/RestCreateTagRequest.d.ts +6 -0
  449. package/build/bitbucket-client/models/RestCreateTagRequest.d.ts.map +1 -0
  450. package/build/bitbucket-client/models/RestCreateTagRequest.js +2 -0
  451. package/build/bitbucket-client/models/RestCreateTagRequest.js.map +1 -0
  452. package/build/bitbucket-client/models/RestDefaultBranch.d.ts +4 -0
  453. package/build/bitbucket-client/models/RestDefaultBranch.d.ts.map +1 -0
  454. package/build/bitbucket-client/models/RestDefaultBranch.js +2 -0
  455. package/build/bitbucket-client/models/RestDefaultBranch.js.map +1 -0
  456. package/build/bitbucket-client/models/RestDefaultReviewersRequest.d.ts +33 -0
  457. package/build/bitbucket-client/models/RestDefaultReviewersRequest.d.ts.map +1 -0
  458. package/build/bitbucket-client/models/RestDefaultReviewersRequest.js +12 -0
  459. package/build/bitbucket-client/models/RestDefaultReviewersRequest.js.map +1 -0
  460. package/build/bitbucket-client/models/RestDefaultTask.d.ts +2 -0
  461. package/build/bitbucket-client/models/RestDefaultTask.d.ts.map +1 -0
  462. package/build/bitbucket-client/models/RestDefaultTask.js +2 -0
  463. package/build/bitbucket-client/models/RestDefaultTask.js.map +1 -0
  464. package/build/bitbucket-client/models/RestDefaultTaskRequest.d.ts +29 -0
  465. package/build/bitbucket-client/models/RestDefaultTaskRequest.d.ts.map +1 -0
  466. package/build/bitbucket-client/models/RestDefaultTaskRequest.js +12 -0
  467. package/build/bitbucket-client/models/RestDefaultTaskRequest.js.map +1 -0
  468. package/build/bitbucket-client/models/RestDelayedSyncRepository.d.ts +6 -0
  469. package/build/bitbucket-client/models/RestDelayedSyncRepository.d.ts.map +1 -0
  470. package/build/bitbucket-client/models/RestDelayedSyncRepository.js +2 -0
  471. package/build/bitbucket-client/models/RestDelayedSyncRepository.js.map +1 -0
  472. package/build/bitbucket-client/models/RestDeployment.d.ts +2 -0
  473. package/build/bitbucket-client/models/RestDeployment.d.ts.map +1 -0
  474. package/build/bitbucket-client/models/RestDeployment.js +2 -0
  475. package/build/bitbucket-client/models/RestDeployment.js.map +1 -0
  476. package/build/bitbucket-client/models/RestDeploymentEnvironment.d.ts +2 -0
  477. package/build/bitbucket-client/models/RestDeploymentEnvironment.d.ts.map +1 -0
  478. package/build/bitbucket-client/models/RestDeploymentEnvironment.js +2 -0
  479. package/build/bitbucket-client/models/RestDeploymentEnvironment.js.map +1 -0
  480. package/build/bitbucket-client/models/RestDeploymentSetRequest.d.ts +23 -0
  481. package/build/bitbucket-client/models/RestDeploymentSetRequest.d.ts.map +1 -0
  482. package/build/bitbucket-client/models/RestDeploymentSetRequest.js +14 -0
  483. package/build/bitbucket-client/models/RestDeploymentSetRequest.js.map +1 -0
  484. package/build/bitbucket-client/models/RestDetailedGroup.d.ts +2 -0
  485. package/build/bitbucket-client/models/RestDetailedGroup.d.ts.map +1 -0
  486. package/build/bitbucket-client/models/RestDetailedGroup.js +2 -0
  487. package/build/bitbucket-client/models/RestDetailedGroup.js.map +1 -0
  488. package/build/bitbucket-client/models/RestDetailedInvocation.d.ts +2 -0
  489. package/build/bitbucket-client/models/RestDetailedInvocation.d.ts.map +1 -0
  490. package/build/bitbucket-client/models/RestDetailedInvocation.js +2 -0
  491. package/build/bitbucket-client/models/RestDetailedInvocation.js.map +1 -0
  492. package/build/bitbucket-client/models/RestDetailedUser.d.ts +2 -0
  493. package/build/bitbucket-client/models/RestDetailedUser.d.ts.map +1 -0
  494. package/build/bitbucket-client/models/RestDetailedUser.js +2 -0
  495. package/build/bitbucket-client/models/RestDetailedUser.js.map +1 -0
  496. package/build/bitbucket-client/models/RestDiff.d.ts +2 -0
  497. package/build/bitbucket-client/models/RestDiff.d.ts.map +1 -0
  498. package/build/bitbucket-client/models/RestDiff.js +2 -0
  499. package/build/bitbucket-client/models/RestDiff.js.map +1 -0
  500. package/build/bitbucket-client/models/RestDiffHunk.d.ts +2 -0
  501. package/build/bitbucket-client/models/RestDiffHunk.d.ts.map +1 -0
  502. package/build/bitbucket-client/models/RestDiffHunk.js +2 -0
  503. package/build/bitbucket-client/models/RestDiffHunk.js.map +1 -0
  504. package/build/bitbucket-client/models/RestDiffLine.d.ts +2 -0
  505. package/build/bitbucket-client/models/RestDiffLine.d.ts.map +1 -0
  506. package/build/bitbucket-client/models/RestDiffLine.js +2 -0
  507. package/build/bitbucket-client/models/RestDiffLine.js.map +1 -0
  508. package/build/bitbucket-client/models/RestDiffSegment.d.ts +2 -0
  509. package/build/bitbucket-client/models/RestDiffSegment.d.ts.map +1 -0
  510. package/build/bitbucket-client/models/RestDiffSegment.js +2 -0
  511. package/build/bitbucket-client/models/RestDiffSegment.js.map +1 -0
  512. package/build/bitbucket-client/models/RestDiffStatsSummary.d.ts +2 -0
  513. package/build/bitbucket-client/models/RestDiffStatsSummary.d.ts.map +1 -0
  514. package/build/bitbucket-client/models/RestDiffStatsSummary.js +2 -0
  515. package/build/bitbucket-client/models/RestDiffStatsSummary.js.map +1 -0
  516. package/build/bitbucket-client/models/RestEmoticon.d.ts +2 -0
  517. package/build/bitbucket-client/models/RestEmoticon.d.ts.map +1 -0
  518. package/build/bitbucket-client/models/RestEmoticon.js +2 -0
  519. package/build/bitbucket-client/models/RestEmoticon.js.map +1 -0
  520. package/build/bitbucket-client/models/RestEnhancedEntityLink.d.ts +2 -0
  521. package/build/bitbucket-client/models/RestEnhancedEntityLink.d.ts.map +1 -0
  522. package/build/bitbucket-client/models/RestEnhancedEntityLink.js +2 -0
  523. package/build/bitbucket-client/models/RestEnhancedEntityLink.js.map +1 -0
  524. package/build/bitbucket-client/models/RestErasedUser.d.ts +2 -0
  525. package/build/bitbucket-client/models/RestErasedUser.d.ts.map +1 -0
  526. package/build/bitbucket-client/models/RestErasedUser.js +2 -0
  527. package/build/bitbucket-client/models/RestErasedUser.js.map +1 -0
  528. package/build/bitbucket-client/models/RestErrorMessage.d.ts +2 -0
  529. package/build/bitbucket-client/models/RestErrorMessage.d.ts.map +1 -0
  530. package/build/bitbucket-client/models/RestErrorMessage.js +2 -0
  531. package/build/bitbucket-client/models/RestErrorMessage.js.map +1 -0
  532. package/build/bitbucket-client/models/RestErrors.d.ts +2 -0
  533. package/build/bitbucket-client/models/RestErrors.d.ts.map +1 -0
  534. package/build/bitbucket-client/models/RestErrors.js +2 -0
  535. package/build/bitbucket-client/models/RestErrors.js.map +1 -0
  536. package/build/bitbucket-client/models/RestExportRequest.d.ts +8 -0
  537. package/build/bitbucket-client/models/RestExportRequest.d.ts.map +1 -0
  538. package/build/bitbucket-client/models/RestExportRequest.js +2 -0
  539. package/build/bitbucket-client/models/RestExportRequest.js.map +1 -0
  540. package/build/bitbucket-client/models/RestFarmSynchronizationRequest.d.ts +13 -0
  541. package/build/bitbucket-client/models/RestFarmSynchronizationRequest.d.ts.map +1 -0
  542. package/build/bitbucket-client/models/RestFarmSynchronizationRequest.js +9 -0
  543. package/build/bitbucket-client/models/RestFarmSynchronizationRequest.js.map +1 -0
  544. package/build/bitbucket-client/models/RestGitTagCreateRequest.d.ts +14 -0
  545. package/build/bitbucket-client/models/RestGitTagCreateRequest.d.ts.map +1 -0
  546. package/build/bitbucket-client/models/RestGitTagCreateRequest.js +9 -0
  547. package/build/bitbucket-client/models/RestGitTagCreateRequest.js.map +1 -0
  548. package/build/bitbucket-client/models/RestGpgKey.d.ts +2 -0
  549. package/build/bitbucket-client/models/RestGpgKey.d.ts.map +1 -0
  550. package/build/bitbucket-client/models/RestGpgKey.js +2 -0
  551. package/build/bitbucket-client/models/RestGpgKey.js.map +1 -0
  552. package/build/bitbucket-client/models/RestGpgSubKey.d.ts +2 -0
  553. package/build/bitbucket-client/models/RestGpgSubKey.d.ts.map +1 -0
  554. package/build/bitbucket-client/models/RestGpgSubKey.js +2 -0
  555. package/build/bitbucket-client/models/RestGpgSubKey.js.map +1 -0
  556. package/build/bitbucket-client/models/RestHookScript.d.ts +2 -0
  557. package/build/bitbucket-client/models/RestHookScript.d.ts.map +1 -0
  558. package/build/bitbucket-client/models/RestHookScript.js +2 -0
  559. package/build/bitbucket-client/models/RestHookScript.js.map +1 -0
  560. package/build/bitbucket-client/models/RestHookScriptConfig.d.ts +2 -0
  561. package/build/bitbucket-client/models/RestHookScriptConfig.d.ts.map +1 -0
  562. package/build/bitbucket-client/models/RestHookScriptConfig.js +2 -0
  563. package/build/bitbucket-client/models/RestHookScriptConfig.js.map +1 -0
  564. package/build/bitbucket-client/models/RestHookScriptTriggers.d.ts +4 -0
  565. package/build/bitbucket-client/models/RestHookScriptTriggers.d.ts.map +1 -0
  566. package/build/bitbucket-client/models/RestHookScriptTriggers.js +2 -0
  567. package/build/bitbucket-client/models/RestHookScriptTriggers.js.map +1 -0
  568. package/build/bitbucket-client/models/RestImportRequest.d.ts +4 -0
  569. package/build/bitbucket-client/models/RestImportRequest.d.ts.map +1 -0
  570. package/build/bitbucket-client/models/RestImportRequest.js +2 -0
  571. package/build/bitbucket-client/models/RestImportRequest.js.map +1 -0
  572. package/build/bitbucket-client/models/RestInsightAnnotation.d.ts +2 -0
  573. package/build/bitbucket-client/models/RestInsightAnnotation.d.ts.map +1 -0
  574. package/build/bitbucket-client/models/RestInsightAnnotation.js +2 -0
  575. package/build/bitbucket-client/models/RestInsightAnnotation.js.map +1 -0
  576. package/build/bitbucket-client/models/RestInsightAnnotationsResponse.d.ts +2 -0
  577. package/build/bitbucket-client/models/RestInsightAnnotationsResponse.d.ts.map +1 -0
  578. package/build/bitbucket-client/models/RestInsightAnnotationsResponse.js +2 -0
  579. package/build/bitbucket-client/models/RestInsightAnnotationsResponse.js.map +1 -0
  580. package/build/bitbucket-client/models/RestInsightReport.d.ts +2 -0
  581. package/build/bitbucket-client/models/RestInsightReport.d.ts.map +1 -0
  582. package/build/bitbucket-client/models/RestInsightReport.js +2 -0
  583. package/build/bitbucket-client/models/RestInsightReport.js.map +1 -0
  584. package/build/bitbucket-client/models/RestInsightReportData.d.ts +2 -0
  585. package/build/bitbucket-client/models/RestInsightReportData.d.ts.map +1 -0
  586. package/build/bitbucket-client/models/RestInsightReportData.js +2 -0
  587. package/build/bitbucket-client/models/RestInsightReportData.js.map +1 -0
  588. package/build/bitbucket-client/models/RestInvocationHistory.d.ts +2 -0
  589. package/build/bitbucket-client/models/RestInvocationHistory.d.ts.map +1 -0
  590. package/build/bitbucket-client/models/RestInvocationHistory.js +2 -0
  591. package/build/bitbucket-client/models/RestInvocationHistory.js.map +1 -0
  592. package/build/bitbucket-client/models/RestInvocationRequest.d.ts +2 -0
  593. package/build/bitbucket-client/models/RestInvocationRequest.d.ts.map +1 -0
  594. package/build/bitbucket-client/models/RestInvocationRequest.js +2 -0
  595. package/build/bitbucket-client/models/RestInvocationRequest.js.map +1 -0
  596. package/build/bitbucket-client/models/RestInvocationResult.d.ts +2 -0
  597. package/build/bitbucket-client/models/RestInvocationResult.d.ts.map +1 -0
  598. package/build/bitbucket-client/models/RestInvocationResult.js +2 -0
  599. package/build/bitbucket-client/models/RestInvocationResult.js.map +1 -0
  600. package/build/bitbucket-client/models/RestJiraIssue.d.ts +5 -0
  601. package/build/bitbucket-client/models/RestJiraIssue.d.ts.map +1 -0
  602. package/build/bitbucket-client/models/RestJiraIssue.js +2 -0
  603. package/build/bitbucket-client/models/RestJiraIssue.js.map +1 -0
  604. package/build/bitbucket-client/models/RestJob.d.ts +2 -0
  605. package/build/bitbucket-client/models/RestJob.d.ts.map +1 -0
  606. package/build/bitbucket-client/models/RestJob.js +2 -0
  607. package/build/bitbucket-client/models/RestJob.js.map +1 -0
  608. package/build/bitbucket-client/models/RestJobMessage.d.ts +2 -0
  609. package/build/bitbucket-client/models/RestJobMessage.d.ts.map +1 -0
  610. package/build/bitbucket-client/models/RestJobMessage.js +2 -0
  611. package/build/bitbucket-client/models/RestJobMessage.js.map +1 -0
  612. package/build/bitbucket-client/models/RestLabel.d.ts +2 -0
  613. package/build/bitbucket-client/models/RestLabel.d.ts.map +1 -0
  614. package/build/bitbucket-client/models/RestLabel.js +2 -0
  615. package/build/bitbucket-client/models/RestLabel.js.map +1 -0
  616. package/build/bitbucket-client/models/RestLabelable.d.ts +2 -0
  617. package/build/bitbucket-client/models/RestLabelable.d.ts.map +1 -0
  618. package/build/bitbucket-client/models/RestLabelable.js +2 -0
  619. package/build/bitbucket-client/models/RestLabelable.js.map +1 -0
  620. package/build/bitbucket-client/models/RestLogLevel.d.ts +2 -0
  621. package/build/bitbucket-client/models/RestLogLevel.d.ts.map +1 -0
  622. package/build/bitbucket-client/models/RestLogLevel.js +2 -0
  623. package/build/bitbucket-client/models/RestLogLevel.js.map +1 -0
  624. package/build/bitbucket-client/models/RestLoggingSettings.d.ts +2 -0
  625. package/build/bitbucket-client/models/RestLoggingSettings.d.ts.map +1 -0
  626. package/build/bitbucket-client/models/RestLoggingSettings.js +2 -0
  627. package/build/bitbucket-client/models/RestLoggingSettings.js.map +1 -0
  628. package/build/bitbucket-client/models/RestMailConfiguration.d.ts +2 -0
  629. package/build/bitbucket-client/models/RestMailConfiguration.d.ts.map +1 -0
  630. package/build/bitbucket-client/models/RestMailConfiguration.js +2 -0
  631. package/build/bitbucket-client/models/RestMailConfiguration.js.map +1 -0
  632. package/build/bitbucket-client/models/RestMarkup.d.ts +2 -0
  633. package/build/bitbucket-client/models/RestMarkup.d.ts.map +1 -0
  634. package/build/bitbucket-client/models/RestMarkup.js +2 -0
  635. package/build/bitbucket-client/models/RestMarkup.js.map +1 -0
  636. package/build/bitbucket-client/models/RestMeshConnectivityReport.d.ts +2 -0
  637. package/build/bitbucket-client/models/RestMeshConnectivityReport.d.ts.map +1 -0
  638. package/build/bitbucket-client/models/RestMeshConnectivityReport.js +2 -0
  639. package/build/bitbucket-client/models/RestMeshConnectivityReport.js.map +1 -0
  640. package/build/bitbucket-client/models/RestMeshMigrationQueueStateCounts.d.ts +2 -0
  641. package/build/bitbucket-client/models/RestMeshMigrationQueueStateCounts.d.ts.map +1 -0
  642. package/build/bitbucket-client/models/RestMeshMigrationQueueStateCounts.js +2 -0
  643. package/build/bitbucket-client/models/RestMeshMigrationQueueStateCounts.js.map +1 -0
  644. package/build/bitbucket-client/models/RestMeshMigrationRequest.d.ts +10 -0
  645. package/build/bitbucket-client/models/RestMeshMigrationRequest.d.ts.map +1 -0
  646. package/build/bitbucket-client/models/RestMeshMigrationRequest.js +2 -0
  647. package/build/bitbucket-client/models/RestMeshMigrationRequest.js.map +1 -0
  648. package/build/bitbucket-client/models/RestMeshMigrationSummary.d.ts +2 -0
  649. package/build/bitbucket-client/models/RestMeshMigrationSummary.d.ts.map +1 -0
  650. package/build/bitbucket-client/models/RestMeshMigrationSummary.js +2 -0
  651. package/build/bitbucket-client/models/RestMeshMigrationSummary.js.map +1 -0
  652. package/build/bitbucket-client/models/RestMeshNode.d.ts +2 -0
  653. package/build/bitbucket-client/models/RestMeshNode.d.ts.map +1 -0
  654. package/build/bitbucket-client/models/RestMeshNode.js +2 -0
  655. package/build/bitbucket-client/models/RestMeshNode.js.map +1 -0
  656. package/build/bitbucket-client/models/RestMigrationRepository.d.ts +2 -0
  657. package/build/bitbucket-client/models/RestMigrationRepository.d.ts.map +1 -0
  658. package/build/bitbucket-client/models/RestMigrationRepository.js +2 -0
  659. package/build/bitbucket-client/models/RestMigrationRepository.js.map +1 -0
  660. package/build/bitbucket-client/models/RestMinimalCommit.d.ts +2 -0
  661. package/build/bitbucket-client/models/RestMinimalCommit.d.ts.map +1 -0
  662. package/build/bitbucket-client/models/RestMinimalCommit.js +2 -0
  663. package/build/bitbucket-client/models/RestMinimalCommit.js.map +1 -0
  664. package/build/bitbucket-client/models/RestMinimalRef.d.ts +2 -0
  665. package/build/bitbucket-client/models/RestMinimalRef.d.ts.map +1 -0
  666. package/build/bitbucket-client/models/RestMinimalRef.js +2 -0
  667. package/build/bitbucket-client/models/RestMinimalRef.js.map +1 -0
  668. package/build/bitbucket-client/models/RestMirrorHashes.d.ts +2 -0
  669. package/build/bitbucket-client/models/RestMirrorHashes.d.ts.map +1 -0
  670. package/build/bitbucket-client/models/RestMirrorHashes.js +2 -0
  671. package/build/bitbucket-client/models/RestMirrorHashes.js.map +1 -0
  672. package/build/bitbucket-client/models/RestMirrorRepositorySynchronizationStatus.d.ts +2 -0
  673. package/build/bitbucket-client/models/RestMirrorRepositorySynchronizationStatus.d.ts.map +1 -0
  674. package/build/bitbucket-client/models/RestMirrorRepositorySynchronizationStatus.js +2 -0
  675. package/build/bitbucket-client/models/RestMirrorRepositorySynchronizationStatus.js.map +1 -0
  676. package/build/bitbucket-client/models/RestMirrorServer.d.ts +2 -0
  677. package/build/bitbucket-client/models/RestMirrorServer.d.ts.map +1 -0
  678. package/build/bitbucket-client/models/RestMirrorServer.js +2 -0
  679. package/build/bitbucket-client/models/RestMirrorServer.js.map +1 -0
  680. package/build/bitbucket-client/models/RestMirrorUpgradeRequest.d.ts +5 -0
  681. package/build/bitbucket-client/models/RestMirrorUpgradeRequest.d.ts.map +1 -0
  682. package/build/bitbucket-client/models/RestMirrorUpgradeRequest.js +2 -0
  683. package/build/bitbucket-client/models/RestMirrorUpgradeRequest.js.map +1 -0
  684. package/build/bitbucket-client/models/RestMirroredRepository.d.ts +2 -0
  685. package/build/bitbucket-client/models/RestMirroredRepository.d.ts.map +1 -0
  686. package/build/bitbucket-client/models/RestMirroredRepository.js +2 -0
  687. package/build/bitbucket-client/models/RestMirroredRepository.js.map +1 -0
  688. package/build/bitbucket-client/models/RestMirroredRepositoryDescriptor.d.ts +2 -0
  689. package/build/bitbucket-client/models/RestMirroredRepositoryDescriptor.d.ts.map +1 -0
  690. package/build/bitbucket-client/models/RestMirroredRepositoryDescriptor.js +2 -0
  691. package/build/bitbucket-client/models/RestMirroredRepositoryDescriptor.js.map +1 -0
  692. package/build/bitbucket-client/models/RestMirroringRequest.d.ts +2 -0
  693. package/build/bitbucket-client/models/RestMirroringRequest.d.ts.map +1 -0
  694. package/build/bitbucket-client/models/RestMirroringRequest.js +2 -0
  695. package/build/bitbucket-client/models/RestMirroringRequest.js.map +1 -0
  696. package/build/bitbucket-client/models/RestMultilineCommentMarker.d.ts +2 -0
  697. package/build/bitbucket-client/models/RestMultilineCommentMarker.d.ts.map +1 -0
  698. package/build/bitbucket-client/models/RestMultilineCommentMarker.js +2 -0
  699. package/build/bitbucket-client/models/RestMultilineCommentMarker.js.map +1 -0
  700. package/build/bitbucket-client/models/RestMultilineCommentSpan.d.ts +2 -0
  701. package/build/bitbucket-client/models/RestMultilineCommentSpan.d.ts.map +1 -0
  702. package/build/bitbucket-client/models/RestMultilineCommentSpan.js +2 -0
  703. package/build/bitbucket-client/models/RestMultilineCommentSpan.js.map +1 -0
  704. package/build/bitbucket-client/models/RestMultipleBuildStats.d.ts +2 -0
  705. package/build/bitbucket-client/models/RestMultipleBuildStats.d.ts.map +1 -0
  706. package/build/bitbucket-client/models/RestMultipleBuildStats.js +2 -0
  707. package/build/bitbucket-client/models/RestMultipleBuildStats.js.map +1 -0
  708. package/build/bitbucket-client/models/RestNamedLink.d.ts +2 -0
  709. package/build/bitbucket-client/models/RestNamedLink.d.ts.map +1 -0
  710. package/build/bitbucket-client/models/RestNamedLink.js +2 -0
  711. package/build/bitbucket-client/models/RestNamedLink.js.map +1 -0
  712. package/build/bitbucket-client/models/RestNode.d.ts +2 -0
  713. package/build/bitbucket-client/models/RestNode.d.ts.map +1 -0
  714. package/build/bitbucket-client/models/RestNode.js +2 -0
  715. package/build/bitbucket-client/models/RestNode.js.map +1 -0
  716. package/build/bitbucket-client/models/RestNodeConnectivityReport.d.ts +2 -0
  717. package/build/bitbucket-client/models/RestNodeConnectivityReport.d.ts.map +1 -0
  718. package/build/bitbucket-client/models/RestNodeConnectivityReport.js +2 -0
  719. package/build/bitbucket-client/models/RestNodeConnectivityReport.js.map +1 -0
  720. package/build/bitbucket-client/models/RestNodeConnectivitySummary.d.ts +2 -0
  721. package/build/bitbucket-client/models/RestNodeConnectivitySummary.d.ts.map +1 -0
  722. package/build/bitbucket-client/models/RestNodeConnectivitySummary.js +2 -0
  723. package/build/bitbucket-client/models/RestNodeConnectivitySummary.js.map +1 -0
  724. package/build/bitbucket-client/models/RestPageIdpConfigEntity.d.ts +9 -0
  725. package/build/bitbucket-client/models/RestPageIdpConfigEntity.d.ts.map +1 -0
  726. package/build/bitbucket-client/models/RestPageIdpConfigEntity.js +2 -0
  727. package/build/bitbucket-client/models/RestPageIdpConfigEntity.js.map +1 -0
  728. package/build/bitbucket-client/models/RestPageLoginOptionEntity.d.ts +9 -0
  729. package/build/bitbucket-client/models/RestPageLoginOptionEntity.d.ts.map +1 -0
  730. package/build/bitbucket-client/models/RestPageLoginOptionEntity.js +2 -0
  731. package/build/bitbucket-client/models/RestPageLoginOptionEntity.js.map +1 -0
  732. package/build/bitbucket-client/models/RestPageRestChange.d.ts +2 -0
  733. package/build/bitbucket-client/models/RestPageRestChange.d.ts.map +1 -0
  734. package/build/bitbucket-client/models/RestPageRestChange.js +2 -0
  735. package/build/bitbucket-client/models/RestPageRestChange.js.map +1 -0
  736. package/build/bitbucket-client/models/RestPath.d.ts +2 -0
  737. package/build/bitbucket-client/models/RestPath.d.ts.map +1 -0
  738. package/build/bitbucket-client/models/RestPath.js +2 -0
  739. package/build/bitbucket-client/models/RestPath.js.map +1 -0
  740. package/build/bitbucket-client/models/RestPermitted.d.ts +2 -0
  741. package/build/bitbucket-client/models/RestPermitted.d.ts.map +1 -0
  742. package/build/bitbucket-client/models/RestPermitted.js +2 -0
  743. package/build/bitbucket-client/models/RestPermitted.js.map +1 -0
  744. package/build/bitbucket-client/models/RestPermittedGroup.d.ts +2 -0
  745. package/build/bitbucket-client/models/RestPermittedGroup.d.ts.map +1 -0
  746. package/build/bitbucket-client/models/RestPermittedGroup.js +2 -0
  747. package/build/bitbucket-client/models/RestPermittedGroup.js.map +1 -0
  748. package/build/bitbucket-client/models/RestPermittedUser.d.ts +2 -0
  749. package/build/bitbucket-client/models/RestPermittedUser.d.ts.map +1 -0
  750. package/build/bitbucket-client/models/RestPermittedUser.js +2 -0
  751. package/build/bitbucket-client/models/RestPermittedUser.js.map +1 -0
  752. package/build/bitbucket-client/models/RestPerson.d.ts +2 -0
  753. package/build/bitbucket-client/models/RestPerson.d.ts.map +1 -0
  754. package/build/bitbucket-client/models/RestPerson.js +2 -0
  755. package/build/bitbucket-client/models/RestPerson.js.map +1 -0
  756. package/build/bitbucket-client/models/RestProgress.d.ts +2 -0
  757. package/build/bitbucket-client/models/RestProgress.d.ts.map +1 -0
  758. package/build/bitbucket-client/models/RestProgress.js +2 -0
  759. package/build/bitbucket-client/models/RestProgress.js.map +1 -0
  760. package/build/bitbucket-client/models/RestProject.d.ts +2 -0
  761. package/build/bitbucket-client/models/RestProject.d.ts.map +1 -0
  762. package/build/bitbucket-client/models/RestProject.js +2 -0
  763. package/build/bitbucket-client/models/RestProject.js.map +1 -0
  764. package/build/bitbucket-client/models/RestProjectSettingsRestriction.d.ts +2 -0
  765. package/build/bitbucket-client/models/RestProjectSettingsRestriction.d.ts.map +1 -0
  766. package/build/bitbucket-client/models/RestProjectSettingsRestriction.js +2 -0
  767. package/build/bitbucket-client/models/RestProjectSettingsRestriction.js.map +1 -0
  768. package/build/bitbucket-client/models/RestProjectSettingsRestrictionRequest.d.ts +6 -0
  769. package/build/bitbucket-client/models/RestProjectSettingsRestrictionRequest.d.ts.map +1 -0
  770. package/build/bitbucket-client/models/RestProjectSettingsRestrictionRequest.js +2 -0
  771. package/build/bitbucket-client/models/RestProjectSettingsRestrictionRequest.js.map +1 -0
  772. package/build/bitbucket-client/models/RestProperties.d.ts +2 -0
  773. package/build/bitbucket-client/models/RestProperties.d.ts.map +1 -0
  774. package/build/bitbucket-client/models/RestProperties.js +2 -0
  775. package/build/bitbucket-client/models/RestProperties.js.map +1 -0
  776. package/build/bitbucket-client/models/RestPullRequest.d.ts +2 -0
  777. package/build/bitbucket-client/models/RestPullRequest.d.ts.map +1 -0
  778. package/build/bitbucket-client/models/RestPullRequest.js +2 -0
  779. package/build/bitbucket-client/models/RestPullRequest.js.map +1 -0
  780. package/build/bitbucket-client/models/RestPullRequestActivity.d.ts +2 -0
  781. package/build/bitbucket-client/models/RestPullRequestActivity.d.ts.map +1 -0
  782. package/build/bitbucket-client/models/RestPullRequestActivity.js +2 -0
  783. package/build/bitbucket-client/models/RestPullRequestActivity.js.map +1 -0
  784. package/build/bitbucket-client/models/RestPullRequestAssignParticipantRoleRequest.d.ts +26 -0
  785. package/build/bitbucket-client/models/RestPullRequestAssignParticipantRoleRequest.d.ts.map +1 -0
  786. package/build/bitbucket-client/models/RestPullRequestAssignParticipantRoleRequest.js +15 -0
  787. package/build/bitbucket-client/models/RestPullRequestAssignParticipantRoleRequest.js.map +1 -0
  788. package/build/bitbucket-client/models/RestPullRequestAssignStatusRequest.d.ts +12 -0
  789. package/build/bitbucket-client/models/RestPullRequestAssignStatusRequest.d.ts.map +1 -0
  790. package/build/bitbucket-client/models/RestPullRequestAssignStatusRequest.js +10 -0
  791. package/build/bitbucket-client/models/RestPullRequestAssignStatusRequest.js.map +1 -0
  792. package/build/bitbucket-client/models/RestPullRequestCommitMessageTemplate.d.ts +2 -0
  793. package/build/bitbucket-client/models/RestPullRequestCommitMessageTemplate.d.ts.map +1 -0
  794. package/build/bitbucket-client/models/RestPullRequestCommitMessageTemplate.js +2 -0
  795. package/build/bitbucket-client/models/RestPullRequestCommitMessageTemplate.js.map +1 -0
  796. package/build/bitbucket-client/models/RestPullRequestCondition.d.ts +2 -0
  797. package/build/bitbucket-client/models/RestPullRequestCondition.d.ts.map +1 -0
  798. package/build/bitbucket-client/models/RestPullRequestCondition.js +2 -0
  799. package/build/bitbucket-client/models/RestPullRequestCondition.js.map +1 -0
  800. package/build/bitbucket-client/models/RestPullRequestDeclineRequest.d.ts +5 -0
  801. package/build/bitbucket-client/models/RestPullRequestDeclineRequest.d.ts.map +1 -0
  802. package/build/bitbucket-client/models/RestPullRequestDeclineRequest.js +2 -0
  803. package/build/bitbucket-client/models/RestPullRequestDeclineRequest.js.map +1 -0
  804. package/build/bitbucket-client/models/RestPullRequestDeleteRequest.d.ts +4 -0
  805. package/build/bitbucket-client/models/RestPullRequestDeleteRequest.d.ts.map +1 -0
  806. package/build/bitbucket-client/models/RestPullRequestDeleteRequest.js +2 -0
  807. package/build/bitbucket-client/models/RestPullRequestDeleteRequest.js.map +1 -0
  808. package/build/bitbucket-client/models/RestPullRequestFinishReviewRequest.d.ts +6 -0
  809. package/build/bitbucket-client/models/RestPullRequestFinishReviewRequest.d.ts.map +1 -0
  810. package/build/bitbucket-client/models/RestPullRequestFinishReviewRequest.js +2 -0
  811. package/build/bitbucket-client/models/RestPullRequestFinishReviewRequest.js.map +1 -0
  812. package/build/bitbucket-client/models/RestPullRequestMergeConfig.d.ts +2 -0
  813. package/build/bitbucket-client/models/RestPullRequestMergeConfig.d.ts.map +1 -0
  814. package/build/bitbucket-client/models/RestPullRequestMergeConfig.js +2 -0
  815. package/build/bitbucket-client/models/RestPullRequestMergeConfig.js.map +1 -0
  816. package/build/bitbucket-client/models/RestPullRequestMergeRequest.d.ts +8 -0
  817. package/build/bitbucket-client/models/RestPullRequestMergeRequest.d.ts.map +1 -0
  818. package/build/bitbucket-client/models/RestPullRequestMergeRequest.js +2 -0
  819. package/build/bitbucket-client/models/RestPullRequestMergeRequest.js.map +1 -0
  820. package/build/bitbucket-client/models/RestPullRequestMergeStrategy.d.ts +2 -0
  821. package/build/bitbucket-client/models/RestPullRequestMergeStrategy.d.ts.map +1 -0
  822. package/build/bitbucket-client/models/RestPullRequestMergeStrategy.js +2 -0
  823. package/build/bitbucket-client/models/RestPullRequestMergeStrategy.js.map +1 -0
  824. package/build/bitbucket-client/models/RestPullRequestMergeability.d.ts +2 -0
  825. package/build/bitbucket-client/models/RestPullRequestMergeability.d.ts.map +1 -0
  826. package/build/bitbucket-client/models/RestPullRequestMergeability.js +2 -0
  827. package/build/bitbucket-client/models/RestPullRequestMergeability.js.map +1 -0
  828. package/build/bitbucket-client/models/RestPullRequestParticipant.d.ts +2 -0
  829. package/build/bitbucket-client/models/RestPullRequestParticipant.d.ts.map +1 -0
  830. package/build/bitbucket-client/models/RestPullRequestParticipant.js +2 -0
  831. package/build/bitbucket-client/models/RestPullRequestParticipant.js.map +1 -0
  832. package/build/bitbucket-client/models/RestPullRequestRebaseRequest.d.ts +4 -0
  833. package/build/bitbucket-client/models/RestPullRequestRebaseRequest.d.ts.map +1 -0
  834. package/build/bitbucket-client/models/RestPullRequestRebaseRequest.js +2 -0
  835. package/build/bitbucket-client/models/RestPullRequestRebaseRequest.js.map +1 -0
  836. package/build/bitbucket-client/models/RestPullRequestRebaseResult.d.ts +2 -0
  837. package/build/bitbucket-client/models/RestPullRequestRebaseResult.d.ts.map +1 -0
  838. package/build/bitbucket-client/models/RestPullRequestRebaseResult.js +2 -0
  839. package/build/bitbucket-client/models/RestPullRequestRebaseResult.js.map +1 -0
  840. package/build/bitbucket-client/models/RestPullRequestRebaseability.d.ts +2 -0
  841. package/build/bitbucket-client/models/RestPullRequestRebaseability.d.ts.map +1 -0
  842. package/build/bitbucket-client/models/RestPullRequestRebaseability.js +2 -0
  843. package/build/bitbucket-client/models/RestPullRequestRebaseability.js.map +1 -0
  844. package/build/bitbucket-client/models/RestPullRequestRef.d.ts +2 -0
  845. package/build/bitbucket-client/models/RestPullRequestRef.d.ts.map +1 -0
  846. package/build/bitbucket-client/models/RestPullRequestRef.js +2 -0
  847. package/build/bitbucket-client/models/RestPullRequestRef.js.map +1 -0
  848. package/build/bitbucket-client/models/RestPullRequestReopenRequest.d.ts +4 -0
  849. package/build/bitbucket-client/models/RestPullRequestReopenRequest.d.ts.map +1 -0
  850. package/build/bitbucket-client/models/RestPullRequestReopenRequest.js +2 -0
  851. package/build/bitbucket-client/models/RestPullRequestReopenRequest.js.map +1 -0
  852. package/build/bitbucket-client/models/RestPullRequestSettings.d.ts +2 -0
  853. package/build/bitbucket-client/models/RestPullRequestSettings.d.ts.map +1 -0
  854. package/build/bitbucket-client/models/RestPullRequestSettings.js +2 -0
  855. package/build/bitbucket-client/models/RestPullRequestSettings.js.map +1 -0
  856. package/build/bitbucket-client/models/RestPullRequestSuggestion.d.ts +2 -0
  857. package/build/bitbucket-client/models/RestPullRequestSuggestion.d.ts.map +1 -0
  858. package/build/bitbucket-client/models/RestPullRequestSuggestion.js +2 -0
  859. package/build/bitbucket-client/models/RestPullRequestSuggestion.js.map +1 -0
  860. package/build/bitbucket-client/models/RestPushRefChange.d.ts +2 -0
  861. package/build/bitbucket-client/models/RestPushRefChange.d.ts.map +1 -0
  862. package/build/bitbucket-client/models/RestPushRefChange.js +2 -0
  863. package/build/bitbucket-client/models/RestPushRefChange.js.map +1 -0
  864. package/build/bitbucket-client/models/RestRateLimitSettings.d.ts +2 -0
  865. package/build/bitbucket-client/models/RestRateLimitSettings.d.ts.map +1 -0
  866. package/build/bitbucket-client/models/RestRateLimitSettings.js +2 -0
  867. package/build/bitbucket-client/models/RestRateLimitSettings.js.map +1 -0
  868. package/build/bitbucket-client/models/RestRawAccessToken.d.ts +2 -0
  869. package/build/bitbucket-client/models/RestRawAccessToken.d.ts.map +1 -0
  870. package/build/bitbucket-client/models/RestRawAccessToken.js +2 -0
  871. package/build/bitbucket-client/models/RestRawAccessToken.js.map +1 -0
  872. package/build/bitbucket-client/models/RestRefChange.d.ts +2 -0
  873. package/build/bitbucket-client/models/RestRefChange.d.ts.map +1 -0
  874. package/build/bitbucket-client/models/RestRefChange.js +2 -0
  875. package/build/bitbucket-client/models/RestRefChange.js.map +1 -0
  876. package/build/bitbucket-client/models/RestRefMatcher.d.ts +2 -0
  877. package/build/bitbucket-client/models/RestRefMatcher.d.ts.map +1 -0
  878. package/build/bitbucket-client/models/RestRefMatcher.js +2 -0
  879. package/build/bitbucket-client/models/RestRefMatcher.js.map +1 -0
  880. package/build/bitbucket-client/models/RestRefMatcherType.d.ts +2 -0
  881. package/build/bitbucket-client/models/RestRefMatcherType.d.ts.map +1 -0
  882. package/build/bitbucket-client/models/RestRefMatcherType.js +2 -0
  883. package/build/bitbucket-client/models/RestRefMatcherType.js.map +1 -0
  884. package/build/bitbucket-client/models/RestRefRestriction.d.ts +2 -0
  885. package/build/bitbucket-client/models/RestRefRestriction.d.ts.map +1 -0
  886. package/build/bitbucket-client/models/RestRefRestriction.js +2 -0
  887. package/build/bitbucket-client/models/RestRefRestriction.js.map +1 -0
  888. package/build/bitbucket-client/models/RestRefSyncQueue.d.ts +5 -0
  889. package/build/bitbucket-client/models/RestRefSyncQueue.d.ts.map +1 -0
  890. package/build/bitbucket-client/models/RestRefSyncQueue.js +2 -0
  891. package/build/bitbucket-client/models/RestRefSyncQueue.js.map +1 -0
  892. package/build/bitbucket-client/models/RestRefSyncRequest.d.ts +14 -0
  893. package/build/bitbucket-client/models/RestRefSyncRequest.d.ts.map +1 -0
  894. package/build/bitbucket-client/models/RestRefSyncRequest.js +10 -0
  895. package/build/bitbucket-client/models/RestRefSyncRequest.js.map +1 -0
  896. package/build/bitbucket-client/models/RestRefSyncStatus.d.ts +2 -0
  897. package/build/bitbucket-client/models/RestRefSyncStatus.d.ts.map +1 -0
  898. package/build/bitbucket-client/models/RestRefSyncStatus.js +2 -0
  899. package/build/bitbucket-client/models/RestRefSyncStatus.js.map +1 -0
  900. package/build/bitbucket-client/models/RestRejectedRef.d.ts +2 -0
  901. package/build/bitbucket-client/models/RestRejectedRef.d.ts.map +1 -0
  902. package/build/bitbucket-client/models/RestRejectedRef.js +2 -0
  903. package/build/bitbucket-client/models/RestRejectedRef.js.map +1 -0
  904. package/build/bitbucket-client/models/RestRelatedLinks.d.ts +2 -0
  905. package/build/bitbucket-client/models/RestRelatedLinks.d.ts.map +1 -0
  906. package/build/bitbucket-client/models/RestRelatedLinks.js +2 -0
  907. package/build/bitbucket-client/models/RestRelatedLinks.js.map +1 -0
  908. package/build/bitbucket-client/models/RestRepositoriesExportRequest.d.ts +5 -0
  909. package/build/bitbucket-client/models/RestRepositoriesExportRequest.d.ts.map +1 -0
  910. package/build/bitbucket-client/models/RestRepositoriesExportRequest.js +2 -0
  911. package/build/bitbucket-client/models/RestRepositoriesExportRequest.js.map +1 -0
  912. package/build/bitbucket-client/models/RestRepository.d.ts +2 -0
  913. package/build/bitbucket-client/models/RestRepository.d.ts.map +1 -0
  914. package/build/bitbucket-client/models/RestRepository.js +2 -0
  915. package/build/bitbucket-client/models/RestRepository.js.map +1 -0
  916. package/build/bitbucket-client/models/RestRepositoryHook.d.ts +2 -0
  917. package/build/bitbucket-client/models/RestRepositoryHook.d.ts.map +1 -0
  918. package/build/bitbucket-client/models/RestRepositoryHook.js +2 -0
  919. package/build/bitbucket-client/models/RestRepositoryHook.js.map +1 -0
  920. package/build/bitbucket-client/models/RestRepositoryHookVeto.d.ts +2 -0
  921. package/build/bitbucket-client/models/RestRepositoryHookVeto.d.ts.map +1 -0
  922. package/build/bitbucket-client/models/RestRepositoryHookVeto.js +2 -0
  923. package/build/bitbucket-client/models/RestRepositoryHookVeto.js.map +1 -0
  924. package/build/bitbucket-client/models/RestRepositoryLockOwner.d.ts +2 -0
  925. package/build/bitbucket-client/models/RestRepositoryLockOwner.d.ts.map +1 -0
  926. package/build/bitbucket-client/models/RestRepositoryLockOwner.js +2 -0
  927. package/build/bitbucket-client/models/RestRepositoryLockOwner.js.map +1 -0
  928. package/build/bitbucket-client/models/RestRepositoryMirrorEvent.d.ts +12 -0
  929. package/build/bitbucket-client/models/RestRepositoryMirrorEvent.d.ts.map +1 -0
  930. package/build/bitbucket-client/models/RestRepositoryMirrorEvent.js +9 -0
  931. package/build/bitbucket-client/models/RestRepositoryMirrorEvent.js.map +1 -0
  932. package/build/bitbucket-client/models/RestRepositoryPolicy.d.ts +2 -0
  933. package/build/bitbucket-client/models/RestRepositoryPolicy.d.ts.map +1 -0
  934. package/build/bitbucket-client/models/RestRepositoryPolicy.js +2 -0
  935. package/build/bitbucket-client/models/RestRepositoryPolicy.js.map +1 -0
  936. package/build/bitbucket-client/models/RestRepositoryPullRequestSettings.d.ts +2 -0
  937. package/build/bitbucket-client/models/RestRepositoryPullRequestSettings.d.ts.map +1 -0
  938. package/build/bitbucket-client/models/RestRepositoryPullRequestSettings.js +2 -0
  939. package/build/bitbucket-client/models/RestRepositoryPullRequestSettings.js.map +1 -0
  940. package/build/bitbucket-client/models/RestRepositoryRefChangeActivity.d.ts +2 -0
  941. package/build/bitbucket-client/models/RestRepositoryRefChangeActivity.d.ts.map +1 -0
  942. package/build/bitbucket-client/models/RestRepositoryRefChangeActivity.js +2 -0
  943. package/build/bitbucket-client/models/RestRepositoryRefChangeActivity.js.map +1 -0
  944. package/build/bitbucket-client/models/RestRepositorySelector.d.ts +5 -0
  945. package/build/bitbucket-client/models/RestRepositorySelector.d.ts.map +1 -0
  946. package/build/bitbucket-client/models/RestRepositorySelector.js +2 -0
  947. package/build/bitbucket-client/models/RestRepositorySelector.js.map +1 -0
  948. package/build/bitbucket-client/models/RestRequiredBuildCondition.d.ts +2 -0
  949. package/build/bitbucket-client/models/RestRequiredBuildCondition.d.ts.map +1 -0
  950. package/build/bitbucket-client/models/RestRequiredBuildCondition.js +2 -0
  951. package/build/bitbucket-client/models/RestRequiredBuildCondition.js.map +1 -0
  952. package/build/bitbucket-client/models/RestRequiredBuildConditionSetRequest.d.ts +26 -0
  953. package/build/bitbucket-client/models/RestRequiredBuildConditionSetRequest.d.ts.map +1 -0
  954. package/build/bitbucket-client/models/RestRequiredBuildConditionSetRequest.js +12 -0
  955. package/build/bitbucket-client/models/RestRequiredBuildConditionSetRequest.js.map +1 -0
  956. package/build/bitbucket-client/models/RestRestrictionRequest.d.ts +39 -0
  957. package/build/bitbucket-client/models/RestRestrictionRequest.d.ts.map +1 -0
  958. package/build/bitbucket-client/models/RestRestrictionRequest.js +18 -0
  959. package/build/bitbucket-client/models/RestRestrictionRequest.js.map +1 -0
  960. package/build/bitbucket-client/models/RestReviewerGroup.d.ts +2 -0
  961. package/build/bitbucket-client/models/RestReviewerGroup.d.ts.map +1 -0
  962. package/build/bitbucket-client/models/RestReviewerGroup.js +2 -0
  963. package/build/bitbucket-client/models/RestReviewerGroup.js.map +1 -0
  964. package/build/bitbucket-client/models/RestRollingUpgradeState.d.ts +2 -0
  965. package/build/bitbucket-client/models/RestRollingUpgradeState.d.ts.map +1 -0
  966. package/build/bitbucket-client/models/RestRollingUpgradeState.js +2 -0
  967. package/build/bitbucket-client/models/RestRollingUpgradeState.js.map +1 -0
  968. package/build/bitbucket-client/models/RestScope.d.ts +2 -0
  969. package/build/bitbucket-client/models/RestScope.d.ts.map +1 -0
  970. package/build/bitbucket-client/models/RestScope.js +2 -0
  971. package/build/bitbucket-client/models/RestScope.js.map +1 -0
  972. package/build/bitbucket-client/models/RestScopesExample.d.ts +2 -0
  973. package/build/bitbucket-client/models/RestScopesExample.d.ts.map +1 -0
  974. package/build/bitbucket-client/models/RestScopesExample.js +2 -0
  975. package/build/bitbucket-client/models/RestScopesExample.js.map +1 -0
  976. package/build/bitbucket-client/models/RestSecretScanningAllowlistRule.d.ts +2 -0
  977. package/build/bitbucket-client/models/RestSecretScanningAllowlistRule.d.ts.map +1 -0
  978. package/build/bitbucket-client/models/RestSecretScanningAllowlistRule.js +2 -0
  979. package/build/bitbucket-client/models/RestSecretScanningAllowlistRule.js.map +1 -0
  980. package/build/bitbucket-client/models/RestSecretScanningAllowlistRuleSetRequest.d.ts +15 -0
  981. package/build/bitbucket-client/models/RestSecretScanningAllowlistRuleSetRequest.d.ts.map +1 -0
  982. package/build/bitbucket-client/models/RestSecretScanningAllowlistRuleSetRequest.js +2 -0
  983. package/build/bitbucket-client/models/RestSecretScanningAllowlistRuleSetRequest.js.map +1 -0
  984. package/build/bitbucket-client/models/RestSecretScanningRule.d.ts +2 -0
  985. package/build/bitbucket-client/models/RestSecretScanningRule.d.ts.map +1 -0
  986. package/build/bitbucket-client/models/RestSecretScanningRule.js +2 -0
  987. package/build/bitbucket-client/models/RestSecretScanningRule.js.map +1 -0
  988. package/build/bitbucket-client/models/RestSecretScanningRuleSetRequest.d.ts +15 -0
  989. package/build/bitbucket-client/models/RestSecretScanningRuleSetRequest.d.ts.map +1 -0
  990. package/build/bitbucket-client/models/RestSecretScanningRuleSetRequest.js +2 -0
  991. package/build/bitbucket-client/models/RestSecretScanningRuleSetRequest.js.map +1 -0
  992. package/build/bitbucket-client/models/RestSetInsightReportRequest.d.ts +13 -0
  993. package/build/bitbucket-client/models/RestSetInsightReportRequest.d.ts.map +1 -0
  994. package/build/bitbucket-client/models/RestSetInsightReportRequest.js +2 -0
  995. package/build/bitbucket-client/models/RestSetInsightReportRequest.js.map +1 -0
  996. package/build/bitbucket-client/models/RestSingleAddInsightAnnotationRequest.d.ts +10 -0
  997. package/build/bitbucket-client/models/RestSingleAddInsightAnnotationRequest.d.ts.map +1 -0
  998. package/build/bitbucket-client/models/RestSingleAddInsightAnnotationRequest.js +2 -0
  999. package/build/bitbucket-client/models/RestSingleAddInsightAnnotationRequest.js.map +1 -0
  1000. package/build/bitbucket-client/models/RestSshAccessKey.d.ts +2 -0
  1001. package/build/bitbucket-client/models/RestSshAccessKey.d.ts.map +1 -0
  1002. package/build/bitbucket-client/models/RestSshAccessKey.js +2 -0
  1003. package/build/bitbucket-client/models/RestSshAccessKey.js.map +1 -0
  1004. package/build/bitbucket-client/models/RestSshAccessKeyLocations.d.ts +7 -0
  1005. package/build/bitbucket-client/models/RestSshAccessKeyLocations.d.ts.map +1 -0
  1006. package/build/bitbucket-client/models/RestSshAccessKeyLocations.js +2 -0
  1007. package/build/bitbucket-client/models/RestSshAccessKeyLocations.js.map +1 -0
  1008. package/build/bitbucket-client/models/RestSshCredentials.d.ts +12 -0
  1009. package/build/bitbucket-client/models/RestSshCredentials.d.ts.map +1 -0
  1010. package/build/bitbucket-client/models/RestSshCredentials.js +2 -0
  1011. package/build/bitbucket-client/models/RestSshCredentials.js.map +1 -0
  1012. package/build/bitbucket-client/models/RestSshKey.d.ts +2 -0
  1013. package/build/bitbucket-client/models/RestSshKey.d.ts.map +1 -0
  1014. package/build/bitbucket-client/models/RestSshKey.js +2 -0
  1015. package/build/bitbucket-client/models/RestSshKey.js.map +1 -0
  1016. package/build/bitbucket-client/models/RestSshKeySettings.d.ts +2 -0
  1017. package/build/bitbucket-client/models/RestSshKeySettings.d.ts.map +1 -0
  1018. package/build/bitbucket-client/models/RestSshKeySettings.js +2 -0
  1019. package/build/bitbucket-client/models/RestSshKeySettings.js.map +1 -0
  1020. package/build/bitbucket-client/models/RestSshKeyTypeRestriction.d.ts +2 -0
  1021. package/build/bitbucket-client/models/RestSshKeyTypeRestriction.d.ts.map +1 -0
  1022. package/build/bitbucket-client/models/RestSshKeyTypeRestriction.js +2 -0
  1023. package/build/bitbucket-client/models/RestSshKeyTypeRestriction.js.map +1 -0
  1024. package/build/bitbucket-client/models/RestSshSettings.d.ts +2 -0
  1025. package/build/bitbucket-client/models/RestSshSettings.d.ts.map +1 -0
  1026. package/build/bitbucket-client/models/RestSshSettings.js +2 -0
  1027. package/build/bitbucket-client/models/RestSshSettings.js.map +1 -0
  1028. package/build/bitbucket-client/models/RestSyncProgress.d.ts +2 -0
  1029. package/build/bitbucket-client/models/RestSyncProgress.d.ts.map +1 -0
  1030. package/build/bitbucket-client/models/RestSyncProgress.js +2 -0
  1031. package/build/bitbucket-client/models/RestSyncProgress.js.map +1 -0
  1032. package/build/bitbucket-client/models/RestSystemSigningConfiguration.d.ts +2 -0
  1033. package/build/bitbucket-client/models/RestSystemSigningConfiguration.d.ts.map +1 -0
  1034. package/build/bitbucket-client/models/RestSystemSigningConfiguration.js +2 -0
  1035. package/build/bitbucket-client/models/RestSystemSigningConfiguration.js.map +1 -0
  1036. package/build/bitbucket-client/models/RestTag.d.ts +2 -0
  1037. package/build/bitbucket-client/models/RestTag.d.ts.map +1 -0
  1038. package/build/bitbucket-client/models/RestTag.js +2 -0
  1039. package/build/bitbucket-client/models/RestTag.js.map +1 -0
  1040. package/build/bitbucket-client/models/RestTestResults.d.ts +2 -0
  1041. package/build/bitbucket-client/models/RestTestResults.d.ts.map +1 -0
  1042. package/build/bitbucket-client/models/RestTestResults.js +2 -0
  1043. package/build/bitbucket-client/models/RestTestResults.js.map +1 -0
  1044. package/build/bitbucket-client/models/RestTokenBucketSettings.d.ts +2 -0
  1045. package/build/bitbucket-client/models/RestTokenBucketSettings.d.ts.map +1 -0
  1046. package/build/bitbucket-client/models/RestTokenBucketSettings.js +2 -0
  1047. package/build/bitbucket-client/models/RestTokenBucketSettings.js.map +1 -0
  1048. package/build/bitbucket-client/models/RestUpstreamServer.d.ts +2 -0
  1049. package/build/bitbucket-client/models/RestUpstreamServer.d.ts.map +1 -0
  1050. package/build/bitbucket-client/models/RestUpstreamServer.js +2 -0
  1051. package/build/bitbucket-client/models/RestUpstreamServer.js.map +1 -0
  1052. package/build/bitbucket-client/models/RestUpstreamSettings.d.ts +2 -0
  1053. package/build/bitbucket-client/models/RestUpstreamSettings.d.ts.map +1 -0
  1054. package/build/bitbucket-client/models/RestUpstreamSettings.js +2 -0
  1055. package/build/bitbucket-client/models/RestUpstreamSettings.js.map +1 -0
  1056. package/build/bitbucket-client/models/RestUserDirectory.d.ts +2 -0
  1057. package/build/bitbucket-client/models/RestUserDirectory.d.ts.map +1 -0
  1058. package/build/bitbucket-client/models/RestUserDirectory.js +2 -0
  1059. package/build/bitbucket-client/models/RestUserDirectory.js.map +1 -0
  1060. package/build/bitbucket-client/models/RestUserRateLimitSettings.d.ts +2 -0
  1061. package/build/bitbucket-client/models/RestUserRateLimitSettings.d.ts.map +1 -0
  1062. package/build/bitbucket-client/models/RestUserRateLimitSettings.js +2 -0
  1063. package/build/bitbucket-client/models/RestUserRateLimitSettings.js.map +1 -0
  1064. package/build/bitbucket-client/models/RestUserRateLimitSettingsUpdateRequest.d.ts +8 -0
  1065. package/build/bitbucket-client/models/RestUserRateLimitSettingsUpdateRequest.d.ts.map +1 -0
  1066. package/build/bitbucket-client/models/RestUserRateLimitSettingsUpdateRequest.js +2 -0
  1067. package/build/bitbucket-client/models/RestUserRateLimitSettingsUpdateRequest.js.map +1 -0
  1068. package/build/bitbucket-client/models/RestUserReaction.d.ts +2 -0
  1069. package/build/bitbucket-client/models/RestUserReaction.d.ts.map +1 -0
  1070. package/build/bitbucket-client/models/RestUserReaction.js +2 -0
  1071. package/build/bitbucket-client/models/RestUserReaction.js.map +1 -0
  1072. package/build/bitbucket-client/models/RestUsernamePasswordCredentials.d.ts +5 -0
  1073. package/build/bitbucket-client/models/RestUsernamePasswordCredentials.d.ts.map +1 -0
  1074. package/build/bitbucket-client/models/RestUsernamePasswordCredentials.js +2 -0
  1075. package/build/bitbucket-client/models/RestUsernamePasswordCredentials.js.map +1 -0
  1076. package/build/bitbucket-client/models/RestWebhook.d.ts +2 -0
  1077. package/build/bitbucket-client/models/RestWebhook.d.ts.map +1 -0
  1078. package/build/bitbucket-client/models/RestWebhook.js +2 -0
  1079. package/build/bitbucket-client/models/RestWebhook.js.map +1 -0
  1080. package/build/bitbucket-client/models/RestWebhookCredentials.d.ts +2 -0
  1081. package/build/bitbucket-client/models/RestWebhookCredentials.d.ts.map +1 -0
  1082. package/build/bitbucket-client/models/RestWebhookCredentials.js +2 -0
  1083. package/build/bitbucket-client/models/RestWebhookCredentials.js.map +1 -0
  1084. package/build/bitbucket-client/models/RestWebhookRequestResponse.d.ts +2 -0
  1085. package/build/bitbucket-client/models/RestWebhookRequestResponse.d.ts.map +1 -0
  1086. package/build/bitbucket-client/models/RestWebhookRequestResponse.js +2 -0
  1087. package/build/bitbucket-client/models/RestWebhookRequestResponse.js.map +1 -0
  1088. package/build/bitbucket-client/models/RestWebhookScope.d.ts +2 -0
  1089. package/build/bitbucket-client/models/RestWebhookScope.d.ts.map +1 -0
  1090. package/build/bitbucket-client/models/RestWebhookScope.js +2 -0
  1091. package/build/bitbucket-client/models/RestWebhookScope.js.map +1 -0
  1092. package/build/bitbucket-client/models/RestX509Certificate.d.ts +2 -0
  1093. package/build/bitbucket-client/models/RestX509Certificate.d.ts.map +1 -0
  1094. package/build/bitbucket-client/models/RestX509Certificate.js +2 -0
  1095. package/build/bitbucket-client/models/RestX509Certificate.js.map +1 -0
  1096. package/build/bitbucket-client/models/Scope.d.ts +12 -0
  1097. package/build/bitbucket-client/models/Scope.d.ts.map +1 -0
  1098. package/build/bitbucket-client/models/Scope.js +10 -0
  1099. package/build/bitbucket-client/models/Scope.js.map +1 -0
  1100. package/build/bitbucket-client/models/SimpleSshKeyFingerprint.d.ts +2 -0
  1101. package/build/bitbucket-client/models/SimpleSshKeyFingerprint.d.ts.map +1 -0
  1102. package/build/bitbucket-client/models/SimpleSshKeyFingerprint.js +2 -0
  1103. package/build/bitbucket-client/models/SimpleSshKeyFingerprint.js.map +1 -0
  1104. package/build/bitbucket-client/models/SsoConfigEntity.d.ts +2 -0
  1105. package/build/bitbucket-client/models/SsoConfigEntity.d.ts.map +1 -0
  1106. package/build/bitbucket-client/models/SsoConfigEntity.js +2 -0
  1107. package/build/bitbucket-client/models/SsoConfigEntity.js.map +1 -0
  1108. package/build/bitbucket-client/models/SsoManagementStatusDTO.d.ts +2 -0
  1109. package/build/bitbucket-client/models/SsoManagementStatusDTO.d.ts.map +1 -0
  1110. package/build/bitbucket-client/models/SsoManagementStatusDTO.js +2 -0
  1111. package/build/bitbucket-client/models/SsoManagementStatusDTO.js.map +1 -0
  1112. package/build/bitbucket-client/models/StatusDTO.d.ts +2 -0
  1113. package/build/bitbucket-client/models/StatusDTO.d.ts.map +1 -0
  1114. package/build/bitbucket-client/models/StatusDTO.js +2 -0
  1115. package/build/bitbucket-client/models/StatusDTO.js.map +1 -0
  1116. package/build/bitbucket-client/models/TotpCodeVerificationDTO.d.ts +5 -0
  1117. package/build/bitbucket-client/models/TotpCodeVerificationDTO.d.ts.map +1 -0
  1118. package/build/bitbucket-client/models/TotpCodeVerificationDTO.js +2 -0
  1119. package/build/bitbucket-client/models/TotpCodeVerificationDTO.js.map +1 -0
  1120. package/build/bitbucket-client/models/TotpElevationRestDTO.d.ts +4 -0
  1121. package/build/bitbucket-client/models/TotpElevationRestDTO.d.ts.map +1 -0
  1122. package/build/bitbucket-client/models/TotpElevationRestDTO.js +2 -0
  1123. package/build/bitbucket-client/models/TotpElevationRestDTO.js.map +1 -0
  1124. package/build/bitbucket-client/models/TotpRecoveryCodeAuthenticationDTO.d.ts +5 -0
  1125. package/build/bitbucket-client/models/TotpRecoveryCodeAuthenticationDTO.d.ts.map +1 -0
  1126. package/build/bitbucket-client/models/TotpRecoveryCodeAuthenticationDTO.js +2 -0
  1127. package/build/bitbucket-client/models/TotpRecoveryCodeAuthenticationDTO.js.map +1 -0
  1128. package/build/bitbucket-client/models/TotpRecoveryCodeDTO.d.ts +2 -0
  1129. package/build/bitbucket-client/models/TotpRecoveryCodeDTO.d.ts.map +1 -0
  1130. package/build/bitbucket-client/models/TotpRecoveryCodeDTO.js +2 -0
  1131. package/build/bitbucket-client/models/TotpRecoveryCodeDTO.js.map +1 -0
  1132. package/build/bitbucket-client/models/TotpUserEnrollmentDTO.d.ts +2 -0
  1133. package/build/bitbucket-client/models/TotpUserEnrollmentDTO.d.ts.map +1 -0
  1134. package/build/bitbucket-client/models/TotpUserEnrollmentDTO.js +2 -0
  1135. package/build/bitbucket-client/models/TotpUserEnrollmentDTO.js.map +1 -0
  1136. package/build/bitbucket-client/models/UserAndGroups.d.ts +5 -0
  1137. package/build/bitbucket-client/models/UserAndGroups.d.ts.map +1 -0
  1138. package/build/bitbucket-client/models/UserAndGroups.js +2 -0
  1139. package/build/bitbucket-client/models/UserAndGroups.js.map +1 -0
  1140. package/build/bitbucket-client/models/UserPasswordUpdate.d.ts +6 -0
  1141. package/build/bitbucket-client/models/UserPasswordUpdate.d.ts.map +1 -0
  1142. package/build/bitbucket-client/models/UserPasswordUpdate.js +2 -0
  1143. package/build/bitbucket-client/models/UserPasswordUpdate.js.map +1 -0
  1144. package/build/bitbucket-client/models/UserPickerContext.d.ts +5 -0
  1145. package/build/bitbucket-client/models/UserPickerContext.d.ts.map +1 -0
  1146. package/build/bitbucket-client/models/UserPickerContext.js +2 -0
  1147. package/build/bitbucket-client/models/UserPickerContext.js.map +1 -0
  1148. package/build/bitbucket-client/models/UserRename.d.ts +5 -0
  1149. package/build/bitbucket-client/models/UserRename.d.ts.map +1 -0
  1150. package/build/bitbucket-client/models/UserRename.js +2 -0
  1151. package/build/bitbucket-client/models/UserRename.js.map +1 -0
  1152. package/build/bitbucket-client/models/UserUpdate.d.ts +6 -0
  1153. package/build/bitbucket-client/models/UserUpdate.d.ts.map +1 -0
  1154. package/build/bitbucket-client/models/UserUpdate.js +2 -0
  1155. package/build/bitbucket-client/models/UserUpdate.js.map +1 -0
  1156. package/build/bitbucket-client/models/UserUpdateWithCredentials.d.ts +10 -0
  1157. package/build/bitbucket-client/models/UserUpdateWithCredentials.d.ts.map +1 -0
  1158. package/build/bitbucket-client/models/UserUpdateWithCredentials.js +2 -0
  1159. package/build/bitbucket-client/models/UserUpdateWithCredentials.js.map +1 -0
  1160. package/build/bitbucket-client/services/AuthenticationService.d.ts +684 -0
  1161. package/build/bitbucket-client/services/AuthenticationService.d.ts.map +1 -0
  1162. package/build/bitbucket-client/services/AuthenticationService.js +1381 -0
  1163. package/build/bitbucket-client/services/AuthenticationService.js.map +1 -0
  1164. package/build/bitbucket-client/services/BuildsAndDeploymentsService.d.ts +364 -0
  1165. package/build/bitbucket-client/services/BuildsAndDeploymentsService.d.ts.map +1 -0
  1166. package/build/bitbucket-client/services/BuildsAndDeploymentsService.js +705 -0
  1167. package/build/bitbucket-client/services/BuildsAndDeploymentsService.js.map +1 -0
  1168. package/build/bitbucket-client/services/CapabilitiesService.d.ts +19 -0
  1169. package/build/bitbucket-client/services/CapabilitiesService.d.ts.map +1 -0
  1170. package/build/bitbucket-client/services/CapabilitiesService.js +32 -0
  1171. package/build/bitbucket-client/services/CapabilitiesService.js.map +1 -0
  1172. package/build/bitbucket-client/services/DashboardService.d.ts +46 -0
  1173. package/build/bitbucket-client/services/DashboardService.d.ts.map +1 -0
  1174. package/build/bitbucket-client/services/DashboardService.js +63 -0
  1175. package/build/bitbucket-client/services/DashboardService.js.map +1 -0
  1176. package/build/bitbucket-client/services/DefaultService.d.ts +21 -0
  1177. package/build/bitbucket-client/services/DefaultService.d.ts.map +1 -0
  1178. package/build/bitbucket-client/services/DefaultService.js +37 -0
  1179. package/build/bitbucket-client/services/DefaultService.js.map +1 -0
  1180. package/build/bitbucket-client/services/DeprecatedService.d.ts +185 -0
  1181. package/build/bitbucket-client/services/DeprecatedService.d.ts.map +1 -0
  1182. package/build/bitbucket-client/services/DeprecatedService.js +338 -0
  1183. package/build/bitbucket-client/services/DeprecatedService.js.map +1 -0
  1184. package/build/bitbucket-client/services/JiraIntegrationService.d.ts +64 -0
  1185. package/build/bitbucket-client/services/JiraIntegrationService.d.ts.map +1 -0
  1186. package/build/bitbucket-client/services/JiraIntegrationService.js +102 -0
  1187. package/build/bitbucket-client/services/JiraIntegrationService.js.map +1 -0
  1188. package/build/bitbucket-client/services/MarkupService.d.ts +19 -0
  1189. package/build/bitbucket-client/services/MarkupService.d.ts.map +1 -0
  1190. package/build/bitbucket-client/services/MarkupService.js +36 -0
  1191. package/build/bitbucket-client/services/MarkupService.js.map +1 -0
  1192. package/build/bitbucket-client/services/MirroringMirrorService.d.ts +182 -0
  1193. package/build/bitbucket-client/services/MirroringMirrorService.d.ts.map +1 -0
  1194. package/build/bitbucket-client/services/MirroringMirrorService.js +375 -0
  1195. package/build/bitbucket-client/services/MirroringMirrorService.js.map +1 -0
  1196. package/build/bitbucket-client/services/MirroringUpstreamService.d.ts +215 -0
  1197. package/build/bitbucket-client/services/MirroringUpstreamService.d.ts.map +1 -0
  1198. package/build/bitbucket-client/services/MirroringUpstreamService.js +405 -0
  1199. package/build/bitbucket-client/services/MirroringUpstreamService.js.map +1 -0
  1200. package/build/bitbucket-client/services/PermissionManagementService.d.ts +713 -0
  1201. package/build/bitbucket-client/services/PermissionManagementService.d.ts.map +1 -0
  1202. package/build/bitbucket-client/services/PermissionManagementService.js +1210 -0
  1203. package/build/bitbucket-client/services/PermissionManagementService.js.map +1 -0
  1204. package/build/bitbucket-client/services/ProjectService.d.ts +1082 -0
  1205. package/build/bitbucket-client/services/ProjectService.d.ts.map +1 -0
  1206. package/build/bitbucket-client/services/ProjectService.js +2096 -0
  1207. package/build/bitbucket-client/services/ProjectService.js.map +1 -0
  1208. package/build/bitbucket-client/services/PullRequestsService.d.ts +1370 -0
  1209. package/build/bitbucket-client/services/PullRequestsService.d.ts.map +1 -0
  1210. package/build/bitbucket-client/services/PullRequestsService.js +2481 -0
  1211. package/build/bitbucket-client/services/PullRequestsService.js.map +1 -0
  1212. package/build/bitbucket-client/services/RepositoryService.d.ts +1734 -0
  1213. package/build/bitbucket-client/services/RepositoryService.d.ts.map +1 -0
  1214. package/build/bitbucket-client/services/RepositoryService.js +3228 -0
  1215. package/build/bitbucket-client/services/RepositoryService.js.map +1 -0
  1216. package/build/bitbucket-client/services/SecurityService.d.ts +542 -0
  1217. package/build/bitbucket-client/services/SecurityService.d.ts.map +1 -0
  1218. package/build/bitbucket-client/services/SecurityService.js +1049 -0
  1219. package/build/bitbucket-client/services/SecurityService.js.map +1 -0
  1220. package/build/bitbucket-client/services/SystemMaintenanceService.d.ts +1174 -0
  1221. package/build/bitbucket-client/services/SystemMaintenanceService.d.ts.map +1 -0
  1222. package/build/bitbucket-client/services/SystemMaintenanceService.js +1996 -0
  1223. package/build/bitbucket-client/services/SystemMaintenanceService.js.map +1 -0
  1224. package/build/bitbucket-response-mapper.d.ts +8 -0
  1225. package/build/bitbucket-response-mapper.d.ts.map +1 -0
  1226. package/build/bitbucket-response-mapper.js +102 -0
  1227. package/build/bitbucket-response-mapper.js.map +1 -0
  1228. package/build/bitbucket-service.d.ts +1655 -0
  1229. package/build/bitbucket-service.d.ts.map +1 -0
  1230. package/build/bitbucket-service.js +2186 -0
  1231. package/build/bitbucket-service.js.map +1 -0
  1232. package/build/config.d.ts +6 -0
  1233. package/build/config.d.ts.map +1 -0
  1234. package/build/config.js +22 -0
  1235. package/build/config.js.map +1 -0
  1236. package/build/inbox-pr-mapper.d.ts +39 -0
  1237. package/build/inbox-pr-mapper.d.ts.map +1 -0
  1238. package/build/inbox-pr-mapper.js +76 -0
  1239. package/build/inbox-pr-mapper.js.map +1 -0
  1240. package/build/index.d.ts +2 -0
  1241. package/build/index.d.ts.map +1 -0
  1242. package/build/index.js +332 -0
  1243. package/build/index.js.map +1 -0
  1244. package/build/pr-changes-mapper.d.ts +32 -0
  1245. package/build/pr-changes-mapper.d.ts.map +1 -0
  1246. package/build/pr-changes-mapper.js +111 -0
  1247. package/build/pr-changes-mapper.js.map +1 -0
  1248. package/build/pr-comment-mapper.d.ts +55 -0
  1249. package/build/pr-comment-mapper.d.ts.map +1 -0
  1250. package/build/pr-comment-mapper.js +182 -0
  1251. package/build/pr-comment-mapper.js.map +1 -0
  1252. package/build/setup.d.ts +2 -0
  1253. package/build/setup.d.ts.map +1 -0
  1254. package/build/setup.js +16 -0
  1255. package/build/setup.js.map +1 -0
  1256. package/jest.config.js +24 -0
  1257. package/package.json +53 -0
  1258. package/server.json +51 -0
  1259. package/src/__tests__/bitbucket-service.test.ts +4626 -0
  1260. package/src/__tests__/bitbucket-token-optimization.test.ts +429 -0
  1261. package/src/__tests__/config.test.ts +64 -0
  1262. package/src/__tests__/inbox-pr-mapper.test.ts +347 -0
  1263. package/src/__tests__/pr-changes-mapper.test.ts +420 -0
  1264. package/src/__tests__/pr-comment-mapper.test.ts +559 -0
  1265. package/src/bitbucket-client/core/ApiError.ts +26 -0
  1266. package/src/bitbucket-client/core/ApiRequestOptions.ts +17 -0
  1267. package/src/bitbucket-client/core/ApiResult.ts +11 -0
  1268. package/src/bitbucket-client/core/CancelablePromise.ts +131 -0
  1269. package/src/bitbucket-client/core/OpenAPI.ts +33 -0
  1270. package/src/bitbucket-client/core/request.ts +337 -0
  1271. package/src/bitbucket-client/index.ts +303 -0
  1272. package/src/bitbucket-client/models/AdminPasswordUpdate.ts +10 -0
  1273. package/src/bitbucket-client/models/ApplicationId.ts +5 -0
  1274. package/src/bitbucket-client/models/ApplicationUser.ts +7 -0
  1275. package/src/bitbucket-client/models/AuthenticationEntity.ts +13 -0
  1276. package/src/bitbucket-client/models/AuthenticationResponse.ts +7 -0
  1277. package/src/bitbucket-client/models/BasicAuthConfigEntity.ts +7 -0
  1278. package/src/bitbucket-client/models/CaptchaDataEntity.ts +7 -0
  1279. package/src/bitbucket-client/models/Comment.ts +38 -0
  1280. package/src/bitbucket-client/models/CommentOperations.ts +10 -0
  1281. package/src/bitbucket-client/models/CommentThread.ts +22 -0
  1282. package/src/bitbucket-client/models/CommentThreadDiffAnchor.ts +46 -0
  1283. package/src/bitbucket-client/models/Commentable.ts +5 -0
  1284. package/src/bitbucket-client/models/Context.ts +8 -0
  1285. package/src/bitbucket-client/models/ConversationDTO.ts +8 -0
  1286. package/src/bitbucket-client/models/Credentials.ts +10 -0
  1287. package/src/bitbucket-client/models/CredentialsCheckFailedDTO.ts +7 -0
  1288. package/src/bitbucket-client/models/DiffContentFilter.ts +5 -0
  1289. package/src/bitbucket-client/models/ElevationMethodRestDTO.ts +7 -0
  1290. package/src/bitbucket-client/models/EnrichedRepository.ts +7 -0
  1291. package/src/bitbucket-client/models/ErrorEntity.ts +7 -0
  1292. package/src/bitbucket-client/models/ExampleAvatarMultipartFormData.ts +11 -0
  1293. package/src/bitbucket-client/models/ExampleCertificateMultipartFormData.ts +11 -0
  1294. package/src/bitbucket-client/models/ExampleFiles.ts +7 -0
  1295. package/src/bitbucket-client/models/ExampleJsonLastModifiedCallback.ts +7 -0
  1296. package/src/bitbucket-client/models/ExampleMultipartFormData.ts +27 -0
  1297. package/src/bitbucket-client/models/ExamplePostMultipartFormData.ts +23 -0
  1298. package/src/bitbucket-client/models/ExamplePreviewMigration.ts +7 -0
  1299. package/src/bitbucket-client/models/ExamplePutMultipartFormData.ts +19 -0
  1300. package/src/bitbucket-client/models/ExampleRequirements.ts +7 -0
  1301. package/src/bitbucket-client/models/ExampleSettings.ts +7 -0
  1302. package/src/bitbucket-client/models/ExampleSettingsMap.ts +7 -0
  1303. package/src/bitbucket-client/models/ExampleSocketAddress.ts +7 -0
  1304. package/src/bitbucket-client/models/ExampleStatus.ts +7 -0
  1305. package/src/bitbucket-client/models/FileListResource.ts +7 -0
  1306. package/src/bitbucket-client/models/FilePart.ts +13 -0
  1307. package/src/bitbucket-client/models/Group.ts +7 -0
  1308. package/src/bitbucket-client/models/GroupAndUsers.ts +9 -0
  1309. package/src/bitbucket-client/models/GroupPickerContext.ts +9 -0
  1310. package/src/bitbucket-client/models/IdpConfigEntity.ts +7 -0
  1311. package/src/bitbucket-client/models/JitConfigEntity.ts +7 -0
  1312. package/src/bitbucket-client/models/JitUserEntity.ts +7 -0
  1313. package/src/bitbucket-client/models/LineNumberRange.ts +10 -0
  1314. package/src/bitbucket-client/models/LoginOptionEntity.ts +7 -0
  1315. package/src/bitbucket-client/models/MethodStateDTO.ts +7 -0
  1316. package/src/bitbucket-client/models/NextLoginStepDTO.ts +7 -0
  1317. package/src/bitbucket-client/models/OptionalBodyBeanParam.ts +5 -0
  1318. package/src/bitbucket-client/models/PageRequestImpl.ts +9 -0
  1319. package/src/bitbucket-client/models/PasswordElevationRestDTO.ts +8 -0
  1320. package/src/bitbucket-client/models/Project.ts +19 -0
  1321. package/src/bitbucket-client/models/PropertyMap.ts +7 -0
  1322. package/src/bitbucket-client/models/PullRequest.ts +36 -0
  1323. package/src/bitbucket-client/models/PullRequestParticipant.ts +28 -0
  1324. package/src/bitbucket-client/models/PullRequestRef.ts +15 -0
  1325. package/src/bitbucket-client/models/RefType.ts +7 -0
  1326. package/src/bitbucket-client/models/Repository.ts +36 -0
  1327. package/src/bitbucket-client/models/RepositoryHookDetails.ts +7 -0
  1328. package/src/bitbucket-client/models/RestAccessToken.ts +7 -0
  1329. package/src/bitbucket-client/models/RestAccessTokenRequest.ts +10 -0
  1330. package/src/bitbucket-client/models/RestAggregateRejectCounter.ts +7 -0
  1331. package/src/bitbucket-client/models/RestAnalyticsSettings.ts +7 -0
  1332. package/src/bitbucket-client/models/RestAnnouncementBanner.ts +7 -0
  1333. package/src/bitbucket-client/models/RestApplicationProperties.ts +7 -0
  1334. package/src/bitbucket-client/models/RestApplicationUser.ts +7 -0
  1335. package/src/bitbucket-client/models/RestApplicationUserWithPermissions.ts +7 -0
  1336. package/src/bitbucket-client/models/RestApplySuggestionRequest.ts +11 -0
  1337. package/src/bitbucket-client/models/RestAttachmentMetadata.ts +7 -0
  1338. package/src/bitbucket-client/models/RestAuthenticationRequest.ts +11 -0
  1339. package/src/bitbucket-client/models/RestAutoDeclineSettings.ts +7 -0
  1340. package/src/bitbucket-client/models/RestAutoDeclineSettingsRequest.ts +9 -0
  1341. package/src/bitbucket-client/models/RestAutoMergeProcessingResult.ts +7 -0
  1342. package/src/bitbucket-client/models/RestAutoMergeProjectSettingsRequest.ts +16 -0
  1343. package/src/bitbucket-client/models/RestAutoMergeRequest.ts +7 -0
  1344. package/src/bitbucket-client/models/RestAutoMergeRestrictedSettings.ts +7 -0
  1345. package/src/bitbucket-client/models/RestAutoMergeSettingsRequest.ts +8 -0
  1346. package/src/bitbucket-client/models/RestBearerTokenCredentials.ts +8 -0
  1347. package/src/bitbucket-client/models/RestBitbucketLicense.ts +7 -0
  1348. package/src/bitbucket-client/models/RestBranch.ts +7 -0
  1349. package/src/bitbucket-client/models/RestBranchCreateRequest.ts +15 -0
  1350. package/src/bitbucket-client/models/RestBranchDeleteRequest.ts +19 -0
  1351. package/src/bitbucket-client/models/RestBuildCapabilities.ts +7 -0
  1352. package/src/bitbucket-client/models/RestBuildStats.ts +7 -0
  1353. package/src/bitbucket-client/models/RestBuildStatus.ts +7 -0
  1354. package/src/bitbucket-client/models/RestBuildStatusSetRequest.ts +31 -0
  1355. package/src/bitbucket-client/models/RestBulkAddInsightAnnotationRequest.ts +10 -0
  1356. package/src/bitbucket-client/models/RestBulkUserRateLimitSettingsUpdateRequest.ts +13 -0
  1357. package/src/bitbucket-client/models/RestChange.ts +7 -0
  1358. package/src/bitbucket-client/models/RestChangeset.ts +7 -0
  1359. package/src/bitbucket-client/models/RestClusterInformation.ts +7 -0
  1360. package/src/bitbucket-client/models/RestClusterNode.ts +7 -0
  1361. package/src/bitbucket-client/models/RestComment.ts +7 -0
  1362. package/src/bitbucket-client/models/RestCommentJiraIssue.ts +7 -0
  1363. package/src/bitbucket-client/models/RestCommentThreadDiffAnchor.ts +7 -0
  1364. package/src/bitbucket-client/models/RestCommit.ts +7 -0
  1365. package/src/bitbucket-client/models/RestCommitMessageSuggestion.ts +7 -0
  1366. package/src/bitbucket-client/models/RestConflict.ts +7 -0
  1367. package/src/bitbucket-client/models/RestConflictChange.ts +7 -0
  1368. package/src/bitbucket-client/models/RestConnectivitySummary.ts +7 -0
  1369. package/src/bitbucket-client/models/RestCreateBranchRequest.ts +10 -0
  1370. package/src/bitbucket-client/models/RestCreateTagRequest.ts +10 -0
  1371. package/src/bitbucket-client/models/RestDefaultBranch.ts +8 -0
  1372. package/src/bitbucket-client/models/RestDefaultReviewersRequest.ts +38 -0
  1373. package/src/bitbucket-client/models/RestDefaultTask.ts +7 -0
  1374. package/src/bitbucket-client/models/RestDefaultTaskRequest.ts +33 -0
  1375. package/src/bitbucket-client/models/RestDelayedSyncRepository.ts +10 -0
  1376. package/src/bitbucket-client/models/RestDeployment.ts +7 -0
  1377. package/src/bitbucket-client/models/RestDeploymentEnvironment.ts +7 -0
  1378. package/src/bitbucket-client/models/RestDeploymentSetRequest.ts +28 -0
  1379. package/src/bitbucket-client/models/RestDetailedGroup.ts +7 -0
  1380. package/src/bitbucket-client/models/RestDetailedInvocation.ts +7 -0
  1381. package/src/bitbucket-client/models/RestDetailedUser.ts +7 -0
  1382. package/src/bitbucket-client/models/RestDiff.ts +7 -0
  1383. package/src/bitbucket-client/models/RestDiffHunk.ts +7 -0
  1384. package/src/bitbucket-client/models/RestDiffLine.ts +7 -0
  1385. package/src/bitbucket-client/models/RestDiffSegment.ts +7 -0
  1386. package/src/bitbucket-client/models/RestDiffStatsSummary.ts +7 -0
  1387. package/src/bitbucket-client/models/RestEmoticon.ts +7 -0
  1388. package/src/bitbucket-client/models/RestEnhancedEntityLink.ts +7 -0
  1389. package/src/bitbucket-client/models/RestErasedUser.ts +7 -0
  1390. package/src/bitbucket-client/models/RestErrorMessage.ts +7 -0
  1391. package/src/bitbucket-client/models/RestErrors.ts +7 -0
  1392. package/src/bitbucket-client/models/RestExportRequest.ts +13 -0
  1393. package/src/bitbucket-client/models/RestFarmSynchronizationRequest.ts +17 -0
  1394. package/src/bitbucket-client/models/RestGitTagCreateRequest.ts +18 -0
  1395. package/src/bitbucket-client/models/RestGpgKey.ts +7 -0
  1396. package/src/bitbucket-client/models/RestGpgSubKey.ts +7 -0
  1397. package/src/bitbucket-client/models/RestHookScript.ts +7 -0
  1398. package/src/bitbucket-client/models/RestHookScriptConfig.ts +7 -0
  1399. package/src/bitbucket-client/models/RestHookScriptTriggers.ts +8 -0
  1400. package/src/bitbucket-client/models/RestImportRequest.ts +8 -0
  1401. package/src/bitbucket-client/models/RestInsightAnnotation.ts +7 -0
  1402. package/src/bitbucket-client/models/RestInsightAnnotationsResponse.ts +7 -0
  1403. package/src/bitbucket-client/models/RestInsightReport.ts +7 -0
  1404. package/src/bitbucket-client/models/RestInsightReportData.ts +7 -0
  1405. package/src/bitbucket-client/models/RestInvocationHistory.ts +7 -0
  1406. package/src/bitbucket-client/models/RestInvocationRequest.ts +7 -0
  1407. package/src/bitbucket-client/models/RestInvocationResult.ts +7 -0
  1408. package/src/bitbucket-client/models/RestJiraIssue.ts +9 -0
  1409. package/src/bitbucket-client/models/RestJob.ts +7 -0
  1410. package/src/bitbucket-client/models/RestJobMessage.ts +7 -0
  1411. package/src/bitbucket-client/models/RestLabel.ts +7 -0
  1412. package/src/bitbucket-client/models/RestLabelable.ts +7 -0
  1413. package/src/bitbucket-client/models/RestLogLevel.ts +7 -0
  1414. package/src/bitbucket-client/models/RestLoggingSettings.ts +7 -0
  1415. package/src/bitbucket-client/models/RestMailConfiguration.ts +7 -0
  1416. package/src/bitbucket-client/models/RestMarkup.ts +7 -0
  1417. package/src/bitbucket-client/models/RestMeshConnectivityReport.ts +7 -0
  1418. package/src/bitbucket-client/models/RestMeshMigrationQueueStateCounts.ts +7 -0
  1419. package/src/bitbucket-client/models/RestMeshMigrationRequest.ts +14 -0
  1420. package/src/bitbucket-client/models/RestMeshMigrationSummary.ts +7 -0
  1421. package/src/bitbucket-client/models/RestMeshNode.ts +7 -0
  1422. package/src/bitbucket-client/models/RestMigrationRepository.ts +7 -0
  1423. package/src/bitbucket-client/models/RestMinimalCommit.ts +7 -0
  1424. package/src/bitbucket-client/models/RestMinimalRef.ts +7 -0
  1425. package/src/bitbucket-client/models/RestMirrorHashes.ts +7 -0
  1426. package/src/bitbucket-client/models/RestMirrorRepositorySynchronizationStatus.ts +7 -0
  1427. package/src/bitbucket-client/models/RestMirrorServer.ts +7 -0
  1428. package/src/bitbucket-client/models/RestMirrorUpgradeRequest.ts +9 -0
  1429. package/src/bitbucket-client/models/RestMirroredRepository.ts +7 -0
  1430. package/src/bitbucket-client/models/RestMirroredRepositoryDescriptor.ts +7 -0
  1431. package/src/bitbucket-client/models/RestMirroringRequest.ts +7 -0
  1432. package/src/bitbucket-client/models/RestMultilineCommentMarker.ts +7 -0
  1433. package/src/bitbucket-client/models/RestMultilineCommentSpan.ts +7 -0
  1434. package/src/bitbucket-client/models/RestMultipleBuildStats.ts +7 -0
  1435. package/src/bitbucket-client/models/RestNamedLink.ts +7 -0
  1436. package/src/bitbucket-client/models/RestNode.ts +7 -0
  1437. package/src/bitbucket-client/models/RestNodeConnectivityReport.ts +7 -0
  1438. package/src/bitbucket-client/models/RestNodeConnectivitySummary.ts +7 -0
  1439. package/src/bitbucket-client/models/RestPageIdpConfigEntity.ts +14 -0
  1440. package/src/bitbucket-client/models/RestPageLoginOptionEntity.ts +14 -0
  1441. package/src/bitbucket-client/models/RestPageRestChange.ts +7 -0
  1442. package/src/bitbucket-client/models/RestPath.ts +7 -0
  1443. package/src/bitbucket-client/models/RestPermitted.ts +7 -0
  1444. package/src/bitbucket-client/models/RestPermittedGroup.ts +7 -0
  1445. package/src/bitbucket-client/models/RestPermittedUser.ts +7 -0
  1446. package/src/bitbucket-client/models/RestPerson.ts +7 -0
  1447. package/src/bitbucket-client/models/RestProgress.ts +7 -0
  1448. package/src/bitbucket-client/models/RestProject.ts +7 -0
  1449. package/src/bitbucket-client/models/RestProjectSettingsRestriction.ts +7 -0
  1450. package/src/bitbucket-client/models/RestProjectSettingsRestrictionRequest.ts +10 -0
  1451. package/src/bitbucket-client/models/RestProperties.ts +7 -0
  1452. package/src/bitbucket-client/models/RestPullRequest.ts +7 -0
  1453. package/src/bitbucket-client/models/RestPullRequestActivity.ts +7 -0
  1454. package/src/bitbucket-client/models/RestPullRequestAssignParticipantRoleRequest.ts +30 -0
  1455. package/src/bitbucket-client/models/RestPullRequestAssignStatusRequest.ts +16 -0
  1456. package/src/bitbucket-client/models/RestPullRequestCommitMessageTemplate.ts +7 -0
  1457. package/src/bitbucket-client/models/RestPullRequestCondition.ts +7 -0
  1458. package/src/bitbucket-client/models/RestPullRequestDeclineRequest.ts +9 -0
  1459. package/src/bitbucket-client/models/RestPullRequestDeleteRequest.ts +8 -0
  1460. package/src/bitbucket-client/models/RestPullRequestFinishReviewRequest.ts +10 -0
  1461. package/src/bitbucket-client/models/RestPullRequestMergeConfig.ts +7 -0
  1462. package/src/bitbucket-client/models/RestPullRequestMergeRequest.ts +12 -0
  1463. package/src/bitbucket-client/models/RestPullRequestMergeStrategy.ts +7 -0
  1464. package/src/bitbucket-client/models/RestPullRequestMergeability.ts +7 -0
  1465. package/src/bitbucket-client/models/RestPullRequestParticipant.ts +7 -0
  1466. package/src/bitbucket-client/models/RestPullRequestRebaseRequest.ts +8 -0
  1467. package/src/bitbucket-client/models/RestPullRequestRebaseResult.ts +7 -0
  1468. package/src/bitbucket-client/models/RestPullRequestRebaseability.ts +7 -0
  1469. package/src/bitbucket-client/models/RestPullRequestRef.ts +7 -0
  1470. package/src/bitbucket-client/models/RestPullRequestReopenRequest.ts +8 -0
  1471. package/src/bitbucket-client/models/RestPullRequestSettings.ts +7 -0
  1472. package/src/bitbucket-client/models/RestPullRequestSuggestion.ts +7 -0
  1473. package/src/bitbucket-client/models/RestPushRefChange.ts +7 -0
  1474. package/src/bitbucket-client/models/RestRateLimitSettings.ts +7 -0
  1475. package/src/bitbucket-client/models/RestRawAccessToken.ts +7 -0
  1476. package/src/bitbucket-client/models/RestRefChange.ts +7 -0
  1477. package/src/bitbucket-client/models/RestRefMatcher.ts +7 -0
  1478. package/src/bitbucket-client/models/RestRefMatcherType.ts +7 -0
  1479. package/src/bitbucket-client/models/RestRefRestriction.ts +7 -0
  1480. package/src/bitbucket-client/models/RestRefSyncQueue.ts +10 -0
  1481. package/src/bitbucket-client/models/RestRefSyncRequest.ts +19 -0
  1482. package/src/bitbucket-client/models/RestRefSyncStatus.ts +7 -0
  1483. package/src/bitbucket-client/models/RestRejectedRef.ts +7 -0
  1484. package/src/bitbucket-client/models/RestRelatedLinks.ts +7 -0
  1485. package/src/bitbucket-client/models/RestRepositoriesExportRequest.ts +10 -0
  1486. package/src/bitbucket-client/models/RestRepository.ts +7 -0
  1487. package/src/bitbucket-client/models/RestRepositoryHook.ts +7 -0
  1488. package/src/bitbucket-client/models/RestRepositoryHookVeto.ts +7 -0
  1489. package/src/bitbucket-client/models/RestRepositoryLockOwner.ts +7 -0
  1490. package/src/bitbucket-client/models/RestRepositoryMirrorEvent.ts +16 -0
  1491. package/src/bitbucket-client/models/RestRepositoryPolicy.ts +7 -0
  1492. package/src/bitbucket-client/models/RestRepositoryPullRequestSettings.ts +7 -0
  1493. package/src/bitbucket-client/models/RestRepositoryRefChangeActivity.ts +7 -0
  1494. package/src/bitbucket-client/models/RestRepositorySelector.ts +9 -0
  1495. package/src/bitbucket-client/models/RestRequiredBuildCondition.ts +7 -0
  1496. package/src/bitbucket-client/models/RestRequiredBuildConditionSetRequest.ts +31 -0
  1497. package/src/bitbucket-client/models/RestRestrictionRequest.ts +44 -0
  1498. package/src/bitbucket-client/models/RestReviewerGroup.ts +7 -0
  1499. package/src/bitbucket-client/models/RestRollingUpgradeState.ts +7 -0
  1500. package/src/bitbucket-client/models/RestScope.ts +7 -0
  1501. package/src/bitbucket-client/models/RestScopesExample.ts +7 -0
  1502. package/src/bitbucket-client/models/RestSecretScanningAllowlistRule.ts +7 -0
  1503. package/src/bitbucket-client/models/RestSecretScanningAllowlistRuleSetRequest.ts +19 -0
  1504. package/src/bitbucket-client/models/RestSecretScanningRule.ts +7 -0
  1505. package/src/bitbucket-client/models/RestSecretScanningRuleSetRequest.ts +19 -0
  1506. package/src/bitbucket-client/models/RestSetInsightReportRequest.ts +18 -0
  1507. package/src/bitbucket-client/models/RestSingleAddInsightAnnotationRequest.ts +14 -0
  1508. package/src/bitbucket-client/models/RestSshAccessKey.ts +7 -0
  1509. package/src/bitbucket-client/models/RestSshAccessKeyLocations.ts +12 -0
  1510. package/src/bitbucket-client/models/RestSshCredentials.ts +16 -0
  1511. package/src/bitbucket-client/models/RestSshKey.ts +7 -0
  1512. package/src/bitbucket-client/models/RestSshKeySettings.ts +7 -0
  1513. package/src/bitbucket-client/models/RestSshKeyTypeRestriction.ts +7 -0
  1514. package/src/bitbucket-client/models/RestSshSettings.ts +7 -0
  1515. package/src/bitbucket-client/models/RestSyncProgress.ts +7 -0
  1516. package/src/bitbucket-client/models/RestSystemSigningConfiguration.ts +7 -0
  1517. package/src/bitbucket-client/models/RestTag.ts +7 -0
  1518. package/src/bitbucket-client/models/RestTestResults.ts +7 -0
  1519. package/src/bitbucket-client/models/RestTokenBucketSettings.ts +7 -0
  1520. package/src/bitbucket-client/models/RestUpstreamServer.ts +7 -0
  1521. package/src/bitbucket-client/models/RestUpstreamSettings.ts +7 -0
  1522. package/src/bitbucket-client/models/RestUserDirectory.ts +7 -0
  1523. package/src/bitbucket-client/models/RestUserRateLimitSettings.ts +7 -0
  1524. package/src/bitbucket-client/models/RestUserRateLimitSettingsUpdateRequest.ts +12 -0
  1525. package/src/bitbucket-client/models/RestUserReaction.ts +7 -0
  1526. package/src/bitbucket-client/models/RestUsernamePasswordCredentials.ts +9 -0
  1527. package/src/bitbucket-client/models/RestWebhook.ts +7 -0
  1528. package/src/bitbucket-client/models/RestWebhookCredentials.ts +7 -0
  1529. package/src/bitbucket-client/models/RestWebhookRequestResponse.ts +7 -0
  1530. package/src/bitbucket-client/models/RestWebhookScope.ts +7 -0
  1531. package/src/bitbucket-client/models/RestX509Certificate.ts +7 -0
  1532. package/src/bitbucket-client/models/Scope.ts +16 -0
  1533. package/src/bitbucket-client/models/SimpleSshKeyFingerprint.ts +7 -0
  1534. package/src/bitbucket-client/models/SsoConfigEntity.ts +7 -0
  1535. package/src/bitbucket-client/models/SsoManagementStatusDTO.ts +7 -0
  1536. package/src/bitbucket-client/models/StatusDTO.ts +7 -0
  1537. package/src/bitbucket-client/models/TotpCodeVerificationDTO.ts +9 -0
  1538. package/src/bitbucket-client/models/TotpElevationRestDTO.ts +8 -0
  1539. package/src/bitbucket-client/models/TotpRecoveryCodeAuthenticationDTO.ts +9 -0
  1540. package/src/bitbucket-client/models/TotpRecoveryCodeDTO.ts +7 -0
  1541. package/src/bitbucket-client/models/TotpUserEnrollmentDTO.ts +7 -0
  1542. package/src/bitbucket-client/models/UserAndGroups.ts +9 -0
  1543. package/src/bitbucket-client/models/UserPasswordUpdate.ts +10 -0
  1544. package/src/bitbucket-client/models/UserPickerContext.ts +9 -0
  1545. package/src/bitbucket-client/models/UserRename.ts +9 -0
  1546. package/src/bitbucket-client/models/UserUpdate.ts +10 -0
  1547. package/src/bitbucket-client/models/UserUpdateWithCredentials.ts +14 -0
  1548. package/src/bitbucket-client/services/AuthenticationService.ts +1652 -0
  1549. package/src/bitbucket-client/services/BuildsAndDeploymentsService.ts +849 -0
  1550. package/src/bitbucket-client/services/CapabilitiesService.ts +38 -0
  1551. package/src/bitbucket-client/services/DashboardService.ts +96 -0
  1552. package/src/bitbucket-client/services/DefaultService.ts +46 -0
  1553. package/src/bitbucket-client/services/DeprecatedService.ts +396 -0
  1554. package/src/bitbucket-client/services/JiraIntegrationService.ts +133 -0
  1555. package/src/bitbucket-client/services/MarkupService.ts +48 -0
  1556. package/src/bitbucket-client/services/MirroringMirrorService.ts +421 -0
  1557. package/src/bitbucket-client/services/MirroringUpstreamService.ts +487 -0
  1558. package/src/bitbucket-client/services/PermissionManagementService.ts +1484 -0
  1559. package/src/bitbucket-client/services/ProjectService.ts +2502 -0
  1560. package/src/bitbucket-client/services/PullRequestsService.ts +2997 -0
  1561. package/src/bitbucket-client/services/RepositoryService.ts +3944 -0
  1562. package/src/bitbucket-client/services/SecurityService.ts +1253 -0
  1563. package/src/bitbucket-client/services/SystemMaintenanceService.ts +2279 -0
  1564. package/src/bitbucket-response-mapper.ts +127 -0
  1565. package/src/bitbucket-service.ts +3069 -0
  1566. package/src/config.ts +29 -0
  1567. package/src/inbox-pr-mapper.ts +183 -0
  1568. package/src/index.ts +811 -0
  1569. package/src/pr-changes-mapper.ts +216 -0
  1570. package/src/pr-comment-mapper.ts +399 -0
  1571. package/src/setup.ts +15 -0
  1572. package/tsconfig.json +12 -0
  1573. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,3069 @@
1
+ import { z } from 'zod';
2
+ import { BuildsAndDeploymentsService, DeprecatedService, OpenAPI, ProjectService, PullRequestsService, RepositoryService } from './bitbucket-client/index.js';
3
+ import { request as __request } from './bitbucket-client/core/request.js';
4
+ import { handleApiOperation, resolveOpenApiBase } from 'datacenter-mcp-core';
5
+ import { simplifyInboxPullRequests } from './inbox-pr-mapper.js';
6
+ import { BITBUCKET_PRODUCT, getDefaultPageSize, getMissingConfig } from './config.js';
7
+ import {
8
+ BitbucketMutationOutputMode,
9
+ BitbucketOutputMode,
10
+ shapePullRequestAck,
11
+ shapePullRequestChangesResponse,
12
+ shapePullRequestCommentAck,
13
+ shapePullRequestCommentsResponse,
14
+ } from './bitbucket-response-mapper.js';
15
+
16
+ function resolveToken(token: string | (() => string | undefined)) {
17
+ return async () => {
18
+ const resolvedToken = typeof token === 'function' ? token() : token;
19
+ return resolvedToken ?? '';
20
+ };
21
+ }
22
+
23
+ type DiffLineType = 'ADDED' | 'REMOVED' | 'CONTEXT';
24
+
25
+ /**
26
+ * Build a Bitbucket DC inline comment anchor.
27
+ *
28
+ * For a multiline range, Bitbucket DC (>= 9.3.0) requires `multilineMarker` + `multilineSpan`.
29
+ * The legacy `multilineStartLine`/`multilineStartLineType`/`multilineAnchor`/`multilineDestinationRange`
30
+ * fields are silently ignored by the server, which then stores a single-line anchor — so a multiline
31
+ * `​```suggestion` only replaces its first line on Apply. Field names verified against BB DC 9.3.2.
32
+ */
33
+ function buildCommentAnchor(params: {
34
+ filePath: string;
35
+ line?: number;
36
+ lineType?: DiffLineType;
37
+ startLine?: number;
38
+ startLineType?: DiffLineType;
39
+ }): Record<string, any> {
40
+ const { filePath, line, lineType } = params;
41
+ const anchor: Record<string, any> = { path: filePath, diffType: 'EFFECTIVE' };
42
+ if (line === undefined || !lineType) {
43
+ return anchor;
44
+ }
45
+
46
+ if (params.startLine === undefined) {
47
+ anchor.line = line;
48
+ anchor.lineType = lineType;
49
+ anchor.fileType = lineType === 'REMOVED' ? 'FROM' : 'TO';
50
+ return anchor;
51
+ }
52
+
53
+ // Normalize so the marker sits on the lower line and `line` on the upper line.
54
+ let startLine = params.startLine;
55
+ let startLineType: DiffLineType = params.startLineType ?? lineType;
56
+ let endLine = line;
57
+ let endLineType: DiffLineType = lineType;
58
+ if (startLine > endLine) {
59
+ [startLine, endLine] = [endLine, startLine];
60
+ [startLineType, endLineType] = [endLineType, startLineType];
61
+ }
62
+
63
+ const fileType = endLineType === 'REMOVED' ? 'FROM' : 'TO';
64
+ anchor.line = endLine;
65
+ anchor.lineType = endLineType;
66
+ anchor.fileType = fileType;
67
+ anchor.multilineMarker = { startLine, startLineType };
68
+ anchor.multilineSpan =
69
+ fileType === 'FROM'
70
+ ? { srcSpanStart: startLine, srcSpanEnd: endLine }
71
+ : { dstSpanStart: startLine, dstSpanEnd: endLine };
72
+ return anchor;
73
+ }
74
+
75
+ const SUGGESTION_BLOCK_RE = /```suggestion\b[^\n]*\n([\s\S]*?)```/;
76
+
77
+ /**
78
+ * Warn when a multi-line `​```suggestion` block is anchored to a single line: Bitbucket only replaces
79
+ * the anchored line on Apply, leaving the rest (duplicated code). Returns undefined when there is no
80
+ * concern. Heuristic — a 1-line anchor with a multi-line suggestion is the common failure shape.
81
+ */
82
+ function multilineSuggestionWarning(text: string, startLine?: number): string | undefined {
83
+ if (startLine !== undefined) {
84
+ return undefined;
85
+ }
86
+ const match = SUGGESTION_BLOCK_RE.exec(text);
87
+ if (!match) {
88
+ return undefined;
89
+ }
90
+ const suggestionLineCount = match[1].replace(/\n$/, '').split('\n').length;
91
+ if (suggestionLineCount <= 1) {
92
+ return undefined;
93
+ }
94
+ return (
95
+ 'The comment contains a multi-line ```suggestion block but is anchored to a single line. ' +
96
+ 'On Apply, Bitbucket replaces only that one line and leaves the rest. To replace multiple lines, ' +
97
+ 'set startLine (first replaced line) and line (last replaced line) to span the whole range.'
98
+ );
99
+ }
100
+
101
+ export class BitbucketService {
102
+ private readonly getPageSize: () => number;
103
+
104
+ constructor(
105
+ host: string | undefined,
106
+ token: string | (() => string | undefined),
107
+ apiBasePath?: string,
108
+ getPageSize: () => number = getDefaultPageSize,
109
+ ) {
110
+ OpenAPI.BASE = resolveOpenApiBase({
111
+ host,
112
+ apiBasePath,
113
+ defaultBasePath: BITBUCKET_PRODUCT.defaultApiBasePath ?? '/rest',
114
+ strippableSuffixes: BITBUCKET_PRODUCT.apiBasePathStrippableSuffixes,
115
+ });
116
+ OpenAPI.TOKEN = resolveToken(token);
117
+ OpenAPI.VERSION = '1.0';
118
+ this.getPageSize = getPageSize;
119
+ }
120
+
121
+ /**
122
+ * Get commits for a repository
123
+ * @param projectKey The project key
124
+ * @param repositorySlug The repository slug
125
+ * @param path Optional path to filter commits by
126
+ * @param since Optional commit ID to retrieve commits after
127
+ * @param until Optional commit ID to retrieve commits before
128
+ * @param limit Optional pagination limit (default: 25)
129
+ * @returns Promise with commits data
130
+ */
131
+ async getCommits(projectKey: string, repositorySlug: string, path?: string, since?: string, until?: string,
132
+ limit?: number
133
+ ) {
134
+ projectKey = projectKey.toUpperCase();
135
+ repositorySlug = repositorySlug.toLowerCase();
136
+ return handleApiOperation(
137
+ () => RepositoryService.getCommits(
138
+ projectKey,
139
+ repositorySlug,
140
+ undefined, // avatarScheme
141
+ path,
142
+ undefined, // withCounts
143
+ undefined, // followRenames
144
+ until,
145
+ undefined, // avatarSize
146
+ since,
147
+ undefined, // merges
148
+ undefined, // ignoreMissing
149
+ 0, // start
150
+ limit ?? this.getPageSize()
151
+ ),
152
+ 'Error fetching commits'
153
+ );
154
+ }
155
+
156
+ /**
157
+ * Get a single commit by id
158
+ * @param projectKey The project key
159
+ * @param repositorySlug The repository slug
160
+ * @param commitId The commit id (hash) to retrieve
161
+ * @param path Optional path; if given, the commit is only returned if it affects this path
162
+ * @returns Promise with the commit data
163
+ */
164
+ async getCommit(projectKey: string, repositorySlug: string, commitId: string, path?: string) {
165
+ projectKey = projectKey.toUpperCase();
166
+ repositorySlug = repositorySlug.toLowerCase();
167
+ return handleApiOperation(
168
+ () => RepositoryService.getCommit(projectKey, commitId, repositorySlug, path),
169
+ 'Error fetching commit'
170
+ );
171
+ }
172
+
173
+ /**
174
+ * List build statuses for a commit
175
+ * @param commitId The commit id (hash) whose build statuses to list
176
+ * @param orderBy Optional ordering of the results
177
+ * @param start Optional pagination start
178
+ * @param limit Optional pagination limit (defaults to the package page size)
179
+ * @returns Promise with the build statuses
180
+ * @remarks Uses the global (repository-agnostic) build-status API, keyed only by commit id.
181
+ */
182
+ async listBuildStatuses(commitId: string, orderBy?: string, start?: number, limit?: number) {
183
+ return handleApiOperation(
184
+ () => DeprecatedService.getBuildStatus(commitId, orderBy, start, limit ?? this.getPageSize()),
185
+ 'Error fetching build statuses'
186
+ );
187
+ }
188
+
189
+ /**
190
+ * Add (or update) a build status for a commit
191
+ * @param projectKey The project key
192
+ * @param repositorySlug The repository slug
193
+ * @param commitId The commit id (hash) to attach the build status to
194
+ * @param state The build state: SUCCESSFUL, FAILED, or INPROGRESS
195
+ * @param key A unique key identifying the build (e.g. the pipeline/plan key)
196
+ * @param url The URL to the build result
197
+ * @param name Optional display name for the build
198
+ * @param description Optional description for the build
199
+ * @returns Promise resolving to an acknowledgement
200
+ */
201
+ async addBuildStatus(
202
+ projectKey: string,
203
+ repositorySlug: string,
204
+ commitId: string,
205
+ state: 'SUCCESSFUL' | 'FAILED' | 'INPROGRESS',
206
+ key: string,
207
+ url: string,
208
+ name?: string,
209
+ description?: string
210
+ ) {
211
+ projectKey = projectKey.toUpperCase();
212
+ repositorySlug = repositorySlug.toLowerCase();
213
+ const requestBody: any = { state, key, url, ...(name ? { name } : {}), ...(description ? { description } : {}) };
214
+ const result = await handleApiOperation(
215
+ () => BuildsAndDeploymentsService.add(projectKey, commitId, repositorySlug, requestBody),
216
+ 'Error adding build status'
217
+ );
218
+ if (result.success) {
219
+ return { ...result, data: { added: true, commitId, key } };
220
+ }
221
+ return result;
222
+ }
223
+
224
+ /**
225
+ * Get a single build status for a commit by its key
226
+ * @param projectKey The project key
227
+ * @param repositorySlug The repository slug
228
+ * @param commitId The commit id (hash)
229
+ * @param key The unique key of the build status to fetch
230
+ * @returns Promise with the build status
231
+ */
232
+ async getBuildStatus(projectKey: string, repositorySlug: string, commitId: string, key: string) {
233
+ projectKey = projectKey.toUpperCase();
234
+ repositorySlug = repositorySlug.toLowerCase();
235
+ return handleApiOperation(
236
+ () => BuildsAndDeploymentsService.get(projectKey, commitId, repositorySlug, key),
237
+ 'Error fetching build status'
238
+ );
239
+ }
240
+
241
+ /**
242
+ * Get the raw content of a file at a given revision
243
+ * @param projectKey The project key
244
+ * @param repositorySlug The repository slug
245
+ * @param path The path of the file to retrieve
246
+ * @param at Optional commit hash or ref (e.g. 'refs/heads/main'); defaults to the default branch
247
+ * @returns Promise with the raw file content
248
+ */
249
+ async getFileContent(
250
+ projectKey: string,
251
+ repositorySlug: string,
252
+ path: string,
253
+ at?: string
254
+ ) {
255
+ projectKey = projectKey.toUpperCase();
256
+ repositorySlug = repositorySlug.toLowerCase();
257
+ return handleApiOperation(
258
+ () => RepositoryService.streamRaw(path, projectKey, repositorySlug, at),
259
+ 'Error fetching file content'
260
+ );
261
+ }
262
+
263
+ /**
264
+ * Get the diff of a single commit
265
+ * @param projectKey The project key
266
+ * @param repositorySlug The repository slug
267
+ * @param commitId The commit id (hash)
268
+ * @param path Optional file path to limit the diff to; omit for the whole-commit diff
269
+ * @param contextLines Optional number of context lines around changes
270
+ * @param whitespace Optional whitespace flag (e.g. 'ignore-all')
271
+ * @param srcPath Optional previous path if the file was copied/moved/renamed
272
+ * @returns Promise with the commit diff
273
+ */
274
+ async getCommitDiff(
275
+ projectKey: string,
276
+ repositorySlug: string,
277
+ commitId: string,
278
+ path: string = '',
279
+ contextLines?: string,
280
+ whitespace?: string,
281
+ srcPath?: string
282
+ ) {
283
+ projectKey = projectKey.toUpperCase();
284
+ repositorySlug = repositorySlug.toLowerCase();
285
+ return handleApiOperation(
286
+ () => RepositoryService.streamDiff(
287
+ commitId,
288
+ repositorySlug,
289
+ path,
290
+ projectKey,
291
+ srcPath,
292
+ undefined, // avatarSize
293
+ undefined, // filter
294
+ undefined, // avatarScheme
295
+ contextLines,
296
+ undefined, // autoSrcPath
297
+ whitespace,
298
+ undefined, // withComments
299
+ undefined // since
300
+ ),
301
+ 'Error fetching commit diff'
302
+ );
303
+ }
304
+
305
+ /**
306
+ * Browse a repository file or directory
307
+ * @param projectKey The project key
308
+ * @param repositorySlug The repository slug
309
+ * @param path Optional path to browse; defaults to the repository root (directory listing)
310
+ * @param at Optional commit hash or ref; defaults to the default branch
311
+ * @param type If true, return only the node type (FILE, DIRECTORY, SUBMODULE) instead of content
312
+ * @param blame If true, include blame information
313
+ * @returns Promise with the browse result (directory children or paginated file lines)
314
+ */
315
+ async browseRepository(
316
+ projectKey: string,
317
+ repositorySlug: string,
318
+ path: string = '',
319
+ at?: string,
320
+ type?: boolean,
321
+ blame?: boolean
322
+ ) {
323
+ projectKey = projectKey.toUpperCase();
324
+ repositorySlug = repositorySlug.toLowerCase();
325
+ return handleApiOperation(
326
+ () => RepositoryService.getContent1(
327
+ path,
328
+ projectKey,
329
+ repositorySlug,
330
+ undefined, // noContent
331
+ at,
332
+ undefined, // size
333
+ blame ? 'true' : undefined,
334
+ type ? 'true' : undefined
335
+ ),
336
+ 'Error browsing repository content'
337
+ );
338
+ }
339
+
340
+ /**
341
+ * Get comments on a commit
342
+ * @param projectKey The project key
343
+ * @param repositorySlug The repository slug
344
+ * @param commitId The commit id (hash)
345
+ * @param path The file path to return comments for (required by Bitbucket when retrieving commit comments)
346
+ * @param since Optional commit id; return comments added since that commit
347
+ * @param start Optional pagination start
348
+ * @param limit Optional pagination limit (defaults to the package page size)
349
+ * @returns Promise with the commit comments
350
+ */
351
+ async getCommitComments(
352
+ projectKey: string,
353
+ repositorySlug: string,
354
+ commitId: string,
355
+ path: string,
356
+ since?: string,
357
+ start?: number,
358
+ limit?: number
359
+ ) {
360
+ projectKey = projectKey.toUpperCase();
361
+ repositorySlug = repositorySlug.toLowerCase();
362
+ return handleApiOperation(
363
+ () => RepositoryService.getComments(projectKey, commitId, repositorySlug, path, since, start, limit ?? this.getPageSize()),
364
+ 'Error fetching commit comments'
365
+ );
366
+ }
367
+
368
+ /**
369
+ * Compare two refs (commits or changes)
370
+ * @param projectKey The project key
371
+ * @param repositorySlug The repository slug
372
+ * @param from The source ref/commit to compare from
373
+ * @param to The target ref/commit to compare to
374
+ * @param fromRepo Optional repository (projectKey/repositorySlug) the 'from' ref lives in, for cross-repo compares
375
+ * @param compareType 'commits' (default) to list commits between the refs, or 'changes' to list changed files
376
+ * @param start Optional pagination start
377
+ * @param limit Optional pagination limit (defaults to the package page size)
378
+ * @returns Promise with the comparison data
379
+ */
380
+ async compareRefs(
381
+ projectKey: string,
382
+ repositorySlug: string,
383
+ from: string,
384
+ to: string,
385
+ fromRepo?: string,
386
+ compareType: 'commits' | 'changes' = 'commits',
387
+ start?: number,
388
+ limit?: number
389
+ ) {
390
+ projectKey = projectKey.toUpperCase();
391
+ repositorySlug = repositorySlug.toLowerCase();
392
+ const pageSize = limit ?? this.getPageSize();
393
+ return handleApiOperation(
394
+ () => compareType === 'changes'
395
+ ? RepositoryService.streamChanges(projectKey, repositorySlug, fromRepo, from, to, start, pageSize)
396
+ : RepositoryService.streamCommits(projectKey, repositorySlug, fromRepo, from, to, start, pageSize),
397
+ 'Error comparing refs'
398
+ );
399
+ }
400
+
401
+ /**
402
+ * Create or replace a Code Insights report on a commit
403
+ * @param projectKey The project key
404
+ * @param repositorySlug The repository slug
405
+ * @param commitId The commit id (hash) the report is attached to
406
+ * @param key A unique key identifying the report (namespaced, e.g. 'mycompany.eslint')
407
+ * @param report The report payload (title required; optional details, result PASS/FAIL, reporter, link, logoUrl, data[])
408
+ * @returns Promise with the created report
409
+ */
410
+ async setInsightReport(
411
+ projectKey: string,
412
+ repositorySlug: string,
413
+ commitId: string,
414
+ key: string,
415
+ report: Record<string, any>
416
+ ) {
417
+ projectKey = projectKey.toUpperCase();
418
+ repositorySlug = repositorySlug.toLowerCase();
419
+ return handleApiOperation(
420
+ () => BuildsAndDeploymentsService.setACodeInsightsReport(projectKey, commitId, repositorySlug, key, report as any),
421
+ 'Error setting code insights report'
422
+ );
423
+ }
424
+
425
+ /**
426
+ * Get a Code Insights report on a commit
427
+ */
428
+ async getInsightReport(projectKey: string, repositorySlug: string, commitId: string, key: string) {
429
+ projectKey = projectKey.toUpperCase();
430
+ repositorySlug = repositorySlug.toLowerCase();
431
+ return handleApiOperation(
432
+ () => BuildsAndDeploymentsService.getACodeInsightsReport(projectKey, commitId, repositorySlug, key),
433
+ 'Error fetching code insights report'
434
+ );
435
+ }
436
+
437
+ /**
438
+ * Delete a Code Insights report (and its annotations) on a commit
439
+ */
440
+ async deleteInsightReport(projectKey: string, repositorySlug: string, commitId: string, key: string) {
441
+ projectKey = projectKey.toUpperCase();
442
+ repositorySlug = repositorySlug.toLowerCase();
443
+ const result = await handleApiOperation(
444
+ () => BuildsAndDeploymentsService.deleteACodeInsightsReport(projectKey, commitId, repositorySlug, key),
445
+ 'Error deleting code insights report'
446
+ );
447
+ if (result.success) {
448
+ return { ...result, data: { deleted: true, key } };
449
+ }
450
+ return result;
451
+ }
452
+
453
+ /**
454
+ * Add annotations to a Code Insights report (bulk)
455
+ * @param annotations Array of annotations; each: { externalId, path, line, message, severity (LOW/MEDIUM/HIGH), link?, type? }
456
+ */
457
+ async addInsightAnnotations(
458
+ projectKey: string,
459
+ repositorySlug: string,
460
+ commitId: string,
461
+ key: string,
462
+ annotations: Array<Record<string, any>>
463
+ ) {
464
+ projectKey = projectKey.toUpperCase();
465
+ repositorySlug = repositorySlug.toLowerCase();
466
+ const result = await handleApiOperation(
467
+ () => BuildsAndDeploymentsService.addAnnotations(projectKey, commitId, repositorySlug, key, { annotations } as any),
468
+ 'Error adding code insights annotations'
469
+ );
470
+ if (result.success) {
471
+ return { ...result, data: { added: annotations.length, key } };
472
+ }
473
+ return result;
474
+ }
475
+
476
+ /**
477
+ * Get annotations of a Code Insights report
478
+ */
479
+ async getInsightAnnotations(projectKey: string, repositorySlug: string, commitId: string, key: string) {
480
+ projectKey = projectKey.toUpperCase();
481
+ repositorySlug = repositorySlug.toLowerCase();
482
+ return handleApiOperation(
483
+ () => BuildsAndDeploymentsService.getAnnotations(projectKey, commitId, repositorySlug, key),
484
+ 'Error fetching code insights annotations'
485
+ );
486
+ }
487
+
488
+ /**
489
+ * Add a comment to a commit
490
+ * @param projectKey The project key
491
+ * @param repositorySlug The repository slug
492
+ * @param commitId The commit id (hash) to comment on
493
+ * @param text The comment text
494
+ * @param path Optional file path to anchor the comment to a file
495
+ * @param line Optional line number within the file to anchor the comment to
496
+ * @param lineType Optional line type for the anchored line (ADDED, REMOVED, or CONTEXT)
497
+ * @returns Promise with the created comment
498
+ */
499
+ async addCommitComment(
500
+ projectKey: string,
501
+ repositorySlug: string,
502
+ commitId: string,
503
+ text: string,
504
+ path?: string,
505
+ line?: number,
506
+ lineType?: 'ADDED' | 'REMOVED' | 'CONTEXT'
507
+ ) {
508
+ projectKey = projectKey.toUpperCase();
509
+ repositorySlug = repositorySlug.toLowerCase();
510
+ const requestBody: any = { text };
511
+ if (path) {
512
+ requestBody.anchor = {
513
+ path,
514
+ ...(line !== undefined ? { line, lineType: lineType ?? 'CONTEXT', fileType: 'TO' } : {}),
515
+ };
516
+ }
517
+ return handleApiOperation(
518
+ () => RepositoryService.createComment(projectKey, commitId, repositorySlug, undefined, requestBody),
519
+ 'Error adding commit comment'
520
+ );
521
+ }
522
+
523
+ /**
524
+ * Delete annotations of a Code Insights report
525
+ * @param externalId Optional external id; when given, only that annotation is deleted, otherwise all
526
+ */
527
+ async deleteInsightAnnotations(
528
+ projectKey: string,
529
+ repositorySlug: string,
530
+ commitId: string,
531
+ key: string,
532
+ externalId?: string
533
+ ) {
534
+ projectKey = projectKey.toUpperCase();
535
+ repositorySlug = repositorySlug.toLowerCase();
536
+ const result = await handleApiOperation(
537
+ () => BuildsAndDeploymentsService.deleteAnnotations(projectKey, commitId, repositorySlug, key, externalId),
538
+ 'Error deleting code insights annotations'
539
+ );
540
+ if (result.success) {
541
+ return { ...result, data: { deleted: true, key, ...(externalId ? { externalId } : {}) } };
542
+ }
543
+ return result;
544
+ }
545
+
546
+ /**
547
+ * Get a list of projects
548
+ * @param name Optional filter by project name
549
+ * @param permission Optional filter by permission
550
+ * @param start Optional pagination start
551
+ * @param limit Optional pagination limit (default: 25)
552
+ * @returns Promise with projects data
553
+ */
554
+ async getProjects(name?: string, permission?: string, start?: number, limit?: number) {
555
+ return handleApiOperation(
556
+ () => ProjectService.getProjects(name, permission, start, limit ?? this.getPageSize()),
557
+ 'Error fetching projects'
558
+ );
559
+ }
560
+
561
+ /**
562
+ * Get a specific project by key
563
+ * @param projectKey The project key
564
+ * @returns Promise with project data
565
+ */
566
+ async getProject(projectKey: string) {
567
+ projectKey = projectKey.toUpperCase();
568
+ return handleApiOperation(
569
+ () => ProjectService.getProject(projectKey),
570
+ 'Error fetching project'
571
+ );
572
+ }
573
+
574
+ /**
575
+ * Get repositories for a project
576
+ * @param projectKey The project key
577
+ * @param start Optional pagination start
578
+ * @param limit Optional pagination limit (default: 25)
579
+ * @returns Promise with repositories data
580
+ */
581
+ async getRepositories(projectKey: string, start?: number, limit?: number) {
582
+ projectKey = projectKey.toUpperCase();
583
+ return handleApiOperation(
584
+ () => ProjectService.getRepositories(projectKey, start, limit ?? this.getPageSize()),
585
+ 'Error fetching repositories'
586
+ );
587
+ }
588
+
589
+ /**
590
+ * Get a specific repository
591
+ * @param projectKey The project key
592
+ * @param repositorySlug The repository slug
593
+ * @returns Promise with repository data
594
+ */
595
+ async getRepository(projectKey: string, repositorySlug: string) {
596
+ projectKey = projectKey.toUpperCase();
597
+ repositorySlug = repositorySlug.toLowerCase();
598
+ return handleApiOperation(
599
+ () => ProjectService.getRepository(projectKey, repositorySlug),
600
+ 'Error fetching repository'
601
+ );
602
+ }
603
+
604
+ /**
605
+ * Create a branch in a repository
606
+ * @param projectKey The project key
607
+ * @param repositorySlug The repository slug
608
+ * @param name The name of the new branch (e.g. 'feature/login')
609
+ * @param startPoint The commit hash or ref to branch from (e.g. 'refs/heads/master' or a commit id)
610
+ * @returns Promise with the created branch
611
+ */
612
+ async createBranch(projectKey: string, repositorySlug: string, name: string, startPoint: string) {
613
+ projectKey = projectKey.toUpperCase();
614
+ repositorySlug = repositorySlug.toLowerCase();
615
+ return handleApiOperation(
616
+ () => RepositoryService.createBranch(projectKey, repositorySlug, { name, startPoint }),
617
+ 'Error creating branch'
618
+ );
619
+ }
620
+
621
+ /**
622
+ * Delete a branch in a repository
623
+ * @param projectKey The project key
624
+ * @param repositorySlug The repository slug
625
+ * @param name The branch to delete (e.g. 'refs/heads/feature/login' or the branch name)
626
+ * @param dryRun If true, validate the deletion without actually removing the branch
627
+ * @returns Promise resolving to an acknowledgement
628
+ */
629
+ async deleteBranch(projectKey: string, repositorySlug: string, name: string, dryRun?: boolean) {
630
+ projectKey = projectKey.toUpperCase();
631
+ repositorySlug = repositorySlug.toLowerCase();
632
+ const requestBody: any = { name, ...(dryRun !== undefined ? { dryRun } : {}) };
633
+ const result = await handleApiOperation(
634
+ () => RepositoryService.deleteBranch(projectKey, repositorySlug, requestBody),
635
+ 'Error deleting branch'
636
+ );
637
+ if (result.success) {
638
+ return { ...result, data: { deleted: !dryRun, name } };
639
+ }
640
+ return result;
641
+ }
642
+
643
+ /**
644
+ * Get branches for a repository
645
+ * @param projectKey The project key
646
+ * @param repositorySlug The repository slug
647
+ * @param filterText Optional text the branch name must contain
648
+ * @param orderBy Optional ordering: ALPHABETICAL or MODIFICATION (most recently modified first)
649
+ * @param start Optional pagination start
650
+ * @param limit Optional pagination limit (defaults to the package page size)
651
+ * @returns Promise with branches data
652
+ */
653
+ async getBranches(
654
+ projectKey: string,
655
+ repositorySlug: string,
656
+ filterText?: string,
657
+ orderBy?: 'ALPHABETICAL' | 'MODIFICATION',
658
+ start?: number,
659
+ limit?: number
660
+ ) {
661
+ projectKey = projectKey.toUpperCase();
662
+ repositorySlug = repositorySlug.toLowerCase();
663
+ return handleApiOperation(
664
+ () => RepositoryService.getBranches(
665
+ projectKey,
666
+ repositorySlug,
667
+ undefined, // boostMatches
668
+ undefined, // context
669
+ orderBy,
670
+ undefined, // details
671
+ filterText,
672
+ undefined, // base
673
+ start,
674
+ limit ?? this.getPageSize()
675
+ ),
676
+ 'Error fetching branches'
677
+ );
678
+ }
679
+
680
+ /**
681
+ * Get tags for a repository
682
+ * @param projectKey The project key
683
+ * @param repositorySlug The repository slug
684
+ * @param filterText Optional text the tag name must contain
685
+ * @param orderBy Optional ordering: ALPHABETICAL or MODIFICATION
686
+ * @param start Optional pagination start
687
+ * @param limit Optional pagination limit (defaults to the package page size)
688
+ * @returns Promise with tags data
689
+ */
690
+ async getTags(
691
+ projectKey: string,
692
+ repositorySlug: string,
693
+ filterText?: string,
694
+ orderBy?: string,
695
+ start?: number,
696
+ limit?: number
697
+ ) {
698
+ projectKey = projectKey.toUpperCase();
699
+ repositorySlug = repositorySlug.toLowerCase();
700
+ return handleApiOperation(
701
+ () => RepositoryService.getTags(projectKey, repositorySlug, orderBy, filterText, start, limit ?? this.getPageSize()),
702
+ 'Error fetching tags'
703
+ );
704
+ }
705
+
706
+ /**
707
+ * Get the default branch of a repository
708
+ * @param projectKey The project key
709
+ * @param repositorySlug The repository slug
710
+ * @returns Promise with the default branch data
711
+ */
712
+ async getDefaultBranch(projectKey: string, repositorySlug: string) {
713
+ projectKey = projectKey.toUpperCase();
714
+ repositorySlug = repositorySlug.toLowerCase();
715
+ return handleApiOperation(
716
+ () => RepositoryService.getDefaultBranch1(projectKey, repositorySlug),
717
+ 'Error fetching default branch'
718
+ );
719
+ }
720
+
721
+ /**
722
+ * Get a single tag by name
723
+ * @param projectKey The project key
724
+ * @param repositorySlug The repository slug
725
+ * @param name The tag name (e.g. 'release-1.0.0')
726
+ * @returns Promise with the tag data
727
+ */
728
+ async getTag(projectKey: string, repositorySlug: string, name: string) {
729
+ projectKey = projectKey.toUpperCase();
730
+ repositorySlug = repositorySlug.toLowerCase();
731
+ return handleApiOperation(
732
+ () => RepositoryService.getTag(projectKey, name, repositorySlug),
733
+ 'Error fetching tag'
734
+ );
735
+ }
736
+
737
+ /**
738
+ * Create or edit a file in a repository and commit the change
739
+ * @param projectKey The project key
740
+ * @param repositorySlug The repository slug
741
+ * @param path The path of the file to create or modify
742
+ * @param content The full new content of the file
743
+ * @param message The commit message
744
+ * @param branch The branch to commit on (e.g. 'refs/heads/master' or 'master')
745
+ * @param sourceCommitId The commit id the file was last seen at; required when editing an existing file to detect conflicts. Omit for a new file.
746
+ * @param sourceBranch When set, creates `branch` from this starting branch before committing
747
+ * @returns Promise with the created commit
748
+ */
749
+ async editFile(
750
+ projectKey: string,
751
+ repositorySlug: string,
752
+ path: string,
753
+ content: string,
754
+ message: string,
755
+ branch: string,
756
+ sourceCommitId?: string,
757
+ sourceBranch?: string
758
+ ) {
759
+ projectKey = projectKey.toUpperCase();
760
+ repositorySlug = repositorySlug.toLowerCase();
761
+ const formData: any = {
762
+ content,
763
+ message,
764
+ branch,
765
+ ...(sourceCommitId ? { sourceCommitId } : {}),
766
+ ...(sourceBranch ? { sourceBranch } : {}),
767
+ };
768
+ return handleApiOperation(
769
+ () => RepositoryService.editFile(path, projectKey, repositorySlug, formData),
770
+ 'Error editing file'
771
+ );
772
+ }
773
+
774
+ /**
775
+ * Create a tag in a repository
776
+ * @param projectKey The project key
777
+ * @param repositorySlug The repository slug
778
+ * @param name The name of the new tag
779
+ * @param startPoint The commit hash or ref the tag should point at
780
+ * @param message Optional annotated-tag message
781
+ * @returns Promise with the created tag
782
+ */
783
+ async createTag(
784
+ projectKey: string,
785
+ repositorySlug: string,
786
+ name: string,
787
+ startPoint: string,
788
+ message?: string
789
+ ) {
790
+ projectKey = projectKey.toUpperCase();
791
+ repositorySlug = repositorySlug.toLowerCase();
792
+ const requestBody: any = { name, startPoint, ...(message ? { message } : {}) };
793
+ return handleApiOperation(
794
+ () => RepositoryService.createTagForRepository(projectKey, repositorySlug, requestBody),
795
+ 'Error creating tag'
796
+ );
797
+ }
798
+
799
+ /**
800
+ * Get pull requests for a repository
801
+ * @param projectKey The project key
802
+ * @param repositorySlug The repository slug
803
+ * @param withAttributes Optional flag to return additional pull request attributes (default: true)
804
+ * @param at Optional fully-qualified branch ID to find pull requests to or from (e.g., refs/heads/master)
805
+ * @param withProperties Optional flag to return additional pull request properties (default: true)
806
+ * @param draft Optional draft status filter
807
+ * @param filterText Optional text filter for title or description
808
+ * @param state Optional state filter (OPEN, DECLINED, MERGED, or ALL; default: OPEN)
809
+ * @param order Optional order (NEWEST or OLDEST; default: NEWEST)
810
+ * @param direction Optional direction relative to repository (INCOMING or OUTGOING; default: INCOMING)
811
+ * @param start Optional pagination start
812
+ * @param limit Optional pagination limit (default: 25)
813
+ * @returns Promise with pull requests data
814
+ */
815
+ async getPullRequests(
816
+ projectKey: string,
817
+ repositorySlug: string,
818
+ withAttributes?: string,
819
+ at?: string,
820
+ withProperties?: string,
821
+ draft?: string,
822
+ filterText?: string,
823
+ state?: string,
824
+ order?: string,
825
+ direction?: string,
826
+ start?: number,
827
+ limit?: number
828
+ ) {
829
+ projectKey = projectKey.toUpperCase();
830
+ repositorySlug = repositorySlug.toLowerCase();
831
+ return handleApiOperation(
832
+ () => PullRequestsService.getPage(
833
+ projectKey,
834
+ repositorySlug,
835
+ withAttributes,
836
+ at,
837
+ withProperties,
838
+ draft,
839
+ filterText,
840
+ state,
841
+ order,
842
+ direction,
843
+ start,
844
+ limit ?? this.getPageSize()
845
+ ),
846
+ 'Error fetching pull requests'
847
+ );
848
+ }
849
+
850
+ /**
851
+ * Get a specific pull request by ID
852
+ * @param projectKey The project key
853
+ * @param repositorySlug The repository slug
854
+ * @param pullRequestId The ID of the pull request within the repository
855
+ * @returns Promise with pull request data
856
+ */
857
+ async getPullRequest(
858
+ projectKey: string,
859
+ repositorySlug: string,
860
+ pullRequestId: string
861
+ ) {
862
+ projectKey = projectKey.toUpperCase();
863
+ repositorySlug = repositorySlug.toLowerCase();
864
+ return handleApiOperation(
865
+ () => PullRequestsService.get3(projectKey, pullRequestId, repositorySlug),
866
+ 'Error fetching pull request'
867
+ );
868
+ }
869
+
870
+ async getPullRequestCommentsAndActions(
871
+ projectKey: string,
872
+ repositorySlug: string,
873
+ pullRequestId: string,
874
+ start?: number,
875
+ limit?: number,
876
+ output: BitbucketOutputMode = 'compact',
877
+ includeResolved = false
878
+ ) {
879
+ projectKey = projectKey.toUpperCase();
880
+ repositorySlug = repositorySlug.toLowerCase();
881
+ const result = await handleApiOperation(
882
+ () => PullRequestsService.getActivities(
883
+ projectKey,
884
+ pullRequestId,
885
+ repositorySlug,
886
+ undefined,
887
+ undefined,
888
+ start,
889
+ limit ?? this.getPageSize()
890
+ ),
891
+ 'Error fetching pull request comments'
892
+ );
893
+
894
+ if (result.success && result.data) {
895
+ return {
896
+ success: true,
897
+ data: shapePullRequestCommentsResponse(result.data, output, { includeResolved })
898
+ };
899
+ }
900
+
901
+ return result;
902
+ }
903
+
904
+ /**
905
+ * Get pull request changes
906
+ * @param projectKey The project key
907
+ * @param repositorySlug The repository slug
908
+ * @param pullRequestId The pull request ID
909
+ * @param sinceId Optional since commit hash to stream changes for a RANGE arbitrary change scope
910
+ * @param changeScope Optional scope: 'UNREVIEWED' for unreviewed changes, 'RANGE' for changes between commits, 'ALL' for all changes (default)
911
+ * @param untilId Optional until commit hash to stream changes for a RANGE arbitrary change scope
912
+ * @param withComments Optional flag to include comment counts (default: true)
913
+ * @param start Optional pagination start
914
+ * @param limit Optional pagination limit (default: 25)
915
+ * @returns Promise with PR changes data
916
+ */
917
+ async getPullRequestChanges(
918
+ projectKey: string,
919
+ repositorySlug: string,
920
+ pullRequestId: string,
921
+ sinceId?: string,
922
+ changeScope?: string,
923
+ untilId?: string,
924
+ withComments?: string,
925
+ start?: number,
926
+ limit?: number,
927
+ output: BitbucketOutputMode = 'compact'
928
+ ) {
929
+ projectKey = projectKey.toUpperCase();
930
+ repositorySlug = repositorySlug.toLowerCase();
931
+ const result = await handleApiOperation(
932
+ () => PullRequestsService.streamChanges1(
933
+ projectKey,
934
+ pullRequestId,
935
+ repositorySlug,
936
+ sinceId,
937
+ changeScope,
938
+ untilId,
939
+ withComments,
940
+ start,
941
+ limit ?? this.getPageSize()
942
+ ),
943
+ 'Error fetching pull request changes'
944
+ );
945
+
946
+ if (result.success && result.data) {
947
+ return {
948
+ ...result,
949
+ data: shapePullRequestChangesResponse(result.data, output)
950
+ };
951
+ }
952
+
953
+ return result;
954
+ }
955
+
956
+ /**
957
+ * Post a comment to a pull request
958
+ * @param projectKey The project key
959
+ * @param repositorySlug The repository slug
960
+ * @param pullRequestId The pull request ID
961
+ * @param text The comment text
962
+ * @param parentId Optional parent comment ID for replies
963
+ * @param filePath Optional file path for file-specific comments
964
+ * @param startLine Optional start line for multiline comments; when provided together with line, creates a range comment
965
+ * @param startLineType Optional line type for the start line; defaults to lineType if omitted
966
+ * @param line Optional end line number for line/multiline comments
967
+ * @param lineType Optional line type ('ADDED', 'REMOVED', 'CONTEXT') for the end line
968
+ * @param pending Optional flag to create a pending (draft) comment, not visible to others until a review is submitted.
969
+ * Only works when filePath is provided (file-level or inline comments).
970
+ * Top-level PR comments (no filePath) are always posted live regardless of this flag.
971
+ * @param severity Optional severity for the comment. 'BLOCKER' posts the comment as a task that must be resolved before the PR can be merged. Defaults to 'NORMAL' (regular comment) when omitted.
972
+ * @returns Promise with created comment data
973
+ */
974
+ async postPullRequestComment(
975
+ projectKey: string,
976
+ repositorySlug: string,
977
+ pullRequestId: string,
978
+ text: string,
979
+ parentId?: number,
980
+ filePath?: string,
981
+ startLine?: number,
982
+ startLineType?: 'ADDED' | 'REMOVED' | 'CONTEXT',
983
+ line?: number,
984
+ lineType?: 'ADDED' | 'REMOVED' | 'CONTEXT',
985
+ pending?: boolean,
986
+ severity?: 'NORMAL' | 'BLOCKER',
987
+ output: BitbucketMutationOutputMode = 'ack'
988
+ ) {
989
+ projectKey = projectKey.toUpperCase();
990
+ repositorySlug = repositorySlug.toLowerCase();
991
+ const comment: any = {
992
+ text
993
+ };
994
+
995
+ if (severity) {
996
+ comment.severity = severity;
997
+ }
998
+
999
+ // Mark comment as pending (draft) — not visible to others until review is submitted
1000
+ // Note: Bitbucket DC uses state:'PENDING' not pending:true
1001
+ if (pending) {
1002
+ comment.state = 'PENDING';
1003
+ }
1004
+
1005
+ // Add parent reference for replies
1006
+ if (parentId) {
1007
+ comment.parent = { id: parentId };
1008
+ }
1009
+
1010
+ // Add anchor for file/line comments
1011
+ if (filePath) {
1012
+ comment.anchor = buildCommentAnchor({ filePath, line, lineType, startLine, startLineType });
1013
+ }
1014
+
1015
+ const suggestionWarning = filePath ? multilineSuggestionWarning(text, startLine) : undefined;
1016
+
1017
+ const result = await handleApiOperation(
1018
+ () => PullRequestsService.createComment2(
1019
+ projectKey,
1020
+ pullRequestId,
1021
+ repositorySlug,
1022
+ comment
1023
+ ),
1024
+ 'Error posting pull request comment'
1025
+ );
1026
+
1027
+ if (result.success && result.data && output !== 'full') {
1028
+ return {
1029
+ ...result,
1030
+ data: {
1031
+ ...shapePullRequestCommentAck(result.data),
1032
+ ...(suggestionWarning ? { warning: suggestionWarning } : {}),
1033
+ },
1034
+ };
1035
+ }
1036
+
1037
+ if (result.success && suggestionWarning) {
1038
+ return { ...result, warning: suggestionWarning };
1039
+ }
1040
+
1041
+ return result;
1042
+ }
1043
+
1044
+ /**
1045
+ * Update an existing pull request comment. Use this to edit text, change severity, or resolve/reopen
1046
+ * it via state. On a regular comment, setting state to 'RESOLVED' resolves the comment thread (the
1047
+ * "Resolve" button in the UI, recording a resolver and resolvedDate) and 'OPEN' reopens it. On a
1048
+ * BLOCKER (task) comment, 'RESOLVED' ticks the task and 'OPEN' un-ticks it. In both cases resolution
1049
+ * is driven by the root comment's state.
1050
+ * @param projectKey The project key
1051
+ * @param repositorySlug The repository slug
1052
+ * @param pullRequestId The pull request ID
1053
+ * @param commentId The comment ID to update
1054
+ * @param version The current version of the comment (required for optimistic locking)
1055
+ * @param text Optional new comment text
1056
+ * @param state Optional new state. 'RESOLVED' resolves the comment thread (ticks the task on a BLOCKER comment); 'OPEN' reopens it (un-ticks the task).
1057
+ * @param severity Optional new severity. 'BLOCKER' converts a comment into a task, 'NORMAL' converts a task back to a regular comment.
1058
+ * @returns Promise with updated comment data
1059
+ */
1060
+ async updatePullRequestComment(
1061
+ projectKey: string,
1062
+ repositorySlug: string,
1063
+ pullRequestId: string,
1064
+ commentId: string,
1065
+ version: number,
1066
+ text?: string,
1067
+ state?: 'OPEN' | 'RESOLVED',
1068
+ severity?: 'NORMAL' | 'BLOCKER',
1069
+ output: BitbucketMutationOutputMode = 'ack'
1070
+ ) {
1071
+ projectKey = projectKey.toUpperCase();
1072
+ repositorySlug = repositorySlug.toLowerCase();
1073
+ const comment: any = { version };
1074
+
1075
+ if (text !== undefined) {
1076
+ comment.text = text;
1077
+ }
1078
+
1079
+ if (state) {
1080
+ comment.state = state;
1081
+ }
1082
+
1083
+ if (severity) {
1084
+ comment.severity = severity;
1085
+ }
1086
+
1087
+ const result = await handleApiOperation(
1088
+ () => PullRequestsService.updateComment2(
1089
+ projectKey,
1090
+ commentId,
1091
+ pullRequestId,
1092
+ repositorySlug,
1093
+ comment
1094
+ ),
1095
+ 'Error updating pull request comment'
1096
+ );
1097
+
1098
+ if (result.success && result.data && output !== 'full') {
1099
+ return {
1100
+ ...result,
1101
+ data: shapePullRequestCommentAck(result.data),
1102
+ };
1103
+ }
1104
+
1105
+ return result;
1106
+ }
1107
+
1108
+ /**
1109
+ * Get a user by slug, or search for users by name/email filter
1110
+ * @param userSlug Optional exact slug to look up a specific user
1111
+ * @param filter Optional search string to find users by name or email
1112
+ * @returns Promise with user data
1113
+ */
1114
+ async getUser(userSlug?: string, filter?: string) {
1115
+ if (userSlug) {
1116
+ return handleApiOperation(
1117
+ () => __request(OpenAPI, {
1118
+ method: 'GET',
1119
+ url: '/api/latest/users/{userSlug}',
1120
+ path: { userSlug },
1121
+ }),
1122
+ 'Error fetching user'
1123
+ );
1124
+ }
1125
+ return handleApiOperation(
1126
+ () => __request(OpenAPI, {
1127
+ method: 'GET',
1128
+ url: '/api/latest/users',
1129
+ query: { filter },
1130
+ }),
1131
+ 'Error fetching users'
1132
+ );
1133
+ }
1134
+
1135
+ /**
1136
+ * Submit a pull request review, publishing all pending (draft) comments and updating the reviewer's status.
1137
+ * This is the equivalent of clicking "Submit Review" in the Bitbucket UI.
1138
+ * @param projectKey The project key
1139
+ * @param repositorySlug The repository slug
1140
+ * @param pullRequestId The pull request ID
1141
+ * @param userSlug The username/slug of the reviewer submitting the review (the PAT token owner).
1142
+ * @param status The review verdict: 'APPROVED', 'NEEDS_WORK', or 'UNAPPROVED'
1143
+ * @param lastReviewedCommit Optional last reviewed commit hash (for tracking review progress)
1144
+ * @returns Promise with updated participant data
1145
+ */
1146
+ async submitPullRequestReview(
1147
+ projectKey: string,
1148
+ repositorySlug: string,
1149
+ pullRequestId: string,
1150
+ userSlug: string,
1151
+ status: 'APPROVED' | 'NEEDS_WORK' | 'UNAPPROVED',
1152
+ lastReviewedCommit?: string
1153
+ ) {
1154
+ projectKey = projectKey.toUpperCase();
1155
+ repositorySlug = repositorySlug.toLowerCase();
1156
+ const requestBody: any = {
1157
+ status,
1158
+ ...(lastReviewedCommit ? { lastReviewedCommit } : {})
1159
+ };
1160
+
1161
+ return handleApiOperation(
1162
+ () => PullRequestsService.updateStatus(
1163
+ projectKey,
1164
+ userSlug,
1165
+ pullRequestId,
1166
+ repositorySlug,
1167
+ requestBody
1168
+ ),
1169
+ 'Error submitting pull request review'
1170
+ );
1171
+ }
1172
+
1173
+
1174
+ /**
1175
+ * Get text diff for a specific file in a pull request
1176
+ * @param projectKey The project key
1177
+ * @param repositorySlug The repository slug
1178
+ * @param pullRequestId The pull request ID
1179
+ * @param path The path to the file which should be diffed
1180
+ * @param contextLines Optional number of context lines to include around added/removed lines
1181
+ * @param sinceId Optional since commit hash to stream a diff between two arbitrary hashes
1182
+ * @param srcPath Optional previous path to the file, if the file has been copied, moved or renamed
1183
+ * @param diffType Optional type of diff being requested
1184
+ * @param untilId Optional until commit hash to stream a diff between two arbitrary hashes
1185
+ * @param whitespace Optional whitespace flag which can be set to 'ignore-all'
1186
+ * @returns Promise with text diff data
1187
+ */
1188
+ async getPullRequestDiff(
1189
+ projectKey: string,
1190
+ repositorySlug: string,
1191
+ pullRequestId: string,
1192
+ path: string,
1193
+ contextLines?: string,
1194
+ sinceId?: string,
1195
+ srcPath?: string,
1196
+ diffType?: string,
1197
+ untilId?: string,
1198
+ whitespace?: string
1199
+ ) {
1200
+ projectKey = projectKey.toUpperCase();
1201
+ repositorySlug = repositorySlug.toLowerCase();
1202
+ return handleApiOperation(
1203
+ () => __request(OpenAPI, {
1204
+ method: 'GET',
1205
+ url: '/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff/{path}',
1206
+ path: {
1207
+ 'path': path,
1208
+ 'projectKey': projectKey,
1209
+ 'pullRequestId': pullRequestId,
1210
+ 'repositorySlug': repositorySlug,
1211
+ },
1212
+ query: {
1213
+ 'contextLines': contextLines,
1214
+ 'sinceId': sinceId,
1215
+ 'srcPath': srcPath,
1216
+ 'diffType': diffType,
1217
+ 'untilId': untilId,
1218
+ 'whitespace': whitespace,
1219
+ },
1220
+ headers: {
1221
+ 'Accept': 'text/plain'
1222
+ },
1223
+ errors: {
1224
+ 400: `If the request was malformed.`,
1225
+ 401: `The currently authenticated user has insufficient permissions to view the repository or pull request.`,
1226
+ 404: `The repository or pull request does not exist.`,
1227
+ },
1228
+ }),
1229
+ 'Error fetching pull request diff'
1230
+ );
1231
+ }
1232
+
1233
+ /**
1234
+ * Create a pull request
1235
+ * @param projectKey The project key
1236
+ * @param repositorySlug The repository slug
1237
+ * @param title The pull request title
1238
+ * @param description Optional pull request description
1239
+ * @param fromRefId The source branch (e.g., 'refs/heads/feature-branch')
1240
+ * @param toRefId The destination branch (e.g., 'refs/heads/main')
1241
+ * @param reviewers Optional array of reviewer usernames
1242
+ * @param draft Optional flag to create the pull request as a draft
1243
+ * @param output Return a compact acknowledgement or the full API response. Defaults to 'ack'.
1244
+ * @returns Promise with created pull request data
1245
+ */
1246
+ async createPullRequest(
1247
+ projectKey: string,
1248
+ repositorySlug: string,
1249
+ title: string,
1250
+ description: string | undefined,
1251
+ fromRefId: string,
1252
+ toRefId: string,
1253
+ reviewers?: string[],
1254
+ draft?: boolean,
1255
+ output: BitbucketMutationOutputMode = 'ack'
1256
+ ) {
1257
+ projectKey = projectKey.toUpperCase();
1258
+ repositorySlug = repositorySlug.toLowerCase();
1259
+ const pullRequestData: any = {
1260
+ title,
1261
+ description,
1262
+ fromRef: {
1263
+ id: fromRefId,
1264
+ repository: {
1265
+ slug: repositorySlug,
1266
+ project: {
1267
+ key: projectKey
1268
+ }
1269
+ }
1270
+ },
1271
+ toRef: {
1272
+ id: toRefId,
1273
+ repository: {
1274
+ slug: repositorySlug,
1275
+ project: {
1276
+ key: projectKey
1277
+ }
1278
+ }
1279
+ }
1280
+ };
1281
+
1282
+ if (reviewers && reviewers.length > 0) {
1283
+ pullRequestData.reviewers = reviewers.map(username => ({
1284
+ user: {
1285
+ name: username
1286
+ }
1287
+ }));
1288
+ }
1289
+
1290
+ if (draft !== undefined) {
1291
+ pullRequestData.draft = draft;
1292
+ }
1293
+
1294
+ const result = await handleApiOperation(
1295
+ () => PullRequestsService.create(projectKey, repositorySlug, pullRequestData),
1296
+ 'Error creating pull request'
1297
+ );
1298
+
1299
+ if (result.success && result.data && output !== 'full') {
1300
+ return {
1301
+ ...result,
1302
+ data: shapePullRequestAck(result.data),
1303
+ };
1304
+ }
1305
+
1306
+ return result;
1307
+ }
1308
+
1309
+ /**
1310
+ * Update a pull request
1311
+ * @param projectKey The project key
1312
+ * @param repositorySlug The repository slug
1313
+ * @param pullRequestId The pull request ID
1314
+ * @param version The version of the pull request (required for optimistic locking)
1315
+ * @param title Optional new title for the pull request
1316
+ * @param description Optional new description for the pull request
1317
+ * @param reviewers Optional array of reviewer usernames to set
1318
+ * @param draft Optional flag to mark the pull request as a draft or ready for review
1319
+ * @param output Return a compact acknowledgement or the full API response. Defaults to 'ack'.
1320
+ * @returns Promise with updated pull request data
1321
+ */
1322
+ async updatePullRequest(
1323
+ projectKey: string,
1324
+ repositorySlug: string,
1325
+ pullRequestId: string,
1326
+ version: number,
1327
+ title?: string,
1328
+ description?: string,
1329
+ reviewers?: string[],
1330
+ draft?: boolean,
1331
+ output: BitbucketMutationOutputMode = 'ack'
1332
+ ) {
1333
+ projectKey = projectKey.toUpperCase();
1334
+ repositorySlug = repositorySlug.toLowerCase();
1335
+ const pullRequestData: any = {
1336
+ version
1337
+ };
1338
+
1339
+ if (title !== undefined) {
1340
+ pullRequestData.title = title;
1341
+ }
1342
+
1343
+ if (description !== undefined) {
1344
+ pullRequestData.description = description;
1345
+ }
1346
+
1347
+ if (reviewers && reviewers.length > 0) {
1348
+ pullRequestData.reviewers = reviewers.map(username => ({
1349
+ user: {
1350
+ name: username
1351
+ }
1352
+ }));
1353
+ }
1354
+
1355
+ if (draft !== undefined) {
1356
+ pullRequestData.draft = draft;
1357
+ }
1358
+
1359
+ const result = await handleApiOperation(
1360
+ () => PullRequestsService.update(projectKey, pullRequestId, repositorySlug, pullRequestData),
1361
+ 'Error updating pull request'
1362
+ );
1363
+
1364
+ if (result.success && result.data && output !== 'full') {
1365
+ return {
1366
+ ...result,
1367
+ data: shapePullRequestAck(result.data),
1368
+ };
1369
+ }
1370
+
1371
+ return result;
1372
+ }
1373
+
1374
+ /**
1375
+ * Check whether a pull request can be merged
1376
+ * @param projectKey The project key
1377
+ * @param repositorySlug The repository slug
1378
+ * @param pullRequestId The pull request ID
1379
+ * @returns Promise with mergeability data (canMerge, conflicted, vetoes)
1380
+ */
1381
+ async canMergePullRequest(
1382
+ projectKey: string,
1383
+ repositorySlug: string,
1384
+ pullRequestId: string
1385
+ ) {
1386
+ projectKey = projectKey.toUpperCase();
1387
+ repositorySlug = repositorySlug.toLowerCase();
1388
+ return handleApiOperation(
1389
+ () => PullRequestsService.canMerge(projectKey, pullRequestId, repositorySlug),
1390
+ 'Error checking pull request mergeability'
1391
+ );
1392
+ }
1393
+
1394
+ /**
1395
+ * Merge a pull request
1396
+ * @param projectKey The project key
1397
+ * @param repositorySlug The repository slug
1398
+ * @param pullRequestId The pull request ID
1399
+ * @param version The current version of the pull request (required for optimistic locking)
1400
+ * @param message Optional custom merge commit message
1401
+ * @param strategyId Optional merge strategy id (e.g. 'no-ff', 'ff', 'ff-only', 'rebase-no-ff', 'squash')
1402
+ * @param output Return a compact acknowledgement or the full API response. Defaults to 'ack'.
1403
+ * @returns Promise with merged pull request data
1404
+ */
1405
+ async mergePullRequest(
1406
+ projectKey: string,
1407
+ repositorySlug: string,
1408
+ pullRequestId: string,
1409
+ version: number,
1410
+ message?: string,
1411
+ strategyId?: string,
1412
+ output: BitbucketMutationOutputMode = 'ack'
1413
+ ) {
1414
+ projectKey = projectKey.toUpperCase();
1415
+ repositorySlug = repositorySlug.toLowerCase();
1416
+ const requestBody: any = {
1417
+ ...(message ? { message } : {}),
1418
+ ...(strategyId ? { strategyId } : {}),
1419
+ };
1420
+
1421
+ const result = await handleApiOperation(
1422
+ () => PullRequestsService.merge(projectKey, pullRequestId, repositorySlug, String(version), requestBody),
1423
+ 'Error merging pull request'
1424
+ );
1425
+
1426
+ if (result.success && result.data && output !== 'full') {
1427
+ return { ...result, data: shapePullRequestAck(result.data) };
1428
+ }
1429
+
1430
+ return result;
1431
+ }
1432
+
1433
+ /**
1434
+ * Decline a pull request
1435
+ * @param projectKey The project key
1436
+ * @param repositorySlug The repository slug
1437
+ * @param pullRequestId The pull request ID
1438
+ * @param version The current version of the pull request (required for optimistic locking)
1439
+ * @param comment Optional comment explaining why the pull request was declined
1440
+ * @param output Return a compact acknowledgement or the full API response. Defaults to 'ack'.
1441
+ * @returns Promise with declined pull request data
1442
+ */
1443
+ async declinePullRequest(
1444
+ projectKey: string,
1445
+ repositorySlug: string,
1446
+ pullRequestId: string,
1447
+ version: number,
1448
+ comment?: string,
1449
+ output: BitbucketMutationOutputMode = 'ack'
1450
+ ) {
1451
+ projectKey = projectKey.toUpperCase();
1452
+ repositorySlug = repositorySlug.toLowerCase();
1453
+ const requestBody: any = {
1454
+ ...(comment ? { comment } : {}),
1455
+ };
1456
+
1457
+ const result = await handleApiOperation(
1458
+ () => PullRequestsService.decline(projectKey, pullRequestId, repositorySlug, String(version), requestBody),
1459
+ 'Error declining pull request'
1460
+ );
1461
+
1462
+ if (result.success && result.data && output !== 'full') {
1463
+ return { ...result, data: shapePullRequestAck(result.data) };
1464
+ }
1465
+
1466
+ return result;
1467
+ }
1468
+
1469
+ /**
1470
+ * Reopen a declined pull request
1471
+ * @param projectKey The project key
1472
+ * @param repositorySlug The repository slug
1473
+ * @param pullRequestId The pull request ID
1474
+ * @param version The current version of the pull request (required for optimistic locking)
1475
+ * @param output Return a compact acknowledgement or the full API response. Defaults to 'ack'.
1476
+ * @returns Promise with reopened pull request data
1477
+ */
1478
+ async reopenPullRequest(
1479
+ projectKey: string,
1480
+ repositorySlug: string,
1481
+ pullRequestId: string,
1482
+ version: number,
1483
+ output: BitbucketMutationOutputMode = 'ack'
1484
+ ) {
1485
+ projectKey = projectKey.toUpperCase();
1486
+ repositorySlug = repositorySlug.toLowerCase();
1487
+
1488
+ const result = await handleApiOperation(
1489
+ () => PullRequestsService.reopen(projectKey, pullRequestId, repositorySlug, String(version), {}),
1490
+ 'Error reopening pull request'
1491
+ );
1492
+
1493
+ if (result.success && result.data && output !== 'full') {
1494
+ return { ...result, data: shapePullRequestAck(result.data) };
1495
+ }
1496
+
1497
+ return result;
1498
+ }
1499
+
1500
+ /**
1501
+ * Get required reviewers for PR creation
1502
+ * Returns a set of users who are required reviewers for pull requests created from the given source repository
1503
+ * and ref to the given target ref in this repository.
1504
+ * @param projectKey The project key
1505
+ * @param repositorySlug The repository slug
1506
+ * @param sourceRefId The ID of the source ref (e.g., 'refs/heads/feature-branch')
1507
+ * @param targetRefId The ID of the target ref (e.g., 'refs/heads/main')
1508
+ * @param sourceRepoId Optional ID of the repository in which the source ref exists
1509
+ * @param targetRepoId Optional ID of the repository in which the target ref exists
1510
+ * @returns Promise with required reviewers data
1511
+ */
1512
+ async getRequiredReviewers(
1513
+ projectKey: string,
1514
+ repositorySlug: string,
1515
+ sourceRefId: string,
1516
+ targetRefId: string,
1517
+ sourceRepoId?: string,
1518
+ targetRepoId?: string
1519
+ ) {
1520
+ projectKey = projectKey.toUpperCase();
1521
+ repositorySlug = repositorySlug.toLowerCase();
1522
+ return handleApiOperation(
1523
+ () => PullRequestsService.getReviewers(
1524
+ projectKey,
1525
+ repositorySlug,
1526
+ targetRepoId,
1527
+ sourceRepoId,
1528
+ sourceRefId,
1529
+ targetRefId
1530
+ ),
1531
+ 'Error fetching required reviewers'
1532
+ );
1533
+ }
1534
+
1535
+ /**
1536
+ * Get pull requests from the dashboard API (across all repositories)
1537
+ * @param role Role filter: AUTHOR (default), REVIEWER, or PARTICIPANT
1538
+ * @param state State filter: OPEN (default), DECLINED, or MERGED
1539
+ * @param closedSince Optional timestamp (in milliseconds) to filter PRs closed after this date
1540
+ * @param order Order: NEWEST (default), OLDEST, or PARTICIPANT
1541
+ * @param start Optional pagination start
1542
+ * @param limit Pagination limit (defaults to the package page size)
1543
+ * @returns Promise with dashboard pull requests data
1544
+ */
1545
+ async getDashboardPullRequests(
1546
+ role: string = 'AUTHOR',
1547
+ state: string = 'OPEN',
1548
+ closedSince?: number,
1549
+ order: string = 'NEWEST',
1550
+ start?: number,
1551
+ limit?: number
1552
+ ) {
1553
+ return handleApiOperation(
1554
+ () => __request(OpenAPI, {
1555
+ method: 'GET',
1556
+ url: '/api/1.0/dashboard/pull-requests',
1557
+ query: {
1558
+ 'role': role,
1559
+ 'state': state,
1560
+ 'closedSince': closedSince,
1561
+ 'order': order,
1562
+ 'start': start,
1563
+ 'limit': limit ?? this.getPageSize(),
1564
+ },
1565
+ errors: {
1566
+ 401: 'The currently authenticated user is not permitted to access the dashboard.',
1567
+ },
1568
+ }),
1569
+ 'Error fetching dashboard pull requests'
1570
+ );
1571
+ }
1572
+
1573
+ /**
1574
+ * Get pull requests from the authenticated user's inbox (PRs awaiting review)
1575
+ * @param start Optional pagination start
1576
+ * @param limit Optional pagination limit (defaults to the package page size)
1577
+ * @returns Promise with inbox pull requests data
1578
+ */
1579
+ async getInboxPullRequests(start?: number, limit?: number) {
1580
+ const result = await handleApiOperation(
1581
+ () => __request(OpenAPI, {
1582
+ method: 'GET',
1583
+ url: '/api/latest/inbox/pull-requests',
1584
+ query: {
1585
+ 'start': start,
1586
+ 'limit': limit ?? this.getPageSize(),
1587
+ },
1588
+ errors: {
1589
+ 401: 'The currently authenticated user is not permitted to access the inbox.',
1590
+ },
1591
+ }),
1592
+ 'Error fetching inbox pull requests'
1593
+ );
1594
+
1595
+ if (result.success && result.data) {
1596
+ return {
1597
+ success: true,
1598
+ data: simplifyInboxPullRequests(result.data),
1599
+ };
1600
+ }
1601
+
1602
+ return result;
1603
+ }
1604
+
1605
+ /**
1606
+ * Get the branch (ref) restrictions configured for a repository
1607
+ * @param projectKey The project key
1608
+ * @param repositorySlug The repository slug
1609
+ * @param matcherType Optional matcher type to filter on (BRANCH, PATTERN, MODEL_CATEGORY, MODEL_BRANCH)
1610
+ * @param matcherId Optional matcher id to filter on (requires matcherType)
1611
+ * @param type Optional restriction type to filter on (read-only, no-deletes, fast-forward-only, pull-request-only, no-creates)
1612
+ * @param start Optional pagination start
1613
+ * @param limit Optional pagination limit (defaults to the package page size)
1614
+ * @returns Promise with the page of restrictions
1615
+ */
1616
+ async getBranchRestrictions(
1617
+ projectKey: string,
1618
+ repositorySlug: string,
1619
+ matcherType?: 'BRANCH' | 'PATTERN' | 'MODEL_CATEGORY' | 'MODEL_BRANCH',
1620
+ matcherId?: string,
1621
+ type?: 'read-only' | 'no-deletes' | 'fast-forward-only' | 'pull-request-only' | 'no-creates',
1622
+ start?: number,
1623
+ limit?: number
1624
+ ) {
1625
+ projectKey = projectKey.toUpperCase();
1626
+ repositorySlug = repositorySlug.toLowerCase();
1627
+ return handleApiOperation(
1628
+ () => RepositoryService.getRestrictions1(
1629
+ projectKey, repositorySlug, matcherType, matcherId, type, start, limit ?? this.getPageSize()
1630
+ ),
1631
+ 'Error fetching branch restrictions'
1632
+ );
1633
+ }
1634
+
1635
+ /**
1636
+ * Find webhooks in a repository
1637
+ * @param projectKey The project key
1638
+ * @param repositorySlug The repository slug
1639
+ * @param event Optional webhook event ID to filter for (e.g. 'repo:refs_changed')
1640
+ * @param statistics Optional flag to include invocation statistics for each webhook
1641
+ * @returns Promise with the page of webhooks
1642
+ */
1643
+ async getWebhooks(projectKey: string, repositorySlug: string, event?: string, statistics?: boolean) {
1644
+ projectKey = projectKey.toUpperCase();
1645
+ repositorySlug = repositorySlug.toLowerCase();
1646
+ return handleApiOperation(
1647
+ () => RepositoryService.findWebhooks1(projectKey, repositorySlug, event, statistics),
1648
+ 'Error fetching webhooks'
1649
+ );
1650
+ }
1651
+
1652
+ /**
1653
+ * Get a single webhook by ID
1654
+ * @param projectKey The project key
1655
+ * @param repositorySlug The repository slug
1656
+ * @param webhookId The ID of the webhook
1657
+ * @param statistics Optional flag to include invocation statistics
1658
+ * @returns Promise with the webhook
1659
+ */
1660
+ async getWebhook(projectKey: string, repositorySlug: string, webhookId: string, statistics?: boolean) {
1661
+ projectKey = projectKey.toUpperCase();
1662
+ repositorySlug = repositorySlug.toLowerCase();
1663
+ return handleApiOperation(
1664
+ () => RepositoryService.getWebhook1(
1665
+ projectKey,
1666
+ webhookId,
1667
+ repositorySlug,
1668
+ statistics === undefined ? undefined : String(statistics)
1669
+ ),
1670
+ 'Error fetching webhook'
1671
+ );
1672
+ }
1673
+
1674
+ /**
1675
+ * Get the required-builds merge checks configured for a repository
1676
+ * @param projectKey The project key
1677
+ * @param repositorySlug The repository slug
1678
+ * @param start Optional pagination start
1679
+ * @param limit Optional pagination limit (defaults to the package page size)
1680
+ * @returns Promise with the page of required-builds merge checks
1681
+ */
1682
+ async getRequiredBuildsMergeChecks(projectKey: string, repositorySlug: string, start?: number, limit?: number) {
1683
+ projectKey = projectKey.toUpperCase();
1684
+ repositorySlug = repositorySlug.toLowerCase();
1685
+ return handleApiOperation(
1686
+ () => BuildsAndDeploymentsService.getPageOfRequiredBuildsMergeChecks(
1687
+ projectKey, repositorySlug, start, limit ?? this.getPageSize()
1688
+ ),
1689
+ 'Error fetching required builds merge checks'
1690
+ );
1691
+ }
1692
+
1693
+ /**
1694
+ * Get the default reviewer conditions configured for a repository
1695
+ * @param projectKey The project key
1696
+ * @param repositorySlug The repository slug
1697
+ * @returns Promise with the list of default reviewer conditions
1698
+ */
1699
+ async getDefaultReviewerConditions(projectKey: string, repositorySlug: string) {
1700
+ projectKey = projectKey.toUpperCase();
1701
+ repositorySlug = repositorySlug.toLowerCase();
1702
+ return handleApiOperation(
1703
+ () => PullRequestsService.getPullRequestConditions1(projectKey, repositorySlug),
1704
+ 'Error fetching default reviewer conditions'
1705
+ );
1706
+ }
1707
+
1708
+ /**
1709
+ * Create a default reviewer condition for a repository
1710
+ * @param projectKey The project key
1711
+ * @param repositorySlug The repository slug
1712
+ * @param sourceMatcherType Matcher type for the source ref (ANY_REF, BRANCH, PATTERN, MODEL_CATEGORY, MODEL_BRANCH)
1713
+ * @param sourceMatcherValue Matcher value for the source ref (e.g. 'ANY_REF', 'refs/heads/main', a pattern, or a model id)
1714
+ * @param targetMatcherType Matcher type for the target ref
1715
+ * @param targetMatcherValue Matcher value for the target ref
1716
+ * @param reviewerIds Numeric user IDs of the default reviewers
1717
+ * @param requiredApprovals Optional number of required approvals
1718
+ * @param sourceMatcherDisplayId Optional display value for the source matcher (defaults to the value)
1719
+ * @param targetMatcherDisplayId Optional display value for the target matcher (defaults to the value)
1720
+ * @returns Promise with the created condition
1721
+ */
1722
+ async createDefaultReviewerCondition(
1723
+ projectKey: string,
1724
+ repositorySlug: string,
1725
+ sourceMatcherType: string,
1726
+ sourceMatcherValue: string,
1727
+ targetMatcherType: string,
1728
+ targetMatcherValue: string,
1729
+ reviewerIds: number[],
1730
+ requiredApprovals?: number,
1731
+ sourceMatcherDisplayId?: string,
1732
+ targetMatcherDisplayId?: string
1733
+ ) {
1734
+ projectKey = projectKey.toUpperCase();
1735
+ repositorySlug = repositorySlug.toLowerCase();
1736
+ const requestBody = this.buildDefaultReviewerBody(
1737
+ sourceMatcherType, sourceMatcherValue, targetMatcherType, targetMatcherValue,
1738
+ reviewerIds, requiredApprovals, sourceMatcherDisplayId, targetMatcherDisplayId
1739
+ );
1740
+ return handleApiOperation(
1741
+ () => PullRequestsService.createPullRequestCondition1(projectKey, repositorySlug, requestBody),
1742
+ 'Error creating default reviewer condition'
1743
+ );
1744
+ }
1745
+
1746
+ /**
1747
+ * Create a webhook for a repository
1748
+ * @param projectKey The project key
1749
+ * @param repositorySlug The repository slug
1750
+ * @param name The webhook name
1751
+ * @param url The endpoint URL the webhook will POST to
1752
+ * @param events List of event IDs to subscribe to (e.g. ['repo:refs_changed', 'pr:opened'])
1753
+ * @param active Optional flag controlling whether the webhook is enabled (default: true)
1754
+ * @param secret Optional secret used to sign webhook payloads (HMAC)
1755
+ * @param sslVerificationRequired Optional flag for SSL verification on the endpoint URL
1756
+ * @returns Promise with the created webhook
1757
+ */
1758
+ async createWebhook(
1759
+ projectKey: string,
1760
+ repositorySlug: string,
1761
+ name: string,
1762
+ url: string,
1763
+ events: string[],
1764
+ active?: boolean,
1765
+ secret?: string,
1766
+ sslVerificationRequired?: boolean
1767
+ ) {
1768
+ projectKey = projectKey.toUpperCase();
1769
+ repositorySlug = repositorySlug.toLowerCase();
1770
+ const requestBody = this.buildWebhookBody(name, url, events, active, secret, sslVerificationRequired);
1771
+ return handleApiOperation(
1772
+ () => RepositoryService.createWebhook1(projectKey, repositorySlug, requestBody),
1773
+ 'Error creating webhook'
1774
+ );
1775
+ }
1776
+
1777
+ /**
1778
+ * Create a required-builds merge check for a repository
1779
+ * @param projectKey The project key
1780
+ * @param repositorySlug The repository slug
1781
+ * @param buildParentKeys Non-empty list of build parent keys that must have green builds for the check to pass
1782
+ * @param refMatcherType Matcher type for the target ref (ANY_REF, BRANCH, PATTERN, MODEL_CATEGORY, MODEL_BRANCH)
1783
+ * @param refMatcherValue Matcher value for the target ref (e.g. 'refs/heads/main')
1784
+ * @param refMatcherDisplayId Optional display value for the ref matcher (defaults to the value)
1785
+ * @param exemptRefMatcherType Optional matcher type for the exempt source ref
1786
+ * @param exemptRefMatcherValue Optional matcher value for the exempt source ref
1787
+ * @param exemptRefMatcherDisplayId Optional display value for the exempt ref matcher
1788
+ * @returns Promise with the created merge check
1789
+ */
1790
+ async createRequiredBuildsMergeCheck(
1791
+ projectKey: string,
1792
+ repositorySlug: string,
1793
+ buildParentKeys: string[],
1794
+ refMatcherType: string,
1795
+ refMatcherValue: string,
1796
+ refMatcherDisplayId?: string,
1797
+ exemptRefMatcherType?: string,
1798
+ exemptRefMatcherValue?: string,
1799
+ exemptRefMatcherDisplayId?: string
1800
+ ) {
1801
+ projectKey = projectKey.toUpperCase();
1802
+ repositorySlug = repositorySlug.toLowerCase();
1803
+ const requestBody = this.buildRequiredBuildsBody(
1804
+ buildParentKeys, refMatcherType, refMatcherValue, refMatcherDisplayId,
1805
+ exemptRefMatcherType, exemptRefMatcherValue, exemptRefMatcherDisplayId
1806
+ );
1807
+ return handleApiOperation(
1808
+ () => BuildsAndDeploymentsService.createRequiredBuildsMergeCheck(projectKey, repositorySlug, requestBody),
1809
+ 'Error creating required builds merge check'
1810
+ );
1811
+ }
1812
+
1813
+ /**
1814
+ * Update an existing webhook (replaces its configuration)
1815
+ * @param projectKey The project key
1816
+ * @param repositorySlug The repository slug
1817
+ * @param webhookId The ID of the webhook to update
1818
+ * @param name The webhook name
1819
+ * @param url The endpoint URL the webhook will POST to
1820
+ * @param events List of event IDs to subscribe to
1821
+ * @param active Optional flag controlling whether the webhook is enabled
1822
+ * @param secret Optional secret used to sign webhook payloads (HMAC)
1823
+ * @param sslVerificationRequired Optional flag for SSL verification on the endpoint URL
1824
+ * @returns Promise with the updated webhook
1825
+ */
1826
+ async updateWebhook(
1827
+ projectKey: string,
1828
+ repositorySlug: string,
1829
+ webhookId: string,
1830
+ name: string,
1831
+ url: string,
1832
+ events: string[],
1833
+ active?: boolean,
1834
+ secret?: string,
1835
+ sslVerificationRequired?: boolean
1836
+ ) {
1837
+ projectKey = projectKey.toUpperCase();
1838
+ repositorySlug = repositorySlug.toLowerCase();
1839
+ const requestBody = this.buildWebhookBody(name, url, events, active, secret, sslVerificationRequired);
1840
+ return handleApiOperation(
1841
+ () => RepositoryService.updateWebhook1(projectKey, webhookId, repositorySlug, requestBody),
1842
+ 'Error updating webhook'
1843
+ );
1844
+ }
1845
+
1846
+ /**
1847
+ * Create a branch (ref) restriction for a repository
1848
+ * @param projectKey The project key
1849
+ * @param repositorySlug The repository slug
1850
+ * @param type The restriction type (read-only, no-deletes, fast-forward-only, pull-request-only, no-creates)
1851
+ * @param matcherType Matcher type for the restricted ref (ANY_REF, BRANCH, PATTERN, MODEL_CATEGORY, MODEL_BRANCH)
1852
+ * @param matcherValue Matcher value (e.g. 'refs/heads/main', a pattern, or a model id)
1853
+ * @param matcherDisplayId Optional display value for the matcher (defaults to the value)
1854
+ * @param exemptUserSlugs Optional list of user slugs exempt from the restriction
1855
+ * @param exemptGroupNames Optional list of group names exempt from the restriction
1856
+ * @param exemptAccessKeyIds Optional list of SSH access key IDs exempt from the restriction
1857
+ * @returns Promise with the created restriction
1858
+ */
1859
+ async createBranchRestriction(
1860
+ projectKey: string,
1861
+ repositorySlug: string,
1862
+ type: string,
1863
+ matcherType: string,
1864
+ matcherValue: string,
1865
+ matcherDisplayId?: string,
1866
+ exemptUserSlugs?: string[],
1867
+ exemptGroupNames?: string[],
1868
+ exemptAccessKeyIds?: number[]
1869
+ ) {
1870
+ projectKey = projectKey.toUpperCase();
1871
+ repositorySlug = repositorySlug.toLowerCase();
1872
+ const restriction: any = {
1873
+ type,
1874
+ matcher: {
1875
+ id: matcherValue,
1876
+ displayId: matcherDisplayId ?? matcherValue,
1877
+ type: { id: matcherType },
1878
+ },
1879
+ ...(exemptUserSlugs ? { userSlugs: exemptUserSlugs } : {}),
1880
+ ...(exemptGroupNames ? { groupNames: exemptGroupNames } : {}),
1881
+ ...(exemptAccessKeyIds ? { accessKeyIds: exemptAccessKeyIds } : {}),
1882
+ };
1883
+ return handleApiOperation(
1884
+ () => RepositoryService.createRestrictions1(projectKey, repositorySlug, [restriction]),
1885
+ 'Error creating branch restriction'
1886
+ );
1887
+ }
1888
+
1889
+ /**
1890
+ * Update an existing default reviewer condition (replaces the condition)
1891
+ * @param projectKey The project key
1892
+ * @param repositorySlug The repository slug
1893
+ * @param id The ID of the condition to update
1894
+ * @param sourceMatcherType Matcher type for the source ref
1895
+ * @param sourceMatcherValue Matcher value for the source ref
1896
+ * @param targetMatcherType Matcher type for the target ref
1897
+ * @param targetMatcherValue Matcher value for the target ref
1898
+ * @param reviewerIds Numeric user IDs of the default reviewers
1899
+ * @param requiredApprovals Optional number of required approvals
1900
+ * @param sourceMatcherDisplayId Optional display value for the source matcher
1901
+ * @param targetMatcherDisplayId Optional display value for the target matcher
1902
+ * @returns Promise with the updated condition
1903
+ */
1904
+ async updateDefaultReviewerCondition(
1905
+ projectKey: string,
1906
+ repositorySlug: string,
1907
+ id: string,
1908
+ sourceMatcherType: string,
1909
+ sourceMatcherValue: string,
1910
+ targetMatcherType: string,
1911
+ targetMatcherValue: string,
1912
+ reviewerIds: number[],
1913
+ requiredApprovals?: number,
1914
+ sourceMatcherDisplayId?: string,
1915
+ targetMatcherDisplayId?: string
1916
+ ) {
1917
+ projectKey = projectKey.toUpperCase();
1918
+ repositorySlug = repositorySlug.toLowerCase();
1919
+ const requestBody = this.buildDefaultReviewerBody(
1920
+ sourceMatcherType, sourceMatcherValue, targetMatcherType, targetMatcherValue,
1921
+ reviewerIds, requiredApprovals, sourceMatcherDisplayId, targetMatcherDisplayId
1922
+ );
1923
+ return handleApiOperation(
1924
+ () => PullRequestsService.updatePullRequestCondition1(projectKey, id, repositorySlug, requestBody),
1925
+ 'Error updating default reviewer condition'
1926
+ );
1927
+ }
1928
+
1929
+ /**
1930
+ * Update an existing required-builds merge check (replaces the check)
1931
+ * @param projectKey The project key
1932
+ * @param repositorySlug The repository slug
1933
+ * @param id The ID of the merge check to update
1934
+ * @param buildParentKeys Non-empty list of build parent keys
1935
+ * @param refMatcherType Matcher type for the target ref
1936
+ * @param refMatcherValue Matcher value for the target ref
1937
+ * @param refMatcherDisplayId Optional display value for the ref matcher
1938
+ * @param exemptRefMatcherType Optional matcher type for the exempt source ref
1939
+ * @param exemptRefMatcherValue Optional matcher value for the exempt source ref
1940
+ * @param exemptRefMatcherDisplayId Optional display value for the exempt ref matcher
1941
+ * @returns Promise with the updated merge check
1942
+ */
1943
+ async updateRequiredBuildsMergeCheck(
1944
+ projectKey: string,
1945
+ repositorySlug: string,
1946
+ id: string,
1947
+ buildParentKeys: string[],
1948
+ refMatcherType: string,
1949
+ refMatcherValue: string,
1950
+ refMatcherDisplayId?: string,
1951
+ exemptRefMatcherType?: string,
1952
+ exemptRefMatcherValue?: string,
1953
+ exemptRefMatcherDisplayId?: string
1954
+ ) {
1955
+ projectKey = projectKey.toUpperCase();
1956
+ repositorySlug = repositorySlug.toLowerCase();
1957
+ const requestBody = this.buildRequiredBuildsBody(
1958
+ buildParentKeys, refMatcherType, refMatcherValue, refMatcherDisplayId,
1959
+ exemptRefMatcherType, exemptRefMatcherValue, exemptRefMatcherDisplayId
1960
+ );
1961
+ return handleApiOperation(
1962
+ () => BuildsAndDeploymentsService.updateRequiredBuildsMergeCheck(projectKey, Number(id), repositorySlug, requestBody),
1963
+ 'Error updating required builds merge check'
1964
+ );
1965
+ }
1966
+
1967
+ /**
1968
+ * Get a single branch (ref) restriction by ID
1969
+ * @param projectKey The project key
1970
+ * @param repositorySlug The repository slug
1971
+ * @param id The restriction ID
1972
+ * @returns Promise with the restriction
1973
+ */
1974
+ async getBranchRestriction(projectKey: string, repositorySlug: string, id: string) {
1975
+ projectKey = projectKey.toUpperCase();
1976
+ repositorySlug = repositorySlug.toLowerCase();
1977
+ return handleApiOperation(
1978
+ () => RepositoryService.getRestriction1(projectKey, id, repositorySlug),
1979
+ 'Error fetching branch restriction'
1980
+ );
1981
+ }
1982
+
1983
+ /**
1984
+ * Delete a branch (ref) restriction by ID
1985
+ * @param projectKey The project key
1986
+ * @param repositorySlug The repository slug
1987
+ * @param id The restriction ID
1988
+ * @returns Promise with a delete acknowledgement
1989
+ */
1990
+ async deleteBranchRestriction(projectKey: string, repositorySlug: string, id: string) {
1991
+ projectKey = projectKey.toUpperCase();
1992
+ repositorySlug = repositorySlug.toLowerCase();
1993
+ const result = await handleApiOperation(
1994
+ () => RepositoryService.deleteRestriction1(projectKey, id, repositorySlug),
1995
+ 'Error deleting branch restriction'
1996
+ );
1997
+ return { ...result, data: { deleted: true, id } };
1998
+ }
1999
+
2000
+ /**
2001
+ * Delete a required-builds merge check by ID
2002
+ * @param projectKey The project key
2003
+ * @param repositorySlug The repository slug
2004
+ * @param id The ID of the merge check to delete
2005
+ * @returns Promise with a delete acknowledgement
2006
+ */
2007
+ async deleteRequiredBuildsMergeCheck(projectKey: string, repositorySlug: string, id: string) {
2008
+ projectKey = projectKey.toUpperCase();
2009
+ repositorySlug = repositorySlug.toLowerCase();
2010
+ const result = await handleApiOperation(
2011
+ () => BuildsAndDeploymentsService.deleteRequiredBuildsMergeCheck(projectKey, Number(id), repositorySlug),
2012
+ 'Error deleting required builds merge check'
2013
+ );
2014
+ return { ...result, data: { deleted: true, id } };
2015
+ }
2016
+
2017
+ /**
2018
+ * Delete a default reviewer condition
2019
+ * @param projectKey The project key
2020
+ * @param repositorySlug The repository slug
2021
+ * @param id The ID of the condition to delete
2022
+ * @returns Promise with a delete acknowledgement
2023
+ */
2024
+ async deleteDefaultReviewerCondition(projectKey: string, repositorySlug: string, id: string) {
2025
+ projectKey = projectKey.toUpperCase();
2026
+ repositorySlug = repositorySlug.toLowerCase();
2027
+ const result = await handleApiOperation(
2028
+ () => PullRequestsService.deletePullRequestCondition1(projectKey, Number(id), repositorySlug),
2029
+ 'Error deleting default reviewer condition'
2030
+ );
2031
+ return { ...result, data: { deleted: true, id } };
2032
+ }
2033
+
2034
+ /**
2035
+ * Search code across Bitbucket using the search REST module.
2036
+ *
2037
+ * The query string supports Bitbucket search modifiers, e.g. `project:TEST`,
2038
+ * `repo:projectkey/repositoryslug` (e.g. `repo:TEST/demo`), `ext:js`, so scoping to a
2039
+ * project or repository is done inside the query text. Note: `repo:` must include the
2040
+ * project key (`repo:KEY/slug`); a bare `repo:slug` is rejected by the server.
2041
+ *
2042
+ * Note: the `/rest/search` endpoint is a separate Bitbucket REST module that is not part of
2043
+ * the generated client, so this is issued via the low-level request helper (same approach as
2044
+ * the dashboard/inbox endpoints).
2045
+ *
2046
+ * @param query The search query (may include modifiers like `repo:`, `project:`, `ext:`)
2047
+ * @param limit Optional primary result limit (defaults to the package page size)
2048
+ * @param secondaryLimit Optional secondary limit (number of hit contexts per match)
2049
+ * @returns Promise with the code search results
2050
+ */
2051
+ async searchCode(query: string, limit?: number, secondaryLimit?: number) {
2052
+ return handleApiOperation(
2053
+ () => __request(OpenAPI, {
2054
+ method: 'POST',
2055
+ url: '/search/latest/search',
2056
+ body: {
2057
+ query,
2058
+ entities: { code: {} },
2059
+ limits: {
2060
+ primary: limit ?? this.getPageSize(),
2061
+ ...(secondaryLimit !== undefined ? { secondary: secondaryLimit } : {}),
2062
+ },
2063
+ },
2064
+ mediaType: 'application/json',
2065
+ errors: {
2066
+ 400: 'The search query was malformed.',
2067
+ 401: 'The currently authenticated user is not permitted to search.',
2068
+ },
2069
+ }),
2070
+ 'Error searching code'
2071
+ );
2072
+ }
2073
+
2074
+ private buildDefaultReviewerBody(
2075
+ sourceMatcherType: string,
2076
+ sourceMatcherValue: string,
2077
+ targetMatcherType: string,
2078
+ targetMatcherValue: string,
2079
+ reviewerIds: number[],
2080
+ requiredApprovals?: number,
2081
+ sourceMatcherDisplayId?: string,
2082
+ targetMatcherDisplayId?: string
2083
+ ): any {
2084
+ return {
2085
+ reviewers: reviewerIds.map(id => ({ id })),
2086
+ sourceMatcher: {
2087
+ id: sourceMatcherValue,
2088
+ displayId: sourceMatcherDisplayId ?? sourceMatcherValue,
2089
+ type: { id: sourceMatcherType },
2090
+ },
2091
+ targetMatcher: {
2092
+ id: targetMatcherValue,
2093
+ displayId: targetMatcherDisplayId ?? targetMatcherValue,
2094
+ type: { id: targetMatcherType },
2095
+ },
2096
+ ...(requiredApprovals !== undefined ? { requiredApprovals } : {}),
2097
+ };
2098
+ }
2099
+
2100
+ private buildRequiredBuildsBody(
2101
+ buildParentKeys: string[],
2102
+ refMatcherType: string,
2103
+ refMatcherValue: string,
2104
+ refMatcherDisplayId?: string,
2105
+ exemptRefMatcherType?: string,
2106
+ exemptRefMatcherValue?: string,
2107
+ exemptRefMatcherDisplayId?: string
2108
+ ): any {
2109
+ return {
2110
+ buildParentKeys,
2111
+ refMatcher: {
2112
+ id: refMatcherValue,
2113
+ displayId: refMatcherDisplayId ?? refMatcherValue,
2114
+ type: { id: refMatcherType },
2115
+ },
2116
+ ...(exemptRefMatcherType && exemptRefMatcherValue
2117
+ ? {
2118
+ exemptRefMatcher: {
2119
+ id: exemptRefMatcherValue,
2120
+ displayId: exemptRefMatcherDisplayId ?? exemptRefMatcherValue,
2121
+ type: { id: exemptRefMatcherType },
2122
+ },
2123
+ }
2124
+ : {}),
2125
+ };
2126
+ }
2127
+
2128
+ /**
2129
+ * Delete a pull request comment
2130
+ * @param projectKey The project key
2131
+ * @param repositorySlug The repository slug
2132
+ * @param pullRequestId The pull request ID
2133
+ * @param commentId The ID of the comment to delete
2134
+ * @param version The current version of the comment (optimistic locking)
2135
+ * @returns Promise with a delete acknowledgement
2136
+ */
2137
+ async deletePullRequestComment(
2138
+ projectKey: string,
2139
+ repositorySlug: string,
2140
+ pullRequestId: string,
2141
+ commentId: string,
2142
+ version: number
2143
+ ) {
2144
+ projectKey = projectKey.toUpperCase();
2145
+ repositorySlug = repositorySlug.toLowerCase();
2146
+ const result = await handleApiOperation(
2147
+ () => PullRequestsService.deleteComment2(projectKey, commentId, pullRequestId, repositorySlug, String(version)),
2148
+ 'Error deleting pull request comment'
2149
+ );
2150
+ return { ...result, data: { deleted: true, commentId } };
2151
+ }
2152
+
2153
+ /**
2154
+ * Apply a code suggestion contained in a pull request comment to the source branch
2155
+ * @param projectKey The project key
2156
+ * @param repositorySlug The repository slug
2157
+ * @param pullRequestId The pull request ID
2158
+ * @param commentId The ID of the comment that contains the suggestion
2159
+ * @param commentVersion The current version of the comment
2160
+ * @param pullRequestVersion The current version of the pull request
2161
+ * @param commitMessage Commit message for the commit that applies the suggestion (required by the server)
2162
+ * @param suggestionIndex Optional index of the suggestion within the comment (defaults to the first)
2163
+ * @returns Promise with an apply acknowledgement
2164
+ */
2165
+ async applyPullRequestSuggestion(
2166
+ projectKey: string,
2167
+ repositorySlug: string,
2168
+ pullRequestId: string,
2169
+ commentId: string,
2170
+ commentVersion: number,
2171
+ pullRequestVersion: number,
2172
+ commitMessage: string,
2173
+ suggestionIndex?: number
2174
+ ) {
2175
+ projectKey = projectKey.toUpperCase();
2176
+ repositorySlug = repositorySlug.toLowerCase();
2177
+ // The apply-suggestion endpoint reads the commit message from `message` (not `commitMessage`
2178
+ // as the generated model suggests) and rejects an empty value.
2179
+ const requestBody: any = {
2180
+ commentVersion,
2181
+ pullRequestVersion,
2182
+ message: commitMessage,
2183
+ ...(suggestionIndex !== undefined ? { suggestionIndex } : {}),
2184
+ };
2185
+ const result = await handleApiOperation(
2186
+ () => PullRequestsService.applySuggestion(projectKey, commentId, pullRequestId, repositorySlug, requestBody),
2187
+ 'Error applying pull request suggestion'
2188
+ );
2189
+ return { ...result, data: { applied: true, commentId } };
2190
+ }
2191
+
2192
+ /**
2193
+ * Start watching a pull request (subscribe the authenticated user to notifications)
2194
+ * @param projectKey The project key
2195
+ * @param repositorySlug The repository slug
2196
+ * @param pullRequestId The pull request ID
2197
+ * @returns Promise with a watch acknowledgement
2198
+ */
2199
+ async watchPullRequest(projectKey: string, repositorySlug: string, pullRequestId: string) {
2200
+ projectKey = projectKey.toUpperCase();
2201
+ repositorySlug = repositorySlug.toLowerCase();
2202
+ const result = await handleApiOperation(
2203
+ () => PullRequestsService.watch1(projectKey, pullRequestId, repositorySlug),
2204
+ 'Error watching pull request'
2205
+ );
2206
+ return { ...result, data: { watching: true, pullRequestId } };
2207
+ }
2208
+
2209
+ /**
2210
+ * Stop watching a pull request (unsubscribe the authenticated user)
2211
+ * @param projectKey The project key
2212
+ * @param repositorySlug The repository slug
2213
+ * @param pullRequestId The pull request ID
2214
+ * @returns Promise with an unwatch acknowledgement
2215
+ */
2216
+ async unwatchPullRequest(projectKey: string, repositorySlug: string, pullRequestId: string) {
2217
+ projectKey = projectKey.toUpperCase();
2218
+ repositorySlug = repositorySlug.toLowerCase();
2219
+ const result = await handleApiOperation(
2220
+ () => PullRequestsService.unwatch1(projectKey, pullRequestId, repositorySlug),
2221
+ 'Error unwatching pull request'
2222
+ );
2223
+ return { ...result, data: { watching: false, pullRequestId } };
2224
+ }
2225
+
2226
+ /**
2227
+ * Add a reviewer to a pull request
2228
+ * @param projectKey The project key
2229
+ * @param repositorySlug The repository slug
2230
+ * @param pullRequestId The pull request ID
2231
+ * @param userSlug The username/name of the user to add as a reviewer
2232
+ * @returns Promise with the participant details
2233
+ */
2234
+ async addPullRequestReviewer(
2235
+ projectKey: string,
2236
+ repositorySlug: string,
2237
+ pullRequestId: string,
2238
+ userSlug: string
2239
+ ) {
2240
+ projectKey = projectKey.toUpperCase();
2241
+ repositorySlug = repositorySlug.toLowerCase();
2242
+ const requestBody: any = { user: { name: userSlug }, role: 'REVIEWER' };
2243
+ return handleApiOperation(
2244
+ () => PullRequestsService.assignParticipantRole(projectKey, pullRequestId, repositorySlug, requestBody),
2245
+ 'Error adding pull request reviewer'
2246
+ );
2247
+ }
2248
+
2249
+ /**
2250
+ * Create a new project
2251
+ * @param key The project key
2252
+ * @param name The project name
2253
+ * @param description Optional project description
2254
+ * @returns Promise with the created project
2255
+ */
2256
+ async createProject(key: string, name: string, description?: string) {
2257
+ key = key.toUpperCase();
2258
+ const requestBody: any = {
2259
+ key,
2260
+ name,
2261
+ ...(description !== undefined ? { description } : {}),
2262
+ };
2263
+ return handleApiOperation(
2264
+ () => ProjectService.createProject(requestBody),
2265
+ 'Error creating project'
2266
+ );
2267
+ }
2268
+
2269
+ /**
2270
+ * Create a new repository in a project
2271
+ * @param projectKey The project key the repository will be created in
2272
+ * @param name The repository name
2273
+ * @param scmId The SCM type (defaults to 'git')
2274
+ * @param defaultBranch Optional default branch for the new repository
2275
+ * @returns Promise with the created repository
2276
+ */
2277
+ async createRepository(projectKey: string, name: string, scmId: string = 'git', defaultBranch?: string) {
2278
+ projectKey = projectKey.toUpperCase();
2279
+ const requestBody: any = {
2280
+ name,
2281
+ scmId,
2282
+ ...(defaultBranch ? { defaultBranch } : {}),
2283
+ };
2284
+ return handleApiOperation(
2285
+ () => ProjectService.createRepository(projectKey, requestBody),
2286
+ 'Error creating repository'
2287
+ );
2288
+ }
2289
+
2290
+ /**
2291
+ * Remove a reviewer from a pull request
2292
+ * @param projectKey The project key
2293
+ * @param repositorySlug The repository slug
2294
+ * @param pullRequestId The pull request ID
2295
+ * @param userSlug The username/name of the reviewer to remove
2296
+ * @returns Promise resolving to an acknowledgement
2297
+ */
2298
+ async removePullRequestReviewer(
2299
+ projectKey: string,
2300
+ repositorySlug: string,
2301
+ pullRequestId: string,
2302
+ userSlug: string
2303
+ ) {
2304
+ projectKey = projectKey.toUpperCase();
2305
+ repositorySlug = repositorySlug.toLowerCase();
2306
+ const result = await handleApiOperation(
2307
+ () => PullRequestsService.unassignParticipantRole(projectKey, userSlug, pullRequestId, repositorySlug),
2308
+ 'Error removing pull request reviewer'
2309
+ );
2310
+ if (result.success) {
2311
+ return { ...result, data: { removed: true, userSlug } };
2312
+ }
2313
+ return result;
2314
+ }
2315
+
2316
+ /**
2317
+ * Update an existing project (the project key is never changed)
2318
+ * @param key The project key
2319
+ * @param name Optional new project name
2320
+ * @param description Optional new description
2321
+ * @returns Promise with the updated project
2322
+ */
2323
+ async updateProject(key: string, name?: string, description?: string) {
2324
+ key = key.toUpperCase();
2325
+ const requestBody: any = {
2326
+ key,
2327
+ ...(name !== undefined ? { name } : {}),
2328
+ ...(description !== undefined ? { description } : {}),
2329
+ };
2330
+ return handleApiOperation(
2331
+ () => ProjectService.updateProject(key, requestBody),
2332
+ 'Error updating project'
2333
+ );
2334
+ }
2335
+
2336
+ /**
2337
+ * Update an existing repository (rename, change description, default branch, or move project)
2338
+ * @param projectKey The project key
2339
+ * @param repositorySlug The repository slug
2340
+ * @param name Optional new repository name
2341
+ * @param description Optional new description
2342
+ * @param defaultBranch Optional new default branch
2343
+ * @param targetProjectKey Optional project key to move the repository into
2344
+ * @returns Promise with the updated repository
2345
+ */
2346
+ async updateRepository(
2347
+ projectKey: string,
2348
+ repositorySlug: string,
2349
+ name?: string,
2350
+ description?: string,
2351
+ defaultBranch?: string,
2352
+ targetProjectKey?: string
2353
+ ) {
2354
+ projectKey = projectKey.toUpperCase();
2355
+ repositorySlug = repositorySlug.toLowerCase();
2356
+ const requestBody: any = {
2357
+ ...(name !== undefined ? { name } : {}),
2358
+ ...(description !== undefined ? { description } : {}),
2359
+ ...(defaultBranch !== undefined ? { defaultBranch } : {}),
2360
+ ...(targetProjectKey ? { project: { key: targetProjectKey.toUpperCase() } } : {}),
2361
+ };
2362
+ return handleApiOperation(
2363
+ () => ProjectService.updateRepository(projectKey, repositorySlug, requestBody),
2364
+ 'Error updating repository'
2365
+ );
2366
+ }
2367
+
2368
+ /**
2369
+ * Delete a project (must contain no repositories)
2370
+ * @param key The project key
2371
+ * @returns Promise with a deletion acknowledgement
2372
+ */
2373
+ async deleteProject(key: string) {
2374
+ key = key.toUpperCase();
2375
+ const result = await handleApiOperation(
2376
+ () => ProjectService.deleteProject(key),
2377
+ 'Error deleting project'
2378
+ );
2379
+ return { ...result, data: { deleted: true, key } };
2380
+ }
2381
+
2382
+ /**
2383
+ * Fork an existing repository
2384
+ * @param projectKey The project key of the origin repository
2385
+ * @param repositorySlug The repository slug of the origin repository
2386
+ * @param name Optional name for the fork (defaults to the origin name)
2387
+ * @param targetProjectKey Optional target project key (defaults to the user's personal project)
2388
+ * @param defaultBranch Optional default branch for the fork
2389
+ * @returns Promise with the created fork
2390
+ */
2391
+ async forkRepository(
2392
+ projectKey: string,
2393
+ repositorySlug: string,
2394
+ name?: string,
2395
+ targetProjectKey?: string,
2396
+ defaultBranch?: string
2397
+ ) {
2398
+ projectKey = projectKey.toUpperCase();
2399
+ repositorySlug = repositorySlug.toLowerCase();
2400
+ const requestBody: any = {
2401
+ ...(name ? { name } : {}),
2402
+ ...(targetProjectKey ? { project: { key: targetProjectKey.toUpperCase() } } : {}),
2403
+ ...(defaultBranch ? { defaultBranch } : {}),
2404
+ };
2405
+ return handleApiOperation(
2406
+ () => ProjectService.forkRepository(projectKey, repositorySlug, requestBody),
2407
+ 'Error forking repository'
2408
+ );
2409
+ }
2410
+
2411
+ /**
2412
+ * Schedule a repository for deletion
2413
+ * @param projectKey The project key
2414
+ * @param repositorySlug The repository slug
2415
+ * @returns Promise with a deletion acknowledgement
2416
+ */
2417
+ async deleteRepository(projectKey: string, repositorySlug: string) {
2418
+ projectKey = projectKey.toUpperCase();
2419
+ repositorySlug = repositorySlug.toLowerCase();
2420
+ const result = await handleApiOperation(
2421
+ () => ProjectService.deleteRepository(projectKey, repositorySlug),
2422
+ 'Error deleting repository'
2423
+ );
2424
+ return { ...result, data: { scheduledForDeletion: true, projectKey, repositorySlug } };
2425
+ }
2426
+
2427
+ /**
2428
+ * Delete a webhook
2429
+ * @param projectKey The project key
2430
+ * @param repositorySlug The repository slug
2431
+ * @param webhookId The ID of the webhook to delete
2432
+ * @returns Promise with a delete acknowledgement
2433
+ */
2434
+ async deleteWebhook(projectKey: string, repositorySlug: string, webhookId: string) {
2435
+ projectKey = projectKey.toUpperCase();
2436
+ repositorySlug = repositorySlug.toLowerCase();
2437
+ const result = await handleApiOperation(
2438
+ () => RepositoryService.deleteWebhook1(projectKey, webhookId, repositorySlug),
2439
+ 'Error deleting webhook'
2440
+ );
2441
+ return { ...result, data: { deleted: true, webhookId } };
2442
+ }
2443
+
2444
+ private buildWebhookBody(
2445
+ name: string,
2446
+ url: string,
2447
+ events: string[],
2448
+ active?: boolean,
2449
+ secret?: string,
2450
+ sslVerificationRequired?: boolean
2451
+ ): any {
2452
+ return {
2453
+ name,
2454
+ url,
2455
+ events,
2456
+ ...(active !== undefined ? { active } : {}),
2457
+ ...(secret ? { configuration: { secret } } : {}),
2458
+ ...(sslVerificationRequired !== undefined ? { sslVerificationRequired } : {}),
2459
+ };
2460
+ }
2461
+
2462
+ async validateSetup(): Promise<void> {
2463
+ await __request(OpenAPI, {
2464
+ method: 'GET',
2465
+ url: '/api/latest/dashboard/pull-requests',
2466
+ query: { limit: 1 },
2467
+ });
2468
+ }
2469
+
2470
+ static validateConfig(): string[] {
2471
+ return getMissingConfig();
2472
+ }
2473
+ }
2474
+
2475
+ export const bitbucketToolSchemas = {
2476
+ getProjects: {
2477
+ name: z.string().optional().describe("Filter projects by name"),
2478
+ permission: z.string().optional().describe("Filter projects by permission"),
2479
+ start: z.number().optional().describe("Start number for pagination"),
2480
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2481
+ },
2482
+ getPullRequests: {
2483
+ projectKey: z.string().describe("The project key"),
2484
+ repositorySlug: z.string().describe("The repository slug"),
2485
+ withAttributes: z.string().optional().describe("(optional) defaults to true, whether to return additional pull request attributes"),
2486
+ at: z.string().optional().describe("(optional) a fully-qualified branch ID to find pull requests to or from, such as refs/heads/master"),
2487
+ withProperties: z.string().optional().describe("(optional) defaults to true, whether to return additional pull request properties"),
2488
+ draft: z.string().optional().describe("(optional) If specified, only pull requests matching the supplied draft status will be returned"),
2489
+ filterText: z.string().optional().describe("(optional) If specified, only pull requests where the title or description contains the supplied string will be returned"),
2490
+ state: z.string().optional().describe("(optional, defaults to OPEN). Supply ALL to return pull request in any state. If a state is supplied only pull requests in the specified state will be returned. Either OPEN, DECLINED or MERGED"),
2491
+ order: z.string().optional().describe("(optional, defaults to NEWEST) the order to return pull requests in, either OLDEST (as in: \"oldest first\") or NEWEST"),
2492
+ direction: z.string().optional().describe("(optional, defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING"),
2493
+ start: z.number().optional().describe("Start number for the page (inclusive). If not passed, first page is assumed"),
2494
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2495
+ },
2496
+ getPullRequest: {
2497
+ projectKey: z.string().describe("The project key"),
2498
+ repositorySlug: z.string().describe("The repository slug"),
2499
+ pullRequestId: z.string().describe("The ID of the pull request within the repository")
2500
+ },
2501
+ getProject: {
2502
+ projectKey: z.string().describe("The project key")
2503
+ },
2504
+ getRepositories: {
2505
+ projectKey: z.string().describe("The project key"),
2506
+ start: z.number().optional().describe("Start number for pagination"),
2507
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2508
+ },
2509
+ getRepository: {
2510
+ projectKey: z.string().describe("The project key"),
2511
+ repositorySlug: z.string().describe("The repository slug")
2512
+ },
2513
+ createBranch: {
2514
+ projectKey: z.string().describe("The project key"),
2515
+ repositorySlug: z.string().describe("The repository slug"),
2516
+ name: z.string().describe("The name of the new branch (e.g. 'feature/login')"),
2517
+ startPoint: z.string().describe("The commit hash or ref to branch from (e.g. 'refs/heads/master' or a commit id)")
2518
+ },
2519
+ deleteBranch: {
2520
+ projectKey: z.string().describe("The project key"),
2521
+ repositorySlug: z.string().describe("The repository slug"),
2522
+ name: z.string().describe("The branch to delete, as a full ref (e.g. 'refs/heads/feature/login') or branch name"),
2523
+ dryRun: z.boolean().optional().describe("If true, validate the deletion without actually removing the branch")
2524
+ },
2525
+ getBranches: {
2526
+ projectKey: z.string().describe("The project key"),
2527
+ repositorySlug: z.string().describe("The repository slug"),
2528
+ filterText: z.string().optional().describe("Optional text that the returned branch names must contain (substring match)"),
2529
+ orderBy: z.enum(['ALPHABETICAL', 'MODIFICATION']).optional().describe("Ordering of the results: ALPHABETICAL by branch name, or MODIFICATION (most recently modified first)"),
2530
+ start: z.number().optional().describe("Start number for pagination"),
2531
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2532
+ },
2533
+ getDefaultBranch: {
2534
+ projectKey: z.string().describe("The project key"),
2535
+ repositorySlug: z.string().describe("The repository slug")
2536
+ },
2537
+ editFile: {
2538
+ projectKey: z.string().describe("The project key"),
2539
+ repositorySlug: z.string().describe("The repository slug"),
2540
+ path: z.string().describe("The path of the file to create or modify (e.g. 'src/index.ts')"),
2541
+ content: z.string().describe("The full new content of the file"),
2542
+ message: z.string().describe("The commit message"),
2543
+ branch: z.string().describe("The branch to commit on (e.g. 'master' or 'refs/heads/master')"),
2544
+ sourceCommitId: z.string().optional().describe("The commit id the file was last seen at. Required when editing an existing file (conflict detection); omit when creating a new file."),
2545
+ sourceBranch: z.string().optional().describe("When set, the target branch is created from this starting branch before committing.")
2546
+ },
2547
+ getTags: {
2548
+ projectKey: z.string().describe("The project key"),
2549
+ repositorySlug: z.string().describe("The repository slug"),
2550
+ filterText: z.string().optional().describe("Optional text that the returned tag names must contain"),
2551
+ orderBy: z.enum(['ALPHABETICAL', 'MODIFICATION']).optional().describe("Ordering of the results: ALPHABETICAL or MODIFICATION (most recently modified first)"),
2552
+ start: z.number().optional().describe("Start number for pagination"),
2553
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2554
+ },
2555
+ getTag: {
2556
+ projectKey: z.string().describe("The project key"),
2557
+ repositorySlug: z.string().describe("The repository slug"),
2558
+ name: z.string().describe("The tag name (e.g. 'release-1.0.0')")
2559
+ },
2560
+ createTag: {
2561
+ projectKey: z.string().describe("The project key"),
2562
+ repositorySlug: z.string().describe("The repository slug"),
2563
+ name: z.string().describe("The name of the new tag"),
2564
+ startPoint: z.string().describe("The commit hash or ref the tag should point at (e.g. 'refs/heads/master' or a commit id)"),
2565
+ message: z.string().optional().describe("Optional message; when provided, an annotated tag is created")
2566
+ },
2567
+ getCommits: {
2568
+ projectKey: z.string().describe("The project key"),
2569
+ repositorySlug: z.string().describe("The repository slug"),
2570
+ path: z.string().optional().describe("Optional path to filter commits by"),
2571
+ since: z.string().optional().describe("The commit ID (exclusively) to retrieve commits after"),
2572
+ until: z.string().optional().describe("The commit ID (inclusively) to retrieve commits before"),
2573
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2574
+ },
2575
+ listBuildStatuses: {
2576
+ commitId: z.string().describe("The commit id (hash) whose build statuses to list. Note: build statuses are keyed by commit id globally, independent of project/repository."),
2577
+ orderBy: z.string().optional().describe("Optional ordering of the results"),
2578
+ start: z.number().optional().describe("Start number for pagination"),
2579
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2580
+ },
2581
+ addBuildStatus: {
2582
+ projectKey: z.string().describe("The project key"),
2583
+ repositorySlug: z.string().describe("The repository slug"),
2584
+ commitId: z.string().describe("The commit id (hash) to attach the build status to"),
2585
+ state: z.enum(['SUCCESSFUL', 'FAILED', 'INPROGRESS']).describe("The build state"),
2586
+ key: z.string().describe("A unique key identifying the build (e.g. the pipeline or plan key)"),
2587
+ url: z.string().describe("The URL to the build result"),
2588
+ name: z.string().optional().describe("Optional display name for the build"),
2589
+ description: z.string().optional().describe("Optional description for the build")
2590
+ },
2591
+ getBuildStatus: {
2592
+ projectKey: z.string().describe("The project key"),
2593
+ repositorySlug: z.string().describe("The repository slug"),
2594
+ commitId: z.string().describe("The commit id (hash)"),
2595
+ key: z.string().describe("The unique key of the build status to fetch")
2596
+ },
2597
+ setInsightReport: {
2598
+ projectKey: z.string().describe("The project key"),
2599
+ repositorySlug: z.string().describe("The repository slug"),
2600
+ commitId: z.string().describe("The commit id (hash) the report is attached to"),
2601
+ key: z.string().describe("A unique, namespaced key identifying the report (e.g. 'mycompany.eslint')"),
2602
+ report: z.object({
2603
+ title: z.string().describe("The report title"),
2604
+ details: z.string().optional().describe("Detailed description"),
2605
+ result: z.enum(['PASS', 'FAIL']).optional().describe("Overall report result"),
2606
+ reporter: z.string().optional().describe("Name of the tool/reporter that produced the report"),
2607
+ link: z.string().optional().describe("URL linking to the full report"),
2608
+ logoUrl: z.string().optional().describe("URL of a logo to display"),
2609
+ data: z.array(z.any()).optional().describe("Array of report data items ({ title, type, value })")
2610
+ }).passthrough().describe("The Code Insights report payload")
2611
+ },
2612
+ getInsightReport: {
2613
+ projectKey: z.string().describe("The project key"),
2614
+ repositorySlug: z.string().describe("The repository slug"),
2615
+ commitId: z.string().describe("The commit id (hash)"),
2616
+ key: z.string().describe("The report key")
2617
+ },
2618
+ deleteInsightReport: {
2619
+ projectKey: z.string().describe("The project key"),
2620
+ repositorySlug: z.string().describe("The repository slug"),
2621
+ commitId: z.string().describe("The commit id (hash)"),
2622
+ key: z.string().describe("The report key")
2623
+ },
2624
+ addInsightAnnotations: {
2625
+ projectKey: z.string().describe("The project key"),
2626
+ repositorySlug: z.string().describe("The repository slug"),
2627
+ commitId: z.string().describe("The commit id (hash)"),
2628
+ key: z.string().describe("The report key the annotations belong to"),
2629
+ annotations: z.array(z.object({
2630
+ externalId: z.string().describe("Unique id of the annotation within the report"),
2631
+ path: z.string().describe("File path the annotation refers to"),
2632
+ line: z.number().describe("Line number the annotation refers to"),
2633
+ message: z.string().describe("The annotation message"),
2634
+ severity: z.enum(['LOW', 'MEDIUM', 'HIGH']).describe("Annotation severity"),
2635
+ link: z.string().optional().describe("URL with more detail"),
2636
+ type: z.enum(['VULNERABILITY', 'CODE_SMELL', 'BUG']).optional().describe("Annotation type")
2637
+ }).passthrough()).describe("Array of annotations to add to the report")
2638
+ },
2639
+ getInsightAnnotations: {
2640
+ projectKey: z.string().describe("The project key"),
2641
+ repositorySlug: z.string().describe("The repository slug"),
2642
+ commitId: z.string().describe("The commit id (hash)"),
2643
+ key: z.string().describe("The report key")
2644
+ },
2645
+ deleteInsightAnnotations: {
2646
+ projectKey: z.string().describe("The project key"),
2647
+ repositorySlug: z.string().describe("The repository slug"),
2648
+ commitId: z.string().describe("The commit id (hash)"),
2649
+ key: z.string().describe("The report key"),
2650
+ externalId: z.string().optional().describe("If given, delete only this annotation; otherwise delete all annotations of the report")
2651
+ },
2652
+ getCommitComments: {
2653
+ projectKey: z.string().describe("The project key"),
2654
+ repositorySlug: z.string().describe("The repository slug"),
2655
+ commitId: z.string().describe("The commit id (hash)"),
2656
+ path: z.string().describe("The file path to return comments for. Required: Bitbucket only returns commit comments scoped to a file path."),
2657
+ since: z.string().optional().describe("Optional commit id; return comments added since that commit"),
2658
+ start: z.number().optional().describe("Start number for pagination"),
2659
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2660
+ },
2661
+ addCommitComment: {
2662
+ projectKey: z.string().describe("The project key"),
2663
+ repositorySlug: z.string().describe("The repository slug"),
2664
+ commitId: z.string().describe("The commit id (hash) to comment on"),
2665
+ text: z.string().describe("The comment text"),
2666
+ path: z.string().optional().describe("Optional file path to anchor the comment to a file"),
2667
+ line: z.number().optional().describe("Optional line number within the file to anchor the comment to (requires path)"),
2668
+ lineType: z.enum(['ADDED', 'REMOVED', 'CONTEXT']).optional().describe("Line type for the anchored line. Defaults to CONTEXT when a line is given.")
2669
+ },
2670
+ getCommit: {
2671
+ projectKey: z.string().describe("The project key"),
2672
+ repositorySlug: z.string().describe("The repository slug"),
2673
+ commitId: z.string().describe("The commit id (hash) to retrieve"),
2674
+ path: z.string().optional().describe("Optional path; the commit is only returned if it affects this path")
2675
+ },
2676
+ getCommitDiff: {
2677
+ projectKey: z.string().describe("The project key"),
2678
+ repositorySlug: z.string().describe("The repository slug"),
2679
+ commitId: z.string().describe("The commit id (hash)"),
2680
+ path: z.string().optional().describe("Optional file path to limit the diff to. Omit for the whole-commit diff."),
2681
+ contextLines: z.string().optional().describe("Number of context lines to include around changes"),
2682
+ whitespace: z.string().optional().describe("Optional whitespace flag which can be set to 'ignore-all'"),
2683
+ srcPath: z.string().optional().describe("The previous path to the file, if it has been copied, moved or renamed")
2684
+ },
2685
+ compareRefs: {
2686
+ projectKey: z.string().describe("The project key"),
2687
+ repositorySlug: z.string().describe("The repository slug"),
2688
+ from: z.string().describe("The source ref or commit to compare from (e.g. 'refs/heads/feature' or a commit hash)"),
2689
+ to: z.string().describe("The target ref or commit to compare to (e.g. 'refs/heads/master')"),
2690
+ fromRepo: z.string().optional().describe("Optional 'projectKey/repositorySlug' the 'from' ref lives in, for cross-repository comparisons"),
2691
+ compareType: z.enum(['commits', 'changes']).optional().describe("'commits' (default) lists the commits between the refs; 'changes' lists the changed files"),
2692
+ start: z.number().optional().describe("Start number for pagination"),
2693
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2694
+ },
2695
+ getFileContent: {
2696
+ projectKey: z.string().describe("The project key"),
2697
+ repositorySlug: z.string().describe("The repository slug"),
2698
+ path: z.string().describe("The path of the file to retrieve (e.g. 'src/index.ts')"),
2699
+ at: z.string().optional().describe("Optional commit hash or ref to read the file at (e.g. 'refs/heads/main' or a commit id). Defaults to the repository's default branch.")
2700
+ },
2701
+ browseRepository: {
2702
+ projectKey: z.string().describe("The project key"),
2703
+ repositorySlug: z.string().describe("The repository slug"),
2704
+ path: z.string().optional().describe("Path to browse. Omit or pass an empty string to list the repository root. A directory path returns its children; a file path returns the file content as paginated lines."),
2705
+ at: z.string().optional().describe("Optional commit hash or ref to browse at. Defaults to the repository's default branch."),
2706
+ type: z.boolean().optional().describe("If true, return only the node type (FILE, DIRECTORY, or SUBMODULE) of the path instead of its content."),
2707
+ blame: z.boolean().optional().describe("If true, include blame information in the response.")
2708
+ },
2709
+ getPullRequestComments: {
2710
+ projectKey: z.string().describe("The project key"),
2711
+ repositorySlug: z.string().describe("The repository slug"),
2712
+ pullRequestId: z.string().describe("The pull request ID"),
2713
+ start: z.number().optional().describe("Start number for pagination"),
2714
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used."),
2715
+ output: z.enum(['summary', 'compact', 'full']).optional().describe("Choose between summary lines, compact structured output, or the full API payload. Defaults to compact."),
2716
+ includeResolved: z.boolean().optional().describe("Include resolved comment threads and their replies. Defaults to false, so resolved threads are omitted.")
2717
+ },
2718
+ getPullRequestChanges: {
2719
+ projectKey: z.string().describe("The project key"),
2720
+ repositorySlug: z.string().describe("The repository slug"),
2721
+ pullRequestId: z.string().describe("The pull request ID"),
2722
+ sinceId: z.string().optional().describe("The since commit hash to stream changes for a RANGE arbitrary change scope"),
2723
+ changeScope: z.string().optional().describe("UNREVIEWED for unreviewed changes, RANGE for changes between commits, ALL for all changes (default)"),
2724
+ untilId: z.string().optional().describe("The until commit hash to stream changes for a RANGE arbitrary change scope"),
2725
+ withComments: z.string().optional().describe("true to apply comment counts in the changes (default), false to stream changes without comment counts"),
2726
+ start: z.number().optional().describe("Start number for pagination"),
2727
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used."),
2728
+ output: z.enum(['summary', 'compact', 'full']).optional().describe("Choose between summary lines, compact structured output, or the full API payload. Defaults to compact.")
2729
+ },
2730
+ postPullRequestComment: {
2731
+ projectKey: z.string().describe("The project key"),
2732
+ repositorySlug: z.string().describe("The repository slug"),
2733
+ pullRequestId: z.string().describe("The pull request ID"),
2734
+ text: z.string().describe("The comment text"),
2735
+ parentId: z.number().optional().describe("Parent comment ID for replies"),
2736
+ filePath: z.string().optional().describe("File path for file-specific comments"),
2737
+ startLine: z.number().optional().describe("First line of a multiline range. Provide together with 'line' (the last line) to span multiple lines. REQUIRED for a multi-line ```suggestion: the anchored range (startLine..line) is exactly what 'Apply suggestion' replaces — omit it and only the single 'line' is replaced, leaving the rest. Requires Bitbucket DC >= 9.3.0 for multiline suggestions."),
2738
+ startLineType: z.enum(['ADDED', 'REMOVED', 'CONTEXT']).optional().describe("Line type for the start line of a multiline range. Defaults to the same value as lineType if omitted."),
2739
+ line: z.number().optional().describe("Single-line comments: the line. Multiline: the LAST line of the range (use startLine for the first). For a ```suggestion this is the last replaced line."),
2740
+ lineType: z.enum(['ADDED', 'REMOVED', 'CONTEXT']).optional().describe("Line type for 'line' (the end line, or the only line for single-line comments). Use 'ADDED'/'CONTEXT' for the new/target file, 'REMOVED' for the original/source file."),
2741
+ pending: z.boolean().optional().describe("If true, creates a pending (draft) comment not visible to others until the review is submitted via bitbucket_submitPullRequestReview. Only works when filePath is provided — top-level PR comments (no filePath) are always posted live."),
2742
+ severity: z.enum(['NORMAL', 'BLOCKER']).optional().describe("Comment severity. Use 'BLOCKER' to post the comment as a task that must be resolved before the PR can be merged. Defaults to 'NORMAL' (regular comment)."),
2743
+ output: z.enum(['ack', 'full']).optional().describe("Return a compact acknowledgement or the full API response. Defaults to ack.")
2744
+ },
2745
+ updatePullRequestComment: {
2746
+ projectKey: z.string().describe("The project key"),
2747
+ repositorySlug: z.string().describe("The repository slug"),
2748
+ pullRequestId: z.string().describe("The pull request ID"),
2749
+ commentId: z.string().describe("The ID of the comment to update"),
2750
+ version: z.number().describe("The current version of the comment, required for optimistic locking. Get it from bitbucket_getPR_CommentsAndAction or from the response of the original post/update."),
2751
+ text: z.string().optional().describe("New comment text. Omit to leave unchanged."),
2752
+ state: z.enum(['OPEN', 'RESOLVED']).optional().describe("New state. 'RESOLVED' resolves the comment thread — on a regular comment this is the 'Resolve' button in the UI; on a BLOCKER (task) comment it also ticks the task. 'OPEN' reopens the thread (un-ticks the task). Resolution is driven by the root comment's state."),
2753
+ severity: z.enum(['NORMAL', 'BLOCKER']).optional().describe("New severity. Use 'BLOCKER' to convert a comment into a task, 'NORMAL' to convert it back."),
2754
+ output: z.enum(['ack', 'full']).optional().describe("Return a compact acknowledgement or the full API response. Defaults to ack.")
2755
+ },
2756
+ getUser: {
2757
+ userSlug: z.string().optional().describe("Exact slug of the user to look up (e.g. 'tdepole'). Use this to confirm a known slug or fetch a user's details."),
2758
+ filter: z.string().optional().describe("Search string to find users by name or email. Use this to discover a user's slug when it is not known.")
2759
+ },
2760
+ submitPullRequestReview: {
2761
+ projectKey: z.string().describe("The project key"),
2762
+ repositorySlug: z.string().describe("The repository slug"),
2763
+ pullRequestId: z.string().describe("The pull request ID"),
2764
+ userSlug: z.string().describe("The username/slug of the PAT token owner — the same user whose credentials are in BITBUCKET_API_TOKEN. Resolution order: (1) author.slug from any comment posted this session, (2) reviewers/participants array from getPullRequest, (3) bitbucket_getUser with a name/email filter."),
2765
+ status: z.enum(['APPROVED', 'NEEDS_WORK', 'UNAPPROVED']).describe("The review verdict: APPROVED, NEEDS_WORK, or UNAPPROVED"),
2766
+ lastReviewedCommit: z.string().optional().describe("Optional hash of the last commit reviewed, used to track review progress")
2767
+ },
2768
+ getPullRequestDiff: {
2769
+ projectKey: z.string().describe("The project key"),
2770
+ repositorySlug: z.string().describe("The repository slug"),
2771
+ pullRequestId: z.string().describe("The pull request ID"),
2772
+ path: z.string().describe("The path to the file which should be diffed. Note: Before getting diff, use getPullRequestChanges to understand what files were changed in the PR"),
2773
+ contextLines: z.string().optional().describe("Number of context lines to include around added/removed lines in the diff"),
2774
+ sinceId: z.string().optional().describe("The since commit hash to stream a diff between two arbitrary hashes"),
2775
+ srcPath: z.string().optional().describe("The previous path to the file, if the file has been copied, moved or renamed"),
2776
+ diffType: z.string().optional().describe("The type of diff being requested"),
2777
+ untilId: z.string().optional().describe("The until commit hash to stream a diff between two arbitrary hashes"),
2778
+ whitespace: z.string().optional().describe("Optional whitespace flag which can be set to 'ignore-all'")
2779
+ },
2780
+ createPullRequest: {
2781
+ projectKey: z.string().describe("The project key"),
2782
+ repositorySlug: z.string().describe("The repository slug"),
2783
+ title: z.string().describe("The pull request title"),
2784
+ description: z.string().optional().describe("The pull request description"),
2785
+ fromRefId: z.string().describe("The source branch reference ID (e.g., 'refs/heads/feature-branch')"),
2786
+ toRefId: z.string().describe("The destination branch reference ID (e.g., 'refs/heads/main')"),
2787
+ draft: z.boolean().optional().describe("If true, the pull request is created as a draft (work-in-progress) and cannot be merged until marked ready."),
2788
+ reviewers: z.array(z.string()).optional().describe("Optional array of reviewer usernames (use the 'name' field from Bitbucket user objects, not 'slug')"),
2789
+ output: z.enum(['ack', 'full']).optional().describe("Return a compact acknowledgement or the full API response. Defaults to ack.")
2790
+ },
2791
+ updatePullRequest: {
2792
+ projectKey: z.string().describe("The project key"),
2793
+ repositorySlug: z.string().describe("The repository slug"),
2794
+ pullRequestId: z.string().describe("The pull request ID"),
2795
+ version: z.number().describe("The current version of the pull request (required for optimistic locking). Obtain this by calling bitbucket_getPullRequest first."),
2796
+ title: z.string().optional().describe("The new title for the pull request"),
2797
+ description: z.string().optional().describe("The new description for the pull request"),
2798
+ draft: z.boolean().optional().describe("If provided, sets the draft (work-in-progress) status of the pull request. Pass true to mark as draft, false to mark as ready for review."),
2799
+ reviewers: z.array(z.string()).optional().describe("Optional array of reviewer usernames to set (use the 'name' field from Bitbucket user objects, not 'slug')"),
2800
+ output: z.enum(['ack', 'full']).optional().describe("Return a compact acknowledgement or the full API response. Defaults to ack.")
2801
+ },
2802
+ canMergePullRequest: {
2803
+ projectKey: z.string().describe("The project key"),
2804
+ repositorySlug: z.string().describe("The repository slug"),
2805
+ pullRequestId: z.string().describe("The pull request ID")
2806
+ },
2807
+ mergePullRequest: {
2808
+ projectKey: z.string().describe("The project key"),
2809
+ repositorySlug: z.string().describe("The repository slug"),
2810
+ pullRequestId: z.string().describe("The pull request ID"),
2811
+ version: z.number().describe("The current version of the pull request (required for optimistic locking). Obtain it via bitbucket_getPullRequest. Use bitbucket_canMergePullRequest first to confirm there are no merge vetoes."),
2812
+ message: z.string().optional().describe("Optional custom merge commit message"),
2813
+ strategyId: z.string().optional().describe("Optional merge strategy id, e.g. 'no-ff', 'ff', 'ff-only', 'rebase-no-ff', or 'squash'. Must be enabled on the repository. Defaults to the repository's configured strategy."),
2814
+ output: z.enum(['ack', 'full']).optional().describe("Return a compact acknowledgement or the full API response. Defaults to ack.")
2815
+ },
2816
+ declinePullRequest: {
2817
+ projectKey: z.string().describe("The project key"),
2818
+ repositorySlug: z.string().describe("The repository slug"),
2819
+ pullRequestId: z.string().describe("The pull request ID"),
2820
+ version: z.number().describe("The current version of the pull request (required for optimistic locking). Obtain it via bitbucket_getPullRequest."),
2821
+ comment: z.string().optional().describe("Optional comment explaining why the pull request is being declined"),
2822
+ output: z.enum(['ack', 'full']).optional().describe("Return a compact acknowledgement or the full API response. Defaults to ack.")
2823
+ },
2824
+ reopenPullRequest: {
2825
+ projectKey: z.string().describe("The project key"),
2826
+ repositorySlug: z.string().describe("The repository slug"),
2827
+ pullRequestId: z.string().describe("The pull request ID"),
2828
+ version: z.number().describe("The current version of the declined pull request (required for optimistic locking). Obtain it via bitbucket_getPullRequest."),
2829
+ output: z.enum(['ack', 'full']).optional().describe("Return a compact acknowledgement or the full API response. Defaults to ack.")
2830
+ },
2831
+ addPullRequestReviewer: {
2832
+ projectKey: z.string().describe("The project key"),
2833
+ repositorySlug: z.string().describe("The repository slug"),
2834
+ pullRequestId: z.string().describe("The pull request ID"),
2835
+ userSlug: z.string().describe("The username/name of the user to add as a reviewer (use the 'name' field from Bitbucket user objects). Adds a single reviewer without replacing the existing ones, unlike bitbucket_updatePullRequest.")
2836
+ },
2837
+ removePullRequestReviewer: {
2838
+ projectKey: z.string().describe("The project key"),
2839
+ repositorySlug: z.string().describe("The repository slug"),
2840
+ pullRequestId: z.string().describe("The pull request ID"),
2841
+ userSlug: z.string().describe("The username/name of the reviewer to remove. The user remains a participant but loses the REVIEWER role.")
2842
+ },
2843
+ getRequiredReviewers: {
2844
+ projectKey: z.string().describe("The project key"),
2845
+ repositorySlug: z.string().describe("The repository slug"),
2846
+ sourceRefId: z.string().describe("The ID of the source ref (e.g., 'refs/heads/feature-branch')"),
2847
+ targetRefId: z.string().describe("The ID of the target ref (e.g., 'refs/heads/main')"),
2848
+ sourceRepoId: z.string().optional().describe("Optional ID of the repository in which the source ref exists"),
2849
+ targetRepoId: z.string().optional().describe("Optional ID of the repository in which the target ref exists")
2850
+ },
2851
+ getDashboardPullRequests: {
2852
+ role: z.enum(['AUTHOR', 'REVIEWER', 'PARTICIPANT']).optional().default('AUTHOR').describe("Filter by the user's role in the PR: AUTHOR (default), REVIEWER, or PARTICIPANT"),
2853
+ state: z.enum(['OPEN', 'DECLINED', 'MERGED']).optional().default('OPEN').describe("Filter by PR state: OPEN (default), DECLINED, or MERGED"),
2854
+ closedSince: z.number().optional().describe("Timestamp in milliseconds. If state is not OPEN, return only PRs closed after this date"),
2855
+ order: z.enum(['NEWEST', 'OLDEST', 'PARTICIPANT']).optional().default('NEWEST').describe("Order of results: NEWEST (default), OLDEST, or PARTICIPANT"),
2856
+ start: z.number().optional().describe("Start number for pagination"),
2857
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2858
+ },
2859
+ getInboxPullRequests: {
2860
+ start: z.number().optional().describe("Start number for the page (inclusive). If not passed, first page is assumed"),
2861
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2862
+ },
2863
+ getBranchRestrictions: {
2864
+ projectKey: z.string().describe("The project key"),
2865
+ repositorySlug: z.string().describe("The repository slug"),
2866
+ matcherType: z.enum(['BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).optional().describe("Filter by matcher type"),
2867
+ matcherId: z.string().optional().describe("Filter by matcher id (requires matcherType)"),
2868
+ type: z.enum(['read-only', 'no-deletes', 'fast-forward-only', 'pull-request-only', 'no-creates']).optional().describe("Filter by restriction type"),
2869
+ start: z.number().optional().describe("Start number for pagination"),
2870
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2871
+ },
2872
+ createBranchRestriction: {
2873
+ projectKey: z.string().describe("The project key"),
2874
+ repositorySlug: z.string().describe("The repository slug"),
2875
+ type: z.enum(['read-only', 'no-deletes', 'fast-forward-only', 'pull-request-only', 'no-creates']).describe("The restriction type: read-only (prevent changes), no-deletes, fast-forward-only (prevent rewriting history), pull-request-only (prevent changes without a PR), no-creates"),
2876
+ matcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).describe("Matcher type for the restricted ref"),
2877
+ matcherValue: z.string().describe("Matcher value. For BRANCH use a ref id like 'refs/heads/main'; for PATTERN use the pattern; for MODEL_* use the model id; for ANY_REF use 'ANY_REF'."),
2878
+ matcherDisplayId: z.string().optional().describe("Display value for the matcher (defaults to the matcher value, e.g. 'main' for 'refs/heads/main')"),
2879
+ exemptUserSlugs: z.array(z.string()).optional().describe("User slugs exempt from the restriction"),
2880
+ exemptGroupNames: z.array(z.string()).optional().describe("Group names exempt from the restriction"),
2881
+ exemptAccessKeyIds: z.array(z.number()).optional().describe("SSH access key IDs exempt from the restriction")
2882
+ },
2883
+ getBranchRestriction: {
2884
+ projectKey: z.string().describe("The project key"),
2885
+ repositorySlug: z.string().describe("The repository slug"),
2886
+ id: z.string().describe("The restriction ID")
2887
+ },
2888
+ deleteBranchRestriction: {
2889
+ projectKey: z.string().describe("The project key"),
2890
+ repositorySlug: z.string().describe("The repository slug"),
2891
+ id: z.string().describe("The restriction ID")
2892
+ },
2893
+ searchCode: {
2894
+ query: z.string().describe("The search query. Supports Bitbucket search modifiers, e.g. 'project:TEST authenticate', 'repo:TEST/demo TODO' (the repo modifier must be 'repo:projectkey/repositoryslug'), 'ext:ts useState'. Scope to a project or repository inside the query text."),
2895
+ limit: z.number().optional().describe("Maximum number of matching files to return. If not passed, the package default page size is used."),
2896
+ secondaryLimit: z.number().optional().describe("Maximum number of hit contexts (matching code snippets) to return per file")
2897
+ },
2898
+ getDefaultReviewerConditions: {
2899
+ projectKey: z.string().describe("The project key"),
2900
+ repositorySlug: z.string().describe("The repository slug")
2901
+ },
2902
+ createDefaultReviewerCondition: {
2903
+ projectKey: z.string().describe("The project key"),
2904
+ repositorySlug: z.string().describe("The repository slug"),
2905
+ sourceMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).describe("Matcher type for the source ref"),
2906
+ sourceMatcherValue: z.string().describe("Matcher value for the source ref. For ANY_REF use 'ANY_REF'; for BRANCH use a ref id like 'refs/heads/main'; for PATTERN use the pattern; for MODEL_* use the model id."),
2907
+ targetMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).describe("Matcher type for the target ref"),
2908
+ targetMatcherValue: z.string().describe("Matcher value for the target ref (see sourceMatcherValue)"),
2909
+ reviewerIds: z.array(z.number()).describe("Numeric user IDs of the default reviewers. Resolve a username to its numeric id via bitbucket_getUser."),
2910
+ requiredApprovals: z.number().optional().describe("Number of approvals required from the default reviewers"),
2911
+ sourceMatcherDisplayId: z.string().optional().describe("Display value for the source matcher (defaults to the matcher value, e.g. 'main' for 'refs/heads/main')"),
2912
+ targetMatcherDisplayId: z.string().optional().describe("Display value for the target matcher (defaults to the matcher value)")
2913
+ },
2914
+ updateDefaultReviewerCondition: {
2915
+ projectKey: z.string().describe("The project key"),
2916
+ repositorySlug: z.string().describe("The repository slug"),
2917
+ id: z.string().describe("The ID of the condition to update"),
2918
+ sourceMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).describe("Matcher type for the source ref"),
2919
+ sourceMatcherValue: z.string().describe("Matcher value for the source ref"),
2920
+ targetMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).describe("Matcher type for the target ref"),
2921
+ targetMatcherValue: z.string().describe("Matcher value for the target ref"),
2922
+ reviewerIds: z.array(z.number()).describe("Numeric user IDs of the default reviewers. The update replaces the full condition, so pass the complete desired set."),
2923
+ requiredApprovals: z.number().optional().describe("Number of approvals required from the default reviewers"),
2924
+ sourceMatcherDisplayId: z.string().optional().describe("Display value for the source matcher (defaults to the matcher value)"),
2925
+ targetMatcherDisplayId: z.string().optional().describe("Display value for the target matcher (defaults to the matcher value)")
2926
+ },
2927
+ deleteDefaultReviewerCondition: {
2928
+ projectKey: z.string().describe("The project key"),
2929
+ repositorySlug: z.string().describe("The repository slug"),
2930
+ id: z.string().describe("The ID of the condition to delete")
2931
+ },
2932
+ getRequiredBuildsMergeChecks: {
2933
+ projectKey: z.string().describe("The project key"),
2934
+ repositorySlug: z.string().describe("The repository slug"),
2935
+ start: z.number().optional().describe("Start number for pagination"),
2936
+ limit: z.number().optional().describe("Number of items to return. If not passed, the package default page size is used.")
2937
+ },
2938
+ createRequiredBuildsMergeCheck: {
2939
+ projectKey: z.string().describe("The project key"),
2940
+ repositorySlug: z.string().describe("The repository slug"),
2941
+ buildParentKeys: z.array(z.string()).describe("Non-empty list of build parent keys that must have green builds for the check to pass"),
2942
+ refMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).describe("Matcher type for the target ref the check applies to"),
2943
+ refMatcherValue: z.string().describe("Matcher value for the target ref. For BRANCH use a ref id like 'refs/heads/main'; for PATTERN use the pattern; for MODEL_* use the model id; for ANY_REF use 'ANY_REF'."),
2944
+ refMatcherDisplayId: z.string().optional().describe("Display value for the ref matcher (defaults to the matcher value)"),
2945
+ exemptRefMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).optional().describe("Matcher type for source refs exempt from the check"),
2946
+ exemptRefMatcherValue: z.string().optional().describe("Matcher value for source refs exempt from the check"),
2947
+ exemptRefMatcherDisplayId: z.string().optional().describe("Display value for the exempt ref matcher (defaults to its value)")
2948
+ },
2949
+ updateRequiredBuildsMergeCheck: {
2950
+ projectKey: z.string().describe("The project key"),
2951
+ repositorySlug: z.string().describe("The repository slug"),
2952
+ id: z.string().describe("The ID of the merge check to update"),
2953
+ buildParentKeys: z.array(z.string()).describe("Non-empty list of build parent keys. The update replaces the whole check, so pass the complete desired list."),
2954
+ refMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).describe("Matcher type for the target ref"),
2955
+ refMatcherValue: z.string().describe("Matcher value for the target ref"),
2956
+ refMatcherDisplayId: z.string().optional().describe("Display value for the ref matcher (defaults to the matcher value)"),
2957
+ exemptRefMatcherType: z.enum(['ANY_REF', 'BRANCH', 'PATTERN', 'MODEL_CATEGORY', 'MODEL_BRANCH']).optional().describe("Matcher type for source refs exempt from the check"),
2958
+ exemptRefMatcherValue: z.string().optional().describe("Matcher value for source refs exempt from the check"),
2959
+ exemptRefMatcherDisplayId: z.string().optional().describe("Display value for the exempt ref matcher (defaults to its value)")
2960
+ },
2961
+ deleteRequiredBuildsMergeCheck: {
2962
+ projectKey: z.string().describe("The project key"),
2963
+ repositorySlug: z.string().describe("The repository slug"),
2964
+ id: z.string().describe("The ID of the merge check to delete")
2965
+ },
2966
+ deletePullRequestComment: {
2967
+ projectKey: z.string().describe("The project key"),
2968
+ repositorySlug: z.string().describe("The repository slug"),
2969
+ pullRequestId: z.string().describe("The pull request ID"),
2970
+ commentId: z.string().describe("The ID of the comment to delete"),
2971
+ version: z.number().describe("The current version of the comment, required for optimistic locking. A comment with replies cannot be deleted.")
2972
+ },
2973
+ applyPullRequestSuggestion: {
2974
+ projectKey: z.string().describe("The project key"),
2975
+ repositorySlug: z.string().describe("The repository slug"),
2976
+ pullRequestId: z.string().describe("The pull request ID"),
2977
+ commentId: z.string().describe("The ID of the comment that contains the code suggestion"),
2978
+ commentVersion: z.number().describe("The current version of the comment containing the suggestion"),
2979
+ pullRequestVersion: z.number().describe("The current version of the pull request"),
2980
+ commitMessage: z.string().describe("Commit message for the commit that applies the suggestion. Required and must be non-empty."),
2981
+ suggestionIndex: z.number().optional().describe("Index of the suggestion within the comment when it contains several. Defaults to the first suggestion.")
2982
+ },
2983
+ watchPullRequest: {
2984
+ projectKey: z.string().describe("The project key"),
2985
+ repositorySlug: z.string().describe("The repository slug"),
2986
+ pullRequestId: z.string().describe("The pull request ID")
2987
+ },
2988
+ unwatchPullRequest: {
2989
+ projectKey: z.string().describe("The project key"),
2990
+ repositorySlug: z.string().describe("The repository slug"),
2991
+ pullRequestId: z.string().describe("The pull request ID")
2992
+ },
2993
+ createProject: {
2994
+ key: z.string().describe("The project key (e.g. 'PROJ'). Used in URLs and must be unique."),
2995
+ name: z.string().describe("The project name"),
2996
+ description: z.string().optional().describe("Optional project description")
2997
+ },
2998
+ updateProject: {
2999
+ key: z.string().describe("The project key. The key itself is never changed by this operation."),
3000
+ name: z.string().optional().describe("New project name"),
3001
+ description: z.string().optional().describe("New project description")
3002
+ },
3003
+ deleteProject: {
3004
+ key: z.string().describe("The project key. The project must contain no repositories.")
3005
+ },
3006
+ createRepository: {
3007
+ projectKey: z.string().describe("The project key the repository will be created in"),
3008
+ name: z.string().describe("The repository name"),
3009
+ scmId: z.string().optional().describe("The SCM type. Defaults to 'git'."),
3010
+ defaultBranch: z.string().optional().describe("Optional default branch for the new repository (e.g. 'main')")
3011
+ },
3012
+ updateRepository: {
3013
+ projectKey: z.string().describe("The project key"),
3014
+ repositorySlug: z.string().describe("The repository slug"),
3015
+ name: z.string().optional().describe("New repository name. Changing the name may change the slug."),
3016
+ description: z.string().optional().describe("New repository description"),
3017
+ defaultBranch: z.string().optional().describe("New default branch (e.g. 'main')"),
3018
+ targetProjectKey: z.string().optional().describe("Project key to move the repository into")
3019
+ },
3020
+ forkRepository: {
3021
+ projectKey: z.string().describe("The project key of the origin repository"),
3022
+ repositorySlug: z.string().describe("The repository slug of the origin repository"),
3023
+ name: z.string().optional().describe("Name for the fork. Defaults to the origin repository name."),
3024
+ targetProjectKey: z.string().optional().describe("Target project key for the fork. Defaults to the user's personal project."),
3025
+ defaultBranch: z.string().optional().describe("Default branch for the fork. Defaults to the origin's default branch.")
3026
+ },
3027
+ deleteRepository: {
3028
+ projectKey: z.string().describe("The project key"),
3029
+ repositorySlug: z.string().describe("The repository slug")
3030
+ },
3031
+ getWebhooks: {
3032
+ projectKey: z.string().describe("The project key"),
3033
+ repositorySlug: z.string().describe("The repository slug"),
3034
+ event: z.string().optional().describe("Optional webhook event ID to filter for (e.g. 'repo:refs_changed', 'pr:opened')"),
3035
+ statistics: z.boolean().optional().describe("If true, include invocation statistics for each webhook")
3036
+ },
3037
+ getWebhook: {
3038
+ projectKey: z.string().describe("The project key"),
3039
+ repositorySlug: z.string().describe("The repository slug"),
3040
+ webhookId: z.string().describe("The ID of the webhook"),
3041
+ statistics: z.boolean().optional().describe("If true, include invocation statistics for the webhook")
3042
+ },
3043
+ createWebhook: {
3044
+ projectKey: z.string().describe("The project key"),
3045
+ repositorySlug: z.string().describe("The repository slug"),
3046
+ name: z.string().describe("The webhook name"),
3047
+ url: z.string().describe("The endpoint URL the webhook will POST to"),
3048
+ events: z.array(z.string()).describe("List of event IDs to subscribe to (e.g. ['repo:refs_changed', 'pr:opened', 'pr:merged'])"),
3049
+ active: z.boolean().optional().describe("Whether the webhook is enabled. Defaults to true on the server side."),
3050
+ secret: z.string().optional().describe("Optional secret used to sign webhook payloads (HMAC)"),
3051
+ sslVerificationRequired: z.boolean().optional().describe("Whether SSL verification is required for the endpoint URL")
3052
+ },
3053
+ updateWebhook: {
3054
+ projectKey: z.string().describe("The project key"),
3055
+ repositorySlug: z.string().describe("The repository slug"),
3056
+ webhookId: z.string().describe("The ID of the webhook to update"),
3057
+ name: z.string().describe("The webhook name"),
3058
+ url: z.string().describe("The endpoint URL the webhook will POST to"),
3059
+ events: z.array(z.string()).describe("List of event IDs to subscribe to. This replaces the existing event set."),
3060
+ active: z.boolean().optional().describe("Whether the webhook is enabled"),
3061
+ secret: z.string().optional().describe("Optional secret used to sign webhook payloads (HMAC)"),
3062
+ sslVerificationRequired: z.boolean().optional().describe("Whether SSL verification is required for the endpoint URL")
3063
+ },
3064
+ deleteWebhook: {
3065
+ projectKey: z.string().describe("The project key"),
3066
+ repositorySlug: z.string().describe("The repository slug"),
3067
+ webhookId: z.string().describe("The ID of the webhook to delete")
3068
+ }
3069
+ };