@qase/mcp-server 1.1.7 → 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 (284) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +75 -551
  3. package/build/auth/client-context.d.ts +12 -0
  4. package/build/auth/client-context.d.ts.map +1 -0
  5. package/build/auth/client-context.js +12 -0
  6. package/build/auth/client-context.js.map +1 -0
  7. package/build/auth/jwks-verifier.d.ts +15 -0
  8. package/build/auth/jwks-verifier.d.ts.map +1 -0
  9. package/build/auth/jwks-verifier.js +31 -0
  10. package/build/auth/jwks-verifier.js.map +1 -0
  11. package/build/auth/mcp-guard.d.ts +15 -0
  12. package/build/auth/mcp-guard.d.ts.map +1 -0
  13. package/build/auth/mcp-guard.js +44 -0
  14. package/build/auth/mcp-guard.js.map +1 -0
  15. package/build/auth/oauth-config.d.ts +40 -0
  16. package/build/auth/oauth-config.d.ts.map +1 -0
  17. package/build/auth/oauth-config.js +34 -0
  18. package/build/auth/oauth-config.js.map +1 -0
  19. package/build/auth/proxy-provider.d.ts +31 -0
  20. package/build/auth/proxy-provider.d.ts.map +1 -0
  21. package/build/auth/proxy-provider.js +87 -0
  22. package/build/auth/proxy-provider.js.map +1 -0
  23. package/build/auth/token-type.d.ts +7 -0
  24. package/build/auth/token-type.d.ts.map +1 -0
  25. package/build/auth/token-type.js +10 -0
  26. package/build/auth/token-type.js.map +1 -0
  27. package/build/cache/circuit-breaker.d.ts +33 -0
  28. package/build/cache/circuit-breaker.d.ts.map +1 -0
  29. package/build/cache/circuit-breaker.js +68 -0
  30. package/build/cache/circuit-breaker.js.map +1 -0
  31. package/build/cache/index.d.ts +24 -0
  32. package/build/cache/index.d.ts.map +1 -0
  33. package/build/cache/index.js +86 -0
  34. package/build/cache/index.js.map +1 -0
  35. package/build/cache/keys.d.ts +25 -0
  36. package/build/cache/keys.d.ts.map +1 -0
  37. package/build/cache/keys.js +36 -0
  38. package/build/cache/keys.js.map +1 -0
  39. package/build/cache/layered.d.ts +31 -0
  40. package/build/cache/layered.d.ts.map +1 -0
  41. package/build/cache/layered.js +88 -0
  42. package/build/cache/layered.js.map +1 -0
  43. package/build/cache/memory.d.ts +32 -0
  44. package/build/cache/memory.d.ts.map +1 -0
  45. package/build/cache/memory.js +108 -0
  46. package/build/cache/memory.js.map +1 -0
  47. package/build/cache/metrics.d.ts +31 -0
  48. package/build/cache/metrics.d.ts.map +1 -0
  49. package/build/cache/metrics.js +95 -0
  50. package/build/cache/metrics.js.map +1 -0
  51. package/build/cache/prom-format.d.ts +7 -0
  52. package/build/cache/prom-format.d.ts.map +1 -0
  53. package/build/cache/prom-format.js +16 -0
  54. package/build/cache/prom-format.js.map +1 -0
  55. package/build/cache/redis-bus.d.ts +29 -0
  56. package/build/cache/redis-bus.d.ts.map +1 -0
  57. package/build/cache/redis-bus.js +50 -0
  58. package/build/cache/redis-bus.js.map +1 -0
  59. package/build/cache/redis.d.ts +32 -0
  60. package/build/cache/redis.d.ts.map +1 -0
  61. package/build/cache/redis.js +89 -0
  62. package/build/cache/redis.js.map +1 -0
  63. package/build/cache/types.d.ts +38 -0
  64. package/build/cache/types.d.ts.map +1 -0
  65. package/build/cache/types.js +2 -0
  66. package/build/cache/types.js.map +1 -0
  67. package/build/client/index.d.ts +10 -3
  68. package/build/client/index.d.ts.map +1 -1
  69. package/build/client/index.js +75 -50
  70. package/build/client/index.js.map +1 -1
  71. package/build/http/agent.d.ts +16 -0
  72. package/build/http/agent.d.ts.map +1 -0
  73. package/build/http/agent.js +16 -0
  74. package/build/http/agent.js.map +1 -0
  75. package/build/http/dedupe.d.ts +14 -0
  76. package/build/http/dedupe.d.ts.map +1 -0
  77. package/build/http/dedupe.js +69 -0
  78. package/build/http/dedupe.js.map +1 -0
  79. package/build/http/index.d.ts +6 -0
  80. package/build/http/index.d.ts.map +1 -0
  81. package/build/http/index.js +4 -0
  82. package/build/http/index.js.map +1 -0
  83. package/build/http/retry.d.ts +18 -0
  84. package/build/http/retry.d.ts.map +1 -0
  85. package/build/http/retry.js +52 -0
  86. package/build/http/retry.js.map +1 -0
  87. package/build/index.d.ts +1 -18
  88. package/build/index.d.ts.map +1 -1
  89. package/build/index.js +95 -61
  90. package/build/index.js.map +1 -1
  91. package/build/operations-v2/composites/ci-report.d.ts +2 -0
  92. package/build/operations-v2/composites/ci-report.d.ts.map +1 -0
  93. package/build/operations-v2/composites/ci-report.js +99 -0
  94. package/build/operations-v2/composites/ci-report.js.map +1 -0
  95. package/build/operations-v2/composites/regression-run.d.ts +2 -0
  96. package/build/operations-v2/composites/regression-run.d.ts.map +1 -0
  97. package/build/operations-v2/composites/regression-run.js +81 -0
  98. package/build/operations-v2/composites/regression-run.js.map +1 -0
  99. package/build/operations-v2/composites/triage-defect.d.ts +2 -0
  100. package/build/operations-v2/composites/triage-defect.d.ts.map +1 -0
  101. package/build/operations-v2/composites/triage-defect.js +67 -0
  102. package/build/operations-v2/composites/triage-defect.js.map +1 -0
  103. package/build/operations-v2/escape/api.d.ts +2 -0
  104. package/build/operations-v2/escape/api.d.ts.map +1 -0
  105. package/build/operations-v2/escape/api.js +34 -0
  106. package/build/operations-v2/escape/api.js.map +1 -0
  107. package/build/operations-v2/index.d.ts +19 -0
  108. package/build/operations-v2/index.d.ts.map +1 -0
  109. package/build/operations-v2/index.js +25 -0
  110. package/build/operations-v2/index.js.map +1 -0
  111. package/build/operations-v2/meta/discover.d.ts +9 -0
  112. package/build/operations-v2/meta/discover.d.ts.map +1 -0
  113. package/build/operations-v2/meta/discover.js +76 -0
  114. package/build/operations-v2/meta/discover.js.map +1 -0
  115. package/build/{operations/search.d.ts → operations-v2/qql/index.d.ts} +1 -1
  116. package/build/operations-v2/qql/index.d.ts.map +1 -0
  117. package/build/{operations/search.js → operations-v2/qql/index.js} +34 -9
  118. package/build/operations-v2/qql/index.js.map +1 -0
  119. package/build/operations-v2/read/get.d.ts +2 -0
  120. package/build/operations-v2/read/get.d.ts.map +1 -0
  121. package/build/operations-v2/read/get.js +91 -0
  122. package/build/operations-v2/read/get.js.map +1 -0
  123. package/build/operations-v2/read/project-context.d.ts +2 -0
  124. package/build/operations-v2/read/project-context.d.ts.map +1 -0
  125. package/build/operations-v2/read/project-context.js +102 -0
  126. package/build/operations-v2/read/project-context.js.map +1 -0
  127. package/build/operations-v2/write/attachments.d.ts +2 -0
  128. package/build/operations-v2/write/attachments.d.ts.map +1 -0
  129. package/build/operations-v2/write/attachments.js +58 -0
  130. package/build/operations-v2/write/attachments.js.map +1 -0
  131. package/build/operations-v2/write/cases.d.ts +2 -0
  132. package/build/operations-v2/write/cases.d.ts.map +1 -0
  133. package/build/operations-v2/write/cases.js +121 -0
  134. package/build/operations-v2/write/cases.js.map +1 -0
  135. package/build/operations-v2/write/defects.d.ts +2 -0
  136. package/build/operations-v2/write/defects.d.ts.map +1 -0
  137. package/build/operations-v2/write/defects.js +81 -0
  138. package/build/operations-v2/write/defects.js.map +1 -0
  139. package/build/operations-v2/write/environments.d.ts +2 -0
  140. package/build/operations-v2/write/environments.d.ts.map +1 -0
  141. package/build/operations-v2/write/environments.js +56 -0
  142. package/build/operations-v2/write/environments.js.map +1 -0
  143. package/build/operations-v2/write/milestones.d.ts +2 -0
  144. package/build/operations-v2/write/milestones.d.ts.map +1 -0
  145. package/build/operations-v2/write/milestones.js +56 -0
  146. package/build/operations-v2/write/milestones.js.map +1 -0
  147. package/build/operations-v2/write/plans.d.ts +2 -0
  148. package/build/operations-v2/write/plans.d.ts.map +1 -0
  149. package/build/operations-v2/write/plans.js +55 -0
  150. package/build/operations-v2/write/plans.js.map +1 -0
  151. package/build/operations-v2/write/results.d.ts +2 -0
  152. package/build/operations-v2/write/results.d.ts.map +1 -0
  153. package/build/operations-v2/write/results.js +72 -0
  154. package/build/operations-v2/write/results.js.map +1 -0
  155. package/build/operations-v2/write/runs.d.ts +2 -0
  156. package/build/operations-v2/write/runs.d.ts.map +1 -0
  157. package/build/operations-v2/write/runs.js +84 -0
  158. package/build/operations-v2/write/runs.js.map +1 -0
  159. package/build/operations-v2/write/shared-steps.d.ts +2 -0
  160. package/build/operations-v2/write/shared-steps.d.ts.map +1 -0
  161. package/build/operations-v2/write/shared-steps.js +60 -0
  162. package/build/operations-v2/write/shared-steps.js.map +1 -0
  163. package/build/operations-v2/write/suites.d.ts +2 -0
  164. package/build/operations-v2/write/suites.d.ts.map +1 -0
  165. package/build/operations-v2/write/suites.js +63 -0
  166. package/build/operations-v2/write/suites.js.map +1 -0
  167. package/build/prompts/index.d.ts +31 -0
  168. package/build/prompts/index.d.ts.map +1 -0
  169. package/build/prompts/index.js +229 -0
  170. package/build/prompts/index.js.map +1 -0
  171. package/build/transports/sse.d.ts.map +1 -1
  172. package/build/transports/sse.js +6 -0
  173. package/build/transports/sse.js.map +1 -1
  174. package/build/transports/streamableHttp.d.ts +6 -1
  175. package/build/transports/streamableHttp.d.ts.map +1 -1
  176. package/build/transports/streamableHttp.js +128 -16
  177. package/build/transports/streamableHttp.js.map +1 -1
  178. package/build/utils/auth-context.d.ts +8 -0
  179. package/build/utils/auth-context.d.ts.map +1 -1
  180. package/build/utils/auth-context.js +18 -0
  181. package/build/utils/auth-context.js.map +1 -1
  182. package/build/utils/case-enums.d.ts +5 -3
  183. package/build/utils/case-enums.d.ts.map +1 -1
  184. package/build/utils/case-enums.js +78 -59
  185. package/build/utils/case-enums.js.map +1 -1
  186. package/build/utils/output-schemas.d.ts +16 -0
  187. package/build/utils/output-schemas.d.ts.map +1 -0
  188. package/build/utils/output-schemas.js +82 -0
  189. package/build/utils/output-schemas.js.map +1 -0
  190. package/build/utils/registry.d.ts +42 -9
  191. package/build/utils/registry.d.ts.map +1 -1
  192. package/build/utils/registry.js +64 -11
  193. package/build/utils/registry.js.map +1 -1
  194. package/build/utils/response-shape.d.ts +23 -0
  195. package/build/utils/response-shape.d.ts.map +1 -0
  196. package/build/utils/response-shape.js +73 -0
  197. package/build/utils/response-shape.js.map +1 -0
  198. package/build/utils/rich-response.d.ts +58 -0
  199. package/build/utils/rich-response.d.ts.map +1 -0
  200. package/build/utils/rich-response.js +93 -0
  201. package/build/utils/rich-response.js.map +1 -0
  202. package/build/utils/server-context.d.ts +65 -0
  203. package/build/utils/server-context.d.ts.map +1 -0
  204. package/build/utils/server-context.js +67 -0
  205. package/build/utils/server-context.js.map +1 -0
  206. package/build/version.d.ts +1 -1
  207. package/build/version.js +1 -1
  208. package/docs/connect.md +81 -0
  209. package/docs/migration.md +351 -0
  210. package/docs/self-run.md +270 -0
  211. package/docs/tools.md +109 -0
  212. package/docs/troubleshooting.md +144 -0
  213. package/package.json +12 -3
  214. package/server.json +8 -2
  215. package/build/operations/attachments.d.ts +0 -8
  216. package/build/operations/attachments.d.ts.map +0 -1
  217. package/build/operations/attachments.js +0 -146
  218. package/build/operations/attachments.js.map +0 -1
  219. package/build/operations/authors.d.ts +0 -8
  220. package/build/operations/authors.d.ts.map +0 -1
  221. package/build/operations/authors.js +0 -70
  222. package/build/operations/authors.js.map +0 -1
  223. package/build/operations/cases.d.ts +0 -8
  224. package/build/operations/cases.d.ts.map +0 -1
  225. package/build/operations/cases.js +0 -338
  226. package/build/operations/cases.js.map +0 -1
  227. package/build/operations/configurations.d.ts +0 -10
  228. package/build/operations/configurations.d.ts.map +0 -1
  229. package/build/operations/configurations.js +0 -125
  230. package/build/operations/configurations.js.map +0 -1
  231. package/build/operations/custom-fields.d.ts +0 -8
  232. package/build/operations/custom-fields.d.ts.map +0 -1
  233. package/build/operations/custom-fields.js +0 -172
  234. package/build/operations/custom-fields.js.map +0 -1
  235. package/build/operations/defects.d.ts +0 -8
  236. package/build/operations/defects.d.ts.map +0 -1
  237. package/build/operations/defects.js +0 -256
  238. package/build/operations/defects.js.map +0 -1
  239. package/build/operations/environments.d.ts +0 -8
  240. package/build/operations/environments.d.ts.map +0 -1
  241. package/build/operations/environments.js +0 -154
  242. package/build/operations/environments.js.map +0 -1
  243. package/build/operations/milestones.d.ts +0 -8
  244. package/build/operations/milestones.d.ts.map +0 -1
  245. package/build/operations/milestones.js +0 -155
  246. package/build/operations/milestones.js.map +0 -1
  247. package/build/operations/plans.d.ts +0 -8
  248. package/build/operations/plans.d.ts.map +0 -1
  249. package/build/operations/plans.js +0 -158
  250. package/build/operations/plans.js.map +0 -1
  251. package/build/operations/projects.d.ts +0 -8
  252. package/build/operations/projects.d.ts.map +0 -1
  253. package/build/operations/projects.js +0 -192
  254. package/build/operations/projects.js.map +0 -1
  255. package/build/operations/results.d.ts +0 -8
  256. package/build/operations/results.d.ts.map +0 -1
  257. package/build/operations/results.js +0 -214
  258. package/build/operations/results.js.map +0 -1
  259. package/build/operations/runs.d.ts +0 -8
  260. package/build/operations/runs.d.ts.map +0 -1
  261. package/build/operations/runs.js +0 -224
  262. package/build/operations/runs.js.map +0 -1
  263. package/build/operations/search.d.ts.map +0 -1
  264. package/build/operations/search.js.map +0 -1
  265. package/build/operations/shared-parameters.d.ts +0 -10
  266. package/build/operations/shared-parameters.d.ts.map +0 -1
  267. package/build/operations/shared-parameters.js +0 -93
  268. package/build/operations/shared-parameters.js.map +0 -1
  269. package/build/operations/shared-steps.d.ts +0 -8
  270. package/build/operations/shared-steps.d.ts.map +0 -1
  271. package/build/operations/shared-steps.js +0 -160
  272. package/build/operations/shared-steps.js.map +0 -1
  273. package/build/operations/suites.d.ts +0 -8
  274. package/build/operations/suites.d.ts.map +0 -1
  275. package/build/operations/suites.js +0 -169
  276. package/build/operations/suites.js.map +0 -1
  277. package/build/operations/system-fields.d.ts +0 -10
  278. package/build/operations/system-fields.d.ts.map +0 -1
  279. package/build/operations/system-fields.js +0 -47
  280. package/build/operations/system-fields.js.map +0 -1
  281. package/build/operations/users.d.ts +0 -10
  282. package/build/operations/users.d.ts.map +0 -1
  283. package/build/operations/users.js +0 -78
  284. package/build/operations/users.js.map +0 -1
@@ -1,154 +0,0 @@
1
- /**
2
- * Environments Operations
3
- *
4
- * Implements all MCP tools for managing test environments in Qase.
5
- * Environments represent different testing stages (staging, production, etc.).
6
- */
7
- import { z } from 'zod';
8
- import { getApiClient } from '../client/index.js';
9
- import { toolRegistry, ReadAnnotation, CreateAnnotation, UpdateAnnotation, DeleteAnnotation, } from '../utils/registry.js';
10
- import { toResultAsync, createToolError } from '../utils/errors.js';
11
- import { ProjectCodeSchema, IdSchema } from '../utils/validation.js';
12
- // ============================================================================
13
- // SCHEMAS
14
- // ============================================================================
15
- /**
16
- * Schema for listing environments
17
- */
18
- const ListEnvironmentsSchema = z.object({
19
- code: ProjectCodeSchema,
20
- limit: z.number().int().positive().max(100).optional().describe('Maximum number of items'),
21
- offset: z.number().int().nonnegative().optional().describe('Number of items to skip'),
22
- });
23
- /**
24
- * Schema for getting a specific environment
25
- */
26
- const GetEnvironmentSchema = z.object({
27
- code: ProjectCodeSchema,
28
- id: IdSchema,
29
- });
30
- /**
31
- * Schema for creating an environment
32
- */
33
- const CreateEnvironmentSchema = z.object({
34
- code: ProjectCodeSchema,
35
- title: z.string().min(1).max(255).describe('Environment title'),
36
- description: z.string().optional().describe('Environment description'),
37
- slug: z.string().optional().describe('URL-friendly identifier'),
38
- host: z.string().optional().describe('Environment host/URL'),
39
- });
40
- /**
41
- * Schema for updating an environment
42
- */
43
- const UpdateEnvironmentSchema = z.object({
44
- code: ProjectCodeSchema,
45
- id: IdSchema,
46
- title: z.string().min(1).max(255).optional().describe('Environment title'),
47
- description: z.string().optional().describe('Environment description'),
48
- slug: z.string().optional().describe('URL-friendly identifier'),
49
- host: z.string().optional().describe('Environment host/URL'),
50
- });
51
- /**
52
- * Schema for deleting an environment
53
- */
54
- const DeleteEnvironmentSchema = z.object({
55
- code: ProjectCodeSchema,
56
- id: IdSchema,
57
- });
58
- // ============================================================================
59
- // HANDLERS
60
- // ============================================================================
61
- /**
62
- * List all environments in a project
63
- */
64
- async function listEnvironments(args) {
65
- const client = getApiClient();
66
- const { code, limit, offset } = args;
67
- const result = await toResultAsync(client.environment.getEnvironments(code, undefined, undefined, limit, offset));
68
- return result.match((response) => response.data.result, (error) => {
69
- throw createToolError(error, 'environment operation');
70
- });
71
- }
72
- /**
73
- * Get a specific environment
74
- */
75
- async function getEnvironment(args) {
76
- const client = getApiClient();
77
- const { code, id } = args;
78
- const result = await toResultAsync(client.environment.getEnvironment(code, id));
79
- return result.match((response) => response.data.result, (error) => {
80
- throw createToolError(error, 'environment operation');
81
- });
82
- }
83
- /**
84
- * Create a new environment
85
- */
86
- async function createEnvironment(args) {
87
- const client = getApiClient();
88
- const { code, ...environmentData } = args;
89
- const result = await toResultAsync(client.environment.createEnvironment(code, environmentData));
90
- return result.match((response) => response.data.result, (error) => {
91
- throw createToolError(error, 'environment operation');
92
- });
93
- }
94
- /**
95
- * Update an existing environment
96
- */
97
- async function updateEnvironment(args) {
98
- const client = getApiClient();
99
- const { code, id, ...updateData } = args;
100
- const result = await toResultAsync(client.environment.updateEnvironment(code, id, updateData));
101
- return result.match((response) => response.data.result, (error) => {
102
- throw createToolError(error, 'environment operation');
103
- });
104
- }
105
- /**
106
- * Delete an environment
107
- */
108
- async function deleteEnvironment(args) {
109
- const client = getApiClient();
110
- const { code, id } = args;
111
- const result = await toResultAsync(client.environment.deleteEnvironment(code, id));
112
- return result.match((_response) => ({ success: true, id }), (error) => {
113
- throw createToolError(error, 'environment operation');
114
- });
115
- }
116
- // ============================================================================
117
- // TOOL REGISTRATION
118
- // ============================================================================
119
- toolRegistry.register({
120
- name: 'list_environments',
121
- description: 'Get all test environments in a project',
122
- schema: ListEnvironmentsSchema,
123
- handler: listEnvironments,
124
- annotations: ReadAnnotation,
125
- });
126
- toolRegistry.register({
127
- name: 'get_environment',
128
- description: 'Get a specific environment by project code and environment ID',
129
- schema: GetEnvironmentSchema,
130
- handler: getEnvironment,
131
- annotations: ReadAnnotation,
132
- });
133
- toolRegistry.register({
134
- name: 'create_environment',
135
- description: 'Create a new test environment (staging, production, etc.)',
136
- schema: CreateEnvironmentSchema,
137
- handler: createEnvironment,
138
- annotations: CreateAnnotation,
139
- });
140
- toolRegistry.register({
141
- name: 'update_environment',
142
- description: 'Update an existing test environment',
143
- schema: UpdateEnvironmentSchema,
144
- handler: updateEnvironment,
145
- annotations: UpdateAnnotation,
146
- });
147
- toolRegistry.register({
148
- name: 'delete_environment',
149
- description: 'Delete a test environment from a project',
150
- schema: DeleteEnvironmentSchema,
151
- handler: deleteEnvironment,
152
- annotations: DeleteAnnotation,
153
- });
154
- //# sourceMappingURL=environments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environments.js","sourceRoot":"","sources":["../../src/operations/environments.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAErE,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E;;GAEG;AACH,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAC1F,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;CACtF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,iBAAiB;IACvB,EAAE,EAA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organize tests by releases, sprints, or project phases.
6
- */
7
- export {};
8
- //# sourceMappingURL=milestones.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"milestones.d.ts","sourceRoot":"","sources":["../../src/operations/milestones.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,155 +0,0 @@
1
- /**
2
- * Milestones Operations
3
- *
4
- * Implements all MCP tools for managing milestones in Qase.
5
- * Milestones help organize tests by releases, sprints, or project phases.
6
- */
7
- import { z } from 'zod';
8
- import { getApiClient } from '../client/index.js';
9
- import { toolRegistry, ReadAnnotation, CreateAnnotation, UpdateAnnotation, DeleteAnnotation, } from '../utils/registry.js';
10
- import { toResultAsync, createToolError } from '../utils/errors.js';
11
- import { ProjectCodeSchema, IdSchema } from '../utils/validation.js';
12
- // ============================================================================
13
- // SCHEMAS
14
- // ============================================================================
15
- /**
16
- * Schema for listing milestones
17
- */
18
- const ListMilestonesSchema = z.object({
19
- code: ProjectCodeSchema,
20
- search: z.string().optional().describe('Search query for milestone title'),
21
- limit: z.number().int().positive().max(100).optional().describe('Maximum number of items'),
22
- offset: z.number().int().nonnegative().optional().describe('Number of items to skip'),
23
- });
24
- /**
25
- * Schema for getting a specific milestone
26
- */
27
- const GetMilestoneSchema = z.object({
28
- code: ProjectCodeSchema,
29
- id: IdSchema,
30
- });
31
- /**
32
- * Schema for creating a milestone
33
- */
34
- const CreateMilestoneSchema = z.object({
35
- code: ProjectCodeSchema,
36
- title: z.string().min(1).max(255).describe('Milestone title'),
37
- description: z.string().optional().describe('Milestone description'),
38
- status: z.enum(['active', 'completed']).optional().default('active').describe('Milestone status'),
39
- due_date: z.number().optional().describe('Due date as Unix timestamp'),
40
- });
41
- /**
42
- * Schema for updating a milestone
43
- */
44
- const UpdateMilestoneSchema = z.object({
45
- code: ProjectCodeSchema,
46
- id: IdSchema,
47
- title: z.string().min(1).max(255).optional().describe('Milestone title'),
48
- description: z.string().optional().describe('Milestone description'),
49
- status: z.enum(['active', 'completed']).optional().describe('Milestone status'),
50
- due_date: z.number().optional().describe('Due date as Unix timestamp'),
51
- });
52
- /**
53
- * Schema for deleting a milestone
54
- */
55
- const DeleteMilestoneSchema = z.object({
56
- code: ProjectCodeSchema,
57
- id: IdSchema,
58
- });
59
- // ============================================================================
60
- // HANDLERS
61
- // ============================================================================
62
- /**
63
- * List all milestones in a project
64
- */
65
- async function listMilestones(args) {
66
- const client = getApiClient();
67
- const { code, search, limit, offset } = args;
68
- const result = await toResultAsync(client.milestones.getMilestones(code, search, limit, offset));
69
- return result.match((response) => response.data.result, (error) => {
70
- throw createToolError(error, 'milestone operation');
71
- });
72
- }
73
- /**
74
- * Get a specific milestone
75
- */
76
- async function getMilestone(args) {
77
- const client = getApiClient();
78
- const { code, id } = args;
79
- const result = await toResultAsync(client.milestones.getMilestone(code, id));
80
- return result.match((response) => response.data.result, (error) => {
81
- throw createToolError(error, 'milestone operation');
82
- });
83
- }
84
- /**
85
- * Create a new milestone
86
- */
87
- async function createMilestone(args) {
88
- const client = getApiClient();
89
- const { code, ...milestoneData } = args;
90
- const result = await toResultAsync(client.milestones.createMilestone(code, milestoneData));
91
- return result.match((response) => response.data.result, (error) => {
92
- throw createToolError(error, 'milestone operation');
93
- });
94
- }
95
- /**
96
- * Update an existing milestone
97
- */
98
- async function updateMilestone(args) {
99
- const client = getApiClient();
100
- const { code, id, ...updateData } = args;
101
- const result = await toResultAsync(client.milestones.updateMilestone(code, id, updateData));
102
- return result.match((response) => response.data.result, (error) => {
103
- throw createToolError(error, 'milestone operation');
104
- });
105
- }
106
- /**
107
- * Delete a milestone
108
- */
109
- async function deleteMilestone(args) {
110
- const client = getApiClient();
111
- const { code, id } = args;
112
- const result = await toResultAsync(client.milestones.deleteMilestone(code, id));
113
- return result.match((_response) => ({ success: true, id }), (error) => {
114
- throw createToolError(error, 'milestone operation');
115
- });
116
- }
117
- // ============================================================================
118
- // TOOL REGISTRATION
119
- // ============================================================================
120
- toolRegistry.register({
121
- name: 'list_milestones',
122
- description: 'Get all milestones in a project with optional search and pagination',
123
- schema: ListMilestonesSchema,
124
- handler: listMilestones,
125
- annotations: ReadAnnotation,
126
- });
127
- toolRegistry.register({
128
- name: 'get_milestone',
129
- description: 'Get a specific milestone by project code and milestone ID',
130
- schema: GetMilestoneSchema,
131
- handler: getMilestone,
132
- annotations: ReadAnnotation,
133
- });
134
- toolRegistry.register({
135
- name: 'create_milestone',
136
- description: 'Create a new milestone for organizing tests by releases or sprints',
137
- schema: CreateMilestoneSchema,
138
- handler: createMilestone,
139
- annotations: CreateAnnotation,
140
- });
141
- toolRegistry.register({
142
- name: 'update_milestone',
143
- description: 'Update an existing milestone',
144
- schema: UpdateMilestoneSchema,
145
- handler: updateMilestone,
146
- annotations: UpdateAnnotation,
147
- });
148
- toolRegistry.register({
149
- name: 'delete_milestone',
150
- description: 'Delete a milestone from a project',
151
- schema: DeleteMilestoneSchema,
152
- handler: deleteMilestone,
153
- annotations: DeleteAnnotation,
154
- });
155
- //# sourceMappingURL=milestones.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"milestones.js","sourceRoot":"","sources":["../../src/operations/milestones.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAErE,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E;;GAEG;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CA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BAAqB;IAC7B,OAAO,EAAE,eAAe;IACxB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC;AAEH,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,8BAA8B;IAC3C,MAAM,EAAE,qBAAqB;IAC7B,OAAO,EAAE,eAAe;IACxB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC;AAEH,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,mCAAmC;IAChD,MAAM,EAAE,qBAAqB;IAC7B,OAAO,EAAE,eAAe;IACxB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Test Plans Operations
3
- *
4
- * Implements all MCP tools for managing test plans in Qase.
5
- * Test plans define collections of test cases to be executed.
6
- */
7
- export {};
8
- //# sourceMappingURL=plans.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../src/operations/plans.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,158 +0,0 @@
1
- /**
2
- * Test Plans Operations
3
- *
4
- * Implements all MCP tools for managing test plans in Qase.
5
- * Test plans define collections of test cases to be executed.
6
- */
7
- import { z } from 'zod';
8
- import { getApiClient } from '../client/index.js';
9
- import { toolRegistry, ReadAnnotation, CreateAnnotation, UpdateAnnotation, DeleteAnnotation, } from '../utils/registry.js';
10
- import { toResultAsync, createToolError } from '../utils/errors.js';
11
- import { ProjectCodeSchema, IdSchema } from '../utils/validation.js';
12
- // ============================================================================
13
- // SCHEMAS
14
- // ============================================================================
15
- /**
16
- * Schema for listing test plans
17
- */
18
- const ListPlansSchema = z.object({
19
- code: ProjectCodeSchema,
20
- limit: z.number().int().positive().max(100).optional().describe('Maximum number of items'),
21
- offset: z.number().int().nonnegative().optional().describe('Number of items to skip'),
22
- });
23
- /**
24
- * Schema for getting a specific test plan
25
- */
26
- const GetPlanSchema = z.object({
27
- code: ProjectCodeSchema,
28
- id: IdSchema,
29
- });
30
- /**
31
- * Schema for creating a test plan
32
- */
33
- const CreatePlanSchema = z.object({
34
- code: ProjectCodeSchema,
35
- title: z.string().min(1).max(255).describe('Test plan title'),
36
- description: z.string().optional().describe('Test plan description'),
37
- cases: z
38
- .array(z.number().int().positive())
39
- .optional()
40
- .describe('Array of test case IDs to include in the plan'),
41
- });
42
- /**
43
- * Schema for updating a test plan
44
- */
45
- const UpdatePlanSchema = z.object({
46
- code: ProjectCodeSchema,
47
- id: IdSchema,
48
- title: z.string().min(1).max(255).optional().describe('Test plan title'),
49
- description: z.string().optional().describe('Test plan description'),
50
- cases: z
51
- .array(z.number().int().positive())
52
- .optional()
53
- .describe('Array of test case IDs to include in the plan'),
54
- });
55
- /**
56
- * Schema for deleting a test plan
57
- */
58
- const DeletePlanSchema = z.object({
59
- code: ProjectCodeSchema,
60
- id: IdSchema,
61
- });
62
- // ============================================================================
63
- // HANDLERS
64
- // ============================================================================
65
- /**
66
- * List all test plans in a project
67
- */
68
- async function listPlans(args) {
69
- const client = getApiClient();
70
- const { code, limit, offset } = args;
71
- const result = await toResultAsync(client.plans.getPlans(code, limit, offset));
72
- return result.match((response) => response.data.result, (error) => {
73
- throw createToolError(error, 'plan operation');
74
- });
75
- }
76
- /**
77
- * Get a specific test plan
78
- */
79
- async function getPlan(args) {
80
- const client = getApiClient();
81
- const { code, id } = args;
82
- const result = await toResultAsync(client.plans.getPlan(code, id));
83
- return result.match((response) => response.data.result, (error) => {
84
- throw createToolError(error, 'plan operation');
85
- });
86
- }
87
- /**
88
- * Create a new test plan
89
- */
90
- async function createPlan(args) {
91
- const client = getApiClient();
92
- const { code, ...planData } = args;
93
- const result = await toResultAsync(client.plans.createPlan(code, planData));
94
- return result.match((response) => response.data.result, (error) => {
95
- throw createToolError(error, 'plan operation');
96
- });
97
- }
98
- /**
99
- * Update an existing test plan
100
- */
101
- async function updatePlan(args) {
102
- const client = getApiClient();
103
- const { code, id, ...updateData } = args;
104
- const result = await toResultAsync(client.plans.updatePlan(code, id, updateData));
105
- return result.match((response) => response.data.result, (error) => {
106
- throw createToolError(error, 'plan operation');
107
- });
108
- }
109
- /**
110
- * Delete a test plan
111
- */
112
- async function deletePlan(args) {
113
- const client = getApiClient();
114
- const { code, id } = args;
115
- const result = await toResultAsync(client.plans.deletePlan(code, id));
116
- return result.match((_response) => ({ success: true, id }), (error) => {
117
- throw createToolError(error, 'plan operation');
118
- });
119
- }
120
- // ============================================================================
121
- // TOOL REGISTRATION
122
- // ============================================================================
123
- toolRegistry.register({
124
- name: 'list_plans',
125
- description: 'Get all test plans in a project with optional pagination',
126
- schema: ListPlansSchema,
127
- handler: listPlans,
128
- annotations: ReadAnnotation,
129
- });
130
- toolRegistry.register({
131
- name: 'get_plan',
132
- description: 'Get a specific test plan by project code and plan ID',
133
- schema: GetPlanSchema,
134
- handler: getPlan,
135
- annotations: ReadAnnotation,
136
- });
137
- toolRegistry.register({
138
- name: 'create_plan',
139
- description: 'Create a new test plan with selected test cases',
140
- schema: CreatePlanSchema,
141
- handler: createPlan,
142
- annotations: CreateAnnotation,
143
- });
144
- toolRegistry.register({
145
- name: 'update_plan',
146
- description: 'Update an existing test plan',
147
- schema: UpdatePlanSchema,
148
- handler: updatePlan,
149
- annotations: UpdateAnnotation,
150
- });
151
- toolRegistry.register({
152
- name: 'delete_plan',
153
- description: 'Delete a test plan from a project',
154
- schema: DeletePlanSchema,
155
- handler: deletePlan,
156
- annotations: DeleteAnnotation,
157
- });
158
- //# sourceMappingURL=plans.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plans.js","sourceRoot":"","sources":["../../src/operations/plans.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,g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AC;IACpB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,iDAAiD;IAC9D,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC;AAEH,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8BAA8B;IAC3C,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC;AAEH,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,mCAAmC;IAChD,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Projects Operations
3
- *
4
- * Implements all MCP tools for managing Qase projects.
5
- * Projects are top-level containers for test management.
6
- */
7
- export {};
8
- //# sourceMappingURL=projects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/operations/projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}