@bun913/mcp-testrail 0.11.4
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/LICENSE +21 -0
- package/README.md +101 -0
- package/dist/client/api/baseClient.d.ts +39 -0
- package/dist/client/api/baseClient.js +103 -0
- package/dist/client/api/baseClient.js.map +1 -0
- package/dist/client/api/cases.d.ts +102 -0
- package/dist/client/api/cases.js +200 -0
- package/dist/client/api/cases.js.map +1 -0
- package/dist/client/api/index.d.ts +39 -0
- package/dist/client/api/index.js +50 -0
- package/dist/client/api/index.js.map +1 -0
- package/dist/client/api/milestones.d.ts +12 -0
- package/dist/client/api/milestones.js +22 -0
- package/dist/client/api/milestones.js.map +1 -0
- package/dist/client/api/plans.d.ts +12 -0
- package/dist/client/api/plans.js +20 -0
- package/dist/client/api/plans.js.map +1 -0
- package/dist/client/api/projects.d.ts +12 -0
- package/dist/client/api/projects.js +31 -0
- package/dist/client/api/projects.js.map +1 -0
- package/dist/client/api/results.d.ts +56 -0
- package/dist/client/api/results.js +125 -0
- package/dist/client/api/results.js.map +1 -0
- package/dist/client/api/runs.d.ts +40 -0
- package/dist/client/api/runs.js +79 -0
- package/dist/client/api/runs.js.map +1 -0
- package/dist/client/api/sections.d.ts +40 -0
- package/dist/client/api/sections.js +89 -0
- package/dist/client/api/sections.js.map +1 -0
- package/dist/client/api/sharedSteps.d.ts +11 -0
- package/dist/client/api/sharedSteps.js +20 -0
- package/dist/client/api/sharedSteps.js.map +1 -0
- package/dist/client/api/suites.d.ts +36 -0
- package/dist/client/api/suites.js +63 -0
- package/dist/client/api/suites.js.map +1 -0
- package/dist/client/api/tests.d.ts +32 -0
- package/dist/client/api/tests.js +47 -0
- package/dist/client/api/tests.js.map +1 -0
- package/dist/client/api/utils.d.ts +7 -0
- package/dist/client/api/utils.js +24 -0
- package/dist/client/api/utils.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/server/api/cases.d.ts +8 -0
- package/dist/server/api/cases.js +431 -0
- package/dist/server/api/cases.js.map +1 -0
- package/dist/server/api/index.d.ts +18 -0
- package/dist/server/api/index.js +40 -0
- package/dist/server/api/index.js.map +1 -0
- package/dist/server/api/milestones.d.ts +8 -0
- package/dist/server/api/milestones.js +29 -0
- package/dist/server/api/milestones.js.map +1 -0
- package/dist/server/api/plans.d.ts +8 -0
- package/dist/server/api/plans.js +29 -0
- package/dist/server/api/plans.js.map +1 -0
- package/dist/server/api/projects.d.ts +8 -0
- package/dist/server/api/projects.js +51 -0
- package/dist/server/api/projects.js.map +1 -0
- package/dist/server/api/results.d.ts +8 -0
- package/dist/server/api/results.js +164 -0
- package/dist/server/api/results.js.map +1 -0
- package/dist/server/api/runs.d.ts +8 -0
- package/dist/server/api/runs.js +113 -0
- package/dist/server/api/runs.js.map +1 -0
- package/dist/server/api/sections.d.ts +8 -0
- package/dist/server/api/sections.js +138 -0
- package/dist/server/api/sections.js.map +1 -0
- package/dist/server/api/sharedSteps.d.ts +8 -0
- package/dist/server/api/sharedSteps.js +26 -0
- package/dist/server/api/sharedSteps.js.map +1 -0
- package/dist/server/api/suites.d.ts +8 -0
- package/dist/server/api/suites.js +111 -0
- package/dist/server/api/suites.js.map +1 -0
- package/dist/server/api/tests.d.ts +8 -0
- package/dist/server/api/tests.js +68 -0
- package/dist/server/api/tests.js.map +1 -0
- package/dist/server/api/utils.d.ts +7 -0
- package/dist/server/api/utils.js +25 -0
- package/dist/server/api/utils.js.map +1 -0
- package/dist/server/server.d.ts +2 -0
- package/dist/server/server.js +70 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/templates.d.ts +8 -0
- package/dist/server/templates.js +43 -0
- package/dist/server/templates.js.map +1 -0
- package/dist/shared/schemas/cases.d.ts +668 -0
- package/dist/shared/schemas/cases.js +178 -0
- package/dist/shared/schemas/cases.js.map +1 -0
- package/dist/shared/schemas/common.d.ts +117 -0
- package/dist/shared/schemas/common.js +50 -0
- package/dist/shared/schemas/common.js.map +1 -0
- package/dist/shared/schemas/index.d.ts +10 -0
- package/dist/shared/schemas/index.js +23 -0
- package/dist/shared/schemas/index.js.map +1 -0
- package/dist/shared/schemas/milestones.d.ts +59 -0
- package/dist/shared/schemas/milestones.js +26 -0
- package/dist/shared/schemas/milestones.js.map +1 -0
- package/dist/shared/schemas/plans.d.ts +416 -0
- package/dist/shared/schemas/plans.js +43 -0
- package/dist/shared/schemas/plans.js.map +1 -0
- package/dist/shared/schemas/projects.d.ts +135 -0
- package/dist/shared/schemas/projects.js +61 -0
- package/dist/shared/schemas/projects.js.map +1 -0
- package/dist/shared/schemas/results.d.ts +407 -0
- package/dist/shared/schemas/results.js +178 -0
- package/dist/shared/schemas/results.js.map +1 -0
- package/dist/shared/schemas/runs.d.ts +267 -0
- package/dist/shared/schemas/runs.js +133 -0
- package/dist/shared/schemas/runs.js.map +1 -0
- package/dist/shared/schemas/sections.d.ts +136 -0
- package/dist/shared/schemas/sections.js +68 -0
- package/dist/shared/schemas/sections.js.map +1 -0
- package/dist/shared/schemas/sharedSteps.d.ts +135 -0
- package/dist/shared/schemas/sharedSteps.js +65 -0
- package/dist/shared/schemas/sharedSteps.js.map +1 -0
- package/dist/shared/schemas/suites.d.ts +120 -0
- package/dist/shared/schemas/suites.js +44 -0
- package/dist/shared/schemas/suites.js.map +1 -0
- package/dist/shared/schemas/tests.d.ts +87 -0
- package/dist/shared/schemas/tests.js +52 -0
- package/dist/shared/schemas/tests.js.map +1 -0
- package/dist/sse.d.ts +1 -0
- package/dist/sse.js +5 -0
- package/dist/sse.js.map +1 -0
- package/dist/stdio.d.ts +1 -0
- package/dist/stdio.js +52 -0
- package/dist/stdio.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const sharedStepItemSchema: z.ZodObject<{
|
|
3
|
+
content: z.ZodString;
|
|
4
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
5
|
+
additionalInfo: z.ZodOptional<z.ZodString>;
|
|
6
|
+
refs: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
content: string;
|
|
9
|
+
expected?: string | undefined;
|
|
10
|
+
additionalInfo?: string | undefined;
|
|
11
|
+
refs?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
content: string;
|
|
14
|
+
expected?: string | undefined;
|
|
15
|
+
additionalInfo?: string | undefined;
|
|
16
|
+
refs?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const getSharedStepsSchema: {
|
|
19
|
+
projectId: z.ZodNumber;
|
|
20
|
+
createdAfter: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
createdBefore: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
updatedAfter: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
updatedBefore: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
updatedBy: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
};
|
|
29
|
+
export declare const GetSharedStepsInput: z.ZodObject<{
|
|
30
|
+
projectId: z.ZodNumber;
|
|
31
|
+
createdAfter: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
createdBefore: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
updatedAfter: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
updatedBefore: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
updatedBy: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
projectId: number;
|
|
41
|
+
createdAfter?: number | undefined;
|
|
42
|
+
createdBefore?: number | undefined;
|
|
43
|
+
createdBy?: number | undefined;
|
|
44
|
+
updatedAfter?: number | undefined;
|
|
45
|
+
updatedBefore?: number | undefined;
|
|
46
|
+
updatedBy?: number | undefined;
|
|
47
|
+
limit?: number | undefined;
|
|
48
|
+
offset?: number | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
projectId: number;
|
|
51
|
+
createdAfter?: number | undefined;
|
|
52
|
+
createdBefore?: number | undefined;
|
|
53
|
+
createdBy?: number | undefined;
|
|
54
|
+
updatedAfter?: number | undefined;
|
|
55
|
+
updatedBefore?: number | undefined;
|
|
56
|
+
updatedBy?: number | undefined;
|
|
57
|
+
limit?: number | undefined;
|
|
58
|
+
offset?: number | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
export type GetSharedStepsInputType = z.infer<typeof GetSharedStepsInput>;
|
|
61
|
+
export type SharedStepItemType = z.infer<typeof sharedStepItemSchema>;
|
|
62
|
+
export declare const TestRailSharedStepItemSchema: z.ZodObject<{
|
|
63
|
+
content: z.ZodString;
|
|
64
|
+
additional_info: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
expected: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
|
+
refs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
content: string;
|
|
69
|
+
expected?: string | null | undefined;
|
|
70
|
+
refs?: string | null | undefined;
|
|
71
|
+
additional_info?: string | null | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
content: string;
|
|
74
|
+
expected?: string | null | undefined;
|
|
75
|
+
refs?: string | null | undefined;
|
|
76
|
+
additional_info?: string | null | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
export type TestRailSharedStepItem = z.infer<typeof TestRailSharedStepItemSchema>;
|
|
79
|
+
export declare const TestRailSharedStepSchema: z.ZodObject<{
|
|
80
|
+
id: z.ZodNumber;
|
|
81
|
+
title: z.ZodString;
|
|
82
|
+
project_id: z.ZodNumber;
|
|
83
|
+
created_by: z.ZodNumber;
|
|
84
|
+
created_on: z.ZodNumber;
|
|
85
|
+
updated_by: z.ZodNumber;
|
|
86
|
+
updated_on: z.ZodNumber;
|
|
87
|
+
custom_steps_separated: z.ZodArray<z.ZodObject<{
|
|
88
|
+
content: z.ZodString;
|
|
89
|
+
additional_info: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
expected: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
+
refs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
content: string;
|
|
94
|
+
expected?: string | null | undefined;
|
|
95
|
+
refs?: string | null | undefined;
|
|
96
|
+
additional_info?: string | null | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
content: string;
|
|
99
|
+
expected?: string | null | undefined;
|
|
100
|
+
refs?: string | null | undefined;
|
|
101
|
+
additional_info?: string | null | undefined;
|
|
102
|
+
}>, "many">;
|
|
103
|
+
case_ids: z.ZodArray<z.ZodNumber, "many">;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
id: number;
|
|
106
|
+
title: string;
|
|
107
|
+
project_id: number;
|
|
108
|
+
created_by: number;
|
|
109
|
+
created_on: number;
|
|
110
|
+
updated_by: number;
|
|
111
|
+
updated_on: number;
|
|
112
|
+
custom_steps_separated: {
|
|
113
|
+
content: string;
|
|
114
|
+
expected?: string | null | undefined;
|
|
115
|
+
refs?: string | null | undefined;
|
|
116
|
+
additional_info?: string | null | undefined;
|
|
117
|
+
}[];
|
|
118
|
+
case_ids: number[];
|
|
119
|
+
}, {
|
|
120
|
+
id: number;
|
|
121
|
+
title: string;
|
|
122
|
+
project_id: number;
|
|
123
|
+
created_by: number;
|
|
124
|
+
created_on: number;
|
|
125
|
+
updated_by: number;
|
|
126
|
+
updated_on: number;
|
|
127
|
+
custom_steps_separated: {
|
|
128
|
+
content: string;
|
|
129
|
+
expected?: string | null | undefined;
|
|
130
|
+
refs?: string | null | undefined;
|
|
131
|
+
additional_info?: string | null | undefined;
|
|
132
|
+
}[];
|
|
133
|
+
case_ids: number[];
|
|
134
|
+
}>;
|
|
135
|
+
export type TestRailSharedStep = z.infer<typeof TestRailSharedStepSchema>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Schema for shared step item
|
|
3
|
+
export const sharedStepItemSchema = z.object({
|
|
4
|
+
content: z.string().describe("Step content"),
|
|
5
|
+
expected: z.string().optional().describe("Expected result"),
|
|
6
|
+
additionalInfo: z.string().optional().describe("Additional information"),
|
|
7
|
+
refs: z.string().optional().describe("References"),
|
|
8
|
+
});
|
|
9
|
+
// Schema for retrieving all shared steps for a project
|
|
10
|
+
export const getSharedStepsSchema = {
|
|
11
|
+
projectId: z.number().describe("TestRail Project ID"),
|
|
12
|
+
createdAfter: z
|
|
13
|
+
.number()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("Only return shared steps created after this timestamp"),
|
|
16
|
+
createdBefore: z
|
|
17
|
+
.number()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("Only return shared steps created before this timestamp"),
|
|
20
|
+
createdBy: z
|
|
21
|
+
.number()
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("Only return shared steps created by this user ID"),
|
|
24
|
+
updatedAfter: z
|
|
25
|
+
.number()
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Only return shared steps updated after this timestamp"),
|
|
28
|
+
updatedBefore: z
|
|
29
|
+
.number()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("Only return shared steps updated before this timestamp"),
|
|
32
|
+
updatedBy: z
|
|
33
|
+
.number()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("Only return shared steps last updated by this user ID"),
|
|
36
|
+
limit: z
|
|
37
|
+
.number()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe("The number of shared steps to return per page"),
|
|
40
|
+
offset: z
|
|
41
|
+
.number()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("The offset to start returning shared steps"),
|
|
44
|
+
};
|
|
45
|
+
// Create Zod objects from each schema
|
|
46
|
+
export const GetSharedStepsInput = z.object(getSharedStepsSchema);
|
|
47
|
+
// Response schema definitions
|
|
48
|
+
export const TestRailSharedStepItemSchema = z.object({
|
|
49
|
+
content: z.string(),
|
|
50
|
+
additional_info: z.string().nullable().optional(),
|
|
51
|
+
expected: z.string().nullable().optional(),
|
|
52
|
+
refs: z.string().nullable().optional(),
|
|
53
|
+
});
|
|
54
|
+
export const TestRailSharedStepSchema = z.object({
|
|
55
|
+
id: z.number(),
|
|
56
|
+
title: z.string(),
|
|
57
|
+
project_id: z.number(),
|
|
58
|
+
created_by: z.number(),
|
|
59
|
+
created_on: z.number(),
|
|
60
|
+
updated_by: z.number(),
|
|
61
|
+
updated_on: z.number(),
|
|
62
|
+
custom_steps_separated: z.array(TestRailSharedStepItemSchema),
|
|
63
|
+
case_ids: z.array(z.number()),
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=sharedSteps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedSteps.js","sourceRoot":"","sources":["../../../src/shared/schemas/sharedSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8BAA8B;AAC9B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IAC3D,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IACxE,IAAI,EA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CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAKH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,4BAA4B,CAAC;IAC7D,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC7B,CAAC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const getSuitesSchema: z.ZodObject<{
|
|
3
|
+
projectId: z.ZodNumber;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
projectId: number;
|
|
6
|
+
}, {
|
|
7
|
+
projectId: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const getSuiteSchema: z.ZodObject<{
|
|
10
|
+
suiteId: z.ZodNumber;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
suiteId: number;
|
|
13
|
+
}, {
|
|
14
|
+
suiteId: number;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const addSuiteSchema: z.ZodObject<{
|
|
17
|
+
projectId: z.ZodNumber;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
projectId: number;
|
|
22
|
+
name: string;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
projectId: number;
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const updateSuiteSchema: z.ZodObject<{
|
|
30
|
+
suiteId: z.ZodNumber;
|
|
31
|
+
name: z.ZodOptional<z.ZodString>;
|
|
32
|
+
description: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
suiteId: number;
|
|
35
|
+
name?: string | undefined;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
suiteId: number;
|
|
39
|
+
name?: string | undefined;
|
|
40
|
+
description?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const getSuitesInputSchema: z.ZodObject<{
|
|
43
|
+
projectId: z.ZodNumber;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
projectId: number;
|
|
46
|
+
}, {
|
|
47
|
+
projectId: number;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const getSuiteInputSchema: z.ZodObject<{
|
|
50
|
+
suiteId: z.ZodNumber;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
suiteId: number;
|
|
53
|
+
}, {
|
|
54
|
+
suiteId: number;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const addSuiteInputSchema: z.ZodObject<{
|
|
57
|
+
projectId: z.ZodNumber;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
description: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
projectId: number;
|
|
62
|
+
name: string;
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
projectId: number;
|
|
66
|
+
name: string;
|
|
67
|
+
description?: string | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
export declare const updateSuiteInputSchema: z.ZodObject<{
|
|
70
|
+
suiteId: z.ZodNumber;
|
|
71
|
+
name: z.ZodOptional<z.ZodString>;
|
|
72
|
+
description: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
suiteId: number;
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
description?: string | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
suiteId: number;
|
|
79
|
+
name?: string | undefined;
|
|
80
|
+
description?: string | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
export type GetSuitesInput = z.infer<typeof getSuitesInputSchema>;
|
|
83
|
+
export type GetSuiteInput = z.infer<typeof getSuiteInputSchema>;
|
|
84
|
+
export type AddSuiteInput = z.infer<typeof addSuiteInputSchema>;
|
|
85
|
+
export type UpdateSuiteInput = z.infer<typeof updateSuiteInputSchema>;
|
|
86
|
+
/**
|
|
87
|
+
* TestRail API Response for Suite
|
|
88
|
+
*/
|
|
89
|
+
export declare const TestRailSuiteSchema: z.ZodObject<{
|
|
90
|
+
id: z.ZodNumber;
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
description: z.ZodNullable<z.ZodString>;
|
|
93
|
+
project_id: z.ZodNumber;
|
|
94
|
+
is_master: z.ZodBoolean;
|
|
95
|
+
is_baseline: z.ZodBoolean;
|
|
96
|
+
is_completed: z.ZodBoolean;
|
|
97
|
+
completed_on: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
url: z.ZodString;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
url: string;
|
|
101
|
+
name: string;
|
|
102
|
+
is_completed: boolean;
|
|
103
|
+
id: number;
|
|
104
|
+
completed_on: number | null;
|
|
105
|
+
description: string | null;
|
|
106
|
+
project_id: number;
|
|
107
|
+
is_master: boolean;
|
|
108
|
+
is_baseline: boolean;
|
|
109
|
+
}, {
|
|
110
|
+
url: string;
|
|
111
|
+
name: string;
|
|
112
|
+
is_completed: boolean;
|
|
113
|
+
id: number;
|
|
114
|
+
completed_on: number | null;
|
|
115
|
+
description: string | null;
|
|
116
|
+
project_id: number;
|
|
117
|
+
is_master: boolean;
|
|
118
|
+
is_baseline: boolean;
|
|
119
|
+
}>;
|
|
120
|
+
export type TestRailSuite = z.infer<typeof TestRailSuiteSchema>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Schema for retrieving all suites in a project
|
|
3
|
+
export const getSuitesSchema = z.object({
|
|
4
|
+
projectId: z.number().describe("TestRail Project ID"),
|
|
5
|
+
});
|
|
6
|
+
// Schema for retrieving a specific suite
|
|
7
|
+
export const getSuiteSchema = z.object({
|
|
8
|
+
suiteId: z.number().describe("TestRail Suite ID"),
|
|
9
|
+
});
|
|
10
|
+
// Schema for adding a suite
|
|
11
|
+
export const addSuiteSchema = z.object({
|
|
12
|
+
projectId: z.number().describe("TestRail Project ID"),
|
|
13
|
+
name: z.string().describe("Name of the suite"),
|
|
14
|
+
description: z.string().optional().describe("Description of the suite"),
|
|
15
|
+
});
|
|
16
|
+
// Schema for updating a suite
|
|
17
|
+
export const updateSuiteSchema = z.object({
|
|
18
|
+
suiteId: z.number().describe("TestRail Suite ID"),
|
|
19
|
+
name: z.string().optional().describe("Name of the suite"),
|
|
20
|
+
description: z.string().optional().describe("Description of the suite"),
|
|
21
|
+
});
|
|
22
|
+
// Create Zod objects from each schema
|
|
23
|
+
export const getSuitesInputSchema = getSuitesSchema;
|
|
24
|
+
export const getSuiteInputSchema = getSuiteSchema;
|
|
25
|
+
export const addSuiteInputSchema = addSuiteSchema;
|
|
26
|
+
export const updateSuiteInputSchema = updateSuiteSchema;
|
|
27
|
+
// -----------------------------------------------
|
|
28
|
+
// Response schema definitions migrated from types.ts
|
|
29
|
+
// -----------------------------------------------
|
|
30
|
+
/**
|
|
31
|
+
* TestRail API Response for Suite
|
|
32
|
+
*/
|
|
33
|
+
export const TestRailSuiteSchema = z.object({
|
|
34
|
+
id: z.number(),
|
|
35
|
+
name: z.string(),
|
|
36
|
+
description: z.string().nullable(),
|
|
37
|
+
project_id: z.number(),
|
|
38
|
+
is_master: z.boolean(),
|
|
39
|
+
is_baseline: z.boolean(),
|
|
40
|
+
is_completed: z.boolean(),
|
|
41
|
+
completed_on: z.number().nullable(),
|
|
42
|
+
url: z.string(),
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=suites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suites.js","sourceRoot":"","sources":["../../../src/shared/schemas/suites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gDAAgD;AAChD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACrD,CAAC,CAAC;AAEH,yCAAyC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CACjD,CAAC,CAAC;AAEH,4BAA4B;AAC5B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACrD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;CACvE,CAAC,CAAC;AAEH,8BAA8B;AAC9B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,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ZodNumber>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
runId: number;
|
|
8
|
+
limit?: number | undefined;
|
|
9
|
+
offset?: number | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
runId: number;
|
|
12
|
+
limit?: number | undefined;
|
|
13
|
+
offset?: number | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const getTestSchema: z.ZodObject<{
|
|
16
|
+
testId: z.ZodNumber;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
testId: number;
|
|
19
|
+
}, {
|
|
20
|
+
testId: number;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const getTestsInputSchema: z.ZodObject<{
|
|
23
|
+
runId: z.ZodNumber;
|
|
24
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
runId: number;
|
|
28
|
+
limit?: number | undefined;
|
|
29
|
+
offset?: number | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
runId: number;
|
|
32
|
+
limit?: number | undefined;
|
|
33
|
+
offset?: number | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const getTestInputSchema: z.ZodObject<{
|
|
36
|
+
testId: z.ZodNumber;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
testId: number;
|
|
39
|
+
}, {
|
|
40
|
+
testId: number;
|
|
41
|
+
}>;
|
|
42
|
+
export type GetTestsInput = z.infer<typeof getTestsInputSchema>;
|
|
43
|
+
export type GetTestInput = z.infer<typeof getTestInputSchema>;
|
|
44
|
+
/**
|
|
45
|
+
* TestRail API Response for Suite
|
|
46
|
+
*/
|
|
47
|
+
export declare const TestRailTestSchema: z.ZodObject<{
|
|
48
|
+
assignedto_id: z.ZodNumber;
|
|
49
|
+
case_id: z.ZodNumber;
|
|
50
|
+
estimate: z.ZodString;
|
|
51
|
+
estimate_forecast: z.ZodString;
|
|
52
|
+
id: z.ZodNumber;
|
|
53
|
+
milestone_id: z.ZodNumber;
|
|
54
|
+
priority_id: z.ZodNumber;
|
|
55
|
+
refs: z.ZodString;
|
|
56
|
+
run_id: z.ZodNumber;
|
|
57
|
+
status_id: z.ZodNumber;
|
|
58
|
+
title: z.ZodString;
|
|
59
|
+
type_id: z.ZodNumber;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
id: number;
|
|
62
|
+
refs: string;
|
|
63
|
+
title: string;
|
|
64
|
+
estimate: string;
|
|
65
|
+
type_id: number;
|
|
66
|
+
priority_id: number;
|
|
67
|
+
milestone_id: number;
|
|
68
|
+
estimate_forecast: string;
|
|
69
|
+
status_id: number;
|
|
70
|
+
case_id: number;
|
|
71
|
+
assignedto_id: number;
|
|
72
|
+
run_id: number;
|
|
73
|
+
}, {
|
|
74
|
+
id: number;
|
|
75
|
+
refs: string;
|
|
76
|
+
title: string;
|
|
77
|
+
estimate: string;
|
|
78
|
+
type_id: number;
|
|
79
|
+
priority_id: number;
|
|
80
|
+
milestone_id: number;
|
|
81
|
+
estimate_forecast: string;
|
|
82
|
+
status_id: number;
|
|
83
|
+
case_id: number;
|
|
84
|
+
assignedto_id: number;
|
|
85
|
+
run_id: number;
|
|
86
|
+
}>;
|
|
87
|
+
export type TestRailTest = z.infer<typeof TestRailTestSchema>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Schema for retrieving all tests in a run
|
|
3
|
+
export const getTestsSchema = z.object({
|
|
4
|
+
runId: z.number().describe("TestRail Run ID"),
|
|
5
|
+
offset: z.number().optional().describe("The offset to start returning tests"),
|
|
6
|
+
limit: z
|
|
7
|
+
.number()
|
|
8
|
+
.optional()
|
|
9
|
+
.describe("The number of tests to return per page"),
|
|
10
|
+
});
|
|
11
|
+
// Schema for retrieving a specific test
|
|
12
|
+
export const getTestSchema = z.object({
|
|
13
|
+
testId: z.number().describe("TestRail Test ID"),
|
|
14
|
+
});
|
|
15
|
+
// Create Zod objects from each schema
|
|
16
|
+
export const getTestsInputSchema = getTestsSchema;
|
|
17
|
+
export const getTestInputSchema = getTestSchema;
|
|
18
|
+
// -----------------------------------------------
|
|
19
|
+
// Response schema definitions migrated from types.ts
|
|
20
|
+
// -----------------------------------------------
|
|
21
|
+
/**
|
|
22
|
+
* TestRail API Response for Suite
|
|
23
|
+
*/
|
|
24
|
+
export const TestRailTestSchema = z.object({
|
|
25
|
+
assignedto_id: z
|
|
26
|
+
.number()
|
|
27
|
+
.describe("The ID of the user the test is assigned to"),
|
|
28
|
+
case_id: z.number().describe("The ID of the related test case"),
|
|
29
|
+
estimate: z
|
|
30
|
+
.string()
|
|
31
|
+
.describe("The estimate of the related test case, e.g. '30s' or '1m 45s'"),
|
|
32
|
+
estimate_forecast: z
|
|
33
|
+
.string()
|
|
34
|
+
.describe("The estimated forecast of the related test case, e.g. '30s' or '1m 45s'"),
|
|
35
|
+
id: z.number().describe("The unique ID of the test"),
|
|
36
|
+
milestone_id: z
|
|
37
|
+
.number()
|
|
38
|
+
.describe("The ID of the milestone that is linked to the test case"),
|
|
39
|
+
priority_id: z
|
|
40
|
+
.number()
|
|
41
|
+
.describe("The ID of the priority that is linked to the test case"),
|
|
42
|
+
refs: z
|
|
43
|
+
.string()
|
|
44
|
+
.describe("A comma-separated list of references/requirements that are linked to the test case"),
|
|
45
|
+
run_id: z.number().describe("The ID of the test run the test belongs to"),
|
|
46
|
+
status_id: z.number().describe("The ID of the current status of the test"),
|
|
47
|
+
title: z.string().describe("The title of the related test case"),
|
|
48
|
+
type_id: z
|
|
49
|
+
.number()
|
|
50
|
+
.describe("The ID of the test case type that is linked to the test case"),
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=tests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests.js","sourceRoot":"","sources":["../../../src/shared/schemas/tests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EA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AC;IACrE,WAAW,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,CAAC,wDAAwD,CAAC;IACpE,IAAI,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,CACR,oFAAoF,CACpF;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;IACzE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC1E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IAChE,OAAO,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CAAC,8DAA8D,CAAC;CAC1E,CAAC,CAAC"}
|
package/dist/sse.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/sse.js
ADDED
package/dist/sse.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sse.js","sourceRoot":"","sources":["../src/sse.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,YAAY;AACZ,WAAW,EAAE,CAAC"}
|
package/dist/stdio.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "dotenv/config";
|
package/dist/stdio.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import "dotenv/config";
|
|
4
|
+
import { TestRailClient } from "./client/api/index.js";
|
|
5
|
+
import { registerAllTools } from "./server/api/index.js";
|
|
6
|
+
// Validate TestRail configuration
|
|
7
|
+
if (!process.env.TESTRAIL_URL ||
|
|
8
|
+
!process.env.TESTRAIL_USERNAME ||
|
|
9
|
+
!process.env.TESTRAIL_API_KEY) {
|
|
10
|
+
throw new Error("TESTRAIL_URL, TESTRAIL_USERNAME, and TESTRAIL_API_KEY must be set");
|
|
11
|
+
}
|
|
12
|
+
// Correct URL format: https://example.testrail.com/index.php?/
|
|
13
|
+
const url = process.env.TESTRAIL_URL;
|
|
14
|
+
const baseURL = url.endsWith("/index.php?/")
|
|
15
|
+
? url
|
|
16
|
+
: url.endsWith("/")
|
|
17
|
+
? `${url}index.php?/`
|
|
18
|
+
: `${url}/index.php?/`;
|
|
19
|
+
// TestRail client configuration
|
|
20
|
+
const testRailConfig = {
|
|
21
|
+
baseURL: baseURL,
|
|
22
|
+
auth: {
|
|
23
|
+
username: process.env.TESTRAIL_USERNAME,
|
|
24
|
+
password: process.env.TESTRAIL_API_KEY,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
// Initialize TestRail client
|
|
28
|
+
const testRailClient = new TestRailClient(testRailConfig);
|
|
29
|
+
// Create McpServer
|
|
30
|
+
const server = new McpServer({
|
|
31
|
+
name: "TestRail MCP Server",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
});
|
|
34
|
+
// Register all API tools
|
|
35
|
+
registerAllTools(server, testRailClient);
|
|
36
|
+
// Main execution
|
|
37
|
+
const main = async () => {
|
|
38
|
+
try {
|
|
39
|
+
console.error("Starting TestRail MCP Server (stdio mode)...");
|
|
40
|
+
// Create and connect transport
|
|
41
|
+
const transport = new StdioServerTransport();
|
|
42
|
+
await server.connect(transport);
|
|
43
|
+
console.error("TestRail MCP Server connected via stdio");
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
console.error("Error starting TestRail MCP Server:", error);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
// Run the server
|
|
51
|
+
main();
|
|
52
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../src/stdio.ts"],"names":[],"mappings":"AA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AAiB;AACjB,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;IACvB,IAAI,CAAC;QACJ,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAE9D,+BAA+B;QAC/B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAEhC,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;AACF,CAAC,CAAC;AAEF,iBAAiB;AACjB,IAAI,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bun913/mcp-testrail",
|
|
3
|
+
"author": "bun913",
|
|
4
|
+
"homepage": "https://github.com/bun913/mcp-testrail",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"version": "0.11.4",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"start": "node dist/sse.js",
|
|
19
|
+
"start:stdio": "node dist/stdio.js",
|
|
20
|
+
"format": "biome format --write ./src",
|
|
21
|
+
"test": "vitest ./test --reporter=verbose --coverage",
|
|
22
|
+
"test:ci": "vitest run ./test --silent --coverage --reporter=verbose",
|
|
23
|
+
"start:fastmcp": "fastmcp dev src/index.ts",
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"prepublishOnly": "npm run build",
|
|
26
|
+
"debug": "node scripts/debug.js"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@modelcontextprotocol/inspector": "^0.7.0",
|
|
30
|
+
"@types/express": "^5.0.1",
|
|
31
|
+
"@types/node": "^22.13.14",
|
|
32
|
+
"@vitest/coverage-v8": "^3.0.9",
|
|
33
|
+
"typescript": "~5.7.2",
|
|
34
|
+
"vitest": "^3.0.9"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@biomejs/biome": "^1.9.4",
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.8.0",
|
|
39
|
+
"axios": "^1.8.4",
|
|
40
|
+
"dotenv": "^16.4.5",
|
|
41
|
+
"fastmcp": "^1.20.5",
|
|
42
|
+
"form-data": "^4.0.0",
|
|
43
|
+
"zod": "^3.24.2"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=20.18.1 <=22.14.0"
|
|
47
|
+
}
|
|
48
|
+
}
|