@smartbear/mcp 0.39.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.
Files changed (34) hide show
  1. package/dist/package.json.js +1 -1
  2. package/dist/qmetry/client/auto-resolve.js +7 -0
  3. package/dist/qmetry/client/handlers.js +5 -2
  4. package/dist/qmetry/client/issues.js +8 -1
  5. package/dist/qmetry/client/project.js +103 -2
  6. package/dist/qmetry/client/requirement.js +99 -3
  7. package/dist/qmetry/client/testcase.js +51 -2
  8. package/dist/qmetry/client/testsuite.js +7 -1
  9. package/dist/qmetry/client/tools/issue-tools.js +1 -15
  10. package/dist/qmetry/client/tools/project-tools.js +2 -2
  11. package/dist/qmetry/client/tools/requirement-tools.js +124 -11
  12. package/dist/qmetry/client/tools/testcase-tools.js +116 -56
  13. package/dist/qmetry/client/tools/testsuite-tools.js +1 -19
  14. package/dist/qmetry/client/tools/udf-tools.js +15 -4
  15. package/dist/qmetry/client/udf.js +2 -2
  16. package/dist/qmetry/client.js +19 -11
  17. package/dist/qmetry/config/constants.js +3 -0
  18. package/dist/qmetry/config/rest-endpoints.js +4 -2
  19. package/dist/qmetry/types/ai-agent.js +8 -4
  20. package/dist/qmetry/types/common.js +69 -43
  21. package/dist/qmetry/types/requirements.js +7 -1
  22. package/dist/qmetry/types/testcase.js +2 -1
  23. package/dist/qmetry/types/udf.js +5 -12
  24. package/dist/swagger/client/api.js +29 -4
  25. package/dist/swagger/client/functional-testing-api.js +17 -10
  26. package/dist/swagger/client/functional-testing-tools.js +1 -1
  27. package/dist/swagger/client/functional-testing-types.js +65 -2
  28. package/dist/swagger/client/functional-testing-url-utils.js +110 -0
  29. package/dist/swagger/client/registry-types.js +2 -2
  30. package/dist/swagger/client/tools.js +2 -2
  31. package/dist/zephyr/client.js +2 -0
  32. package/dist/zephyr/common/rest-api-schemas.js +345 -4
  33. package/dist/zephyr/tool/folder/get-folders.js +69 -0
  34. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { extractPathParamNames, baseUrlParamName, splitUrlByBaseUrl } from "./functional-testing-url-utils.js";
2
3
  const RunFunctionalTestingTestParamsSchema = z.object({
3
4
  testId: z.string().describe("ID of the Functional Testing test to run").trim().min(1)
4
5
  });
@@ -251,8 +252,20 @@ const CreateFunctionalTestingAssertionsSchema = z.object({
251
252
  bodyType: z.enum(["json", "xml"]).optional().describe('Response body format, defaults to "json"'),
252
253
  bodyRules: z.array(CreateFunctionalTestingBodyRuleSchema).optional().describe("Assertion rules evaluated against the response body")
253
254
  });
255
+ const CreateFunctionalTestingTestParameterSchema = z.object({
256
+ name: z.string().trim().min(1).describe("Path parameter name"),
257
+ value: z.string().optional().describe("Parameter default value")
258
+ });
254
259
  const CreateFunctionalTestingTestStepSchema = z.object({
255
- url: z.url().describe("URL for the API call"),
260
+ url: z.string().trim().min(1).describe(
261
+ "Full URL for the API call. May include OAS-style {pathParam} placeholders, which are always converted into reusable parameters. baseUrl MUST also be set and url must start with it."
262
+ ),
263
+ baseUrl: z.url().optional().describe(
264
+ "Server/common URL for this step's endpoint (e.g. https://petstore.swagger.io/v2). REQUIRED on every step it is extracted into a definition-level parameter and templated into the step url"
265
+ ),
266
+ apiName: z.string().trim().min(1).optional().describe(
267
+ `Name of the API that this step's baseUrl belongs to, e.g. "Petstore". `
268
+ ),
256
269
  httpMethod: z.enum(HTTP_METHODS).describe("HTTP method for the API call (defaults to GET server-side)").optional(),
257
270
  requestBody: z.string().describe("Request body").optional(),
258
271
  requestHeaders: z.array(CreateFunctionalTestingTestHeaderSchema).describe("HTTP headers").optional(),
@@ -265,7 +278,56 @@ const CreateFunctionalTestingTestStepSchema = z.object({
265
278
  const CreateFunctionalTestingTestParamsSchema = z.object({
266
279
  name: z.string().describe("Name for the new test").trim().min(1),
267
280
  description: z.string().trim().describe("Optional description for the test").optional(),
268
- steps: z.array(CreateFunctionalTestingTestStepSchema).describe("Test steps to include in the test").optional()
281
+ steps: z.array(CreateFunctionalTestingTestStepSchema).describe("Test steps to include in the test").optional(),
282
+ parameters: z.array(CreateFunctionalTestingTestParameterSchema).describe(
283
+ "Definition-level path parameters for the test (e.g. base URLs, path params), not request body parameters."
284
+ ).optional()
285
+ }).superRefine((data, ctx) => {
286
+ const allowedNames = /* @__PURE__ */ new Set();
287
+ const pathParamCounts = /* @__PURE__ */ new Map();
288
+ data.steps?.forEach((step, index) => {
289
+ for (const name of extractPathParamNames(step.url)) {
290
+ allowedNames.add(name);
291
+ pathParamCounts.set(name, (pathParamCounts.get(name) ?? 0) + 1);
292
+ }
293
+ if (step.baseUrl) {
294
+ allowedNames.add(baseUrlParamName(step.baseUrl, step.apiName));
295
+ if (splitUrlByBaseUrl(step.url, step.baseUrl) === null) {
296
+ ctx.addIssue({
297
+ code: "custom",
298
+ message: `Step url "${step.url}" must start with its baseUrl "${step.baseUrl}".`,
299
+ path: ["steps", index, "url"]
300
+ });
301
+ }
302
+ } else {
303
+ ctx.addIssue({
304
+ code: "custom",
305
+ message: `Step url "${step.url}" does not set "baseUrl". Every step must set baseUrl to its server/common URL (e.g. https://petstore.swagger.io/v2) so it is extracted into a shared parameter, even when only one step uses that URL.`,
306
+ path: ["steps", index, "baseUrl"]
307
+ });
308
+ }
309
+ });
310
+ const definedParamNames = new Set(
311
+ (data.parameters ?? []).map((p) => p.name)
312
+ );
313
+ for (const [name, count] of pathParamCounts) {
314
+ if (count >= 2 && !definedParamNames.has(name)) {
315
+ ctx.addIssue({
316
+ code: "custom",
317
+ message: `Path parameter "{${name}}" appears in ${count} steps and must be defined in "parameters" so its value is shared across all steps.`,
318
+ path: ["parameters"]
319
+ });
320
+ }
321
+ }
322
+ data.parameters?.forEach((param, index) => {
323
+ if (!allowedNames.has(param.name)) {
324
+ ctx.addIssue({
325
+ code: "custom",
326
+ message: `Parameter "${param.name}" is not a path parameter: it must match a {${param.name}} placeholder in a step's url, or the generated base-URL parameter name for a step's baseUrl. The parameters field only accepts path parameters, not request body parameters.`,
327
+ path: ["parameters", index, "name"]
328
+ });
329
+ }
330
+ });
269
331
  });
270
332
  const CreateFunctionalTestingTestResponseSchema = z.object({
271
333
  id: z.number().describe("ID of the newly created test"),
@@ -281,6 +343,7 @@ export {
281
343
  CreateFunctionalTestingSuiteParamsSchema,
282
344
  CreateFunctionalTestingSuiteResponseSchema,
283
345
  CreateFunctionalTestingTestHeaderSchema,
346
+ CreateFunctionalTestingTestParameterSchema,
284
347
  CreateFunctionalTestingTestParamsSchema,
285
348
  CreateFunctionalTestingTestResponseSchema,
286
349
  CreateFunctionalTestingTestStepSchema,
@@ -0,0 +1,110 @@
1
+ const MAX_SANITIZED_NAME_LENGTH = 25;
2
+ function extractPathParamNames(url) {
3
+ return Array.from(url.matchAll(/{([^}]+)}/g), (m) => m[1]);
4
+ }
5
+ function convertPathVarsToReflectVars(value, resolveName = (name) => name) {
6
+ return value.replace(
7
+ /{([^}]+)}/g,
8
+ (_match, name) => `\${var(${resolveName(name)})}`
9
+ );
10
+ }
11
+ function sanitizeForParamName(value) {
12
+ return value.replace(/[^a-zA-Z0-9]/g, "").substring(0, MAX_SANITIZED_NAME_LENGTH);
13
+ }
14
+ function hostnameFor(url) {
15
+ try {
16
+ return new URL(url).hostname;
17
+ } catch {
18
+ return url;
19
+ }
20
+ }
21
+ function normalizeBaseUrl(baseUrl) {
22
+ return baseUrl.replace(/\/+$/, "");
23
+ }
24
+ function baseUrlParamName(baseUrl, apiName) {
25
+ const suffix = sanitizeForParamName(apiName || hostnameFor(baseUrl));
26
+ return `baseURL${suffix}`;
27
+ }
28
+ function splitUrlByBaseUrl(url, baseUrl) {
29
+ const normalizedBase = normalizeBaseUrl(baseUrl);
30
+ if (url === normalizedBase) {
31
+ return { normalizedBase, remainder: "/" };
32
+ }
33
+ if (url.startsWith(`${normalizedBase}/`)) {
34
+ return { normalizedBase, remainder: url.slice(normalizedBase.length) };
35
+ }
36
+ return null;
37
+ }
38
+ function generateUniqueParamName(base, usedNames) {
39
+ if (!usedNames.has(base)) {
40
+ return base;
41
+ }
42
+ let counter = 2;
43
+ while (usedNames.has(`${base}${counter}`)) {
44
+ counter++;
45
+ }
46
+ return `${base}${counter}`;
47
+ }
48
+ function applyBaseUrlTemplating(steps, callerParameters) {
49
+ const usedNames = new Set(
50
+ (callerParameters ?? []).map((p) => p.name)
51
+ );
52
+ const paramNamesByKey = /* @__PURE__ */ new Map();
53
+ const generatedParams = [];
54
+ const getOrCreateParamName = (key, desiredName, value) => {
55
+ let paramName = paramNamesByKey.get(key);
56
+ if (paramName) {
57
+ return paramName;
58
+ }
59
+ if (usedNames.has(desiredName)) {
60
+ paramName = desiredName;
61
+ paramNamesByKey.set(key, paramName);
62
+ return paramName;
63
+ }
64
+ paramName = generateUniqueParamName(desiredName, usedNames);
65
+ paramNamesByKey.set(key, paramName);
66
+ usedNames.add(paramName);
67
+ generatedParams.push({ name: paramName, value });
68
+ return paramName;
69
+ };
70
+ const resultSteps = steps?.map((step) => {
71
+ const { baseUrl, apiName, url, ...rest } = step;
72
+ let prefix = "";
73
+ let remainder = url;
74
+ if (baseUrl) {
75
+ const split = splitUrlByBaseUrl(url, baseUrl);
76
+ if (split === null) {
77
+ throw new Error(
78
+ `Step url "${url}" must start with its baseUrl "${baseUrl}"`
79
+ );
80
+ }
81
+ const paramName = getOrCreateParamName(
82
+ `baseUrl:${split.normalizedBase}`,
83
+ baseUrlParamName(baseUrl, apiName),
84
+ split.normalizedBase
85
+ );
86
+ prefix = `\${var(${paramName})}`;
87
+ remainder = split.remainder;
88
+ }
89
+ const templatedRemainder = convertPathVarsToReflectVars(
90
+ remainder,
91
+ (pathParamName) => getOrCreateParamName(`pathParam:${pathParamName}`, pathParamName, "")
92
+ );
93
+ return { ...rest, url: `${prefix}${templatedRemainder}` };
94
+ });
95
+ return {
96
+ steps: resultSteps,
97
+ parameters: [...generatedParams, ...callerParameters ?? []]
98
+ };
99
+ }
100
+ export {
101
+ applyBaseUrlTemplating,
102
+ baseUrlParamName,
103
+ convertPathVarsToReflectVars,
104
+ extractPathParamNames,
105
+ generateUniqueParamName,
106
+ hostnameFor,
107
+ normalizeBaseUrl,
108
+ sanitizeForParamName,
109
+ splitUrlByBaseUrl
110
+ };
@@ -32,7 +32,7 @@ const CreateApiParamsSchema = z.object({
32
32
  owner: z.string().describe("Organization name (owner of the API)"),
33
33
  apiName: z.string().describe("API name"),
34
34
  definition: z.string().describe(
35
- "API definition content (OpenAPI/AsyncAPI specification in JSON or YAML format). Format is automatically detected. API is created with fixed values: version 1.0.0, private visibility, automock disabled, and no project assignment."
35
+ "API definition content (OpenAPI/AsyncAPI specification in JSON or YAML format). Format is automatically detected. On create, fixed values are used: version 1.0.0, private visibility, automock disabled, and no project assignment. On update, the API's existing visibility is preserved."
36
36
  )
37
37
  });
38
38
  const ScanStandardizationParamsSchema = z.object({
@@ -109,7 +109,7 @@ const CreateApiFromPromptOutputSchema = z.looseObject({
109
109
  specType: z.string().optional(),
110
110
  version: z.string().optional(),
111
111
  url: z.string().optional(),
112
- operation: z.enum(["create", "update"]).optional()
112
+ operation: z.literal("create").optional()
113
113
  });
114
114
  const StandardizationErrorSchema = z.object({
115
115
  line: z.number().optional(),
@@ -231,11 +231,11 @@ const TOOLS = [
231
231
  {
232
232
  title: "Create API from Prompt",
233
233
  toolset: "Registry API",
234
- summary: "Generate and save an API definition based on a prompt using SmartBear AI. This tool automatically applies organization governance and standardization rules during API generation. The specType parameter determines the format of the generated definition. Use: 'openapi20' for OpenAPI 2.0, 'openapi30x' for OpenAPI 3.0.x, 'openapi31x' for OpenAPI 3.1.x, 'asyncapi2xx' for AsyncAPI 2.x, 'asyncapi30x' for AsyncAPI 3.0.x. Use this tool when creating APIs that comply with governance policies or when generating APIs from natural language descriptions. Use this tool when users ask to create, generate, or design APIs with governance or standardization requirements. Returns HTTP 201 for creation, HTTP 200 for update. Response includes 'operation' field indicating whether it was a 'create' or 'update' operation along with API details and SwaggerHub URL.",
234
+ summary: "Generate and save a new API or a new version of an existing API based on a prompt using SmartBear AI. This tool automatically applies organization governance and standardization rules during API generation. The specType parameter determines the format of the generated definition. Use: 'openapi20' for OpenAPI 2.0, 'openapi30x' for OpenAPI 3.0.x, 'openapi31x' for OpenAPI 3.1.x, 'asyncapi2xx' for AsyncAPI 2.x, 'asyncapi30x' for AsyncAPI 3.0.x. Use this tool when creating APIs that comply with governance policies or when generating APIs from natural language descriptions. Use this tool when users ask to create, generate, or design APIs with governance or standardization requirements. Fails with a conflict error if the API version already exists. Returns API details and SwaggerHub URL.",
235
235
  inputSchema: CreateApiFromPromptParamsSchema,
236
236
  outputSchema: CreateApiFromPromptOutputSchema,
237
237
  handler: "createApiFromPrompt",
238
- ...WRITE_DESTRUCTIVE,
238
+ ...WRITE,
239
239
  openWorld: true
240
240
  },
241
241
  {
@@ -3,6 +3,7 @@ import { getRequestHeader } from "../common/request-context.js";
3
3
  import { ApiClient } from "./common/api-client.js";
4
4
  import { GetEnvironments } from "./tool/environment/get-environments.js";
5
5
  import { CreateFolder } from "./tool/folder/create-folder.js";
6
+ import { GetFolders } from "./tool/folder/get-folders.js";
6
7
  import { GetTestCases as GetTestCases$1 } from "./tool/issue-link/get-test-cases.js";
7
8
  import { GetTestCycles as GetTestCycles$1 } from "./tool/issue-link/get-test-cycles.js";
8
9
  import { GetTestExecutions as GetTestExecutions$1 } from "./tool/issue-link/get-test-executions.js";
@@ -98,6 +99,7 @@ class ZephyrClient {
98
99
  new CreateTestSteps(this),
99
100
  new CreateTestCaseIssueLink(this),
100
101
  new CreateTestCycleIssueLink(this),
102
+ new GetFolders(this),
101
103
  new CreateFolder(this),
102
104
  new CreateTestScript(this),
103
105
  new UpdateTestExecution(this),
@@ -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().min(1).describe("The ID of the entity"),
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().min(1).describe("The ID of the entity"),
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,