@smartbear/mcp 0.8.0 → 0.10.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/README.md +29 -4
- package/dist/api-hub/client/api.js +239 -10
- package/dist/api-hub/client/configuration.js +5 -0
- package/dist/api-hub/client/index.js +1 -0
- package/dist/api-hub/client/portal-types.js +126 -0
- package/dist/api-hub/client/registry-types.js +8 -0
- package/dist/api-hub/client/tools.js +78 -15
- package/dist/api-hub/client/user-management-types.js +24 -0
- package/dist/api-hub/client.js +34 -0
- package/dist/bugsnag/client/api/CurrentUser.js +12 -49
- package/dist/bugsnag/client/api/Error.js +29 -142
- package/dist/bugsnag/client/api/Project.js +52 -113
- package/dist/bugsnag/client/api/api.js +3743 -0
- package/dist/bugsnag/client/api/base.js +97 -34
- package/dist/bugsnag/client/api/configuration.js +26 -0
- package/dist/bugsnag/client/api/index.js +2 -0
- package/dist/bugsnag/client/filters.js +28 -0
- package/dist/bugsnag/client.js +104 -155
- package/dist/collaborator/client.js +364 -0
- package/dist/common/server.js +73 -23
- package/dist/common/types.js +6 -1
- package/dist/index.js +9 -1
- package/dist/pactflow/client/prompt-utils.js +2 -1
- package/dist/pactflow/client/tools.js +4 -4
- package/dist/pactflow/client/utils.js +5 -4
- package/dist/pactflow/client.js +10 -9
- package/dist/qmetry/client/api/client-api.js +21 -16
- package/dist/qmetry/client/api/error-handler.js +329 -0
- package/dist/qmetry/client/auto-resolve.js +96 -0
- package/dist/qmetry/client/handlers.js +33 -2
- package/dist/qmetry/client/issues.js +123 -0
- package/dist/qmetry/client/project.js +73 -0
- package/dist/qmetry/client/requirement.js +76 -0
- package/dist/qmetry/client/testcase.js +122 -6
- package/dist/qmetry/client/testsuite.js +272 -0
- package/dist/qmetry/client/tools/index.js +17 -0
- package/dist/qmetry/client/tools/issue-tools.js +545 -0
- package/dist/qmetry/client/tools/project-tools.js +348 -0
- package/dist/qmetry/client/tools/requirement-tools.js +530 -0
- package/dist/qmetry/client/tools/testcase-tools.js +526 -0
- package/dist/qmetry/client/tools/testsuite-tools.js +772 -0
- package/dist/qmetry/client/tools/types.js +1 -0
- package/dist/qmetry/client/utils.js +16 -0
- package/dist/qmetry/client.js +27 -17
- package/dist/qmetry/config/constants.js +28 -0
- package/dist/qmetry/config/rest-endpoints.js +30 -0
- package/dist/qmetry/types/common.js +599 -9
- package/dist/qmetry/types/issues.js +16 -0
- package/dist/qmetry/types/project.js +17 -0
- package/dist/qmetry/types/requirements.js +19 -0
- package/dist/qmetry/types/testcase.js +20 -0
- package/dist/qmetry/types/testsuite.js +44 -0
- package/dist/reflect/client.js +7 -6
- package/dist/zephyr/client.js +7 -1
- package/dist/zephyr/common/api-client.js +8 -0
- package/dist/zephyr/common/auth-service.js +1 -0
- package/dist/zephyr/common/rest-api-schemas.js +5173 -0
- package/dist/zephyr/tool/project/get-project.js +39 -0
- package/dist/zephyr/tool/project/get-projects.js +7 -13
- package/dist/zephyr/tool/test-cycle/get-test-cycles.js +72 -0
- package/package.json +1 -1
- package/dist/bugsnag/client/api/filters.js +0 -167
- package/dist/bugsnag/client/configuration.js +0 -10
- package/dist/bugsnag/client/index.js +0 -2
- package/dist/qmetry/client/tools.js +0 -222
- package/dist/zephyr/common/types.js +0 -35
|
@@ -1,56 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ProjectsApiFetchParamCreator } from "./api.js";
|
|
2
|
+
import { BaseAPI, getQueryParams } from "./base.js";
|
|
3
3
|
export class ProjectAPI extends BaseAPI {
|
|
4
4
|
static projectFields = [
|
|
5
5
|
"id",
|
|
6
6
|
"name",
|
|
7
7
|
"slug",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
];
|
|
13
|
-
static filterFields = [
|
|
14
|
-
"errors_url",
|
|
15
|
-
"events_url",
|
|
16
|
-
"url",
|
|
17
|
-
"html_url",
|
|
8
|
+
"apiKey",
|
|
9
|
+
"stabilityTargetType",
|
|
10
|
+
"targetStability",
|
|
11
|
+
"criticalStability",
|
|
18
12
|
];
|
|
19
13
|
static eventFieldFields = [
|
|
20
14
|
"custom",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
15
|
+
"displayId",
|
|
16
|
+
"filterOptions",
|
|
17
|
+
"pivotOptions",
|
|
24
18
|
];
|
|
25
19
|
static buildFields = [
|
|
26
20
|
"id",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
21
|
+
"releaseTime",
|
|
22
|
+
"appVersion",
|
|
23
|
+
"releaseStage",
|
|
24
|
+
"errorsIntroducedCount",
|
|
25
|
+
"errorsSeenCount",
|
|
26
|
+
"totalSessionsCount",
|
|
27
|
+
"unhandledSessionsCount",
|
|
28
|
+
"accumulativeDailyUsersSeen",
|
|
29
|
+
"accumulativeDailyUsersWithUnhandled",
|
|
36
30
|
];
|
|
37
31
|
static releaseFields = [
|
|
38
32
|
"id",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
33
|
+
"releaseStageName",
|
|
34
|
+
"appVersion",
|
|
35
|
+
"firstReleasedAt",
|
|
36
|
+
"firstReleaseId",
|
|
37
|
+
"releasesCount",
|
|
44
38
|
"visible",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
39
|
+
"totalSessionsCount",
|
|
40
|
+
"unhandledSessionsCount",
|
|
41
|
+
"sessionsCountInLast24h",
|
|
42
|
+
"accumulativeDailyUsersSeen",
|
|
43
|
+
"accumulativeDailyUsersWithUnhandled",
|
|
50
44
|
];
|
|
51
|
-
constructor(configuration) {
|
|
52
|
-
super(configuration, ProjectAPI.filterFields);
|
|
53
|
-
}
|
|
54
45
|
/**
|
|
55
46
|
* List the Event Fields for a Project
|
|
56
47
|
* GET /projects/{project_id}/event_fields
|
|
@@ -58,64 +49,19 @@ export class ProjectAPI extends BaseAPI {
|
|
|
58
49
|
* @returns A promise that resolves to the list of event fields
|
|
59
50
|
*/
|
|
60
51
|
async listProjectEventFields(projectId) {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
method: "GET",
|
|
64
|
-
url,
|
|
65
|
-
});
|
|
66
|
-
// Only return allowed fields
|
|
67
|
-
return {
|
|
68
|
-
...data,
|
|
69
|
-
body: pickFieldsFromArray(data.body || [], ProjectAPI.eventFieldFields),
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Create a Project in an Organization
|
|
74
|
-
* POST /organizations/{organization_id}/projects
|
|
75
|
-
* @param organizationId The organization ID
|
|
76
|
-
* @param data The project creation request body
|
|
77
|
-
* @returns A promise that resolves to the created project
|
|
78
|
-
*/
|
|
79
|
-
async createProject(organizationId, data) {
|
|
80
|
-
const url = `/organizations/${organizationId}/projects`;
|
|
81
|
-
return await this.request({
|
|
82
|
-
method: "POST",
|
|
83
|
-
url,
|
|
84
|
-
body: data,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Lists builds for a specific project.
|
|
89
|
-
* GET /projects/{project_id}/releases
|
|
90
|
-
* @param projectId The ID of the project.
|
|
91
|
-
* @param opts Options for listing releases, including filtering by release stage.
|
|
92
|
-
* @returns A promise that resolves to an array of `ListReleasesResponse` objects.
|
|
93
|
-
*/
|
|
94
|
-
async listBuilds(projectId, opts) {
|
|
95
|
-
const url = opts.next_url ??
|
|
96
|
-
`/projects/${projectId}/releases${opts.release_stage ? `?release_stage=${opts.release_stage}` : ""}`;
|
|
97
|
-
const response = await this.request({
|
|
98
|
-
method: "GET",
|
|
99
|
-
url,
|
|
100
|
-
}, false);
|
|
101
|
-
return {
|
|
102
|
-
...response,
|
|
103
|
-
body: pickFieldsFromArray(response.body || [], ProjectAPI.buildFields),
|
|
104
|
-
};
|
|
52
|
+
const localVarFetchArgs = ProjectsApiFetchParamCreator(this.configuration).listProjectEventFields(projectId);
|
|
53
|
+
return await this.requestArray(localVarFetchArgs.url, localVarFetchArgs.options, true, ProjectAPI.eventFieldFields);
|
|
105
54
|
}
|
|
106
55
|
/**
|
|
107
56
|
* Retrieves a specific build from a project.
|
|
108
57
|
* GET /projects/{project_id}/releases/{release_id}
|
|
109
58
|
* @param projectId The ID of the project.
|
|
110
|
-
* @param
|
|
59
|
+
* @param releaseId The ID of the release to retrieve.
|
|
111
60
|
* @returns A promise that resolves to the release data.
|
|
112
61
|
*/
|
|
113
|
-
async
|
|
114
|
-
const
|
|
115
|
-
return await this.
|
|
116
|
-
method: "GET",
|
|
117
|
-
url,
|
|
118
|
-
});
|
|
62
|
+
async getProjectReleaseById(projectId, releaseId) {
|
|
63
|
+
const localVarFetchArgs = ProjectsApiFetchParamCreator(this.configuration).getProjectReleaseById(projectId, releaseId);
|
|
64
|
+
return await this.requestObject(localVarFetchArgs.url, localVarFetchArgs.options, ProjectAPI.buildFields);
|
|
119
65
|
}
|
|
120
66
|
/**
|
|
121
67
|
* Lists releases for a specific project.
|
|
@@ -124,20 +70,19 @@ export class ProjectAPI extends BaseAPI {
|
|
|
124
70
|
* @param opts Options for listing releases, including filtering by release stage and visibility.
|
|
125
71
|
* @returns A promise that resolves to an array of `ReleaseSummaryResponse` objects.
|
|
126
72
|
*/
|
|
127
|
-
async
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
};
|
|
73
|
+
async listProjectReleaseGroups(projectId, releaseStageName, topOnly, visibleOnly, perPage, nextUrl) {
|
|
74
|
+
const options = getQueryParams(nextUrl);
|
|
75
|
+
// Next links need to be used as-is to ensure results are consistent, so only the page size can be modified
|
|
76
|
+
// the others will get overridden
|
|
77
|
+
if (nextUrl) {
|
|
78
|
+
options.query.per_page = perPage ? perPage.toString() : undefined;
|
|
79
|
+
topOnly = undefined;
|
|
80
|
+
visibleOnly = undefined;
|
|
81
|
+
}
|
|
82
|
+
const localVarFetchArgs = ProjectsApiFetchParamCreator(this.configuration).listProjectReleaseGroups(projectId, releaseStageName, topOnly, visibleOnly, perPage, undefined, // pageToken passed in through options
|
|
83
|
+
options);
|
|
84
|
+
return await this.requestArray(localVarFetchArgs.url, localVarFetchArgs.options, false, // Paginate results
|
|
85
|
+
ProjectAPI.releaseFields);
|
|
141
86
|
}
|
|
142
87
|
/**
|
|
143
88
|
* Retrieves a specific release by its ID.
|
|
@@ -145,12 +90,9 @@ export class ProjectAPI extends BaseAPI {
|
|
|
145
90
|
* @param releaseId The ID of the release to retrieve.
|
|
146
91
|
* @returns A promise that resolves to the release data.
|
|
147
92
|
*/
|
|
148
|
-
async
|
|
149
|
-
const
|
|
150
|
-
return await this.
|
|
151
|
-
method: "GET",
|
|
152
|
-
url,
|
|
153
|
-
});
|
|
93
|
+
async getReleaseGroup(releaseId) {
|
|
94
|
+
const localVarFetchArgs = ProjectsApiFetchParamCreator(this.configuration).getReleaseGroup(releaseId);
|
|
95
|
+
return await this.requestObject(localVarFetchArgs.url, localVarFetchArgs.options, ProjectAPI.releaseFields);
|
|
154
96
|
}
|
|
155
97
|
/**
|
|
156
98
|
* Lists builds associated with a specific release group.
|
|
@@ -159,10 +101,7 @@ export class ProjectAPI extends BaseAPI {
|
|
|
159
101
|
* @return A promise that resolves to an array of `BuildResponse` objects.
|
|
160
102
|
*/
|
|
161
103
|
async listBuildsInRelease(releaseId) {
|
|
162
|
-
const
|
|
163
|
-
return await this.
|
|
164
|
-
method: "GET",
|
|
165
|
-
url,
|
|
166
|
-
}, true);
|
|
104
|
+
const localVarFetchArgs = ProjectsApiFetchParamCreator(this.configuration).getReleaseGroup(releaseId);
|
|
105
|
+
return await this.requestArray(localVarFetchArgs.url, localVarFetchArgs.options, true, ProjectAPI.buildFields);
|
|
167
106
|
}
|
|
168
107
|
}
|