@postman/postman-mcp-server 2.1.4 → 2.2.0-alpha.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 +1 -1
- package/dist/src/clients/postman.js +68 -29
- package/dist/src/enabledResources.js +3 -2
- package/dist/src/index.js +38 -17
- package/dist/src/tools/createCollection.js +4 -5
- package/dist/src/tools/createCollectionComment.js +5 -6
- package/dist/src/tools/createCollectionFolder.js +4 -5
- package/dist/src/tools/createCollectionFork.js +4 -5
- package/dist/src/tools/createCollectionRequest.js +4 -5
- package/dist/src/tools/createCollectionResponse.js +4 -5
- package/dist/src/tools/createEnvironment.js +13 -8
- package/dist/src/tools/createFolderComment.js +5 -6
- package/dist/src/tools/createMock.js +4 -5
- package/dist/src/tools/createMonitor.js +5 -5
- package/dist/src/tools/createRequestComment.js +5 -6
- package/dist/src/tools/createResponseComment.js +5 -6
- package/dist/src/tools/createSpec.js +17 -29
- package/dist/src/tools/createSpecFile.js +4 -5
- package/dist/src/tools/createWorkspace.js +4 -5
- package/dist/src/tools/deleteApiCollectionComment.js +3 -5
- package/dist/src/tools/deleteCollection.js +3 -5
- package/dist/src/tools/deleteCollectionComment.js +3 -5
- package/dist/src/tools/deleteCollectionFolder.js +3 -5
- package/dist/src/tools/deleteCollectionRequest.js +3 -5
- package/dist/src/tools/deleteCollectionResponse.js +3 -5
- package/dist/src/tools/deleteEnvironment.js +3 -5
- package/dist/src/tools/deleteFolderComment.js +3 -5
- package/dist/src/tools/deleteMock.js +3 -5
- package/dist/src/tools/deleteMonitor.js +3 -5
- package/dist/src/tools/deletePanElementOrFolder.js +3 -5
- package/dist/src/tools/deleteRequestComment.js +3 -5
- package/dist/src/tools/deleteResponseComment.js +3 -5
- package/dist/src/tools/deleteSpec.js +3 -5
- package/dist/src/tools/deleteSpecFile.js +3 -5
- package/dist/src/tools/deleteWorkspace.js +3 -5
- package/dist/src/tools/duplicateCollection.js +4 -5
- package/dist/src/tools/generateCollection.js +8 -5
- package/dist/src/tools/generateSpecFromCollection.js +4 -5
- package/dist/src/tools/getAllElementsAndFolders.js +3 -5
- package/dist/src/tools/getAllPanAddElementRequests.js +3 -5
- package/dist/src/tools/getAllSpecs.js +3 -5
- package/dist/src/tools/getAsyncSpecTaskStatus.js +3 -5
- package/dist/src/tools/getAuthenticatedUser.js +3 -5
- package/dist/src/tools/getCollection.js +3 -5
- package/dist/src/tools/getCollectionComments.js +3 -5
- package/dist/src/tools/getCollectionFolder.js +3 -5
- package/dist/src/tools/getCollectionForks.js +3 -5
- package/dist/src/tools/getCollectionRequest.js +3 -5
- package/dist/src/tools/getCollectionResponse.js +3 -5
- package/dist/src/tools/getCollectionTags.js +3 -5
- package/dist/src/tools/getCollectionUpdatesTasks.js +3 -5
- package/dist/src/tools/getCollections.js +3 -5
- package/dist/src/tools/getCollectionsForkedByUser.js +3 -5
- package/dist/src/tools/getDuplicateCollectionTaskStatus.js +3 -5
- package/dist/src/tools/getEnvironment.js +3 -5
- package/dist/src/tools/getEnvironments.js +3 -5
- package/dist/src/tools/getFolderComments.js +3 -5
- package/dist/src/tools/getGeneratedCollectionSpecs.js +3 -5
- package/dist/src/tools/getMock.js +3 -5
- package/dist/src/tools/getMocks.js +3 -5
- package/dist/src/tools/getMonitor.js +3 -5
- package/dist/src/tools/getMonitors.js +3 -5
- package/dist/src/tools/getRequestComments.js +3 -5
- package/dist/src/tools/getResponseComments.js +3 -5
- package/dist/src/tools/getSourceCollectionStatus.js +3 -5
- package/dist/src/tools/getSpec.js +3 -5
- package/dist/src/tools/getSpecCollections.js +3 -5
- package/dist/src/tools/getSpecDefinition.js +3 -5
- package/dist/src/tools/getSpecFile.js +3 -5
- package/dist/src/tools/getSpecFiles.js +3 -5
- package/dist/src/tools/{getStatusOfAnAsyncTask.js → getStatusOfAnAsyncApiTask.js} +4 -6
- package/dist/src/tools/getTaggedEntities.js +3 -5
- package/dist/src/tools/getWorkspace.js +3 -5
- package/dist/src/tools/getWorkspaceGlobalVariables.js +3 -5
- package/dist/src/tools/getWorkspaceTags.js +3 -5
- package/dist/src/tools/getWorkspaces.js +3 -5
- package/dist/src/tools/mergeCollectionFork.js +57 -0
- package/dist/src/tools/patchCollection.js +12 -16
- package/dist/src/tools/patchEnvironment.js +5 -7
- package/dist/src/tools/postPanElementOrFolder.js +3 -5
- package/dist/src/tools/publishDocumentation.js +4 -5
- package/dist/src/tools/publishMock.js +3 -5
- package/dist/src/tools/pullCollectionChanges.js +3 -5
- package/dist/src/tools/putCollection.js +4 -5
- package/dist/src/tools/putEnvironment.js +13 -8
- package/dist/src/tools/resolveCommentThread.js +3 -5
- package/dist/src/tools/runMonitor.js +5 -7
- package/dist/src/tools/syncCollectionWithSpec.js +3 -5
- package/dist/src/tools/syncSpecWithCollection.js +3 -5
- package/dist/src/tools/transferCollectionFolders.js +4 -5
- package/dist/src/tools/transferCollectionRequests.js +4 -5
- package/dist/src/tools/transferCollectionResponses.js +4 -5
- package/dist/src/tools/unpublishDocumentation.js +3 -5
- package/dist/src/tools/unpublishMock.js +3 -5
- package/dist/src/tools/updateApiCollectionComment.js +4 -5
- package/dist/src/tools/updateCollectionComment.js +4 -5
- package/dist/src/tools/updateCollectionFolder.js +4 -5
- package/dist/src/tools/updateCollectionRequest.js +4 -5
- package/dist/src/tools/updateCollectionResponse.js +4 -5
- package/dist/src/tools/updateCollectionTags.js +4 -5
- package/dist/src/tools/updateFolderComment.js +4 -5
- package/dist/src/tools/updateMock.js +4 -5
- package/dist/src/tools/updateMonitor.js +5 -5
- package/dist/src/tools/updatePanElementOrFolder.js +3 -5
- package/dist/src/tools/updateRequestComment.js +4 -5
- package/dist/src/tools/updateResponseComment.js +4 -5
- package/dist/src/tools/updateSpecFile.js +4 -5
- package/dist/src/tools/updateSpecProperties.js +4 -5
- package/dist/src/tools/updateWorkspace.js +4 -5
- package/dist/src/tools/updateWorkspaceGlobalVariables.js +5 -5
- package/dist/src/tools/updateWorkspaceTags.js +4 -5
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -28,13 +28,12 @@ export async function handler(params, extra) {
|
|
|
28
28
|
bodyPayload.path = params.path;
|
|
29
29
|
if (params.content !== undefined)
|
|
30
30
|
bodyPayload.content = params.content;
|
|
31
|
-
const
|
|
32
|
-
method: 'POST',
|
|
31
|
+
const options = {
|
|
33
32
|
body: JSON.stringify(bodyPayload),
|
|
34
33
|
contentType: ContentType.Json,
|
|
35
|
-
apiKey: extra.apiKey,
|
|
36
34
|
headers: extra.headers,
|
|
37
|
-
}
|
|
35
|
+
};
|
|
36
|
+
const result = await extra.client.post(url, options);
|
|
38
37
|
return {
|
|
39
38
|
content: [
|
|
40
39
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -34,13 +34,12 @@ export async function handler(params, extra) {
|
|
|
34
34
|
const bodyPayload = {};
|
|
35
35
|
if (params.workspace !== undefined)
|
|
36
36
|
bodyPayload.workspace = params.workspace;
|
|
37
|
-
const
|
|
38
|
-
method: 'POST',
|
|
37
|
+
const options = {
|
|
39
38
|
body: JSON.stringify(bodyPayload),
|
|
40
39
|
contentType: ContentType.Json,
|
|
41
|
-
apiKey: extra.apiKey,
|
|
42
40
|
headers: extra.headers,
|
|
43
|
-
}
|
|
41
|
+
};
|
|
42
|
+
const result = await extra.client.post(url, options);
|
|
44
43
|
return {
|
|
45
44
|
content: [
|
|
46
45
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -23,11 +22,10 @@ export async function handler(params, extra) {
|
|
|
23
22
|
const endpoint = `/apis/${params.apiId}/collections/${params.collectionId}/comments/${params.commentId}`;
|
|
24
23
|
const query = new URLSearchParams();
|
|
25
24
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
26
|
-
const
|
|
27
|
-
method: 'DELETE',
|
|
28
|
-
apiKey: extra.apiKey,
|
|
25
|
+
const options = {
|
|
29
26
|
headers: extra.headers,
|
|
30
|
-
}
|
|
27
|
+
};
|
|
28
|
+
const result = await extra.client.delete(url, options);
|
|
31
29
|
return {
|
|
32
30
|
content: [
|
|
33
31
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -23,11 +22,10 @@ export async function handler(params, extra) {
|
|
|
23
22
|
const endpoint = `/collections/${params.collectionId}`;
|
|
24
23
|
const query = new URLSearchParams();
|
|
25
24
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
26
|
-
const
|
|
27
|
-
method: 'DELETE',
|
|
28
|
-
apiKey: extra.apiKey,
|
|
25
|
+
const options = {
|
|
29
26
|
headers: extra.headers,
|
|
30
|
-
}
|
|
27
|
+
};
|
|
28
|
+
const result = await extra.client.delete(url, options);
|
|
31
29
|
return {
|
|
32
30
|
content: [
|
|
33
31
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/collections/${params.collectionId}/comments/${params.commentId}`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'DELETE',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.delete(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'DELETE',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.delete(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'DELETE',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.delete(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'DELETE',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.delete(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/environments/${params.environmentId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'DELETE',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.delete(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -23,11 +22,10 @@ export async function handler(params, extra) {
|
|
|
23
22
|
const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments/${params.commentId}`;
|
|
24
23
|
const query = new URLSearchParams();
|
|
25
24
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
26
|
-
const
|
|
27
|
-
method: 'DELETE',
|
|
28
|
-
apiKey: extra.apiKey,
|
|
25
|
+
const options = {
|
|
29
26
|
headers: extra.headers,
|
|
30
|
-
}
|
|
27
|
+
};
|
|
28
|
+
const result = await extra.client.delete(url, options);
|
|
31
29
|
return {
|
|
32
30
|
content: [
|
|
33
31
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/mocks/${params.mockId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'DELETE',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.delete(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/monitors/${params.monitorId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'DELETE',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.delete(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -24,11 +23,10 @@ export async function handler(params, extra) {
|
|
|
24
23
|
const endpoint = `/network/private/${params.elementType}/${params.elementId}`;
|
|
25
24
|
const query = new URLSearchParams();
|
|
26
25
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
27
|
-
const
|
|
28
|
-
method: 'DELETE',
|
|
29
|
-
apiKey: extra.apiKey,
|
|
26
|
+
const options = {
|
|
30
27
|
headers: extra.headers,
|
|
31
|
-
}
|
|
28
|
+
};
|
|
29
|
+
const result = await extra.client.delete(url, options);
|
|
32
30
|
return {
|
|
33
31
|
content: [
|
|
34
32
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -23,11 +22,10 @@ export async function handler(params, extra) {
|
|
|
23
22
|
const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments/${params.commentId}`;
|
|
24
23
|
const query = new URLSearchParams();
|
|
25
24
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
26
|
-
const
|
|
27
|
-
method: 'DELETE',
|
|
28
|
-
apiKey: extra.apiKey,
|
|
25
|
+
const options = {
|
|
29
26
|
headers: extra.headers,
|
|
30
|
-
}
|
|
27
|
+
};
|
|
28
|
+
const result = await extra.client.delete(url, options);
|
|
31
29
|
return {
|
|
32
30
|
content: [
|
|
33
31
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -23,11 +22,10 @@ export async function handler(params, extra) {
|
|
|
23
22
|
const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments/${params.commentId}`;
|
|
24
23
|
const query = new URLSearchParams();
|
|
25
24
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
26
|
-
const
|
|
27
|
-
method: 'DELETE',
|
|
28
|
-
apiKey: extra.apiKey,
|
|
25
|
+
const options = {
|
|
29
26
|
headers: extra.headers,
|
|
30
|
-
}
|
|
27
|
+
};
|
|
28
|
+
const result = await extra.client.delete(url, options);
|
|
31
29
|
return {
|
|
32
30
|
content: [
|
|
33
31
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/specs/${params.specId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'DELETE',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.delete(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/specs/${params.specId}/files/${params.filePath}`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'DELETE',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.delete(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/workspaces/${params.workspaceId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'DELETE',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.delete(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -31,13 +31,12 @@ export async function handler(params, extra) {
|
|
|
31
31
|
bodyPayload.workspace = params.workspace;
|
|
32
32
|
if (params.suffix !== undefined)
|
|
33
33
|
bodyPayload.suffix = params.suffix;
|
|
34
|
-
const
|
|
35
|
-
method: 'POST',
|
|
34
|
+
const options = {
|
|
36
35
|
body: JSON.stringify(bodyPayload),
|
|
37
36
|
contentType: ContentType.Json,
|
|
38
|
-
apiKey: extra.apiKey,
|
|
39
37
|
headers: extra.headers,
|
|
40
|
-
}
|
|
38
|
+
};
|
|
39
|
+
const result = await extra.client.post(url, options);
|
|
41
40
|
return {
|
|
42
41
|
content: [
|
|
43
42
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -49,6 +49,10 @@ export const parameters = z.object({
|
|
|
49
49
|
.boolean()
|
|
50
50
|
.describe('Whether authentication details should be included in all requests, or always inherited from the collection.')
|
|
51
51
|
.default(false),
|
|
52
|
+
nestedFolderHierarchy: z
|
|
53
|
+
.boolean()
|
|
54
|
+
.describe("If true, creates subfolders in the generated collection based on the order of the endpoints' tags.")
|
|
55
|
+
.default(false),
|
|
52
56
|
})
|
|
53
57
|
.describe("The advanced creation options and their values. For more details, see Postman's [OpenAPI to Postman Collection Converter OPTIONS documentation](https://github.com/postmanlabs/openapi-to-postman/blob/develop/OPTIONS.md). These properties are case-sensitive.")
|
|
54
58
|
.optional(),
|
|
@@ -69,13 +73,12 @@ export async function handler(params, extra) {
|
|
|
69
73
|
bodyPayload.name = params.name;
|
|
70
74
|
if (params.options !== undefined)
|
|
71
75
|
bodyPayload.options = params.options;
|
|
72
|
-
const
|
|
73
|
-
method: 'POST',
|
|
76
|
+
const options = {
|
|
74
77
|
body: JSON.stringify(bodyPayload),
|
|
75
78
|
contentType: ContentType.Json,
|
|
76
|
-
apiKey: extra.apiKey,
|
|
77
79
|
headers: extra.headers,
|
|
78
|
-
}
|
|
80
|
+
};
|
|
81
|
+
const result = await extra.client.post(url, options);
|
|
79
82
|
return {
|
|
80
83
|
content: [
|
|
81
84
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -32,13 +32,12 @@ export async function handler(params, extra) {
|
|
|
32
32
|
bodyPayload.type = params.type;
|
|
33
33
|
if (params.format !== undefined)
|
|
34
34
|
bodyPayload.format = params.format;
|
|
35
|
-
const
|
|
36
|
-
method: 'POST',
|
|
35
|
+
const options = {
|
|
37
36
|
body: JSON.stringify(bodyPayload),
|
|
38
37
|
contentType: ContentType.Json,
|
|
39
|
-
apiKey: extra.apiKey,
|
|
40
38
|
headers: extra.headers,
|
|
41
|
-
}
|
|
39
|
+
};
|
|
40
|
+
const result = await extra.client.post(url, options);
|
|
42
41
|
return {
|
|
43
42
|
content: [
|
|
44
43
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -105,11 +104,10 @@ export async function handler(params, extra) {
|
|
|
105
104
|
if (params.type !== undefined)
|
|
106
105
|
query.set('type', String(params.type));
|
|
107
106
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
108
|
-
const
|
|
109
|
-
method: 'GET',
|
|
110
|
-
apiKey: extra.apiKey,
|
|
107
|
+
const options = {
|
|
111
108
|
headers: extra.headers,
|
|
112
|
-
}
|
|
109
|
+
};
|
|
110
|
+
const result = await extra.client.get(url, options);
|
|
113
111
|
return {
|
|
114
112
|
content: [
|
|
115
113
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -82,11 +81,10 @@ export async function handler(params, extra) {
|
|
|
82
81
|
if (params.limit !== undefined)
|
|
83
82
|
query.set('limit', String(params.limit));
|
|
84
83
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
85
|
-
const
|
|
86
|
-
method: 'GET',
|
|
87
|
-
apiKey: extra.apiKey,
|
|
84
|
+
const options = {
|
|
88
85
|
headers: extra.headers,
|
|
89
|
-
}
|
|
86
|
+
};
|
|
87
|
+
const result = await extra.client.get(url, options);
|
|
90
88
|
return {
|
|
91
89
|
content: [
|
|
92
90
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -36,11 +35,10 @@ export async function handler(params, extra) {
|
|
|
36
35
|
if (params.limit !== undefined)
|
|
37
36
|
query.set('limit', String(params.limit));
|
|
38
37
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
39
|
-
const
|
|
40
|
-
method: 'GET',
|
|
41
|
-
apiKey: extra.apiKey,
|
|
38
|
+
const options = {
|
|
42
39
|
headers: extra.headers,
|
|
43
|
-
}
|
|
40
|
+
};
|
|
41
|
+
const result = await extra.client.get(url, options);
|
|
44
42
|
return {
|
|
45
43
|
content: [
|
|
46
44
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -23,11 +22,10 @@ export async function handler(params, extra) {
|
|
|
23
22
|
const endpoint = `/${params.elementType}/${params.elementId}/tasks/${params.taskId}`;
|
|
24
23
|
const query = new URLSearchParams();
|
|
25
24
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
26
|
-
const
|
|
27
|
-
method: 'GET',
|
|
28
|
-
apiKey: extra.apiKey,
|
|
25
|
+
const options = {
|
|
29
26
|
headers: extra.headers,
|
|
30
|
-
}
|
|
27
|
+
};
|
|
28
|
+
const result = await extra.client.get(url, options);
|
|
31
29
|
return {
|
|
32
30
|
content: [
|
|
33
31
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/me`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -35,11 +34,10 @@ export async function handler(params, extra) {
|
|
|
35
34
|
if (params.model !== undefined)
|
|
36
35
|
query.set('model', String(params.model));
|
|
37
36
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
38
|
-
const
|
|
39
|
-
method: 'GET',
|
|
40
|
-
apiKey: extra.apiKey,
|
|
37
|
+
const options = {
|
|
41
38
|
headers: extra.headers,
|
|
42
|
-
}
|
|
39
|
+
};
|
|
40
|
+
const result = await extra.client.get(url, options);
|
|
43
41
|
return {
|
|
44
42
|
content: [
|
|
45
43
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -21,11 +20,10 @@ export async function handler(params, extra) {
|
|
|
21
20
|
const endpoint = `/collections/${params.collectionId}/comments`;
|
|
22
21
|
const query = new URLSearchParams();
|
|
23
22
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
24
|
-
const
|
|
25
|
-
method: 'GET',
|
|
26
|
-
apiKey: extra.apiKey,
|
|
23
|
+
const options = {
|
|
27
24
|
headers: extra.headers,
|
|
28
|
-
}
|
|
25
|
+
};
|
|
26
|
+
const result = await extra.client.get(url, options);
|
|
29
27
|
return {
|
|
30
28
|
content: [
|
|
31
29
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -37,11 +36,10 @@ export async function handler(params, extra) {
|
|
|
37
36
|
if (params.populate !== undefined)
|
|
38
37
|
query.set('populate', String(params.populate));
|
|
39
38
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
40
|
-
const
|
|
41
|
-
method: 'GET',
|
|
42
|
-
apiKey: extra.apiKey,
|
|
39
|
+
const options = {
|
|
43
40
|
headers: extra.headers,
|
|
44
|
-
}
|
|
41
|
+
};
|
|
42
|
+
const result = await extra.client.get(url, options);
|
|
45
43
|
return {
|
|
46
44
|
content: [
|
|
47
45
|
{
|