@smartbear/mcp 0.38.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json.js +1 -1
- package/dist/pactflow/client/admin-api.js +491 -0
- package/dist/pactflow/client/ai-api.js +139 -0
- package/dist/pactflow/client/contract-api.js +366 -0
- package/dist/pactflow/client/environment-api.js +156 -0
- package/dist/pactflow/client/http-client.js +47 -0
- package/dist/pactflow/client/pacticipant-api.js +288 -0
- package/dist/pactflow/client/webhook-api.js +113 -0
- package/dist/pactflow/client.js +29 -1967
- package/dist/qmetry/client/auto-resolve.js +7 -0
- package/dist/qmetry/client/handlers.js +5 -2
- package/dist/qmetry/client/issues.js +8 -1
- package/dist/qmetry/client/project.js +103 -2
- package/dist/qmetry/client/requirement.js +99 -3
- package/dist/qmetry/client/testcase.js +51 -2
- package/dist/qmetry/client/testsuite.js +7 -1
- package/dist/qmetry/client/tools/issue-tools.js +1 -15
- package/dist/qmetry/client/tools/project-tools.js +2 -2
- package/dist/qmetry/client/tools/requirement-tools.js +124 -11
- package/dist/qmetry/client/tools/testcase-tools.js +116 -56
- package/dist/qmetry/client/tools/testsuite-tools.js +1 -19
- package/dist/qmetry/client/tools/udf-tools.js +15 -4
- package/dist/qmetry/client/udf.js +2 -2
- package/dist/qmetry/client.js +19 -11
- package/dist/qmetry/config/constants.js +3 -0
- package/dist/qmetry/config/rest-endpoints.js +4 -2
- package/dist/qmetry/types/ai-agent.js +8 -4
- package/dist/qmetry/types/common.js +69 -43
- package/dist/qmetry/types/requirements.js +7 -1
- package/dist/qmetry/types/testcase.js +2 -1
- package/dist/qmetry/types/udf.js +5 -12
- package/dist/swagger/client/api.js +29 -4
- package/dist/swagger/client/functional-testing-api.js +56 -27
- package/dist/swagger/client/functional-testing-tools.js +5 -5
- package/dist/swagger/client/functional-testing-types.js +75 -9
- package/dist/swagger/client/functional-testing-url-utils.js +110 -0
- package/dist/swagger/client/registry-types.js +2 -2
- package/dist/swagger/client/tools.js +2 -2
- package/dist/zephyr/client.js +2 -0
- package/dist/zephyr/common/rest-api-schemas.js +345 -4
- package/dist/zephyr/tool/folder/get-folders.js +69 -0
- package/package.json +1 -1
|
@@ -2036,6 +2036,67 @@ zod.strictObject({
|
|
|
2036
2036
|
errorCode: zod.int(),
|
|
2037
2037
|
message: zod.string()
|
|
2038
2038
|
});
|
|
2039
|
+
const deleteTestCaseAttachmentMetadataPathTestCaseKeyRegExp = /(.+-T[0-9]+)/;
|
|
2040
|
+
zod.strictObject({
|
|
2041
|
+
testCaseKey: zod.string().regex(deleteTestCaseAttachmentMetadataPathTestCaseKeyRegExp).describe(
|
|
2042
|
+
"The key of the test case. Test case keys are of the format [A-Z]+-T[0-9]+"
|
|
2043
|
+
),
|
|
2044
|
+
attachmentId: zod.int().min(1).describe("The numeric ID of the attachment.")
|
|
2045
|
+
});
|
|
2046
|
+
zod.void();
|
|
2047
|
+
zod.union([
|
|
2048
|
+
zod.strictObject({
|
|
2049
|
+
errorCode: zod.int(),
|
|
2050
|
+
message: zod.string()
|
|
2051
|
+
}).describe(
|
|
2052
|
+
"A path parameter failed validation at the API layer (for example a testCaseKey that does not match its required pattern)."
|
|
2053
|
+
),
|
|
2054
|
+
zod.strictObject({
|
|
2055
|
+
errorCode: zod.int(),
|
|
2056
|
+
message: zod.string()
|
|
2057
|
+
}).describe(
|
|
2058
|
+
"A numeric path parameter was sent with a non-numeric value (for example a non-numeric test case version)."
|
|
2059
|
+
)
|
|
2060
|
+
]);
|
|
2061
|
+
zod.union([
|
|
2062
|
+
zod.strictObject({
|
|
2063
|
+
error: zod.string()
|
|
2064
|
+
}).describe("The Authorization header is missing."),
|
|
2065
|
+
zod.strictObject({
|
|
2066
|
+
error: zod.string()
|
|
2067
|
+
}).describe(
|
|
2068
|
+
"The bearer token does not have the three dot-separated parts of a JWT."
|
|
2069
|
+
),
|
|
2070
|
+
zod.strictObject({
|
|
2071
|
+
error: zod.string()
|
|
2072
|
+
}).describe("A segment of the bearer token is not valid base64."),
|
|
2073
|
+
zod.strictObject({
|
|
2074
|
+
error: zod.string()
|
|
2075
|
+
}).describe("A decoded segment of the bearer token is not valid JSON."),
|
|
2076
|
+
zod.strictObject({
|
|
2077
|
+
error: zod.string()
|
|
2078
|
+
}).describe(
|
|
2079
|
+
"The JWT is well-formed but its signature could not be verified (wrong secret, tampered, or unknown issuer)."
|
|
2080
|
+
)
|
|
2081
|
+
]);
|
|
2082
|
+
zod.strictObject({
|
|
2083
|
+
errorCode: zod.int(),
|
|
2084
|
+
message: zod.string()
|
|
2085
|
+
});
|
|
2086
|
+
zod.strictObject({
|
|
2087
|
+
errorCode: zod.int(),
|
|
2088
|
+
message: zod.string()
|
|
2089
|
+
});
|
|
2090
|
+
zod.strictObject({
|
|
2091
|
+
errorCode: zod.int(),
|
|
2092
|
+
message: zod.string()
|
|
2093
|
+
}).describe("The backend service returned a 5xx or could not be reached.");
|
|
2094
|
+
zod.strictObject(
|
|
2095
|
+
{
|
|
2096
|
+
errorCode: zod.int(),
|
|
2097
|
+
message: zod.string()
|
|
2098
|
+
}
|
|
2099
|
+
);
|
|
2039
2100
|
const uploadTestCaseAttachmentPathTestCaseKeyRegExp = /(.+-T[0-9]+)/;
|
|
2040
2101
|
const uploadTestCaseAttachmentPathFileNameMax = 255;
|
|
2041
2102
|
zod.strictObject({
|
|
@@ -2201,6 +2262,68 @@ zod.strictObject({
|
|
|
2201
2262
|
errorCode: zod.int(),
|
|
2202
2263
|
message: zod.string()
|
|
2203
2264
|
});
|
|
2265
|
+
const deleteTestCaseStepAttachmentMetadataPathTestCaseIdOrKeyRegExp = /([0-9]+)|([A-Z][A-Z_0-9]+-T[0-9]+)/;
|
|
2266
|
+
zod.strictObject({
|
|
2267
|
+
testCaseIdOrKey: zod.string().regex(deleteTestCaseStepAttachmentMetadataPathTestCaseIdOrKeyRegExp).describe("The ID or key of the test case."),
|
|
2268
|
+
testCaseStepId: zod.int().min(1).describe("The ID of the step within the test case."),
|
|
2269
|
+
attachmentId: zod.int().min(1).describe("The numeric ID of the attachment.")
|
|
2270
|
+
});
|
|
2271
|
+
zod.void();
|
|
2272
|
+
zod.union([
|
|
2273
|
+
zod.strictObject({
|
|
2274
|
+
errorCode: zod.int(),
|
|
2275
|
+
message: zod.string()
|
|
2276
|
+
}).describe(
|
|
2277
|
+
"A path parameter failed validation at the API layer (for example a testCaseKey that does not match its required pattern)."
|
|
2278
|
+
),
|
|
2279
|
+
zod.strictObject({
|
|
2280
|
+
errorCode: zod.int(),
|
|
2281
|
+
message: zod.string()
|
|
2282
|
+
}).describe(
|
|
2283
|
+
"A numeric path parameter was sent with a non-numeric value (for example a non-numeric test case version)."
|
|
2284
|
+
)
|
|
2285
|
+
]);
|
|
2286
|
+
zod.union([
|
|
2287
|
+
zod.strictObject({
|
|
2288
|
+
error: zod.string()
|
|
2289
|
+
}).describe("The Authorization header is missing."),
|
|
2290
|
+
zod.strictObject({
|
|
2291
|
+
error: zod.string()
|
|
2292
|
+
}).describe(
|
|
2293
|
+
"The bearer token does not have the three dot-separated parts of a JWT."
|
|
2294
|
+
),
|
|
2295
|
+
zod.strictObject({
|
|
2296
|
+
error: zod.string()
|
|
2297
|
+
}).describe("A segment of the bearer token is not valid base64."),
|
|
2298
|
+
zod.strictObject({
|
|
2299
|
+
error: zod.string()
|
|
2300
|
+
}).describe("A decoded segment of the bearer token is not valid JSON."),
|
|
2301
|
+
zod.strictObject({
|
|
2302
|
+
error: zod.string()
|
|
2303
|
+
}).describe(
|
|
2304
|
+
"The JWT is well-formed but its signature could not be verified (wrong secret, tampered, or unknown issuer)."
|
|
2305
|
+
)
|
|
2306
|
+
]);
|
|
2307
|
+
zod.strictObject(
|
|
2308
|
+
{
|
|
2309
|
+
errorCode: zod.int(),
|
|
2310
|
+
message: zod.string()
|
|
2311
|
+
}
|
|
2312
|
+
);
|
|
2313
|
+
zod.strictObject(
|
|
2314
|
+
{
|
|
2315
|
+
errorCode: zod.int(),
|
|
2316
|
+
message: zod.string()
|
|
2317
|
+
}
|
|
2318
|
+
);
|
|
2319
|
+
zod.strictObject({
|
|
2320
|
+
errorCode: zod.int(),
|
|
2321
|
+
message: zod.string()
|
|
2322
|
+
}).describe("The backend service returned a 5xx or could not be reached.");
|
|
2323
|
+
zod.strictObject({
|
|
2324
|
+
errorCode: zod.int(),
|
|
2325
|
+
message: zod.string()
|
|
2326
|
+
});
|
|
2204
2327
|
const getTestCaseTestStepAttachmentsReferencePathTestCaseIdOrKeyRegExp = /([0-9]+)|([A-Z][A-Z_0-9]+-T[0-9]+)/;
|
|
2205
2328
|
const getTestCaseTestStepAttachmentsReferencePathTestStepIdRegExp = /([0-9]+)/;
|
|
2206
2329
|
zod.strictObject({
|
|
@@ -3579,6 +3702,32 @@ zod.strictObject({
|
|
|
3579
3702
|
errorCode: zod.int(),
|
|
3580
3703
|
message: zod.string()
|
|
3581
3704
|
});
|
|
3705
|
+
const deleteTestCycleAttachmentMetadataPathTestCycleIdOrKeyRegExp = /([0-9]+)|([A-Z][A-Z_0-9]+-R[0-9]+)/;
|
|
3706
|
+
zod.strictObject({
|
|
3707
|
+
testCycleIdOrKey: zod.string().regex(deleteTestCycleAttachmentMetadataPathTestCycleIdOrKeyRegExp).describe("The ID or key of the test cycle."),
|
|
3708
|
+
attachmentId: zod.int().min(1).describe("The numeric ID of the attachment.")
|
|
3709
|
+
});
|
|
3710
|
+
zod.void();
|
|
3711
|
+
zod.strictObject({
|
|
3712
|
+
errorCode: zod.int(),
|
|
3713
|
+
message: zod.string()
|
|
3714
|
+
});
|
|
3715
|
+
zod.strictObject({
|
|
3716
|
+
errorCode: zod.int(),
|
|
3717
|
+
message: zod.string()
|
|
3718
|
+
});
|
|
3719
|
+
zod.strictObject({
|
|
3720
|
+
errorCode: zod.int(),
|
|
3721
|
+
message: zod.string()
|
|
3722
|
+
});
|
|
3723
|
+
zod.strictObject({
|
|
3724
|
+
errorCode: zod.int(),
|
|
3725
|
+
message: zod.string()
|
|
3726
|
+
});
|
|
3727
|
+
zod.strictObject({
|
|
3728
|
+
errorCode: zod.int(),
|
|
3729
|
+
message: zod.string()
|
|
3730
|
+
});
|
|
3582
3731
|
const uploadTestCycleAttachmentPathTestCycleIdOrKeyRegExp = /([0-9]+)|([A-Z][A-Z_0-9]+-R[0-9]+)/;
|
|
3583
3732
|
const uploadTestCycleAttachmentPathFileNameMax = 255;
|
|
3584
3733
|
zod.strictObject({
|
|
@@ -4578,6 +4727,67 @@ zod.strictObject({
|
|
|
4578
4727
|
errorCode: zod.int(),
|
|
4579
4728
|
message: zod.string()
|
|
4580
4729
|
});
|
|
4730
|
+
const deleteTestPlanAttachmentMetadataPathTestPlanIdOrKeyRegExp = /([0-9]+)|(.+-P[0-9]+)/;
|
|
4731
|
+
zod.strictObject({
|
|
4732
|
+
testPlanIdOrKey: zod.string().regex(deleteTestPlanAttachmentMetadataPathTestPlanIdOrKeyRegExp).describe(
|
|
4733
|
+
"The ID or key of the test plan. Test plan keys are of the format [A-Z]+-P[0-9]+"
|
|
4734
|
+
),
|
|
4735
|
+
attachmentId: zod.int().min(1).describe("The numeric ID of the attachment.")
|
|
4736
|
+
});
|
|
4737
|
+
zod.void();
|
|
4738
|
+
zod.union([
|
|
4739
|
+
zod.strictObject({
|
|
4740
|
+
errorCode: zod.int(),
|
|
4741
|
+
message: zod.string()
|
|
4742
|
+
}).describe(
|
|
4743
|
+
"A path parameter failed validation at the API layer (for example a testCaseKey that does not match its required pattern)."
|
|
4744
|
+
),
|
|
4745
|
+
zod.strictObject({
|
|
4746
|
+
errorCode: zod.int(),
|
|
4747
|
+
message: zod.string()
|
|
4748
|
+
}).describe(
|
|
4749
|
+
"A numeric path parameter was sent with a non-numeric value (for example a non-numeric test case version)."
|
|
4750
|
+
)
|
|
4751
|
+
]);
|
|
4752
|
+
zod.union([
|
|
4753
|
+
zod.strictObject({
|
|
4754
|
+
error: zod.string()
|
|
4755
|
+
}).describe("The Authorization header is missing."),
|
|
4756
|
+
zod.strictObject({
|
|
4757
|
+
error: zod.string()
|
|
4758
|
+
}).describe(
|
|
4759
|
+
"The bearer token does not have the three dot-separated parts of a JWT."
|
|
4760
|
+
),
|
|
4761
|
+
zod.strictObject({
|
|
4762
|
+
error: zod.string()
|
|
4763
|
+
}).describe("A segment of the bearer token is not valid base64."),
|
|
4764
|
+
zod.strictObject({
|
|
4765
|
+
error: zod.string()
|
|
4766
|
+
}).describe("A decoded segment of the bearer token is not valid JSON."),
|
|
4767
|
+
zod.strictObject({
|
|
4768
|
+
error: zod.string()
|
|
4769
|
+
}).describe(
|
|
4770
|
+
"The JWT is well-formed but its signature could not be verified (wrong secret, tampered, or unknown issuer)."
|
|
4771
|
+
)
|
|
4772
|
+
]);
|
|
4773
|
+
zod.strictObject({
|
|
4774
|
+
errorCode: zod.int(),
|
|
4775
|
+
message: zod.string()
|
|
4776
|
+
});
|
|
4777
|
+
zod.strictObject({
|
|
4778
|
+
errorCode: zod.int(),
|
|
4779
|
+
message: zod.string()
|
|
4780
|
+
});
|
|
4781
|
+
zod.strictObject({
|
|
4782
|
+
errorCode: zod.int(),
|
|
4783
|
+
message: zod.string()
|
|
4784
|
+
}).describe("The backend service returned a 5xx or could not be reached.");
|
|
4785
|
+
zod.strictObject(
|
|
4786
|
+
{
|
|
4787
|
+
errorCode: zod.int(),
|
|
4788
|
+
message: zod.string()
|
|
4789
|
+
}
|
|
4790
|
+
);
|
|
4581
4791
|
const getTestPlanAttachmentsReferencePathTestPlanIdOrKeyRegExp = /([0-9]+)|(.+-P[0-9]+)/;
|
|
4582
4792
|
zod.strictObject({
|
|
4583
4793
|
testPlanIdOrKey: zod.string().regex(getTestPlanAttachmentsReferencePathTestPlanIdOrKeyRegExp).describe(
|
|
@@ -6222,6 +6432,70 @@ zod.strictObject({
|
|
|
6222
6432
|
errorCode: zod.int(),
|
|
6223
6433
|
message: zod.string()
|
|
6224
6434
|
});
|
|
6435
|
+
const deleteTestExecutionStepAttachmentMetadataPathTestExecutionIdOrKeyRegExp = /([0-9]+)|(.+-E[0-9]+)/;
|
|
6436
|
+
zod.strictObject(
|
|
6437
|
+
{
|
|
6438
|
+
testExecutionIdOrKey: zod.string().regex(
|
|
6439
|
+
deleteTestExecutionStepAttachmentMetadataPathTestExecutionIdOrKeyRegExp
|
|
6440
|
+
).describe(
|
|
6441
|
+
"The ID or key of the test execution. Test execution keys are of the format [A-Z]+-E[0-9]+"
|
|
6442
|
+
),
|
|
6443
|
+
testExecutionStepId: zod.int().min(1).describe("The ID of the step within the test execution."),
|
|
6444
|
+
attachmentId: zod.int().min(1).describe("The numeric ID of the attachment.")
|
|
6445
|
+
}
|
|
6446
|
+
);
|
|
6447
|
+
zod.void();
|
|
6448
|
+
zod.union([
|
|
6449
|
+
zod.strictObject({
|
|
6450
|
+
errorCode: zod.int(),
|
|
6451
|
+
message: zod.string()
|
|
6452
|
+
}).describe(
|
|
6453
|
+
"A path parameter failed validation at the API layer (for example a testCaseKey that does not match its required pattern)."
|
|
6454
|
+
),
|
|
6455
|
+
zod.strictObject({
|
|
6456
|
+
errorCode: zod.int(),
|
|
6457
|
+
message: zod.string()
|
|
6458
|
+
}).describe(
|
|
6459
|
+
"A query parameter failed validation at the API layer (projectKey pattern, or the numeric bounds maxResults >= 1, startAt 0..1000000, folderId >= 1, jiraProjectVersionId >= 1)."
|
|
6460
|
+
)
|
|
6461
|
+
]);
|
|
6462
|
+
zod.union([
|
|
6463
|
+
zod.strictObject({
|
|
6464
|
+
error: zod.string()
|
|
6465
|
+
}).describe("The Authorization header is missing."),
|
|
6466
|
+
zod.strictObject({
|
|
6467
|
+
error: zod.string()
|
|
6468
|
+
}).describe(
|
|
6469
|
+
"The bearer token does not have the three dot-separated parts of a JWT."
|
|
6470
|
+
),
|
|
6471
|
+
zod.strictObject({
|
|
6472
|
+
error: zod.string()
|
|
6473
|
+
}).describe("A segment of the bearer token is not valid base64."),
|
|
6474
|
+
zod.strictObject({
|
|
6475
|
+
error: zod.string()
|
|
6476
|
+
}).describe("A decoded segment of the bearer token is not valid JSON."),
|
|
6477
|
+
zod.strictObject({
|
|
6478
|
+
error: zod.string()
|
|
6479
|
+
}).describe(
|
|
6480
|
+
"The JWT is well-formed but its signature could not be verified (wrong secret, tampered, or unknown issuer)."
|
|
6481
|
+
)
|
|
6482
|
+
]);
|
|
6483
|
+
zod.strictObject({
|
|
6484
|
+
errorCode: zod.int(),
|
|
6485
|
+
message: zod.string()
|
|
6486
|
+
});
|
|
6487
|
+
zod.strictObject({
|
|
6488
|
+
errorCode: zod.int(),
|
|
6489
|
+
message: zod.string()
|
|
6490
|
+
});
|
|
6491
|
+
zod.strictObject({
|
|
6492
|
+
errorCode: zod.int(),
|
|
6493
|
+
message: zod.string()
|
|
6494
|
+
}).describe("The backend service returned a 5xx or could not be reached.");
|
|
6495
|
+
zod.strictObject({
|
|
6496
|
+
errorCode: zod.int(),
|
|
6497
|
+
message: zod.string()
|
|
6498
|
+
});
|
|
6225
6499
|
const getTestExecutionAttachmentPathTestExecutionIdOrKeyRegExp = /([0-9]+)|(.+-E[0-9]+)/;
|
|
6226
6500
|
zod.strictObject({
|
|
6227
6501
|
testExecutionIdOrKey: zod.string().regex(getTestExecutionAttachmentPathTestExecutionIdOrKeyRegExp).describe(
|
|
@@ -6273,6 +6547,65 @@ zod.strictObject({
|
|
|
6273
6547
|
errorCode: zod.int(),
|
|
6274
6548
|
message: zod.string()
|
|
6275
6549
|
});
|
|
6550
|
+
const deleteTestExecutionAttachmentMetadataPathTestExecutionIdOrKeyRegExp = /([0-9]+)|(.+-E[0-9]+)/;
|
|
6551
|
+
zod.strictObject({
|
|
6552
|
+
testExecutionIdOrKey: zod.string().regex(deleteTestExecutionAttachmentMetadataPathTestExecutionIdOrKeyRegExp).describe(
|
|
6553
|
+
"The ID or key of the test execution. Test execution keys are of the format [A-Z]+-E[0-9]+"
|
|
6554
|
+
),
|
|
6555
|
+
attachmentId: zod.int().min(1).describe("The numeric ID of the attachment.")
|
|
6556
|
+
});
|
|
6557
|
+
zod.void();
|
|
6558
|
+
zod.union([
|
|
6559
|
+
zod.strictObject({
|
|
6560
|
+
errorCode: zod.int(),
|
|
6561
|
+
message: zod.string()
|
|
6562
|
+
}).describe(
|
|
6563
|
+
"A path parameter failed validation at the API layer (for example a testCaseKey that does not match its required pattern)."
|
|
6564
|
+
),
|
|
6565
|
+
zod.strictObject({
|
|
6566
|
+
errorCode: zod.int(),
|
|
6567
|
+
message: zod.string()
|
|
6568
|
+
}).describe(
|
|
6569
|
+
"A query parameter failed validation at the API layer (projectKey pattern, or the numeric bounds maxResults >= 1, startAt 0..1000000, folderId >= 1, jiraProjectVersionId >= 1)."
|
|
6570
|
+
)
|
|
6571
|
+
]);
|
|
6572
|
+
zod.union([
|
|
6573
|
+
zod.strictObject({
|
|
6574
|
+
error: zod.string()
|
|
6575
|
+
}).describe("The Authorization header is missing."),
|
|
6576
|
+
zod.strictObject({
|
|
6577
|
+
error: zod.string()
|
|
6578
|
+
}).describe(
|
|
6579
|
+
"The bearer token does not have the three dot-separated parts of a JWT."
|
|
6580
|
+
),
|
|
6581
|
+
zod.strictObject({
|
|
6582
|
+
error: zod.string()
|
|
6583
|
+
}).describe("A segment of the bearer token is not valid base64."),
|
|
6584
|
+
zod.strictObject({
|
|
6585
|
+
error: zod.string()
|
|
6586
|
+
}).describe("A decoded segment of the bearer token is not valid JSON."),
|
|
6587
|
+
zod.strictObject({
|
|
6588
|
+
error: zod.string()
|
|
6589
|
+
}).describe(
|
|
6590
|
+
"The JWT is well-formed but its signature could not be verified (wrong secret, tampered, or unknown issuer)."
|
|
6591
|
+
)
|
|
6592
|
+
]);
|
|
6593
|
+
zod.strictObject({
|
|
6594
|
+
errorCode: zod.int(),
|
|
6595
|
+
message: zod.string()
|
|
6596
|
+
});
|
|
6597
|
+
zod.strictObject({
|
|
6598
|
+
errorCode: zod.int(),
|
|
6599
|
+
message: zod.string()
|
|
6600
|
+
});
|
|
6601
|
+
zod.strictObject({
|
|
6602
|
+
errorCode: zod.int(),
|
|
6603
|
+
message: zod.string()
|
|
6604
|
+
}).describe("The backend service returned a 5xx or could not be reached.");
|
|
6605
|
+
zod.strictObject({
|
|
6606
|
+
errorCode: zod.int(),
|
|
6607
|
+
message: zod.string()
|
|
6608
|
+
});
|
|
6276
6609
|
const listProjectsQueryMaxResultsDefault = 10;
|
|
6277
6610
|
const listProjectsQueryStartAtDefault = 0;
|
|
6278
6611
|
const listProjectsQueryStartAtMin = 0;
|
|
@@ -6353,7 +6686,7 @@ const listFoldersQueryStartAtDefault = 0;
|
|
|
6353
6686
|
const listFoldersQueryStartAtMin = 0;
|
|
6354
6687
|
const listFoldersQueryStartAtMax = 1e6;
|
|
6355
6688
|
const listFoldersQueryProjectKeyRegExp = /([A-Z][A-Z_0-9]+)/;
|
|
6356
|
-
zod.object({
|
|
6689
|
+
const ListFoldersQueryParams = zod.object({
|
|
6357
6690
|
maxResults: zod.int().min(1).default(listFoldersQueryMaxResultsDefault).describe(
|
|
6358
6691
|
"Specifies the maximum number of results to return in a single call. The default value is 10, and the maximum value that can be requested is 1000.\n\nNote that the server may enforce a lower limit than requested, depending on resource availability or other internal constraints. If this happens, the result set may be truncated. Always check the maxResults value in the response to confirm how many results were actually returned.\n"
|
|
6359
6692
|
),
|
|
@@ -6370,7 +6703,7 @@ const listFolders200ResponseOneTotalMin = 0;
|
|
|
6370
6703
|
const listFolders200ResponseTwoValuesItemNameMax = 255;
|
|
6371
6704
|
const listFolders200ResponseTwoValuesItemNameRegExp = /^(?!\\s*$).+/;
|
|
6372
6705
|
const listFolders200ResponseTwoValuesItemIndexMin = 0;
|
|
6373
|
-
zod.strictObject({
|
|
6706
|
+
const ListFolders200Response = zod.strictObject({
|
|
6374
6707
|
next: zod.url().nullish().describe(
|
|
6375
6708
|
"URL to the next page of results, or null if there are no more results."
|
|
6376
6709
|
),
|
|
@@ -6387,7 +6720,7 @@ zod.strictObject({
|
|
|
6387
6720
|
values: zod.array(
|
|
6388
6721
|
zod.strictObject({
|
|
6389
6722
|
id: zod.int().min(1).describe("The ID of the entity"),
|
|
6390
|
-
parentId: zod.int().
|
|
6723
|
+
parentId: zod.int().nullable().describe("The ID of the parent folder"),
|
|
6391
6724
|
name: zod.string().min(1).max(listFolders200ResponseTwoValuesItemNameMax).regex(listFolders200ResponseTwoValuesItemNameRegExp),
|
|
6392
6725
|
index: zod.int().min(listFolders200ResponseTwoValuesItemIndexMin),
|
|
6393
6726
|
folderType: zod.string().describe(
|
|
@@ -6448,7 +6781,7 @@ const getFolder200ResponseNameRegExp = /^(?!\\s*$).+/;
|
|
|
6448
6781
|
const getFolder200ResponseIndexMin = 0;
|
|
6449
6782
|
zod.strictObject({
|
|
6450
6783
|
id: zod.int().min(1).describe("The ID of the entity"),
|
|
6451
|
-
parentId: zod.int().
|
|
6784
|
+
parentId: zod.int().nullable().describe("The ID of the parent folder"),
|
|
6452
6785
|
name: zod.string().min(1).max(getFolder200ResponseNameMax).regex(getFolder200ResponseNameRegExp),
|
|
6453
6786
|
index: zod.int().min(getFolder200ResponseIndexMin),
|
|
6454
6787
|
folderType: zod.string().describe('Valid values: `"TEST_CASE"`, `"TEST_PLAN"`, `"TEST_CYCLE"`'),
|
|
@@ -7361,6 +7694,8 @@ export {
|
|
|
7361
7694
|
GetTestExecutionTestStepsQueryParams,
|
|
7362
7695
|
ListEnvironments200Response,
|
|
7363
7696
|
ListEnvironmentsQueryParams,
|
|
7697
|
+
ListFolders200Response,
|
|
7698
|
+
ListFoldersQueryParams,
|
|
7364
7699
|
ListPriorities200Response,
|
|
7365
7700
|
ListPrioritiesQueryParams,
|
|
7366
7701
|
ListProjects200Response,
|
|
@@ -7458,6 +7793,12 @@ export {
|
|
|
7458
7793
|
createTestPlanTestCycleLinkBodyTestCycleIdOrKeyRegExp,
|
|
7459
7794
|
createTestPlanTestCycleLinkPathTestPlanIdOrKeyRegExp,
|
|
7460
7795
|
createTestPlanWebLinkPathTestPlanIdOrKeyRegExp,
|
|
7796
|
+
deleteTestCaseAttachmentMetadataPathTestCaseKeyRegExp,
|
|
7797
|
+
deleteTestCaseStepAttachmentMetadataPathTestCaseIdOrKeyRegExp,
|
|
7798
|
+
deleteTestCycleAttachmentMetadataPathTestCycleIdOrKeyRegExp,
|
|
7799
|
+
deleteTestExecutionAttachmentMetadataPathTestExecutionIdOrKeyRegExp,
|
|
7800
|
+
deleteTestExecutionStepAttachmentMetadataPathTestExecutionIdOrKeyRegExp,
|
|
7801
|
+
deleteTestPlanAttachmentMetadataPathTestPlanIdOrKeyRegExp,
|
|
7461
7802
|
getEnvironment200ResponseOneIndexMin,
|
|
7462
7803
|
getEnvironment200ResponseOneNameMax,
|
|
7463
7804
|
getEnvironment200ResponseOneNameRegExp,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { ListFolders200Response, ListFoldersQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetFolders extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Folders",
|
|
6
|
+
toolset: "Folders",
|
|
7
|
+
summary: "Get folders, optionally filtered by project and folder type",
|
|
8
|
+
readOnly: true,
|
|
9
|
+
idempotent: true,
|
|
10
|
+
useCases: [
|
|
11
|
+
"List folders in a Zephyr project",
|
|
12
|
+
"Get Test Case folders for a project",
|
|
13
|
+
"Get Test Plan folders for a project",
|
|
14
|
+
"Get Test Cycle folders for a project",
|
|
15
|
+
"Browse the folder structure in Zephyr"
|
|
16
|
+
],
|
|
17
|
+
inputSchema: ListFoldersQueryParams,
|
|
18
|
+
outputSchema: ListFolders200Response,
|
|
19
|
+
examples: [
|
|
20
|
+
{
|
|
21
|
+
description: "Get the first 10 Folders",
|
|
22
|
+
parameters: {
|
|
23
|
+
maxResults: 10,
|
|
24
|
+
startAt: 0
|
|
25
|
+
},
|
|
26
|
+
expectedOutput: "The first 10 Folders with their details"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
description: "Get Folders from the project SA",
|
|
30
|
+
parameters: {
|
|
31
|
+
projectKey: "SA",
|
|
32
|
+
maxResults: 10,
|
|
33
|
+
startAt: 0
|
|
34
|
+
},
|
|
35
|
+
expectedOutput: "Folders belonging to project SA with their details"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
description: "Get Test Case Folders from the project MM2",
|
|
39
|
+
parameters: {
|
|
40
|
+
projectKey: "MM2",
|
|
41
|
+
folderType: "TEST_CASE",
|
|
42
|
+
maxResults: 10,
|
|
43
|
+
startAt: 0
|
|
44
|
+
},
|
|
45
|
+
expectedOutput: "Test Case Folders belonging to project MM2 with their details"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
description: "Get Test Cycle Folders across all projects",
|
|
49
|
+
parameters: {
|
|
50
|
+
folderType: "TEST_CYCLE",
|
|
51
|
+
maxResults: 10,
|
|
52
|
+
startAt: 0
|
|
53
|
+
},
|
|
54
|
+
expectedOutput: "Test Cycle Folders from all projects with their details"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
handle = async (args) => {
|
|
59
|
+
const parsedArgs = ListFoldersQueryParams.parse(args);
|
|
60
|
+
const response = await this.client.getApiClient().get("/folders", parsedArgs);
|
|
61
|
+
return {
|
|
62
|
+
structuredContent: response,
|
|
63
|
+
content: []
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
GetFolders
|
|
69
|
+
};
|