@uarlouski/testrail-mcp-server 1.11.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +24 -11
  2. package/dist/client/testrail.js +47 -0
  3. package/dist/index.js +14 -55
  4. package/dist/tools/{add_case.js → cases/add_case.js} +2 -1
  5. package/dist/tools/{get_case.js → cases/get_case.js} +3 -2
  6. package/dist/tools/{get_case_fields.js → cases/get_case_fields.js} +5 -3
  7. package/dist/tools/{get_cases.js → cases/get_cases.js} +2 -1
  8. package/dist/tools/cases/index.js +14 -0
  9. package/dist/tools/cases/types.js +40 -0
  10. package/dist/tools/{update_case.js → cases/update_case.js} +2 -1
  11. package/dist/tools/{update_cases.js → cases/update_cases.js} +2 -1
  12. package/dist/tools/commons/delete_entity.js +24 -0
  13. package/dist/tools/commons/get_configurations.js +17 -0
  14. package/dist/tools/{get_labels.js → commons/get_labels.js} +2 -1
  15. package/dist/tools/{get_priorities.js → commons/get_priorities.js} +2 -1
  16. package/dist/tools/{get_statuses.js → commons/get_statuses.js} +2 -1
  17. package/dist/tools/{get_templates.js → commons/get_templates.js} +2 -1
  18. package/dist/tools/{get_tests.js → commons/get_tests.js} +2 -1
  19. package/dist/tools/{get_users.js → commons/get_users.js} +2 -1
  20. package/dist/tools/commons/index.js +18 -0
  21. package/dist/tools/commons/types.js +49 -0
  22. package/dist/tools/projects/index.js +4 -0
  23. package/dist/tools/projects/query_project.js +29 -0
  24. package/dist/tools/projects/types.js +14 -0
  25. package/dist/tools/registry.js +46 -0
  26. package/dist/tools/{add_results.js → results/add_results.js} +2 -1
  27. package/dist/tools/{add_results_for_cases.js → results/add_results_for_cases.js} +2 -1
  28. package/dist/tools/results/get_results.js +18 -0
  29. package/dist/tools/results/index.js +8 -0
  30. package/dist/tools/results/types.js +8 -0
  31. package/dist/tools/{add_attachment_to_run.js → runs/add_attachment_to_run.js} +2 -1
  32. package/dist/tools/runs/index.js +8 -0
  33. package/dist/tools/runs/mutate_run.js +40 -0
  34. package/dist/tools/runs/query_run.js +35 -0
  35. package/dist/tools/runs/types.js +43 -0
  36. package/dist/tools/{get_sections.js → sections/get_sections.js} +2 -1
  37. package/dist/tools/sections/index.js +6 -0
  38. package/dist/tools/sections/mutate_section.js +25 -0
  39. package/dist/tools/sections/types.js +21 -0
  40. package/dist/tools/shared_steps/add_shared_step.js +2 -1
  41. package/dist/tools/shared_steps/get_shared_step.js +2 -1
  42. package/dist/tools/shared_steps/get_shared_step_history.js +2 -1
  43. package/dist/tools/shared_steps/get_shared_steps.js +2 -1
  44. package/dist/tools/shared_steps/index.js +12 -0
  45. package/dist/tools/shared_steps/types.js +18 -0
  46. package/dist/tools/shared_steps/update_shared_step.js +2 -1
  47. package/dist/tools/suites/index.js +6 -0
  48. package/dist/tools/suites/mutate_suite.js +25 -0
  49. package/dist/tools/suites/query_suite.js +28 -0
  50. package/dist/tools/suites/types.js +28 -0
  51. package/dist/utils/mutate_handler.js +22 -0
  52. package/dist/utils/query_handler.js +20 -0
  53. package/dist/utils/validator.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/tools/add_run.js +0 -19
  56. package/dist/tools/get_projects.js +0 -15
  57. package/dist/tools/shared_steps/delete_shared_step.js +0 -18
  58. package/dist/types/testrail.js +0 -130
@@ -1,18 +0,0 @@
1
- import { z } from "zod";
2
- const parameters = {
3
- shared_step_id: z.number().describe("The ID of the shared test step to delete"),
4
- };
5
- const description = `
6
- Deletes an existing shared step entity.
7
- By default, this removes the shared step entity but keeps the steps in the test cases that used them.
8
- `;
9
- export const deleteSharedStepTool = {
10
- name: "delete_shared_step",
11
- description: description.trim(),
12
- parameters,
13
- handler: async (args, client) => {
14
- const { shared_step_id } = args;
15
- await client.deleteSharedStep(shared_step_id);
16
- return { message: `Shared step ${shared_step_id} deleted successfully.` };
17
- }
18
- };
@@ -1,130 +0,0 @@
1
- import { z } from "zod";
2
- export const CaseFieldConfigSchema = z.object({
3
- context: z.object({
4
- is_global: z.boolean(),
5
- project_ids: z.array(z.number()),
6
- }).optional(),
7
- options: z.object({
8
- default_value: z.string().optional(),
9
- is_required: z.boolean().optional(),
10
- items: z.string().optional(),
11
- }),
12
- });
13
- export const CaseFieldSchema = z.object({
14
- id: z.number(),
15
- name: z.string(),
16
- system_name: z.string(),
17
- label: z.string(),
18
- type_id: z.number(),
19
- template_ids: z.array(z.number()),
20
- is_active: z.boolean(),
21
- description: z.string().nullable(),
22
- include_all: z.boolean(),
23
- configs: z.array(CaseFieldConfigSchema),
24
- });
25
- export const LabelSchema = z.object({
26
- id: z.number(),
27
- title: z.string(),
28
- });
29
- export const CaseSchema = z.object({
30
- id: z.number(),
31
- title: z.string(),
32
- section_id: z.number(),
33
- template_id: z.number(),
34
- type_id: z.number(),
35
- priority_id: z.number(),
36
- milestone_id: z.number().nullable(),
37
- refs: z.string().nullable(),
38
- created_on: z.number(),
39
- updated_on: z.number(),
40
- estimate: z.string().nullable(),
41
- suite_id: z.number(),
42
- labels: z.array(LabelSchema),
43
- }).loose();
44
- export const SectionSchema = z.object({
45
- id: z.number(),
46
- name: z.string(),
47
- description: z.string().nullish(),
48
- parent_id: z.number().nullish(),
49
- suite_id: z.number(),
50
- });
51
- export const PrioritySchema = z.object({
52
- id: z.number(),
53
- is_default: z.boolean(),
54
- name: z.string(),
55
- });
56
- export const CaseTypeSchema = z.object({
57
- id: z.number(),
58
- is_default: z.boolean(),
59
- name: z.string(),
60
- });
61
- export const TemplateSchema = z.object({
62
- id: z.number(),
63
- name: z.string(),
64
- is_default: z.boolean(),
65
- });
66
- export const ProjectSchema = z.object({
67
- id: z.number(),
68
- name: z.string(),
69
- is_completed: z.boolean(),
70
- suite_mode: z.number(),
71
- });
72
- export const RunSchema = z.object({
73
- id: z.number(),
74
- name: z.string(),
75
- description: z.string().nullable(),
76
- suite_id: z.number().nullable(),
77
- project_id: z.number(),
78
- is_completed: z.boolean(),
79
- passed_count: z.number(),
80
- blocked_count: z.number(),
81
- untested_count: z.number(),
82
- retest_count: z.number(),
83
- failed_count: z.number(),
84
- url: z.string(),
85
- });
86
- export const StatusSchema = z.object({
87
- id: z.number(),
88
- name: z.string(),
89
- label: z.string(),
90
- });
91
- export const TestSchema = z.object({
92
- id: z.number(),
93
- case_id: z.number(),
94
- status_id: z.number(),
95
- title: z.string(),
96
- run_id: z.number(),
97
- });
98
- export const TestsSchema = z.array(TestSchema);
99
- export const ResultSchema = z.object({
100
- id: z.number(),
101
- test_id: z.number(),
102
- status_id: z.number(),
103
- comment: z.string().nullable(),
104
- defects: z.string().nullable(),
105
- });
106
- export const AttachmentSchema = z.object({
107
- attachment_id: z.number(),
108
- });
109
- export const SharedStepContentSchema = z.object({
110
- content: z.string(),
111
- expected: z.string().nullable().optional(),
112
- });
113
- export const SharedStepSchema = z.object({
114
- id: z.number(),
115
- title: z.string(),
116
- project_id: z.number().optional(),
117
- custom_steps_separated: z.array(SharedStepContentSchema).optional(),
118
- case_ids: z.array(z.number()).optional(),
119
- });
120
- export const SharedStepHistorySchema = z.object({
121
- id: z.number(),
122
- title: z.string(),
123
- timestamp: z.number().optional(),
124
- custom_steps_separated: z.array(SharedStepContentSchema).optional(),
125
- });
126
- export const UserSchema = z.object({
127
- id: z.number(),
128
- name: z.string(),
129
- email: z.string(),
130
- });