@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.
Files changed (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +101 -0
  3. package/dist/client/api/baseClient.d.ts +39 -0
  4. package/dist/client/api/baseClient.js +103 -0
  5. package/dist/client/api/baseClient.js.map +1 -0
  6. package/dist/client/api/cases.d.ts +102 -0
  7. package/dist/client/api/cases.js +200 -0
  8. package/dist/client/api/cases.js.map +1 -0
  9. package/dist/client/api/index.d.ts +39 -0
  10. package/dist/client/api/index.js +50 -0
  11. package/dist/client/api/index.js.map +1 -0
  12. package/dist/client/api/milestones.d.ts +12 -0
  13. package/dist/client/api/milestones.js +22 -0
  14. package/dist/client/api/milestones.js.map +1 -0
  15. package/dist/client/api/plans.d.ts +12 -0
  16. package/dist/client/api/plans.js +20 -0
  17. package/dist/client/api/plans.js.map +1 -0
  18. package/dist/client/api/projects.d.ts +12 -0
  19. package/dist/client/api/projects.js +31 -0
  20. package/dist/client/api/projects.js.map +1 -0
  21. package/dist/client/api/results.d.ts +56 -0
  22. package/dist/client/api/results.js +125 -0
  23. package/dist/client/api/results.js.map +1 -0
  24. package/dist/client/api/runs.d.ts +40 -0
  25. package/dist/client/api/runs.js +79 -0
  26. package/dist/client/api/runs.js.map +1 -0
  27. package/dist/client/api/sections.d.ts +40 -0
  28. package/dist/client/api/sections.js +89 -0
  29. package/dist/client/api/sections.js.map +1 -0
  30. package/dist/client/api/sharedSteps.d.ts +11 -0
  31. package/dist/client/api/sharedSteps.js +20 -0
  32. package/dist/client/api/sharedSteps.js.map +1 -0
  33. package/dist/client/api/suites.d.ts +36 -0
  34. package/dist/client/api/suites.js +63 -0
  35. package/dist/client/api/suites.js.map +1 -0
  36. package/dist/client/api/tests.d.ts +32 -0
  37. package/dist/client/api/tests.js +47 -0
  38. package/dist/client/api/tests.js.map +1 -0
  39. package/dist/client/api/utils.d.ts +7 -0
  40. package/dist/client/api/utils.js +24 -0
  41. package/dist/client/api/utils.js.map +1 -0
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +5 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/server/api/cases.d.ts +8 -0
  46. package/dist/server/api/cases.js +431 -0
  47. package/dist/server/api/cases.js.map +1 -0
  48. package/dist/server/api/index.d.ts +18 -0
  49. package/dist/server/api/index.js +40 -0
  50. package/dist/server/api/index.js.map +1 -0
  51. package/dist/server/api/milestones.d.ts +8 -0
  52. package/dist/server/api/milestones.js +29 -0
  53. package/dist/server/api/milestones.js.map +1 -0
  54. package/dist/server/api/plans.d.ts +8 -0
  55. package/dist/server/api/plans.js +29 -0
  56. package/dist/server/api/plans.js.map +1 -0
  57. package/dist/server/api/projects.d.ts +8 -0
  58. package/dist/server/api/projects.js +51 -0
  59. package/dist/server/api/projects.js.map +1 -0
  60. package/dist/server/api/results.d.ts +8 -0
  61. package/dist/server/api/results.js +164 -0
  62. package/dist/server/api/results.js.map +1 -0
  63. package/dist/server/api/runs.d.ts +8 -0
  64. package/dist/server/api/runs.js +113 -0
  65. package/dist/server/api/runs.js.map +1 -0
  66. package/dist/server/api/sections.d.ts +8 -0
  67. package/dist/server/api/sections.js +138 -0
  68. package/dist/server/api/sections.js.map +1 -0
  69. package/dist/server/api/sharedSteps.d.ts +8 -0
  70. package/dist/server/api/sharedSteps.js +26 -0
  71. package/dist/server/api/sharedSteps.js.map +1 -0
  72. package/dist/server/api/suites.d.ts +8 -0
  73. package/dist/server/api/suites.js +111 -0
  74. package/dist/server/api/suites.js.map +1 -0
  75. package/dist/server/api/tests.d.ts +8 -0
  76. package/dist/server/api/tests.js +68 -0
  77. package/dist/server/api/tests.js.map +1 -0
  78. package/dist/server/api/utils.d.ts +7 -0
  79. package/dist/server/api/utils.js +25 -0
  80. package/dist/server/api/utils.js.map +1 -0
  81. package/dist/server/server.d.ts +2 -0
  82. package/dist/server/server.js +70 -0
  83. package/dist/server/server.js.map +1 -0
  84. package/dist/server/templates.d.ts +8 -0
  85. package/dist/server/templates.js +43 -0
  86. package/dist/server/templates.js.map +1 -0
  87. package/dist/shared/schemas/cases.d.ts +668 -0
  88. package/dist/shared/schemas/cases.js +178 -0
  89. package/dist/shared/schemas/cases.js.map +1 -0
  90. package/dist/shared/schemas/common.d.ts +117 -0
  91. package/dist/shared/schemas/common.js +50 -0
  92. package/dist/shared/schemas/common.js.map +1 -0
  93. package/dist/shared/schemas/index.d.ts +10 -0
  94. package/dist/shared/schemas/index.js +23 -0
  95. package/dist/shared/schemas/index.js.map +1 -0
  96. package/dist/shared/schemas/milestones.d.ts +59 -0
  97. package/dist/shared/schemas/milestones.js +26 -0
  98. package/dist/shared/schemas/milestones.js.map +1 -0
  99. package/dist/shared/schemas/plans.d.ts +416 -0
  100. package/dist/shared/schemas/plans.js +43 -0
  101. package/dist/shared/schemas/plans.js.map +1 -0
  102. package/dist/shared/schemas/projects.d.ts +135 -0
  103. package/dist/shared/schemas/projects.js +61 -0
  104. package/dist/shared/schemas/projects.js.map +1 -0
  105. package/dist/shared/schemas/results.d.ts +407 -0
  106. package/dist/shared/schemas/results.js +178 -0
  107. package/dist/shared/schemas/results.js.map +1 -0
  108. package/dist/shared/schemas/runs.d.ts +267 -0
  109. package/dist/shared/schemas/runs.js +133 -0
  110. package/dist/shared/schemas/runs.js.map +1 -0
  111. package/dist/shared/schemas/sections.d.ts +136 -0
  112. package/dist/shared/schemas/sections.js +68 -0
  113. package/dist/shared/schemas/sections.js.map +1 -0
  114. package/dist/shared/schemas/sharedSteps.d.ts +135 -0
  115. package/dist/shared/schemas/sharedSteps.js +65 -0
  116. package/dist/shared/schemas/sharedSteps.js.map +1 -0
  117. package/dist/shared/schemas/suites.d.ts +120 -0
  118. package/dist/shared/schemas/suites.js +44 -0
  119. package/dist/shared/schemas/suites.js.map +1 -0
  120. package/dist/shared/schemas/tests.d.ts +87 -0
  121. package/dist/shared/schemas/tests.js +52 -0
  122. package/dist/shared/schemas/tests.js.map +1 -0
  123. package/dist/sse.d.ts +1 -0
  124. package/dist/sse.js +5 -0
  125. package/dist/sse.js.map +1 -0
  126. package/dist/stdio.d.ts +1 -0
  127. package/dist/stdio.js +52 -0
  128. package/dist/stdio.js.map +1 -0
  129. package/package.json +48 -0
@@ -0,0 +1,407 @@
1
+ import { z } from "zod";
2
+ export declare const getResultsSchema: {
3
+ testId: z.ZodNumber;
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ offset: z.ZodOptional<z.ZodNumber>;
6
+ statusId: z.ZodOptional<z.ZodString>;
7
+ defectsFilter: z.ZodOptional<z.ZodString>;
8
+ };
9
+ export declare const getResultsForCaseSchema: {
10
+ runId: z.ZodNumber;
11
+ caseId: z.ZodNumber;
12
+ limit: z.ZodOptional<z.ZodNumber>;
13
+ offset: z.ZodOptional<z.ZodNumber>;
14
+ statusId: z.ZodOptional<z.ZodString>;
15
+ defectsFilter: z.ZodOptional<z.ZodString>;
16
+ };
17
+ export declare const getResultsForRunSchema: {
18
+ runId: z.ZodNumber;
19
+ limit: z.ZodOptional<z.ZodNumber>;
20
+ offset: z.ZodOptional<z.ZodNumber>;
21
+ statusId: z.ZodOptional<z.ZodString>;
22
+ defectsFilter: z.ZodOptional<z.ZodString>;
23
+ };
24
+ export declare const addResultSchema: {
25
+ testId: z.ZodNumber;
26
+ statusId: z.ZodOptional<z.ZodNumber>;
27
+ comment: z.ZodOptional<z.ZodString>;
28
+ defects: z.ZodOptional<z.ZodString>;
29
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
30
+ version: z.ZodOptional<z.ZodString>;
31
+ elapsed: z.ZodOptional<z.ZodString>;
32
+ };
33
+ export declare const addResultForCaseSchema: {
34
+ runId: z.ZodNumber;
35
+ caseId: z.ZodNumber;
36
+ statusId: z.ZodOptional<z.ZodNumber>;
37
+ comment: z.ZodOptional<z.ZodString>;
38
+ defects: z.ZodOptional<z.ZodString>;
39
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
40
+ version: z.ZodOptional<z.ZodString>;
41
+ elapsed: z.ZodOptional<z.ZodString>;
42
+ };
43
+ export declare const addResultsSchema: {
44
+ runId: z.ZodNumber;
45
+ results: z.ZodArray<z.ZodObject<{
46
+ testId: z.ZodNumber;
47
+ statusId: z.ZodOptional<z.ZodNumber>;
48
+ comment: z.ZodOptional<z.ZodString>;
49
+ defects: z.ZodOptional<z.ZodString>;
50
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
51
+ version: z.ZodOptional<z.ZodString>;
52
+ elapsed: z.ZodOptional<z.ZodString>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ testId: number;
55
+ assignedtoId?: number | undefined;
56
+ statusId?: number | undefined;
57
+ comment?: string | undefined;
58
+ defects?: string | undefined;
59
+ version?: string | undefined;
60
+ elapsed?: string | undefined;
61
+ }, {
62
+ testId: number;
63
+ assignedtoId?: number | undefined;
64
+ statusId?: number | undefined;
65
+ comment?: string | undefined;
66
+ defects?: string | undefined;
67
+ version?: string | undefined;
68
+ elapsed?: string | undefined;
69
+ }>, "many">;
70
+ };
71
+ export declare const addResultsForCasesSchema: {
72
+ runId: z.ZodNumber;
73
+ results: z.ZodArray<z.ZodObject<{
74
+ caseId: z.ZodNumber;
75
+ statusId: z.ZodOptional<z.ZodNumber>;
76
+ comment: z.ZodOptional<z.ZodString>;
77
+ defects: z.ZodOptional<z.ZodString>;
78
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
79
+ version: z.ZodOptional<z.ZodString>;
80
+ elapsed: z.ZodOptional<z.ZodString>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ caseId: number;
83
+ assignedtoId?: number | undefined;
84
+ statusId?: number | undefined;
85
+ comment?: string | undefined;
86
+ defects?: string | undefined;
87
+ version?: string | undefined;
88
+ elapsed?: string | undefined;
89
+ }, {
90
+ caseId: number;
91
+ assignedtoId?: number | undefined;
92
+ statusId?: number | undefined;
93
+ comment?: string | undefined;
94
+ defects?: string | undefined;
95
+ version?: string | undefined;
96
+ elapsed?: string | undefined;
97
+ }>, "many">;
98
+ };
99
+ export declare const GetResultsInput: z.ZodObject<{
100
+ testId: z.ZodNumber;
101
+ limit: z.ZodOptional<z.ZodNumber>;
102
+ offset: z.ZodOptional<z.ZodNumber>;
103
+ statusId: z.ZodOptional<z.ZodString>;
104
+ defectsFilter: z.ZodOptional<z.ZodString>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ testId: number;
107
+ limit?: number | undefined;
108
+ offset?: number | undefined;
109
+ statusId?: string | undefined;
110
+ defectsFilter?: string | undefined;
111
+ }, {
112
+ testId: number;
113
+ limit?: number | undefined;
114
+ offset?: number | undefined;
115
+ statusId?: string | undefined;
116
+ defectsFilter?: string | undefined;
117
+ }>;
118
+ export declare const GetResultsForCaseInput: z.ZodObject<{
119
+ runId: z.ZodNumber;
120
+ caseId: z.ZodNumber;
121
+ limit: z.ZodOptional<z.ZodNumber>;
122
+ offset: z.ZodOptional<z.ZodNumber>;
123
+ statusId: z.ZodOptional<z.ZodString>;
124
+ defectsFilter: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ caseId: number;
127
+ runId: number;
128
+ limit?: number | undefined;
129
+ offset?: number | undefined;
130
+ statusId?: string | undefined;
131
+ defectsFilter?: string | undefined;
132
+ }, {
133
+ caseId: number;
134
+ runId: number;
135
+ limit?: number | undefined;
136
+ offset?: number | undefined;
137
+ statusId?: string | undefined;
138
+ defectsFilter?: string | undefined;
139
+ }>;
140
+ export declare const GetResultsForRunInput: z.ZodObject<{
141
+ runId: z.ZodNumber;
142
+ limit: z.ZodOptional<z.ZodNumber>;
143
+ offset: z.ZodOptional<z.ZodNumber>;
144
+ statusId: z.ZodOptional<z.ZodString>;
145
+ defectsFilter: z.ZodOptional<z.ZodString>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ runId: number;
148
+ limit?: number | undefined;
149
+ offset?: number | undefined;
150
+ statusId?: string | undefined;
151
+ defectsFilter?: string | undefined;
152
+ }, {
153
+ runId: number;
154
+ limit?: number | undefined;
155
+ offset?: number | undefined;
156
+ statusId?: string | undefined;
157
+ defectsFilter?: string | undefined;
158
+ }>;
159
+ export declare const AddResultInput: z.ZodObject<{
160
+ testId: z.ZodNumber;
161
+ statusId: z.ZodOptional<z.ZodNumber>;
162
+ comment: z.ZodOptional<z.ZodString>;
163
+ defects: z.ZodOptional<z.ZodString>;
164
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
165
+ version: z.ZodOptional<z.ZodString>;
166
+ elapsed: z.ZodOptional<z.ZodString>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ testId: number;
169
+ assignedtoId?: number | undefined;
170
+ statusId?: number | undefined;
171
+ comment?: string | undefined;
172
+ defects?: string | undefined;
173
+ version?: string | undefined;
174
+ elapsed?: string | undefined;
175
+ }, {
176
+ testId: number;
177
+ assignedtoId?: number | undefined;
178
+ statusId?: number | undefined;
179
+ comment?: string | undefined;
180
+ defects?: string | undefined;
181
+ version?: string | undefined;
182
+ elapsed?: string | undefined;
183
+ }>;
184
+ export declare const AddResultForCaseInput: z.ZodObject<{
185
+ runId: z.ZodNumber;
186
+ caseId: z.ZodNumber;
187
+ statusId: z.ZodOptional<z.ZodNumber>;
188
+ comment: z.ZodOptional<z.ZodString>;
189
+ defects: z.ZodOptional<z.ZodString>;
190
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
191
+ version: z.ZodOptional<z.ZodString>;
192
+ elapsed: z.ZodOptional<z.ZodString>;
193
+ }, "strip", z.ZodTypeAny, {
194
+ caseId: number;
195
+ runId: number;
196
+ assignedtoId?: number | undefined;
197
+ statusId?: number | undefined;
198
+ comment?: string | undefined;
199
+ defects?: string | undefined;
200
+ version?: string | undefined;
201
+ elapsed?: string | undefined;
202
+ }, {
203
+ caseId: number;
204
+ runId: number;
205
+ assignedtoId?: number | undefined;
206
+ statusId?: number | undefined;
207
+ comment?: string | undefined;
208
+ defects?: string | undefined;
209
+ version?: string | undefined;
210
+ elapsed?: string | undefined;
211
+ }>;
212
+ export declare const AddResultsInput: z.ZodObject<{
213
+ runId: z.ZodNumber;
214
+ results: z.ZodArray<z.ZodObject<{
215
+ testId: z.ZodNumber;
216
+ statusId: z.ZodOptional<z.ZodNumber>;
217
+ comment: z.ZodOptional<z.ZodString>;
218
+ defects: z.ZodOptional<z.ZodString>;
219
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
220
+ version: z.ZodOptional<z.ZodString>;
221
+ elapsed: z.ZodOptional<z.ZodString>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ testId: number;
224
+ assignedtoId?: number | undefined;
225
+ statusId?: number | undefined;
226
+ comment?: string | undefined;
227
+ defects?: string | undefined;
228
+ version?: string | undefined;
229
+ elapsed?: string | undefined;
230
+ }, {
231
+ testId: number;
232
+ assignedtoId?: number | undefined;
233
+ statusId?: number | undefined;
234
+ comment?: string | undefined;
235
+ defects?: string | undefined;
236
+ version?: string | undefined;
237
+ elapsed?: string | undefined;
238
+ }>, "many">;
239
+ }, "strip", z.ZodTypeAny, {
240
+ runId: number;
241
+ results: {
242
+ testId: number;
243
+ assignedtoId?: number | undefined;
244
+ statusId?: number | undefined;
245
+ comment?: string | undefined;
246
+ defects?: string | undefined;
247
+ version?: string | undefined;
248
+ elapsed?: string | undefined;
249
+ }[];
250
+ }, {
251
+ runId: number;
252
+ results: {
253
+ testId: number;
254
+ assignedtoId?: number | undefined;
255
+ statusId?: number | undefined;
256
+ comment?: string | undefined;
257
+ defects?: string | undefined;
258
+ version?: string | undefined;
259
+ elapsed?: string | undefined;
260
+ }[];
261
+ }>;
262
+ export declare const AddResultsForCasesInput: z.ZodObject<{
263
+ runId: z.ZodNumber;
264
+ results: z.ZodArray<z.ZodObject<{
265
+ caseId: z.ZodNumber;
266
+ statusId: z.ZodOptional<z.ZodNumber>;
267
+ comment: z.ZodOptional<z.ZodString>;
268
+ defects: z.ZodOptional<z.ZodString>;
269
+ assignedtoId: z.ZodOptional<z.ZodNumber>;
270
+ version: z.ZodOptional<z.ZodString>;
271
+ elapsed: z.ZodOptional<z.ZodString>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ caseId: number;
274
+ assignedtoId?: number | undefined;
275
+ statusId?: number | undefined;
276
+ comment?: string | undefined;
277
+ defects?: string | undefined;
278
+ version?: string | undefined;
279
+ elapsed?: string | undefined;
280
+ }, {
281
+ caseId: number;
282
+ assignedtoId?: number | undefined;
283
+ statusId?: number | undefined;
284
+ comment?: string | undefined;
285
+ defects?: string | undefined;
286
+ version?: string | undefined;
287
+ elapsed?: string | undefined;
288
+ }>, "many">;
289
+ }, "strip", z.ZodTypeAny, {
290
+ runId: number;
291
+ results: {
292
+ caseId: number;
293
+ assignedtoId?: number | undefined;
294
+ statusId?: number | undefined;
295
+ comment?: string | undefined;
296
+ defects?: string | undefined;
297
+ version?: string | undefined;
298
+ elapsed?: string | undefined;
299
+ }[];
300
+ }, {
301
+ runId: number;
302
+ results: {
303
+ caseId: number;
304
+ assignedtoId?: number | undefined;
305
+ statusId?: number | undefined;
306
+ comment?: string | undefined;
307
+ defects?: string | undefined;
308
+ version?: string | undefined;
309
+ elapsed?: string | undefined;
310
+ }[];
311
+ }>;
312
+ export type GetResultsInputType = z.infer<typeof GetResultsInput>;
313
+ export type GetResultsForCaseInputType = z.infer<typeof GetResultsForCaseInput>;
314
+ export type GetResultsForRunInputType = z.infer<typeof GetResultsForRunInput>;
315
+ export type AddResultInputType = z.infer<typeof AddResultInput>;
316
+ export type AddResultForCaseInputType = z.infer<typeof AddResultForCaseInput>;
317
+ export type AddResultsInputType = z.infer<typeof AddResultsInput>;
318
+ export type AddResultsForCasesInputType = z.infer<typeof AddResultsForCasesInput>;
319
+ /**
320
+ * TestRail API Response for Step Result
321
+ */
322
+ export declare const TestRailStepResultSchema: z.ZodObject<{
323
+ status_id: z.ZodNumber;
324
+ content: z.ZodString;
325
+ expected: z.ZodString;
326
+ actual: z.ZodString;
327
+ }, "strip", z.ZodTypeAny, {
328
+ expected: string;
329
+ content: string;
330
+ status_id: number;
331
+ actual: string;
332
+ }, {
333
+ expected: string;
334
+ content: string;
335
+ status_id: number;
336
+ actual: string;
337
+ }>;
338
+ export type TestRailStepResult = z.infer<typeof TestRailStepResultSchema>;
339
+ /**
340
+ * TestRail API Response for Result
341
+ */
342
+ export declare const TestRailResultSchema: z.ZodObject<{
343
+ id: z.ZodNumber;
344
+ test_id: z.ZodNumber;
345
+ status_id: z.ZodNumber;
346
+ created_by: z.ZodNumber;
347
+ created_on: z.ZodNumber;
348
+ assignedto_id: z.ZodNumber;
349
+ comment: z.ZodString;
350
+ version: z.ZodString;
351
+ elapsed: z.ZodString;
352
+ defects: z.ZodString;
353
+ custom_step_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
354
+ status_id: z.ZodNumber;
355
+ content: z.ZodString;
356
+ expected: z.ZodString;
357
+ actual: z.ZodString;
358
+ }, "strip", z.ZodTypeAny, {
359
+ expected: string;
360
+ content: string;
361
+ status_id: number;
362
+ actual: string;
363
+ }, {
364
+ expected: string;
365
+ content: string;
366
+ status_id: number;
367
+ actual: string;
368
+ }>, "many">>;
369
+ custom_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ id: number;
372
+ created_by: number;
373
+ created_on: number;
374
+ status_id: number;
375
+ assignedto_id: number;
376
+ comment: string;
377
+ defects: string;
378
+ version: string;
379
+ elapsed: string;
380
+ test_id: number;
381
+ custom_step_results?: {
382
+ expected: string;
383
+ content: string;
384
+ status_id: number;
385
+ actual: string;
386
+ }[] | undefined;
387
+ custom_fields?: Record<string, unknown> | undefined;
388
+ }, {
389
+ id: number;
390
+ created_by: number;
391
+ created_on: number;
392
+ status_id: number;
393
+ assignedto_id: number;
394
+ comment: string;
395
+ defects: string;
396
+ version: string;
397
+ elapsed: string;
398
+ test_id: number;
399
+ custom_step_results?: {
400
+ expected: string;
401
+ content: string;
402
+ status_id: number;
403
+ actual: string;
404
+ }[] | undefined;
405
+ custom_fields?: Record<string, unknown> | undefined;
406
+ }>;
407
+ export type TestRailResult = z.infer<typeof TestRailResultSchema>;
@@ -0,0 +1,178 @@
1
+ import { z } from "zod";
2
+ // Schema for retrieving test results
3
+ export const getResultsSchema = {
4
+ testId: z.number().describe("TestRail Test ID"),
5
+ limit: z
6
+ .number()
7
+ .optional()
8
+ .describe("The number of results to return per page"),
9
+ offset: z
10
+ .number()
11
+ .optional()
12
+ .describe("The offset to start returning results"),
13
+ statusId: z
14
+ .string()
15
+ .optional()
16
+ .describe("Filter by status IDs (comma-separated)"),
17
+ defectsFilter: z.string().optional().describe("Filter by defect ID"),
18
+ };
19
+ // Schema for retrieving test results for a specific case
20
+ export const getResultsForCaseSchema = {
21
+ runId: z.number().describe("TestRail Run ID"),
22
+ caseId: z.number().describe("TestRail Case ID"),
23
+ limit: z
24
+ .number()
25
+ .optional()
26
+ .describe("The number of results to return per page"),
27
+ offset: z
28
+ .number()
29
+ .optional()
30
+ .describe("The offset to start returning results"),
31
+ statusId: z
32
+ .string()
33
+ .optional()
34
+ .describe("Filter by status IDs (comma-separated)"),
35
+ defectsFilter: z.string().optional().describe("Filter by defect ID"),
36
+ };
37
+ // Schema for retrieving test results for a run
38
+ export const getResultsForRunSchema = {
39
+ runId: z.number().describe("TestRail Run ID"),
40
+ limit: z
41
+ .number()
42
+ .optional()
43
+ .describe("The number of results to return per page"),
44
+ offset: z
45
+ .number()
46
+ .optional()
47
+ .describe("The offset to start returning results"),
48
+ statusId: z
49
+ .string()
50
+ .optional()
51
+ .describe("Filter by status IDs (comma-separated)"),
52
+ defectsFilter: z.string().optional().describe("Filter by defect ID"),
53
+ };
54
+ // Schema for adding a test result
55
+ export const addResultSchema = {
56
+ testId: z.number().describe("TestRail Test ID"),
57
+ statusId: z
58
+ .number()
59
+ .optional()
60
+ .describe("Status ID (1:Pass, 2:Blocked, 3:Untested, 4:Retest, 5:Fail)"),
61
+ comment: z.string().optional().describe("Comment for the test result"),
62
+ defects: z.string().optional().describe("Defects linked to the test result"),
63
+ assignedtoId: z.number().optional().describe("User to assign the test to"),
64
+ version: z.string().optional().describe("Version or build tested"),
65
+ elapsed: z
66
+ .string()
67
+ .optional()
68
+ .describe("Time spent testing (e.g., '30s', '2m 30s')"),
69
+ };
70
+ // Schema for adding a test result for a specific case
71
+ export const addResultForCaseSchema = {
72
+ runId: z.number().describe("TestRail Run ID"),
73
+ caseId: z.number().describe("TestRail Case ID"),
74
+ statusId: z
75
+ .number()
76
+ .optional()
77
+ .describe("Status ID (1:Pass, 2:Blocked, 3:Untested, 4:Retest, 5:Fail)"),
78
+ comment: z.string().optional().describe("Comment for the test result"),
79
+ defects: z.string().optional().describe("Defects linked to the test result"),
80
+ assignedtoId: z.number().optional().describe("User to assign the test to"),
81
+ version: z.string().optional().describe("Version or build tested"),
82
+ elapsed: z
83
+ .string()
84
+ .optional()
85
+ .describe("Time spent testing (e.g., '30s', '2m 30s')"),
86
+ };
87
+ // Schema for adding multiple test results
88
+ export const addResultsSchema = {
89
+ runId: z.number().describe("TestRail Run ID"),
90
+ results: z
91
+ .array(z.object({
92
+ testId: z.number().describe("TestRail Test ID"),
93
+ statusId: z
94
+ .number()
95
+ .optional()
96
+ .describe("Status ID (1:Pass, 2:Blocked, 3:Untested, 4:Retest, 5:Fail)"),
97
+ comment: z.string().optional().describe("Comment for the test result"),
98
+ defects: z
99
+ .string()
100
+ .optional()
101
+ .describe("Defects linked to the test result"),
102
+ assignedtoId: z
103
+ .number()
104
+ .optional()
105
+ .describe("User to assign the test to"),
106
+ version: z.string().optional().describe("Version or build tested"),
107
+ elapsed: z
108
+ .string()
109
+ .optional()
110
+ .describe("Time spent testing (e.g., '30s', '2m 30s')"),
111
+ }))
112
+ .describe("Array of test results to add"),
113
+ };
114
+ // Schema for adding multiple test results for cases
115
+ export const addResultsForCasesSchema = {
116
+ runId: z.number().describe("TestRail Run ID"),
117
+ results: z
118
+ .array(z.object({
119
+ caseId: z.number().describe("TestRail Case ID"),
120
+ statusId: z
121
+ .number()
122
+ .optional()
123
+ .describe("Status ID (1:Pass, 2:Blocked, 3:Untested, 4:Retest, 5:Fail)"),
124
+ comment: z.string().optional().describe("Comment for the test result"),
125
+ defects: z
126
+ .string()
127
+ .optional()
128
+ .describe("Defects linked to the test result"),
129
+ assignedtoId: z
130
+ .number()
131
+ .optional()
132
+ .describe("User to assign the test to"),
133
+ version: z.string().optional().describe("Version or build tested"),
134
+ elapsed: z
135
+ .string()
136
+ .optional()
137
+ .describe("Time spent testing (e.g., '30s', '2m 30s')"),
138
+ }))
139
+ .describe("Array of test case results to add"),
140
+ };
141
+ // Create Zod objects from each schema
142
+ export const GetResultsInput = z.object(getResultsSchema);
143
+ export const GetResultsForCaseInput = z.object(getResultsForCaseSchema);
144
+ export const GetResultsForRunInput = z.object(getResultsForRunSchema);
145
+ export const AddResultInput = z.object(addResultSchema);
146
+ export const AddResultForCaseInput = z.object(addResultForCaseSchema);
147
+ export const AddResultsInput = z.object(addResultsSchema);
148
+ export const AddResultsForCasesInput = z.object(addResultsForCasesSchema);
149
+ // -----------------------------------------------
150
+ // Response schema definitions - migrated from types.ts
151
+ // -----------------------------------------------
152
+ /**
153
+ * TestRail API Response for Step Result
154
+ */
155
+ export const TestRailStepResultSchema = z.object({
156
+ status_id: z.number(),
157
+ content: z.string(),
158
+ expected: z.string(),
159
+ actual: z.string(),
160
+ });
161
+ /**
162
+ * TestRail API Response for Result
163
+ */
164
+ export const TestRailResultSchema = z.object({
165
+ id: z.number(),
166
+ test_id: z.number(),
167
+ status_id: z.number(),
168
+ created_by: z.number(),
169
+ created_on: z.number(),
170
+ assignedto_id: z.number(),
171
+ comment: z.string(),
172
+ version: z.string(),
173
+ elapsed: z.string(),
174
+ defects: z.string(),
175
+ custom_step_results: z.array(TestRailStepResultSchema).optional(),
176
+ custom_fields: z.record(z.unknown()).optional(),
177
+ });
178
+ //# sourceMappingURL=results.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"results.js","sourceRoot":"","sources":["../../../src/shared/schemas/results.ts"],"names":[],"m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