@sentry/mcp-server 0.14.0 → 0.16.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 (329) hide show
  1. package/dist/{analyze-issue-with-seer-DbAWpyTC.cjs → analyze-issue-with-seer-B8ZWokLV.cjs} +57 -24
  2. package/dist/analyze-issue-with-seer-B8ZWokLV.cjs.map +1 -0
  3. package/dist/{analyze-issue-with-seer-BsNarzJN.js → analyze-issue-with-seer-szIqv1_I.js} +57 -24
  4. package/dist/analyze-issue-with-seer-szIqv1_I.js.map +1 -0
  5. package/dist/api-client/client.cjs +2 -1
  6. package/dist/api-client/client.d.cts +3 -3
  7. package/dist/api-client/client.d.ts +3 -3
  8. package/dist/api-client/client.js +2 -1
  9. package/dist/api-client/index.cjs +2 -1
  10. package/dist/api-client/index.d.cts +3 -3
  11. package/dist/api-client/index.d.ts +3 -3
  12. package/dist/api-client/index.js +2 -1
  13. package/dist/api-client/schema.d.cts +1 -1
  14. package/dist/api-client/schema.d.ts +1 -1
  15. package/dist/api-client/types.d.cts +2 -2
  16. package/dist/api-client/types.d.ts +2 -2
  17. package/dist/api-utils-B-9vnzoA.cjs +86 -0
  18. package/dist/api-utils-B-9vnzoA.cjs.map +1 -0
  19. package/dist/api-utils-CHRiLf2Y.js +69 -0
  20. package/dist/api-utils-CHRiLf2Y.js.map +1 -0
  21. package/dist/{client-Dkw5iYu3.cjs → client-C_lwH0jz.cjs} +102 -51
  22. package/dist/client-C_lwH0jz.cjs.map +1 -0
  23. package/dist/{client-CILwfx6G.d.cts → client-D8vrUp2k.d.cts} +39 -7
  24. package/dist/client-D8vrUp2k.d.cts.map +1 -0
  25. package/dist/{client-BCN17Wbp.d.ts → client-h32L1Hx5.d.ts} +39 -7
  26. package/dist/client-h32L1Hx5.d.ts.map +1 -0
  27. package/dist/{client-DOYWNvVM.js → client-pyNUFaLN.js} +102 -51
  28. package/dist/client-pyNUFaLN.js.map +1 -0
  29. package/dist/{create-dsn-CDcL2DLD.js → create-dsn-CEEytIa4.js} +2 -2
  30. package/dist/{create-dsn-CDcL2DLD.js.map → create-dsn-CEEytIa4.js.map} +1 -1
  31. package/dist/{create-dsn-fESUtX3R.cjs → create-dsn-CI7MSiQu.cjs} +2 -2
  32. package/dist/{create-dsn-fESUtX3R.cjs.map → create-dsn-CI7MSiQu.cjs.map} +1 -1
  33. package/dist/{create-project-DY5mFznV.js → create-project-CoV1e-vp.js} +3 -3
  34. package/dist/{create-project-DY5mFznV.js.map → create-project-CoV1e-vp.js.map} +1 -1
  35. package/dist/{create-project-Bg5uDkc4.cjs → create-project-DnLKRG1p.cjs} +3 -3
  36. package/dist/{create-project-Bg5uDkc4.cjs.map → create-project-DnLKRG1p.cjs.map} +1 -1
  37. package/dist/{create-team-5purh64V.cjs → create-team-DKpKxVIY.cjs} +2 -2
  38. package/dist/{create-team-5purh64V.cjs.map → create-team-DKpKxVIY.cjs.map} +1 -1
  39. package/dist/{create-team-C2R7EUC3.js → create-team-HWN88CJQ.js} +2 -2
  40. package/dist/{create-team-C2R7EUC3.js.map → create-team-HWN88CJQ.js.map} +1 -1
  41. package/dist/errors-BtJEw2Z-.cjs +38 -0
  42. package/dist/errors-BtJEw2Z-.cjs.map +1 -0
  43. package/dist/errors-D_R568zP.js +26 -0
  44. package/dist/errors-D_R568zP.js.map +1 -0
  45. package/dist/errors.cjs +2 -1
  46. package/dist/errors.d.cts +10 -2
  47. package/dist/errors.d.cts.map +1 -1
  48. package/dist/errors.d.ts +10 -2
  49. package/dist/errors.d.ts.map +1 -1
  50. package/dist/errors.js +2 -2
  51. package/dist/fetch-utils-B0CB5xLM.d.ts +33 -0
  52. package/dist/fetch-utils-B0CB5xLM.d.ts.map +1 -0
  53. package/dist/fetch-utils-CTLoW1R8.d.cts +33 -0
  54. package/dist/fetch-utils-CTLoW1R8.d.cts.map +1 -0
  55. package/dist/fetch-utils-SuGtrQRz.cjs +64 -0
  56. package/dist/fetch-utils-SuGtrQRz.cjs.map +1 -0
  57. package/dist/fetch-utils-gHZdOZV2.js +52 -0
  58. package/dist/fetch-utils-gHZdOZV2.js.map +1 -0
  59. package/dist/{find-dsns-CvfcLB9Z.js → find-dsns-BB9dQP0b.js} +2 -2
  60. package/dist/{find-dsns-CvfcLB9Z.js.map → find-dsns-BB9dQP0b.js.map} +1 -1
  61. package/dist/{find-dsns-ZZ-thiNk.cjs → find-dsns-vriZSwr7.cjs} +2 -2
  62. package/dist/{find-dsns-ZZ-thiNk.cjs.map → find-dsns-vriZSwr7.cjs.map} +1 -1
  63. package/dist/{find-errors-Drzv7hzM.cjs → find-errors-BQFHuBHi.cjs} +6 -3
  64. package/dist/find-errors-BQFHuBHi.cjs.map +1 -0
  65. package/dist/{find-errors-CuRm4PzL.js → find-errors-CSPsT-Jp.js} +6 -3
  66. package/dist/find-errors-CSPsT-Jp.js.map +1 -0
  67. package/dist/{find-issues-C3uk59rn.cjs → find-issues-BG80wLZw.cjs} +7 -4
  68. package/dist/find-issues-BG80wLZw.cjs.map +1 -0
  69. package/dist/{find-issues-CAtNGBly.js → find-issues-DoUD8vP0.js} +7 -4
  70. package/dist/find-issues-DoUD8vP0.js.map +1 -0
  71. package/dist/{find-organizations-ojXwWWzk.js → find-organizations-BILg1hUb.js} +3 -3
  72. package/dist/find-organizations-BILg1hUb.js.map +1 -0
  73. package/dist/{find-organizations-BrdMfZRO.cjs → find-organizations-Cx5vCj4j.cjs} +3 -3
  74. package/dist/find-organizations-Cx5vCj4j.cjs.map +1 -0
  75. package/dist/{find-projects-BZWhlYJh.cjs → find-projects-CN99WBex.cjs} +3 -3
  76. package/dist/{find-projects-BZWhlYJh.cjs.map → find-projects-CN99WBex.cjs.map} +1 -1
  77. package/dist/{find-projects-fcLG4KpT.js → find-projects-CgCj2_eq.js} +3 -3
  78. package/dist/{find-projects-fcLG4KpT.js.map → find-projects-CgCj2_eq.js.map} +1 -1
  79. package/dist/{find-releases-BUozr0Z-.js → find-releases-BsQF3wc5.js} +2 -2
  80. package/dist/{find-releases-BUozr0Z-.js.map → find-releases-BsQF3wc5.js.map} +1 -1
  81. package/dist/{find-releases-CZCVEOHZ.cjs → find-releases-Cm11xU5S.cjs} +2 -2
  82. package/dist/{find-releases-CZCVEOHZ.cjs.map → find-releases-Cm11xU5S.cjs.map} +1 -1
  83. package/dist/{find-tags-d-wF1Se8.js → find-tags-BRaa2i-r.js} +2 -2
  84. package/dist/{find-tags-d-wF1Se8.js.map → find-tags-BRaa2i-r.js.map} +1 -1
  85. package/dist/{find-tags-Byk4d3oZ.cjs → find-tags-BjibTJBm.cjs} +2 -2
  86. package/dist/{find-tags-Byk4d3oZ.cjs.map → find-tags-BjibTJBm.cjs.map} +1 -1
  87. package/dist/{find-teams-CnU5x9rQ.cjs → find-teams-CS443jRa.cjs} +3 -3
  88. package/dist/{find-teams-CnU5x9rQ.cjs.map → find-teams-CS443jRa.cjs.map} +1 -1
  89. package/dist/{find-teams-BZ118EIK.js → find-teams-XgUg8Nj5.js} +3 -3
  90. package/dist/{find-teams-BZ118EIK.js.map → find-teams-XgUg8Nj5.js.map} +1 -1
  91. package/dist/{find-transactions-DIJ80wkd.cjs → find-transactions-B0s_rr0H.cjs} +2 -2
  92. package/dist/{find-transactions-DIJ80wkd.cjs.map → find-transactions-B0s_rr0H.cjs.map} +1 -1
  93. package/dist/{find-transactions-DZCj81jP.js → find-transactions-Cob_B_3u.js} +2 -2
  94. package/dist/{find-transactions-DZCj81jP.js.map → find-transactions-Cob_B_3u.js.map} +1 -1
  95. package/dist/{formatting-BlMiQa9i.cjs → formatting-AXU4XsjJ.cjs} +33 -2
  96. package/dist/formatting-AXU4XsjJ.cjs.map +1 -0
  97. package/dist/{formatting-CHh9Q_OW.d.cts → formatting-DnSI0DHf.d.ts} +7 -5
  98. package/dist/formatting-DnSI0DHf.d.ts.map +1 -0
  99. package/dist/{formatting-pUm38KOj.js → formatting-WGc5qrhv.js} +34 -2
  100. package/dist/formatting-WGc5qrhv.js.map +1 -0
  101. package/dist/{formatting-kdIeURER.d.ts → formatting-aGQ7M_2w.d.cts} +7 -5
  102. package/dist/formatting-aGQ7M_2w.d.cts.map +1 -0
  103. package/dist/{formatting-utils-C3sej5ER.js → formatting-utils-DgOyTl-m.js} +1 -1
  104. package/dist/{formatting-utils-C3sej5ER.js.map → formatting-utils-DgOyTl-m.js.map} +1 -1
  105. package/dist/{formatting-utils-DDz14xeB.cjs → formatting-utils-m9R5bsRU.cjs} +1 -1
  106. package/dist/{formatting-utils-DDz14xeB.cjs.map → formatting-utils-m9R5bsRU.cjs.map} +1 -1
  107. package/dist/{get-doc-DaTCenOE.cjs → get-doc-ByXR3EWc.cjs} +4 -4
  108. package/dist/{get-doc-DaTCenOE.cjs.map → get-doc-ByXR3EWc.cjs.map} +1 -1
  109. package/dist/{get-doc-YTiQznr1.js → get-doc-C1IEG2pH.js} +4 -4
  110. package/dist/{get-doc-YTiQznr1.js.map → get-doc-C1IEG2pH.js.map} +1 -1
  111. package/dist/{get-event-attachment-ChRw3jlQ.cjs → get-event-attachment-CuGUfVAD.cjs} +2 -2
  112. package/dist/{get-event-attachment-ChRw3jlQ.cjs.map → get-event-attachment-CuGUfVAD.cjs.map} +1 -1
  113. package/dist/{get-event-attachment-CuU-_5T6.js → get-event-attachment-N11gSV23.js} +2 -2
  114. package/dist/{get-event-attachment-CuU-_5T6.js.map → get-event-attachment-N11gSV23.js.map} +1 -1
  115. package/dist/{get-issue-details-CxChU4U9.js → get-issue-details-BrEGybe0.js} +30 -14
  116. package/dist/get-issue-details-BrEGybe0.js.map +1 -0
  117. package/dist/{get-issue-details-DFwZRbmU.cjs → get-issue-details-EklkHsWi.cjs} +30 -14
  118. package/dist/get-issue-details-EklkHsWi.cjs.map +1 -0
  119. package/dist/index.cjs +37 -37
  120. package/dist/index.js +37 -37
  121. package/dist/internal/fetch-utils.cjs +3 -2
  122. package/dist/internal/fetch-utils.d.cts +2 -2
  123. package/dist/internal/fetch-utils.d.ts +2 -2
  124. package/dist/internal/fetch-utils.js +2 -2
  125. package/dist/internal/formatting.cjs +2 -1
  126. package/dist/internal/formatting.d.cts +4 -4
  127. package/dist/internal/formatting.d.ts +4 -4
  128. package/dist/internal/formatting.js +2 -1
  129. package/dist/internal/issue-helpers.cjs +2 -1
  130. package/dist/internal/issue-helpers.js +2 -1
  131. package/dist/internal/test-fixtures.d.cts +38 -38
  132. package/dist/internal/test-fixtures.d.cts.map +1 -1
  133. package/dist/internal/test-fixtures.d.ts +170 -170
  134. package/dist/internal/test-fixtures.d.ts.map +1 -1
  135. package/dist/issue-helpers-BJffpNoO.d.ts.map +1 -1
  136. package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -1
  137. package/dist/{issue-helpers-CqqYnwYE.js → issue-helpers-D2p1Gkgm.js} +15 -19
  138. package/dist/issue-helpers-D2p1Gkgm.js.map +1 -0
  139. package/dist/{issue-helpers-DyAIO0w6.cjs → issue-helpers-DvsTfq9u.cjs} +14 -19
  140. package/dist/issue-helpers-DvsTfq9u.cjs.map +1 -0
  141. package/dist/{logging-oIouXrcb.cjs → logging-CX2buXiG.cjs} +1 -1
  142. package/dist/{logging-oIouXrcb.cjs.map → logging-CX2buXiG.cjs.map} +1 -1
  143. package/dist/{logging-LnQMFw-_.js → logging-DzxYBMrn.js} +1 -1
  144. package/dist/{logging-LnQMFw-_.js.map → logging-DzxYBMrn.js.map} +1 -1
  145. package/dist/logging.cjs +1 -1
  146. package/dist/logging.js +1 -1
  147. package/dist/{prompts-C8Y9w5c4.js → prompts-Cuwmybyc.js} +2 -2
  148. package/dist/{prompts-C8Y9w5c4.js.map → prompts-Cuwmybyc.js.map} +1 -1
  149. package/dist/{prompts-Df3i1XSB.cjs → prompts-uWAbMvLe.cjs} +2 -2
  150. package/dist/{prompts-Df3i1XSB.cjs.map → prompts-uWAbMvLe.cjs.map} +1 -1
  151. package/dist/prompts.cjs +2 -2
  152. package/dist/prompts.js +2 -2
  153. package/dist/{resources-BM_YQGcb.cjs → resources-BlgeiG6C.cjs} +2 -2
  154. package/dist/{resources-BM_YQGcb.cjs.map → resources-BlgeiG6C.cjs.map} +1 -1
  155. package/dist/{resources-BHF8a1ZB.js → resources-CwWOjB8_.js} +2 -2
  156. package/dist/{resources-BHF8a1ZB.js.map → resources-CwWOjB8_.js.map} +1 -1
  157. package/dist/resources.cjs +2 -2
  158. package/dist/resources.js +2 -2
  159. package/dist/{schema--5m4KI84.d.ts → schema-BW_fxx99.d.cts} +559 -559
  160. package/dist/{schema-ya35hkEL.d.cts.map → schema-BW_fxx99.d.cts.map} +1 -1
  161. package/dist/{schema-ya35hkEL.d.cts → schema-DkWOa2-c.d.ts} +428 -428
  162. package/dist/{schema--5m4KI84.d.ts.map → schema-DkWOa2-c.d.ts.map} +1 -1
  163. package/dist/{search-docs-BLbB_GV2.js → search-docs-BKUeMSyn.js} +3 -3
  164. package/dist/{search-docs-BLbB_GV2.js.map → search-docs-BKUeMSyn.js.map} +1 -1
  165. package/dist/{search-docs-D5Foht_0.cjs → search-docs-Cr-gyE5m.cjs} +3 -3
  166. package/dist/{search-docs-D5Foht_0.cjs.map → search-docs-Cr-gyE5m.cjs.map} +1 -1
  167. package/dist/{seer-utils-Ckr8nYlz.js → seer-utils-BdE7DddW.js} +5 -3
  168. package/dist/seer-utils-BdE7DddW.js.map +1 -0
  169. package/dist/{seer-utils-CzYEEZb2.cjs → seer-utils-BvdVTH85.cjs} +16 -2
  170. package/dist/seer-utils-BvdVTH85.cjs.map +1 -0
  171. package/dist/{server-BpEIZVaZ.cjs → server-9IEGGN8V.cjs} +41 -25
  172. package/dist/{server-DOy-M9Ko.js.map → server-9IEGGN8V.cjs.map} +1 -1
  173. package/dist/{server-DOy-M9Ko.js → server-BhNrW6bw.js} +41 -25
  174. package/dist/server-BhNrW6bw.js.map +1 -0
  175. package/dist/server.cjs +34 -34
  176. package/dist/server.d.cts.map +1 -1
  177. package/dist/server.d.ts.map +1 -1
  178. package/dist/server.js +34 -34
  179. package/dist/{stdio-B2NDq7Ax.js → stdio-CQmibRBR.js} +3 -3
  180. package/dist/{stdio-B2NDq7Ax.js.map → stdio-CQmibRBR.js.map} +1 -1
  181. package/dist/{stdio-DMEgJ_fG.cjs → stdio-mw-fEjO4.cjs} +3 -3
  182. package/dist/{stdio-DMEgJ_fG.cjs.map → stdio-mw-fEjO4.cjs.map} +1 -1
  183. package/dist/test-setup.cjs +1 -16
  184. package/dist/test-setup.cjs.map +1 -1
  185. package/dist/test-setup.js +1 -16
  186. package/dist/test-setup.js.map +1 -1
  187. package/dist/toolDefinitions.js +2 -2
  188. package/dist/tools/analyze-issue-with-seer.cjs +9 -8
  189. package/dist/tools/analyze-issue-with-seer.js +9 -8
  190. package/dist/tools/create-dsn.cjs +4 -4
  191. package/dist/tools/create-dsn.js +4 -4
  192. package/dist/tools/create-project.cjs +5 -5
  193. package/dist/tools/create-project.js +5 -5
  194. package/dist/tools/create-team.cjs +4 -4
  195. package/dist/tools/create-team.js +4 -4
  196. package/dist/tools/find-dsns.cjs +4 -4
  197. package/dist/tools/find-dsns.js +4 -4
  198. package/dist/tools/find-errors.cjs +4 -4
  199. package/dist/tools/find-errors.js +4 -4
  200. package/dist/tools/find-issues.cjs +4 -4
  201. package/dist/tools/find-issues.js +4 -4
  202. package/dist/tools/find-organizations.cjs +4 -4
  203. package/dist/tools/find-organizations.js +4 -4
  204. package/dist/tools/find-projects.cjs +4 -4
  205. package/dist/tools/find-projects.js +4 -4
  206. package/dist/tools/find-releases.cjs +4 -4
  207. package/dist/tools/find-releases.js +4 -4
  208. package/dist/tools/find-tags.cjs +4 -4
  209. package/dist/tools/find-tags.js +4 -4
  210. package/dist/tools/find-teams.cjs +4 -4
  211. package/dist/tools/find-teams.js +4 -4
  212. package/dist/tools/find-transactions.cjs +4 -4
  213. package/dist/tools/find-transactions.js +4 -4
  214. package/dist/tools/get-doc.cjs +4 -4
  215. package/dist/tools/get-doc.js +4 -4
  216. package/dist/tools/get-event-attachment.cjs +4 -4
  217. package/dist/tools/get-event-attachment.js +4 -4
  218. package/dist/tools/get-issue-details.cjs +8 -7
  219. package/dist/tools/get-issue-details.js +8 -7
  220. package/dist/tools/index.cjs +31 -31
  221. package/dist/tools/index.d.cts +76 -76
  222. package/dist/tools/index.d.ts +76 -76
  223. package/dist/tools/index.js +31 -31
  224. package/dist/tools/search-docs.cjs +4 -3
  225. package/dist/tools/search-docs.js +4 -3
  226. package/dist/tools/update-issue.cjs +9 -8
  227. package/dist/tools/update-issue.js +9 -8
  228. package/dist/tools/update-project.cjs +5 -5
  229. package/dist/tools/update-project.js +5 -5
  230. package/dist/tools/utils/api-utils.cjs +6 -4
  231. package/dist/tools/utils/api-utils.d.cts +22 -5
  232. package/dist/tools/utils/api-utils.d.cts.map +1 -1
  233. package/dist/tools/utils/api-utils.d.ts +22 -5
  234. package/dist/tools/utils/api-utils.d.ts.map +1 -1
  235. package/dist/tools/utils/api-utils.js +4 -4
  236. package/dist/tools/utils/fetch-utils.cjs +3 -2
  237. package/dist/tools/utils/fetch-utils.d.cts +2 -2
  238. package/dist/tools/utils/fetch-utils.d.ts +2 -2
  239. package/dist/tools/utils/fetch-utils.js +2 -2
  240. package/dist/tools/utils/formatting-utils.cjs +1 -1
  241. package/dist/tools/utils/formatting-utils.d.cts +3 -3
  242. package/dist/tools/utils/formatting-utils.d.ts +3 -3
  243. package/dist/tools/utils/formatting-utils.js +1 -1
  244. package/dist/tools/utils/issue-utils.cjs +5 -3
  245. package/dist/tools/utils/issue-utils.d.cts +4 -4
  246. package/dist/tools/utils/issue-utils.d.ts +4 -4
  247. package/dist/tools/utils/issue-utils.js +5 -3
  248. package/dist/tools/utils/seer-utils.cjs +3 -1
  249. package/dist/tools/utils/seer-utils.d.cts +6 -4
  250. package/dist/tools/utils/seer-utils.d.cts.map +1 -1
  251. package/dist/tools/utils/seer-utils.d.ts +6 -4
  252. package/dist/tools/utils/seer-utils.d.ts.map +1 -1
  253. package/dist/tools/utils/seer-utils.js +2 -2
  254. package/dist/tools/whoami.cjs +4 -4
  255. package/dist/tools/whoami.js +4 -4
  256. package/dist/tools-AYbI0sEf.js +48 -0
  257. package/dist/{tools-mThAUo_3.js.map → tools-AYbI0sEf.js.map} +1 -1
  258. package/dist/{tools-19Ms1kck.cjs → tools-CwQFlJzn.cjs} +21 -21
  259. package/dist/{tools-19Ms1kck.cjs.map → tools-CwQFlJzn.cjs.map} +1 -1
  260. package/dist/transports/stdio.cjs +36 -36
  261. package/dist/transports/stdio.js +36 -36
  262. package/dist/{types-Bg17IGWJ.d.cts → types-BAbu4Vzx.d.cts} +2 -2
  263. package/dist/{types-Bg17IGWJ.d.cts.map → types-BAbu4Vzx.d.cts.map} +1 -1
  264. package/dist/{types-CtTBwGbw.d.ts → types-CoY5KVni.d.ts} +2 -2
  265. package/dist/{types-CtTBwGbw.d.ts.map → types-CoY5KVni.d.ts.map} +1 -1
  266. package/dist/{update-issue-DmLElHPS.js → update-issue-ClbiTLyL.js} +13 -7
  267. package/dist/update-issue-ClbiTLyL.js.map +1 -0
  268. package/dist/{update-issue-B6eZhAPJ.cjs → update-issue-_4vzwHfZ.cjs} +13 -7
  269. package/dist/update-issue-_4vzwHfZ.cjs.map +1 -0
  270. package/dist/{update-project-CijYCtG1.cjs → update-project-2EEnezbZ.cjs} +4 -4
  271. package/dist/{update-project-CijYCtG1.cjs.map → update-project-2EEnezbZ.cjs.map} +1 -1
  272. package/dist/{update-project-BNPev7W8.js → update-project-CExfO7tG.js} +4 -4
  273. package/dist/{update-project-BNPev7W8.js.map → update-project-CExfO7tG.js.map} +1 -1
  274. package/dist/version-3e1twbPm.js +6 -0
  275. package/dist/{version-C4uvMmw0.js.map → version-3e1twbPm.js.map} +1 -1
  276. package/dist/{version-Ddz4xg_q.cjs → version-Cp9p-38J.cjs} +2 -2
  277. package/dist/{version-Ddz4xg_q.cjs.map → version-Cp9p-38J.cjs.map} +1 -1
  278. package/dist/version.cjs +1 -1
  279. package/dist/version.js +1 -1
  280. package/dist/{whoami-DesNZnaQ.js → whoami-DhoaHHY5.js} +2 -2
  281. package/dist/{whoami-DesNZnaQ.js.map → whoami-DhoaHHY5.js.map} +1 -1
  282. package/dist/{whoami-CEgbTUqt.cjs → whoami-m0N5F6BN.cjs} +2 -2
  283. package/dist/{whoami-CEgbTUqt.cjs.map → whoami-m0N5F6BN.cjs.map} +1 -1
  284. package/package.json +3 -3
  285. package/dist/analyze-issue-with-seer-BsNarzJN.js.map +0 -1
  286. package/dist/analyze-issue-with-seer-DbAWpyTC.cjs.map +0 -1
  287. package/dist/api-utils-C6QJAzFL.js +0 -31
  288. package/dist/api-utils-C6QJAzFL.js.map +0 -1
  289. package/dist/api-utils-d36iteNO.cjs +0 -36
  290. package/dist/api-utils-d36iteNO.cjs.map +0 -1
  291. package/dist/client-BCN17Wbp.d.ts.map +0 -1
  292. package/dist/client-CILwfx6G.d.cts.map +0 -1
  293. package/dist/client-DOYWNvVM.js.map +0 -1
  294. package/dist/client-Dkw5iYu3.cjs.map +0 -1
  295. package/dist/errors-CIoxzIug.js +0 -15
  296. package/dist/errors-CIoxzIug.js.map +0 -1
  297. package/dist/errors-YmiXLOyx.cjs +0 -21
  298. package/dist/errors-YmiXLOyx.cjs.map +0 -1
  299. package/dist/fetch-utils-BMKjO-cc.js +0 -29
  300. package/dist/fetch-utils-BMKjO-cc.js.map +0 -1
  301. package/dist/fetch-utils-Bv9WjUp0.d.ts +0 -14
  302. package/dist/fetch-utils-Bv9WjUp0.d.ts.map +0 -1
  303. package/dist/fetch-utils-DzdRW4Yd.d.cts +0 -14
  304. package/dist/fetch-utils-DzdRW4Yd.d.cts.map +0 -1
  305. package/dist/fetch-utils-oab6uNp3.cjs +0 -35
  306. package/dist/fetch-utils-oab6uNp3.cjs.map +0 -1
  307. package/dist/find-errors-CuRm4PzL.js.map +0 -1
  308. package/dist/find-errors-Drzv7hzM.cjs.map +0 -1
  309. package/dist/find-issues-C3uk59rn.cjs.map +0 -1
  310. package/dist/find-issues-CAtNGBly.js.map +0 -1
  311. package/dist/find-organizations-BrdMfZRO.cjs.map +0 -1
  312. package/dist/find-organizations-ojXwWWzk.js.map +0 -1
  313. package/dist/formatting-BlMiQa9i.cjs.map +0 -1
  314. package/dist/formatting-CHh9Q_OW.d.cts.map +0 -1
  315. package/dist/formatting-kdIeURER.d.ts.map +0 -1
  316. package/dist/formatting-pUm38KOj.js.map +0 -1
  317. package/dist/get-issue-details-CxChU4U9.js.map +0 -1
  318. package/dist/get-issue-details-DFwZRbmU.cjs.map +0 -1
  319. package/dist/issue-helpers-CqqYnwYE.js.map +0 -1
  320. package/dist/issue-helpers-DyAIO0w6.cjs.map +0 -1
  321. package/dist/seer-utils-Ckr8nYlz.js.map +0 -1
  322. package/dist/seer-utils-CzYEEZb2.cjs.map +0 -1
  323. package/dist/server-BpEIZVaZ.cjs.map +0 -1
  324. package/dist/tools-mThAUo_3.js +0 -48
  325. package/dist/update-issue-B6eZhAPJ.cjs.map +0 -1
  326. package/dist/update-issue-DmLElHPS.js.map +0 -1
  327. package/dist/version-C4uvMmw0.js +0 -6
  328. /package/dist/{issue-utils-BVAB6I-Z.js → issue-utils-BbCfbiY8.js} +0 -0
  329. /package/dist/{issue-utils-pdbo-5LW.cjs → issue-utils-DMKiif6C.cjs} +0 -0
@@ -0,0 +1,69 @@
1
+ import { UserInputError } from "./errors-D_R568zP.js";
2
+ import { ApiError, SentryApiService } from "./client-pyNUFaLN.js";
3
+
4
+ //#region src/tools/utils/api-utils.ts
5
+ /**
6
+ * Create a Sentry API service from server context with optional region override
7
+ * @param context - Server context containing host and access token
8
+ * @param opts - Options object containing optional regionUrl override
9
+ * @returns Configured SentryApiService instance (always uses HTTPS)
10
+ * @throws {UserInputError} When regionUrl is provided but invalid
11
+ */
12
+ function apiServiceFromContext(context, opts = {}) {
13
+ let host = context.sentryHost;
14
+ if (opts.regionUrl?.trim()) try {
15
+ const parsedUrl = new URL(opts.regionUrl);
16
+ if (!["http:", "https:"].includes(parsedUrl.protocol)) throw new UserInputError(`Invalid regionUrl provided: ${opts.regionUrl}. Must include protocol (http:// or https://).`);
17
+ if (parsedUrl.host === "https" || parsedUrl.host === "http") throw new UserInputError(`Invalid regionUrl provided: ${opts.regionUrl}. The host cannot be just a protocol name.`);
18
+ host = parsedUrl.host;
19
+ } catch (error) {
20
+ if (error instanceof UserInputError) throw error;
21
+ throw new UserInputError(`Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`);
22
+ }
23
+ return new SentryApiService({
24
+ host,
25
+ accessToken: context.accessToken
26
+ });
27
+ }
28
+ /**
29
+ * Maps API errors to user-friendly errors based on context
30
+ * @param error - The error to handle
31
+ * @param params - The parameters that were used in the API call
32
+ * @returns Never - always throws an error
33
+ * @throws {UserInputError} For errors that are clearly user input issues
34
+ * @throws {Error} For other errors
35
+ */
36
+ function handleApiError(error, params) {
37
+ if (error instanceof ApiError && error.status === 404) {
38
+ const paramsList = [];
39
+ if (params) {
40
+ for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== "") paramsList.push(`${key}: '${value}'`);
41
+ }
42
+ if (paramsList.length > 0) throw new UserInputError(`Resource not found. Please verify these parameters are correct:\n${paramsList.map((p) => ` - ${p}`).join("\n")}`);
43
+ throw new UserInputError(`Resource not found (404). Please verify that all provided identifiers are correct and you have access to the requested resources.`);
44
+ }
45
+ if (error instanceof ApiError) {
46
+ if (error.status === 400) throw new UserInputError(`Invalid request: ${error.message}`);
47
+ if (error.status === 403) throw new UserInputError(`Access denied: ${error.message}. Please verify you have access to this resource.`);
48
+ }
49
+ throw error;
50
+ }
51
+ /**
52
+ * Wraps an async API call with automatic error handling
53
+ * @param fn - The async function to execute
54
+ * @param params - The parameters that were used in the API call
55
+ * @returns The result of the function
56
+ * @throws {UserInputError} For user input errors
57
+ * @throws {Error} For other errors
58
+ */
59
+ async function withApiErrorHandling(fn, params) {
60
+ try {
61
+ return await fn();
62
+ } catch (error) {
63
+ handleApiError(error, params);
64
+ }
65
+ }
66
+
67
+ //#endregion
68
+ export { apiServiceFromContext, handleApiError, withApiErrorHandling };
69
+ //# sourceMappingURL=api-utils-CHRiLf2Y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-utils-CHRiLf2Y.js","names":["context: ServerContext","opts: { regionUrl?: string }","error: unknown","params?: Record<string, unknown>","paramsList: string[]","fn: () => Promise<T>"],"sources":["../src/tools/utils/api-utils.ts"],"sourcesContent":["import { SentryApiService, ApiError } from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\n\n/**\n * Create a Sentry API service from server context with optional region override\n * @param context - Server context containing host and access token\n * @param opts - Options object containing optional regionUrl override\n * @returns Configured SentryApiService instance (always uses HTTPS)\n * @throws {UserInputError} When regionUrl is provided but invalid\n */\nexport function apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.sentryHost;\n\n if (opts.regionUrl?.trim()) {\n try {\n const parsedUrl = new URL(opts.regionUrl);\n\n // Validate that the URL has a proper protocol\n if (![\"http:\", \"https:\"].includes(parsedUrl.protocol)) {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must include protocol (http:// or https://).`,\n );\n }\n\n // Validate that the host is not just the protocol name\n if (parsedUrl.host === \"https\" || parsedUrl.host === \"http\") {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. The host cannot be just a protocol name.`,\n );\n }\n\n host = parsedUrl.host;\n } catch (error) {\n if (error instanceof UserInputError) {\n throw error;\n }\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`,\n );\n }\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n\n/**\n * Maps API errors to user-friendly errors based on context\n * @param error - The error to handle\n * @param params - The parameters that were used in the API call\n * @returns Never - always throws an error\n * @throws {UserInputError} For errors that are clearly user input issues\n * @throws {Error} For other errors\n */\nexport function handleApiError(\n error: unknown,\n params?: Record<string, unknown>,\n): never {\n if (error instanceof ApiError && error.status === 404) {\n // Build a list of all provided parameters\n const paramsList: string[] = [];\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null && value !== \"\") {\n paramsList.push(`${key}: '${value}'`);\n }\n }\n }\n\n if (paramsList.length > 0) {\n throw new UserInputError(\n `Resource not found. Please verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`,\n );\n }\n\n // Fallback to generic message if no params provided\n throw new UserInputError(\n `Resource not found (404). Please verify that all provided identifiers are correct and you have access to the requested resources.`,\n );\n }\n\n // For other API errors, check if they're likely user input issues\n if (error instanceof ApiError) {\n // 400 Bad Request often indicates invalid parameters\n if (error.status === 400) {\n throw new UserInputError(`Invalid request: ${error.message}`);\n }\n\n // 403 Forbidden might be a permissions issue but could also be wrong org/project\n if (error.status === 403) {\n throw new UserInputError(\n `Access denied: ${error.message}. Please verify you have access to this resource.`,\n );\n }\n }\n\n // Re-throw any other errors as-is\n throw error;\n}\n\n/**\n * Wraps an async API call with automatic error handling\n * @param fn - The async function to execute\n * @param params - The parameters that were used in the API call\n * @returns The result of the function\n * @throws {UserInputError} For user input errors\n * @throws {Error} For other errors\n */\nexport async function withApiErrorHandling<T>(\n fn: () => Promise<T>,\n params?: Record<string, unknown>,\n): Promise<T> {\n try {\n return await fn();\n } catch (error) {\n handleApiError(error, params);\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,CACxB,KAAI;EACF,MAAM,YAAY,IAAI,IAAI,KAAK;AAG/B,OAAK,CAAC,SAAS,QAAS,EAAC,SAAS,UAAU,SAAS,CACnD,OAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;AAKlD,MAAI,UAAU,SAAS,WAAW,UAAU,SAAS,OACnD,OAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;AAIlD,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,MAAI,iBAAiB,eACnB,OAAM;AAER,QAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;CAEjD;AAGH,QAAO,IAAI,iBAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;;;;;;;;;AAUD,SAAgB,eACdC,OACAC,QACO;AACP,KAAI,iBAAiB,YAAY,MAAM,WAAW,KAAK;EAErD,MAAMC,aAAuB,CAAE;AAC/B,MAAI,QACF;QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,OAAO,CAC/C,KAAI,oBAAuB,UAAU,QAAQ,UAAU,GACrD,YAAW,QAAQ,IAAI,KAAK,MAAM,GAAG;EAExC;AAGH,MAAI,WAAW,SAAS,EACtB,OAAM,IAAI,gBACP,mEAAmE,WAAW,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,KAAK;AAKpH,QAAM,IAAI,gBACP;CAEJ;AAGD,KAAI,iBAAiB,UAAU;AAE7B,MAAI,MAAM,WAAW,IACnB,OAAM,IAAI,gBAAgB,mBAAmB,MAAM;AAIrD,MAAI,MAAM,WAAW,IACnB,OAAM,IAAI,gBACP,iBAAiB,MAAM,QAAQ;CAGrC;AAGD,OAAM;AACP;;;;;;;;;AAUD,eAAsB,qBACpBC,IACAF,QACY;AACZ,KAAI;AACF,SAAO,MAAM,IAAI;CAClB,SAAQ,OAAO;AACd,iBAAe,OAAO,OAAO;CAC9B;AACF"}
@@ -1,3 +1,4 @@
1
+ const require_errors = require('./errors-BtJEw2Z-.cjs');
1
2
  const require_schema = require('./schema-B_cMyyJJ.cjs');
2
3
 
3
4
  //#region src/api-client/client.ts
@@ -112,6 +113,17 @@ var SentryApiService = class {
112
113
  this.apiPrefix = `https://${this.host}/api/0`;
113
114
  }
114
115
  /**
116
+ * Checks if the current host is Sentry SaaS (sentry.io).
117
+ *
118
+ * Used to determine API endpoint availability and URL formats.
119
+ * Self-hosted instances may not have all endpoints available.
120
+ *
121
+ * @returns True if using Sentry SaaS, false for self-hosted instances
122
+ */
123
+ isSaas() {
124
+ return this.host === "sentry.io";
125
+ }
126
+ /**
115
127
  * Internal method for making authenticated requests to Sentry API.
116
128
  *
117
129
  * Handles:
@@ -149,6 +161,7 @@ var SentryApiService = class {
149
161
  const errorCode = Object.keys(NETWORK_ERROR_MESSAGES).find((code) => errorMessage.includes(code));
150
162
  if (errorCode) friendlyMessage += ` - ${NETWORK_ERROR_MESSAGES[errorCode]}`;
151
163
  else friendlyMessage += ` - ${errorMessage}`;
164
+ if (errorCode === "ENOTFOUND" || errorCode === "EAI_AGAIN" || errorCode === "ECONNREFUSED" || errorCode === "ETIMEDOUT" || errorMessage.includes("Connect Timeout Error")) throw new require_errors.ConfigurationError(friendlyMessage, { cause: error });
152
165
  throw new Error(friendlyMessage, { cause: error });
153
166
  }
154
167
  if (!response.ok) {
@@ -157,6 +170,10 @@ var SentryApiService = class {
157
170
  try {
158
171
  parsed = JSON.parse(errorText);
159
172
  } catch (error) {
173
+ if (errorText.includes("<!DOCTYPE") || errorText.includes("<html")) {
174
+ console.error(`[sentryApi] Received HTML error page instead of JSON (status ${response.status})`, error);
175
+ throw new Error(`Server error: Received HTML instead of JSON (${response.status} ${response.statusText}). This may indicate an invalid URL or server issue.`);
176
+ }
160
177
  console.error(`[sentryApi] Failed to parse error response: ${errorText}`, error);
161
178
  }
162
179
  if (parsed) {
@@ -169,6 +186,45 @@ var SentryApiService = class {
169
186
  return response;
170
187
  }
171
188
  /**
189
+ * Safely parses a JSON response, checking Content-Type header first.
190
+ *
191
+ * @param response The Response object from fetch
192
+ * @returns Promise resolving to the parsed JSON object
193
+ * @throws {Error} If response is not JSON or parsing fails
194
+ */
195
+ async parseJsonResponse(response) {
196
+ if (!response.headers?.get) return response.json();
197
+ const contentType = response.headers.get("content-type");
198
+ if (!contentType || !contentType.includes("application/json")) {
199
+ const responseText = await response.text();
200
+ if (contentType?.includes("text/html") || responseText.includes("<!DOCTYPE") || responseText.includes("<html")) throw new Error(`Expected JSON response but received HTML (${response.status} ${response.statusText}). This may indicate you're not authenticated, the URL is incorrect, or there's a server issue.`);
201
+ throw new Error(`Expected JSON response but received ${contentType || "unknown content type"} (${response.status} ${response.statusText})`);
202
+ }
203
+ try {
204
+ return await response.json();
205
+ } catch (error) {
206
+ throw new Error(`Failed to parse JSON response: ${error instanceof Error ? error.message : String(error)}`);
207
+ }
208
+ }
209
+ /**
210
+ * Makes a request to the Sentry API and parses the JSON response.
211
+ *
212
+ * This is the primary method for API calls that expect JSON responses.
213
+ * It automatically validates Content-Type and provides helpful error messages
214
+ * for common issues like authentication failures or server errors.
215
+ *
216
+ * @param path API endpoint path (without /api/0 prefix)
217
+ * @param options Fetch options
218
+ * @param requestOptions Additional request configuration
219
+ * @returns Promise resolving to the parsed JSON response
220
+ * @throws {ApiError} Enhanced API errors with user-friendly messages
221
+ * @throws {Error} Network, parsing, or validation errors
222
+ */
223
+ async requestJSON(path, options = {}, requestOptions) {
224
+ const response = await this.request(path, options, requestOptions);
225
+ return this.parseJsonResponse(response);
226
+ }
227
+ /**
172
228
  * Generates a Sentry issue URL for browser navigation.
173
229
  *
174
230
  * Handles both SaaS (subdomain-based) and self-hosted URL formats.
@@ -188,8 +244,7 @@ var SentryApiService = class {
188
244
  * ```
189
245
  */
190
246
  getIssueUrl(organizationSlug, issueId) {
191
- const isSaas = this.host === "sentry.io";
192
- return isSaas ? `https://${organizationSlug}.${this.host}/issues/${issueId}` : `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`;
247
+ return this.isSaas() ? `https://${organizationSlug}.${this.host}/issues/${issueId}` : `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`;
193
248
  }
194
249
  /**
195
250
  * Generates a Sentry trace URL for performance investigation.
@@ -207,8 +262,7 @@ var SentryApiService = class {
207
262
  * ```
208
263
  */
209
264
  getTraceUrl(organizationSlug, traceId) {
210
- const isSaas = this.host === "sentry.io";
211
- return isSaas ? `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}` : `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;
265
+ return this.isSaas() ? `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}` : `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;
212
266
  }
213
267
  /**
214
268
  * Retrieves the authenticated user's profile information.
@@ -218,8 +272,7 @@ var SentryApiService = class {
218
272
  * @throws {ApiError} If authentication fails or user not found
219
273
  */
220
274
  async getAuthenticatedUser(opts) {
221
- const response = await this.request("/auth/", void 0, opts);
222
- const body = await response.json();
275
+ const body = await this.requestJSON("/auth/", void 0, opts);
223
276
  return require_schema.UserSchema.parse(body);
224
277
  }
225
278
  /**
@@ -241,12 +294,23 @@ var SentryApiService = class {
241
294
  * ```
242
295
  */
243
296
  async listOrganizations(opts) {
244
- const regionResponse = await this.request("/users/me/regions/", void 0, opts);
245
- const regionData = require_schema.UserRegionsSchema.parse(await regionResponse.json());
246
- return (await Promise.all(regionData.regions.map(async (region) => this.request(`/organizations/`, void 0, {
247
- ...opts,
248
- host: new URL(region.url).host
249
- }).then((response) => response.json())))).map((data) => require_schema.OrganizationListSchema.parse(data)).reduce((acc, curr) => acc.concat(curr), []);
297
+ if (!this.isSaas()) {
298
+ const body = await this.requestJSON("/organizations/", void 0, opts);
299
+ return require_schema.OrganizationListSchema.parse(body);
300
+ }
301
+ try {
302
+ const regionData = require_schema.UserRegionsSchema.parse(await this.requestJSON("/users/me/regions/", void 0, opts));
303
+ return (await Promise.all(regionData.regions.map(async (region) => this.requestJSON(`/organizations/`, void 0, {
304
+ ...opts,
305
+ host: new URL(region.url).host
306
+ })))).map((data) => require_schema.OrganizationListSchema.parse(data)).reduce((acc, curr) => acc.concat(curr), []);
307
+ } catch (error) {
308
+ if (error instanceof ApiError && error.status === 404) {
309
+ const body = await this.requestJSON("/organizations/", void 0, opts);
310
+ return require_schema.OrganizationListSchema.parse(body);
311
+ }
312
+ throw error;
313
+ }
250
314
  }
251
315
  /**
252
316
  * Lists teams within an organization.
@@ -256,8 +320,7 @@ var SentryApiService = class {
256
320
  * @returns Array of teams in the organization
257
321
  */
258
322
  async listTeams(organizationSlug, opts) {
259
- const response = await this.request(`/organizations/${organizationSlug}/teams/`, void 0, opts);
260
- const body = await response.json();
323
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/teams/`, void 0, opts);
261
324
  return require_schema.TeamListSchema.parse(body);
262
325
  }
263
326
  /**
@@ -271,11 +334,11 @@ var SentryApiService = class {
271
334
  * @throws {ApiError} If team creation fails (e.g., name conflicts)
272
335
  */
273
336
  async createTeam({ organizationSlug, name }, opts) {
274
- const response = await this.request(`/organizations/${organizationSlug}/teams/`, {
337
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/teams/`, {
275
338
  method: "POST",
276
339
  body: JSON.stringify({ name })
277
340
  }, opts);
278
- return require_schema.TeamSchema.parse(await response.json());
341
+ return require_schema.TeamSchema.parse(body);
279
342
  }
280
343
  /**
281
344
  * Lists projects within an organization.
@@ -285,8 +348,7 @@ var SentryApiService = class {
285
348
  * @returns Array of projects in the organization
286
349
  */
287
350
  async listProjects(organizationSlug, opts) {
288
- const response = await this.request(`/organizations/${organizationSlug}/projects/`, void 0, opts);
289
- const body = await response.json();
351
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/projects/`, void 0, opts);
290
352
  return require_schema.ProjectListSchema.parse(body);
291
353
  }
292
354
  /**
@@ -301,14 +363,14 @@ var SentryApiService = class {
301
363
  * @returns Created project data
302
364
  */
303
365
  async createProject({ organizationSlug, teamSlug, name, platform }, opts) {
304
- const response = await this.request(`/teams/${organizationSlug}/${teamSlug}/projects/`, {
366
+ const body = await this.requestJSON(`/teams/${organizationSlug}/${teamSlug}/projects/`, {
305
367
  method: "POST",
306
368
  body: JSON.stringify({
307
369
  name,
308
370
  platform
309
371
  })
310
372
  }, opts);
311
- return require_schema.ProjectSchema.parse(await response.json());
373
+ return require_schema.ProjectSchema.parse(body);
312
374
  }
313
375
  /**
314
376
  * Updates an existing project's configuration.
@@ -327,11 +389,11 @@ var SentryApiService = class {
327
389
  if (name !== void 0) updateData.name = name;
328
390
  if (slug !== void 0) updateData.slug = slug;
329
391
  if (platform !== void 0) updateData.platform = platform;
330
- const response = await this.request(`/projects/${organizationSlug}/${projectSlug}/`, {
392
+ const body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/`, {
331
393
  method: "PUT",
332
394
  body: JSON.stringify(updateData)
333
395
  }, opts);
334
- return require_schema.ProjectSchema.parse(await response.json());
396
+ return require_schema.ProjectSchema.parse(body);
335
397
  }
336
398
  /**
337
399
  * Assigns a team to a project.
@@ -371,11 +433,11 @@ var SentryApiService = class {
371
433
  * ```
372
434
  */
373
435
  async createClientKey({ organizationSlug, projectSlug, name }, opts) {
374
- const response = await this.request(`/projects/${organizationSlug}/${projectSlug}/keys/`, {
436
+ const body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/keys/`, {
375
437
  method: "POST",
376
438
  body: JSON.stringify({ name })
377
439
  }, opts);
378
- return require_schema.ClientKeySchema.parse(await response.json());
440
+ return require_schema.ClientKeySchema.parse(body);
379
441
  }
380
442
  /**
381
443
  * Lists all client keys (DSNs) for a project.
@@ -387,8 +449,8 @@ var SentryApiService = class {
387
449
  * @returns Array of client keys with DSN information
388
450
  */
389
451
  async listClientKeys({ organizationSlug, projectSlug }, opts) {
390
- const response = await this.request(`/projects/${organizationSlug}/${projectSlug}/keys/`, void 0, opts);
391
- return require_schema.ClientKeyListSchema.parse(await response.json());
452
+ const body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/keys/`, void 0, opts);
453
+ return require_schema.ClientKeyListSchema.parse(body);
392
454
  }
393
455
  /**
394
456
  * Lists releases for an organization or specific project.
@@ -418,8 +480,7 @@ var SentryApiService = class {
418
480
  const searchQuery = new URLSearchParams();
419
481
  if (query) searchQuery.set("query", query);
420
482
  const path = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/releases/` : `/organizations/${organizationSlug}/releases/`;
421
- const response = await this.request(`${path}${searchQuery.toString()}`, void 0, opts);
422
- const body = await response.json();
483
+ const body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);
423
484
  return require_schema.ReleaseListSchema.parse(body);
424
485
  }
425
486
  /**
@@ -445,8 +506,7 @@ var SentryApiService = class {
445
506
  async listTags({ organizationSlug, dataset }, opts) {
446
507
  const searchQuery = new URLSearchParams();
447
508
  if (dataset) searchQuery.set("dataset", dataset);
448
- const response = await this.request(`/organizations/${organizationSlug}/tags/${searchQuery.toString()}`, void 0, opts);
449
- const body = await response.json();
509
+ const body = await this.requestJSON(searchQuery.toString() ? `/organizations/${organizationSlug}/tags/?${searchQuery.toString()}` : `/organizations/${organizationSlug}/tags/`, void 0, opts);
450
510
  return require_schema.TagListSchema.parse(body);
451
511
  }
452
512
  /**
@@ -492,18 +552,15 @@ var SentryApiService = class {
492
552
  queryParams.set("query", sentryQuery.join(" "));
493
553
  queryParams.append("collapse", "unhandled");
494
554
  const apiUrl = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}` : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;
495
- const response = await this.request(apiUrl, void 0, opts);
496
- const body = await response.json();
555
+ const body = await this.requestJSON(apiUrl, void 0, opts);
497
556
  return require_schema.IssueListSchema.parse(body);
498
557
  }
499
558
  async getIssue({ organizationSlug, issueId }, opts) {
500
- const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/`, void 0, opts);
501
- const body = await response.json();
559
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/`, void 0, opts);
502
560
  return require_schema.IssueSchema.parse(body);
503
561
  }
504
562
  async getEventForIssue({ organizationSlug, issueId, eventId }, opts) {
505
- const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`, void 0, opts);
506
- const body = await response.json();
563
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`, void 0, opts);
507
564
  return require_schema.EventSchema.parse(body);
508
565
  }
509
566
  async getLatestEventForIssue({ organizationSlug, issueId }, opts) {
@@ -514,13 +571,12 @@ var SentryApiService = class {
514
571
  }, opts);
515
572
  }
516
573
  async listEventAttachments({ organizationSlug, projectSlug, eventId }, opts) {
517
- const response = await this.request(`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);
518
- const body = await response.json();
574
+ const body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);
519
575
  return require_schema.EventAttachmentListSchema.parse(body);
520
576
  }
521
577
  async getEventAttachment({ organizationSlug, projectSlug, eventId, attachmentId }, opts) {
522
- const attachmentsResponse = await this.request(`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);
523
- const attachments = require_schema.EventAttachmentListSchema.parse(await attachmentsResponse.json());
578
+ const attachmentsData = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);
579
+ const attachments = require_schema.EventAttachmentListSchema.parse(attachmentsData);
524
580
  const attachment = attachments.find((att) => att.id === attachmentId);
525
581
  if (!attachment) throw new Error(`Attachment with ID ${attachmentId} not found for event ${eventId}`);
526
582
  const downloadUrl = `/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/${attachmentId}/?download=1`;
@@ -539,11 +595,10 @@ var SentryApiService = class {
539
595
  const updateData = {};
540
596
  if (status !== void 0) updateData.status = status;
541
597
  if (assignedTo !== void 0) updateData.assignedTo = assignedTo;
542
- const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/`, {
598
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/`, {
543
599
  method: "PUT",
544
600
  body: JSON.stringify(updateData)
545
601
  }, opts);
546
- const body = await response.json();
547
602
  return require_schema.IssueSchema.parse(body);
548
603
  }
549
604
  async searchErrors({ organizationSlug, projectSlug, filename, transaction, query, sortBy = "last_seen" }, opts) {
@@ -565,8 +620,7 @@ var SentryApiService = class {
565
620
  queryParams.append("field", "count()");
566
621
  queryParams.set("query", sentryQuery.join(" "));
567
622
  const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;
568
- const response = await this.request(apiUrl, void 0, opts);
569
- const body = await response.json();
623
+ const body = await this.requestJSON(apiUrl, void 0, opts);
570
624
  return require_schema.ErrorsSearchResponseSchema.parse(body).data;
571
625
  }
572
626
  async searchSpans({ organizationSlug, projectSlug, transaction, query, sortBy = "timestamp" }, opts) {
@@ -591,24 +645,21 @@ var SentryApiService = class {
591
645
  queryParams.append("field", "timestamp");
592
646
  queryParams.set("query", sentryQuery.join(" "));
593
647
  const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;
594
- const response = await this.request(apiUrl, void 0, opts);
595
- const body = await response.json();
648
+ const body = await this.requestJSON(apiUrl, void 0, opts);
596
649
  return require_schema.SpansSearchResponseSchema.parse(body).data;
597
650
  }
598
651
  async startAutofix({ organizationSlug, issueId, eventId, instruction = "" }, opts) {
599
- const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, {
652
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, {
600
653
  method: "POST",
601
654
  body: JSON.stringify({
602
655
  event_id: eventId,
603
656
  instruction
604
657
  })
605
658
  }, opts);
606
- const body = await response.json();
607
659
  return require_schema.AutofixRunSchema.parse(body);
608
660
  }
609
661
  async getAutofixState({ organizationSlug, issueId }, opts) {
610
- const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, void 0, opts);
611
- const body = await response.json();
662
+ const body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, void 0, opts);
612
663
  return require_schema.AutofixRunStateSchema.parse(body);
613
664
  }
614
665
  };
@@ -626,4 +677,4 @@ Object.defineProperty(exports, 'SentryApiService', {
626
677
  return SentryApiService;
627
678
  }
628
679
  });
629
- //# sourceMappingURL=client-Dkw5iYu3.cjs.map
680
+ //# sourceMappingURL=client-C_lwH0jz.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-C_lwH0jz.cjs","names":["NETWORK_ERROR_MESSAGES: Record<string, string>","message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","response: Response","ConfigurationError","parsed: unknown | undefined","requestOptions?: { host?: string }","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","updateData: Record<string, any>","sentryQuery: string[]"],"sources":["../src/api-client/client.ts"],"sourcesContent":["import {\n OrganizationListSchema,\n ClientKeySchema,\n TeamListSchema,\n TeamSchema,\n ProjectListSchema,\n ProjectSchema,\n ReleaseListSchema,\n IssueListSchema,\n IssueSchema,\n EventSchema,\n EventAttachmentListSchema,\n ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n UserSchema,\n UserRegionsSchema,\n} from \"./schema\";\nimport { UserInputError, ConfigurationError } from \"../errors\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\n EventAttachment,\n EventAttachmentList,\n Issue,\n IssueList,\n OrganizationList,\n Project,\n ProjectList,\n ReleaseList,\n TagList,\n Team,\n TeamList,\n User,\n} from \"./types\";\n// TODO: this is shared - so ideally, for safety, it uses @sentry/core, but currently\n// logger isnt exposed (or rather, it is, but its not the right logger)\n// import { logger } from \"@sentry/node\";\n\n/**\n * Mapping of common network error codes to user-friendly messages.\n * These help users understand and resolve connection issues.\n */\nconst NETWORK_ERROR_MESSAGES: Record<string, string> = {\n EAI_AGAIN: \"DNS temporarily unavailable. Check your internet connection.\",\n ENOTFOUND: \"Hostname not found. Verify the URL is correct.\",\n ECONNREFUSED: \"Connection refused. Ensure the service is accessible.\",\n ETIMEDOUT: \"Connection timed out. Check network connectivity.\",\n ECONNRESET: \"Connection reset. Try again in a moment.\",\n};\n\n/**\n * Custom error class for Sentry API responses.\n *\n * Provides enhanced error messages for LLM consumption and handles\n * common API error scenarios with user-friendly messaging.\n *\n * @example\n * ```typescript\n * try {\n * await apiService.listIssues({ organizationSlug: \"invalid\" });\n * } catch (error) {\n * if (error instanceof ApiError) {\n * console.log(`API Error ${error.status}: ${error.message}`);\n * }\n * }\n * ```\n */\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n ) {\n // HACK: improving this error message for the LLMs\n let finalMessage = message;\n if (\n message.includes(\n \"You do not have the multi project stream feature enabled\",\n ) ||\n message.includes(\"You cannot view events from multiple projects\")\n ) {\n finalMessage =\n \"You do not have access to query across multiple projects. Please select a project for your query.\";\n }\n super(finalMessage);\n }\n}\n\ntype RequestOptions = {\n host?: string;\n};\n\n/**\n * Sentry API client service for interacting with Sentry's REST API.\n *\n * This service provides a comprehensive interface to Sentry's API endpoints,\n * handling authentication, error processing, multi-region support, and\n * response validation through Zod schemas.\n *\n * Key Features:\n * - Multi-region support for Sentry SaaS and self-hosted instances\n * - Automatic schema validation with Zod\n * - Enhanced error handling with LLM-friendly messages\n * - URL generation for Sentry resources (issues, traces)\n * - Bearer token authentication\n * - Always uses HTTPS for secure connections\n *\n * @example Basic Usage\n * ```typescript\n * const apiService = new SentryApiService({\n * accessToken: \"your-token\",\n * host: \"sentry.io\"\n * });\n *\n * const orgs = await apiService.listOrganizations();\n * const issues = await apiService.listIssues({\n * organizationSlug: \"my-org\",\n * query: \"is:unresolved\"\n * });\n * ```\n *\n * @example Multi-Region Support\n * ```typescript\n * // Self-hosted instance with hostname\n * const selfHosted = new SentryApiService({\n * accessToken: \"token\",\n * host: \"sentry.company.com\"\n * });\n *\n * // Regional endpoint override\n * const issues = await apiService.listIssues(\n * { organizationSlug: \"org\" },\n * { host: \"eu.sentry.io\" }\n * );\n * ```\n */\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n /**\n * Creates a new Sentry API service instance.\n *\n * Always uses HTTPS for secure connections.\n *\n * @param config Configuration object\n * @param config.accessToken OAuth access token for authentication (optional for some endpoints)\n * @param config.host Sentry hostname (e.g. \"sentry.io\", \"sentry.example.com\")\n */\n constructor({\n accessToken = null,\n host = \"sentry.io\",\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host;\n this.apiPrefix = `https://${host}/api/0`;\n }\n\n /**\n * Updates the host for API requests.\n *\n * Used for multi-region support or switching between Sentry instances.\n * Always uses HTTPS protocol.\n *\n * @param host New hostname to use for API requests\n */\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = `https://${this.host}/api/0`;\n }\n\n /**\n * Checks if the current host is Sentry SaaS (sentry.io).\n *\n * Used to determine API endpoint availability and URL formats.\n * Self-hosted instances may not have all endpoints available.\n *\n * @returns True if using Sentry SaaS, false for self-hosted instances\n */\n private isSaas(): boolean {\n return this.host === \"sentry.io\";\n }\n\n /**\n * Internal method for making authenticated requests to Sentry API.\n *\n * Handles:\n * - Bearer token authentication\n * - Error response parsing and enhancement\n * - Multi-region host overrides\n * - Fetch availability validation\n *\n * @param path API endpoint path (without /api/0 prefix)\n * @param options Fetch options\n * @param requestOptions Additional request configuration\n * @returns Promise resolving to Response object\n * @throws {ApiError} Enhanced API errors with user-friendly messages\n * @throws {Error} Network or parsing errors\n */\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? `https://${host}/api/0${path}`\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n \"User-Agent\": \"Sentry MCP Server\",\n };\n if (this.accessToken) {\n headers.Authorization = `Bearer ${this.accessToken}`;\n }\n\n // Check if fetch is available, otherwise provide a helpful error message\n if (typeof globalThis.fetch === \"undefined\") {\n throw new Error(\n \"fetch is not available. Please use Node.js >= 18 or ensure fetch is available in your environment.\",\n );\n }\n\n // logger.info(logger.fmt`[sentryApi] ${options.method || \"GET\"} ${url}`);\n let response: Response;\n try {\n response = await fetch(url, {\n ...options,\n headers,\n });\n } catch (error) {\n // Extract the root cause from the error chain\n let rootCause = error;\n while (rootCause instanceof Error && rootCause.cause) {\n rootCause = rootCause.cause;\n }\n\n const errorMessage =\n rootCause instanceof Error ? rootCause.message : String(rootCause);\n\n let friendlyMessage = `Unable to connect to ${url}`;\n\n // Check if we have a specific message for this error\n const errorCode = Object.keys(NETWORK_ERROR_MESSAGES).find((code) =>\n errorMessage.includes(code),\n );\n\n if (errorCode) {\n friendlyMessage += ` - ${NETWORK_ERROR_MESSAGES[errorCode]}`;\n } else {\n friendlyMessage += ` - ${errorMessage}`;\n }\n\n // DNS resolution failures and connection timeouts to custom hosts are configuration issues\n if (\n errorCode === \"ENOTFOUND\" ||\n errorCode === \"EAI_AGAIN\" ||\n errorCode === \"ECONNREFUSED\" ||\n errorCode === \"ETIMEDOUT\" ||\n errorMessage.includes(\"Connect Timeout Error\")\n ) {\n throw new ConfigurationError(friendlyMessage, { cause: error });\n }\n\n throw new Error(friendlyMessage, { cause: error });\n }\n\n // Handle error responses generically\n if (!response.ok) {\n const errorText = await response.text();\n let parsed: unknown | undefined;\n try {\n parsed = JSON.parse(errorText);\n } catch (error) {\n // If we can't parse JSON, check if it's HTML (server error)\n if (errorText.includes(\"<!DOCTYPE\") || errorText.includes(\"<html\")) {\n console.error(\n `[sentryApi] Received HTML error page instead of JSON (status ${response.status})`,\n error,\n );\n throw new Error(\n `Server error: Received HTML instead of JSON (${response.status} ${response.statusText}). This may indicate an invalid URL or server issue.`,\n );\n }\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n if (parsed) {\n const { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\n if (success) {\n throw new ApiError(data.detail, response.status);\n }\n\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n throw new Error(\n `API request failed: ${response.status} ${response.statusText}\\n${errorText}`,\n );\n }\n\n return response;\n }\n\n /**\n * Safely parses a JSON response, checking Content-Type header first.\n *\n * @param response The Response object from fetch\n * @returns Promise resolving to the parsed JSON object\n * @throws {Error} If response is not JSON or parsing fails\n */\n private async parseJsonResponse(response: Response): Promise<unknown> {\n // Handle case where response might not have all properties (e.g., in tests or promise chains)\n if (!response.headers?.get) {\n return response.json();\n }\n\n const contentType = response.headers.get(\"content-type\");\n\n // Check if the response is JSON\n if (!contentType || !contentType.includes(\"application/json\")) {\n const responseText = await response.text();\n\n // Check if it's HTML\n if (\n contentType?.includes(\"text/html\") ||\n responseText.includes(\"<!DOCTYPE\") ||\n responseText.includes(\"<html\")\n ) {\n throw new Error(\n `Expected JSON response but received HTML (${response.status} ${response.statusText}). This may indicate you're not authenticated, the URL is incorrect, or there's a server issue.`,\n );\n }\n\n // Generic non-JSON error\n throw new Error(\n `Expected JSON response but received ${contentType || \"unknown content type\"} ` +\n `(${response.status} ${response.statusText})`,\n );\n }\n\n try {\n return await response.json();\n } catch (error) {\n throw new Error(\n `Failed to parse JSON response: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n }\n\n /**\n * Makes a request to the Sentry API and parses the JSON response.\n *\n * This is the primary method for API calls that expect JSON responses.\n * It automatically validates Content-Type and provides helpful error messages\n * for common issues like authentication failures or server errors.\n *\n * @param path API endpoint path (without /api/0 prefix)\n * @param options Fetch options\n * @param requestOptions Additional request configuration\n * @returns Promise resolving to the parsed JSON response\n * @throws {ApiError} Enhanced API errors with user-friendly messages\n * @throws {Error} Network, parsing, or validation errors\n */\n private async requestJSON(\n path: string,\n options: RequestInit = {},\n requestOptions?: { host?: string },\n ): Promise<unknown> {\n const response = await this.request(path, options, requestOptions);\n return this.parseJsonResponse(response);\n }\n\n /**\n * Generates a Sentry issue URL for browser navigation.\n *\n * Handles both SaaS (subdomain-based) and self-hosted URL formats.\n * Always uses HTTPS protocol.\n *\n * @param organizationSlug Organization identifier\n * @param issueId Issue identifier (short ID or numeric ID)\n * @returns Full URL to the issue in Sentry UI\n *\n * @example\n * ```typescript\n * // SaaS: https://my-org.sentry.io/issues/PROJ-123\n * apiService.getIssueUrl(\"my-org\", \"PROJ-123\")\n *\n * // Self-hosted: https://sentry.company.com/organizations/my-org/issues/PROJ-123\n * apiService.getIssueUrl(\"my-org\", \"PROJ-123\")\n * ```\n */\n getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.isSaas()\n ? `https://${organizationSlug}.${this.host}/issues/${issueId}`\n : `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`;\n }\n\n /**\n * Generates a Sentry trace URL for performance investigation.\n *\n * Always uses HTTPS protocol.\n *\n * @param organizationSlug Organization identifier\n * @param traceId Trace identifier (hex string)\n * @returns Full HTTPS URL to the trace in Sentry UI\n *\n * @example\n * ```typescript\n * const traceUrl = apiService.getTraceUrl(\"my-org\", \"6a477f5b0f31ef7b6b9b5e1dea66c91d\");\n * // https://my-org.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\n * ```\n */\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.isSaas()\n ? `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`\n : `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;\n }\n\n /**\n * Retrieves the authenticated user's profile information.\n *\n * @param opts Request options including host override\n * @returns User profile data\n * @throws {ApiError} If authentication fails or user not found\n */\n async getAuthenticatedUser(opts?: RequestOptions): Promise<User> {\n const body = await this.requestJSON(\"/auth/\", undefined, opts);\n return UserSchema.parse(body);\n }\n\n /**\n * Lists all organizations accessible to the authenticated user.\n *\n * Automatically handles multi-region queries by fetching from all\n * available regions and combining results.\n *\n * @param opts Request options\n * @returns Array of organizations across all accessible regions\n *\n * @example\n * ```typescript\n * const orgs = await apiService.listOrganizations();\n * orgs.forEach(org => {\n * // regionUrl present for Cloud Service, empty for self-hosted\n * console.log(`${org.name} (${org.slug}) - ${org.links?.regionUrl || 'No region URL'}`);\n * });\n * ```\n */\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n // For self-hosted instances, the regions endpoint doesn't exist\n if (!this.isSaas()) {\n const body = await this.requestJSON(\"/organizations/\", undefined, opts);\n return OrganizationListSchema.parse(body);\n }\n\n // For SaaS, try to use regions endpoint first\n try {\n // TODO: Sentry is currently not returning all orgs without hitting region endpoints\n const regionData = UserRegionsSchema.parse(\n await this.requestJSON(\"/users/me/regions/\", undefined, opts),\n );\n\n return (\n await Promise.all(\n regionData.regions.map(async (region) =>\n this.requestJSON(`/organizations/`, undefined, {\n ...opts,\n host: new URL(region.url).host,\n }),\n ),\n )\n )\n .map((data) => OrganizationListSchema.parse(data))\n .reduce((acc, curr) => acc.concat(curr), []);\n } catch (error) {\n // If regions endpoint fails (e.g., older self-hosted versions identifying as sentry.io),\n // fall back to direct organizations endpoint\n if (error instanceof ApiError && error.status === 404) {\n // logger.info(\"Regions endpoint not found, falling back to direct organizations endpoint\");\n const body = await this.requestJSON(\"/organizations/\", undefined, opts);\n return OrganizationListSchema.parse(body);\n }\n\n // Re-throw other errors\n throw error;\n }\n }\n\n /**\n * Lists teams within an organization.\n *\n * @param organizationSlug Organization identifier\n * @param opts Request options including host override\n * @returns Array of teams in the organization\n */\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n return TeamListSchema.parse(body);\n }\n\n /**\n * Creates a new team within an organization.\n *\n * @param params Team creation parameters\n * @param params.organizationSlug Organization identifier\n * @param params.name Team name\n * @param opts Request options\n * @returns Created team data\n * @throws {ApiError} If team creation fails (e.g., name conflicts)\n */\n async createTeam(\n {\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n },\n opts?: RequestOptions,\n ): Promise<Team> {\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n return TeamSchema.parse(body);\n }\n\n /**\n * Lists projects within an organization.\n *\n * @param organizationSlug Organization identifier\n * @param opts Request options\n * @returns Array of projects in the organization\n */\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n return ProjectListSchema.parse(body);\n }\n\n /**\n * Creates a new project within a team.\n *\n * @param params Project creation parameters\n * @param params.organizationSlug Organization identifier\n * @param params.teamSlug Team identifier\n * @param params.name Project name\n * @param params.platform Platform identifier (e.g., \"javascript\", \"python\")\n * @param opts Request options\n * @returns Created project data\n */\n async createProject(\n {\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const body = await this.requestJSON(\n `/teams/${organizationSlug}/${teamSlug}/projects/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n platform,\n }),\n },\n opts,\n );\n return ProjectSchema.parse(body);\n }\n\n /**\n * Updates an existing project's configuration.\n *\n * @param params Project update parameters\n * @param params.organizationSlug Organization identifier\n * @param params.projectSlug Current project identifier\n * @param params.name New project name (optional)\n * @param params.slug New project slug (optional)\n * @param params.platform New platform identifier (optional)\n * @param opts Request options\n * @returns Updated project data\n */\n async updateProject(\n {\n organizationSlug,\n projectSlug,\n name,\n slug,\n platform,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n slug?: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const updateData: Record<string, any> = {};\n if (name !== undefined) updateData.name = name;\n if (slug !== undefined) updateData.slug = slug;\n if (platform !== undefined) updateData.platform = platform;\n\n const body = await this.requestJSON(\n `/projects/${organizationSlug}/${projectSlug}/`,\n {\n method: \"PUT\",\n body: JSON.stringify(updateData),\n },\n opts,\n );\n return ProjectSchema.parse(body);\n }\n\n /**\n * Assigns a team to a project.\n *\n * @param params Assignment parameters\n * @param params.organizationSlug Organization identifier\n * @param params.projectSlug Project identifier\n * @param params.teamSlug Team identifier to assign\n * @param opts Request options\n */\n async addTeamToProject(\n {\n organizationSlug,\n projectSlug,\n teamSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n teamSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<void> {\n await this.request(\n `/projects/${organizationSlug}/${projectSlug}/teams/${teamSlug}/`,\n {\n method: \"POST\",\n body: JSON.stringify({}),\n },\n opts,\n );\n }\n\n /**\n * Creates a new client key (DSN) for a project.\n *\n * Client keys are used to identify and authenticate SDK requests to Sentry.\n *\n * @param params Key creation parameters\n * @param params.organizationSlug Organization identifier\n * @param params.projectSlug Project identifier\n * @param params.name Human-readable name for the key (optional)\n * @param opts Request options\n * @returns Created client key with DSN information\n *\n * @example\n * ```typescript\n * const key = await apiService.createClientKey({\n * organizationSlug: \"my-org\",\n * projectSlug: \"my-project\",\n * name: \"Production\"\n * });\n * console.log(`DSN: ${key.dsn.public}`);\n * ```\n */\n async createClientKey(\n {\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKey> {\n const body = await this.requestJSON(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(body);\n }\n\n /**\n * Lists all client keys (DSNs) for a project.\n *\n * @param params Query parameters\n * @param params.organizationSlug Organization identifier\n * @param params.projectSlug Project identifier\n * @param opts Request options\n * @returns Array of client keys with DSN information\n */\n async listClientKeys(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKeyList> {\n const body = await this.requestJSON(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(body);\n }\n\n /**\n * Lists releases for an organization or specific project.\n *\n * @param params Query parameters\n * @param params.organizationSlug Organization identifier\n * @param params.projectSlug Project identifier (optional, scopes to specific project)\n * @param params.query Search query for filtering releases\n * @param opts Request options\n * @returns Array of releases with deployment and commit information\n *\n * @example\n * ```typescript\n * // All releases for organization\n * const releases = await apiService.listReleases({\n * organizationSlug: \"my-org\"\n * });\n *\n * // Search for specific version\n * const filtered = await apiService.listReleases({\n * organizationSlug: \"my-org\",\n * query: \"v1.2.3\"\n * });\n * ```\n */\n async listReleases(\n {\n organizationSlug,\n projectSlug,\n query,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n },\n opts?: RequestOptions,\n ): Promise<ReleaseList> {\n const searchQuery = new URLSearchParams();\n if (query) {\n searchQuery.set(\"query\", query);\n }\n\n const path = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`;\n\n const body = await this.requestJSON(\n searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path,\n undefined,\n opts,\n );\n return ReleaseListSchema.parse(body);\n }\n\n /**\n * Lists available tags for search queries.\n *\n * Tags represent indexed fields that can be used in Sentry search queries.\n *\n * @param params Query parameters\n * @param params.organizationSlug Organization identifier\n * @param params.dataset Dataset to query tags for (\"errors\" or \"search_issues\")\n * @param opts Request options\n * @returns Array of available tags with metadata\n *\n * @example\n * ```typescript\n * const tags = await apiService.listTags({\n * organizationSlug: \"my-org\",\n * dataset: \"errors\"\n * });\n * tags.forEach(tag => console.log(`${tag.key}: ${tag.name}`));\n * ```\n */\n async listTags(\n {\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\n },\n opts?: RequestOptions,\n ): Promise<TagList> {\n // TODO: this supports project in the query, but needs fixed\n // to accept slugs\n const searchQuery = new URLSearchParams();\n if (dataset) {\n searchQuery.set(\"dataset\", dataset);\n }\n\n const body = await this.requestJSON(\n searchQuery.toString()\n ? `/organizations/${organizationSlug}/tags/?${searchQuery.toString()}`\n : `/organizations/${organizationSlug}/tags/`,\n undefined,\n opts,\n );\n return TagListSchema.parse(body);\n }\n\n /**\n * Lists issues within an organization or project.\n *\n * Issues represent groups of similar errors or problems in your application.\n * Supports Sentry's powerful query syntax for filtering and sorting.\n *\n * @param params Query parameters\n * @param params.organizationSlug Organization identifier\n * @param params.projectSlug Project identifier (optional, scopes to specific project)\n * @param params.query Sentry search query (e.g., \"is:unresolved browser:chrome\")\n * @param params.sortBy Sort order (\"user\", \"freq\", \"date\", \"new\")\n * @param opts Request options\n * @returns Array of issues with metadata and statistics\n *\n * @example\n * ```typescript\n * // Recent unresolved issues\n * const issues = await apiService.listIssues({\n * organizationSlug: \"my-org\",\n * query: \"is:unresolved\",\n * sortBy: \"date\"\n * });\n *\n * // High-frequency errors in specific project\n * const critical = await apiService.listIssues({\n * organizationSlug: \"my-org\",\n * projectSlug: \"backend\",\n * query: \"level:error\",\n * sortBy: \"freq\"\n * });\n * ```\n */\n async listIssues(\n {\n organizationSlug,\n projectSlug,\n query,\n sortBy,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n sortBy?: \"user\" | \"freq\" | \"date\" | \"new\";\n },\n opts?: RequestOptions,\n ): Promise<IssueList> {\n const sentryQuery: string[] = [];\n if (query) {\n sentryQuery.push(query);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}`\n : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const body = await this.requestJSON(apiUrl, undefined, opts);\n return IssueListSchema.parse(body);\n }\n\n async getIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n return IssueSchema.parse(body);\n }\n\n async getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId,\n }: {\n organizationSlug: string;\n issueId: string;\n eventId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`,\n undefined,\n opts,\n );\n return EventSchema.parse(body);\n }\n\n async getLatestEventForIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n return this.getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId: \"latest\",\n },\n opts,\n );\n }\n\n async listEventAttachments(\n {\n organizationSlug,\n projectSlug,\n eventId,\n }: {\n organizationSlug: string;\n projectSlug: string;\n eventId: string;\n },\n opts?: RequestOptions,\n ): Promise<EventAttachmentList> {\n const body = await this.requestJSON(\n `/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`,\n undefined,\n opts,\n );\n return EventAttachmentListSchema.parse(body);\n }\n\n async getEventAttachment(\n {\n organizationSlug,\n projectSlug,\n eventId,\n attachmentId,\n }: {\n organizationSlug: string;\n projectSlug: string;\n eventId: string;\n attachmentId: string;\n },\n opts?: RequestOptions,\n ): Promise<{\n attachment: EventAttachment;\n downloadUrl: string;\n filename: string;\n blob: Blob;\n }> {\n // Get the attachment metadata first\n const attachmentsData = await this.requestJSON(\n `/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`,\n undefined,\n opts,\n );\n\n const attachments = EventAttachmentListSchema.parse(attachmentsData);\n const attachment = attachments.find((att) => att.id === attachmentId);\n\n if (!attachment) {\n throw new Error(\n `Attachment with ID ${attachmentId} not found for event ${eventId}`,\n );\n }\n\n // Download the actual file content\n const downloadUrl = `/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/${attachmentId}/?download=1`;\n const downloadResponse = await this.request(\n downloadUrl,\n {\n method: \"GET\",\n headers: {\n Accept: \"application/octet-stream\",\n },\n },\n opts,\n );\n\n return {\n attachment,\n downloadUrl: downloadResponse.url,\n filename: attachment.name,\n blob: await downloadResponse.blob(),\n };\n }\n\n async updateIssue(\n {\n organizationSlug,\n issueId,\n status,\n assignedTo,\n }: {\n organizationSlug: string;\n issueId: string;\n status?: string;\n assignedTo?: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const updateData: Record<string, any> = {};\n if (status !== undefined) updateData.status = status;\n if (assignedTo !== undefined) updateData.assignedTo = assignedTo;\n\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n {\n method: \"PUT\",\n body: JSON.stringify(updateData),\n },\n opts,\n );\n return IssueSchema.parse(body);\n }\n\n // TODO: Sentry is not yet exposing a reasonable API to fetch trace data\n // async getTrace({\n // organizationSlug,\n // traceId,\n // }: {\n // organizationSlug: string;\n // traceId: string;\n // }): Promise<z.infer<typeof SentryIssueSchema>> {\n // const response = await this.request(\n // `/organizations/${organizationSlug}/issues/${traceId}/`,\n // );\n\n // const body = await response.json();\n // return SentryIssueSchema.parse(body);\n // }\n\n async searchErrors(\n {\n organizationSlug,\n projectSlug,\n filename,\n transaction,\n query,\n sortBy = \"last_seen\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n filename?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"last_seen\" | \"count\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [];\n if (filename) {\n sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"errors\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`,\n );\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.append(\"field\", \"issue\");\n queryParams.append(\"field\", \"title\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"last_seen()\");\n queryParams.append(\"field\", \"count()\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const body = await this.requestJSON(apiUrl, undefined, opts);\n // TODO(dcramer): If you're using an older version of Sentry this API had a breaking change\n // meaning this endpoint will error.\n return ErrorsSearchResponseSchema.parse(body).data;\n }\n\n async searchSpans(\n {\n organizationSlug,\n projectSlug,\n transaction,\n query,\n sortBy = \"timestamp\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"timestamp\" | \"duration\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [\"is_transaction:true\"];\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"spans\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`,\n );\n queryParams.set(\"allowAggregateConditions\", \"0\");\n queryParams.set(\"useRpc\", \"1\");\n queryParams.append(\"field\", \"id\");\n queryParams.append(\"field\", \"trace\");\n queryParams.append(\"field\", \"span.op\");\n queryParams.append(\"field\", \"span.description\");\n queryParams.append(\"field\", \"span.duration\");\n queryParams.append(\"field\", \"transaction\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"timestamp\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const body = await this.requestJSON(apiUrl, undefined, opts);\n return SpansSearchResponseSchema.parse(body).data;\n }\n\n // POST https://us.sentry.io/api/0/issues/5485083130/autofix/\n async startAutofix(\n {\n organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRun> {\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n event_id: eventId,\n instruction,\n }),\n },\n opts,\n );\n return AutofixRunSchema.parse(body);\n }\n\n // GET https://us.sentry.io/api/0/issues/5485083130/autofix/\n async getAutofixState(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRunState> {\n const body = await this.requestJSON(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;;;;;;AAkDA,MAAMA,yBAAiD;CACrD,WAAW;CACX,WAAW;CACX,cAAc;CACd,WAAW;CACX,YAAY;AACb;;;;;;;;;;;;;;;;;;AAmBD,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEC,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EAbZ;CAcR;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;;;;;;;;;;CAWV,YAAY,EACV,cAAc,MACd,OAAO,aAIR,EAAE;AACD,OA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AAM,UAAU,iBAAiB,iBAAiB,WAAW,YAAY,UAAU;EAEnF,MAAM,OAAO,MAAM,KAAK,YAAY,gBAAmB,KAAK;AAC5D,SAAO,yCAA0B,MAAM,KAAK,CAAC;CAC9C;CAGD,MAAM,aACJ,EACE,kBACA,SACA,SACA,cAAc,IAMf,EACDF,MACqB;EACrB,MAAM,OAAO,MAAM,KAAK,aACrB,iBAAiB,iBAAiB,UAAU,QAAQ,YACrD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB,UAAU;IACV;GACD,EAAC;EACH,GACD,KACD;AACD,SAAO,gCAAiB,MAAM,KAAK;CACpC;CAGD,MAAM,gBACJ,EACE,kBACA,SAID,EACDA,MAC0B;EAC1B,MAAM,OAAO,MAAM,KAAK,aACrB,iBAAiB,iBAAiB,UAAU,QAAQ,oBAErD,KACD;AACD,SAAO,qCAAsB,MAAM,KAAK;CACzC;AACF"}
@@ -1,4 +1,4 @@
1
- import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, EventAttachment, EventAttachmentList, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList, User } from "./types-Bg17IGWJ.cjs";
1
+ import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, EventAttachment, EventAttachmentList, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList, User } from "./types-BAbu4Vzx.cjs";
2
2
 
3
3
  //#region src/api-client/client.d.ts
4
4
 
@@ -99,6 +99,15 @@ declare class SentryApiService {
99
99
  * @param host New hostname to use for API requests
100
100
  */
101
101
  setHost(host: string): void;
102
+ /**
103
+ * Checks if the current host is Sentry SaaS (sentry.io).
104
+ *
105
+ * Used to determine API endpoint availability and URL formats.
106
+ * Self-hosted instances may not have all endpoints available.
107
+ *
108
+ * @returns True if using Sentry SaaS, false for self-hosted instances
109
+ */
110
+ private isSaas;
102
111
  /**
103
112
  * Internal method for making authenticated requests to Sentry API.
104
113
  *
@@ -116,6 +125,29 @@ declare class SentryApiService {
116
125
  * @throws {Error} Network or parsing errors
117
126
  */
118
127
  private request;
128
+ /**
129
+ * Safely parses a JSON response, checking Content-Type header first.
130
+ *
131
+ * @param response The Response object from fetch
132
+ * @returns Promise resolving to the parsed JSON object
133
+ * @throws {Error} If response is not JSON or parsing fails
134
+ */
135
+ private parseJsonResponse;
136
+ /**
137
+ * Makes a request to the Sentry API and parses the JSON response.
138
+ *
139
+ * This is the primary method for API calls that expect JSON responses.
140
+ * It automatically validates Content-Type and provides helpful error messages
141
+ * for common issues like authentication failures or server errors.
142
+ *
143
+ * @param path API endpoint path (without /api/0 prefix)
144
+ * @param options Fetch options
145
+ * @param requestOptions Additional request configuration
146
+ * @returns Promise resolving to the parsed JSON response
147
+ * @throws {ApiError} Enhanced API errors with user-friendly messages
148
+ * @throws {Error} Network, parsing, or validation errors
149
+ */
150
+ private requestJSON;
119
151
  /**
120
152
  * Generates a Sentry issue URL for browser navigation.
121
153
  *
@@ -501,10 +533,10 @@ declare class SentryApiService {
501
533
  query?: string;
502
534
  sortBy?: "last_seen" | "count";
503
535
  }, opts?: RequestOptions): Promise<{
536
+ title: string;
537
+ project: string;
504
538
  issue: string;
505
539
  "issue.id": string | number;
506
- project: string;
507
- title: string;
508
540
  "count()": number;
509
541
  "last_seen()": string;
510
542
  }[]>;
@@ -521,14 +553,14 @@ declare class SentryApiService {
521
553
  query?: string;
522
554
  sortBy?: "timestamp" | "duration";
523
555
  }, opts?: RequestOptions): Promise<{
524
- project: string;
525
556
  id: string;
557
+ project: string;
558
+ transaction: string;
559
+ timestamp: string;
526
560
  trace: string;
527
561
  "span.op": string;
528
562
  "span.description": string;
529
563
  "span.duration": number;
530
- transaction: string;
531
- timestamp: string;
532
564
  }[]>;
533
565
  startAutofix({
534
566
  organizationSlug,
@@ -551,4 +583,4 @@ declare class SentryApiService {
551
583
  }
552
584
  //#endregion
553
585
  export { ApiError, SentryApiService };
554
- //# sourceMappingURL=client-CILwfx6G.d.cts.map
586
+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