@sentry/mcp-server 0.9.0 → 0.11.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.
- package/README.md +1 -1
- package/dist/api-client/client.cjs +4 -4
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +8 -9
- package/dist/api-client/client.test.cjs.map +1 -1
- package/dist/api-client/client.test.js +4 -4
- package/dist/api-client/index.cjs +40 -38
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +5 -5
- package/dist/api-client/schema.cjs +35 -33
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
- package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
- package/dist/{client-1dRfG57H.d.ts → client-Bxf4MxOz.d.cts} +10 -6
- package/dist/client-Bxf4MxOz.d.cts.map +1 -0
- package/dist/{client-CTm4cvI7.js → client-D5xFZtxK.js} +19 -7
- package/dist/client-D5xFZtxK.js.map +1 -0
- package/dist/{client-BsYOQsEI.d.cts → client-DOhBiaMJ.d.ts} +9 -5
- package/dist/client-DOhBiaMJ.d.ts.map +1 -0
- package/dist/{client-DQ837FXP.cjs → client-GKHZSXgV.cjs} +19 -8
- package/dist/client-GKHZSXgV.cjs.map +1 -0
- package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
- package/dist/dist-BlIWGSIM.cjs.map +1 -0
- package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
- package/dist/dist-DDpQABxe.js.map +1 -0
- package/dist/errors-B9fwS-aP.cjs +21 -0
- package/dist/errors-B9fwS-aP.cjs.map +1 -0
- package/dist/errors-BJSrT6Ou.js +15 -0
- package/dist/errors-BJSrT6Ou.js.map +1 -0
- package/dist/errors.cjs +3 -0
- package/dist/errors.d.cts +12 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +3 -0
- package/dist/errors.test.cjs +24 -0
- package/dist/errors.test.cjs.map +1 -0
- package/dist/errors.test.d.cts +1 -0
- package/dist/errors.test.d.ts +1 -0
- package/dist/errors.test.js +24 -0
- package/dist/errors.test.js.map +1 -0
- package/dist/{formatting-BQRAzO5v.js → formatting-BaARL2gT.js} +11 -3
- package/dist/formatting-BaARL2gT.js.map +1 -0
- package/dist/{formatting-C-0bHtbh.cjs → formatting-C2kN0ok6.cjs} +11 -4
- package/dist/formatting-C2kN0ok6.cjs.map +1 -0
- package/dist/index.cjs +19 -19
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.cjs +4 -4
- package/dist/internal/formatting.d.cts +4 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +4 -5
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +4 -4
- package/dist/internal/issue-helpers.d.cts +2 -2
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +2 -2
- package/dist/internal/issue-helpers.d.ts.map +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/issue-helpers.test.cjs +23 -27
- package/dist/internal/issue-helpers.test.cjs.map +1 -1
- package/dist/internal/issue-helpers.test.js +7 -10
- package/dist/internal/issue-helpers.test.js.map +1 -1
- package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-71XgJVXC.cjs} +8 -3
- package/dist/issue-helpers-71XgJVXC.cjs.map +1 -0
- package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-CSNNO03f.js} +8 -2
- package/dist/issue-helpers-CSNNO03f.js.map +1 -0
- package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
- package/dist/{logging-BEMgC5SA.cjs.map → logging-ByvSjT6V.cjs.map} +1 -1
- package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
- package/dist/{logging-Cxm8lQvg.js.map → logging-CXLD0FFB.js.map} +1 -1
- package/dist/logging.cjs +2 -2
- package/dist/logging.d.cts +1 -2
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +1 -2
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.js +1 -1
- package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
- package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
- package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-D3ll3qCd.cjs} +6 -7
- package/dist/promptDefinitions-D3ll3qCd.cjs.map +1 -0
- package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-DMucOchd.d.cts} +5 -5
- package/dist/promptDefinitions-DMucOchd.d.cts.map +1 -0
- package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-H0q1_X-K.d.ts} +6 -6
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +1 -0
- package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-aKmUZWWO.js} +5 -5
- package/dist/promptDefinitions-aKmUZWWO.js.map +1 -0
- package/dist/promptDefinitions.cjs +3 -3
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +2 -2
- package/dist/{prompts-DgWOD2rU.js → prompts-CzD0yl7Z.js} +1 -1
- package/dist/{prompts-DgWOD2rU.js.map → prompts-CzD0yl7Z.js.map} +1 -1
- package/dist/{prompts-nfFU-zY-.cjs → prompts-DMwoay8l.cjs} +1 -2
- package/dist/{prompts-nfFU-zY-.cjs.map → prompts-DMwoay8l.cjs.map} +1 -1
- package/dist/prompts.cjs +2 -2
- package/dist/prompts.d.cts +6 -7
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +6 -7
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/{resources-BAE7VVZZ.cjs → resources-D6TW2ER0.cjs} +1 -2
- package/dist/{resources-BAE7VVZZ.cjs.map → resources-D6TW2ER0.cjs.map} +1 -1
- package/dist/{resources-OM3EAnnj.js → resources-x-GaokG8.js} +1 -1
- package/dist/{resources-OM3EAnnj.js.map → resources-x-GaokG8.js.map} +1 -1
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts +0 -1
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +0 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/schema-B8lT632E.cjs +77 -0
- package/dist/schema-B8lT632E.cjs.map +1 -0
- package/dist/schema-BkHf97d7.js +17 -0
- package/dist/schema-BkHf97d7.js.map +1 -0
- package/dist/{schema-CaJV2aIO.d.cts → schema-C-MLkWMc.d.ts} +385 -272
- package/dist/schema-C-MLkWMc.d.ts.map +1 -0
- package/dist/{schema-nyYqVk4Y.js → schema-CewAKS9A.js} +19 -3
- package/dist/schema-CewAKS9A.js.map +1 -0
- package/dist/{schema-KEMqYaQn.cjs → schema-DkyWSqp_.cjs} +31 -4
- package/dist/schema-DkyWSqp_.cjs.map +1 -0
- package/dist/{schema-DwPOkoSP.d.ts → schema-DqxkW9Tx.d.cts} +387 -274
- package/dist/schema-DqxkW9Tx.d.cts.map +1 -0
- package/dist/schema.cjs +11 -9
- package/dist/schema.d.cts +4 -3
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +4 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/{server-BWoJZj5B.cjs → server-pGtEIwE3.cjs} +33 -27
- package/dist/server-pGtEIwE3.cjs.map +1 -0
- package/dist/{server-DtNbD1c-.js → server-qpWdf-ST.js} +32 -25
- package/dist/server-qpWdf-ST.js.map +1 -0
- package/dist/server.cjs +16 -15
- package/dist/server.d.cts +4 -5
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +4 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -14
- package/dist/{stdio-D4oW-qT6.js → stdio-D8u2W847.js} +2 -2
- package/dist/{stdio-D4oW-qT6.js.map → stdio-D8u2W847.js.map} +1 -1
- package/dist/{stdio-BLzMxGqU.cjs → stdio-DydB2Pxu.cjs} +3 -4
- package/dist/{stdio-BLzMxGqU.cjs.map → stdio-DydB2Pxu.cjs.map} +1 -1
- package/dist/test-setup.cjs +1568 -1320
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1568 -1319
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-BSC2D_S-.js} +95 -79
- package/dist/toolDefinitions-BSC2D_S-.js.map +1 -0
- package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-BtHN8t_d.cjs} +96 -81
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +1 -0
- package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-Dp13BpEu.d.cts} +58 -26
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +1 -0
- package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-fQrpWznJ.d.ts} +57 -25
- package/dist/toolDefinitions-fQrpWznJ.d.ts.map +1 -0
- package/dist/toolDefinitions.cjs +3 -3
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/toolDefinitions.test.cjs +3 -4
- package/dist/toolDefinitions.test.cjs.map +1 -1
- package/dist/toolDefinitions.test.js +3 -3
- package/dist/{tools-B8ufMRZx.js → tools-4Rtn4WEf.js} +58 -57
- package/dist/tools-4Rtn4WEf.js.map +1 -0
- package/dist/{tools-BYt-G6p2.cjs → tools-DHHqAqP9.cjs} +59 -59
- package/dist/tools-DHHqAqP9.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +55 -26
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +55 -26
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +154 -62
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +135 -42
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +17 -16
- package/dist/transports/stdio.d.cts +4 -5
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +4 -5
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +16 -15
- package/dist/{types-TaJcaAVg.d.cts → types-CbLyQvVe.d.cts} +3 -4
- package/dist/types-CbLyQvVe.d.cts.map +1 -0
- package/dist/{types-Ds7qzCBB.d.ts → types-CcffrLXB.d.cts} +5 -5
- package/dist/types-CcffrLXB.d.cts.map +1 -0
- package/dist/{types-DyM4kaGZ.d.ts → types-CfJ51LyL.d.ts} +3 -4
- package/dist/types-CfJ51LyL.d.ts.map +1 -0
- package/dist/{types-CPuN4Qmi.d.cts → types-DuUmV9zh.d.ts} +5 -5
- package/dist/types-DuUmV9zh.d.ts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/version-BT9r_3jm.js +6 -0
- package/dist/{version-dTEKpaGt.js.map → version-BT9r_3jm.js.map} +1 -1
- package/dist/{version-B0O4KvZ9.cjs → version-CRzAHHGZ.cjs} +2 -3
- package/dist/{version-B0O4KvZ9.cjs.map → version-CRzAHHGZ.cjs.map} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.d.cts +1 -2
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +1 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
- package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/client-1dRfG57H.d.ts.map +0 -1
- package/dist/client-BsYOQsEI.d.cts.map +0 -1
- package/dist/client-CTm4cvI7.js.map +0 -1
- package/dist/client-DQ837FXP.cjs.map +0 -1
- package/dist/dist-BKh-M1A1.js.map +0 -1
- package/dist/dist-wiyJYfAH.cjs.map +0 -1
- package/dist/formatting-BQRAzO5v.js.map +0 -1
- package/dist/formatting-C-0bHtbh.cjs.map +0 -1
- package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
- package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
- package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
- package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
- package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
- package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
- package/dist/schema-BCkBPgjj.cjs +0 -64
- package/dist/schema-BCkBPgjj.cjs.map +0 -1
- package/dist/schema-CJrk_GUH.js +0 -15
- package/dist/schema-CJrk_GUH.js.map +0 -1
- package/dist/schema-CaJV2aIO.d.cts.map +0 -1
- package/dist/schema-DwPOkoSP.d.ts.map +0 -1
- package/dist/schema-KEMqYaQn.cjs.map +0 -1
- package/dist/schema-nyYqVk4Y.js.map +0 -1
- package/dist/server-BWoJZj5B.cjs.map +0 -1
- package/dist/server-DtNbD1c-.js.map +0 -1
- package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
- package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
- package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
- package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
- package/dist/tools-B8ufMRZx.js.map +0 -1
- package/dist/tools-BYt-G6p2.cjs.map +0 -1
- package/dist/types-CPuN4Qmi.d.cts.map +0 -1
- package/dist/types-Ds7qzCBB.d.ts.map +0 -1
- package/dist/types-DyM4kaGZ.d.ts.map +0 -1
- package/dist/types-TaJcaAVg.d.cts.map +0 -1
- package/dist/version-dTEKpaGt.js +0 -6
- package/dist/vi.ClIskdbk-Bs263gvI.cjs.map +0 -1
- package/dist/vi.ClIskdbk-De9q3829.js.map +0 -1
- /package/dist/{api-client-9mzrj2HY.js → api-client-CL1WDkw9.cjs} +0 -0
- /package/dist/{api-client-CEBuz3Zu.cjs → api-client-CNv_hbPO.js} +0 -0
- /package/dist/{types-H-TSmRpm.js → types-6zHoEWAx.js} +0 -0
- /package/dist/{types-o3zWarRp.cjs → types-MYBaygjr.cjs} +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# sentry-mcp
|
|
2
2
|
|
|
3
|
-
This is a prototype of an MCP
|
|
3
|
+
This is a prototype of an MCP server, acting as a middleware to the upstream Sentry API provider.
|
|
4
4
|
|
|
5
5
|
This package is primarily for running the `stdio` MCP server. If you do not know what that is, or do not need it, we suggest using the public remote service:
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require('../schema-
|
|
2
|
-
const require_client = require('../client-
|
|
1
|
+
require('../schema-DkyWSqp_.cjs');
|
|
2
|
+
const require_client = require('../client-GKHZSXgV.cjs');
|
|
3
3
|
|
|
4
|
-
exports.ApiError = require_client.ApiError
|
|
5
|
-
exports.SentryApiService = require_client.SentryApiService
|
|
4
|
+
exports.ApiError = require_client.ApiError;
|
|
5
|
+
exports.SentryApiService = require_client.SentryApiService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { ApiError, SentryApiService } from "../client-
|
|
1
|
+
import "../schema-DqxkW9Tx.cjs";
|
|
2
|
+
import "../types-CcffrLXB.cjs";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client-Bxf4MxOz.cjs";
|
|
4
4
|
export { ApiError, SentryApiService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { ApiError
|
|
1
|
+
import "../schema-C-MLkWMc.js";
|
|
2
|
+
import "../types-DuUmV9zh.js";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client-DOhBiaMJ.js";
|
|
4
4
|
export { ApiError, SentryApiService };
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
require('../
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const require_vi_ClIskdbk = require('../vi.ClIskdbk-Bs263gvI.cjs');
|
|
1
|
+
const require_dist = require('../dist-BlIWGSIM.cjs');
|
|
2
|
+
const require_vi_bdSIJ99Y = require('../vi.bdSIJ99Y-Dft_B_Ta.cjs');
|
|
3
|
+
require('../schema-DkyWSqp_.cjs');
|
|
4
|
+
const require_client = require('../client-GKHZSXgV.cjs');
|
|
6
5
|
|
|
7
6
|
//#region src/api-client/client.test.ts
|
|
8
7
|
require_dist.describe("getIssueUrl", () => {
|
|
9
8
|
require_dist.it("should work with sentry.io", () => {
|
|
10
9
|
const apiService = new require_client.SentryApiService({ host: "sentry.io" });
|
|
11
10
|
const result = apiService.getIssueUrl("sentry-mcp", "123456");
|
|
12
|
-
|
|
11
|
+
require_vi_bdSIJ99Y.globalExpect(result).toMatchInlineSnapshot(`"https://sentry-mcp.sentry.io/issues/123456"`);
|
|
13
12
|
});
|
|
14
13
|
require_dist.it("should work with self-hosted", () => {
|
|
15
14
|
const apiService = new require_client.SentryApiService({ host: "sentry.example.com" });
|
|
16
15
|
const result = apiService.getIssueUrl("sentry-mcp", "123456");
|
|
17
|
-
|
|
16
|
+
require_vi_bdSIJ99Y.globalExpect(result).toMatchInlineSnapshot(`"https://sentry.example.com/organizations/sentry-mcp/issues/123456"`);
|
|
18
17
|
});
|
|
19
18
|
});
|
|
20
19
|
require_dist.describe("getTraceUrl", () => {
|
|
21
20
|
require_dist.it("should work with sentry.io", () => {
|
|
22
21
|
const apiService = new require_client.SentryApiService({ host: "sentry.io" });
|
|
23
22
|
const result = apiService.getTraceUrl("sentry-mcp", "6a477f5b0f31ef7b6b9b5e1dea66c91d");
|
|
24
|
-
|
|
23
|
+
require_vi_bdSIJ99Y.globalExpect(result).toMatchInlineSnapshot(`"https://sentry-mcp.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d"`);
|
|
25
24
|
});
|
|
26
25
|
require_dist.it("should work with self-hosted", () => {
|
|
27
26
|
const apiService = new require_client.SentryApiService({ host: "sentry.example.com" });
|
|
28
27
|
const result = apiService.getTraceUrl("sentry-mcp", "6a477f5b0f31ef7b6b9b5e1dea66c91d");
|
|
29
|
-
|
|
28
|
+
require_vi_bdSIJ99Y.globalExpect(result).toMatchInlineSnapshot(`"https://sentry.example.com/organizations/sentry-mcp/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d"`);
|
|
30
29
|
});
|
|
31
30
|
});
|
|
32
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.test.cjs","names":["SentryApiService"],"sources":["../../src/api-client/client.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { SentryApiService } from \"./client.js\";\n\ndescribe(\"getIssueUrl\", () => {\n it(\"should work with sentry.io\", () => {\n const apiService = new SentryApiService({ host: \"sentry.io\" });\n const result = apiService.getIssueUrl(\"sentry-mcp\", \"123456\");\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry-mcp.sentry.io/issues/123456\"`,\n );\n });\n it(\"should work with self-hosted\", () => {\n const apiService = new SentryApiService({ host: \"sentry.example.com\" });\n const result = apiService.getIssueUrl(\"sentry-mcp\", \"123456\");\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry.example.com/organizations/sentry-mcp/issues/123456\"`,\n );\n });\n});\n\ndescribe(\"getTraceUrl\", () => {\n it(\"should work with sentry.io\", () => {\n const apiService = new SentryApiService({ host: \"sentry.io\" });\n const result = apiService.getTraceUrl(\n \"sentry-mcp\",\n \"6a477f5b0f31ef7b6b9b5e1dea66c91d\",\n );\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry-mcp.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\"`,\n );\n });\n it(\"should work with self-hosted\", () => {\n const apiService = new SentryApiService({ host: \"sentry.example.com\" });\n const result = apiService.getTraceUrl(\n \"sentry-mcp\",\n \"6a477f5b0f31ef7b6b9b5e1dea66c91d\",\n );\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry.example.com/organizations/sentry-mcp/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\"`,\n );\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.test.cjs","names":["SentryApiService"],"sources":["../../src/api-client/client.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { SentryApiService } from \"./client.js\";\n\ndescribe(\"getIssueUrl\", () => {\n it(\"should work with sentry.io\", () => {\n const apiService = new SentryApiService({ host: \"sentry.io\" });\n const result = apiService.getIssueUrl(\"sentry-mcp\", \"123456\");\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry-mcp.sentry.io/issues/123456\"`,\n );\n });\n it(\"should work with self-hosted\", () => {\n const apiService = new SentryApiService({ host: \"sentry.example.com\" });\n const result = apiService.getIssueUrl(\"sentry-mcp\", \"123456\");\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry.example.com/organizations/sentry-mcp/issues/123456\"`,\n );\n });\n});\n\ndescribe(\"getTraceUrl\", () => {\n it(\"should work with sentry.io\", () => {\n const apiService = new SentryApiService({ host: \"sentry.io\" });\n const result = apiService.getTraceUrl(\n \"sentry-mcp\",\n \"6a477f5b0f31ef7b6b9b5e1dea66c91d\",\n );\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry-mcp.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\"`,\n );\n });\n it(\"should work with self-hosted\", () => {\n const apiService = new SentryApiService({ host: \"sentry.example.com\" });\n const result = apiService.getTraceUrl(\n \"sentry-mcp\",\n \"6a477f5b0f31ef7b6b9b5e1dea66c91d\",\n );\n expect(result).toMatchInlineSnapshot(\n `\"https://sentry.example.com/organizations/sentry-mcp/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\"`,\n );\n });\n});\n"],"mappings":";;;;;;AAGA,sBAAS,eAAe,MAAM;AAC5B,iBAAG,8BAA8B,MAAM;EACrC,MAAM,aAAa,IAAIA,gCAAiB,EAAE,MAAM,YAAa;EAC7D,MAAM,SAAS,WAAW,YAAY,cAAc,SAAS;AAC7D,mCAAO,OAAO,CAAC,uBACZ,8CACF;CACF,EAAC;AACF,iBAAG,gCAAgC,MAAM;EACvC,MAAM,aAAa,IAAIA,gCAAiB,EAAE,MAAM,qBAAsB;EACtE,MAAM,SAAS,WAAW,YAAY,cAAc,SAAS;AAC7D,mCAAO,OAAO,CAAC,uBACZ,qEACF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,eAAe,MAAM;AAC5B,iBAAG,8BAA8B,MAAM;EACrC,MAAM,aAAa,IAAIA,gCAAiB,EAAE,MAAM,YAAa;EAC7D,MAAM,SAAS,WAAW,YACxB,cACA,mCACD;AACD,mCAAO,OAAO,CAAC,uBACZ,sFACF;CACF,EAAC;AACF,iBAAG,gCAAgC,MAAM;EACvC,MAAM,aAAa,IAAIA,gCAAiB,EAAE,MAAM,qBAAsB;EACtE,MAAM,SAAS,WAAW,YACxB,cACA,mCACD;AACD,mCAAO,OAAO,CAAC,uBACZ,6GACF;CACF,EAAC;AACH,EAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { describe, it } from "../dist-DDpQABxe.js";
|
|
2
|
+
import { globalExpect } from "../vi.bdSIJ99Y-BfJr7I2s.js";
|
|
3
|
+
import "../schema-CewAKS9A.js";
|
|
4
|
+
import { SentryApiService } from "../client-D5xFZtxK.js";
|
|
5
5
|
|
|
6
6
|
//#region src/api-client/client.test.ts
|
|
7
7
|
describe("getIssueUrl", () => {
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
const require_schema = require('../schema-
|
|
2
|
-
const require_client = require('../client-
|
|
3
|
-
require('../types-
|
|
4
|
-
require('../api-client-
|
|
1
|
+
const require_schema = require('../schema-DkyWSqp_.cjs');
|
|
2
|
+
const require_client = require('../client-GKHZSXgV.cjs');
|
|
3
|
+
require('../types-MYBaygjr.cjs');
|
|
4
|
+
require('../api-client-CL1WDkw9.cjs');
|
|
5
5
|
|
|
6
|
-
exports.ApiError = require_client.ApiError
|
|
7
|
-
exports.ApiErrorSchema = require_schema.ApiErrorSchema
|
|
8
|
-
exports.AutofixRunSchema = require_schema.AutofixRunSchema
|
|
9
|
-
exports.AutofixRunStateSchema = require_schema.AutofixRunStateSchema
|
|
10
|
-
exports.AutofixRunStepDefaultSchema = require_schema.AutofixRunStepDefaultSchema
|
|
11
|
-
exports.AutofixRunStepRootCauseAnalysisSchema = require_schema.AutofixRunStepRootCauseAnalysisSchema
|
|
12
|
-
exports.AutofixRunStepSchema = require_schema.AutofixRunStepSchema
|
|
13
|
-
exports.AutofixRunStepSolutionSchema = require_schema.AutofixRunStepSolutionSchema
|
|
14
|
-
exports.ClientKeyListSchema = require_schema.ClientKeyListSchema
|
|
15
|
-
exports.ClientKeySchema = require_schema.ClientKeySchema
|
|
16
|
-
exports.ErrorEntrySchema = require_schema.ErrorEntrySchema
|
|
17
|
-
exports.ErrorEventSchema = require_schema.ErrorEventSchema
|
|
18
|
-
exports.ErrorsSearchResponseSchema = require_schema.ErrorsSearchResponseSchema
|
|
19
|
-
exports.EventSchema = require_schema.EventSchema
|
|
20
|
-
exports.EventsResponseSchema = require_schema.EventsResponseSchema
|
|
21
|
-
exports.ExceptionInterface = require_schema.ExceptionInterface
|
|
22
|
-
exports.FrameInterface = require_schema.FrameInterface
|
|
23
|
-
exports.IssueListSchema = require_schema.IssueListSchema
|
|
24
|
-
exports.IssueSchema = require_schema.IssueSchema
|
|
25
|
-
exports.OrganizationListSchema = require_schema.OrganizationListSchema
|
|
26
|
-
exports.OrganizationSchema = require_schema.OrganizationSchema
|
|
27
|
-
exports.ProjectListSchema = require_schema.ProjectListSchema
|
|
28
|
-
exports.ProjectSchema = require_schema.ProjectSchema
|
|
29
|
-
exports.ReleaseListSchema = require_schema.ReleaseListSchema
|
|
30
|
-
exports.ReleaseSchema = require_schema.ReleaseSchema
|
|
31
|
-
exports.RequestEntrySchema = require_schema.RequestEntrySchema
|
|
32
|
-
exports.SentryApiService = require_client.SentryApiService
|
|
33
|
-
exports.SpansSearchResponseSchema = require_schema.SpansSearchResponseSchema
|
|
34
|
-
exports.TagListSchema = require_schema.TagListSchema
|
|
35
|
-
exports.TagSchema = require_schema.TagSchema
|
|
36
|
-
exports.TeamListSchema = require_schema.TeamListSchema
|
|
37
|
-
exports.TeamSchema = require_schema.TeamSchema
|
|
38
|
-
exports.TransactionEventSchema = require_schema.TransactionEventSchema
|
|
39
|
-
exports.UnknownEventSchema = require_schema.UnknownEventSchema
|
|
6
|
+
exports.ApiError = require_client.ApiError;
|
|
7
|
+
exports.ApiErrorSchema = require_schema.ApiErrorSchema;
|
|
8
|
+
exports.AutofixRunSchema = require_schema.AutofixRunSchema;
|
|
9
|
+
exports.AutofixRunStateSchema = require_schema.AutofixRunStateSchema;
|
|
10
|
+
exports.AutofixRunStepDefaultSchema = require_schema.AutofixRunStepDefaultSchema;
|
|
11
|
+
exports.AutofixRunStepRootCauseAnalysisSchema = require_schema.AutofixRunStepRootCauseAnalysisSchema;
|
|
12
|
+
exports.AutofixRunStepSchema = require_schema.AutofixRunStepSchema;
|
|
13
|
+
exports.AutofixRunStepSolutionSchema = require_schema.AutofixRunStepSolutionSchema;
|
|
14
|
+
exports.ClientKeyListSchema = require_schema.ClientKeyListSchema;
|
|
15
|
+
exports.ClientKeySchema = require_schema.ClientKeySchema;
|
|
16
|
+
exports.ErrorEntrySchema = require_schema.ErrorEntrySchema;
|
|
17
|
+
exports.ErrorEventSchema = require_schema.ErrorEventSchema;
|
|
18
|
+
exports.ErrorsSearchResponseSchema = require_schema.ErrorsSearchResponseSchema;
|
|
19
|
+
exports.EventSchema = require_schema.EventSchema;
|
|
20
|
+
exports.EventsResponseSchema = require_schema.EventsResponseSchema;
|
|
21
|
+
exports.ExceptionInterface = require_schema.ExceptionInterface;
|
|
22
|
+
exports.FrameInterface = require_schema.FrameInterface;
|
|
23
|
+
exports.IssueListSchema = require_schema.IssueListSchema;
|
|
24
|
+
exports.IssueSchema = require_schema.IssueSchema;
|
|
25
|
+
exports.OrganizationListSchema = require_schema.OrganizationListSchema;
|
|
26
|
+
exports.OrganizationSchema = require_schema.OrganizationSchema;
|
|
27
|
+
exports.ProjectListSchema = require_schema.ProjectListSchema;
|
|
28
|
+
exports.ProjectSchema = require_schema.ProjectSchema;
|
|
29
|
+
exports.ReleaseListSchema = require_schema.ReleaseListSchema;
|
|
30
|
+
exports.ReleaseSchema = require_schema.ReleaseSchema;
|
|
31
|
+
exports.RequestEntrySchema = require_schema.RequestEntrySchema;
|
|
32
|
+
exports.SentryApiService = require_client.SentryApiService;
|
|
33
|
+
exports.SpansSearchResponseSchema = require_schema.SpansSearchResponseSchema;
|
|
34
|
+
exports.TagListSchema = require_schema.TagListSchema;
|
|
35
|
+
exports.TagSchema = require_schema.TagSchema;
|
|
36
|
+
exports.TeamListSchema = require_schema.TeamListSchema;
|
|
37
|
+
exports.TeamSchema = require_schema.TeamSchema;
|
|
38
|
+
exports.TransactionEventSchema = require_schema.TransactionEventSchema;
|
|
39
|
+
exports.UnknownEventSchema = require_schema.UnknownEventSchema;
|
|
40
|
+
exports.UserRegionsSchema = require_schema.UserRegionsSchema;
|
|
41
|
+
exports.UserSchema = require_schema.UserSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-
|
|
3
|
-
import { ApiError, SentryApiService } from "../client-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-DqxkW9Tx.cjs";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User } from "../types-CcffrLXB.cjs";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client-Bxf4MxOz.cjs";
|
|
4
4
|
import "../index-BPSCxsMC.cjs";
|
|
5
|
-
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
5
|
+
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, User, UserRegionsSchema, UserSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiErrorSchema
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-
|
|
3
|
-
import { ApiError
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-C-MLkWMc.js";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User } from "../types-DuUmV9zh.js";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client-DOhBiaMJ.js";
|
|
4
4
|
import "../index-h64gcVNJ.js";
|
|
5
|
-
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
5
|
+
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, User, UserRegionsSchema, UserSchema };
|
package/dist/api-client/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-
|
|
2
|
-
import { ApiError, SentryApiService } from "../client-
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../api-client-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-CewAKS9A.js";
|
|
2
|
+
import { ApiError, SentryApiService } from "../client-D5xFZtxK.js";
|
|
3
|
+
import "../types-6zHoEWAx.js";
|
|
4
|
+
import "../api-client-CNv_hbPO.js";
|
|
5
5
|
|
|
6
|
-
export { ApiError, ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
6
|
+
export { ApiError, ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema };
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
const require_schema = require('../schema-
|
|
1
|
+
const require_schema = require('../schema-DkyWSqp_.cjs');
|
|
2
2
|
|
|
3
|
-
exports.ApiErrorSchema = require_schema.ApiErrorSchema
|
|
4
|
-
exports.AutofixRunSchema = require_schema.AutofixRunSchema
|
|
5
|
-
exports.AutofixRunStateSchema = require_schema.AutofixRunStateSchema
|
|
6
|
-
exports.AutofixRunStepDefaultSchema = require_schema.AutofixRunStepDefaultSchema
|
|
7
|
-
exports.AutofixRunStepRootCauseAnalysisSchema = require_schema.AutofixRunStepRootCauseAnalysisSchema
|
|
8
|
-
exports.AutofixRunStepSchema = require_schema.AutofixRunStepSchema
|
|
9
|
-
exports.AutofixRunStepSolutionSchema = require_schema.AutofixRunStepSolutionSchema
|
|
10
|
-
exports.ClientKeyListSchema = require_schema.ClientKeyListSchema
|
|
11
|
-
exports.ClientKeySchema = require_schema.ClientKeySchema
|
|
12
|
-
exports.ErrorEntrySchema = require_schema.ErrorEntrySchema
|
|
13
|
-
exports.ErrorEventSchema = require_schema.ErrorEventSchema
|
|
14
|
-
exports.ErrorsSearchResponseSchema = require_schema.ErrorsSearchResponseSchema
|
|
15
|
-
exports.EventSchema = require_schema.EventSchema
|
|
16
|
-
exports.EventsResponseSchema = require_schema.EventsResponseSchema
|
|
17
|
-
exports.ExceptionInterface = require_schema.ExceptionInterface
|
|
18
|
-
exports.FrameInterface = require_schema.FrameInterface
|
|
19
|
-
exports.IssueListSchema = require_schema.IssueListSchema
|
|
20
|
-
exports.IssueSchema = require_schema.IssueSchema
|
|
21
|
-
exports.OrganizationListSchema = require_schema.OrganizationListSchema
|
|
22
|
-
exports.OrganizationSchema = require_schema.OrganizationSchema
|
|
23
|
-
exports.ProjectListSchema = require_schema.ProjectListSchema
|
|
24
|
-
exports.ProjectSchema = require_schema.ProjectSchema
|
|
25
|
-
exports.ReleaseListSchema = require_schema.ReleaseListSchema
|
|
26
|
-
exports.ReleaseSchema = require_schema.ReleaseSchema
|
|
27
|
-
exports.RequestEntrySchema = require_schema.RequestEntrySchema
|
|
28
|
-
exports.SpansSearchResponseSchema = require_schema.SpansSearchResponseSchema
|
|
29
|
-
exports.TagListSchema = require_schema.TagListSchema
|
|
30
|
-
exports.TagSchema = require_schema.TagSchema
|
|
31
|
-
exports.TeamListSchema = require_schema.TeamListSchema
|
|
32
|
-
exports.TeamSchema = require_schema.TeamSchema
|
|
33
|
-
exports.TransactionEventSchema = require_schema.TransactionEventSchema
|
|
34
|
-
exports.UnknownEventSchema = require_schema.UnknownEventSchema
|
|
3
|
+
exports.ApiErrorSchema = require_schema.ApiErrorSchema;
|
|
4
|
+
exports.AutofixRunSchema = require_schema.AutofixRunSchema;
|
|
5
|
+
exports.AutofixRunStateSchema = require_schema.AutofixRunStateSchema;
|
|
6
|
+
exports.AutofixRunStepDefaultSchema = require_schema.AutofixRunStepDefaultSchema;
|
|
7
|
+
exports.AutofixRunStepRootCauseAnalysisSchema = require_schema.AutofixRunStepRootCauseAnalysisSchema;
|
|
8
|
+
exports.AutofixRunStepSchema = require_schema.AutofixRunStepSchema;
|
|
9
|
+
exports.AutofixRunStepSolutionSchema = require_schema.AutofixRunStepSolutionSchema;
|
|
10
|
+
exports.ClientKeyListSchema = require_schema.ClientKeyListSchema;
|
|
11
|
+
exports.ClientKeySchema = require_schema.ClientKeySchema;
|
|
12
|
+
exports.ErrorEntrySchema = require_schema.ErrorEntrySchema;
|
|
13
|
+
exports.ErrorEventSchema = require_schema.ErrorEventSchema;
|
|
14
|
+
exports.ErrorsSearchResponseSchema = require_schema.ErrorsSearchResponseSchema;
|
|
15
|
+
exports.EventSchema = require_schema.EventSchema;
|
|
16
|
+
exports.EventsResponseSchema = require_schema.EventsResponseSchema;
|
|
17
|
+
exports.ExceptionInterface = require_schema.ExceptionInterface;
|
|
18
|
+
exports.FrameInterface = require_schema.FrameInterface;
|
|
19
|
+
exports.IssueListSchema = require_schema.IssueListSchema;
|
|
20
|
+
exports.IssueSchema = require_schema.IssueSchema;
|
|
21
|
+
exports.OrganizationListSchema = require_schema.OrganizationListSchema;
|
|
22
|
+
exports.OrganizationSchema = require_schema.OrganizationSchema;
|
|
23
|
+
exports.ProjectListSchema = require_schema.ProjectListSchema;
|
|
24
|
+
exports.ProjectSchema = require_schema.ProjectSchema;
|
|
25
|
+
exports.ReleaseListSchema = require_schema.ReleaseListSchema;
|
|
26
|
+
exports.ReleaseSchema = require_schema.ReleaseSchema;
|
|
27
|
+
exports.RequestEntrySchema = require_schema.RequestEntrySchema;
|
|
28
|
+
exports.SpansSearchResponseSchema = require_schema.SpansSearchResponseSchema;
|
|
29
|
+
exports.TagListSchema = require_schema.TagListSchema;
|
|
30
|
+
exports.TagSchema = require_schema.TagSchema;
|
|
31
|
+
exports.TeamListSchema = require_schema.TeamListSchema;
|
|
32
|
+
exports.TeamSchema = require_schema.TeamSchema;
|
|
33
|
+
exports.TransactionEventSchema = require_schema.TransactionEventSchema;
|
|
34
|
+
exports.UnknownEventSchema = require_schema.UnknownEventSchema;
|
|
35
|
+
exports.UserRegionsSchema = require_schema.UserRegionsSchema;
|
|
36
|
+
exports.UserSchema = require_schema.UserSchema;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-
|
|
2
|
-
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-DqxkW9Tx.cjs";
|
|
2
|
+
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ApiErrorSchema
|
|
2
|
-
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-C-MLkWMc.js";
|
|
2
|
+
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-CewAKS9A.js";
|
|
2
2
|
|
|
3
|
-
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
3
|
+
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require('../types-
|
|
1
|
+
require('../types-MYBaygjr.cjs');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-
|
|
3
|
-
export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList };
|
|
1
|
+
import "../schema-DqxkW9Tx.cjs";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User } from "../types-CcffrLXB.cjs";
|
|
3
|
+
export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-
|
|
3
|
-
export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList };
|
|
1
|
+
import "../schema-C-MLkWMc.js";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User } from "../types-DuUmV9zh.js";
|
|
3
|
+
export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User };
|
package/dist/api-client/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "../types-
|
|
1
|
+
import "../types-6zHoEWAx.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types-
|
|
1
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList, User } from "./types-CcffrLXB.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api-client/client.d.ts
|
|
4
4
|
declare class ApiError extends Error {
|
|
@@ -23,6 +23,7 @@ declare class SentryApiService {
|
|
|
23
23
|
private request;
|
|
24
24
|
getIssueUrl(organizationSlug: string, issueId: string): string;
|
|
25
25
|
getTraceUrl(organizationSlug: string, traceId: string): string;
|
|
26
|
+
getAuthenticatedUser(opts?: RequestOptions): Promise<User>;
|
|
26
27
|
listOrganizations(opts?: RequestOptions): Promise<OrganizationList>;
|
|
27
28
|
listTeams(organizationSlug: string, opts?: RequestOptions): Promise<TeamList>;
|
|
28
29
|
createTeam({
|
|
@@ -62,10 +63,12 @@ declare class SentryApiService {
|
|
|
62
63
|
}, opts?: RequestOptions): Promise<ClientKeyList>;
|
|
63
64
|
listReleases({
|
|
64
65
|
organizationSlug,
|
|
65
|
-
projectSlug
|
|
66
|
+
projectSlug,
|
|
67
|
+
query
|
|
66
68
|
}: {
|
|
67
69
|
organizationSlug: string;
|
|
68
70
|
projectSlug?: string;
|
|
71
|
+
query?: string;
|
|
69
72
|
}, opts?: RequestOptions): Promise<ReleaseList>;
|
|
70
73
|
listTags({
|
|
71
74
|
organizationSlug,
|
|
@@ -144,8 +147,8 @@ declare class SentryApiService {
|
|
|
144
147
|
sortBy?: "timestamp" | "duration";
|
|
145
148
|
}, opts?: RequestOptions): Promise<{
|
|
146
149
|
timestamp: string;
|
|
147
|
-
transaction: string;
|
|
148
150
|
id: string;
|
|
151
|
+
transaction: string;
|
|
149
152
|
project: string;
|
|
150
153
|
trace: string;
|
|
151
154
|
"span.op": string;
|
|
@@ -170,6 +173,7 @@ declare class SentryApiService {
|
|
|
170
173
|
organizationSlug: string;
|
|
171
174
|
issueId: string;
|
|
172
175
|
}, opts?: RequestOptions): Promise<AutofixRunState>;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
}
|
|
177
|
+
//#endregion
|
|
178
|
+
export { Api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AA,GAAA,OAAA;EAAO,CAAA,EA6BN,IAAA,CAAA,EAcK,cAdL,CAAA,EAcmB,OAdnB,CAAA;IACA,KAAA,EAAA,MAAA;IACA,OAAA,EAAA,MAAA;IACA,KAAA,EAAA,MAAA;IACA,UAAA,EAAA,MAAA,GAAA,MAAA;IACA,SAAA,EAAA,MAAA;IASK,aAAA,EAAA,MAAA;EAAc,CAAA,EAAA,CAAA;EAAA,WA6CnB,CAAA;IAAA,gBAAA;IAAA,WAAA;IAAA,WAAA;IAAA,KAAA;IAAA;EAYmB,CAZnB,EAAA;IACA,gBAAA,EAAA,MAAA;IACA,WAAA,CAAA,EAAA,MAAA;IACA,WAAA,CAAA,EAAA,MAAA;IACA,KAAA,CAAA,EAAA,MAAA;IAQK,MAAA,CAAA,EAAA,WAAA,GAAA,UAAA;EAAc,CAAA,EAAA,IAAA,CAAA,EAAd,cAAc,CAAA,EAAA,OAAA,CAAA;IA6CnB,SAAA,EAAA,MAAA;IACA,EAAA,EAAA,MAAA;IACA,WAAA,EAAA,MAAA;IACA,OAAA,EAAA,MAAA;IAOK,KAAA,EAAA,MAAA;IACE,SAAA,EAAA,MAAA;IAAR,kBAAA,EAAA,MAAA;IAmBC,eAAA,EAAA,MAAA;EAAgB,CAAA,EAChB,CAAA;EAAO,YAKF,CAAA;IAAA,gBAAA;IAAA,OAAA;IAAA,OAAA;IAAA;GAAA,EAAA;IACE,gBAAA,EAAA,MAAA;IAAR,OAAA,EAAA,MAAA;IAAO,OAAA,CAAA,EAAA,MAAA;;YA3BD,iBACN,QAAQ;;;;;;;YAyBF,iBACN,QAAQ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, ErrorsSearchResponseSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, SpansSearchResponseSchema, TagListSchema, TeamListSchema, TeamSchema } from "./schema-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, ErrorsSearchResponseSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, SpansSearchResponseSchema, TagListSchema, TeamListSchema, TeamSchema, UserRegionsSchema, UserSchema } from "./schema-CewAKS9A.js";
|
|
2
2
|
|
|
3
3
|
//#region src/api-client/client.ts
|
|
4
4
|
var ApiError = class extends Error {
|
|
@@ -26,6 +26,7 @@ var SentryApiService = class {
|
|
|
26
26
|
const url = host ? new URL(`/api/0${path}`, `https://${host}`).href : `${this.apiPrefix}${path}`;
|
|
27
27
|
const headers = { "Content-Type": "application/json" };
|
|
28
28
|
if (this.accessToken) headers.Authorization = `Bearer ${this.accessToken}`;
|
|
29
|
+
if (typeof globalThis.fetch === "undefined") throw new Error("fetch is not available. Please use Node.js >= 18 or ensure fetch is available in your environment.");
|
|
29
30
|
const response = await fetch(url, {
|
|
30
31
|
...options,
|
|
31
32
|
headers
|
|
@@ -53,10 +54,18 @@ var SentryApiService = class {
|
|
|
53
54
|
getTraceUrl(organizationSlug, traceId) {
|
|
54
55
|
return this.host !== "sentry.io" ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}` : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;
|
|
55
56
|
}
|
|
56
|
-
async
|
|
57
|
-
const response = await this.request("/
|
|
57
|
+
async getAuthenticatedUser(opts) {
|
|
58
|
+
const response = await this.request("/auth/", void 0, opts);
|
|
58
59
|
const body = await response.json();
|
|
59
|
-
return
|
|
60
|
+
return UserSchema.parse(body);
|
|
61
|
+
}
|
|
62
|
+
async listOrganizations(opts) {
|
|
63
|
+
const regionResponse = await this.request("/users/me/regions/", void 0, opts);
|
|
64
|
+
const regionData = UserRegionsSchema.parse(await regionResponse.json());
|
|
65
|
+
return (await Promise.all(regionData.regions.map(async (region) => this.request(`/organizations/`, void 0, {
|
|
66
|
+
...opts,
|
|
67
|
+
host: new URL(region.url).host
|
|
68
|
+
}).then((response) => response.json())))).map((data) => OrganizationListSchema.parse(data)).reduce((acc, curr) => acc.concat(curr), []);
|
|
60
69
|
}
|
|
61
70
|
async listTeams(organizationSlug, opts) {
|
|
62
71
|
const response = await this.request(`/organizations/${organizationSlug}/teams/`, void 0, opts);
|
|
@@ -96,8 +105,11 @@ var SentryApiService = class {
|
|
|
96
105
|
const response = await this.request(`/projects/${organizationSlug}/${projectSlug}/keys/`, void 0, opts);
|
|
97
106
|
return ClientKeyListSchema.parse(await response.json());
|
|
98
107
|
}
|
|
99
|
-
async listReleases({ organizationSlug, projectSlug }, opts) {
|
|
100
|
-
const
|
|
108
|
+
async listReleases({ organizationSlug, projectSlug, query }, opts) {
|
|
109
|
+
const searchQuery = new URLSearchParams();
|
|
110
|
+
if (query) searchQuery.set("query", query);
|
|
111
|
+
const path = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/releases/` : `/organizations/${organizationSlug}/releases/`;
|
|
112
|
+
const response = await this.request(`${path}${searchQuery.toString()}`, void 0, opts);
|
|
101
113
|
const body = await response.json();
|
|
102
114
|
return ReleaseListSchema.parse(body);
|
|
103
115
|
}
|
|
@@ -209,4 +221,4 @@ var SentryApiService = class {
|
|
|
209
221
|
|
|
210
222
|
//#endregion
|
|
211
223
|
export { ApiError, SentryApiService };
|
|
212
|
-
//# sourceMappingURL=client-
|
|
224
|
+
//# sourceMappingURL=client-D5xFZtxK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-D5xFZtxK.js","names":["message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","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 ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n UserSchema,\n UserRegionsSchema,\n} from \"./schema\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\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\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\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n constructor({\n accessToken = null,\n host = process.env.SENTRY_HOST,\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host || \"sentry.io\";\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? new URL(`/api/0${path}`, `https://${host}`).href\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\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 const response = await fetch(url, {\n ...options,\n headers,\n });\n\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 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 getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`\n : `https://${organizationSlug}.${this.host}/issues/${issueId}`;\n }\n\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`\n : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;\n }\n\n async getAuthenticatedUser(opts?: RequestOptions): Promise<User> {\n const response = await this.request(\"/auth/\", undefined, opts);\n const body = await response.json();\n return UserSchema.parse(body);\n }\n\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n // TODO: Sentry is currently not returning all orgs without hitting region endpoints\n const regionResponse = await this.request(\n \"/users/me/regions/\",\n undefined,\n opts,\n );\n const regionData = UserRegionsSchema.parse(await regionResponse.json());\n\n return (\n await Promise.all(\n regionData.regions.map(async (region) =>\n this.request(`/organizations/`, undefined, {\n ...opts,\n host: new URL(region.url).host,\n }).then((response) => response.json()),\n ),\n )\n )\n .map((data) => OrganizationListSchema.parse(data))\n .reduce((acc, curr) => acc.concat(curr), []);\n }\n\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\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 response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\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 response = await this.request(\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(await response.json());\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 response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(await response.json());\n }\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 response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(await response.json());\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 response = await this.request(\n `${path}${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\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 response = await this.request(\n `/organizations/${organizationSlug}/tags/${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TagListSchema.parse(body);\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 response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\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 response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\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 response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\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 // 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 response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\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 response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\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 response = await this.request(\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 const body = await response.json();\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 response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;AA0CA,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEA,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EAbZ;CAcR;AACF;AAMD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;CAEV,YAAY,EAC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